<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[185679] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/185679">185679</a></dd>
<dt>Author</dt> <dd>timothy_horton@apple.com</dd>
<dt>Date</dt> <dd>2015-06-17 17:03:42 -0700 (Wed, 17 Jun 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Swipe gesture can get stuck, preventing scrolling and other gestures
https://bugs.webkit.org/show_bug.cgi?id=146088
&lt;rdar://problem/16056087&gt;

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.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacViewGestureControllerMacmm">trunk/Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformspimacNSEventSPIh">trunk/Source/WebCore/platform/spi/mac/NSEventSPI.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (185678 => 185679)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2015-06-17  Tim Horton  &lt;timothy_horton@apple.com&gt;
+
+        Swipe gesture can get stuck, preventing scrolling and other gestures
+        https://bugs.webkit.org/show_bug.cgi?id=146088
+        &lt;rdar://problem/16056087&gt;
+
+        Reviewed by Darin Adler.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/spi/mac/NSEventSPI.h: Added.
+        Add an SPI header.
+
</ins><span class="cx"> 2015-06-16  Matt Rajca  &lt;mrajca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         MediaSession: handle MediaEventTrackNext and MediaEventTrackPrevious events
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (185678 => 185679)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1145,6 +1145,7 @@
</span><span class="cx">                 2D9A247515B9C2E300D34527 /* DOMDOMSecurityPolicyInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D9A247115B9C29500D34527 /* DOMDOMSecurityPolicyInternal.h */; };
</span><span class="cx">                 2D9A247615B9C2F400D34527 /* DOMDOMSecurityPolicy.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 2D9A247015B9C29500D34527 /* DOMDOMSecurityPolicy.h */; };
</span><span class="cx">                 2D9F0E1314FF1CBF00BA0FF7 /* linearSRGB.icc in Resources */ = {isa = PBXBuildFile; fileRef = 2D9F0E1214FF1CBF00BA0FF7 /* linearSRGB.icc */; };
</span><ins>+                2DB9C4AA1B3231F40070F27F /* NSEventSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DB9C4A91B3231F40070F27F /* NSEventSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 2DCB837919F99BBA00A7FBE4 /* NSSharingServicePickerSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DCB837719F99BBA00A7FBE4 /* NSSharingServicePickerSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 2DCB837A19F99BBA00A7FBE4 /* NSSharingServiceSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DCB837819F99BBA00A7FBE4 /* NSSharingServiceSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 2DDB97F419F9AECA002025D8 /* NSExtensionSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DDB97F319F9AECA002025D8 /* NSExtensionSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -8297,6 +8298,7 @@
</span><span class="cx">                 2D9F0E1214FF1CBF00BA0FF7 /* linearSRGB.icc */ = {isa = PBXFileReference; lastKnownFileType = file; path = linearSRGB.icc; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2DAAE32C19DCAF6000E002D2 /* MockPageOverlayClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MockPageOverlayClient.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2DAAE32D19DCAF6000E002D2 /* MockPageOverlayClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MockPageOverlayClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                2DB9C4A91B3231F40070F27F /* NSEventSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSEventSPI.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 2DCB837719F99BBA00A7FBE4 /* NSSharingServicePickerSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSSharingServicePickerSPI.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2DCB837819F99BBA00A7FBE4 /* NSSharingServiceSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSSharingServiceSPI.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2DDB97F319F9AECA002025D8 /* NSExtensionSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSExtensionSPI.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -17970,6 +17972,7 @@
</span><span class="cx">                                 07F0B97B1AC5DB4600E535D9 /* AVFoundationSPI.h */,
</span><span class="cx">                                 2D59F1BE1A0044C6001F3D29 /* DataDetectorsSPI.h */,
</span><span class="cx">                                 2D413F601A187A3F0041A521 /* LookupSPI.h */,
</span><ins>+                                2DB9C4A91B3231F40070F27F /* NSEventSPI.h */,
</ins><span class="cx">                                 1C6466271A12C3F90094603C /* NSFontSPI.h */,
</span><span class="cx">                                 9321D58F1A3906FA008052BE /* NSImmediateActionGestureRecognizerSPI.h */,
</span><span class="cx">                                 937F4CCD1A2D4B0100BB39F5 /* NSMenuSPI.h */,
</span><span class="lines">@@ -24364,6 +24367,7 @@
</span><span class="cx">                                 85032DE30AA8C9BE007D3B7D /* DOMCSSRuleList.h in Headers */,
</span><span class="cx">                                 85E711920AC5D5350053270F /* DOMCSSRuleListInternal.h in Headers */,
</span><span class="cx">                                 85032DE50AA8C9BE007D3B7D /* DOMCSSStyleDeclaration.h in Headers */,
</span><ins>+                                2DB9C4AA1B3231F40070F27F /* NSEventSPI.h in Headers */,
</ins><span class="cx">                                 85E711930AC5D5350053270F /* DOMCSSStyleDeclarationInternal.h in Headers */,
</span><span class="cx">                                 85032DE70AA8C9BE007D3B7D /* DOMCSSStyleRule.h in Headers */,
</span><span class="cx">                                 85909CE20ACC7A7E00DF01F1 /* DOMCSSStyleRuleInternal.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformspimacNSEventSPIh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/spi/mac/NSEventSPI.h (0 => 185679)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+/*
+ * 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 &lt;AppKit/NSEvent_Private.h&gt;
+
+#else
+
+enum {
+    NSEventSwipeTrackingConsumeMouseEvents = 0x1 &lt;&lt; 2
+};
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (185678 => 185679)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2015-06-17  Tim Horton  &lt;timothy_horton@apple.com&gt;
+
+        Swipe gesture can get stuck, preventing scrolling and other gestures
+        https://bugs.webkit.org/show_bug.cgi?id=146088
+        &lt;rdar://problem/16056087&gt;
+
+        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.
+
</ins><span class="cx"> 2015-06-17  Sungmann Cho  &lt;sungmann.cho@navercorp.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove willSendEventToPlugin() from PluginController.h.
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacViewGestureControllerMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm (185678 => 185679)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -41,6 +41,7 @@
</span><span class="cx"> #import &quot;WebProcessProxy.h&quot;
</span><span class="cx"> #import &lt;Cocoa/Cocoa.h&gt;
</span><span class="cx"> #import &lt;WebCore/IOSurface.h&gt;
</span><ins>+#import &lt;WebCore/NSEventSPI.h&gt;
</ins><span class="cx"> #import &lt;WebCore/QuartzCoreSPI.h&gt;
</span><span class="cx"> #import &lt;WebCore/WebActionDisablingCALayerDelegate.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -407,7 +408,7 @@
</span><span class="cx">     RetainPtr&lt;WKSwipeCancellationTracker&gt; swipeCancellationTracker = adoptNS([[WKSwipeCancellationTracker alloc] init]);
</span><span class="cx">     m_swipeCancellationTracker = swipeCancellationTracker;
</span><span class="cx"> 
</span><del>-    [event trackSwipeEventWithOptions:0 dampenAmountThresholdMin:minProgress max:maxProgress usingHandler:^(CGFloat progress, NSEventPhase phase, BOOL isComplete, BOOL *stop) {
</del><ins>+    [event trackSwipeEventWithOptions:NSEventSwipeTrackingConsumeMouseEvents dampenAmountThresholdMin:minProgress max:maxProgress usingHandler:^(CGFloat progress, NSEventPhase phase, BOOL isComplete, BOOL *stop) {
</ins><span class="cx">         if ([swipeCancellationTracker isCancelled]) {
</span><span class="cx">             *stop = YES;
</span><span class="cx">             return;
</span></span></pre>
</div>
</div>

</body>
</html>