https://bugs.webkit.org/show_bug.cgi?id=79126
Reviewed by Anders Carlsson.
The ScrollingCoordinator should only attempt to coordinate scrolling when compositing is active, since it's all
about manipulating GraphicsLayers. Adds a runtime check.
Also removes some stray #if ENABLE(THREADED_SCROLLING) guards that snuck into FrameView.
* page/FrameView.cpp:
(WebCore::FrameView::addFixedObject):
(WebCore::FrameView::removeFixedObject):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::coordinatesScrollingForFrameView):
(WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108392
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
2012-02-21 James Robinson <jamesr@chromium.org>
+ ScrollingCoordinator::coordinatesScrollingForFrameView should be conditional on compositing being active
+ https://bugs.webkit.org/show_bug.cgi?id=79126
+
+ Reviewed by Anders Carlsson.
+
+ The ScrollingCoordinator should only attempt to coordinate scrolling when compositing is active, since it's all
+ about manipulating GraphicsLayers. Adds a runtime check.
+
+ Also removes some stray #if ENABLE(THREADED_SCROLLING) guards that snuck into FrameView.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::addFixedObject):
+ (WebCore::FrameView::removeFixedObject):
+ * page/scrolling/ScrollingCoordinator.cpp:
+ (WebCore::ScrollingCoordinator::coordinatesScrollingForFrameView):
+ (WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
+
+2012-02-21 James Robinson <jamesr@chromium.org>
+
Chromium build fix. Unreviwed but rubber-stamped by Antti.
* dom/Document.cpp:
if (platformWidget())
updateCanBlitOnScrollRecursively();
-#if ENABLE(THREADED_SCROLLING)
if (Page* page = m_frame->page()) {
if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator())
scrollingCoordinator->frameViewHasFixedObjectsDidChange(this);
}
-#endif
}
}
--m_fixedObjectCount;
if (!m_fixedObjectCount) {
-#if ENABLE(THREADED_SCROLLING)
if (Page* page = m_frame->page()) {
if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator())
scrollingCoordinator->frameViewHasFixedObjectsDidChange(this);
}
-#endif
// FIXME: In addFixedObject() we only call this if there's a platform widget,
// why isn't the same check being made here?
if (frameView->frame() != m_page->mainFrame())
return false;
- return true;
+ // We currently only support composited mode.
+#if USE(ACCELERATED_COMPOSITING)
+ RenderView* renderView = m_page->mainFrame()->contentRenderer();
+ if (!renderView)
+ return false;
+ return renderView->usesCompositing();
+#endif
+
+ return false;
}
static Region computeNonFastScrollableRegion(FrameView* frameView)