- Revision
- 185679
- Author
- [email protected]
- Date
- 2015-06-17 17:03:42 -0700 (Wed, 17 Jun 2015)
Log Message
Swipe gesture can get stuck, preventing scrolling and other gestures
https://bugs.webkit.org/show_bug.cgi?id=146088
<rdar://problem/16056087>
Reviewed by Darin Adler.
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::trackSwipeGesture):
Ignore mouse events that come in while we're doing a swipe.
This prevents potentially problematic mouse events (especially context menus)
won't be processed during a swipe, avoiding situations that can cause
the swipe gesture to get stuck.
* WebCore.xcodeproj/project.pbxproj:
* platform/spi/mac/NSEventSPI.h: Added.
Add an SPI header.
Modified Paths
Added Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (185678 => 185679)
--- trunk/Source/WebCore/ChangeLog 2015-06-18 00:01:10 UTC (rev 185678)
+++ trunk/Source/WebCore/ChangeLog 2015-06-18 00:03:42 UTC (rev 185679)
@@ -1,3 +1,15 @@
+2015-06-17 Tim Horton <[email protected]>
+
+ Swipe gesture can get stuck, preventing scrolling and other gestures
+ https://bugs.webkit.org/show_bug.cgi?id=146088
+ <rdar://problem/16056087>
+
+ Reviewed by Darin Adler.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * platform/spi/mac/NSEventSPI.h: Added.
+ Add an SPI header.
+
2015-06-16 Matt Rajca <[email protected]>
MediaSession: handle MediaEventTrackNext and MediaEventTrackPrevious events
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (185678 => 185679)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2015-06-18 00:01:10 UTC (rev 185678)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2015-06-18 00:03:42 UTC (rev 185679)
@@ -1145,6 +1145,7 @@
2D9A247515B9C2E300D34527 /* DOMDOMSecurityPolicyInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D9A247115B9C29500D34527 /* DOMDOMSecurityPolicyInternal.h */; };
2D9A247615B9C2F400D34527 /* DOMDOMSecurityPolicy.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 2D9A247015B9C29500D34527 /* DOMDOMSecurityPolicy.h */; };
2D9F0E1314FF1CBF00BA0FF7 /* linearSRGB.icc in Resources */ = {isa = PBXBuildFile; fileRef = 2D9F0E1214FF1CBF00BA0FF7 /* linearSRGB.icc */; };
+ 2DB9C4AA1B3231F40070F27F /* NSEventSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DB9C4A91B3231F40070F27F /* NSEventSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
2DCB837919F99BBA00A7FBE4 /* NSSharingServicePickerSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DCB837719F99BBA00A7FBE4 /* NSSharingServicePickerSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
2DCB837A19F99BBA00A7FBE4 /* NSSharingServiceSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DCB837819F99BBA00A7FBE4 /* NSSharingServiceSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
2DDB97F419F9AECA002025D8 /* NSExtensionSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DDB97F319F9AECA002025D8 /* NSExtensionSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -8297,6 +8298,7 @@
2D9F0E1214FF1CBF00BA0FF7 /* linearSRGB.icc */ = {isa = PBXFileReference; lastKnownFileType = file; path = linearSRGB.icc; sourceTree = "<group>"; };
2DAAE32C19DCAF6000E002D2 /* MockPageOverlayClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MockPageOverlayClient.cpp; sourceTree = "<group>"; };
2DAAE32D19DCAF6000E002D2 /* MockPageOverlayClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MockPageOverlayClient.h; sourceTree = "<group>"; };
+ 2DB9C4A91B3231F40070F27F /* NSEventSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSEventSPI.h; sourceTree = "<group>"; };
2DCB837719F99BBA00A7FBE4 /* NSSharingServicePickerSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSSharingServicePickerSPI.h; sourceTree = "<group>"; };
2DCB837819F99BBA00A7FBE4 /* NSSharingServiceSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSSharingServiceSPI.h; sourceTree = "<group>"; };
2DDB97F319F9AECA002025D8 /* NSExtensionSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSExtensionSPI.h; sourceTree = "<group>"; };
@@ -17970,6 +17972,7 @@
07F0B97B1AC5DB4600E535D9 /* AVFoundationSPI.h */,
2D59F1BE1A0044C6001F3D29 /* DataDetectorsSPI.h */,
2D413F601A187A3F0041A521 /* LookupSPI.h */,
+ 2DB9C4A91B3231F40070F27F /* NSEventSPI.h */,
1C6466271A12C3F90094603C /* NSFontSPI.h */,
9321D58F1A3906FA008052BE /* NSImmediateActionGestureRecognizerSPI.h */,
937F4CCD1A2D4B0100BB39F5 /* NSMenuSPI.h */,
@@ -24364,6 +24367,7 @@
85032DE30AA8C9BE007D3B7D /* DOMCSSRuleList.h in Headers */,
85E711920AC5D5350053270F /* DOMCSSRuleListInternal.h in Headers */,
85032DE50AA8C9BE007D3B7D /* DOMCSSStyleDeclaration.h in Headers */,
+ 2DB9C4AA1B3231F40070F27F /* NSEventSPI.h in Headers */,
85E711930AC5D5350053270F /* DOMCSSStyleDeclarationInternal.h in Headers */,
85032DE70AA8C9BE007D3B7D /* DOMCSSStyleRule.h in Headers */,
85909CE20ACC7A7E00DF01F1 /* DOMCSSStyleRuleInternal.h in Headers */,
Added: trunk/Source/WebCore/platform/spi/mac/NSEventSPI.h (0 => 185679)
--- trunk/Source/WebCore/platform/spi/mac/NSEventSPI.h (rev 0)
+++ trunk/Source/WebCore/platform/spi/mac/NSEventSPI.h 2015-06-18 00:03:42 UTC (rev 185679)
@@ -0,0 +1,36 @@
+/*
+ * 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. ``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
+ * 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.
+ */
+
+#if USE(APPLE_INTERNAL_SDK)
+
+#import <AppKit/NSEvent_Private.h>
+
+#else
+
+enum {
+ NSEventSwipeTrackingConsumeMouseEvents = 0x1 << 2
+};
+
+#endif
Modified: trunk/Source/WebKit2/ChangeLog (185678 => 185679)
--- trunk/Source/WebKit2/ChangeLog 2015-06-18 00:01:10 UTC (rev 185678)
+++ trunk/Source/WebKit2/ChangeLog 2015-06-18 00:03:42 UTC (rev 185679)
@@ -1,3 +1,18 @@
+2015-06-17 Tim Horton <[email protected]>
+
+ Swipe gesture can get stuck, preventing scrolling and other gestures
+ https://bugs.webkit.org/show_bug.cgi?id=146088
+ <rdar://problem/16056087>
+
+ Reviewed by Darin Adler.
+
+ * UIProcess/mac/ViewGestureControllerMac.mm:
+ (WebKit::ViewGestureController::trackSwipeGesture):
+ Ignore mouse events that come in while we're doing a swipe.
+ This prevents potentially problematic mouse events (especially context menus)
+ won't be processed during a swipe, avoiding situations that can cause
+ the swipe gesture to get stuck.
+
2015-06-17 Sungmann Cho <[email protected]>
Remove willSendEventToPlugin() from PluginController.h.
Modified: trunk/Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm (185678 => 185679)
--- trunk/Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm 2015-06-18 00:01:10 UTC (rev 185678)
+++ trunk/Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm 2015-06-18 00:03:42 UTC (rev 185679)
@@ -41,6 +41,7 @@
#import "WebProcessProxy.h"
#import <Cocoa/Cocoa.h>
#import <WebCore/IOSurface.h>
+#import <WebCore/NSEventSPI.h>
#import <WebCore/QuartzCoreSPI.h>
#import <WebCore/WebActionDisablingCALayerDelegate.h>
@@ -407,7 +408,7 @@
RetainPtr<WKSwipeCancellationTracker> swipeCancellationTracker = adoptNS([[WKSwipeCancellationTracker alloc] init]);
m_swipeCancellationTracker = swipeCancellationTracker;
- [event trackSwipeEventWithOptions:0 dampenAmountThresholdMin:minProgress max:maxProgress usingHandler:^(CGFloat progress, NSEventPhase phase, BOOL isComplete, BOOL *stop) {
+ [event trackSwipeEventWithOptions:NSEventSwipeTrackingConsumeMouseEvents dampenAmountThresholdMin:minProgress max:maxProgress usingHandler:^(CGFloat progress, NSEventPhase phase, BOOL isComplete, BOOL *stop) {
if ([swipeCancellationTracker isCancelled]) {
*stop = YES;
return;