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

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

Issue 2657863004: Move scroll paint property nodes to be owned by the transform tree (Closed)
Patch Set: Rebase & remove parens Created 3 years, 11 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/PaintPropertyTreePrinter.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreePrinter.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreePrinter.cpp
index 3344e8a803e163b3680516340649cebc4851ce49..db1612b1d42b267f1c9c42054b4996bfa4d39047 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreePrinter.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreePrinter.cpp
@@ -219,16 +219,20 @@ class PropertyTreePrinterTraits<ScrollPaintPropertyNode> {
static void addFrameViewProperties(
const FrameView& frameView,
PropertyTreePrinter<ScrollPaintPropertyNode>& printer) {
- if (const ScrollPaintPropertyNode* scroll = frameView.scroll())
- printer.addPropertyNode(scroll, "Scroll (FrameView)");
+ if (const auto* scrollTranslation = frameView.scrollTranslation()) {
+ const auto* scrollNode = scrollTranslation->scrollNode();
+ printer.addPropertyNode(scrollNode, "Scroll (FrameView)");
+ }
}
static void addObjectPaintProperties(
const LayoutObject& object,
const ObjectPaintProperties& paintProperties,
PropertyTreePrinter<ScrollPaintPropertyNode>& printer) {
- if (const ScrollPaintPropertyNode* scroll = paintProperties.scroll())
- printer.addPropertyNode(scroll, "Scroll (" + object.debugName() + ")");
+ if (const auto* scrollTranslation = paintProperties.scrollTranslation()) {
+ printer.addPropertyNode(scrollTranslation->scrollNode(),
+ "Scroll (" + object.debugName() + ")");
+ }
}
};
@@ -429,7 +433,9 @@ class PaintPropertyTreeGraphBuilder {
if (object.isLayoutView() && overflowClip->parent())
writePaintPropertyNode(*overflowClip->parent(), nullptr, "rootClip");
}
- const ScrollPaintPropertyNode* scroll = properties->scroll();
+
+ const auto* scroll =
+ scrollTranslation ? scrollTranslation->scrollNode() : nullptr;
if (scroll)
writePaintPropertyNode(*scroll, &object, "scroll");
}
@@ -450,8 +456,6 @@ class PaintPropertyTreeGraphBuilder {
writePaintPropertyNode(*root, &frameView, "rootClip");
if (const auto* root = getRoot(contentsState->effect()))
writePaintPropertyNode(*root, &frameView, "rootEffect");
- if (const auto* root = getRoot(contentsState->scroll()))
- writePaintPropertyNode(*root, &frameView, "rootScroll");
}
TransformPaintPropertyNode* preTranslation = frameView.preTranslation();
if (preTranslation)
@@ -464,7 +468,8 @@ class PaintPropertyTreeGraphBuilder {
ClipPaintPropertyNode* contentClip = frameView.contentClip();
if (contentClip)
writePaintPropertyNode(*contentClip, &frameView, "contentClip");
- const ScrollPaintPropertyNode* scroll = frameView.scroll();
+ const auto* scroll =
+ scrollTranslation ? scrollTranslation->scrollNode() : nullptr;
if (scroll)
writePaintPropertyNode(*scroll, &frameView, "scroll");
}

Powered by Google App Engine
This is Rietveld 408576698