Title: [250363] branches/safari-608-branch/Source
- Revision
- 250363
- Author
- [email protected]
- Date
- 2019-09-25 15:53:23 -0700 (Wed, 25 Sep 2019)
Log Message
Cherry-pick r249933. rdar://problem/55461414
REGRESSION: iPad: Safari becomes unresponsive after context menu on 1-800-MY-APPLE phone number, tapping 'Add to Contacts'
https://bugs.webkit.org/show_bug.cgi?id=201816
<rdar://55105827>
Reviewed by Darin Adler.
Source/WebCore/PAL:
Expose kDataDetectorsSourceRectKey (and sort things while there).
* pal/spi/ios/DataDetectorsUISPI.h:
Source/WebKit:
When generating the DataDetectorsContext for a position, we should
also provide the source rectangle for the link in root view coordinates.
This allows DataDetectors to show any modal dialogs in the right
position.
* UIProcess/ios/WKContentViewInteraction.mm: Use either the bounds of the positionInformation
or the text bounding rectangle.
(-[WKContentView dataDetectionContextForPositionInformation:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249933 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-608-branch/Source/WebCore/PAL/ChangeLog (250362 => 250363)
--- branches/safari-608-branch/Source/WebCore/PAL/ChangeLog 2019-09-25 22:46:03 UTC (rev 250362)
+++ branches/safari-608-branch/Source/WebCore/PAL/ChangeLog 2019-09-25 22:53:23 UTC (rev 250363)
@@ -1,3 +1,44 @@
+2019-09-25 Alan Coon <[email protected]>
+
+ Cherry-pick r249933. rdar://problem/55461414
+
+ REGRESSION: iPad: Safari becomes unresponsive after context menu on 1-800-MY-APPLE phone number, tapping 'Add to Contacts'
+ https://bugs.webkit.org/show_bug.cgi?id=201816
+ <rdar://55105827>
+
+ Reviewed by Darin Adler.
+
+ Source/WebCore/PAL:
+
+ Expose kDataDetectorsSourceRectKey (and sort things while there).
+
+ * pal/spi/ios/DataDetectorsUISPI.h:
+
+ Source/WebKit:
+
+ When generating the DataDetectorsContext for a position, we should
+ also provide the source rectangle for the link in root view coordinates.
+ This allows DataDetectors to show any modal dialogs in the right
+ position.
+
+ * UIProcess/ios/WKContentViewInteraction.mm: Use either the bounds of the positionInformation
+ or the text bounding rectangle.
+ (-[WKContentView dataDetectionContextForPositionInformation:]):
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249933 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-09-16 Dean Jackson <[email protected]>
+
+ REGRESSION: iPad: Safari becomes unresponsive after context menu on 1-800-MY-APPLE phone number, tapping 'Add to Contacts'
+ https://bugs.webkit.org/show_bug.cgi?id=201816
+ <rdar://55105827>
+
+ Reviewed by Darin Adler.
+
+ Expose kDataDetectorsSourceRectKey (and sort things while there).
+
+ * pal/spi/ios/DataDetectorsUISPI.h:
+
2019-09-23 Alan Coon <[email protected]>
Apply patch. rdar://problem/55608028
Modified: branches/safari-608-branch/Source/WebCore/PAL/pal/spi/ios/DataDetectorsUISPI.h (250362 => 250363)
--- branches/safari-608-branch/Source/WebCore/PAL/pal/spi/ios/DataDetectorsUISPI.h 2019-09-25 22:46:03 UTC (rev 250362)
+++ branches/safari-608-branch/Source/WebCore/PAL/pal/spi/ios/DataDetectorsUISPI.h 2019-09-25 22:53:23 UTC (rev 250363)
@@ -87,7 +87,8 @@
#endif
SOFT_LINK_CLASS(DataDetectorsUI, DDDetectionController)
SOFT_LINK_CONSTANT(DataDetectorsUI, kDataDetectorsLeadingText, const NSString *)
+SOFT_LINK_CONSTANT(DataDetectorsUI, kDataDetectorsReferenceDateKey, const NSString *)
+SOFT_LINK_CONSTANT(DataDetectorsUI, kDataDetectorsSourceRectKey, const NSString *)
SOFT_LINK_CONSTANT(DataDetectorsUI, kDataDetectorsTrailingText, const NSString *)
-SOFT_LINK_CONSTANT(DataDetectorsUI, kDataDetectorsReferenceDateKey, const NSString *)
#endif
Modified: branches/safari-608-branch/Source/WebKit/ChangeLog (250362 => 250363)
--- branches/safari-608-branch/Source/WebKit/ChangeLog 2019-09-25 22:46:03 UTC (rev 250362)
+++ branches/safari-608-branch/Source/WebKit/ChangeLog 2019-09-25 22:53:23 UTC (rev 250363)
@@ -1,3 +1,49 @@
+2019-09-25 Alan Coon <[email protected]>
+
+ Cherry-pick r249933. rdar://problem/55461414
+
+ REGRESSION: iPad: Safari becomes unresponsive after context menu on 1-800-MY-APPLE phone number, tapping 'Add to Contacts'
+ https://bugs.webkit.org/show_bug.cgi?id=201816
+ <rdar://55105827>
+
+ Reviewed by Darin Adler.
+
+ Source/WebCore/PAL:
+
+ Expose kDataDetectorsSourceRectKey (and sort things while there).
+
+ * pal/spi/ios/DataDetectorsUISPI.h:
+
+ Source/WebKit:
+
+ When generating the DataDetectorsContext for a position, we should
+ also provide the source rectangle for the link in root view coordinates.
+ This allows DataDetectors to show any modal dialogs in the right
+ position.
+
+ * UIProcess/ios/WKContentViewInteraction.mm: Use either the bounds of the positionInformation
+ or the text bounding rectangle.
+ (-[WKContentView dataDetectionContextForPositionInformation:]):
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249933 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-09-16 Dean Jackson <[email protected]>
+
+ REGRESSION: iPad: Safari becomes unresponsive after context menu on 1-800-MY-APPLE phone number, tapping 'Add to Contacts'
+ https://bugs.webkit.org/show_bug.cgi?id=201816
+ <rdar://55105827>
+
+ Reviewed by Darin Adler.
+
+ When generating the DataDetectorsContext for a position, we should
+ also provide the source rectangle for the link in root view coordinates.
+ This allows DataDetectors to show any modal dialogs in the right
+ position.
+
+ * UIProcess/ios/WKContentViewInteraction.mm: Use either the bounds of the positionInformation
+ or the text bounding rectangle.
+ (-[WKContentView dataDetectionContextForPositionInformation:]):
+
2019-09-24 Kocsen Chung <[email protected]>
Cherry-pick r250256. rdar://problem/55644660
Modified: branches/safari-608-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (250362 => 250363)
--- branches/safari-608-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2019-09-25 22:46:03 UTC (rev 250362)
+++ branches/safari-608-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2019-09-25 22:53:23 UTC (rev 250363)
@@ -6468,6 +6468,15 @@
context.get()[getkDataDetectorsLeadingText()] = positionInformation.textBefore;
if (!positionInformation.textAfter.isEmpty())
context.get()[getkDataDetectorsTrailingText()] = positionInformation.textAfter;
+
+ CGRect sourceRect;
+ if (positionInformation.isLink)
+ sourceRect = positionInformation.linkIndicator.textBoundingRectInRootViewCoordinates;
+ else
+ sourceRect = positionInformation.bounds;
+
+ CGRect frameInContainerViewCoordinates = [self convertRect:sourceRect toView:self.containerViewForTargetedPreviews];
+ context.get()[getkDataDetectorsSourceRectKey()] = [NSValue valueWithCGRect:frameInContainerViewCoordinates];
#endif
return context.autorelease();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes