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(); |