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 d6842c36767e7f3e29447ce388f2d69f520308a7..1bccbd2e8b91ef7ac89bac0beeec33e3aafdd03b 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" |
@@ -368,10 +369,13 @@ 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.isSVG() && !object.isSVGRoot()) |
+ ? SVGLayoutSupport::willIsolateBlendingDescendantsForObject(&object) |
+ : (object.isBoxModelObject() && style.isStackingContext()); |
+ const bool isSVGGraphicsElement = |
chrishtr
2016/12/15 19:21:23
Why skip SVG graphics elements?
trchen
2016/12/15 23:49:46
It is to include SVG graphics elements. SVGLayoutS
|
+ object.isSVGShape() || object.isSVGImage() || object.isSVGText(); |
+ if (!isIsolatedGroup && !isSVGGraphicsElement) { |
if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) { |
if (auto* properties = object.getMutableForPainting().paintProperties()) |
context.forceSubtreeUpdate |= properties->clearEffect(); |