WebCore: For continuous scrolling devices on the Mac (trackpads and Mighty/Magic
authorenrica@apple.com <enrica@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Mar 2010 20:31:04 +0000 (20:31 +0000)
committerenrica@apple.com <enrica@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Mar 2010 20:31:04 +0000 (20:31 +0000)
Mice), set the number of wheel ticks equal to the atomic increment of
the device: a pixel.  This ensures that any scrolling action will
generate at least one wheel tick, regardless of the speed/length of
the gesture.

Reviewed by John Sullivan.

https://bugs.webkit.org/show_bug.cgi?id=29601
<rdar://problem/7453254>

Tests: fast/events/continuous-platform-wheelevent-in-scrolling-div.html
       fast/events/platform-wheelevent-in-scrolling-div.html

* platform/mac/WebCoreSystemInterface.h: Modify method signature.
* platform/mac/WebCoreSystemInterface.mm: Ditto.
* platform/mac/WheelEventMac.mm:
(WebCore::PlatformWheelEvent::PlatformWheelEvent): Call into
WebKitSystemInterface to determine both wheelTicksX/Y and deltaX/Y.
WKSI will query the event system for number of wheel ticks and
pixels/lines scrolled based on the device type.

WebKit/mac: Updated call to WKGetWheelEventDeltas() to match new method signature.

Reviewed by John Sullivan.

https://bugs.webkit.org/show_bug.cgi?id=29601
<rdar://problem/7453254>

* WebView/WebDynamicScrollBarsView.mm:
(-[WebDynamicScrollBarsView scrollWheel:]):

WebKitLibraries: Added two new output arguments to WKGetWheelEventDeltas() to return
the number of scroll wheel ticks in the x and y directions.

Reviewed by John Sullivan.

https://bugs.webkit.org/show_bug.cgi?id=29601.
<rdar://problem/7453254>

* WebKitSystemInterface.h:
* libWebKitSystemInterfaceLeopard.a:
* libWebKitSystemInterfaceSnowLeopard.a:
* libWebKitSystemInterfaceTiger.a:

LayoutTests: These tests verify that scrollwheel events (both continuous and
non-continuous) generate the expected pixel deltas in scrollable
regions, and also generate DOM mousewheel events with expected
wheelDelta values.

Reviewed by John Sullivan.

https://bugs.webkit.org/show_bug.cgi?id=29601
<rdar://problem/7453254>

* fast/events/continuous-platform-wheelevent-in-scrolling-div-expected.txt: Added.
* fast/events/continuous-platform-wheelevent-in-scrolling-div.html: Added.
* fast/events/platform-wheelevent-in-scrolling-div-expected.txt: Added.
* fast/events/platform-wheelevent-in-scrolling-div.html: Added.
* fast/events/wheelevent-in-scrolling-div-expected.txt: Rebased
expected results due to change in test output formatting.
* fast/events/wheelevent-in-scrolling-div.html: Modified to use common
js logging and assertion functions.
* platform/gtk/Skipped: DRT support needed by tests not yet implemented
in GTK port.  See https://bugs.webkit.org/show_bug.cgi?id=36003.
* platform/mac-tiger/Skipped: DRT support needed by tests not possible
to implement in Tiger.
* platform/qt/Skipped: DRT support for tests not yet implemented in Qt
port.  See https://bugs.webkit.org/show_bug.cgi?id=36004.
* platform/win/Skipped: DRT support for tests not yet implemented in
Windows port.  See https://bugs.webkit.org/show_bug.cgi?id=36002.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@56012 268f45cc-cd09-0410-ab3c-d52691b4dbfc

