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

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 247d41b8d2ed7c8bd5f7a7da7f2b0150a73e79a3..587235ffebe6c0dc73a97fba466e57c63344d11e 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
@@ -26,16 +26,18 @@
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(nullptr),
pdr. 2017/03/21 23:41:05 can you change this to inputClipOfCurrentEffect(Cl
chrishtr 2017/03/21 23:43:07 Done.
+ forceSubtreeUpdate(false) {
+ current.clip = absolutePosition.clip = fixedPosition.clip =
+ ClipPaintPropertyNode::root();
+ inputClipOfCurrentEffect = 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.
@@ -1090,6 +1092,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, 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