Title: [255114] trunk/Source/WebKit
Revision
255114
Author
timothy_hor...@apple.com
Date
2020-01-24 18:09:50 -0800 (Fri, 24 Jan 2020)

Log Message

macCatalyst: Don't get any custom cursors in subframes
https://bugs.webkit.org/show_bug.cgi?id=206781
<rdar://problem/58698374>

Reviewed by Simon Fraser.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::positionInformation):
Adjust the hit test to allow child frame content, and reorganize the
rest of the code to use the hit frame instead of the main frame.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (255113 => 255114)


--- trunk/Source/WebKit/ChangeLog	2020-01-25 01:37:20 UTC (rev 255113)
+++ trunk/Source/WebKit/ChangeLog	2020-01-25 02:09:50 UTC (rev 255114)
@@ -1,3 +1,16 @@
+2020-01-24  Tim Horton  <timothy_hor...@apple.com>
+
+        macCatalyst: Don't get any custom cursors in subframes
+        https://bugs.webkit.org/show_bug.cgi?id=206781
+        <rdar://problem/58698374>
+
+        Reviewed by Simon Fraser.
+
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::positionInformation):
+        Adjust the hit test to allow child frame content, and reorganize the
+        rest of the code to use the hit frame instead of the main frame.
+
 2020-01-24  Jiewen Tan  <jiewen_...@apple.com>
 
         Unreviewed, a speculative test fix after r255041

Modified: trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (255113 => 255114)


--- trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm	2020-01-25 01:37:20 UTC (rev 255113)
+++ trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm	2020-01-25 02:09:50 UTC (rev 255114)
@@ -2805,10 +2805,12 @@
     info.nodeAtPositionHasDoubleClickHandler = m_page->mainFrame().nodeRespondingToDoubleClickEvent(request.point, adjustedPoint);
 
     auto& eventHandler = m_page->mainFrame().eventHandler();
-    HitTestResult hitTestResult = eventHandler.hitTestResultAtPoint(request.point, HitTestRequest::ReadOnly | HitTestRequest::AllowFrameScrollbars);
-    info.cursor = eventHandler.selectCursor(hitTestResult, false);
-    if (request.includeCaretContext)
-        populateCaretContext(hitTestResult, request, info);
+    HitTestResult hitTestResultForCursor = eventHandler.hitTestResultAtPoint(request.point, HitTestRequest::ReadOnly | HitTestRequest::AllowFrameScrollbars | HitTestRequest::AllowChildFrameContent);
+    if (auto* hitFrame = hitTestResultForCursor.innerNodeFrame()) {
+        info.cursor = hitFrame->eventHandler().selectCursor(hitTestResultForCursor, false);
+        if (request.includeCaretContext)
+            populateCaretContext(hitTestResultForCursor, request, info);
+    }
 
     if (m_focusedElement)
         focusedElementPositionInformation(*this, *m_focusedElement, request, info);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to