Title: [276522] trunk/Source/WebKit
Revision
276522
Author
[email protected]
Date
2021-04-23 15:04:56 -0700 (Fri, 23 Apr 2021)

Log Message

REGRESSION (r273154): fast/forms/ios/repeatedly-focus-offscreen-select.html is consistently failing
https://bugs.webkit.org/show_bug.cgi?id=224985
<rdar://problem/77042177>

Reviewed by Wenson Hsieh.

The test is failing after r273154, which made <select> elements present
a UIMenu rather than a popover. The old logic ensured popovers were not
presented when the <select> element was offscreen (see r265117 for more
information on why that behavior was necessary), but the new
presentation omitted that logic.

To achieve the correct behavior, and fix the failing test, <select>
menus should not be presented when the element is offscreen.

* UIProcess/ios/forms/WKFormSelectPicker.mm:
(-[WKSelectPicker controlBeginEditing]):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (276521 => 276522)


--- trunk/Source/WebKit/ChangeLog	2021-04-23 22:00:12 UTC (rev 276521)
+++ trunk/Source/WebKit/ChangeLog	2021-04-23 22:04:56 UTC (rev 276522)
@@ -1,3 +1,23 @@
+2021-04-23  Aditya Keerthi  <[email protected]>
+
+        REGRESSION (r273154): fast/forms/ios/repeatedly-focus-offscreen-select.html is consistently failing
+        https://bugs.webkit.org/show_bug.cgi?id=224985
+        <rdar://problem/77042177>
+
+        Reviewed by Wenson Hsieh.
+
+        The test is failing after r273154, which made <select> elements present
+        a UIMenu rather than a popover. The old logic ensured popovers were not
+        presented when the <select> element was offscreen (see r265117 for more
+        information on why that behavior was necessary), but the new
+        presentation omitted that logic.
+
+        To achieve the correct behavior, and fix the failing test, <select>
+        menus should not be presented when the element is offscreen.
+
+        * UIProcess/ios/forms/WKFormSelectPicker.mm:
+        (-[WKSelectPicker controlBeginEditing]):
+
 2021-04-23  Commit Queue  <[email protected]>
 
         Unreviewed, reverting r276451.

Modified: trunk/Source/WebKit/UIProcess/ios/forms/WKFormSelectPicker.mm (276521 => 276522)


--- trunk/Source/WebKit/UIProcess/ios/forms/WKFormSelectPicker.mm	2021-04-23 22:00:12 UTC (rev 276521)
+++ trunk/Source/WebKit/UIProcess/ios/forms/WKFormSelectPicker.mm	2021-04-23 22:04:56 UTC (rev 276522)
@@ -501,6 +501,10 @@
 
 - (void)controlBeginEditing
 {
+    // Don't show the menu if the element is entirely offscreen.
+    if (!CGRectIntersectsRect(_view.focusedElementInformation.interactionRect, _view.bounds))
+        return;
+
     [_view startRelinquishingFirstResponderToFocusedElement];
 
 #if USE(UICONTEXTMENU)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to