diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /layout/base/nsLayoutUtils.cpp | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/base/nsLayoutUtils.cpp')
-rw-r--r-- | layout/base/nsLayoutUtils.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index 28230421d5..db766f6603 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -9492,8 +9492,9 @@ nsRect nsLayoutUtils::ComputeSVGOriginBox(SVGViewportElement* aElement) { } /* static */ -nsRect nsLayoutUtils::ComputeSVGReferenceRect(nsIFrame* aFrame, - StyleGeometryBox aGeometryBox) { +nsRect nsLayoutUtils::ComputeSVGReferenceRect( + nsIFrame* aFrame, StyleGeometryBox aGeometryBox, + MayHaveNonScalingStrokeCyclicDependency aMayHaveCyclicDependency) { MOZ_ASSERT(aFrame->GetContent()->IsSVGElement()); nsRect r; @@ -9502,9 +9503,12 @@ nsRect nsLayoutUtils::ComputeSVGReferenceRect(nsIFrame* aFrame, // XXX Bug 1299876 // The size of stroke-box is not correct if this graphic element has // specific stroke-linejoin or stroke-linecap. - gfxRect bbox = - SVGUtils::GetBBox(aFrame, SVGUtils::eBBoxIncludeFillGeometry | - SVGUtils::eBBoxIncludeStroke); + const uint32_t flags = SVGUtils::eBBoxIncludeFillGeometry | + SVGUtils::eBBoxIncludeStroke | + (bool(aMayHaveCyclicDependency) + ? SVGUtils::eAvoidCycleIfNonScalingStroke + : 0); + gfxRect bbox = SVGUtils::GetBBox(aFrame, flags); r = nsLayoutUtils::RoundGfxRectToAppRect(bbox, AppUnitsPerCSSPixel()); break; } |