[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

xji at chromium.org xji at chromium.org
Wed Dec 22 18:11:51 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit bebfbc9b8203fb7c13ac83560c6362c978173d1d
Author: xji at chromium.org <xji at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Dec 8 18:14:11 2010 +0000

    2010-12-08  Xiaomei Ji  <xji at chromium.org>
    
            Reviewed by David Hyatt.
    
            Fix backward mouse wheeling not working when scroll position is below 0.
            https://bugs.webkit.org/show_bug.cgi?id=50370
    
            Tests: fast/events/wheelevent-in-horizontal-scrollbar-in-rtl.html
                   fast/events/wheelevent-in-vertical-scrollbar-in-rtl.html
    
            * platform/ScrollView.cpp:
            (WebCore::ScrollView::wheelEvent):
    2010-12-08  Xiaomei Ji  <xji at chromium.org>
    
            Reviewed by David Hyatt.
    
            Fix backward mouse wheeling not working when scroll position is below 0.
            https://bugs.webkit.org/show_bug.cgi?id=50370
    
            * fast/dom/horizontal-scrollbar-in-rtl-expected.txt:
            * fast/dom/horizontal-scrollbar-in-rtl.html:
            * fast/dom/vertical-scrollbar-in-rtl-expected.txt:
            * fast/dom/vertical-scrollbar-in-rtl.html:
            * fast/events/wheelevent-in-horizontal-scrollbar-in-rtl-expected.txt: Added.
            * fast/events/wheelevent-in-horizontal-scrollbar-in-rtl.html: Added.
            * fast/events/wheelevent-in-vertical-scrollbar-in-rtl-expected.txt: Added.
            * fast/events/wheelevent-in-vertical-scrollbar-in-rtl.html: Added.
            * platform/chromium/fast/dom/horizontal-scrollbar-in-rtl-expected.txt:
            * platform/chromium/fast/dom/vertical-scrollbar-in-rtl-expected.txt:
            * platform/chromium/fast/events/wheelevent-in-horizontal-scrollbar-in-rtl-expected.txt: Added.
            * platform/chromium/fast/events/wheelevent-in-vertical-scrollbar-in-rtl-expected.txt: Added.
            * platform/gtk/Skipped:
            * platform/mac-tiger/Skipped:
            * platform/mac-wk2/Skipped:
            * platform/qt-wk2/Skipped:
            * platform/qt/fast/dom/horizontal-scrollbar-in-rtl-expected.txt:
            * platform/qt/fast/dom/vertical-scrollbar-in-rtl-expected.txt:
            * platform/win/Skipped:
            * platform/win/fast/dom/horizontal-scrollbar-in-rtl-expected.txt:
            * platform/win/fast/dom/vertical-scrollbar-in-rtl-expected.txt:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73529 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 70e90a9..f62d098 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,32 @@
+2010-12-08  Xiaomei Ji  <xji at chromium.org>
+
+        Reviewed by David Hyatt.
+
+        Fix backward mouse wheeling not working when scroll position is below 0.
+        https://bugs.webkit.org/show_bug.cgi?id=50370
+
+        * fast/dom/horizontal-scrollbar-in-rtl-expected.txt:
+        * fast/dom/horizontal-scrollbar-in-rtl.html:
+        * fast/dom/vertical-scrollbar-in-rtl-expected.txt:
+        * fast/dom/vertical-scrollbar-in-rtl.html:
+        * fast/events/wheelevent-in-horizontal-scrollbar-in-rtl-expected.txt: Added.
+        * fast/events/wheelevent-in-horizontal-scrollbar-in-rtl.html: Added.
+        * fast/events/wheelevent-in-vertical-scrollbar-in-rtl-expected.txt: Added.
+        * fast/events/wheelevent-in-vertical-scrollbar-in-rtl.html: Added.
+        * platform/chromium/fast/dom/horizontal-scrollbar-in-rtl-expected.txt:
+        * platform/chromium/fast/dom/vertical-scrollbar-in-rtl-expected.txt:
+        * platform/chromium/fast/events/wheelevent-in-horizontal-scrollbar-in-rtl-expected.txt: Added.
+        * platform/chromium/fast/events/wheelevent-in-vertical-scrollbar-in-rtl-expected.txt: Added.
+        * platform/gtk/Skipped:
+        * platform/mac-tiger/Skipped:
+        * platform/mac-wk2/Skipped:
+        * platform/qt-wk2/Skipped:
+        * platform/qt/fast/dom/horizontal-scrollbar-in-rtl-expected.txt:
+        * platform/qt/fast/dom/vertical-scrollbar-in-rtl-expected.txt:
+        * platform/win/Skipped:
+        * platform/win/fast/dom/horizontal-scrollbar-in-rtl-expected.txt:
+        * platform/win/fast/dom/vertical-scrollbar-in-rtl-expected.txt:
+
 2010-12-08  Anton Muhin  <antonm at chromium.org>
 
         Unreviewed, cleaning up test expectations after r7349.
diff --git a/LayoutTests/fast/dom/horizontal-scrollbar-in-rtl-expected.txt b/LayoutTests/fast/dom/horizontal-scrollbar-in-rtl-expected.txt
index 61b3fc6..b025557 100644
--- a/LayoutTests/fast/dom/horizontal-scrollbar-in-rtl-expected.txt
+++ b/LayoutTests/fast/dom/horizontal-scrollbar-in-rtl-expected.txt
@@ -3,7 +3,6 @@ horizontal scroll: : Success
 continuously call window.scrollX : Success
 zoom in and out preserve scroll position: Success
 resize preserves scroll position: Success
-wheel scroll preserves horizontal scroll position: Success
 KeyDown HOME move x-scroll position to right for RTL page: 0
 KeyDown END move x-scroll position to right for RTL page: 0
 selectAll selects all document: Success
diff --git a/LayoutTests/fast/dom/horizontal-scrollbar-in-rtl.html b/LayoutTests/fast/dom/horizontal-scrollbar-in-rtl.html
index 2008ad3..0dcd957 100644
--- a/LayoutTests/fast/dom/horizontal-scrollbar-in-rtl.html
+++ b/LayoutTests/fast/dom/horizontal-scrollbar-in-rtl.html
@@ -29,11 +29,6 @@
             var expectedScrollX = -1000;
             var expectedScrollY = 500;
 
-            function mousewheelHandler(e) 
-            {
-                assertEqual("wheel scroll preserves horizontal scroll position", window.scrollX, expectedScrollX);
-            }
-            
             onload = function()
             {
                 if (window.layoutTestController)
@@ -62,15 +57,6 @@
                 window.scrollTo(expectedScrollX, expectedScrollY);
                 window.resizeTo(2000, window.innerHeight);
                 assertEqual("resize preserves scroll position", window.scrollX, expectedScrollX);
-                
-                // Test wheel scroll preserves horizontal scroll position.
-                window.scrollTo(expectedScrollX, expectedScrollY / 2);
-                var div = document.getElementById("div");
-                div.addEventListener("mousewheel", mousewheelHandler, false);
-                var wheelEvent = document.createEvent("WheelEvent");
-                wheelEvent.initWebKitWheelEvent(0, expectedScrollY / 2, window, 0, 0, 0, 0, false, false, false, false);
-                div.dispatchEvent(wheelEvent);
-            
                 // Test HOME/END operation.
                 if (window.eventSender) {
                     // Not using assert equal here since the behavior is different in each port. 
diff --git a/LayoutTests/fast/dom/vertical-scrollbar-in-rtl-expected.txt b/LayoutTests/fast/dom/vertical-scrollbar-in-rtl-expected.txt
index bf6b029..a315741 100644
--- a/LayoutTests/fast/dom/vertical-scrollbar-in-rtl-expected.txt
+++ b/LayoutTests/fast/dom/vertical-scrollbar-in-rtl-expected.txt
@@ -3,7 +3,6 @@ vertical scroll: : Success
 continuously call window.scrollY : Success
 zoom in and out preserve scroll position: Success
 resize preserves scroll position: Success
-wheel scroll preserves vertical scroll position: Success
 KeyDown HOME move y-scroll position to bottom for RTL page: 0
 KeyDown END move y-scroll position to bottom for RTL page: 0
 selectAll selects all document: Success
diff --git a/LayoutTests/fast/dom/vertical-scrollbar-in-rtl.html b/LayoutTests/fast/dom/vertical-scrollbar-in-rtl.html
index 1d23175..82c8ba1 100644
--- a/LayoutTests/fast/dom/vertical-scrollbar-in-rtl.html
+++ b/LayoutTests/fast/dom/vertical-scrollbar-in-rtl.html
@@ -29,11 +29,6 @@
             var expectedScrollX = 500;
             var expectedScrollY = -1000;
 
-            function mousewheelHandler(e) 
-            {
-                assertEqual("wheel scroll preserves vertical scroll position", window.scrollY, expectedScrollY);
-            }
-            
             onload = function()
             {
                 if (window.layoutTestController)
@@ -63,14 +58,6 @@
                 window.resizeTo(window.innerWidth, 2000);
                 assertEqual("resize preserves scroll position", window.scrollY, expectedScrollY);
                 
-                // Test wheel scroll preserves horizontal scroll position.
-                window.scrollTo(expectedScrollX / 2, expectedScrollY);
-                var div = document.getElementById("div");
-                div.addEventListener("mousewheel", mousewheelHandler, false);
-                var wheelEvent = document.createEvent("WheelEvent");
-                wheelEvent.initWebKitWheelEvent(expectedScrollX / 2, 0, window, 0, 0, 0, 0, false, false, false, false);
-                div.dispatchEvent(wheelEvent);
-            
                 // Test HOME/END operation.
                 if (window.eventSender) {
                     // Not using assert equal here since the behavior is different in each port. 
diff --git a/LayoutTests/fast/events/wheelevent-in-horizontal-scrollbar-in-rtl-expected.txt b/LayoutTests/fast/events/wheelevent-in-horizontal-scrollbar-in-rtl-expected.txt
new file mode 100644
index 0000000..91e1005
--- /dev/null
+++ b/LayoutTests/fast/events/wheelevent-in-horizontal-scrollbar-in-rtl-expected.txt
@@ -0,0 +1,3 @@
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+window.scrollX: -116
+window.scrollY: 92
diff --git a/LayoutTests/fast/events/wheelevent-in-horizontal-scrollbar-in-rtl.html b/LayoutTests/fast/events/wheelevent-in-horizontal-scrollbar-in-rtl.html
new file mode 100644
index 0000000..6430f72
--- /dev/null
+++ b/LayoutTests/fast/events/wheelevent-in-horizontal-scrollbar-in-rtl.html
@@ -0,0 +1,56 @@
+<html dir=rtl>
+    <head>
+        <link rel="stylesheet" href="../js/resources/js-test-style.css">
+        <script src="../js/resources/js-test-pre.js"></script>
+        <script>
+
+            function log(str)
+            {
+                var li = document.createElement("li");
+                li.appendChild(document.createTextNode(str));
+                var console = document.getElementById("console");
+                console.appendChild(li);
+            }
+            
+
+            if (window.layoutTestController) {
+                layoutTestController.waitUntilDone();
+            }
+
+            function dispatchWheelEvent()
+            {
+               window.addEventListener("mousewheel", mousewheelHandler, false);
+
+               window.scrollTo(-100, 100);
+               if (window.eventSender) {
+                    eventSender.mouseMoveTo(100, 100);
+                    eventSender.continuousMouseScrollBy(-10, 0);
+                    eventSender.continuousMouseScrollBy(30, 0);
+                    eventSender.continuousMouseScrollBy(0, -10);
+                    eventSender.continuousMouseScrollBy(0, 30);
+                }
+
+                setTimeout('checkOffsets();', 100);
+            }
+
+            function checkOffsets()
+            {
+                log("window.scrollX: " + window.scrollX);
+                log("window.scrollY: " + window.scrollY);
+
+                if (window.layoutTestController)
+                    window.layoutTestController.notifyDone();
+            }
+
+            function mousewheelHandler(e)
+            {
+            }
+        </script>
+    </head>
+
+    <body style="margin:0" onload="setTimeout('dispatchWheelEvent();', 100)">
+
+        <div id="div" style="whitespace:nowrap; width: 4000px; height: 1000px; border: 1px solid red;">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."</div>
+        <div id="console"></div>
+    </body>
+</html>
diff --git a/LayoutTests/fast/events/wheelevent-in-vertical-scrollbar-in-rtl-expected.txt b/LayoutTests/fast/events/wheelevent-in-vertical-scrollbar-in-rtl-expected.txt
new file mode 100644
index 0000000..4058c5f
--- /dev/null
+++ b/LayoutTests/fast/events/wheelevent-in-vertical-scrollbar-in-rtl-expected.txt
@@ -0,0 +1,3 @@
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+window.scrollX: 84
+window.scrollY: -108
diff --git a/LayoutTests/fast/events/wheelevent-in-vertical-scrollbar-in-rtl.html b/LayoutTests/fast/events/wheelevent-in-vertical-scrollbar-in-rtl.html
new file mode 100644
index 0000000..3d2ea32
--- /dev/null
+++ b/LayoutTests/fast/events/wheelevent-in-vertical-scrollbar-in-rtl.html
@@ -0,0 +1,55 @@
+<html dir=rtl style="-webkit-writing-mode:vertical-lr">
+    <head>
+        <link rel="stylesheet" href="../js/resources/js-test-style.css">
+        <script src="../js/resources/js-test-pre.js"></script>
+        <script>
+
+            function log(str)
+            {
+                var li = document.createElement("li");
+                li.appendChild(document.createTextNode(str));
+                var console = document.getElementById("console");
+                console.appendChild(li);
+            }
+            
+            if (window.layoutTestController) {
+                layoutTestController.waitUntilDone();
+            }
+
+            function dispatchWheelEvent()
+            {
+                window.addEventListener("mousewheel", mousewheelHandler, false);
+
+               window.scrollTo(100, -100);
+               if (window.eventSender) {
+                    eventSender.mouseMoveTo(100, 100);
+                    eventSender.continuousMouseScrollBy(-10, 0);
+                    eventSender.continuousMouseScrollBy(30, 0);
+                    eventSender.continuousMouseScrollBy(0, -10);
+                    eventSender.continuousMouseScrollBy(0, 30);
+                }
+
+                setTimeout('checkOffsets();', 100);
+            }
+
+            function checkOffsets()
+            {
+                log("window.scrollX: " + window.scrollX);
+                log("window.scrollY: " + window.scrollY);
+
+                if (window.layoutTestController)
+                    window.layoutTestController.notifyDone();
+            }
+
+            function mousewheelHandler(e)
+            {
+            }
+        </script>
+    </head>
+
+    <body style="margin:0" onload="setTimeout('dispatchWheelEvent();', 100)">
+
+        <div id="div" style="whitespace:nowrap; width: 4000px; height: 1000px; border: 1px solid red;">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."</div>
+        <div id="console"></div>
+    </body>
+</html>
diff --git a/LayoutTests/platform/chromium/fast/dom/horizontal-scrollbar-in-rtl-expected.txt b/LayoutTests/platform/chromium/fast/dom/horizontal-scrollbar-in-rtl-expected.txt
index 699fda8..c456d5d 100644
--- a/LayoutTests/platform/chromium/fast/dom/horizontal-scrollbar-in-rtl-expected.txt
+++ b/LayoutTests/platform/chromium/fast/dom/horizontal-scrollbar-in-rtl-expected.txt
@@ -3,7 +3,6 @@ horizontal scroll: : Success
 continuously call window.scrollX : Success
 zoom in and out preserve scroll position: Success
 resize preserves scroll position: Success
-wheel scroll preserves horizontal scroll position: Success
 KeyDown HOME move x-scroll position to right for RTL page: -1000
 KeyDown END move x-scroll position to right for RTL page: -1000
 selectAll selects all document: Success
diff --git a/LayoutTests/platform/chromium/fast/dom/vertical-scrollbar-in-rtl-expected.txt b/LayoutTests/platform/chromium/fast/dom/vertical-scrollbar-in-rtl-expected.txt
index f7521c3..355030d 100644
--- a/LayoutTests/platform/chromium/fast/dom/vertical-scrollbar-in-rtl-expected.txt
+++ b/LayoutTests/platform/chromium/fast/dom/vertical-scrollbar-in-rtl-expected.txt
@@ -3,7 +3,6 @@ vertical scroll: : Success
 continuously call window.scrollY : Success
 zoom in and out preserve scroll position: Success
 resize preserves scroll position: Success
-wheel scroll preserves vertical scroll position: Success
 KeyDown HOME move y-scroll position to bottom for RTL page: -2967
 KeyDown END move y-scroll position to bottom for RTL page: 0
 selectAll selects all document: Success
diff --git a/LayoutTests/platform/chromium/fast/events/wheelevent-in-horizontal-scrollbar-in-rtl-expected.txt b/LayoutTests/platform/chromium/fast/events/wheelevent-in-horizontal-scrollbar-in-rtl-expected.txt
new file mode 100644
index 0000000..41554e8
--- /dev/null
+++ b/LayoutTests/platform/chromium/fast/events/wheelevent-in-horizontal-scrollbar-in-rtl-expected.txt
@@ -0,0 +1,3 @@
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+window.scrollX: -120
+window.scrollY: 80
diff --git a/LayoutTests/platform/chromium/fast/events/wheelevent-in-vertical-scrollbar-in-rtl-expected.txt b/LayoutTests/platform/chromium/fast/events/wheelevent-in-vertical-scrollbar-in-rtl-expected.txt
new file mode 100644
index 0000000..f76a921
--- /dev/null
+++ b/LayoutTests/platform/chromium/fast/events/wheelevent-in-vertical-scrollbar-in-rtl-expected.txt
@@ -0,0 +1,3 @@
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+window.scrollX: 80
+window.scrollY: -120
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index a12b5f3..1410ea0 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -4874,6 +4874,8 @@ fast/forms/multiple-form-submission-protection-mouse.html
 fast/events/remove-child-onscroll.html
 fast/events/platform-wheelevent-in-scrolling-div.html
 fast/events/continuous-platform-wheelevent-in-scrolling-div.html
+fast/events/wheelevent-in-horizontal-scrollbar-in-rtl.html
+fast/events/wheelevent-in-vertical-scrollbar-in-rtl.html
 
 # meter element is not supported
 # http://bugs.webkit.org/show_bug.cgi?id=48713
diff --git a/LayoutTests/platform/mac-tiger/Skipped b/LayoutTests/platform/mac-tiger/Skipped
index a41f415..a2bad9f 100644
--- a/LayoutTests/platform/mac-tiger/Skipped
+++ b/LayoutTests/platform/mac-tiger/Skipped
@@ -129,6 +129,8 @@ java/lc3/JavaArray/ToString-001.html
 fast/events/remove-child-onscroll.html
 fast/events/platform-wheelevent-in-scrolling-div.html
 fast/events/continuous-platform-wheelevent-in-scrolling-div.html
+fast/events/wheelevent-in-horizontal-scrollbar-in-rtl.html
+fast/events/wheelevent-in-vertical-scrollbar-in-rtl.html
 
 # Intermittently times out on Tiger bot.
 # https://bugs.webkit.org/show_bug.cgi?id=36039
diff --git a/LayoutTests/platform/mac-wk2/Skipped b/LayoutTests/platform/mac-wk2/Skipped
index 5a1c33e..6da0eb4 100644
--- a/LayoutTests/platform/mac-wk2/Skipped
+++ b/LayoutTests/platform/mac-wk2/Skipped
@@ -321,6 +321,8 @@ fast/events/tab-imagemap.html
 fast/events/tab-is-focusable-assert.html
 fast/events/tabindex-focus-chain.html
 fast/events/updateLayoutForHitTest.html
+fast/events/wheelevent-in-horizontal-scrollbar-in-rtl.html
+fast/events/wheelevent-in-vertical-scrollbar-in-rtl.html
 fast/events/window-events-bubble.html
 fast/events/window-events-bubble2.html
 fast/events/window-events-capture.html
diff --git a/LayoutTests/platform/qt-wk2/Skipped b/LayoutTests/platform/qt-wk2/Skipped
index 45c0d01..204b132 100644
--- a/LayoutTests/platform/qt-wk2/Skipped
+++ b/LayoutTests/platform/qt-wk2/Skipped
@@ -370,6 +370,8 @@ fast/events/tab-imagemap.html
 fast/events/tab-is-focusable-assert.html
 fast/events/tabindex-focus-chain.html
 fast/events/updateLayoutForHitTest.html
+fast/events/wheelevent-in-horizontal-scrollbar-in-rtl.html
+fast/events/wheelevent-in-vertical-scrollbar-in-rtl.html
 fast/events/window-events-bubble.html
 fast/events/window-events-bubble2.html
 fast/events/window-events-capture.html
diff --git a/LayoutTests/platform/qt/fast/dom/horizontal-scrollbar-in-rtl-expected.txt b/LayoutTests/platform/qt/fast/dom/horizontal-scrollbar-in-rtl-expected.txt
index 699fda8..c456d5d 100644
--- a/LayoutTests/platform/qt/fast/dom/horizontal-scrollbar-in-rtl-expected.txt
+++ b/LayoutTests/platform/qt/fast/dom/horizontal-scrollbar-in-rtl-expected.txt
@@ -3,7 +3,6 @@ horizontal scroll: : Success
 continuously call window.scrollX : Success
 zoom in and out preserve scroll position: Success
 resize preserves scroll position: Success
-wheel scroll preserves horizontal scroll position: Success
 KeyDown HOME move x-scroll position to right for RTL page: -1000
 KeyDown END move x-scroll position to right for RTL page: -1000
 selectAll selects all document: Success
diff --git a/LayoutTests/platform/qt/fast/dom/vertical-scrollbar-in-rtl-expected.txt b/LayoutTests/platform/qt/fast/dom/vertical-scrollbar-in-rtl-expected.txt
index 4adc184..7139539 100644
--- a/LayoutTests/platform/qt/fast/dom/vertical-scrollbar-in-rtl-expected.txt
+++ b/LayoutTests/platform/qt/fast/dom/vertical-scrollbar-in-rtl-expected.txt
@@ -3,7 +3,6 @@ vertical scroll: : Success
 continuously call window.scrollY : Success
 zoom in and out preserve scroll position: Success
 resize preserves scroll position: Success
-wheel scroll preserves vertical scroll position: Success
 KeyDown HOME move y-scroll position to bottom for RTL page: -3426
 KeyDown END move y-scroll position to bottom for RTL page: 0
 selectAll selects all document: Success
diff --git a/LayoutTests/platform/win/Skipped b/LayoutTests/platform/win/Skipped
index 312401e..3d14f6a 100644
--- a/LayoutTests/platform/win/Skipped
+++ b/LayoutTests/platform/win/Skipped
@@ -879,6 +879,8 @@ fast/forms/multiple-form-submission-protection-mouse.html
 fast/events/remove-child-onscroll.html
 fast/events/platform-wheelevent-in-scrolling-div.html
 fast/events/continuous-platform-wheelevent-in-scrolling-div.html
+fast/events/wheelevent-in-horizontal-scrollbar-in-rtl.html
+fast/events/wheelevent-in-vertical-scrollbar-in-rtl.html
 scrollbars/scrollevent-iframe-no-scrolling-wheel.html
 
 # Windows port doesn't yet support rendering of non-BMP characters even though there's a font available.
diff --git a/LayoutTests/platform/win/fast/dom/horizontal-scrollbar-in-rtl-expected.txt b/LayoutTests/platform/win/fast/dom/horizontal-scrollbar-in-rtl-expected.txt
index 699fda8..c456d5d 100644
--- a/LayoutTests/platform/win/fast/dom/horizontal-scrollbar-in-rtl-expected.txt
+++ b/LayoutTests/platform/win/fast/dom/horizontal-scrollbar-in-rtl-expected.txt
@@ -3,7 +3,6 @@ horizontal scroll: : Success
 continuously call window.scrollX : Success
 zoom in and out preserve scroll position: Success
 resize preserves scroll position: Success
-wheel scroll preserves horizontal scroll position: Success
 KeyDown HOME move x-scroll position to right for RTL page: -1000
 KeyDown END move x-scroll position to right for RTL page: -1000
 selectAll selects all document: Success
diff --git a/LayoutTests/platform/win/fast/dom/vertical-scrollbar-in-rtl-expected.txt b/LayoutTests/platform/win/fast/dom/vertical-scrollbar-in-rtl-expected.txt
index 0725b04..917a494 100644
--- a/LayoutTests/platform/win/fast/dom/vertical-scrollbar-in-rtl-expected.txt
+++ b/LayoutTests/platform/win/fast/dom/vertical-scrollbar-in-rtl-expected.txt
@@ -3,7 +3,6 @@ vertical scroll: : Success
 continuously call window.scrollY : Success
 zoom in and out preserve scroll position: Success
 resize preserves scroll position: Success
-wheel scroll preserves vertical scroll position: Success
 KeyDown HOME move y-scroll position to bottom for RTL page: -3425
 KeyDown END move y-scroll position to bottom for RTL page: 0
 selectAll selects all document: Success
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 6a89cc5..41a3a74 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-12-08  Xiaomei Ji  <xji at chromium.org>
+
+        Reviewed by David Hyatt.
+
+        Fix backward mouse wheeling not working when scroll position is below 0.
+        https://bugs.webkit.org/show_bug.cgi?id=50370
+
+        Tests: fast/events/wheelevent-in-horizontal-scrollbar-in-rtl.html
+               fast/events/wheelevent-in-vertical-scrollbar-in-rtl.html
+
+        * platform/ScrollView.cpp:
+        (WebCore::ScrollView::wheelEvent):
+
 2010-12-08  Simon Fraser  <simon.fraser at apple.com>
 
         Reviewed by Dan Bernstein.
diff --git a/WebCore/platform/ScrollView.cpp b/WebCore/platform/ScrollView.cpp
index ab9ee8a..b02562b 100644
--- a/WebCore/platform/ScrollView.cpp
+++ b/WebCore/platform/ScrollView.cpp
@@ -733,11 +733,12 @@ void ScrollView::wheelEvent(PlatformWheelEvent& e)
     // scroll any further.
     float deltaX = m_horizontalScrollbar ? e.deltaX() : 0;
     float deltaY = m_verticalScrollbar ? e.deltaY() : 0;
-    IntSize maxScrollDelta = maximumScrollPosition() - scrollPosition();
-    if ((deltaX < 0 && maxScrollDelta.width() > 0)
-        || (deltaX > 0 && scrollOffset().width() > 0)
-        || (deltaY < 0 && maxScrollDelta.height() > 0)
-        || (deltaY > 0 && scrollOffset().height() > 0)) {
+    IntSize maxForwardScrollDelta = maximumScrollPosition() - scrollPosition();
+    IntSize maxBackwardScrollDelta = scrollPosition() - minimumScrollPosition();
+    if ((deltaX < 0 && maxForwardScrollDelta.width() > 0)
+        || (deltaX > 0 && maxBackwardScrollDelta.width() >0)
+        || (deltaY < 0 && maxForwardScrollDelta.height() > 0)
+        || (deltaY > 0 && maxBackwardScrollDelta.width() > 0)) {
         e.accept();
         if (e.granularity() == ScrollByPageWheelEvent) {
             ASSERT(!e.deltaX());

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list