Title: [256547] branches/safari-609.1.17.0-branch/Source/WebKit
- Revision
- 256547
- Author
- [email protected]
- Date
- 2020-02-13 14:52:29 -0800 (Thu, 13 Feb 2020)
Log Message
Cherry-pick r255691. rdar://problem/59299315
[macCatalyst] Missing custom cursors in subframes that are offset from the origin of the root view
https://bugs.webkit.org/show_bug.cgi?id=207215
<rdar://problem/59157625>
Reviewed by Tim Horton.
<https://trac.webkit.org/r255046> added support for custom cursor styles when hovering over subframes. However,
we currently try to hit-test content in the subframe using the interaction information request's point, which is
in root view coordinates; as such, we only get the correct custom cursor styles when hovering over elements in a
subframe, if the subframe is also at the origin of the root view.
To fix this, simply convert from root view coordinates to frame coordinates when performing the hit-test.
Unfortunately, this change is currently untestable; see <rdar://problem/59158410>.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::lineCaretExtent):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255691 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-609.1.17.0-branch/Source/WebKit/ChangeLog (256546 => 256547)
--- branches/safari-609.1.17.0-branch/Source/WebKit/ChangeLog 2020-02-13 22:52:27 UTC (rev 256546)
+++ branches/safari-609.1.17.0-branch/Source/WebKit/ChangeLog 2020-02-13 22:52:29 UTC (rev 256547)
@@ -1,5 +1,48 @@
2020-02-13 Russell Epstein <[email protected]>
+ Cherry-pick r255691. rdar://problem/59299315
+
+ [macCatalyst] Missing custom cursors in subframes that are offset from the origin of the root view
+ https://bugs.webkit.org/show_bug.cgi?id=207215
+ <rdar://problem/59157625>
+
+ Reviewed by Tim Horton.
+
+ <https://trac.webkit.org/r255046> added support for custom cursor styles when hovering over subframes. However,
+ we currently try to hit-test content in the subframe using the interaction information request's point, which is
+ in root view coordinates; as such, we only get the correct custom cursor styles when hovering over elements in a
+ subframe, if the subframe is also at the origin of the root view.
+
+ To fix this, simply convert from root view coordinates to frame coordinates when performing the hit-test.
+ Unfortunately, this change is currently untestable; see <rdar://problem/59158410>.
+
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::lineCaretExtent):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255691 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-02-04 Wenson Hsieh <[email protected]>
+
+ [macCatalyst] Missing custom cursors in subframes that are offset from the origin of the root view
+ https://bugs.webkit.org/show_bug.cgi?id=207215
+ <rdar://problem/59157625>
+
+ Reviewed by Tim Horton.
+
+ <https://trac.webkit.org/r255046> added support for custom cursor styles when hovering over subframes. However,
+ we currently try to hit-test content in the subframe using the interaction information request's point, which is
+ in root view coordinates; as such, we only get the correct custom cursor styles when hovering over elements in a
+ subframe, if the subframe is also at the origin of the root view.
+
+ To fix this, simply convert from root view coordinates to frame coordinates when performing the hit-test.
+ Unfortunately, this change is currently untestable; see <rdar://problem/59158410>.
+
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::lineCaretExtent):
+
+2020-02-13 Russell Epstein <[email protected]>
+
Cherry-pick r255664. rdar://problem/59299338
Add a WebKitAdditions hook to provide additional customizations to UIDragInteraction
Modified: branches/safari-609.1.17.0-branch/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (256546 => 256547)
--- branches/safari-609.1.17.0-branch/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2020-02-13 22:52:27 UTC (rev 256546)
+++ branches/safari-609.1.17.0-branch/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2020-02-13 22:52:29 UTC (rev 256547)
@@ -2762,10 +2762,14 @@
static FloatRect lineCaretExtent(const InteractionInformationRequest& request, const HitTestResult& hitTestResult)
{
- auto* frame = hitTestResult.innerNodeFrame();
+ auto frame = makeRefPtr(hitTestResult.innerNodeFrame());
if (!frame)
return { };
+ auto view = makeRefPtr(frame->view());
+ if (!view)
+ return { };
+
auto* renderer = hitTestResult.innerNode()->renderer();
if (!renderer)
return { };
@@ -2779,7 +2783,7 @@
// FIXME: We should be able to retrieve this geometry information without
// forcing the text to fall out of Simple Line Layout.
auto& blockFlow = downcast<RenderBlockFlow>(*renderer);
- VisiblePosition position = frame->visiblePositionForPoint(request.point);
+ auto position = frame->visiblePositionForPoint(view->rootViewToContents(request.point));
auto lineRect = position.absoluteSelectionBoundsForLine();
lineRect.setWidth(blockFlow.contentWidth());
return lineRect;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes