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

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

Issue 2358433002: Add "threaded scrolling disabled" main thread scrolling reason [spv2] (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
index 8df7d78641100b05b9b99f573e86aeb42f1a9abb..54fea844549ba7815aec9649dd41b096be6a9f95 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
@@ -2009,6 +2009,35 @@ TEST_P(PaintPropertyTreeBuilderTest, SVGRootNoClip)
EXPECT_FALSE(getLayoutObjectByElementId("svg")->objectPaintProperties()->overflowClip());
}
+TEST_P(PaintPropertyTreeBuilderTest, ThreadedScrollingDisabledMainThreadScrollReason)
+{
+ setBodyInnerHTML(
+ "<style>"
+ " #overflowA {"
+ " position: absolute;"
+ " overflow: scroll;"
+ " width: 20px;"
+ " height: 20px;"
+ " }"
+ " .forceScroll {"
+ " height: 4000px;"
+ " }"
+ "</style>"
+ "<div id='overflowA'>"
+ " <div class='forceScroll'></div>"
+ "</div>"
+ "<div class='forceScroll'></div>");
+ Element* overflowA = document().getElementById("overflowA");
+ EXPECT_FALSE(frameScroll()->hasMainThreadScrollingReasons(MainThreadScrollingReason::kThreadedScrollingDisabled));
+ EXPECT_FALSE(overflowA->layoutObject()->objectPaintProperties()->scroll()->hasMainThreadScrollingReasons(MainThreadScrollingReason::kThreadedScrollingDisabled));
+
+ document().settings()->setThreadedScrollingEnabled(false);
+ document().view()->updateAllLifecyclePhases();
+
+ EXPECT_TRUE(frameScroll()->hasMainThreadScrollingReasons(MainThreadScrollingReason::kThreadedScrollingDisabled));
+ EXPECT_TRUE(overflowA->layoutObject()->objectPaintProperties()->scroll()->hasMainThreadScrollingReasons(MainThreadScrollingReason::kThreadedScrollingDisabled));
+}
+
TEST_P(PaintPropertyTreeBuilderTest, MainThreadScrollReasonsWithNestedScrollers)
{
setBodyInnerHTML(
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698