summaryrefslogtreecommitdiffstats
path: root/layout/svg/SVGGeometryFrame.cpp
diff options
context:
space:
mode:
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;