Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(720)

Unified Diff: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp

Issue 2768453003: Put SVGResourceContainer subtypes into their own property trees. (Closed)
Patch Set: none Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 04676b9089b8ca6282978143e28fb5c5af26778c..4f781030aa264caee198e6375e5fe744abc1646f 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
@@ -26,16 +26,17 @@
namespace blink {
-void PaintPropertyTreeBuilder::setupInitialContext(
- PaintPropertyTreeBuilderContext& context) {
- context.current.clip = context.absolutePosition.clip =
- context.fixedPosition.clip = ClipPaintPropertyNode::root();
- context.currentEffect = EffectPaintPropertyNode::root();
- context.inputClipOfCurrentEffect = ClipPaintPropertyNode::root();
- context.current.transform = context.absolutePosition.transform =
- context.fixedPosition.transform = TransformPaintPropertyNode::root();
- context.current.scroll = context.absolutePosition.scroll =
- context.fixedPosition.scroll = ScrollPaintPropertyNode::root();
+PaintPropertyTreeBuilderContext::PaintPropertyTreeBuilderContext()
+ : containerForAbsolutePosition(nullptr),
+ currentEffect(EffectPaintPropertyNode::root()),
+ inputClipOfCurrentEffect(ClipPaintPropertyNode::root()),
+ forceSubtreeUpdate(false) {
+ current.clip = absolutePosition.clip = fixedPosition.clip =
+ ClipPaintPropertyNode::root();
+ current.transform = absolutePosition.transform = fixedPosition.transform =
+ TransformPaintPropertyNode::root();
+ current.scroll = absolutePosition.scroll = fixedPosition.scroll =
+ ScrollPaintPropertyNode::root();
}
// True if a new property was created, false if an existing one was updated.
@@ -1094,6 +1095,13 @@ void PaintPropertyTreeBuilder::updateForObjectLocationAndSize(
void PaintPropertyTreeBuilder::updatePropertiesForSelf(
const LayoutObject& object,
PaintPropertyTreeBuilderContext& context) {
+ if (object.isSVGHiddenContainer()) {
+ // SVG resources are painted within one or more other locations in the
+ // SVG during paint, and hence have their own independent paint property
+ // trees, paint offset, etc.
+ context = PaintPropertyTreeBuilderContext();
+ }
+
// This is not in FindObjectPropertiesNeedingUpdateScope because paint offset
// can change without needsPaintPropertyUpdate.
updateForObjectLocationAndSize(object, context);

Powered by Google App Engine
This is Rietveld 408576698