summaryrefslogtreecommitdiffstats
path: root/layout/svg/SVGGeometryFrame.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
commit59203c63bb777a3bacec32fb8830fba33540e809 (patch)
tree58298e711c0ff0575818c30485b44a2f21bf28a0 /layout/svg/SVGGeometryFrame.cpp
parentAdding upstream version 126.0.1. (diff)
downloadfirefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz
firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/svg/SVGGeometryFrame.cpp')
-rw-r--r--layout/svg/SVGGeometryFrame.cpp8
1 files changed, 7 insertions, 1 deletions
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;