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

Unified Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMappingTest.cpp

Issue 2285253003: Move TopDocumentRootScrollerController to a separate object on FrameHost (Closed)
Patch Set: Rebase 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
Index: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMappingTest.cpp
diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMappingTest.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMappingTest.cpp
index da3bf24db9c267f443e12f1d5171005847466546..77c1f7a1d72c332676723e0bc61f37eaff128d5c 100644
--- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMappingTest.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMappingTest.cpp
@@ -653,10 +653,8 @@ TEST_F(CompositedLayerMappingTest, RootScrollerAncestorsNotClipped)
{
NonThrowableExceptionState nonThrow;
- // TODO(bokan): Avoid cast once follow-up patch separates TDRSC from
- // RootScrollerController.
- TopDocumentRootScrollerController* rootScrollerController =
- (TopDocumentRootScrollerController*)document().rootScrollerController();
+ TopDocumentRootScrollerController& rootScrollerController =
+ document().frameHost()->globalRootScrollerController();
setBodyInnerHTML(
// The container DIV is composited with scrolling contents and a
@@ -732,7 +730,7 @@ TEST_F(CompositedLayerMappingTest, RootScrollerAncestorsNotClipped)
{
document().setRootScroller(innerScroller, nonThrow);
document().view()->updateAllLifecyclePhases();
- ASSERT_EQ(innerScroller, rootScrollerController->globalRootScroller());
+ ASSERT_EQ(innerScroller, rootScrollerController.globalRootScroller());
EXPECT_FALSE(mapping->ancestorClippingLayer());
EXPECT_FALSE(mapping->scrollingLayer()->platformLayer()->masksToBounds());
@@ -744,7 +742,7 @@ TEST_F(CompositedLayerMappingTest, RootScrollerAncestorsNotClipped)
{
document().setRootScroller(innerScroller2, nonThrow);
document().view()->updateAllLifecyclePhases();
- ASSERT_EQ(innerScroller2, rootScrollerController->globalRootScroller());
+ ASSERT_EQ(innerScroller2, rootScrollerController.globalRootScroller());
EXPECT_TRUE(mapping->ancestorClippingLayer());
EXPECT_TRUE(mapping->ancestorClippingLayer()->platformLayer()->masksToBounds());
@@ -758,7 +756,7 @@ TEST_F(CompositedLayerMappingTest, RootScrollerAncestorsNotClipped)
{
document().setRootScroller(innerScroller3, nonThrow);
document().view()->updateAllLifecyclePhases();
- ASSERT_EQ(innerScroller3, rootScrollerController->globalRootScroller());
+ ASSERT_EQ(innerScroller3, rootScrollerController.globalRootScroller());
EXPECT_TRUE(mapping2->scrollingLayer()->platformLayer()->masksToBounds());
@@ -770,7 +768,7 @@ TEST_F(CompositedLayerMappingTest, RootScrollerAncestorsNotClipped)
{
document().setRootScroller(nullptr, nonThrow);
document().view()->updateAllLifecyclePhases();
- ASSERT_EQ(document().documentElement(), rootScrollerController->globalRootScroller());
+ ASSERT_EQ(document().documentElement(), rootScrollerController.globalRootScroller());
EXPECT_TRUE(mapping3->clippingLayer());
EXPECT_TRUE(mapping3->clippingLayer()->platformLayer()->masksToBounds());

Powered by Google App Engine
This is Rietveld 408576698