Title: [114713] trunk/Source/WebCore
- Revision
- 114713
- Author
- dim...@chromium.org
- Date
- 2012-04-19 19:32:34 -0700 (Thu, 19 Apr 2012)
Log Message
Unreviewed, rolling out r114711.
http://trac.webkit.org/changeset/114711
https://bugs.webkit.org/show_bug.cgi?id=84412
Many tests crash in RenderObject::container() (Requested by
dimich on #webkit).
Patch by Sheriff Bot <webkit.review....@gmail.com> on 2012-04-19
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::computeNonFastScrollableRegion):
(WebCore::ScrollingCoordinator::frameViewLayoutUpdated):
(WebCore::ScrollingCoordinator::frameViewScrollableAreasDidChange):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (114712 => 114713)
--- trunk/Source/WebCore/ChangeLog 2012-04-20 02:07:51 UTC (rev 114712)
+++ trunk/Source/WebCore/ChangeLog 2012-04-20 02:32:34 UTC (rev 114713)
@@ -1,3 +1,17 @@
+2012-04-19 Sheriff Bot <webkit.review....@gmail.com>
+
+ Unreviewed, rolling out r114711.
+ http://trac.webkit.org/changeset/114711
+ https://bugs.webkit.org/show_bug.cgi?id=84412
+
+ Many tests crash in RenderObject::container() (Requested by
+ dimich on #webkit).
+
+ * page/scrolling/ScrollingCoordinator.cpp:
+ (WebCore::computeNonFastScrollableRegion):
+ (WebCore::ScrollingCoordinator::frameViewLayoutUpdated):
+ (WebCore::ScrollingCoordinator::frameViewScrollableAreasDidChange):
+
2012-04-19 Anders Carlsson <ander...@apple.com>
computeNonFastScrollableRegion needs to traverse the entire frame tree
Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (114712 => 114713)
--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp 2012-04-20 02:07:51 UTC (rev 114712)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp 2012-04-20 02:32:34 UTC (rev 114713)
@@ -105,21 +105,27 @@
#endif
}
-static Region computeNonFastScrollableRegion(Frame* mainFrame)
+static Region computeNonFastScrollableRegion(FrameView* frameView)
{
Region nonFastScrollableRegion;
- for (Frame* frame = mainFrame; frame; frame = frame->tree()->traverseNext()) {
- FrameView* frameView = frame->view();
- if (!frameView)
- continue;
-
- const FrameView::ScrollableAreaSet* scrollableAreas = frameView->scrollableAreas();
- if (!scrollableAreas)
- continue;
-
+ 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()));
+ }
+
+ if (const FrameView::ScrollableAreaSet* scrollableAreas = frameView->scrollableAreas()) {
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());
}
}
@@ -135,7 +141,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());
+ Region nonFastScrollableRegion = computeNonFastScrollableRegion(m_page->mainFrame()->view());
setNonFastScrollableRegion(nonFastScrollableRegion);
if (!coordinatesScrollingForFrameView(frameView))
@@ -155,7 +161,7 @@
ASSERT(isMainThread());
ASSERT(m_page);
- Region nonFastScrollableRegion = computeNonFastScrollableRegion(m_page->mainFrame());
+ Region nonFastScrollableRegion = computeNonFastScrollableRegion(m_page->mainFrame()->view());
setNonFastScrollableRegion(nonFastScrollableRegion);
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes