Title: [117146] branches/safari-536-branch

Diff

Modified: branches/safari-536-branch/ChangeLog (117145 => 117146)


--- branches/safari-536-branch/ChangeLog	2012-05-15 20:47:51 UTC (rev 117145)
+++ branches/safari-536-branch/ChangeLog	2012-05-15 20:49:36 UTC (rev 117146)
@@ -1,3 +1,18 @@
+2012-05-15  Lucas Forschler  <[email protected]>
+
+    Merge 116832
+
+    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-04  Jer Noble  <[email protected]>
 
         Flash of white when exiting full screen HTML5 video

Copied: branches/safari-536-branch/ManualTests/resources/frame-textarea.html (from rev 116832, trunk/ManualTests/resources/frame-textarea.html) (0 => 117146)


--- branches/safari-536-branch/ManualTests/resources/frame-textarea.html	                        (rev 0)
+++ branches/safari-536-branch/ManualTests/resources/frame-textarea.html	2012-05-15 20:49:36 UTC (rev 117146)
@@ -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

Copied: branches/safari-536-branch/ManualTests/scrollable-positioned-frame.html (from rev 116832, trunk/ManualTests/scrollable-positioned-frame.html) (0 => 117146)


--- branches/safari-536-branch/ManualTests/scrollable-positioned-frame.html	                        (rev 0)
+++ branches/safari-536-branch/ManualTests/scrollable-positioned-frame.html	2012-05-15 20:49:36 UTC (rev 117146)
@@ -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>

Copied: branches/safari-536-branch/ManualTests/scrollable-positioned-nested-frame.html (from rev 116832, trunk/ManualTests/scrollable-positioned-nested-frame.html) (0 => 117146)


--- branches/safari-536-branch/ManualTests/scrollable-positioned-nested-frame.html	                        (rev 0)
+++ branches/safari-536-branch/ManualTests/scrollable-positioned-nested-frame.html	2012-05-15 20:49:36 UTC (rev 117146)
@@ -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: branches/safari-536-branch/Source/WebCore/ChangeLog (117145 => 117146)


--- branches/safari-536-branch/Source/WebCore/ChangeLog	2012-05-15 20:47:51 UTC (rev 117145)
+++ branches/safari-536-branch/Source/WebCore/ChangeLog	2012-05-15 20:49:36 UTC (rev 117146)
@@ -1,5 +1,25 @@
 2012-05-15  Lucas Forschler  <[email protected]>
 
+    Merge 116832
+
+    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-15  Lucas Forschler  <[email protected]>
+
     Merge 116720
 
     2012-05-10  Anders Carlsson  <[email protected]>

Modified: branches/safari-536-branch/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (117145 => 117146)


--- branches/safari-536-branch/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp	2012-05-15 20:47:51 UTC (rev 117145)
+++ branches/safari-536-branch/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp	2012-05-15 20:49:36 UTC (rev 117146)
@@ -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))
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to