Title: [194187] branches/safari-601-branch/Source/WebKit2
Revision
194187
Author
[email protected]
Date
2015-12-16 16:31:15 -0800 (Wed, 16 Dec 2015)

Log Message

Merged r194186.  rdar://problem/23929902

Modified Paths

Diff

Modified: branches/safari-601-branch/Source/WebKit2/ChangeLog (194186 => 194187)


--- branches/safari-601-branch/Source/WebKit2/ChangeLog	2015-12-17 00:13:27 UTC (rev 194186)
+++ branches/safari-601-branch/Source/WebKit2/ChangeLog	2015-12-17 00:31:15 UTC (rev 194187)
@@ -1,5 +1,23 @@
 2015-12-16  Babak Shafiei  <[email protected]>
 
+        Merge r194186.
+
+    2015-12-16  Tim Horton  <[email protected]>
+
+            REGRESSION (r194125): Crashes in touchesEndedWithEvent on occasion when interacting with the page
+            https://bugs.webkit.org/show_bug.cgi?id=152366
+            <rdar://problem/23929672>
+
+            Reviewed by Beth Dakin.
+
+            * UIProcess/Cocoa/WebViewImpl.mm:
+            (WebKit::WebViewImpl::touchesEndedWithEvent):
+            (WebKit::WebViewImpl::touchesCancelledWithEvent):
+            NSTouch identifiers aren't pointer-comparable. We need to use isEqual to
+            compare them and find the ones to remove.
+
+2015-12-16  Babak Shafiei  <[email protected]>
+
         Merge r194125.
 
     2015-12-15  Tim Horton  <[email protected]>

Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/API/mac/WKView.mm (194186 => 194187)


--- branches/safari-601-branch/Source/WebKit2/UIProcess/API/mac/WKView.mm	2015-12-17 00:13:27 UTC (rev 194186)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/API/mac/WKView.mm	2015-12-17 00:31:15 UTC (rev 194187)
@@ -3292,9 +3292,12 @@
 {
     _data->_lastTouches = [event touchesMatchingPhase:NSTouchPhaseAny inView:self].allObjects;
     for (NSTouch *touch in [event touchesMatchingPhase:NSTouchPhaseEnded inView:self]) {
-        size_t identityIndex = _data->_activeTouchIdentities.find(touch.identity);
-        ASSERT(identityIndex != notFound);
-        _data->_activeTouchIdentities.remove(identityIndex);
+        for (size_t i = 0; i < _data->_activeTouchIdentities.size(); i++) {
+            if ([_data->_activeTouchIdentities[i] isEqual:touch.identity]) {
+                _data->_activeTouchIdentities.remove(i);
+                break;
+            }
+        }
     }
 }
 
@@ -3302,9 +3305,12 @@
 {
     _data->_lastTouches = [event touchesMatchingPhase:NSTouchPhaseAny inView:self].allObjects;
     for (NSTouch *touch in [event touchesMatchingPhase:NSTouchPhaseCancelled inView:self]) {
-        size_t identityIndex = _data->_activeTouchIdentities.find(touch.identity);
-        ASSERT(identityIndex != notFound);
-        _data->_activeTouchIdentities.remove(identityIndex);
+        for (size_t i = 0; i < _data->_activeTouchIdentities.size(); i++) {
+            if ([_data->_activeTouchIdentities[i] isEqual:touch.identity]) {
+                _data->_activeTouchIdentities.remove(i);
+                break;
+            }
+        }
     }
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to