From 8dd16259287f58f9273002717ec4d27e97127719 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:43:14 +0200 Subject: Merging upstream version 127.0. Signed-off-by: Daniel Baumann --- layout/svg/SVGGeometryFrame.cpp | 8 +++++++- layout/svg/SVGOuterSVGFrame.cpp | 6 +++--- layout/svg/SVGUtils.cpp | 4 ++-- layout/svg/crashtests/crashtests.list | 6 +++--- 4 files changed, 15 insertions(+), 9 deletions(-) (limited to 'layout/svg') diff --git a/layout/svg/SVGGeometryFrame.cpp b/layout/svg/SVGGeometryFrame.cpp index 3d6d6aef7e..0e00d60a31 100644 --- a/layout/svg/SVGGeometryFrame.cpp +++ b/layout/svg/SVGGeometryFrame.cpp @@ -114,6 +114,7 @@ void SVGGeometryFrame::DidSetComputedStyle(ComputedStyle* aOldComputedStyle) { if (element->IsGeometryChangedViaCSS(*Style(), *aOldComputedStyle)) { element->ClearAnyCachedPath(); + SVGObserverUtils::InvalidateRenderingObservers(this); } } @@ -772,7 +773,12 @@ bool SVGGeometryFrame::CreateWebRenderCommands( // At the moment this code path doesn't support strokes so it fine to // combine the rectangle's opacity (which has to be applied on the result) // of (filling + stroking) with the fill opacity. - float elemOpacity = StyleEffects()->mOpacity; + + float elemOpacity = 1.0f; + if (SVGUtils::CanOptimizeOpacity(this)) { + elemOpacity = StyleEffects()->mOpacity; + } + float fillOpacity = SVGUtils::GetOpacity(style->mFillOpacity, contextPaint); float opacity = elemOpacity * fillOpacity; diff --git a/layout/svg/SVGOuterSVGFrame.cpp b/layout/svg/SVGOuterSVGFrame.cpp index d88327f059..00d7663901 100644 --- a/layout/svg/SVGOuterSVGFrame.cpp +++ b/layout/svg/SVGOuterSVGFrame.cpp @@ -126,9 +126,9 @@ NS_QUERYFRAME_TAIL_INHERITING(SVGDisplayContainerFrame) /* virtual */ nscoord SVGOuterSVGFrame::GetMinISize(gfxContext* aRenderingContext) { - // If this ever changes to return something other than zero, then - // nsSubDocumentFrame::GetMinISize will also need to change. - return 0; + auto size = GetIntrinsicSize(); + const auto& iSize = GetWritingMode().IsVertical() ? size.height : size.width; + return iSize.valueOr(0); } /* virtual */ diff --git a/layout/svg/SVGUtils.cpp b/layout/svg/SVGUtils.cpp index 2967bac780..7c0d864b20 100644 --- a/layout/svg/SVGUtils.cpp +++ b/layout/svg/SVGUtils.cpp @@ -1080,8 +1080,8 @@ bool SVGUtils::GetNonScalingStrokeTransform(const nsIFrame* aFrame, MOZ_ASSERT(aFrame->GetContent()->IsSVGElement(), "should be an SVG element"); - *aUserToOuterSVG = ThebesMatrix(SVGContentUtils::GetCTM( - static_cast(aFrame->GetContent()), true)); + *aUserToOuterSVG = ThebesMatrix( + SVGContentUtils::GetCTM(static_cast(aFrame->GetContent()))); return aUserToOuterSVG->HasNonTranslation(); } diff --git a/layout/svg/crashtests/crashtests.list b/layout/svg/crashtests/crashtests.list index 0d38fed5ab..690faec32e 100644 --- a/layout/svg/crashtests/crashtests.list +++ b/layout/svg/crashtests/crashtests.list @@ -223,8 +223,8 @@ load 1467552-1.html load 1474982.html load conditional-outer-svg-nondirty-reflow-assert.xhtml load extref-test-1.xhtml -skip-if(wayland) pref(widget.windows.window_occlusion_tracking.enabled,false) load blob-merging-and-retained-display-list.html # Bug 1819154, wayland: Bug 1857256 -skip-if(wayland) load empty-blob-merging.html # wayland: Bug 1857256 +load blob-merging-and-retained-display-list.html +load empty-blob-merging.html load grouping-empty-bounds.html load 1480275.html load 1480224.html @@ -243,7 +243,7 @@ load 1539318-1.svg load 1548985-1.html load 1548985-2.svg load 1555851.html -skip-if(wayland) pref(widget.windows.window_occlusion_tracking.enabled,false) load invalidation-of-opacity-0.html # Bug 1819154, wayland: Bug 1857256 +load invalidation-of-opacity-0.html load 1563779.html load 1600855.html load 1601824.html -- cgit v1.2.3