22 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/events/continuous-platform-wheelevent-in-scrolling-div-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/continuous-platform-wheelevent-in-scrolling-div.html [new file with mode: 0644]
LayoutTests/fast/events/platform-wheelevent-in-scrolling-div-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/platform-wheelevent-in-scrolling-div.html [new file with mode: 0644]
LayoutTests/fast/events/wheelevent-in-scrolling-div-expected.txt
LayoutTests/fast/events/wheelevent-in-scrolling-div.html
LayoutTests/platform/gtk/Skipped
LayoutTests/platform/mac-tiger/Skipped
LayoutTests/platform/qt/Skipped
LayoutTests/platform/win/Skipped
WebCore/ChangeLog
WebCore/platform/mac/WebCoreSystemInterface.h
WebCore/platform/mac/WebCoreSystemInterface.mm
WebCore/platform/mac/WheelEventMac.mm
WebKit/mac/ChangeLog
WebKit/mac/WebView/WebDynamicScrollBarsView.mm
WebKitLibraries/ChangeLog
WebKitLibraries/WebKitSystemInterface.h
WebKitLibraries/libWebKitSystemInterfaceLeopard.a
WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a
WebKitLibraries/libWebKitSystemInterfaceTiger.a

index 3e0eab7..48721de 100644 (file)
@@ -1,3 +1,32 @@
+2010-03-15  Andy Estes  <aestes@apple.com>
+
+        Reviewed by John Sullivan.
+
+        These tests verify that scrollwheel events (both continuous and
+        non-continuous) generate the expected pixel deltas in scrollable
+        regions, and also generate DOM mousewheel events with expected
+        wheelDelta values.
+
+        https://bugs.webkit.org/show_bug.cgi?id=29601
+        <rdar://problem/7453254>
+
+        * fast/events/continuous-platform-wheelevent-in-scrolling-div-expected.txt: Added.
+        * fast/events/continuous-platform-wheelevent-in-scrolling-div.html: Added.
+        * fast/events/platform-wheelevent-in-scrolling-div-expected.txt: Added.
+        * fast/events/platform-wheelevent-in-scrolling-div.html: Added.
+        * fast/events/wheelevent-in-scrolling-div-expected.txt: Rebased
+        expected results due to change in test output formatting.
+        * fast/events/wheelevent-in-scrolling-div.html: Modified to use common
+        js logging and assertion functions.
+        * platform/gtk/Skipped: DRT support needed by tests not yet implemented
+        in GTK port.  See https://bugs.webkit.org/show_bug.cgi?id=36003.
+        * platform/mac-tiger/Skipped: DRT support needed by tests not possible
+        to implement in Tiger.
+        * platform/qt/Skipped: DRT support for tests not yet implemented in Qt
+        port.  See https://bugs.webkit.org/show_bug.cgi?id=36004.
+        * platform/win/Skipped: DRT support for tests not yet implemented in
+        Windows port.  See https://bugs.webkit.org/show_bug.cgi?id=36002.
+
 2010-03-15  Jian Li  <jianli@chromium.org>
 
         Reviewed by Sam Weinig.
