[webkit-changes] [WebKit/WebKit] 868193: [iOS] Several editing-related layout tests are fla...

Wenson Hsieh noreply at github.com
Mon Jul 1 18:39:56 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 868193b30419dc7d9692914ca3f8f30a7f66d16e
      https://github.com/WebKit/WebKit/commit/868193b30419dc7d9692914ca3f8f30a7f66d16e
  Author: Wenson Hsieh <wenson_hsieh at apple.com>
  Date:   2024-07-01 (Mon, 01 Jul 2024)

  Changed paths:
    M LayoutTests/editing/selection/ios/change-selection-by-tapping.html
    M LayoutTests/fast/events/ios/key-command-delete-to-end-of-paragraph.html
    M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

  Log Message:
  -----------
  [iOS] Several editing-related layout tests are flaky on x86_64 simulator
https://bugs.webkit.org/show_bug.cgi?id=276101
rdar://130607129

Reviewed by Megan Gardner.

For reasons that are still unknown, keyboard autocorrection triggers very aggressively on selection
changes when both of the following conditions are true:

1. Running tests in iOS simulator on an Intel (x86_64) host machine.
2. The iOS simulator was newly created (e.g. using `xcrun simctl create`).

This causes the following two tests to fail…

• editing/selection/ios/change-selection-by-tapping.html

    This test fails because `can't` is autocorrected to `can’t` (with an apostrophe instead of a
    straight quote), leading to a text diff.

• editing/selection/ios/show-grammar-replacements-on-tap.html

    This test fails because `thing` is "autocorrected" to `thing` immediately upon tapping to change
    the selection, which triggers an editing command that clears the grammar markers underneath the
    word.

• fast/events/ios/key-command-delete-to-end-of-paragraph.html

    It's actually unclear why this test is failing, due to the fact that I was unable to reproduce
    this at all in any configuration.

Keep these tests passing by making a couple of minor adjustments:

* LayoutTests/editing/selection/ios/change-selection-by-tapping.html:
* LayoutTests/fast/events/ios/key-command-delete-to-end-of-paragraph.html:

Force `spellcheck="false"` here to prevent correction from triggering when simulating selection
changes.

* Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::applyAutocorrectionInternal):

Return early if the original and new strings are identical, to prevent editing commands from
triggering (which blow away the grammar markers in `show-grammar-replacements-on-tap.html`).

Canonical link: https://commits.webkit.org/280560@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