⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 276522 in webkit


Ignore:
Timestamp:
Apr 23, 2021, 3:04:56 PM (5 years ago)
Author:
Aditya Keerthi
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]):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r276519 r276522  
     12021-04-23  Aditya Keerthi  <akeerthi@apple.com>
     2
     3        REGRESSION (r273154): fast/forms/ios/repeatedly-focus-offscreen-select.html is consistently failing
     4        https://bugs.webkit.org/show_bug.cgi?id=224985
     5        <rdar://problem/77042177>
     6
     7        Reviewed by Wenson Hsieh.
     8
     9        The test is failing after r273154, which made <select> elements present
     10        a UIMenu rather than a popover. The old logic ensured popovers were not
     11        presented when the <select> element was offscreen (see r265117 for more
     12        information on why that behavior was necessary), but the new
     13        presentation omitted that logic.
     14
     15        To achieve the correct behavior, and fix the failing test, <select>
     16        menus should not be presented when the element is offscreen.
     17
     18        * UIProcess/ios/forms/WKFormSelectPicker.mm:
     19        (-[WKSelectPicker controlBeginEditing]):
     20
    1212021-04-23  Commit Queue  <commit-queue@webkit.org>
    222
  • trunk/Source/WebKit/UIProcess/ios/forms/WKFormSelectPicker.mm

    r276392 r276522  
    502502- (void)controlBeginEditing
    503503{
     504    // Don't show the menu if the element is entirely offscreen.
     505    if (!CGRectIntersectsRect(_view.focusedElementInformation.interactionRect, _view.bounds))
     506        return;
     507
    504508    [_view startRelinquishingFirstResponderToFocusedElement];
    505509
Note: See TracChangeset for help on using the changeset viewer.