Title: [114792] trunk/Source/WebCore
- Revision
- 114792
- Author
- [email protected]
- Date
- 2012-04-20 15:38:49 -0700 (Fri, 20 Apr 2012)
Log Message
Re-land. The non-fast scrollable region is now always updated after layout, and frameViewScrollableAreasDidChange has been removed.
computeNonFastScrollableRegion needs to traverse the entire frame tree
https://bugs.webkit.org/show_bug.cgi?id=84409
<rdar://problem/11285741>
Reviewed by Dan Bernstein.
Now that scrollable areas won't be in the set of scrollable areas unless they are actually scrollable, we need to look for scrollable
areas in the entire frame tree since there can be a scrollable frame that's a subframe of a non-scrollable frame for example.
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::computeNonFastScrollableRegion):
(WebCore::ScrollingCoordinator::frameViewLayoutUpdated):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (114791 => 114792)
--- trunk/Source/WebCore/ChangeLog 2012-04-20 22:35:40 UTC (rev 114791)
+++ trunk/Source/WebCore/ChangeLog 2012-04-20 22:38:49 UTC (rev 114792)
@@ -1,3 +1,20 @@
+2012-04-20 Anders Carlsson <[email protected]>
+
+ Re-land. The non-fast scrollable region is now always updated after layout, and frameViewScrollableAreasDidChange has been removed.
+
+ computeNonFastScrollableRegion needs to traverse the entire frame tree
+ https://bugs.webkit.org/show_bug.cgi?id=84409
+ <rdar://problem/11285741>
+
+ Reviewed by Dan Bernstein.
+
+ Now that scrollable areas won't be in the set of scrollable areas unless they are actually scrollable, we need to look for scrollable
+ areas in the entire frame tree since there can be a scrollable frame that's a subframe of a non-scrollable frame for example.
+
+ * page/scrolling/ScrollingCoordinator.cpp:
+ (WebCore::computeNonFastScrollableRegion):
+ (WebCore::ScrollingCoordinator::frameViewLayoutUpdated):
+
2012-04-20 Adrienne Walker <[email protected]>
[chromium] Clip TransparencyWin to prevent OOM from large Skia canvas
Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (114791 => 114792)
--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp 2012-04-20 22:35:40 UTC (rev 114791)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp 2012-04-20 22:38:49 UTC (rev 114792)
@@ -105,27 +105,21 @@
#endif
}
-static Region computeNonFastScrollableRegion(FrameView* frameView)
+static Region computeNonFastScrollableRegion(Frame* mainFrame)
{
Region nonFastScrollableRegion;
- HashSet<FrameView*> childFrameViews;
- for (HashSet<RefPtr<Widget> >::const_iterator it = frameView->children()->begin(), end = frameView->children()->end(); it != end; ++it) {
- if ((*it)->isFrameView())
- childFrameViews.add(static_cast<FrameView*>(it->get()));
- }
+ for (Frame* frame = mainFrame; frame; frame = frame->tree()->traverseNext()) {
+ FrameView* frameView = frame->view();
+ if (!frameView)
+ continue;
- if (const FrameView::ScrollableAreaSet* scrollableAreas = frameView->scrollableAreas()) {
+ const FrameView::ScrollableAreaSet* scrollableAreas = frameView->scrollableAreas();
+ if (!scrollableAreas)
+ continue;
+
for (FrameView::ScrollableAreaSet::const_iterator it = scrollableAreas->begin(), end = scrollableAreas->end(); it != end; ++it) {
ScrollableArea* scrollableArea = *it;
-
- // Check if this area can be scrolled at all.
- // If this scrollable area is a frame view that itself has scrollable areas, then we need to add it to the region.
- if ((!scrollableArea->horizontalScrollbar() || !scrollableArea->horizontalScrollbar()->enabled())
- && (!scrollableArea->verticalScrollbar() || !scrollableArea->verticalScrollbar()->enabled())
- && (!childFrameViews.contains(static_cast<FrameView*>(scrollableArea)) || !static_cast<FrameView*>(scrollableArea)->scrollableAreas()))
- continue;
-
nonFastScrollableRegion.unite(scrollableArea->scrollableAreaBoundingBox());
}
}
@@ -141,7 +135,7 @@
// 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());
+ Region nonFastScrollableRegion = computeNonFastScrollableRegion(m_page->mainFrame());
setNonFastScrollableRegion(nonFastScrollableRegion);
if (!coordinatesScrollingForFrameView(frameView))
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes