Title: [107424] trunk/Source/WebCore
- Revision
- 107424
- Author
- [email protected]
- Date
- 2012-02-10 12:06:32 -0800 (Fri, 10 Feb 2012)
Log Message
Update the non-fast-scrollable region for subframe layout as well
https://bugs.webkit.org/show_bug.cgi?id=78366
<rdar://problem/10844064>
Reviewed by Beth Dakin.
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::computeNonFastScrollableRegion):
Move the non-fast-scrollable region computation out into a new function.
(WebCore::ScrollingCoordinator::frameViewLayoutUpdated):
Always recompute the non-fast-scrollable region whenever a frame view's layout is updated,
not just the main frame.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (107423 => 107424)
--- trunk/Source/WebCore/ChangeLog 2012-02-10 19:54:42 UTC (rev 107423)
+++ trunk/Source/WebCore/ChangeLog 2012-02-10 20:06:32 UTC (rev 107424)
@@ -1,3 +1,19 @@
+2012-02-10 Anders Carlsson <[email protected]>
+
+ Update the non-fast-scrollable region for subframe layout as well
+ https://bugs.webkit.org/show_bug.cgi?id=78366
+ <rdar://problem/10844064>
+
+ Reviewed by Beth Dakin.
+
+ * page/scrolling/ScrollingCoordinator.cpp:
+ (WebCore::computeNonFastScrollableRegion):
+ Move the non-fast-scrollable region computation out into a new function.
+
+ (WebCore::ScrollingCoordinator::frameViewLayoutUpdated):
+ Always recompute the non-fast-scrollable region whenever a frame view's layout is updated,
+ not just the main frame.
+
2012-02-09 Chris Marrin <[email protected]>
Implement hardware animation of CSS filters
Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (107423 => 107424)
--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp 2012-02-10 19:54:42 UTC (rev 107423)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp 2012-02-10 20:06:32 UTC (rev 107424)
@@ -93,18 +93,11 @@
return true;
}
-void ScrollingCoordinator::frameViewLayoutUpdated(FrameView* frameView)
+static Region computeNonFastScrollableRegion(FrameView* frameView)
{
- ASSERT(isMainThread());
- ASSERT(m_page);
+ Region nonFastScrollableRegion;
- if (!coordinatesScrollingForFrameView(frameView))
- return;
-
- // Compute the region of the page that we can't do fast scrolling for. This currently includes
- // all scrollable areas, such as subframes, overflow divs and list boxes.
- Region nonScrollableRegion;
- if (const FrameView::ScrollableAreaSet* scrollableAreas = frameView->scrollableAreas()) {
+ if (const FrameView::ScrollableAreaSet* scrollableAreas = frameView->scrollableAreas()) {
for (FrameView::ScrollableAreaSet::const_iterator it = scrollableAreas->begin(), end = scrollableAreas->end(); it != end; ++it) {
ScrollableArea* scrollableArea = *it;
@@ -113,10 +106,28 @@
&& (!scrollableArea->verticalScrollbar() || !scrollableArea->verticalScrollbar()->enabled()))
continue;
- nonScrollableRegion.unite(scrollableArea->scrollableAreaBoundingBox());
+ nonFastScrollableRegion.unite(scrollableArea->scrollableAreaBoundingBox());
}
}
+ return nonFastScrollableRegion;
+}
+
+void ScrollingCoordinator::frameViewLayoutUpdated(FrameView* frameView)
+{
+ ASSERT(isMainThread());
+ ASSERT(m_page);
+
+ // Compute the region of the page that we can't do fast scrolling for. This currently includes
+ // all scrollable areas, such as subframes, overflow divs and list boxes. We need to do this even if the
+ // frame view whose layout was updated is not the main frame.
+ Region nonFastScrollableRegion = computeNonFastScrollableRegion(m_page->mainFrame()->view());
+ m_scrollingTreeState->setNonFastScrollableRegion(nonFastScrollableRegion);
+ scheduleTreeStateCommit();
+
+ if (!coordinatesScrollingForFrameView(frameView))
+ return;
+
m_scrollingTreeState->setHorizontalScrollElasticity(frameView->horizontalScrollElasticity());
m_scrollingTreeState->setVerticalScrollElasticity(frameView->verticalScrollElasticity());
m_scrollingTreeState->setHasEnabledHorizontalScrollbar(frameView->horizontalScrollbar() && frameView->horizontalScrollbar()->enabled());
@@ -124,7 +135,6 @@
m_scrollingTreeState->setViewportRect(IntRect(IntPoint(), frameView->visibleContentRect().size()));
m_scrollingTreeState->setContentsSize(frameView->contentsSize());
- m_scrollingTreeState->setNonFastScrollableRegion(nonScrollableRegion);
scheduleTreeStateCommit();
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes