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

Unified Diff: Source/core/page/scrolling/ScrollingCoordinator.cpp

Issue 18083034: Don't set scroll client for main frame (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address jamesr review Created 7 years, 5 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 | « Source/core/page/scrolling/ScrollingCoordinator.h ('k') | Source/core/platform/graphics/GraphicsLayer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/scrolling/ScrollingCoordinator.cpp
diff --git a/Source/core/page/scrolling/ScrollingCoordinator.cpp b/Source/core/page/scrolling/ScrollingCoordinator.cpp
index cd9e31fba2205fbb07a2894820a6b48d39c6a235..ae117773be2706396385ae016a77a1d7c9f846ad 100644
--- a/Source/core/page/scrolling/ScrollingCoordinator.cpp
+++ b/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -240,7 +240,7 @@ void ScrollingCoordinator::scrollableAreaScrollbarLayerDidChange(ScrollableArea*
if (!platformSupportsCoordinatedScrollbar)
return;
- bool isMainFrame = (scrollableArea == static_cast<ScrollableArea*>(m_page->mainFrame()->view()));
+ bool isMainFrame = isForMainFrame(scrollableArea);
if (!isMainFrame && platformSupportsMainFrameOnly)
return;
@@ -271,8 +271,10 @@ void ScrollingCoordinator::scrollableAreaScrollbarLayerDidChange(ScrollableArea*
void ScrollingCoordinator::scrollableAreaScrollLayerDidChange(ScrollableArea* scrollableArea)
{
GraphicsLayer* scrollLayer = scrollLayerForScrollableArea(scrollableArea);
- if (scrollLayer)
- scrollLayer->setScrollableArea(scrollableArea);
+ if (scrollLayer) {
+ bool isMainFrame = isForMainFrame(scrollableArea);
+ scrollLayer->setScrollableArea(scrollableArea, isMainFrame);
+ }
WebLayer* webLayer = scrollingWebLayerForScrollableArea(scrollableArea);
if (webLayer) {
@@ -533,6 +535,11 @@ GraphicsLayer* ScrollingCoordinator::verticalScrollbarLayerForScrollableArea(Scr
return scrollableArea->layerForVerticalScrollbar();
}
+bool ScrollingCoordinator::isForMainFrame(ScrollableArea* scrollableArea) const
+{
+ return scrollableArea == m_page->mainFrame()->view();
+}
+
GraphicsLayer* ScrollingCoordinator::scrollLayerForFrameView(FrameView* frameView)
{
Frame* frame = frameView->frame();
« no previous file with comments | « Source/core/page/scrolling/ScrollingCoordinator.h ('k') | Source/core/platform/graphics/GraphicsLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698