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

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

Issue 2574713003: Add toString() for paint property node classes (Closed)
Patch Set: Update test Created 4 years 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/ScrollPaintPropertyNode.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/ScrollPaintPropertyNode.cpp b/third_party/WebKit/Source/platform/graphics/paint/ScrollPaintPropertyNode.cpp
index 5941bafe0b3874c1a38917232a18313646cfb66f..f5c37e3240a032dd52f872e0a2903790ed7ab1b1 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/ScrollPaintPropertyNode.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/ScrollPaintPropertyNode.cpp
@@ -14,4 +14,18 @@ ScrollPaintPropertyNode* ScrollPaintPropertyNode::root() {
return root;
}
+String ScrollPaintPropertyNode::toString() const {
+ FloatSize scrollOffset =
+ m_scrollOffsetTranslation->matrix().to2DTranslation();
+ std::string mainThreadScrollingReasonsAsText =
+ MainThreadScrollingReason::mainThreadScrollingReasonsAsText(
+ m_mainThreadScrollingReasons);
+ return String::format(
+ "scrollOffsetTranslation=%s clip=%s bounds=%s "
+ "mainThreadScrollingReasons=%s",
+ scrollOffset.toString().ascii().data(), m_clip.toString().ascii().data(),
+ m_bounds.toString().ascii().data(),
+ mainThreadScrollingReasonsAsText.c_str());
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698