Title: [106021] trunk/Source
Revision
106021
Author
ander...@apple.com
Date
2012-01-26 11:28:38 -0800 (Thu, 26 Jan 2012)

Log Message

WebWheelEvent::Phase and PlatformWheelEvent::Phase declarations should match AppKit
https://bugs.webkit.org/show_bug.cgi?id=77123

Reviewed by Beth Dakin.

Source/WebCore:

* platform/PlatformWheelEvent.h:
():
* platform/mac/PlatformEventFactoryMac.mm:
(WebCore::phaseForEvent):

Source/WebKit2:

* Shared/WebEvent.h:
():
* Shared/mac/WebEventFactory.mm:
(WebKit::phaseForEvent):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (106020 => 106021)


--- trunk/Source/WebCore/ChangeLog	2012-01-26 19:26:15 UTC (rev 106020)
+++ trunk/Source/WebCore/ChangeLog	2012-01-26 19:28:38 UTC (rev 106021)
@@ -1,3 +1,15 @@
+2012-01-26  Anders Carlsson  <ander...@apple.com>
+
+        WebWheelEvent::Phase and PlatformWheelEvent::Phase declarations should match AppKit
+        https://bugs.webkit.org/show_bug.cgi?id=77123
+
+        Reviewed by Beth Dakin.
+
+        * platform/PlatformWheelEvent.h:
+        ():
+        * platform/mac/PlatformEventFactoryMac.mm:
+        (WebCore::phaseForEvent):
+
 2012-01-26  Daniel Cheng  <dch...@chromium.org>
 
         Revert code changes from r105800

Modified: trunk/Source/WebCore/platform/PlatformWheelEvent.h (106020 => 106021)


--- trunk/Source/WebCore/platform/PlatformWheelEvent.h	2012-01-26 19:26:15 UTC (rev 106020)
+++ trunk/Source/WebCore/platform/PlatformWheelEvent.h	2012-01-26 19:28:38 UTC (rev 106021)
@@ -77,11 +77,12 @@
 #if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))
     enum PlatformWheelEventPhase {
         PlatformWheelEventPhaseNone        = 0,
-        PlatformWheelEventPhaseBegan       = 1 << 1,
-        PlatformWheelEventPhaseStationary  = 1 << 2,
-        PlatformWheelEventPhaseChanged     = 1 << 3,
-        PlatformWheelEventPhaseEnded       = 1 << 4,
-        PlatformWheelEventPhaseCancelled   = 1 << 5,
+        PlatformWheelEventPhaseBegan       = 1 << 0,
+        PlatformWheelEventPhaseStationary  = 1 << 1,
+        PlatformWheelEventPhaseChanged     = 1 << 2,
+        PlatformWheelEventPhaseEnded       = 1 << 3,
+        PlatformWheelEventPhaseCancelled   = 1 << 4,
+        PlatformWheelEventPhaseMayBegin    = 1 << 5,
     };
 #endif
 

Modified: trunk/Source/WebCore/platform/mac/PlatformEventFactoryMac.mm (106020 => 106021)


--- trunk/Source/WebCore/platform/mac/PlatformEventFactoryMac.mm	2012-01-26 19:26:15 UTC (rev 106020)
+++ trunk/Source/WebCore/platform/mac/PlatformEventFactoryMac.mm	2012-01-26 19:28:38 UTC (rev 106021)
@@ -201,6 +201,11 @@
         phase |= PlatformWheelEventPhaseEnded;
     if ([event phase] & NSEventPhaseCancelled)
         phase |= PlatformWheelEventPhaseCancelled;
+#if !defined(BUILDING_ON_LION)
+    if ([event momentumPhase] & NSEventPhaseMayBegin)
+        phase |= PlatformWheelEventPhaseMayBegin;
+#endif
+
     return static_cast<PlatformWheelEventPhase>(phase);
 #else
     UNUSED_PARAM(event);

Modified: trunk/Source/WebKit2/ChangeLog (106020 => 106021)


--- trunk/Source/WebKit2/ChangeLog	2012-01-26 19:26:15 UTC (rev 106020)
+++ trunk/Source/WebKit2/ChangeLog	2012-01-26 19:28:38 UTC (rev 106021)
@@ -1,3 +1,15 @@
+2012-01-26  Anders Carlsson  <ander...@apple.com>
+
+        WebWheelEvent::Phase and PlatformWheelEvent::Phase declarations should match AppKit
+        https://bugs.webkit.org/show_bug.cgi?id=77123
+
+        Reviewed by Beth Dakin.
+
+        * Shared/WebEvent.h:
+        ():
+        * Shared/mac/WebEventFactory.mm:
+        (WebKit::phaseForEvent):
+
 2012-01-26  Andras Becsi  <andras.be...@nokia.com>
 
         ASSERT(!m_overlay) reached in TapHighlightController.cpp:73

Modified: trunk/Source/WebKit2/Shared/WebEvent.h (106020 => 106021)


--- trunk/Source/WebKit2/Shared/WebEvent.h	2012-01-26 19:26:15 UTC (rev 106020)
+++ trunk/Source/WebKit2/Shared/WebEvent.h	2012-01-26 19:28:38 UTC (rev 106021)
@@ -166,11 +166,12 @@
 #if PLATFORM(MAC)
     enum Phase {
         PhaseNone        = 0,
-        PhaseBegan       = 1 << 1,
-        PhaseStationary  = 1 << 2,
-        PhaseChanged     = 1 << 3,
-        PhaseEnded       = 1 << 4,
-        PhaseCancelled   = 1 << 5,
+        PhaseBegan       = 1 << 0,
+        PhaseStationary  = 1 << 1,
+        PhaseChanged     = 1 << 2,
+        PhaseEnded       = 1 << 3,
+        PhaseCancelled   = 1 << 4,
+        PhaseMayBegin    = 1 << 5,
     };
 #endif
 

Modified: trunk/Source/WebKit2/Shared/mac/WebEventFactory.mm (106020 => 106021)


--- trunk/Source/WebKit2/Shared/mac/WebEventFactory.mm	2012-01-26 19:26:15 UTC (rev 106020)
+++ trunk/Source/WebKit2/Shared/mac/WebEventFactory.mm	2012-01-26 19:28:38 UTC (rev 106021)
@@ -200,6 +200,11 @@
         phase |= WebWheelEvent::PhaseEnded;
     if ([event phase] & NSEventPhaseCancelled)
         phase |= WebWheelEvent::PhaseCancelled;
+#if !defined(BUILDING_ON_LION)
+    if ([event phase] & NSEventPhaseMayBegin)
+        phase |= WebWheelEvent::PhaseMayBegin;
+#endif
+
     return static_cast<WebWheelEvent::Phase>(phase);
 #else
     return WebWheelEvent::PhaseNone;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to