diff --git a/LayoutTests/fast/events/continuous-platform-wheelevent-in-scrolling-div-expected.txt b/LayoutTests/fast/events/continuous-platform-wheelevent-in-scrolling-div-expected.txt
new file mode 100644 (file)
index 0000000..af0b6db
--- /dev/null
@@ -0,0 +1,6 @@
+PASS event.wheelDeltaY is window.expectedScrollTop*-120
+PASS event.wheelDeltaX is window.expectedScrollLeft*-120
+PASS event.wheelDelta is window.expectedScrollTop*-120
+PASS div.scrollTop is window.expectedScrollTop
+PASS div.scrollLeft is window.expectedScrollLeft
+
diff --git a/LayoutTests/fast/events/continuous-platform-wheelevent-in-scrolling-div.html b/LayoutTests/fast/events/continuous-platform-wheelevent-in-scrolling-div.html
new file mode 100644 (file)
index 0000000..fec1041
--- /dev/null
@@ -0,0 +1,61 @@
+<html>
+    <head>
+        <link rel="stylesheet" href="../js/resources/js-test-style.css">
+        <script src="../js/resources/js-test-pre.js"></script>
+        <script>
+            var expectedScrollTop = 200;
+            var expectedScrollLeft = 100;
+            var event;
+            var div;
+
+            if (window.layoutTestController) {
+                layoutTestController.waitUntilDone();
+            }
+
+            function dispatchWheelEvent()
+            {
+                var overflowElement = document.getElementById("overflow");
+                if (overflowElement)
+                    overflowElement.addEventListener("mousewheel", mousewheelHandler, false);
+
+                if (window.eventSender) {
+                    eventSender.mouseMoveTo(100, 110);
+                    eventSender.continuousMouseScrollBy(-window.expectedScrollLeft, -window.expectedScrollTop);
+                }
+
+                setTimeout('checkOffsets();', 100);
+            }
+
+            function checkOffsets()
+            {
+                div = document.getElementById("overflow");
+                shouldBe("div.scrollTop", "window.expectedScrollTop");
+                shouldBe("div.scrollLeft", "window.expectedScrollLeft");
+
+                if (window.layoutTestController)
+                    window.layoutTestController.notifyDone();
+            }
+
+            function mousewheelHandler(e)
+            {
+                event = e;
+                shouldBe("event.wheelDeltaY", "window.expectedScrollTop*-120");
+                shouldBe("event.wheelDeltaX", "window.expectedScrollLeft*-120");
+
+                if (e.wheelDeltaY)
+                    shouldBe("event.wheelDelta", "window.expectedScrollTop*-120");
+                else
+                    shouldBe("event.wheelDelta", "window.expectedScrollLeft*-120");
+            }
+        </script>
+    </head>
+
+    <body style="margin:0" onload="setTimeout('dispatchWheelEvent();', 100)">
+        <div id="overflow" style="border:2px solid black;overflow:auto;height:200px;width:200px;">
+            <div style="background-color:red;height:200px;width:400px;"></div>
+            <div style="background-color:green;height:200px;width:400px;"></div>
+            <div style="background-color:red;height:200px;width:400px;"></div>
+        </div>
+        <div id="console"></div>
+    </body>
+</html>
diff --git a/LayoutTests/fast/events/platform-wheelevent-in-scrolling-div-expected.txt b/LayoutTests/fast/events/platform-wheelevent-in-scrolling-div-expected.txt
new file mode 100644 (file)
index 0000000..b4f26d7
--- /dev/null
@@ -0,0 +1,6 @@
+PASS event.wheelDeltaY is window.expectedScrollTop*-120
+PASS event.wheelDeltaX is window.expectedScrollLeft*-120
+PASS event.wheelDelta is window.expectedScrollTop*-120
+PASS div.scrollTop is window.expectedScrollTop*window.pixelsPerWheelTick
+PASS div.scrollLeft is window.expectedScrollLeft*window.pixelsPerWheelTick
+
diff --git a/LayoutTests/fast/events/platform-wheelevent-in-scrolling-div.html b/LayoutTests/fast/events/platform-wheelevent-in-scrolling-div.html
new file mode 100644 (file)
index 0000000..2e382ac
--- /dev/null
@@ -0,0 +1,61 @@
+<html>
+    <head>
+        <link rel="stylesheet" href="../js/resources/js-test-style.css">
+        <script src="../js/resources/js-test-pre.js"></script>
+        <script>
+            var expectedScrollTop = 5;
+            var expectedScrollLeft = 3;
+            var pixelsPerWheelTick = 40;
+            var event;
+            var div;
+
+            if (window.layoutTestController)
+                layoutTestController.waitUntilDone();
+
+            function dispatchWheelEvent()
+            {
+                var overflowElement = document.getElementById("overflow");
+                if (overflowElement)
+                    overflowElement.addEventListener("mousewheel", mousewheelHandler, false);
+
+                if (window.eventSender) {
+                    eventSender.mouseMoveTo(100, 110);
+                    eventSender.mouseScrollBy(-window.expectedScrollLeft, -window.expectedScrollTop);
+                }
+
+                setTimeout('checkOffsets();', 100);
+            }
+
+            function checkOffsets()
+            {
+                div = document.getElementById("overflow");
+                shouldBe("div.scrollTop", "window.expectedScrollTop*window.pixelsPerWheelTick");
+                shouldBe("div.scrollLeft", "window.expectedScrollLeft*window.pixelsPerWheelTick");
+
+                if (window.layoutTestController)
+                    window.layoutTestController.notifyDone();
+            }
+
+            function mousewheelHandler(e)
+            {
+                event = e;
+                shouldBe("event.wheelDeltaY", "window.expectedScrollTop*-120");
+                shouldBe("event.wheelDeltaX", "window.expectedScrollLeft*-120");
+
+                if (e.wheelDeltaY)
+                    shouldBe("event.wheelDelta", "window.expectedScrollTop*-120");
+                else
+                    shouldBe("event.wheelDelta", "window.expectedScrollLeft*-120");
+            }
+        </script>
+    </head>
+
+    <body style="margin:0" onload="setTimeout('dispatchWheelEvent();', 100)">
+        <div id="overflow" style="border:2px solid black;overflow:auto;height:200px;width:200px;">
+            <div style="background-color:red;height:200px;width:400px;"></div>
+            <div style="background-color:green;height:200px;width:400px;"></div>
+            <div style="background-color:red;height:200px;width:400px;"></div>
+        </div>
+        <div id="console"></div>
+    </body>
+</html>
index e2471ef..af0b6db 100644 (file)
@@ -1,6 +1,6 @@
-scrollTop=200 (should be 200): PASS
-scrollLeft=100 (should be 100): PASS
-wheelDeltaY=-24000 (should be -24000): PASS
-wheelDeltaX=-12000 (should be -12000): PASS
-wheelDelta=-24000 (should be -24000): PASS
+PASS event.wheelDeltaY is window.expectedScrollTop*-120
+PASS event.wheelDeltaX is window.expectedScrollLeft*-120
+PASS event.wheelDelta is window.expectedScrollTop*-120
+PASS div.scrollTop is window.expectedScrollTop
+PASS div.scrollLeft is window.expectedScrollLeft
 
