Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 91f212cfd96fd4495bce653e047f8102d0132513
      
https://github.com/WebKit/WebKit/commit/91f212cfd96fd4495bce653e047f8102d0132513
  Author: Wenson Hsieh <[email protected]>
  Date:   2023-05-09 (Tue, 09 May 2023)

  Changed paths:
    M Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm

  Log Message:
  -----------
  editing/selection/ios/hide-selection-in-hidden-contenteditable.html fails 
with a text diff
https://bugs.webkit.org/show_bug.cgi?id=256564
rdar://107724393

Reviewed by Aditya Keerthi.

This test fails when `HAVE(UI_TEXT_SELECTION_DISPLAY_INTERACTION)` is defined; 
this is because, in
the case where a text selection has been previously shown in the same web view 
(i.e. using the same
text selection display interaction), the `UIView`s representing the selection 
handles will be non-
hidden and also have a non-zero frame. However, they'll still be visually 
hidden, because their
parent `UIView` that contains both selection lollipop views will be marked 
`hidden`.

When run after another test that selects text (and therefore assigns a non-zero 
frame to the
selection handles), `hide-selection-in-hidden-contenteditable.html` fails when 
trying to verify that
selection handles are hidden.

To fix this, adjust our test runner logic for getting the current selection 
handle rects (and other
selection UI too) by walking the view hierarchy in search for _any_ hidden 
ancestor, instead of only
checking whether the view itself is hidden.

* Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::isHiddenOrHasHiddenAncestor):
(WTR::UIScriptControllerIOS::selectionStartGrabberViewRect const):
(WTR::UIScriptControllerIOS::selectionEndGrabberViewRect const):

Also address a couple of FIXMEs, now that the fix for the blocking radar — 
rdar://108607881 — is
deployed on the relevant iOS test runners.

(WTR::UIScriptControllerIOS::selectionCaretViewRect const):
(WTR::UIScriptControllerIOS::selectionRangeViewRects const):
(WTR::UIScriptControllerIOS::selectionCaretBackgroundColor const):

Canonical link: https://commits.webkit.org/263891@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to