Index: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp |
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp |
index 165538ff94d47c1aaa21db5523ae1217814c8971..efda5e49c017d5fcbb9f16095b5d641dd0a3208c 100644 |
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp |
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp |
@@ -10,6 +10,7 @@ |
#include "core/layout/LayoutInline.h" |
#include "core/layout/LayoutView.h" |
#include "core/layout/svg/LayoutSVGRoot.h" |
+#include "core/layout/svg/SVGLayoutSupport.h" |
#include "core/paint/FindPropertiesNeedingUpdate.h" |
#include "core/paint/ObjectPaintProperties.h" |
#include "core/paint/PaintLayer.h" |
@@ -364,10 +365,10 @@ void PaintPropertyTreeBuilder::updateEffect( |
PaintPropertyTreeBuilderContext& context) { |
const ComputedStyle& style = object.styleRef(); |
- // TODO(crbug.com/673500): style.isStackingContext() is only meaningful for |
- // HTML elements. What we really want to ask is whether the element starts |
- // an isolated group, and SVGs use a different rule. |
- if (!style.isStackingContext()) { |
+ const bool isIsolatedGroup = |
+ (object.isBoxModelObject() && style.isStackingContext()) || |
+ (object.isSVG() && !object.isSVGRoot() && SVGLayoutSupport::willIsolateBlendingDescendantsForObject(&object)); |
+ if (!isIsolatedGroup) { |
if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) { |
if (auto* properties = object.getMutableForPainting().paintProperties()) |
context.forceSubtreeUpdate |= properties->clearEffect(); |