-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[Writing Tools] Make Table: Mail: Generated table has extra borderlines #30564
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
Conversation
EWS run on previous version of this PR (hash b18d8a4) |
EWS run on previous version of this PR (hash 6cd9217) |
EWS run on previous version of this PR (hash 87f2064) |
EWS run on previous version of this PR (hash ab4cc39) |
EWS run on previous version of this PR (hash 5ce998b) |
EWS run on previous version of this PR (hash 19404df) |
EWS run on previous version of this PR (hash 8c548d1) |
EWS run on previous version of this PR (hash 6d0deb6) |
EWS run on current version of this PR (hash f8c257f) |
https://bugs.webkit.org/show_bug.cgi?id=276315 rdar://129926389 Reviewed by Aditya Keerthi. When `didReceiveText` is invoked multiple times when replacing text with a table, multiple table elements were being created. This is because when the controller tries to re-create the context range after the first table, it is unable to do so since selections cannot encompass a table or list element. Fix by not trying to re-create the context range at all; instead, just undo the previous replacements, and then the context range will always just be the original range for the current composition. To facilitate this, add a 'silent' option when undo-ing a composition edit command so that a command can be undone without adding it to the undo stack or emitting any type of event. Additionally, since the TextAnimationController currently relies on being able to get the current range using the session identifier, add a new property to the Writing Tools command to give this information. * Source/WebCore/editing/CompositeEditCommand.cpp: (WebCore::EditCommandComposition::unapply): * Source/WebCore/editing/CompositeEditCommand.h: * Source/WebCore/editing/WritingToolsCompositionCommand.cpp: (WebCore::WritingToolsCompositionCommand::WritingToolsCompositionCommand): (WebCore::WritingToolsCompositionCommand::replaceContentsOfRangeWithFragment): * Source/WebCore/editing/WritingToolsCompositionCommand.h: (WebCore::WritingToolsCompositionCommand::currentContextRange const): * Source/WebCore/page/writing-tools/WritingToolsController.mm: (WebCore::WritingToolsController::compositionSessionDidReceiveTextWithReplacementRange): (WebCore::WritingToolsController::contextRangeForSessionWithID const): * Tools/TestWebKitAPI/Tests/WebKitCocoa/WritingTools.mm: (makeTableAttributedString): (TEST(WritingTools, CompositionWithTable)): (TEST(WritingTools, SmartReplyWithInsertedSpace)): Canonical link: https://commits.webkit.org/281780@main
f8c257f
to
292bb3d
Compare
Committed 281780@main (292bb3d): https://commits.webkit.org/281780@main Reviewed commits have been landed. Closing PR #30564 and removing active labels. |
292bb3d
f8c257f
🧪 wpe-wk2🧪 ios-wk2🧪 api-mac🧪 api-ios🧪 mac-AS-debug-wk2🧪 gtk-wk2🧪 api-gtk🛠 tv🛠 tv-sim🛠 watch🛠 watch-sim