[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

bweinstein at apple.com bweinstein at apple.com
Thu Apr 8 00:33:04 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit de40fd391afb5e5c805ac61e1e51f898e784e605
Author: bweinstein at apple.com <bweinstein at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 11 19:59:11 2009 +0000

    Fixes <http://webkit.org/b/32399>.
    Pan Scrolling Jumps out of frames if the initial location is in a frame that can't be scrolled.
    
    Reviewed by Darin Adler.
    
    WebCore:
    
    When we initially figure out the layer that we should begin scrolling, don't try to jump out
    of frames/iFrames to look at the owner document. We don't want to jump out of frames, so we
    don't need that logic anymore.
    
    Added a test to make sure that we don't pan scroll if we start to scroll in an empty
    iFrame that has a scrollable owner document.
    
    Test: platform/win/fast/events/panScroll-no-iframe-jump.html
    
    * dom/Node.cpp:
    (WebCore::Node::defaultEventHandler):
    
    LayoutTests:
    
    Added a test to make sure that we don't pan scroll if we start to scroll in an empty
    iFrame that has a scrollable owner document.
    
    * platform/win/fast/events/panScroll-no-iframe-jump-expected.txt: Added.
    * platform/win/fast/events/panScroll-no-iframe-jump.html: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52012 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 7e2293f..444659d 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2009-12-11  Brian Weinstein  <bweinstein at apple.com>
+
+        Reviewed by Darin Adler.
+
+        Fixes <http://webkit.org/b/32399>.
+        Pan Scrolling Jumps out of frames if the initial location is in a frame that can't be scrolled.
+        
+        Added a test to make sure that we don't pan scroll if we start to scroll in an empty
+        iFrame that has a scrollable owner document.
+
+        * platform/win/fast/events/panScroll-no-iframe-jump-expected.txt: Added.
+        * platform/win/fast/events/panScroll-no-iframe-jump.html: Added.
+
 2009-12-11  Gustavo Noronha Silva  <gustavo.noronha at collabora.co.uk>
 
         Skip test that is failing because script is not executed after the
diff --git a/LayoutTests/platform/win/fast/events/panScroll-no-iframe-jump-expected.txt b/LayoutTests/platform/win/fast/events/panScroll-no-iframe-jump-expected.txt
new file mode 100644
index 0000000..500eb0f
--- /dev/null
+++ b/LayoutTests/platform/win/fast/events/panScroll-no-iframe-jump-expected.txt
@@ -0,0 +1,4 @@
+
+Test for bug 32399 This tests that pan scrolling doesn't jump out of an iFrame if the action begins in an iFrame that cannot scroll.
+
+Success! Div with overflow was not scrolled
diff --git a/LayoutTests/platform/win/fast/events/panScroll-no-iframe-jump.html b/LayoutTests/platform/win/fast/events/panScroll-no-iframe-jump.html
new file mode 100644
index 0000000..5a37fd0
--- /dev/null
+++ b/LayoutTests/platform/win/fast/events/panScroll-no-iframe-jump.html
@@ -0,0 +1,40 @@
+<html>
+    <head>
+        <title>Pan Scrolling Test</title>
+    </head>
+    <body>
+        <script>
+            if (window.layoutTestController) {
+                layoutTestController.dumpAsText();
+                layoutTestController.waitUntilDone();
+            }
+        </script>
+        <div id="overflow" style="width:500px; height:150px; overflow:auto; border:2px solid red; padding:10px">
+            <iframe width="100px" height="100px"></iframe>
+            <h1>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=32399">bug 32399</a> This tests that pan
+            scrolling doesn't jump out of an iFrame if the action begins in an iFrame that cannot scroll.</h1>
+        </div>
+        <p>
+        <div id="console"></div>
+        <script>
+            if (window.eventSender)
+            {
+                eventSender.mouseMoveTo(50, 50);
+                eventSender.mouseDown(1);
+                eventSender.mouseUp(1);
+                eventSender.mouseMoveTo(50, 200);
+                setTimeout(finished, 500);
+            }
+            
+            function finished()
+            {
+                if (!document.getElementById('overflow').scrollTop)
+                    document.getElementById('console').innerHTML = "Success! Div with overflow was not scrolled";
+                else
+                    document.getElementById('console').innerHTML = "Fail! Div with overflow was scrolled";
+                
+                window.layoutTestController.notifyDone();
+            }
+        </script>
+    </body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 4b41d1e..790a541 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,5 +1,24 @@
 2009-12-11  Brian Weinstein  <bweinstein at apple.com>
 
+        Reviewed by Darin Adler.
+
+        Fixes <http://webkit.org/b/32399>.
+        Pan Scrolling Jumps out of frames if the initial location is in a frame that can't be scrolled.
+        
+        When we initially figure out the layer that we should begin scrolling, don't try to jump out
+        of frames/iFrames to look at the owner document. We don't want to jump out of frames, so we
+        don't need that logic anymore.
+        
+        Added a test to make sure that we don't pan scroll if we start to scroll in an empty
+        iFrame that has a scrollable owner document.
+
+        Test: platform/win/fast/events/panScroll-no-iframe-jump.html
+
+        * dom/Node.cpp:
+        (WebCore::Node::defaultEventHandler):
+
+2009-12-11  Brian Weinstein  <bweinstein at apple.com>
+
         Reviewed by Adam Roben.
 
         Fixes <http://webkit.org/b/32303>.
diff --git a/WebCore/dom/Node.cpp b/WebCore/dom/Node.cpp
index f819b65..3406915 100644
--- a/WebCore/dom/Node.cpp
+++ b/WebCore/dom/Node.cpp
@@ -2833,17 +2833,11 @@ void Node::defaultEventHandler(Event* event)
         if (mouseEvent->button() == MiddleButton && !this->isLink()) {
             RenderObject* renderer = this->renderer();
 
-            while (renderer && (!renderer->isBox() || !toRenderBox(renderer)->canBeScrolledAndHasScrollableArea())) {
-                // FIXME: If we start in a frame that can't scroll, we don't want to jump out of it to start scrolling:
-                // <https://bugs.webkit.org/show_bug.cgi?id=32399>.
-                if (!renderer->parent() && renderer->node() == renderer->document() && renderer->document()->ownerElement())
-                    renderer = renderer->document()->ownerElement()->renderer();
-                else
-                    renderer = renderer->parent();
-            }
+            while (renderer && (!renderer->isBox() || !toRenderBox(renderer)->canBeScrolledAndHasScrollableArea()))
+                renderer = renderer->parent();
 
             if (renderer) {
-                if (Frame* frame = renderer->document()->frame())
+                if (Frame* frame = document()->frame())
                     frame->eventHandler()->startPanScrolling(renderer);
             }
         }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list