Title: [219775] branches/safari-604-branch/Source/WebKitLegacy/mac
- Revision
- 219775
- Author
- [email protected]
- Date
- 2017-07-22 23:50:58 -0700 (Sat, 22 Jul 2017)
Log Message
Cherry-pick r219626. rdar://problem/33465685
Modified Paths
Diff
Modified: branches/safari-604-branch/Source/WebKitLegacy/mac/ChangeLog (219774 => 219775)
--- branches/safari-604-branch/Source/WebKitLegacy/mac/ChangeLog 2017-07-23 06:50:56 UTC (rev 219774)
+++ branches/safari-604-branch/Source/WebKitLegacy/mac/ChangeLog 2017-07-23 06:50:58 UTC (rev 219775)
@@ -1,3 +1,27 @@
+2017-07-22 Jason Marcell <[email protected]>
+
+ Cherry-pick r219626. rdar://problem/33465685
+
+ 2017-07-18 Wenson Hsieh <[email protected]>
+
+ [iOS DnD] [WK1] Add missing calls to WebThreadLock() in some WebView drag-and-drop SPIs
+ https://bugs.webkit.org/show_bug.cgi?id=174640
+ <rdar://problem/33297400>
+
+ Reviewed by Tim Horton.
+
+ Adds a missing call to WebThreadLock() in -_requestStartDataInteraction:globalPosition:. Previously, this was
+ invoked at the call site in UIKit, but was removed after some refactoring in UIKit. Instead, we should lock the
+ web thread here, to match the other WebView drag and drop SPI methods.
+
+ This patch also adds a WebThreadLock() call in -_dataInteractionCaretRect. While this is fine today, since all
+ existing callers of _dataInteractionCaretRect already invoke other methods that WebThreadLock() beforehand, we
+ should make this robust against future UIKit changes that could make this no longer the case.
+
+ * WebView/WebView.mm:
+ (-[WebView _requestStartDataInteraction:globalPosition:]):
+ (-[WebView _dataInteractionCaretRect]):
+
2017-07-17 Jason Marcell <[email protected]>
Cherry-pick r219413. rdar://problem/33337335
Modified: branches/safari-604-branch/Source/WebKitLegacy/mac/WebView/WebView.mm (219774 => 219775)
--- branches/safari-604-branch/Source/WebKitLegacy/mac/WebView/WebView.mm 2017-07-23 06:50:56 UTC (rev 219774)
+++ branches/safari-604-branch/Source/WebKitLegacy/mac/WebView/WebView.mm 2017-07-23 06:50:58 UTC (rev 219775)
@@ -1794,6 +1794,7 @@
- (BOOL)_requestStartDataInteraction:(CGPoint)clientPosition globalPosition:(CGPoint)globalPosition
{
+ WebThreadLock();
return _private->page->mainFrame().eventHandler().tryToBeginDataInteractionAtPoint(IntPoint(clientPosition), IntPoint(globalPosition));
}
@@ -1815,6 +1816,7 @@
- (CGRect)_dataInteractionCaretRect
{
+ WebThreadLock();
if (auto* page = _private->page)
return page->dragCaretController().caretRectInRootViewCoordinates();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes