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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/TransformPaintPropertyNode.cpp

Issue 2667373002: Ensure PaintArtifactCompositor assigns a scroll tree index to all cc layers (Closed)
Patch Set: 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/platform/graphics/paint/TransformPaintPropertyNode.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/TransformPaintPropertyNode.cpp b/third_party/WebKit/Source/platform/graphics/paint/TransformPaintPropertyNode.cpp
index 4e86f406f69aa50385975341f38500c4a2d8befe..14211fc303085b4f0df91543f71aa0f768526f08 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/TransformPaintPropertyNode.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/TransformPaintPropertyNode.cpp
@@ -19,6 +19,22 @@ TransformPaintPropertyNode* TransformPaintPropertyNode::root() {
return root;
}
+const ScrollPaintPropertyNode*
+TransformPaintPropertyNode::findEnclosingScrollNode() const {
+ if (m_scroll)
+ return m_scroll.get();
+
+ for (const auto* ancestor = parent(); ancestor;
+ ancestor = ancestor->parent()) {
+ if (const auto* scrollNode = ancestor->scrollNode())
+ return scrollNode;
+ }
+ // The root transform node references the root scroll node so a scroll node
+ // should always exist.
+ NOTREACHED();
+ return nullptr;
+}
+
String TransformPaintPropertyNode::toString() const {
auto transform = String::format(
"parent=%p transform=%s origin=%s flattensInheritedTransform=%s "

Powered by Google App Engine
This is Rietveld 408576698