Chromium Code Reviews| 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 247d41b8d2ed7c8bd5f7a7da7f2b0150a73e79a3..3b7a3de16637380dbc1089ae930a53005d8b889b 100644 |
| --- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp |
| +++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp |
| @@ -26,7 +26,7 @@ |
| namespace blink { |
| -void PaintPropertyTreeBuilder::setupInitialContext( |
| +void PaintPropertyTreeBuilder::resetToRootContext( |
| PaintPropertyTreeBuilderContext& context) { |
| context.current.clip = context.absolutePosition.clip = |
| context.fixedPosition.clip = ClipPaintPropertyNode::root(); |
| @@ -38,6 +38,11 @@ void PaintPropertyTreeBuilder::setupInitialContext( |
| context.fixedPosition.scroll = ScrollPaintPropertyNode::root(); |
| } |
| +void PaintPropertyTreeBuilder::setupInitialContext( |
| + PaintPropertyTreeBuilderContext& context) { |
| + resetToRootContext(context); |
| +} |
| + |
| // True if a new property was created, false if an existing one was updated. |
| static bool updatePreTranslation( |
| FrameView& frameView, |
| @@ -1090,6 +1095,13 @@ void PaintPropertyTreeBuilder::updateForObjectLocationAndSize( |
| void PaintPropertyTreeBuilder::updatePropertiesForSelf( |
| const LayoutObject& object, |
| PaintPropertyTreeBuilderContext& context) { |
| + if (object.isSVGResourceContainer()) { |
| + // SVG resources are painted within one or more other locations in the |
| + // SVG during paint, and hence have their own independent paint property |
| + // trees. |
| + resetToRootContext(context); |
|
pdr.
2017/03/21 22:26:22
This re-use of setupInitialContext is clever. I th
chrishtr
2017/03/21 23:29:57
Changed to reuse the constructor, which will get t
|
| + } |
| + |
| // This is not in FindObjectPropertiesNeedingUpdateScope because paint offset |
| // can change without needsPaintPropertyUpdate. |
| updateForObjectLocationAndSize(object, context); |