Title: [125125] trunk/Source/WebKit/chromium
- Revision
- 125125
- Author
- [email protected]
- Date
- 2012-08-08 17:40:37 -0700 (Wed, 08 Aug 2012)
Log Message
[chromium/mac] Map NSEventPhaseMayBegin appropriately on 10.8
https://bugs.webkit.org/show_bug.cgi?id=93535
Patch by Alexei Svitkine <[email protected]> on 2012-08-08
Reviewed by Dimitri Glazkov.
This enables putting two fingers on the track pad to show overlay scroll bars on 10.8+.
* src/mac/WebInputEventFactory.mm:
(WebKit::phaseForNSEventPhase):
Modified Paths
Diff
Modified: trunk/Source/WebKit/chromium/ChangeLog (125124 => 125125)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-08-09 00:34:11 UTC (rev 125124)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-08-09 00:40:37 UTC (rev 125125)
@@ -1,3 +1,15 @@
+2012-08-08 Alexei Svitkine <[email protected]>
+
+ [chromium/mac] Map NSEventPhaseMayBegin appropriately on 10.8
+ https://bugs.webkit.org/show_bug.cgi?id=93535
+
+ Reviewed by Dimitri Glazkov.
+
+ This enables putting two fingers on the track pad to show overlay scroll bars on 10.8+.
+
+ * src/mac/WebInputEventFactory.mm:
+ (WebKit::phaseForNSEventPhase):
+
2012-08-08 James Robinson <[email protected]>
[chromium] Fix up includes and types in chromium compositor unit tests
Modified: trunk/Source/WebKit/chromium/src/mac/WebInputEventFactory.mm (125124 => 125125)
--- trunk/Source/WebKit/chromium/src/mac/WebInputEventFactory.mm 2012-08-09 00:34:11 UTC (rev 125124)
+++ trunk/Source/WebKit/chromium/src/mac/WebInputEventFactory.mm 2012-08-09 00:40:37 UTC (rev 125125)
@@ -43,8 +43,7 @@
NSEventPhaseStationary = 0x1 << 1,
NSEventPhaseChanged = 0x1 << 2,
NSEventPhaseEnded = 0x1 << 3,
- NSEventPhaseCancelled = 0x1 << 4,
- NSEventPhaseMayBegin = 0x1 << 5
+ NSEventPhaseCancelled = 0x1 << 4
};
typedef NSUInteger NSEventPhase;
@@ -55,6 +54,15 @@
#endif // __MAC_OS_X_VERSION_MAX_ALLOWED < 1070
+#if __MAC_OS_X_VERSION_MAX_ALLOWED < 1080
+
+// Additional Mountain Lion APIs.
+enum {
+ NSEventPhaseMayBegin = 0x1 << 5
+};
+
+#endif // __MAC_OS_X_VERSION_MAX_ALLOWED < 1080
+
// Do not __MAC_OS_X_VERSION_MAX_ALLOWED here because of a bug in the 10.5 SDK,
// see <http://lists.webkit.org/pipermail/webkit-dev/2012-July/021442.html>.
#if MAC_OS_X_VERSION_MAX_ALLOWED <= 1050
@@ -759,7 +767,7 @@
static WebMouseWheelEvent::Phase phaseForNSEventPhase(NSEventPhase eventPhase)
{
- uint32_t phase = WebMouseWheelEvent::PhaseNone;
+ uint32_t phase = WebMouseWheelEvent::PhaseNone;
if (eventPhase & NSEventPhaseBegan)
phase |= WebMouseWheelEvent::PhaseBegan;
if (eventPhase & NSEventPhaseStationary)
@@ -770,6 +778,8 @@
phase |= WebMouseWheelEvent::PhaseEnded;
if (eventPhase & NSEventPhaseCancelled)
phase |= WebMouseWheelEvent::PhaseCancelled;
+ if (eventPhase & NSEventPhaseMayBegin)
+ phase |= WebMouseWheelEvent::PhaseMayBegin;
return static_cast<WebMouseWheelEvent::Phase>(phase);
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes