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

Side by Side Diff: Source/web/tests/ScrollingCoordinatorChromiumTest.cpp

Issue 103583007: Ensure that if FrameView::isScrollable() is false, the assoc WebLayer is, too. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/page/scrolling/ScrollingCoordinator.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 { 136 {
137 navigateTo("about:blank"); 137 navigateTo("about:blank");
138 forceFullCompositingUpdate(); 138 forceFullCompositingUpdate();
139 139
140 // Make sure the scrolling coordinator is active. 140 // Make sure the scrolling coordinator is active.
141 FrameView* frameView = m_webViewImpl->mainFrameImpl()->frameView(); 141 FrameView* frameView = m_webViewImpl->mainFrameImpl()->frameView();
142 Page* page = m_webViewImpl->mainFrameImpl()->frame()->page(); 142 Page* page = m_webViewImpl->mainFrameImpl()->frame()->page();
143 ASSERT_TRUE(page->scrollingCoordinator()); 143 ASSERT_TRUE(page->scrollingCoordinator());
144 ASSERT_TRUE(page->scrollingCoordinator()->coordinatesScrollingForFrameView(f rameView)); 144 ASSERT_TRUE(page->scrollingCoordinator()->coordinatesScrollingForFrameView(f rameView));
145 145
146 // Fast scrolling should be enabled by default. 146 // Fast scrolling should be enabled by default, BUT if the main frame is
147 // not scrollable, then the rootScrollLayer shouldn't be scrollable either.
jamesr 2014/01/06 23:46:01 can you add a case for what this was originally te
147 WebLayer* rootScrollLayer = getRootScrollLayer(); 148 WebLayer* rootScrollLayer = getRootScrollLayer();
148 ASSERT_TRUE(rootScrollLayer->scrollable()); 149 ASSERT_FALSE(rootScrollLayer->scrollable());
149 ASSERT_FALSE(rootScrollLayer->shouldScrollOnMainThread()); 150 ASSERT_FALSE(rootScrollLayer->shouldScrollOnMainThread());
150 ASSERT_FALSE(rootScrollLayer->haveWheelEventHandlers()); 151 ASSERT_FALSE(rootScrollLayer->haveWheelEventHandlers());
151 } 152 }
152 153
153 static WebLayer* webLayerFromElement(Element* element) 154 static WebLayer* webLayerFromElement(Element* element)
154 { 155 {
155 if (!element) 156 if (!element)
156 return 0; 157 return 0;
157 RenderObject* renderer = element->renderer(); 158 RenderObject* renderer = element->renderer();
158 if (!renderer || !renderer->isBoxModelObject()) 159 if (!renderer || !renderer->isBoxModelObject())
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 TEST_F(ScrollingCoordinatorChromiumTest, setupScrollbarLayerShouldNotCrash) 470 TEST_F(ScrollingCoordinatorChromiumTest, setupScrollbarLayerShouldNotCrash)
470 { 471 {
471 registerMockedHttpURLLoad("setup_scrollbar_layer_crash.html"); 472 registerMockedHttpURLLoad("setup_scrollbar_layer_crash.html");
472 navigateTo(m_baseURL + "setup_scrollbar_layer_crash.html"); 473 navigateTo(m_baseURL + "setup_scrollbar_layer_crash.html");
473 forceFullCompositingUpdate(); 474 forceFullCompositingUpdate();
474 // This test document setup an iframe with scrollbars, then switch to 475 // This test document setup an iframe with scrollbars, then switch to
475 // an empty document by javascript. 476 // an empty document by javascript.
476 } 477 }
477 478
478 } // namespace 479 } // namespace
OLDNEW
« no previous file with comments | « Source/core/page/scrolling/ScrollingCoordinator.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698