[webkit-changes] [WebKit/WebKit] 24339c: REGRESSION (278484 at main): [ iOS ] editing/selectio...

Wenson Hsieh noreply at github.com
Thu May 16 20:17:20 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 24339c7cdb4184f03fceb677a8807f6f65c754ce
      https://github.com/WebKit/WebKit/commit/24339c7cdb4184f03fceb677a8807f6f65c754ce
  Author: Wenson Hsieh <wenson_hsieh at apple.com>
  Date:   2024-05-16 (Thu, 16 May 2024)

  Changed paths:
    M LayoutTests/editing/selection/ios/persist-selection-after-tapping-on-element-with-mousedown-handler.html
    M LayoutTests/platform/ios/TestExpectations
    M Source/WebKit/UIProcess/API/gtk/PageClientImpl.h
    M Source/WebKit/UIProcess/API/wpe/PageClientImpl.h
    M Source/WebKit/UIProcess/PageClient.h
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/ios/PageClientImplIOS.h
    M Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
    M Source/WebKit/UIProcess/mac/PageClientImplMac.h
    M Source/WebKit/UIProcess/playstation/PageClientImpl.h
    M Source/WebKit/UIProcess/win/PageClientImpl.h

  Log Message:
  -----------
  REGRESSION (278484 at main): [ iOS ] editing/selection/ios/place-selection-in-overflow-area.html is a consistent timeout
https://bugs.webkit.org/show_bug.cgi?id=274180
rdar://128086114

Reviewed by Abrar Protyasha.

After the changes in 278484 at main, this test began to intermittently fail, but only when run after
another layout test that ends with a selection rect over the tap location, `(25, 25)`. This is
because the new logic to clear out the UI-side cached editor state in `278484 at main` leaves the
editor state without post-layout or visual data. This means that the `_lastSelectionDrawingInfo` on
`WKContentView` isn't updated to reflect the fact that there's no more selection after committing
the load.

Subsequently, `-_shouldToggleSelectionCommandsAfterTapAt:` returns `YES` since we (incorrectly)
think the user is still tapping a selection rect, which should toggle the edit menu instead of being
handled as a synthetic click.

To fix this, clear out the stale `_lastSelectionDrawingInfo` (along with `_cachedSelectedTextRange`)
from the previous page upon transitioning to a new page.

* LayoutTests/editing/selection/ios/persist-selection-after-tapping-on-element-with-mousedown-handler.html:

Drive-by fix: remove a redundant call to `testRunner.notifyDone()`. This test currently ends faster
than intended, since it doesn't wait for the keyboard to be dismissed.

* LayoutTests/platform/ios/TestExpectations:

Remove failing test expectations.

* Source/WebKit/UIProcess/API/gtk/PageClientImpl.h:
* Source/WebKit/UIProcess/API/wpe/PageClientImpl.h:
* Source/WebKit/UIProcess/PageClient.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::clearEditorStateAfterPageTransition):

Add a separate client method to call out to `WKContentView` (on iOS) to invalidate selection drawing
info when transitioning to a new page.

* Source/WebKit/UIProcess/ios/PageClientImplIOS.h:
* Source/WebKit/UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didClearEditorStateAfterPageTransition):
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.h:
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _didClearEditorStateAfterPageTransition]):
* Source/WebKit/UIProcess/mac/PageClientImplMac.h:
* Source/WebKit/UIProcess/playstation/PageClientImpl.h:
* Source/WebKit/UIProcess/win/PageClientImpl.h:

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list