From: andersca@apple.com Date: Thu, 26 Jan 2012 19:28:38 +0000 (+0000) Subject: WebWheelEvent::Phase and PlatformWheelEvent::Phase declarations should match AppKit X-Git-Tag: 070512121124~14449 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6a6df0969905ae9db8f6d43b10812f00f5a6a6f0;p=profile%2Fivi%2Fwebkit-efl.git 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): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106021 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 2c2606d..ae2e33d 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,15 @@ +2012-01-26 Anders Carlsson + + 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 Revert code changes from r105800 diff --git a/Source/WebCore/platform/PlatformWheelEvent.h b/Source/WebCore/platform/PlatformWheelEvent.h index 8e99e47..f76f4c9 100644 --- a/Source/WebCore/platform/PlatformWheelEvent.h +++ b/Source/WebCore/platform/PlatformWheelEvent.h @@ -77,11 +77,12 @@ namespace WebCore { #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 diff --git a/Source/WebCore/platform/mac/PlatformEventFactoryMac.mm b/Source/WebCore/platform/mac/PlatformEventFactoryMac.mm index 43623c7..46a9c1b 100644 --- a/Source/WebCore/platform/mac/PlatformEventFactoryMac.mm +++ b/Source/WebCore/platform/mac/PlatformEventFactoryMac.mm @@ -201,6 +201,11 @@ static PlatformWheelEventPhase phaseForEvent(NSEvent *event) phase |= PlatformWheelEventPhaseEnded; if ([event phase] & NSEventPhaseCancelled) phase |= PlatformWheelEventPhaseCancelled; +#if !defined(BUILDING_ON_LION) + if ([event momentumPhase] & NSEventPhaseMayBegin) + phase |= PlatformWheelEventPhaseMayBegin; +#endif + return static_cast(phase); #else UNUSED_PARAM(event); diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog index 82b1542..9f8a9d2 100644 --- a/Source/WebKit2/ChangeLog +++ b/Source/WebKit2/ChangeLog @@ -1,3 +1,15 @@ +2012-01-26 Anders Carlsson + + 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 ASSERT(!m_overlay) reached in TapHighlightController.cpp:73 diff --git a/Source/WebKit2/Shared/WebEvent.h b/Source/WebKit2/Shared/WebEvent.h index c182369..7ec01d4 100644 --- a/Source/WebKit2/Shared/WebEvent.h +++ b/Source/WebKit2/Shared/WebEvent.h @@ -166,11 +166,12 @@ public: #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 diff --git a/Source/WebKit2/Shared/mac/WebEventFactory.mm b/Source/WebKit2/Shared/mac/WebEventFactory.mm index 8e72387..9ee9561 100644 --- a/Source/WebKit2/Shared/mac/WebEventFactory.mm +++ b/Source/WebKit2/Shared/mac/WebEventFactory.mm @@ -200,6 +200,11 @@ static WebWheelEvent::Phase phaseForEvent(NSEvent *event) 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(phase); #else return WebWheelEvent::PhaseNone;