Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Unified Text Replacement] When a "rich text" text replacement session ends, the session should be undone if it is not accepted #28122

Merged
merged 1 commit into from
May 3, 2024

Conversation

rr-codes
Copy link
Contributor

@rr-codes rr-codes commented May 3, 2024

c53d438

[Unified Text Replacement] When a "rich text" text replacement session ends, the session should be undone if it is not accepted
https://bugs.webkit.org/show_bug.cgi?id=273709
rdar://127390343

Reviewed by Abrar Rahman Protyasha.

Ensure that `didEndTextReplacementSession` handles both plain text and rich text replacements properly.

* Source/WebKit/WebProcess/WebPage/Cocoa/UnifiedTextReplacementController.mm:
(WebKit::UnifiedTextReplacementController::didEndTextReplacementSession<WebUnifiedTextReplacementType::PlainText>):
(WebKit::UnifiedTextReplacementController::didEndTextReplacementSession<WebUnifiedTextReplacementType::RichText>):
(WebKit::UnifiedTextReplacementController::didEndTextReplacementSession):
* Source/WebKit/WebProcess/WebPage/UnifiedTextReplacementController.h:

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

bd072ec

Misc iOS, tvOS & watchOS macOS Linux Windows
❌ πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac   πŸ›  wpe   πŸ›  wincairo
βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug   πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl   πŸ§ͺ ios-wk2   πŸ§ͺ api-mac   πŸ§ͺ api-wpe
  πŸ§ͺ ios-wk2-wpt βœ… πŸ›  wpe-skia
  πŸ§ͺ api-ios   πŸ§ͺ mac-wk2 βœ… πŸ›  gtk
  πŸ›  tv   πŸ§ͺ mac-AS-debug-wk2   πŸ§ͺ gtk-wk2
  πŸ›  tv-sim   πŸ§ͺ mac-wk2-stress   πŸ§ͺ api-gtk
  πŸ›  watch
βœ… πŸ›  πŸ§ͺ unsafe-merge   πŸ›  watch-sim

@rr-codes rr-codes requested a review from cdumez as a code owner May 3, 2024 21:39
@rr-codes rr-codes self-assigned this May 3, 2024
@rr-codes rr-codes added the HTML Editing For bugs in HTML editing support (including designMode and contentEditable). label May 3, 2024
@rr-codes rr-codes added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label May 3, 2024
…n ends, the session should be undone if it is not accepted

https://bugs.webkit.org/show_bug.cgi?id=273709
rdar://127390343

Reviewed by Abrar Rahman Protyasha.

Ensure that `didEndTextReplacementSession` handles both plain text and rich text replacements properly.

* Source/WebKit/WebProcess/WebPage/Cocoa/UnifiedTextReplacementController.mm:
(WebKit::UnifiedTextReplacementController::didEndTextReplacementSession<WebUnifiedTextReplacementType::PlainText>):
(WebKit::UnifiedTextReplacementController::didEndTextReplacementSession<WebUnifiedTextReplacementType::RichText>):
(WebKit::UnifiedTextReplacementController::didEndTextReplacementSession):
* Source/WebKit/WebProcess/WebPage/UnifiedTextReplacementController.h:

Canonical link: https://commits.webkit.org/278345@main
if (accepted)
return;

RefPtr document = this->document();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check that you have a document, like you do below.

@webkit-commit-queue
Copy link
Collaborator

Committed 278345@main (c53d438): https://commits.webkit.org/278345@main

Reviewed commits have been landed. Closing PR #28122 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit c53d438 into WebKit:main May 3, 2024
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HTML Editing For bugs in HTML editing support (including designMode and contentEditable).
Projects
None yet
5 participants