Diff
Modified: trunk/ChangeLog (116831 => 116832)
--- trunk/ChangeLog 2012-05-12 01:19:38 UTC (rev 116831)
+++ trunk/ChangeLog 2012-05-12 02:01:51 UTC (rev 116832)
@@ -1,3 +1,14 @@
+2012-05-11 Jeffrey Pfau <[email protected]>
+
+ REGRESSION (r114170): Scroll areas in nested frames improperly placed when tiled drawing is enabled
+ https://bugs.webkit.org/show_bug.cgi?id=86239
+
+ Reviewed by Anders Carlsson.
+
+ * ManualTests/resources/frame-textarea.html: Added.
+ * ManualTests/scrollable-positioned-frame.html: Added.
+ * ManualTests/scrollable-positioned-nested-frame.html: Added.
+
2012-05-11 Kevin Ollivier <[email protected]>
[wx] Unreviewed build fix, exclude some files we don't use from the build.
Added: trunk/ManualTests/resources/frame-textarea.html (0 => 116832)
--- trunk/ManualTests/resources/frame-textarea.html (rev 0)
+++ trunk/ManualTests/resources/frame-textarea.html 2012-05-12 02:01:51 UTC (rev 116832)
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <textarea>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque nulla est, tincidunt pharetra hendrerit nec, ultrices non mi. Fusce feugiat tempus mollis. Nulla sapien augue, iaculis sit amet ornare vitae, ultricies non ante. Aliquam dignissim porta dolor, ac laoreet lectus faucibus ac. Phasellus luctus eros in erat fermentum rhoncus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec venenatis bibendum quam.
+
+Cras vel tellus tellus, accumsan malesuada erat. Mauris tincidunt fermentum massa sit amet ornare. Sed pellentesque ultrices sapien, non cursus felis vestibulum id. Integer vitae enim nec lacus hendrerit consequat id in purus. Suspendisse porta, enim nec congue auctor, nisi augue vulputate magna, eu sollicitudin elit felis id erat. Curabitur in ante elit, et lobortis nulla. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean gravida odio non nulla porta convallis.
+ </textarea>
+</body>
+</html>
\ No newline at end of file
Added: trunk/ManualTests/scrollable-positioned-frame.html (0 => 116832)
--- trunk/ManualTests/scrollable-positioned-frame.html (rev 0)
+++ trunk/ManualTests/scrollable-positioned-frame.html 2012-05-12 02:01:51 UTC (rev 116832)
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <p>The contents of this frame should scroll with the mouse wheel.</p>
+ <iframe width=200 scrolling=yes src="" style="position:fixed; left: 200px" id="frame"></iframe>
+</body>
+</html>
Added: trunk/ManualTests/scrollable-positioned-nested-frame.html (0 => 116832)
--- trunk/ManualTests/scrollable-positioned-nested-frame.html (rev 0)
+++ trunk/ManualTests/scrollable-positioned-nested-frame.html 2012-05-12 02:01:51 UTC (rev 116832)
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <p>The contents of this frame should scroll with the mouse wheel.</p>
+ <iframe width=400 scrolling=yes src="" style="position:fixed; left: 200px" id="frame"></iframe>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (116831 => 116832)
--- trunk/Source/WebCore/ChangeLog 2012-05-12 01:19:38 UTC (rev 116831)
+++ trunk/Source/WebCore/ChangeLog 2012-05-12 02:01:51 UTC (rev 116832)
@@ -1,3 +1,19 @@
+2012-05-11 Jeffrey Pfau <[email protected]>
+
+ REGRESSION (r114170): Scroll areas in nested frames improperly placed when tiled drawing is enabled
+ https://bugs.webkit.org/show_bug.cgi?id=86239
+
+ Reviewed by Anders Carlsson.
+
+ Fixes a regression introduced in r114170 by recursively adding positions of parent frames to placement of nested frame scroll areas.
+
+ Manual tests: ManualTests/scrollable-positioned-frame.html
+ ManualTests/scrollable-positioned-nested-frame.html
+
+ * page/scrolling/ScrollingCoordinator.cpp:
+ (WebCore::computeNonFastScrollableRegion):
+ (WebCore::ScrollingCoordinator::frameViewLayoutUpdated):
+
2012-05-11 Beth Dakin <[email protected]>
https://bugs.webkit.org/show_bug.cgi?id=86278
Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (116831 => 116832)
--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp 2012-05-12 01:19:38 UTC (rev 116831)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp 2012-05-12 02:01:51 UTC (rev 116832)
@@ -105,34 +105,40 @@
#endif
}
-static Region computeNonFastScrollableRegion(Frame* mainFrame)
+static Region computeNonFastScrollableRegion(Frame* frame, const IntPoint& frameLocation)
{
Region nonFastScrollableRegion;
+ FrameView* frameView = frame->view();
+ if (!frameView)
+ return nonFastScrollableRegion;
- for (Frame* frame = mainFrame; frame; frame = frame->tree()->traverseNext()) {
- FrameView* frameView = frame->view();
- if (!frameView)
- continue;
+ IntPoint offset = frameLocation;
+ offset.moveBy(frameView->frameRect().location());
- if (const FrameView::ScrollableAreaSet* scrollableAreas = frameView->scrollableAreas()) {
- for (FrameView::ScrollableAreaSet::const_iterator it = scrollableAreas->begin(), end = scrollableAreas->end(); it != end; ++it) {
- ScrollableArea* scrollableArea = *it;
- nonFastScrollableRegion.unite(scrollableArea->scrollableAreaBoundingBox());
- }
+ if (const FrameView::ScrollableAreaSet* scrollableAreas = frameView->scrollableAreas()) {
+ for (FrameView::ScrollableAreaSet::const_iterator it = scrollableAreas->begin(), end = scrollableAreas->end(); it != end; ++it) {
+ ScrollableArea* scrollableArea = *it;
+ IntRect box = scrollableArea->scrollableAreaBoundingBox();
+ box.moveBy(offset);
+ nonFastScrollableRegion.unite(box);
}
+ }
- if (const HashSet<RefPtr<Widget> >* children = frameView->children()) {
- for (HashSet<RefPtr<Widget> >::const_iterator it = children->begin(), end = children->end(); it != end; ++it) {
- if (!(*it)->isPluginViewBase())
- continue;
-
- PluginViewBase* pluginViewBase = static_cast<PluginViewBase*>((*it).get());
- if (pluginViewBase->wantsWheelEvents())
- nonFastScrollableRegion.unite(pluginViewBase->frameRect());
- }
+ if (const HashSet<RefPtr<Widget> >* children = frameView->children()) {
+ for (HashSet<RefPtr<Widget> >::const_iterator it = children->begin(), end = children->end(); it != end; ++it) {
+ if (!(*it)->isPluginViewBase())
+ continue;
+
+ PluginViewBase* pluginViewBase = static_cast<PluginViewBase*>((*it).get());
+ if (pluginViewBase->wantsWheelEvents())
+ nonFastScrollableRegion.unite(pluginViewBase->frameRect());
}
}
+ FrameTree* tree = frame->tree();
+ for (Frame* subFrame = tree->firstChild(); subFrame; subFrame = subFrame->tree()->nextSibling())
+ nonFastScrollableRegion.unite(computeNonFastScrollableRegion(subFrame, offset));
+
return nonFastScrollableRegion;
}
@@ -144,7 +150,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(), IntPoint());
setNonFastScrollableRegion(nonFastScrollableRegion);
if (!coordinatesScrollingForFrameView(frameView))