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

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: Created 7 years, 6 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: Source/core/page/scrolling/ScrollingCoordinator.cpp
diff --git a/Source/core/page/scrolling/ScrollingCoordinator.cpp b/Source/core/page/scrolling/ScrollingCoordinator.cpp
index cd9e31fba2205fbb07a2894820a6b48d39c6a235..fd5d0badcaaedc72b455799e3acfa39a09c4c8d9 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 == static_cast<ScrollableArea*>(m_page->mainFrame()->view());
jamesr 2013/07/04 00:37:37 do you need the static cast on the RHS of this for
enne (OOO) 2013/07/04 00:50:17 You're right. The compiler will do the right thin
+}
+
GraphicsLayer* ScrollingCoordinator::scrollLayerForFrameView(FrameView* frameView)
{
Frame* frame = frameView->frame();

Powered by Google App Engine
This is Rietveld 408576698