Diff
Modified: branches/safari-601-branch/Source/_javascript_Core/ChangeLog (194173 => 194174)
--- branches/safari-601-branch/Source/_javascript_Core/ChangeLog 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/_javascript_Core/ChangeLog 2015-12-16 22:08:06 UTC (rev 194174)
@@ -1,3 +1,18 @@
+2015-12-16 Babak Shafiei <[email protected]>
+
+ Merge r191299.
+
+ 2015-10-19 Tim Horton <[email protected]>
+
+ Add magnify and rotate gesture event support for Mac
+ https://bugs.webkit.org/show_bug.cgi?id=150179
+ <rdar://problem/8036240>
+
+ Reviewed by Darin Adler.
+
+ * Configurations/FeatureDefines.xcconfig:
+ New feature flag.
+
2015-12-11 Matthew Hanson <[email protected]>
Merge r193480. rdar://problem/23849785
Modified: branches/safari-601-branch/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig (194173 => 194174)
--- branches/safari-601-branch/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig 2015-12-16 22:08:06 UTC (rev 194174)
@@ -121,6 +121,9 @@
ENABLE_IOS_GESTURE_EVENTS[sdk=iphone*] = $(ENABLE_IOS_GESTURE_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
ENABLE_IOS_GESTURE_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_IOS_GESTURE_EVENTS;
+ENABLE_MAC_GESTURE_EVENTS[sdk=macosx*] = $(ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_YES = ENABLE_MAC_GESTURE_EVENTS;
+
ENABLE_IOS_TEXT_AUTOSIZING[sdk=iphone*] = ENABLE_IOS_TEXT_AUTOSIZING;
ENABLE_IOS_TOUCH_EVENTS[sdk=iphone*] = $(ENABLE_IOS_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
@@ -228,4 +231,4 @@
ENABLE_SATURATED_LAYOUT_ARITHMETIC = ENABLE_SATURATED_LAYOUT_ARITHMETIC;
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_AVF_CAPTIONS) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_ES6_ARROWFUNCTION_SYNTAX) $(ENABLE_ES6_CLASS_SYNTAX) $(ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM4_EVENTS_
CONSTRUCTOR) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_ICONDATABASE) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TEXT_AUTOSIZING) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MATHML) $(ENABLE_MEDIA_CONTROLS_SCR
IPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_HWCONCURRENCY) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_PICTURE_SIZES) $(ENABLE_POINTER_LOCK) $(ENABLE_PROMISES) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RUBBER_BANDING) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_OTF_CONVERTER) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_DATACUE_VALUE) $(ENABLE_V
IEW_MODE_CSS_MEDIA) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_REPLAY) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WEBVTT_REGIONS) $(ENABLE_XHR_TIMEOUT) $(ENABLE_XSLT) $(ENABLE_FTL_JIT) $(ENABLE_JIT) $(ENABLE_SATURATED_LAYOUT_ARITHMETIC) $(ENABLE_VIDEO_PRESENTATION_MODE);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_AVF_CAPTIONS) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_ES6_ARROWFUNCTION_SYNTAX) $(ENABLE_ES6_CLASS_SYNTAX) $(ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM4_EVENTS_C
ONSTRUCTOR) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_ICONDATABASE) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TEXT_AUTOSIZING) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML)
$(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_HWCONCURRENCY) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_PICTURE_SIZES) $(ENABLE_POINTER_LOCK) $(ENABLE_PROMISES) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RUBBER_BANDING) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_OTF_CONVERTER) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENAB
LE_DATACUE_VALUE) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_REPLAY) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WEBVTT_REGIONS) $(ENABLE_XHR_TIMEOUT) $(ENABLE_XSLT) $(ENABLE_FTL_JIT) $(ENABLE_JIT) $(ENABLE_SATURATED_LAYOUT_ARITHMETIC) $(ENABLE_VIDEO_PRESENTATION_MODE);
Modified: branches/safari-601-branch/Source/WTF/ChangeLog (194173 => 194174)
--- branches/safari-601-branch/Source/WTF/ChangeLog 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WTF/ChangeLog 2015-12-16 22:08:06 UTC (rev 194174)
@@ -1,3 +1,18 @@
+2015-12-16 Babak Shafiei <[email protected]>
+
+ Merge r191299.
+
+ 2015-10-19 Tim Horton <[email protected]>
+
+ Add magnify and rotate gesture event support for Mac
+ https://bugs.webkit.org/show_bug.cgi?id=150179
+ <rdar://problem/8036240>
+
+ Reviewed by Darin Adler.
+
+ * wtf/FeatureDefines.h:
+ New feature flag.
+
2015-12-08 Harris Papadopoulos <[email protected]>
Merge r188386. rdar://problem/23816165
Modified: branches/safari-601-branch/Source/WTF/wtf/FeatureDefines.h (194173 => 194174)
--- branches/safari-601-branch/Source/WTF/wtf/FeatureDefines.h 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WTF/wtf/FeatureDefines.h 2015-12-16 22:08:06 UTC (rev 194174)
@@ -110,6 +110,10 @@
#define ENABLE_IOS_TOUCH_EVENTS 1
#endif
+#if !defined(ENABLE_MAC_GESTURE_EVENTS) && USE(APPLE_INTERNAL_SDK)
+#define ENABLE_MAC_GESTURE_EVENTS 1
+#endif
+
#if !defined(ENABLE_METER_ELEMENT)
#define ENABLE_METER_ELEMENT 0
#endif
Modified: branches/safari-601-branch/Source/WebCore/ChangeLog (194173 => 194174)
--- branches/safari-601-branch/Source/WebCore/ChangeLog 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebCore/ChangeLog 2015-12-16 22:08:06 UTC (rev 194174)
@@ -1,5 +1,45 @@
2015-12-16 Babak Shafiei <[email protected]>
+ Merge r191299.
+
+ 2015-10-19 Tim Horton <[email protected]>
+
+ Add magnify and rotate gesture event support for Mac
+ https://bugs.webkit.org/show_bug.cgi?id=150179
+ <rdar://problem/8036240>
+
+ Reviewed by Darin Adler.
+
+ No new tests.
+
+ * Configurations/FeatureDefines.xcconfig:
+ New feature flag.
+
+ * Configurations/WebCore.xcconfig:
+ Don't exclude generated gesture sources; they are already #ifdef-guarded.
+
+ * DerivedSources.make:
+ Add GestureEvent.idl for ENABLE_MAC_GESTURE_EVENTS too.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ Add GestureEvents.cpp.
+
+ * bindings/objc/DOMEvents.mm:
+ (kitClass):
+ Support DOMGestureEvent on Mac if the new flag is enabled.
+
+ * dom/mac/GestureEvents.cpp: Added.
+ * page/mac/EventHandlerMac.mm:
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::clear):
+ * page/EventHandler.h:
+ Enable some gesture-related code on Mac if the new flag is enabled.
+
+ * platform/PlatformEvent.h:
+
+2015-12-16 Babak Shafiei <[email protected]>
+
Merge r191121.
2015-10-15 Tim Horton <[email protected]>
Modified: branches/safari-601-branch/Source/WebCore/Configurations/FeatureDefines.xcconfig (194173 => 194174)
--- branches/safari-601-branch/Source/WebCore/Configurations/FeatureDefines.xcconfig 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebCore/Configurations/FeatureDefines.xcconfig 2015-12-16 22:08:06 UTC (rev 194174)
@@ -121,6 +121,9 @@
ENABLE_IOS_GESTURE_EVENTS[sdk=iphone*] = $(ENABLE_IOS_GESTURE_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
ENABLE_IOS_GESTURE_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_IOS_GESTURE_EVENTS;
+ENABLE_MAC_GESTURE_EVENTS[sdk=macosx*] = $(ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_YES = ENABLE_MAC_GESTURE_EVENTS;
+
ENABLE_IOS_TEXT_AUTOSIZING[sdk=iphone*] = ENABLE_IOS_TEXT_AUTOSIZING;
ENABLE_IOS_TOUCH_EVENTS[sdk=iphone*] = $(ENABLE_IOS_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
@@ -228,4 +231,4 @@
ENABLE_SATURATED_LAYOUT_ARITHMETIC = ENABLE_SATURATED_LAYOUT_ARITHMETIC;
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_AVF_CAPTIONS) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_ES6_ARROWFUNCTION_SYNTAX) $(ENABLE_ES6_CLASS_SYNTAX) $(ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM4_EVENTS_
CONSTRUCTOR) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_ICONDATABASE) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TEXT_AUTOSIZING) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MATHML) $(ENABLE_MEDIA_CONTROLS_SCR
IPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_HWCONCURRENCY) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_PICTURE_SIZES) $(ENABLE_POINTER_LOCK) $(ENABLE_PROMISES) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RUBBER_BANDING) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_OTF_CONVERTER) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_DATACUE_VALUE) $(ENABLE_V
IEW_MODE_CSS_MEDIA) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_REPLAY) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WEBVTT_REGIONS) $(ENABLE_XHR_TIMEOUT) $(ENABLE_XSLT) $(ENABLE_FTL_JIT) $(ENABLE_JIT) $(ENABLE_SATURATED_LAYOUT_ARITHMETIC) $(ENABLE_VIDEO_PRESENTATION_MODE);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_AVF_CAPTIONS) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_ES6_ARROWFUNCTION_SYNTAX) $(ENABLE_ES6_CLASS_SYNTAX) $(ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM4_EVENTS_C
ONSTRUCTOR) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_ICONDATABASE) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TEXT_AUTOSIZING) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML)
$(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_HWCONCURRENCY) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_PICTURE_SIZES) $(ENABLE_POINTER_LOCK) $(ENABLE_PROMISES) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RUBBER_BANDING) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_OTF_CONVERTER) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENAB
LE_DATACUE_VALUE) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_REPLAY) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WEBVTT_REGIONS) $(ENABLE_XHR_TIMEOUT) $(ENABLE_XSLT) $(ENABLE_FTL_JIT) $(ENABLE_JIT) $(ENABLE_SATURATED_LAYOUT_ARITHMETIC) $(ENABLE_VIDEO_PRESENTATION_MODE);
Modified: branches/safari-601-branch/Source/WebCore/Configurations/WebCore.xcconfig (194173 => 194174)
--- branches/safari-601-branch/Source/WebCore/Configurations/WebCore.xcconfig 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebCore/Configurations/WebCore.xcconfig 2015-12-16 22:08:06 UTC (rev 194174)
@@ -91,7 +91,7 @@
EXCLUDED_SOURCE_FILE_NAMES_FOR_TOUCH_EVENTS = $(EXCLUDED_SOURCE_FILE_NAMES_FOR_TOUCH_EVENTS_IF_ENABLED_$(ENABLE_TOUCH_EVENTS));
EXCLUDED_SOURCE_FILE_NAMES_FOR_TOUCH_EVENTS_IF_ENABLED_ = JSTouch* DOMTouch*;
-EXCLUDED_SOURCE_FILE_NAMES_FOR_GESTURE_EVENTS = $(EXCLUDED_SOURCE_FILE_NAMES_FOR_GESTURE_EVENTS_IF_ENABLED_$(ENABLE_IOS_GESTURE_EVENTS));
+EXCLUDED_SOURCE_FILE_NAMES_FOR_GESTURE_EVENTS = $(EXCLUDED_SOURCE_FILE_NAMES_FOR_GESTURE_EVENTS_IF_ENABLED_$(ENABLE_IOS_GESTURE_EVENTS)$(ENABLE_MAC_GESTURE_EVENTS));
EXCLUDED_SOURCE_FILE_NAMES_FOR_GESTURE_EVENTS_IF_ENABLED_ = JSGesture* DOMGesture*;
EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*] = *.tiff *Cursor.png AccessibilityObjectMac.mm AXObjectCacheMac.mm ColorMac.mm Cursor.cpp CursorMac.mm DataTransferMac.mm EditorMac.mm EventHandlerMac.mm EventLoopMac.mm GeolocationServiceMac.mm GraphicsContext3DOpenGLES.cpp IconDatabase.cpp IconMac.mm KillRingMac.mm LocalCurrentGraphicsContext.mm MIMETypeRegistryMac.mm MediaPlayerPrivateQTKit.mm NSScrollerImpDetails.mm NetworkStateNotifierMac.cpp PasteboardMac.mm PlatformEventFactoryMac.mm PlatformMouseEventMac.mm PlatformPasteboardMac.mm PlatformScreenMac.mm PlatformSpeechSynthesizerMac.mm RunLoopMac.mm SSLKeyGeneratorMac.cpp ScrollViewMac.mm ScrollbarThemeMac.mm SharedTimerMac.mm SoundMac.mm SystemTimeMac.cpp ThemeMac.mm ThreadCheck.mm UserAgentMac.mm WebAccessibilityObjectWrapperMac.mm WebCoreSystemInterface.mm WebCoreView.m WebVideoFullscreenController.mm WebVideoFullscreenHUDWindowController.mm WebWindowAnimation.mm WidgetMac.mm DisplayRefreshMonitorMac.cp
p $(EXCLUDED_SOURCE_FILE_NAMES_FOR_TOUCH_EVENTS) $(EXCLUDED_SOURCE_FILE_NAMES_FOR_GESTURE_EVENTS);
Modified: branches/safari-601-branch/Source/WebCore/DerivedSources.make (194173 => 194174)
--- branches/safari-601-branch/Source/WebCore/DerivedSources.make 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebCore/DerivedSources.make 2015-12-16 22:08:06 UTC (rev 194174)
@@ -739,20 +739,24 @@
endif
endif
-ifeq ($(WTF_PLATFORM_IOS), 1)
ADDITIONAL_BINDING_IDLS =
+ifeq ($(findstring ENABLE_MAC_GESTURE_EVENTS,$(FEATURE_DEFINES)), ENABLE_MAC_GESTURE_EVENTS)
+ADDITIONAL_BINDING_IDLS += GestureEvent.idl
+endif
+ifeq ($(findstring ENABLE_IOS_GESTURE_EVENTS,$(FEATURE_DEFINES)), ENABLE_IOS_GESTURE_EVENTS)
+ADDITIONAL_BINDING_IDLS += GestureEvent.idl
+endif
+
+ifeq ($(WTF_PLATFORM_IOS), 1)
ifeq ($(findstring ENABLE_IOS_TOUCH_EVENTS,$(FEATURE_DEFINES)), ENABLE_IOS_TOUCH_EVENTS)
ADDITIONAL_BINDING_IDLS += \
Touch.idl \
TouchEvent.idl \
TouchList.idl
endif
+endif # IOS
-ifeq ($(findstring ENABLE_IOS_GESTURE_EVENTS,$(FEATURE_DEFINES)), ENABLE_IOS_GESTURE_EVENTS)
-ADDITIONAL_BINDING_IDLS += GestureEvent.idl
-endif
-
NON_SVG_BINDING_IDLS += $(ADDITIONAL_BINDING_IDLS)
all : $(ADDITIONAL_BINDING_IDLS:%.idl=JS%.h)
@@ -762,8 +766,6 @@
$(ADDITIONAL_BINDING_IDLS) : % : WebKitAdditions/%
cp $< .
-endif
-
endif # MACOS
ifneq ($(WTF_PLATFORM_IOS), 1)
Modified: branches/safari-601-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj (194173 => 194174)
--- branches/safari-601-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2015-12-16 22:08:06 UTC (rev 194174)
@@ -1133,6 +1133,7 @@
2D5002F81B56D7810020AAF7 /* DOMPath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D5002F71B56D7810020AAF7 /* DOMPath.cpp */; };
2D5002FB1B56D7990020AAF7 /* PathUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D5002F91B56D7990020AAF7 /* PathUtilities.cpp */; };
2D5002FC1B56D7990020AAF7 /* PathUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D5002FA1B56D7990020AAF7 /* PathUtilities.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 2D5036681BCDDDC400E20BB3 /* GestureEvents.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D5036671BCDDDC400E20BB3 /* GestureEvents.cpp */; settings = {ASSET_TAGS = (); }; };
2D58D8551A15F65F00A5F726 /* DataDetection.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D58D8531A15F65F00A5F726 /* DataDetection.h */; settings = {ATTRIBUTES = (Private, ); }; };
2D58D8561A15F65F00A5F726 /* DataDetection.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D58D8541A15F65F00A5F726 /* DataDetection.mm */; };
2D59F1BF1A0044C6001F3D29 /* DataDetectorsSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D59F1BE1A0044C6001F3D29 /* DataDetectorsSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -8330,6 +8331,7 @@
2D5002F71B56D7810020AAF7 /* DOMPath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMPath.cpp; sourceTree = "<group>"; };
2D5002F91B56D7990020AAF7 /* PathUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PathUtilities.cpp; sourceTree = "<group>"; };
2D5002FA1B56D7990020AAF7 /* PathUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PathUtilities.h; sourceTree = "<group>"; };
+ 2D5036671BCDDDC400E20BB3 /* GestureEvents.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GestureEvents.cpp; sourceTree = "<group>"; };
2D58D8531A15F65F00A5F726 /* DataDetection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataDetection.h; sourceTree = "<group>"; };
2D58D8541A15F65F00A5F726 /* DataDetection.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DataDetection.mm; sourceTree = "<group>"; };
2D59F1BE1A0044C6001F3D29 /* DataDetectorsSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataDetectorsSPI.h; sourceTree = "<group>"; };
@@ -15866,6 +15868,14 @@
path = mac;
sourceTree = "<group>";
};
+ 2D5036661BCDDDC400E20BB3 /* mac */ = {
+ isa = PBXGroup;
+ children = (
+ 2D5036671BCDDDC400E20BB3 /* GestureEvents.cpp */,
+ );
+ path = mac;
+ sourceTree = "<group>";
+ };
2E4346310F546A6800B0F1BA /* workers */ = {
isa = PBXGroup;
children = (
@@ -23108,6 +23118,7 @@
isa = PBXGroup;
children = (
CE2616A4187E65C1007955F3 /* ios */,
+ 2D5036661BCDDDC400E20BB3 /* mac */,
E1C4DE6D0EA75C650023CCD6 /* ActiveDOMObject.cpp */,
E1C4DE680EA75C1E0023CCD6 /* ActiveDOMObject.h */,
319847FE1A1D816700A13318 /* AnimationEvent.cpp */,
@@ -30284,6 +30295,7 @@
24D912B713CA9A6900D21915 /* SVGAltGlyphItemElement.cpp in Sources */,
B22279760D00BF220071B782 /* SVGAngle.cpp in Sources */,
B22279790D00BF220071B782 /* SVGAnimateColorElement.cpp in Sources */,
+ 2D5036681BCDDDC400E20BB3 /* GestureEvents.cpp in Sources */,
4362C7B913AC6F1A00344BEB /* SVGAnimatedAngle.cpp in Sources */,
431A308813B8F978007791E4 /* SVGAnimatedBoolean.cpp in Sources */,
43A625F913B3304000AC94B8 /* SVGAnimatedColor.cpp in Sources */,
Modified: branches/safari-601-branch/Source/WebCore/bindings/objc/DOMEvents.mm (194173 => 194174)
--- branches/safari-601-branch/Source/WebCore/bindings/objc/DOMEvents.mm 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebCore/bindings/objc/DOMEvents.mm 2015-12-16 22:08:06 UTC (rev 194174)
@@ -44,7 +44,7 @@
#import "DOMTouchEvent.h"
#endif
-#if ENABLE(IOS_GESTURE_EVENTS)
+#if ENABLE(IOS_GESTURE_EVENTS) || ENABLE(MAC_GESTURE_EVENTS)
#import "DOMGestureEvent.h"
#endif
@@ -67,7 +67,7 @@
if (desiredInterface == WebCore::TouchEventInterfaceType)
return [DOMTouchEvent class];
#endif
-#if ENABLE(IOS_GESTURE_EVENTS)
+#if ENABLE(IOS_GESTURE_EVENTS) || ENABLE(MAC_GESTURE_EVENTS)
if (desiredInterface == WebCore::GestureEventInterfaceType)
return [DOMGestureEvent class];
#endif
Modified: branches/safari-601-branch/Source/WebCore/dom/EventNames.in (194173 => 194174)
--- branches/safari-601-branch/Source/WebCore/dom/EventNames.in 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebCore/dom/EventNames.in 2015-12-16 22:08:06 UTC (rev 194174)
@@ -59,6 +59,7 @@
SecurityPolicyViolationEvent conditional=CSP_NEXT
UIRequestEvent conditional=INDIE_UI
GestureEvent conditional=IOS_GESTURE_EVENTS
+GestureEvent conditional=MAC_GESTURE_EVENTS
WebKitPlaybackTargetAvailabilityEvent conditional=WIRELESS_PLAYBACK_TARGET
GamepadEvent conditional=GAMEPAD
Modified: branches/safari-601-branch/Source/WebCore/page/EventHandler.cpp (194173 => 194174)
--- branches/safari-601-branch/Source/WebCore/page/EventHandler.cpp 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebCore/page/EventHandler.cpp 2015-12-16 22:08:06 UTC (rev 194174)
@@ -117,6 +117,10 @@
#include "PlatformTouchEvent.h"
#endif
+#if ENABLE(MAC_GESTURE_EVENTS)
+#include "PlatformGestureEventMac.h"
+#endif
+
namespace WebCore {
using namespace HTMLNames;
@@ -134,7 +138,7 @@
const std::chrono::milliseconds longMousePressRecognitionDelay = std::chrono::milliseconds(500);
const int maximumLongMousePressDragDistance = 5; // in points.
-#if ENABLE(IOS_GESTURE_EVENTS)
+#if ENABLE(IOS_GESTURE_EVENTS) || ENABLE(MAC_GESTURE_EVENTS)
const float GestureUnknown = 0;
#endif
@@ -423,8 +427,10 @@
m_clickNode = nullptr;
#if ENABLE(IOS_GESTURE_EVENTS)
m_gestureInitialDiameter = GestureUnknown;
+ m_gestureInitialRotation = GestureUnknown;
+#endif
+#if ENABLE(IOS_GESTURE_EVENTS) || ENABLE(MAC_GESTURE_EVENTS)
m_gestureLastDiameter = GestureUnknown;
- m_gestureInitialRotation = GestureUnknown;
m_gestureLastRotation = GestureUnknown;
m_gestureTargets.clear();
#endif
Modified: branches/safari-601-branch/Source/WebCore/page/EventHandler.h (194173 => 194174)
--- branches/safari-601-branch/Source/WebCore/page/EventHandler.h 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebCore/page/EventHandler.h 2015-12-16 22:08:06 UTC (rev 194174)
@@ -40,7 +40,10 @@
#include "WheelEventDeltaTracker.h"
#include <memory>
#include <wtf/Forward.h>
+#include <wtf/HashMap.h>
+#include <wtf/HashSet.h>
#include <wtf/RefPtr.h>
+#include <wtf/Vector.h>
#include <wtf/WeakPtr.h>
#if PLATFORM(IOS)
@@ -55,15 +58,6 @@
OBJC_CLASS NSView;
#endif
-#if ENABLE(TOUCH_EVENTS)
-#include <wtf/HashMap.h>
-#endif
-
-#if ENABLE(IOS_TOUCH_EVENTS)
-#include <wtf/HashSet.h>
-#include <wtf/Vector.h>
-#endif
-
namespace WebCore {
class AutoscrollController;
@@ -83,6 +77,7 @@
class MouseEventWithHitTestResults;
class Node;
class OptionalCursor;
+class PlatformGestureEvent;
class PlatformKeyboardEvent;
class PlatformTouchEvent;
class PlatformWheelEvent;
@@ -108,7 +103,7 @@
extern const int GeneralDragHysteresis;
#endif // ENABLE(DRAG_SUPPORT)
-#if ENABLE(IOS_GESTURE_EVENTS)
+#if ENABLE(IOS_GESTURE_EVENTS) || ENABLE(MAC_GESTURE_EVENTS)
extern const float GestureUnknown;
extern const unsigned InvalidTouchIdentifier;
#endif
@@ -216,6 +211,9 @@
#if ENABLE(IOS_TOUCH_EVENTS) || ENABLE(IOS_GESTURE_EVENTS)
typedef Vector<RefPtr<Touch>> TouchArray;
typedef HashMap<EventTarget*, TouchArray*> EventTargetTouchMap;
+#endif
+
+#if ENABLE(IOS_TOUCH_EVENTS) || ENABLE(IOS_GESTURE_EVENTS) || ENABLE(MAC_GESTURE_EVENTS)
typedef HashSet<RefPtr<EventTarget>> EventTargetSet;
#endif
@@ -226,6 +224,9 @@
#if ENABLE(IOS_GESTURE_EVENTS)
bool dispatchGestureEvent(const PlatformTouchEvent&, const AtomicString&, const EventTargetSet&, float, float);
+#elif ENABLE(MAC_GESTURE_EVENTS)
+ bool dispatchGestureEvent(const PlatformGestureEvent&, const AtomicString&, const EventTargetSet&, float, float);
+ WEBCORE_EXPORT bool handleGestureEvent(const PlatformGestureEvent&);
#endif
#if PLATFORM(IOS)
@@ -523,10 +524,15 @@
#if ENABLE(IOS_GESTURE_EVENTS)
float m_gestureInitialDiameter { GestureUnknown };
float m_gestureInitialRotation { GestureUnknown };
+#endif
+#if ENABLE(IOS_GESTURE_EVENTS) || ENABLE(MAC_GESTURE_EVENTS)
float m_gestureLastDiameter { GestureUnknown };
float m_gestureLastRotation { GestureUnknown };
EventTargetSet m_gestureTargets;
#endif
+#if ENABLE(MAC_GESTURE_EVENTS)
+ bool m_hasActiveGesture { false };
+#endif
#if ENABLE(IOS_TOUCH_EVENTS)
unsigned m_firstTouchID { InvalidTouchIdentifier };
Modified: branches/safari-601-branch/Source/WebCore/page/mac/EventHandlerMac.mm (194173 => 194174)
--- branches/safari-601-branch/Source/WebCore/page/mac/EventHandlerMac.mm 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebCore/page/mac/EventHandlerMac.mm 2015-12-16 22:08:06 UTC (rev 194174)
@@ -50,6 +50,7 @@
#include "Range.h"
#include "RenderLayer.h"
#include "RenderListBox.h"
+#include "RenderView.h"
#include "RenderWidget.h"
#include "RuntimeApplicationChecks.h"
#include "ScrollAnimator.h"
@@ -64,6 +65,10 @@
#include <wtf/NeverDestroyed.h>
#include <wtf/ObjcRuntimeExtras.h>
+#if ENABLE(MAC_GESTURE_EVENTS)
+#import <WebKitAdditions/EventHandlerMacGesture.cpp>
+#endif
+
namespace WebCore {
#if ENABLE(DRAG_SUPPORT)
Modified: branches/safari-601-branch/Source/WebCore/platform/PlatformEvent.h (194173 => 194174)
--- branches/safari-601-branch/Source/WebCore/platform/PlatformEvent.h 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebCore/platform/PlatformEvent.h 2015-12-16 22:08:06 UTC (rev 194174)
@@ -58,6 +58,13 @@
TouchEnd,
TouchCancel,
#endif
+
+#if ENABLE(MAC_GESTURE_EVENTS)
+ // PlatformGestureEvent
+ GestureStart,
+ GestureChange,
+ GestureEnd,
+#endif
};
enum Modifiers : uint8_t {
Modified: branches/safari-601-branch/Source/WebKit/mac/ChangeLog (194173 => 194174)
--- branches/safari-601-branch/Source/WebKit/mac/ChangeLog 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebKit/mac/ChangeLog 2015-12-16 22:08:06 UTC (rev 194174)
@@ -1,3 +1,18 @@
+2015-12-16 Babak Shafiei <[email protected]>
+
+ Merge r191299.
+
+ 2015-10-19 Tim Horton <[email protected]>
+
+ Add magnify and rotate gesture event support for Mac
+ https://bugs.webkit.org/show_bug.cgi?id=150179
+ <rdar://problem/8036240>
+
+ Reviewed by Darin Adler.
+
+ * Configurations/FeatureDefines.xcconfig:
+ New feature flag.
+
2015-12-08 Harris Papadopoulos <[email protected]>
Merge r188386. rdar://problem/23816165
Modified: branches/safari-601-branch/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig (194173 => 194174)
--- branches/safari-601-branch/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig 2015-12-16 22:08:06 UTC (rev 194174)
@@ -121,6 +121,9 @@
ENABLE_IOS_GESTURE_EVENTS[sdk=iphone*] = $(ENABLE_IOS_GESTURE_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
ENABLE_IOS_GESTURE_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_IOS_GESTURE_EVENTS;
+ENABLE_MAC_GESTURE_EVENTS[sdk=macosx*] = $(ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_YES = ENABLE_MAC_GESTURE_EVENTS;
+
ENABLE_IOS_TEXT_AUTOSIZING[sdk=iphone*] = ENABLE_IOS_TEXT_AUTOSIZING;
ENABLE_IOS_TOUCH_EVENTS[sdk=iphone*] = $(ENABLE_IOS_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
@@ -228,4 +231,4 @@
ENABLE_SATURATED_LAYOUT_ARITHMETIC = ENABLE_SATURATED_LAYOUT_ARITHMETIC;
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_AVF_CAPTIONS) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_ES6_ARROWFUNCTION_SYNTAX) $(ENABLE_ES6_CLASS_SYNTAX) $(ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM4_EVENTS_
CONSTRUCTOR) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_ICONDATABASE) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TEXT_AUTOSIZING) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MATHML) $(ENABLE_MEDIA_CONTROLS_SCR
IPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_HWCONCURRENCY) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_PICTURE_SIZES) $(ENABLE_POINTER_LOCK) $(ENABLE_PROMISES) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RUBBER_BANDING) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_OTF_CONVERTER) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_DATACUE_VALUE) $(ENABLE_V
IEW_MODE_CSS_MEDIA) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_REPLAY) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WEBVTT_REGIONS) $(ENABLE_XHR_TIMEOUT) $(ENABLE_XSLT) $(ENABLE_FTL_JIT) $(ENABLE_JIT) $(ENABLE_SATURATED_LAYOUT_ARITHMETIC) $(ENABLE_VIDEO_PRESENTATION_MODE);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_AVF_CAPTIONS) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_ES6_ARROWFUNCTION_SYNTAX) $(ENABLE_ES6_CLASS_SYNTAX) $(ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM4_EVENTS_C
ONSTRUCTOR) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_ICONDATABASE) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TEXT_AUTOSIZING) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML)
$(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_HWCONCURRENCY) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_PICTURE_SIZES) $(ENABLE_POINTER_LOCK) $(ENABLE_PROMISES) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RUBBER_BANDING) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_OTF_CONVERTER) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENAB
LE_DATACUE_VALUE) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_REPLAY) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WEBVTT_REGIONS) $(ENABLE_XHR_TIMEOUT) $(ENABLE_XSLT) $(ENABLE_FTL_JIT) $(ENABLE_JIT) $(ENABLE_SATURATED_LAYOUT_ARITHMETIC) $(ENABLE_VIDEO_PRESENTATION_MODE);
Modified: branches/safari-601-branch/Source/WebKit2/ChangeLog (194173 => 194174)
--- branches/safari-601-branch/Source/WebKit2/ChangeLog 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebKit2/ChangeLog 2015-12-16 22:08:06 UTC (rev 194174)
@@ -1,3 +1,99 @@
+2015-12-16 Babak Shafiei <[email protected]>
+
+ Merge r191299.
+
+ 2015-10-19 Tim Horton <[email protected]>
+
+ Add magnify and rotate gesture event support for Mac
+ https://bugs.webkit.org/show_bug.cgi?id=150179
+ <rdar://problem/8036240>
+
+ Reviewed by Darin Adler.
+
+ * Configurations/FeatureDefines.xcconfig:
+ New feature flag.
+
+ * Shared/NativeWebGestureEvent.h: Added.
+ (WebKit::NativeWebGestureEvent::nativeEvent):
+ * Shared/WebEvent.h:
+ * Shared/WebEventConversion.cpp:
+ (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
+ (WebKit::platform):
+ * Shared/WebEventConversion.h:
+ * Shared/mac/NativeWebGestureEventMac.mm: Added.
+ (WebKit::webEventTypeForNSEvent):
+ (WebKit::pointForEvent):
+ (WebKit::NativeWebGestureEvent::NativeWebGestureEvent):
+ Add and plumb a new native event that wraps a NSEvent of type
+ NSEventTypeMagnify or NSEventTypeRotate (gesture events).
+
+ * Shared/mac/WebGestureEvent.cpp: Added.
+ (WebKit::WebGestureEvent::encode):
+ (WebKit::WebGestureEvent::decode):
+ (WebKit::WebGestureEvent::isGestureEventType):
+ * Shared/mac/WebGestureEvent.h: Added.
+ (WebKit::WebGestureEvent::WebGestureEvent):
+ (WebKit::WebGestureEvent::position):
+ (WebKit::WebGestureEvent::gestureScale):
+ (WebKit::WebGestureEvent::gestureRotation):
+ Add IPC plumbing for WebGestureEvent, which becomes a WebCore::PlatformGestureEvent.
+
+ * UIProcess/API/Cocoa/WKViewPrivate.h:
+ Remove unnecessary iPhone-only WKView code.
+ Add _gestureEventWasNotHandledByWebCore, SPI which can be overridden
+ to react when WebCore decides not to handle a gesture event.
+
+ * UIProcess/API/mac/WKView.mm:
+ (-[WKView magnifyWithEvent:]):
+ Route magnification gesture events to the page, unless we're already
+ in an active view zoom gesture, in which case we'll bypass the page
+ and send the event straight to ViewGestureController.
+
+ (-[WKView rotateWithEvent:]):
+ Route rotation gesture events to the page.
+
+ (-[WKView _gestureEventWasNotHandledByWebCore:]):
+ Let ViewGestureController know that WebCore didn't handle a gesture event.
+ We always give WebCore the first crack at the event if we're not in a zoom,
+ because it could preventDefault() on the Begin phase event, and that should
+ prevent pinch-zoom from starting.
+
+ * UIProcess/PageClient.h:
+ * UIProcess/mac/PageClientImpl.h:
+ * UIProcess/mac/PageClientImpl.mm:
+ (WebKit::PageClientImpl::gestureEventWasNotHandledByWebCore):
+ Plumb gestureEventWasNotHandledByWebCore back from WebPageProxy to WKView.
+
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::handleGestureEvent):
+ (WebKit::WebPageProxy::didReceiveEvent):
+ * UIProcess/WebPageProxy.h:
+ Forward gesture events to EventDispatcher, and let WKView know when WebCore
+ passes on handling them.
+
+ * UIProcess/mac/ViewGestureController.h:
+ (WebKit::ViewGestureController::hasActiveMagnificationGesture):
+ * UIProcess/mac/ViewGestureControllerMac.mm:
+ (WebKit::ViewGestureController::gestureEventWasNotHandledByWebCore):
+ (WebKit::ViewGestureController::handleMagnificationGestureEvent):
+ Don't try to start a zoom with anything other than a Begin phase event.
+ Try to start a zoom with any events that WebCore doesn't handle.
+ Move dispatch of endMagnificationGesture into ViewGestureController;
+ there is no reason for that to be in WKView anymore.
+
+ * WebKit2.xcodeproj/project.pbxproj:
+ * WebProcess/WebPage/EventDispatcher.cpp:
+ (WebKit::EventDispatcher::gestureEvent):
+ (WebKit::EventDispatcher::dispatchGestureEvent):
+ * WebProcess/WebPage/EventDispatcher.h:
+ * WebProcess/WebPage/EventDispatcher.messages.in:
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::handleGestureEvent):
+ (WebKit::WebPage::gestureEvent):
+ * WebProcess/WebPage/WebPage.h:
+ Dispatch to the main thread and hand off the gesture event to WebCore,
+ asynchronously informing the UI process of whether the event was handled or not.
+
2015-12-08 Harris Papadopoulos <[email protected]>
Merge r193380. rdar://problem/23816165
Modified: branches/safari-601-branch/Source/WebKit2/Configurations/FeatureDefines.xcconfig (194173 => 194174)
--- branches/safari-601-branch/Source/WebKit2/Configurations/FeatureDefines.xcconfig 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebKit2/Configurations/FeatureDefines.xcconfig 2015-12-16 22:08:06 UTC (rev 194174)
@@ -121,6 +121,9 @@
ENABLE_IOS_GESTURE_EVENTS[sdk=iphone*] = $(ENABLE_IOS_GESTURE_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
ENABLE_IOS_GESTURE_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_IOS_GESTURE_EVENTS;
+ENABLE_MAC_GESTURE_EVENTS[sdk=macosx*] = $(ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
+ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_YES = ENABLE_MAC_GESTURE_EVENTS;
+
ENABLE_IOS_TEXT_AUTOSIZING[sdk=iphone*] = ENABLE_IOS_TEXT_AUTOSIZING;
ENABLE_IOS_TOUCH_EVENTS[sdk=iphone*] = $(ENABLE_IOS_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
@@ -228,4 +231,4 @@
ENABLE_SATURATED_LAYOUT_ARITHMETIC = ENABLE_SATURATED_LAYOUT_ARITHMETIC;
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_AVF_CAPTIONS) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_ES6_ARROWFUNCTION_SYNTAX) $(ENABLE_ES6_CLASS_SYNTAX) $(ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM4_EVENTS_
CONSTRUCTOR) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_ICONDATABASE) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TEXT_AUTOSIZING) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MATHML) $(ENABLE_MEDIA_CONTROLS_SCR
IPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_HWCONCURRENCY) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_PICTURE_SIZES) $(ENABLE_POINTER_LOCK) $(ENABLE_PROMISES) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RUBBER_BANDING) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_OTF_CONVERTER) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_DATACUE_VALUE) $(ENABLE_V
IEW_MODE_CSS_MEDIA) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_REPLAY) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WEBVTT_REGIONS) $(ENABLE_XHR_TIMEOUT) $(ENABLE_XSLT) $(ENABLE_FTL_JIT) $(ENABLE_JIT) $(ENABLE_SATURATED_LAYOUT_ARITHMETIC) $(ENABLE_VIDEO_PRESENTATION_MODE);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_AVF_CAPTIONS) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_ES6_ARROWFUNCTION_SYNTAX) $(ENABLE_ES6_CLASS_SYNTAX) $(ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM4_EVENTS_C
ONSTRUCTOR) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_ICONDATABASE) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TEXT_AUTOSIZING) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML)
$(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_HWCONCURRENCY) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_PICTURE_SIZES) $(ENABLE_POINTER_LOCK) $(ENABLE_PROMISES) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RUBBER_BANDING) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_OTF_CONVERTER) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENAB
LE_DATACUE_VALUE) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_REPLAY) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WEBVTT_REGIONS) $(ENABLE_XHR_TIMEOUT) $(ENABLE_XSLT) $(ENABLE_FTL_JIT) $(ENABLE_JIT) $(ENABLE_SATURATED_LAYOUT_ARITHMETIC) $(ENABLE_VIDEO_PRESENTATION_MODE);
Copied: branches/safari-601-branch/Source/WebKit2/Shared/NativeWebGestureEvent.h (from rev 191299, trunk/Source/WebKit2/Shared/NativeWebGestureEvent.h) (0 => 194174)
--- branches/safari-601-branch/Source/WebKit2/Shared/NativeWebGestureEvent.h (rev 0)
+++ branches/safari-601-branch/Source/WebKit2/Shared/NativeWebGestureEvent.h 2015-12-16 22:08:06 UTC (rev 194174)
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef NativeWebGestureEvent_h
+#define NativeWebGestureEvent_h
+
+#if ENABLE(MAC_GESTURE_EVENTS)
+
+#include "WebEvent.h"
+#include "WebGestureEvent.h"
+
+OBJC_CLASS NSEvent;
+
+namespace WebKit {
+
+class NativeWebGestureEvent final : public WebGestureEvent {
+public:
+ explicit NativeWebGestureEvent(NSEvent *, NSView *);
+
+ NSEvent *nativeEvent() const { return m_nativeEvent.get(); }
+
+private:
+ RetainPtr<NSEvent> m_nativeEvent;
+};
+
+} // namespace WebKit
+
+#endif // ENABLE(MAC_GESTURE_EVENTS)
+
+#endif // NativeWebGestureEvent_h
Modified: branches/safari-601-branch/Source/WebKit2/Shared/WebEvent.h (194173 => 194174)
--- branches/safari-601-branch/Source/WebKit2/Shared/WebEvent.h 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebKit2/Shared/WebEvent.h 2015-12-16 22:08:06 UTC (rev 194174)
@@ -78,6 +78,12 @@
TouchEnd,
TouchCancel,
#endif
+
+#if ENABLE(MAC_GESTURE_EVENTS)
+ GestureStart,
+ GestureChange,
+ GestureEnd,
+#endif
};
enum Modifiers {
Modified: branches/safari-601-branch/Source/WebKit2/Shared/WebEventConversion.cpp (194173 => 194174)
--- branches/safari-601-branch/Source/WebKit2/Shared/WebEventConversion.cpp 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebKit2/Shared/WebEventConversion.cpp 2015-12-16 22:08:06 UTC (rev 194174)
@@ -28,6 +28,10 @@
#include "WebEvent.h"
+#if ENABLE(MAC_GESTURE_EVENTS)
+#include "WebGestureEvent.h"
+#endif
+
namespace WebKit {
class WebKit2PlatformMouseEvent : public WebCore::PlatformMouseEvent {
@@ -349,4 +353,48 @@
}
#endif
+#if ENABLE(MAC_GESTURE_EVENTS)
+class WebKit2PlatformGestureEvent : public WebCore::PlatformGestureEvent {
+public:
+ WebKit2PlatformGestureEvent(const WebGestureEvent& webEvent)
+ {
+ switch (webEvent.type()) {
+ case WebEvent::GestureStart:
+ m_type = WebCore::PlatformEvent::GestureStart;
+ break;
+ case WebEvent::GestureChange:
+ m_type = WebCore::PlatformEvent::GestureChange;
+ break;
+ case WebEvent::GestureEnd:
+ m_type = WebCore::PlatformEvent::GestureEnd;
+ break;
+ default:
+ ASSERT_NOT_REACHED();
+ }
+
+ m_modifiers = 0;
+ if (webEvent.shiftKey())
+ m_modifiers |= ShiftKey;
+ if (webEvent.controlKey())
+ m_modifiers |= CtrlKey;
+ if (webEvent.altKey())
+ m_modifiers |= AltKey;
+ if (webEvent.metaKey())
+ m_modifiers |= MetaKey;
+
+ m_timestamp = webEvent.timestamp();
+
+ m_gestureScale = webEvent.gestureScale();
+ m_gestureRotation = webEvent.gestureRotation();
+ m_position = webEvent.position();
+ m_globalPosition = webEvent.position();
+ }
+};
+
+WebCore::PlatformGestureEvent platform(const WebGestureEvent& webEvent)
+{
+ return WebKit2PlatformGestureEvent(webEvent);
+}
+#endif
+
} // namespace WebKit
Modified: branches/safari-601-branch/Source/WebKit2/Shared/WebEventConversion.h (194173 => 194174)
--- branches/safari-601-branch/Source/WebKit2/Shared/WebEventConversion.h 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebKit2/Shared/WebEventConversion.h 2015-12-16 22:08:06 UTC (rev 194174)
@@ -37,6 +37,10 @@
#include <WebCore/PlatformTouchPoint.h>
#endif
+#if ENABLE(MAC_GESTURE_EVENTS)
+#include <WebKitAdditions/PlatformGestureEventMac.h>
+#endif
+
namespace WebKit {
class WebMouseEvent;
@@ -48,6 +52,10 @@
class WebTouchPoint;
#endif
+#if ENABLE(MAC_GESTURE_EVENTS)
+class WebGestureEvent;
+#endif
+
WebCore::PlatformMouseEvent platform(const WebMouseEvent&);
WebCore::PlatformWheelEvent platform(const WebWheelEvent&);
WebCore::PlatformKeyboardEvent platform(const WebKeyboardEvent&);
@@ -59,6 +67,10 @@
#endif
#endif
+#if ENABLE(MAC_GESTURE_EVENTS)
+WebCore::PlatformGestureEvent platform(const WebGestureEvent&);
+#endif
+
} // namespace WebKit
#endif // WebEventConversion_h
Copied: branches/safari-601-branch/Source/WebKit2/Shared/mac/NativeWebGestureEventMac.mm (from rev 191299, trunk/Source/WebKit2/Shared/mac/NativeWebGestureEventMac.mm) (0 => 194174)
--- branches/safari-601-branch/Source/WebKit2/Shared/mac/NativeWebGestureEventMac.mm (rev 0)
+++ branches/safari-601-branch/Source/WebKit2/Shared/mac/NativeWebGestureEventMac.mm 2015-12-16 22:08:06 UTC (rev 194174)
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+#import "NativeWebGestureEvent.h"
+
+#if ENABLE(MAC_GESTURE_EVENTS)
+
+#import "WebEvent.h"
+#import "WebGestureEvent.h"
+#import <WebCore/IntPoint.h>
+#import <wtf/CurrentTime.h>
+
+namespace WebKit {
+
+static inline WebEvent::Type webEventTypeForNSEvent(NSEvent *event)
+{
+ switch (event.phase) {
+ case NSEventPhaseBegan:
+ return WebEvent::GestureStart;
+ case NSEventPhaseChanged:
+ return WebEvent::GestureChange;
+ case NSEventPhaseEnded:
+ case NSEventPhaseCancelled:
+ return WebEvent::GestureEnd;
+ default:
+ break;
+ }
+ return WebEvent::Type::NoType;
+}
+
+static NSPoint pointForEvent(NSEvent *event, NSView *windowView)
+{
+ NSPoint location = [event locationInWindow];
+ if (windowView)
+ location = [windowView convertPoint:location fromView:nil];
+ return location;
+}
+
+NativeWebGestureEvent::NativeWebGestureEvent(NSEvent *event, NSView *view)
+ : WebGestureEvent(
+ webEventTypeForNSEvent(event),
+ static_cast<Modifiers>(0),
+ event.timestamp,
+ WebCore::IntPoint(pointForEvent(event, view)),
+ event.type == NSEventTypeMagnify ? event.magnification : 0,
+ event.type == NSEventTypeRotate ? event.rotation : 0)
+ , m_nativeEvent(event)
+{
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(MAC_GESTURE_EVENTS)
Copied: branches/safari-601-branch/Source/WebKit2/Shared/mac/WebGestureEvent.cpp (from rev 191299, trunk/Source/WebKit2/Shared/mac/WebGestureEvent.cpp) (0 => 194174)
--- branches/safari-601-branch/Source/WebKit2/Shared/mac/WebGestureEvent.cpp (rev 0)
+++ branches/safari-601-branch/Source/WebKit2/Shared/mac/WebGestureEvent.cpp 2015-12-16 22:08:06 UTC (rev 194174)
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebGestureEvent.h"
+
+#if ENABLE(MAC_GESTURE_EVENTS)
+
+#include "ArgumentCoders.h"
+#include "Arguments.h"
+#include "WebCoreArgumentCoders.h"
+
+namespace WebKit {
+
+void WebGestureEvent::encode(IPC::ArgumentEncoder& encoder) const
+{
+ WebEvent::encode(encoder);
+
+ encoder << m_position;
+ encoder << m_gestureScale;
+ encoder << m_gestureRotation;
+}
+
+bool WebGestureEvent::decode(IPC::ArgumentDecoder& decoder, WebGestureEvent& result)
+{
+ if (!WebEvent::decode(decoder, result))
+ return false;
+
+ if (!decoder.decode(result.m_position))
+ return false;
+ if (!decoder.decode(result.m_gestureScale))
+ return false;
+ if (!decoder.decode(result.m_gestureRotation))
+ return false;
+
+ return true;
+}
+
+bool WebGestureEvent::isGestureEventType(Type type) const
+{
+ return type == GestureStart || type == GestureChange || type == GestureEnd;
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(MAC_GESTURE_EVENTS)
Copied: branches/safari-601-branch/Source/WebKit2/Shared/mac/WebGestureEvent.h (from rev 191299, trunk/Source/WebKit2/Shared/mac/WebGestureEvent.h) (0 => 194174)
--- branches/safari-601-branch/Source/WebKit2/Shared/mac/WebGestureEvent.h (rev 0)
+++ branches/safari-601-branch/Source/WebKit2/Shared/mac/WebGestureEvent.h 2015-12-16 22:08:06 UTC (rev 194174)
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebGestureEvent_h
+#define WebGestureEvent_h
+
+#if ENABLE(MAC_GESTURE_EVENTS)
+
+#include "WebEvent.h"
+#include <WebCore/FloatPoint.h>
+#include <WebCore/FloatSize.h>
+#include <WebCore/IntPoint.h>
+#include <WebCore/IntSize.h>
+#include <wtf/text/WTFString.h>
+
+namespace IPC {
+class ArgumentDecoder;
+class ArgumentEncoder;
+}
+
+namespace WebKit {
+
+class WebGestureEvent : public WebEvent {
+public:
+ WebGestureEvent() { }
+ WebGestureEvent(WebEvent::Type type, Modifiers modifiers, double timestamp, WebCore::IntPoint position, float gestureScale, float gestureRotation)
+ : WebEvent(type, modifiers, timestamp)
+ , m_position(position)
+ , m_gestureScale(gestureScale)
+ , m_gestureRotation(gestureRotation)
+ {
+ ASSERT(isGestureEventType(type));
+ }
+
+ WebCore::IntPoint position() const { return m_position; }
+
+ float gestureScale() const { return m_gestureScale; }
+ float gestureRotation() const { return m_gestureRotation; }
+
+ void encode(IPC::ArgumentEncoder&) const;
+ static bool decode(IPC::ArgumentDecoder&, WebGestureEvent&);
+
+private:
+ bool isGestureEventType(Type) const;
+
+ WebCore::IntPoint m_position;
+ float m_gestureScale;
+ float m_gestureRotation;
+};
+
+} // namespace WebKit
+
+#endif // ENABLE(MAC_GESTURE_EVENTS)
+
+#endif // WebGestureEvent_h
Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h (194173 => 194174)
--- branches/safari-601-branch/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h 2015-12-16 22:08:06 UTC (rev 194174)
@@ -23,6 +23,8 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#if !TARGET_OS_IPHONE
+
#import <WebKit/WKBase.h>
#import <WebKit/WKImmediateActionTypes.h>
#import <WebKit/WKLayoutMode.h>
@@ -35,33 +37,10 @@
@property (readonly) WKPageRef pageRef;
-#if TARGET_OS_IPHONE
-- (id)initWithFrame:(CGRect)frame contextRef:(WKContextRef)contextRef pageGroupRef:(WKPageGroupRef)pageGroupRef;
-- (id)initWithFrame:(CGRect)frame contextRef:(WKContextRef)contextRef pageGroupRef:(WKPageGroupRef)pageGroupRef relatedToPage:(WKPageRef)relatedPage;
-#else
- (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)contextRef pageGroupRef:(WKPageGroupRef)pageGroupRef;
- (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)contextRef pageGroupRef:(WKPageGroupRef)pageGroupRef relatedToPage:(WKPageRef)relatedPage;
- (id)initWithFrame:(NSRect)frame configurationRef:(WKPageConfigurationRef)configuration;
-#endif
-#if TARGET_OS_IPHONE
-
-@property (nonatomic) CGSize minimumLayoutSizeOverride;
-
-// Define the inset of the scrollview unusable by the web page.
-@property (nonatomic, setter=_setObscuredInsets:) UIEdgeInsets _obscuredInsets;
-
-@property (nonatomic, setter=_setBackgroundExtendsBeyondPage:) BOOL _backgroundExtendsBeyondPage;
-
-// This is deprecated and should be removed entirely: <rdar://problem/16294704>.
-@property (readonly) UIColor *_pageExtendedBackgroundColor;
-
-- (void)_beginInteractiveObscuredInsetsChange;
-- (void)_endInteractiveObscuredInsetsChange;
-- (void)_didRelaunchProcess;
-
-#else
-
- (NSPrintOperation *)printOperationWithPrintInfo:(NSPrintInfo *)printInfo forFrame:(WKFrameRef)frameRef;
- (BOOL)canChangeFrameLayout:(WKFrameRef)frameRef;
@@ -155,6 +134,9 @@
- (void)_dismissContentRelativeChildWindowsWithAnimation:(BOOL)withAnimation;
- (void)_didChangeContentSize:(NSSize)newSize;
-#endif
+- (void)_gestureEventWasNotHandledByWebCore:(NSEvent *)event;
+
@end
+
+#endif // !TARGET_OS_IPHONE
Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/API/mac/WKView.mm (194173 => 194174)
--- branches/safari-601-branch/Source/WebKit2/UIProcess/API/mac/WKView.mm 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/API/mac/WKView.mm 2015-12-16 22:08:06 UTC (rev 194174)
@@ -42,6 +42,7 @@
#import "EditorState.h"
#import "LayerTreeContext.h"
#import "Logging.h"
+#import "NativeWebGestureEvent.h"
#import "NativeWebKeyboardEvent.h"
#import "NativeWebMouseEvent.h"
#import "NativeWebWheelEvent.h"
@@ -4544,6 +4545,10 @@
- (void)magnifyWithEvent:(NSEvent *)event
{
if (!_data->_allowsMagnification) {
+#if ENABLE(MAC_GESTURE_EVENTS)
+ NativeWebGestureEvent webEvent = NativeWebGestureEvent(event, self);
+ _data->_page->handleGestureEvent(webEvent);
+#endif
[super magnifyWithEvent:event];
return;
}
@@ -4552,12 +4557,35 @@
[self _ensureGestureController];
- _data->_gestureController->handleMagnificationGesture(event.magnification, [self convertPoint:event.locationInWindow fromView:nil]);
+#if ENABLE(MAC_GESTURE_EVENTS)
+ if (_data->_gestureController->hasActiveMagnificationGesture()) {
+ _data->_gestureController->handleMagnificationGestureEvent(event, [self convertPoint:event.locationInWindow fromView:nil]);
+ return;
+ }
- if (event.phase == NSEventPhaseEnded || event.phase == NSEventPhaseCancelled)
- _data->_gestureController->endMagnificationGesture();
+ NativeWebGestureEvent webEvent = NativeWebGestureEvent(event, self);
+ _data->_page->handleGestureEvent(webEvent);
+#else
+ _data->_gestureController->handleMagnificationGestureEvent(event, [self convertPoint:event.locationInWindow fromView:nil]);
+#endif
}
+#if ENABLE(MAC_GESTURE_EVENTS)
+- (void)rotateWithEvent:(NSEvent *)event
+{
+ NativeWebGestureEvent webEvent = NativeWebGestureEvent(event, self);
+ _data->_page->handleGestureEvent(webEvent);
+}
+#endif
+
+- (void)_gestureEventWasNotHandledByWebCore:(NSEvent *)event
+{
+#if ENABLE(MAC_GESTURE_EVENTS)
+ if (_data->_gestureController)
+ _data->_gestureController->gestureEventWasNotHandledByWebCore(event, [self convertPoint:event.locationInWindow fromView:nil]);
+#endif
+}
+
- (void)smartMagnifyWithEvent:(NSEvent *)event
{
if (!_data->_allowsMagnification) {
Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/PageClient.h (194173 => 194174)
--- branches/safari-601-branch/Source/WebKit2/UIProcess/PageClient.h 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/PageClient.h 2015-12-16 22:08:06 UTC (rev 194174)
@@ -179,6 +179,9 @@
virtual LayerOrView *acceleratedCompositingRootLayer() const = 0;
virtual PassRefPtr<ViewSnapshot> takeViewSnapshot() = 0;
virtual void wheelEventWasNotHandledByWebCore(const NativeWebWheelEvent&) = 0;
+#if ENABLE(MAC_GESTURE_EVENTS)
+ virtual void gestureEventWasNotHandledByWebCore(const NativeWebGestureEvent&) = 0;
+#endif
virtual void selectionDidChange() = 0;
#endif
Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp (194173 => 194174)
--- branches/safari-601-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp 2015-12-16 22:08:06 UTC (rev 194174)
@@ -53,6 +53,7 @@
#include "DrawingAreaProxyMessages.h"
#include "EventDispatcherMessages.h"
#include "Logging.h"
+#include "NativeWebGestureEvent.h"
#include "NativeWebKeyboardEvent.h"
#include "NativeWebMouseEvent.h"
#include "NativeWebWheelEvent.h"
@@ -1924,6 +1925,20 @@
#endif
+#if ENABLE(MAC_GESTURE_EVENTS)
+void WebPageProxy::handleGestureEvent(const NativeWebGestureEvent& event)
+{
+ if (!isValid())
+ return;
+
+ m_gestureEventQueue.append(event);
+ // FIXME: Consider doing some coalescing here.
+ m_process->responsivenessTimer()->start();
+
+ m_process->send(Messages::EventDispatcher::GestureEvent(m_pageID, event), 0);
+}
+#endif
+
#if ENABLE(IOS_TOUCH_EVENTS)
void WebPageProxy::handleTouchEventSynchronously(const NativeWebTouchEvent& event)
{
@@ -4599,6 +4614,11 @@
case WebEvent::TouchEnd:
case WebEvent::TouchCancel:
#endif
+#if ENABLE(MAC_GESTURE_EVENTS)
+ case WebEvent::GestureStart:
+ case WebEvent::GestureChange:
+ case WebEvent::GestureEnd:
+#endif
m_process->responsivenessTimer()->stop();
break;
}
@@ -4668,6 +4688,21 @@
m_uiClient->didNotHandleKeyEvent(this, event);
break;
}
+#if ENABLE(MAC_GESTURE_EVENTS)
+ case WebEvent::GestureStart:
+ case WebEvent::GestureChange:
+ case WebEvent::GestureEnd: {
+ MESSAGE_CHECK(!m_gestureEventQueue.isEmpty());
+ NativeWebGestureEvent event = m_gestureEventQueue.takeFirst();
+
+ MESSAGE_CHECK(type == event.type());
+
+ if (!handled)
+ m_pageClient.gestureEventWasNotHandledByWebCore(event);
+ break;
+ }
+ break;
+#endif
#if ENABLE(IOS_TOUCH_EVENTS)
case WebEvent::TouchStart:
case WebEvent::TouchMove:
Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/WebPageProxy.h (194173 => 194174)
--- branches/safari-601-branch/Source/WebKit2/UIProcess/WebPageProxy.h 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/WebPageProxy.h 2015-12-16 22:08:06 UTC (rev 194174)
@@ -174,6 +174,7 @@
namespace WebKit {
class CertificateInfo;
+class NativeWebGestureEvent;
class NativeWebKeyboardEvent;
class NativeWebMouseEvent;
class NativeWebWheelEvent;
@@ -598,6 +599,10 @@
void handleWheelEvent(const NativeWebWheelEvent&);
void handleKeyboardEvent(const NativeWebKeyboardEvent&);
+#if ENABLE(MAC_GESTURE_EVENTS)
+ void handleGestureEvent(const NativeWebGestureEvent&);
+#endif
+
#if ENABLE(IOS_TOUCH_EVENTS)
void handleTouchEventSynchronously(const NativeWebTouchEvent&);
void handleTouchEventAsynchronously(const NativeWebTouchEvent&);
@@ -1634,6 +1639,9 @@
Deque<NativeWebKeyboardEvent> m_keyEventQueue;
Deque<NativeWebWheelEvent> m_wheelEventQueue;
Deque<std::unique_ptr<Vector<NativeWebWheelEvent>>> m_currentlyProcessedWheelEvents;
+#if ENABLE(MAC_GESTURE_EVENTS)
+ Deque<NativeWebGestureEvent> m_gestureEventQueue;
+#endif
bool m_processingMouseMoveEvent;
std::unique_ptr<NativeWebMouseEvent> m_nextMouseMoveEvent;
Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.h (194173 => 194174)
--- branches/safari-601-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.h 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.h 2015-12-16 22:08:06 UTC (rev 194174)
@@ -137,6 +137,9 @@
virtual PassRefPtr<ViewSnapshot> takeViewSnapshot() override;
virtual void wheelEventWasNotHandledByWebCore(const NativeWebWheelEvent&) override;
+#if ENABLE(MAC_GESTURE_EVENTS)
+ virtual void gestureEventWasNotHandledByWebCore(const NativeWebGestureEvent&) override;
+#endif
virtual void accessibilityWebProcessTokenReceived(const IPC::DataReference&) override;
Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.mm (194173 => 194174)
--- branches/safari-601-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.mm 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.mm 2015-12-16 22:08:06 UTC (rev 194174)
@@ -33,6 +33,7 @@
#import "DataReference.h"
#import "DictionaryPopupInfo.h"
#import "DownloadProxy.h"
+#import "NativeWebGestureEvent.h"
#import "NativeWebKeyboardEvent.h"
#import "NativeWebWheelEvent.h"
#import "NavigationState.h"
@@ -572,6 +573,13 @@
[m_wkView _wheelEventWasNotHandledByWebCore:event.nativeEvent()];
}
+#if ENABLE(MAC_GESTURE_EVENTS)
+void PageClientImpl::gestureEventWasNotHandledByWebCore(const NativeWebGestureEvent& event)
+{
+ [m_wkView _gestureEventWasNotHandledByWebCore:event.nativeEvent()];
+}
+#endif
+
void PageClientImpl::pluginFocusOrWindowFocusChanged(uint64_t pluginComplexTextInputIdentifier, bool pluginHasFocusAndWindowHasFocus)
{
[m_wkView _pluginFocusOrWindowFocusChanged:pluginHasFocusAndWindowHasFocus pluginComplexTextInputIdentifier:pluginComplexTextInputIdentifier];
Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/mac/ViewGestureController.h (194173 => 194174)
--- branches/safari-601-branch/Source/WebKit2/UIProcess/mac/ViewGestureController.h 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/mac/ViewGestureController.h 2015-12-16 22:08:06 UTC (rev 194174)
@@ -94,13 +94,15 @@
#if PLATFORM(MAC)
double magnification() const;
- void handleMagnificationGesture(double scale, WebCore::FloatPoint origin);
- void endMagnificationGesture();
+ void handleMagnificationGestureEvent(NSEvent *, WebCore::FloatPoint origin);
+ bool hasActiveMagnificationGesture() const { return m_activeGestureType == ViewGestureType::Magnification; }
+
void handleSmartMagnificationGesture(WebCore::FloatPoint origin);
bool handleScrollWheelEvent(NSEvent *);
void wheelEventWasNotHandledByWebCore(NSEvent *);
+ void gestureEventWasNotHandledByWebCore(NSEvent *, WebCore::FloatPoint origin);
void setCustomSwipeViews(Vector<RetainPtr<NSView>> views) { m_customSwipeViews = WTF::move(views); }
void setCustomSwipeViewsTopContentInset(float topContentInset) { m_customSwipeViewsTopContentInset = topContentInset; }
@@ -144,6 +146,8 @@
void didHitRenderTreeSizeThreshold();
void removeSwipeSnapshotAfterRepaint();
+ void endMagnificationGesture();
+
WebCore::FloatPoint scaledMagnificationOrigin(WebCore::FloatPoint origin, double scale);
void trackSwipeGesture(NSEvent *, SwipeDirection);
Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm (194173 => 194174)
--- branches/safari-601-branch/Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm 2015-12-16 22:08:06 UTC (rev 194174)
@@ -158,11 +158,20 @@
m_frameHandlesMagnificationGesture = frameHandlesMagnificationGesture;
}
-void ViewGestureController::handleMagnificationGesture(double scale, FloatPoint origin)
+void ViewGestureController::gestureEventWasNotHandledByWebCore(NSEvent *event, FloatPoint origin)
{
+ if (event.type == NSEventTypeMagnify)
+ handleMagnificationGestureEvent(event, origin);
+}
+
+void ViewGestureController::handleMagnificationGestureEvent(NSEvent *event, FloatPoint origin)
+{
ASSERT(m_activeGestureType == ViewGestureType::None || m_activeGestureType == ViewGestureType::Magnification);
if (m_activeGestureType == ViewGestureType::None) {
+ if (event.phase != NSEventPhaseBegan)
+ return;
+
// FIXME: We drop the first frame of the gesture on the floor, because we don't have the visible content bounds yet.
m_magnification = m_webPageProxy.pageScaleFactor();
m_webPageProxy.process().send(Messages::ViewGestureGeometryCollector::CollectGeometryForMagnificationGesture(), m_webPageProxy.pageID());
@@ -177,6 +186,7 @@
m_activeGestureType = ViewGestureType::Magnification;
+ double scale = event.magnification;
double scaleWithResistance = resistanceForDelta(scale, m_magnification) * scale;
m_magnification += m_magnification * scaleWithResistance;
@@ -188,6 +198,9 @@
m_webPageProxy.scalePage(m_magnification, roundedIntPoint(origin));
else
m_webPageProxy.drawingArea()->adjustTransientZoom(m_magnification, scaledMagnificationOrigin(origin, m_magnification));
+
+ if (event.phase == NSEventPhaseEnded || event.phase == NSEventPhaseCancelled)
+ endMagnificationGesture();
}
void ViewGestureController::endMagnificationGesture()
Modified: branches/safari-601-branch/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (194173 => 194174)
--- branches/safari-601-branch/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj 2015-12-16 22:08:06 UTC (rev 194174)
@@ -612,6 +612,10 @@
2D429BFD1721E2C700EC681F /* PDFPluginPasswordField.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D429BFB1721E2BA00EC681F /* PDFPluginPasswordField.mm */; };
2D47B56C1810714E003A3AEE /* RemoteLayerBackingStore.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D47B56A1810714E003A3AEE /* RemoteLayerBackingStore.mm */; };
2D47B56D1810714E003A3AEE /* RemoteLayerBackingStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D47B56B1810714E003A3AEE /* RemoteLayerBackingStore.h */; };
+ 2D50365E1BCC793F00E20BB3 /* NativeWebGestureEventMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D50365D1BCC793F00E20BB3 /* NativeWebGestureEventMac.mm */; settings = {ASSET_TAGS = (); }; };
+ 2D50366B1BCDE17900E20BB3 /* NativeWebGestureEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D50366A1BCDE17900E20BB3 /* NativeWebGestureEvent.h */; settings = {ASSET_TAGS = (); }; };
+ 2D5036751BCED19F00E20BB3 /* WebGestureEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D5036731BCED19F00E20BB3 /* WebGestureEvent.cpp */; settings = {ASSET_TAGS = (); }; };
+ 2D5036761BCED19F00E20BB3 /* WebGestureEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D5036741BCED19F00E20BB3 /* WebGestureEvent.h */; settings = {ASSET_TAGS = (); }; };
2D5AB62E1A69D6FB0014A9CB /* MessageRecorder.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D5AB62B1A69D6FB0014A9CB /* MessageRecorder.h */; };
2D5AB62F1A69D6FB0014A9CB /* MessageRecorder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D5AB62C1A69D6FB0014A9CB /* MessageRecorder.cpp */; };
2D5AB6301A69D6FB0014A9CB /* MessageRecorderProbes.d in Sources */ = {isa = PBXBuildFile; fileRef = 2D5AB62D1A69D6FB0014A9CB /* MessageRecorderProbes.d */; };
@@ -2752,6 +2756,10 @@
2D429BFB1721E2BA00EC681F /* PDFPluginPasswordField.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = PDFPluginPasswordField.mm; path = PDF/PDFPluginPasswordField.mm; sourceTree = "<group>"; };
2D47B56A1810714E003A3AEE /* RemoteLayerBackingStore.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RemoteLayerBackingStore.mm; sourceTree = "<group>"; };
2D47B56B1810714E003A3AEE /* RemoteLayerBackingStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteLayerBackingStore.h; sourceTree = "<group>"; };
+ 2D50365D1BCC793F00E20BB3 /* NativeWebGestureEventMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = NativeWebGestureEventMac.mm; sourceTree = "<group>"; };
+ 2D50366A1BCDE17900E20BB3 /* NativeWebGestureEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeWebGestureEvent.h; sourceTree = "<group>"; };
+ 2D5036731BCED19F00E20BB3 /* WebGestureEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebGestureEvent.cpp; sourceTree = "<group>"; };
+ 2D5036741BCED19F00E20BB3 /* WebGestureEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGestureEvent.h; sourceTree = "<group>"; };
2D5AB62B1A69D6FB0014A9CB /* MessageRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageRecorder.h; sourceTree = "<group>"; };
2D5AB62C1A69D6FB0014A9CB /* MessageRecorder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MessageRecorder.cpp; sourceTree = "<group>"; };
2D5AB62D1A69D6FB0014A9CB /* MessageRecorderProbes.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = MessageRecorderProbes.d; sourceTree = "<group>"; };
@@ -4708,6 +4716,7 @@
1A92DC1212F8BAB90017AF65 /* LayerTreeContext.cpp */,
1A92DC1012F8BA460017AF65 /* LayerTreeContext.h */,
5163EA3F1ACC74820012D1E4 /* NativeContextMenuItem.h */,
+ 2D50366A1BCDE17900E20BB3 /* NativeWebGestureEvent.h */,
C02BFF1512514FD8009CCBEA /* NativeWebKeyboardEvent.h */,
31EA25D3134F78D6005B1452 /* NativeWebMouseEvent.h */,
263172CE18B469490065B9C3 /* NativeWebTouchEvent.h */,
@@ -6475,6 +6484,7 @@
5163EA431ACC74AE0012D1E4 /* NativeContextMenuItem.mm */,
C02BFF1D1251502E009CCBEA /* NativeWebKeyboardEventMac.mm */,
31EA25D0134F78B2005B1452 /* NativeWebMouseEventMac.mm */,
+ 2D50365D1BCC793F00E20BB3 /* NativeWebGestureEventMac.mm */,
DF58C6351371ACA000F9A37C /* NativeWebWheelEventMac.mm */,
BC8ACA0F16670D7A004C1941 /* ObjCObjectGraph.h */,
BC8ACA1016670D7B004C1941 /* ObjCObjectGraph.mm */,
@@ -6508,6 +6518,8 @@
BCE23262122C6CF300D5C35A /* WebCoreArgumentCodersMac.mm */,
BC111B5B112F629800337BAB /* WebEventFactory.h */,
BC111B5C112F629800337BAB /* WebEventFactory.mm */,
+ 2D5036731BCED19F00E20BB3 /* WebGestureEvent.cpp */,
+ 2D5036741BCED19F00E20BB3 /* WebGestureEvent.h */,
51AD35721AD2F3750057B38E /* WebHitTestResult.mm */,
905620E512BC2476000799B6 /* WebMemorySampler.mac.mm */,
);
@@ -8333,6 +8345,7 @@
4A3CC18F19B07B8A00D14AEF /* WKUserMediaPermissionRequest.h in Headers */,
1AAF089B19267EE500B6390C /* WKUserScript.h in Headers */,
377EAD4917E2C77B002D193D /* WKUserScriptInjectionTime.h in Headers */,
+ 2D5036761BCED19F00E20BB3 /* WebGestureEvent.h in Headers */,
1AAF089D19267FC800B6390C /* WKUserScriptInternal.h in Headers */,
7C89D2A41A678875003A5FDE /* WKUserScriptRef.h in Headers */,
BC8699B5116AADAA002A925B /* WKView.h in Headers */,
@@ -8354,6 +8367,7 @@
BC989D85161A9890000D46D3 /* WKWebProcessPlugInInternal.h in Headers */,
1F335BC0185B84F0001A201A /* WKWebProcessPlugInLoadDelegate.h in Headers */,
1F7506B31859164500EC0FF7 /* WKWebProcessPlugInNodeHandle.h in Headers */,
+ 2D50366B1BCDE17900E20BB3 /* NativeWebGestureEvent.h in Headers */,
1F7506B61859165700EC0FF7 /* WKWebProcessPlugInNodeHandleInternal.h in Headers */,
1FB00AC7185F76460019142E /* WKWebProcessPlugInPageGroup.h in Headers */,
1FB00AC9185F76460019142E /* WKWebProcessPlugInPageGroupInternal.h in Headers */,
@@ -9339,6 +9353,7 @@
1AD01BC81905D37E00C9C45F /* _WKErrorRecoveryAttempting.mm in Sources */,
373D122218A473010066D9CC /* _WKFrameHandle.mm in Sources */,
A118A9F21908B8EA00F7C92B /* _WKNSFileManagerExtras.mm in Sources */,
+ 2D50365E1BCC793F00E20BB3 /* NativeWebGestureEventMac.mm in Sources */,
1A43E829188F3CDC009E4D30 /* _WKProcessPoolConfiguration.mm in Sources */,
1A9E328E182165A900F5D04C /* _WKRemoteObjectInterface.mm in Sources */,
1A9E328A1821636900F5D04C /* _WKRemoteObjectRegistry.mm in Sources */,
@@ -9410,6 +9425,7 @@
1A30EAC6115D7DA30053E937 /* ConnectionMac.mm in Sources */,
5106D7C218BDBE73000AB166 /* ContextMenuContextData.cpp in Sources */,
CDC3831017212440008A2FC3 /* CookieStorageShim.mm in Sources */,
+ 2D5036751BCED19F00E20BB3 /* WebGestureEvent.cpp in Sources */,
B878B616133428DC006888E9 /* CorrectionPanel.mm in Sources */,
2989A411167D1834004F96D2 /* CustomProtocolManagerCocoa.mm in Sources */,
2984F588164BA095004BC0C6 /* CustomProtocolManagerMessageReceiver.cpp in Sources */,
Modified: branches/safari-601-branch/Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp (194173 => 194174)
--- branches/safari-601-branch/Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp 2015-12-16 22:08:06 UTC (rev 194174)
@@ -163,12 +163,22 @@
UNUSED_PARAM(canRubberBandAtBottom);
#endif
- RefPtr<EventDispatcher> eventDispatcher(this);
+ RefPtr<EventDispatcher> eventDispatcher = this;
RunLoop::main().dispatch([eventDispatcher, pageID, wheelEvent] {
eventDispatcher->dispatchWheelEvent(pageID, wheelEvent);
});
}
+#if ENABLE(MAC_GESTURE_EVENTS)
+void EventDispatcher::gestureEvent(uint64_t pageID, const WebKit::WebGestureEvent& gestureEvent)
+{
+ RefPtr<EventDispatcher> eventDispatcher = this;
+ RunLoop::main().dispatch([eventDispatcher, pageID, gestureEvent] {
+ eventDispatcher->dispatchGestureEvent(pageID, gestureEvent);
+ });
+}
+#endif
+
#if ENABLE(IOS_TOUCH_EVENTS)
void EventDispatcher::clearQueuedTouchEventsForPage(const WebPage& webPage)
{
@@ -206,7 +216,7 @@
}
if (updateListWasEmpty) {
- RefPtr<EventDispatcher> eventDispatcher(this);
+ RefPtr<EventDispatcher> eventDispatcher = this;
RunLoop::main().dispatch([eventDispatcher] {
eventDispatcher->dispatchTouchEvents();
});
@@ -239,6 +249,19 @@
webPage->wheelEvent(wheelEvent);
}
+#if ENABLE(MAC_GESTURE_EVENTS)
+void EventDispatcher::dispatchGestureEvent(uint64_t pageID, const WebGestureEvent& gestureEvent)
+{
+ ASSERT(RunLoop::isMain());
+
+ WebPage* webPage = WebProcess::singleton().webPage(pageID);
+ if (!webPage)
+ return;
+
+ webPage->gestureEvent(gestureEvent);
+}
+#endif
+
#if ENABLE(ASYNC_SCROLLING)
void EventDispatcher::sendDidReceiveEvent(uint64_t pageID, const WebEvent& event, bool didHandleEvent)
{
Modified: branches/safari-601-branch/Source/WebKit2/WebProcess/WebPage/EventDispatcher.h (194173 => 194174)
--- branches/safari-601-branch/Source/WebKit2/WebProcess/WebPage/EventDispatcher.h 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebKit2/WebProcess/WebPage/EventDispatcher.h 2015-12-16 22:08:06 UTC (rev 194174)
@@ -28,8 +28,8 @@
#include "Connection.h"
+#include "WebEvent.h"
#include <WebCore/WheelEventDeltaTracker.h>
-#include <WebEvent.h>
#include <memory>
#include <wtf/HashMap.h>
#include <wtf/Noncopyable.h>
@@ -37,6 +37,10 @@
#include <wtf/SpinLock.h>
#include <wtf/ThreadingPrimitives.h>
+#if ENABLE(MAC_GESTURE_EVENTS)
+#include "WebGestureEvent.h"
+#endif
+
namespace WebCore {
class ThreadedScrollingTree;
}
@@ -77,6 +81,9 @@
#if ENABLE(IOS_TOUCH_EVENTS)
void touchEvent(uint64_t pageID, const WebTouchEvent&);
#endif
+#if ENABLE(MAC_GESTURE_EVENTS)
+ void gestureEvent(uint64_t pageID, const WebGestureEvent&);
+#endif
// This is called on the main thread.
@@ -84,6 +91,9 @@
#if ENABLE(IOS_TOUCH_EVENTS)
void dispatchTouchEvents();
#endif
+#if ENABLE(MAC_GESTURE_EVENTS)
+ void dispatchGestureEvent(uint64_t pageID, const WebGestureEvent&);
+#endif
#if ENABLE(ASYNC_SCROLLING)
void sendDidReceiveEvent(uint64_t pageID, const WebEvent&, bool didHandleEvent);
Modified: branches/safari-601-branch/Source/WebKit2/WebProcess/WebPage/EventDispatcher.messages.in (194173 => 194174)
--- branches/safari-601-branch/Source/WebKit2/WebProcess/WebPage/EventDispatcher.messages.in 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebKit2/WebProcess/WebPage/EventDispatcher.messages.in 2015-12-16 22:08:06 UTC (rev 194174)
@@ -25,4 +25,7 @@
#if ENABLE(IOS_TOUCH_EVENTS)
TouchEvent(uint64_t pageID, WebKit::WebTouchEvent event)
#endif
+#if ENABLE(MAC_GESTURE_EVENTS)
+ GestureEvent(uint64_t pageID, WebKit::WebGestureEvent event)
+#endif
}
Modified: branches/safari-601-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (194173 => 194174)
--- branches/safari-601-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2015-12-16 22:08:06 UTC (rev 194174)
@@ -2230,6 +2230,27 @@
}
#endif
+#if ENABLE(MAC_GESTURE_EVENTS)
+static bool handleGestureEvent(const WebGestureEvent& event, Page* page)
+{
+ if (!page->mainFrame().view())
+ return false;
+
+ return page->mainFrame().eventHandler().handleGestureEvent(platform(event));
+}
+
+void WebPage::gestureEvent(const WebGestureEvent& gestureEvent)
+{
+ bool handled = false;
+ if (canHandleUserEvents()) {
+ CurrentEvent currentEvent(gestureEvent);
+ handled = handleGestureEvent(gestureEvent, m_page.get());
+ }
+ send(Messages::WebPageProxy::DidReceiveEvent(static_cast<uint32_t>(gestureEvent.type()), handled));
+}
+
+#endif
+
bool WebPage::scroll(Page* page, ScrollDirection direction, ScrollGranularity granularity)
{
return page->userInputBridge().scrollRecursively(direction, granularity);
Modified: branches/safari-601-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h (194173 => 194174)
--- branches/safari-601-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h 2015-12-16 21:52:11 UTC (rev 194173)
+++ branches/safari-601-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h 2015-12-16 22:08:06 UTC (rev 194174)
@@ -94,6 +94,10 @@
#include <WebCore/PlatformTouchEvent.h>
#endif
+#if ENABLE(MAC_GESTURE_EVENTS)
+#include <WebKitAdditions/PlatformGestureEventMac.h>
+#endif
+
#if ENABLE(CONTEXT_MENUS)
#include "InjectedBundlePageContextMenuClient.h"
#endif
@@ -160,6 +164,7 @@
class WebInspector;
class WebInspectorClient;
class WebInspectorUI;
+class WebGestureEvent;
class WebKeyboardEvent;
class WebMouseEvent;
class WebNotificationClient;
@@ -787,6 +792,10 @@
void wheelEventHandlersChanged(bool);
void recomputeShortCircuitHorizontalWheelEventsState();
+#if ENABLE(MAC_GESTURE_EVENTS)
+ void gestureEvent(const WebGestureEvent&);
+#endif
+
void updateVisibilityState(bool isInitialState = false);
#if PLATFORM(IOS)