Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 24e681d506894448bcc1df9e5c84d8f6487ee845
      
https://github.com/WebKit/WebKit/commit/24e681d506894448bcc1df9e5c84d8f6487ee845
  Author: Megan Gardner <[email protected]>
  Date:   2026-05-06 (Wed, 06 May 2026)

  Changed paths:
    A 
LayoutTests/editing/spelling/grammar-arrow-downstream-into-multiword-phrase-expected.txt
    A 
LayoutTests/editing/spelling/grammar-arrow-downstream-into-multiword-phrase.html
    A 
LayoutTests/editing/spelling/grammar-arrow-upstream-into-multiword-phrase-expected.txt
    A 
LayoutTests/editing/spelling/grammar-arrow-upstream-into-multiword-phrase.html
    A 
LayoutTests/editing/spelling/grammar-correction-shown-clicking-multiword-phrase-expected.txt
    A 
LayoutTests/editing/spelling/grammar-correction-shown-clicking-multiword-phrase.html
    M LayoutTests/platform/gtk/TestExpectations
    M LayoutTests/platform/ios/TestExpectations
    M Source/WebCore/editing/AlternativeTextController.cpp

  Log Message:
  -----------
  Grammar UI does not come up when clicking in a multi-word phrase.
https://bugs.webkit.org/show_bug.cgi?id=313678
rdar://175878797

Reviewed by Abrar Rahman Protyasha.

Grammar suggestions can span multiple words, but the suggestion UI
only appeared when clicking in the last word of the phrase.
This extends the fix from 310941@main to  work for all words
in the phrase by accepting endOfWord positions
that fall strictly inside the grammar marker range, and by
treating movement within the same grammar marker like movement
within the same word. This UI is mac only,
and therefore these tests should not run on iOS.

Test: editing/spelling/grammar-correction-shown-clicking-multiword-phrase.html

* 
LayoutTests/editing/spelling/grammar-arrow-downstream-into-multiword-phrase-expected.txt:
 Added.
* 
LayoutTests/editing/spelling/grammar-arrow-downstream-into-multiword-phrase.html:
 Added.
* 
LayoutTests/editing/spelling/grammar-arrow-upstream-into-multiword-phrase-expected.txt:
 Added.
* 
LayoutTests/editing/spelling/grammar-arrow-upstream-into-multiword-phrase.html: 
Added.
* 
LayoutTests/editing/spelling/grammar-correction-shown-clicking-multiword-phrase-expected.txt:
 Added.
* 
LayoutTests/editing/spelling/grammar-correction-shown-clicking-multiword-phrase.html:
 Added.
* LayoutTests/platform/gtk/TestExpectations:
* LayoutTests/platform/ios/TestExpectations:
* Source/WebCore/editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::respondToChangedSelection):

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



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

Reply via email to