index 03dae4b..8733546 100644 (file)
@@ -1,84 +1,60 @@
-<head>
-    <script>
-        var expectedScrollTop = 200;
-        var expectedScrollLeft = 100;
+<html>
+    <head>
+        <link rel="stylesheet" href="../js/resources/js-test-style.css">
+        <script src="../js/resources/js-test-pre.js"></script>
+        <script>
+            var expectedScrollTop = 200;
+            var expectedScrollLeft = 100;
+            var event;
+            var div;
 
-        if (window.layoutTestController) {
-            layoutTestController.dumpAsText();
-            layoutTestController.waitUntilDone();
-        }
+            if (window.layoutTestController)
+                layoutTestController.waitUntilDone();
+
+            function dispatchWheelEvent()
+            {
+                var overflowElement = document.getElementById("overflow");
+                if (overflowElement) {
+                    overflowElement.addEventListener("mousewheel", mousewheelHandler, false);
 
-        function dispatchWheelEvent()
-        {
-            var overflowElement = document.getElementById("overflow");
-            if (overflowElement) {
-                overflowElement.addEventListener("mousewheel", mousewheelHandler, false);
-                var wheelEvent = document.createEvent("WheelEvent");
-                if (wheelEvent) {
+                    var wheelEvent = document.createEvent("WheelEvent");
                     wheelEvent.initWebKitWheelEvent(-window.expectedScrollLeft, -window.expectedScrollTop, window, 0, 0, 0, 0, false, false, false, false);
                     overflowElement.dispatchEvent(wheelEvent);
                 }
-            }
-
-            setTimeout('printScrollOffsets();', 100);
-        }
-
-        function passFailString(p)
-        {
-            var color = p?"green":"red";
-            var text = p?"PASS":"FAIL";
-            return "<span style='color:"+color+"'>"+text+"</span>";
-        }
-
-        function printScrollOffsets()
-        {
-            var consoleDiv = document.getElementById("offsetConsole");
-            var overflowDiv = document.getElementById("overflow");
-            if (consoleDiv && overflowDiv) {
-                consoleDiv.innerHTML = "";
 
-                consoleDiv.innerHTML += "scrollTop=" + overflowDiv.scrollTop + " (should be " + window.expectedScrollTop + "): ";
-                consoleDiv.innerHTML += passFailString(overflowDiv.scrollTop == window.expectedScrollTop);
-                consoleDiv.innerHTML += "<br>"
-
-                consoleDiv.innerHTML += "scrollLeft=" + overflowDiv.scrollLeft + " (should be " + window.expectedScrollLeft + "): ";
-                consoleDiv.innerHTML += passFailString(overflowDiv.scrollLeft == window.expectedScrollLeft);
-                consoleDiv.innerHTML += "<br>"
+                setTimeout('checkOffsets();', 100);
             }
 
-            if (window.layoutTestController)
-                window.layoutTestController.notifyDone();
-        }
-
-        function mousewheelHandler(e)
-        {
-            var consoleDiv = document.getElementById("mousewheelConsole");
-            if (consoleDiv) {
-                consoleDiv.innerHTML = "";
+            function checkOffsets()
+            {
+                div = document.getElementById("overflow");
+                shouldBe("div.scrollTop", "window.expectedScrollTop");
+                shouldBe("div.scrollLeft", "window.expectedScrollLeft");
 
-                consoleDiv.innerHTML += "wheelDeltaY=" + e.wheelDeltaY + " (should be " + window.expectedScrollTop*-120 + "): ";
-                consoleDiv.innerHTML += passFailString(e.wheelDeltaY == window.expectedScrollTop*-120);
-                consoleDiv.innerHTML += "<br>"
+                if (window.layoutTestController)
+                    window.layoutTestController.notifyDone();
+            }
 
-                consoleDiv.innerHTML += "wheelDeltaX=" + e.wheelDeltaX + " (should be " + window.expectedScrollLeft*-120 + "): ";
-                consoleDiv.innerHTML += passFailString(e.wheelDeltaX == window.expectedScrollLeft*-120);
-                consoleDiv.innerHTML += "<br>"
+            function mousewheelHandler(e)
+            {
+                event = e;
+                shouldBe("event.wheelDeltaY", "window.expectedScrollTop*-120");
+                shouldBe("event.wheelDeltaX", "window.expectedScrollLeft*-120");
 
-                var expectedScroll = e.wheelDeltaY?window.expectedScrollTop:window.expectedScrollLeft;
-                consoleDiv.innerHTML += "wheelDelta=" + e.wheelDelta + " (should be " + expectedScroll*-120 + "): ";
-                consoleDiv.innerHTML += passFailString(e.wheelDelta == expectedScroll*-120);
-                consoleDiv.innerHTML += "<br>"
+                if (e.wheelDeltaY)
+                    shouldBe("event.wheelDelta", "window.expectedScrollTop*-120");
+                else
+                    shouldBe("event.wheelDelta", "window.expectedScrollLeft*-120");
             }
-        }
-    </script>
-</head>
-
-<body style="margin:0" onload="setTimeout('dispatchWheelEvent();', 100)">
-    <div id="overflow" style="border:2px solid black;overflow:auto;height:200px;width:200px;">
-        <div style="background-color:red;height:200px;width:400px;"></div>
-        <div style="background-color:green;height:200px;width:400px;"></div>
-        <div style="background-color:red;height:200px;width:400px;"></div>
-    </div>
-    <div id="offsetConsole"><span style="color:red">FAIL</span></div>
-    <div id="mousewheelConsole"><span style="color:red">FAIL</span></div>
-</body>
+        </script>
+    </head>
+
+    <body style="margin:0" onload="setTimeout('dispatchWheelEvent();', 100)">
+        <div id="overflow" style="border:2px solid black;overflow:auto;height:200px;width:200px;">
+            <div style="background-color:red;height:200px;width:400px;"></div>
+            <div style="background-color:green;height:200px;width:400px;"></div>
+            <div style="background-color:red;height:200px;width:400px;"></div>
+        </div>
+        <div id="console"></div>
+    </body>
+</html>
index acc9071..e1dde80 100644 (file)
@@ -5819,8 +5819,11 @@ fast/events/zoom-dblclick.html
 # For some reason crashes when run with all tests. Passes individually.
 fast/forms/multiple-form-submission-protection-mouse.html
 
-# mouseScrollBy() is not yet implemented in the GTK EventSender API.
+# https://bugs.webkit.org/show_bug.cgi?id=36003
+# mouseScrollBy() and continuousMouseScrollBy() are not yet implemented in the GTK EventSender API.
 fast/events/remove-child-onscroll.html
+fast/events/platform-wheelevent-in-scrolling-div.html
+fast/events/continuous-platform-wheelevent-in-scrolling-div.html
 
 # renderTheme is not ready to draw progress element
 fast/dom/HTMLProgressElement/progress-element.html
index 31a7238..ab1a72a 100644 (file)
@@ -120,8 +120,10 @@ http/tests/media/video-referer.html
 # This test fails on Tiger, and when it fails, it dumps different results each time.
 java/lc3/JavaArray/ToString-001.html
 
-# We can't implement mouseScrollBy() in Tiger due to the lack of CGEventCreateScrollWheelEvent().
+# We can't implement mouseScrollBy() or continuousMouseScrollBy() in Tiger due to the lack of CGEventCreateScrollWheelEvent().
 fast/events/remove-child-onscroll.html
+fast/events/platform-wheelevent-in-scrolling-div.html
+fast/events/continuous-platform-wheelevent-in-scrolling-div.html
 
 # Intermittently times out on Tiger bot.
 # https://bugs.webkit.org/show_bug.cgi?id=36039
index 6567355..89d721f 100644 (file)
@@ -5097,8 +5097,11 @@ http/tests/cookies/third-party-cookie-relaxing.html
 # For some reason crashes when run with all tests. Passes individually.
 fast/forms/multiple-form-submission-protection-mouse.html
 
-# mouseScrollBy() is not yet implemented in the Qt EventSender API.
+# https://bugs.webkit.org/show_bug.cgi?id=36004
+# mouseScrollBy() and continuousMouseScrollBy() are not yet implemented in the Qt EventSender API.
 fast/events/remove-child-onscroll.html
+fast/events/platform-wheelevent-in-scrolling-div.html
+fast/events/continuous-platform-wheelevent-in-scrolling-div.html
 
 # It fails in DRT, but passes in QtLauncher
 # https://bugs.webkit.org/show_bug.cgi?id=35921
index 8c53b6d..4399a22 100644 (file)
@@ -793,8 +793,11 @@ media/video-preload.html
 # For some reason crashes when run with all tests. Passes individually.
 fast/forms/multiple-form-submission-protection-mouse.html
 
-# mouseScrollBy() is not yet implemented in the Windows EventSender API.
+# https://bugs.webkit.org/show_bug.cgi?id=36002
+# mouseScrollBy() and continuousMouseScrollBy() are not yet implemented in the Windows EventSender API.
 fast/events/remove-child-onscroll.html
+fast/events/platform-wheelevent-in-scrolling-div.html
+fast/events/continuous-platform-wheelevent-in-scrolling-div.html
 
 # Windows port doesn't yet support rendering of non-BMP characters even though there's a font available.
 fast/text/international/plane2.html 
index d180629..bd2783d 100644 (file)
@@ -1,3 +1,27 @@
+2010-03-15  Andy Estes  <aestes@apple.com>
+
+        Reviewed by John Sullivan.
+
+        For continuous scrolling devices on the Mac (trackpads and Mighty/Magic
+        Mice), set the number of wheel ticks equal to the atomic increment of
+        the device: a pixel.  This ensures that any scrolling action will
+        generate at least one wheel tick, regardless of the speed/length of
+        the gesture.
+
+        https://bugs.webkit.org/show_bug.cgi?id=29601
+        <rdar://problem/7453254>
+
+        Tests: fast/events/continuous-platform-wheelevent-in-scrolling-div.html
+               fast/events/platform-wheelevent-in-scrolling-div.html
+
+        * platform/mac/WebCoreSystemInterface.h: Modify method signature.
+        * platform/mac/WebCoreSystemInterface.mm: Ditto.
+        * platform/mac/WheelEventMac.mm:
+        (WebCore::PlatformWheelEvent::PlatformWheelEvent): Call into
+        WebKitSystemInterface to determine both wheelTicksX/Y and deltaX/Y.
+        WKSI will query the event system for number of wheel ticks and
+        pixels/lines scrolled based on the device type.
+
 2010-03-15  Philippe Normand  <pnormand@igalia.com>
 
         Reviewed by Gustavo Noronha Silva.
index e7521dc..f289ee4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -116,7 +116,7 @@ extern ATSUFontID (*wkGetNSFontATSUFontId)(NSFont*);
 extern double (*wkGetNSURLResponseCalculatedExpiration)(NSURLResponse *response);
 extern NSDate *(*wkGetNSURLResponseLastModifiedDate)(NSURLResponse *response);
 extern BOOL (*wkGetNSURLResponseMustRevalidate)(NSURLResponse *response);
-extern void (*wkGetWheelEventDeltas)(NSEvent*, float* deltaX, float* deltaY, BOOL* continuous);
+extern void (*wkGetWheelEventDeltas)(NSEvent*, float* deltaX, float* deltaY, float* wheelTicksX, float* wheelTicksY, BOOL* continuous);
 extern BOOL (*wkHitTestMediaUIPart)(int part, int themeStyle, CGRect bounds, CGPoint point);
 extern void (*wkMeasureMediaUIPart)(int part, int themeStyle, CGRect *bounds, CGSize *naturalSize);
 extern BOOL (*wkMediaControllerThemeAvailable)(int themeStyle);
index f3e0e77..b276467 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2006, 2007, 2008 Apple Computer, Inc. All rights reserved.
+ * Copyright 2006, 2007, 2008, 2010 Apple Computer, Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -51,7 +51,7 @@ NSString* (*wkGetMIMETypeForExtension)(NSString*);
 NSTimeInterval (*wkGetNSURLResponseCalculatedExpiration)(NSURLResponse *response);
 NSDate *(*wkGetNSURLResponseLastModifiedDate)(NSURLResponse *response);
 BOOL (*wkGetNSURLResponseMustRevalidate)(NSURLResponse *response);
-void (*wkGetWheelEventDeltas)(NSEvent*, float* deltaX, float* deltaY, BOOL* continuous);
+void (*wkGetWheelEventDeltas)(NSEvent*, float* deltaX, float* deltaY, float* wheelTicksX, float* wheelTicksY, BOOL* continuous);
 void (*wkPopupMenu)(NSMenu*, NSPoint location, float width, NSView*, int selectedItem, NSFont*);
 unsigned (*wkQTIncludeOnlyModernMediaFileTypes)(void);
 int (*wkQTMovieDataRate)(QTMovie*);
index c9a0efc..d7e2934 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2004, 2006 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2004, 2006, 2010 Apple Computer, Inc.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -43,13 +43,9 @@ PlatformWheelEvent::PlatformWheelEvent(NSEvent* event, NSView *windowView)
     , m_metaKey([event modifierFlags] & NSCommandKeyMask)
 {
     BOOL continuous;
-    wkGetWheelEventDeltas(event, &m_deltaX, &m_deltaY, &continuous);
-    if (continuous) {
-        m_wheelTicksX = m_deltaX / static_cast<float>(Scrollbar::pixelsPerLineStep());
-        m_wheelTicksY = m_deltaY / static_cast<float>(Scrollbar::pixelsPerLineStep());
-    } else {
-        m_wheelTicksX = m_deltaX;
-        m_wheelTicksY = m_deltaY;
+    wkGetWheelEventDeltas(event, &m_deltaX, &m_deltaY, &m_wheelTicksX, &m_wheelTicksY, &continuous);
+
+    if (!continuous) {
         m_deltaX *= static_cast<float>(Scrollbar::pixelsPerLineStep());
         m_deltaY *= static_cast<float>(Scrollbar::pixelsPerLineStep());
     }
index e8558cf..e6d3046 100644 (file)
@@ -1,3 +1,15 @@
+2010-03-15  Andy Estes  <aestes@apple.com>
+
+        Reviewed by John Sullivan.
+
+        Updated call to WKGetWheelEventDeltas() to match new method signature.
+
+        https://bugs.webkit.org/show_bug.cgi?id=29601
+        <rdar://problem/7453254>
+
+        * WebView/WebDynamicScrollBarsView.mm:
+        (-[WebDynamicScrollBarsView scrollWheel:]):
+
 2010-03-15  John Sullivan  <sullivan@apple.com>
 
         Reviewed by Adam Roben.
index b1a8c8d..e0db677 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 2008, 2010 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -406,8 +406,10 @@ static const unsigned cMaxUpdateScrollbarsPass = 2;
 {
     float deltaX;
     float deltaY;
+    float wheelTicksX;
+    float wheelTicksY;
     BOOL isContinuous;
-    WKGetWheelEventDeltas(event, &deltaX, &deltaY, &isContinuous);
+    WKGetWheelEventDeltas(event, &deltaX, &deltaY, &wheelTicksX, &wheelTicksY, &isContinuous);
 
     BOOL isLatchingEvent = WKIsLatchingWheelEvent(event);
 
index 053f302..b3d820b 100644 (file)
@@ -1,3 +1,18 @@
+2010-03-15  Andy Estes  <aestes@apple.com>
+
+        Reviewed by John Sullivan.
+
+        Added two new output arguments to WKGetWheelEventDeltas() to return
+        the number of scroll wheel ticks in the x and y directions.
+
+        https://bugs.webkit.org/show_bug.cgi?id=29601.
+        <rdar://problem/7453254>
+
+        * WebKitSystemInterface.h:
+        * libWebKitSystemInterfaceLeopard.a:
+        * libWebKitSystemInterfaceSnowLeopard.a:
+        * libWebKitSystemInterfaceTiger.a:
+
 2010-03-14  Dan Bernstein  <mitz@apple.com>
 
         Reviewed by Darin Adler.
index ed68410..50815aa 100644 (file)
@@ -176,7 +176,7 @@ BOOL WKSupportsMultipartXMixedReplace(NSMutableURLRequest *request);
 
 BOOL WKCGContextIsBitmapContext(CGContextRef context);
 
-void WKGetWheelEventDeltas(NSEvent *, float *deltaX, float *deltaY, BOOL *continuous);
+void WKGetWheelEventDeltas(NSEvent *, float *deltaX, float *deltaY, float *wheelTicksX, float *wheelTicksY, BOOL *continuous);
 
 BOOL WKAppVersionCheckLessThan(NSString *, int, double);
 
index 722044f..11ee822 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceLeopard.a and b/WebKitLibraries/libWebKitSystemInterfaceLeopard.a differ
index 3e3e1d7..27a113a 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a and b/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a differ
index 3dd651a..7264b61 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceTiger.a and b/WebKitLibraries/libWebKitSystemInterfaceTiger.a differ