Scrolling tree should keep track of region we can't do fast scrolling for
https://bugs.webkit.org/show_bug.cgi?id=78050
Reviewed by Dan Bernstein.
We currently won't do fast scrolling for subframes and other types of scrollable areas.
Because of this, we'll have the scrolling tree keep a region of the page for which we can't
do fast scrolling. This region will be updated after layout.
* page/FrameView.cpp:
(WebCore::FrameView::scrollableAreaBoundingBox):
Return the bounding box.
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::frameViewLayoutUpdated):
Go through all the scrollable areas in this frame view and compute the region which we can't do
fast scrolling for.
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::commitNewTreeState):
Update the non-fast-scrollable region.
* page/scrolling/ScrollingTreeState.cpp:
(WebCore::ScrollingTreeState::setNonFastScrollableRegion):
Set the non-fast-scrollable region if it's changed.
* platform/ScrollableArea.h:
Add scrollableAreaBoundingBox member function.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollableAreaBoundingBox):
Return the bounding box.
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::scrollableAreaBoundingBox):
Return the bounding box.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107001 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/platform/ScrollableArea.h b/Source/WebCore/platform/ScrollableArea.h
index 7b049dc..096c02e 100644
--- a/Source/WebCore/platform/ScrollableArea.h
+++ b/Source/WebCore/platform/ScrollableArea.h
@@ -155,6 +155,9 @@
// Note that this only returns scrollable areas that can actually be scrolled.
virtual ScrollableArea* enclosingScrollableArea() const = 0;
+ // Returns the bounding box of this scrollable area, in the coordinate system of the enclosing scroll view.
+ virtual IntRect scrollableAreaBoundingBox() const { ASSERT_NOT_REACHED(); }
+
bool isPinnedInBothDirections(const IntSize&) const;
bool isPinnedHorizontallyInDirection(int horizontalScrollDelta) const;
bool isPinnedVerticallyInDirection(int verticalScrollDelta) const;