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

[Live Range Selection] Some tests fail due to ApplyStyleCommand not canonicalizing ending selection #5221

Merged
merged 1 commit into from Oct 11, 2022

Conversation

rniwa
Copy link
Member

@rniwa rniwa commented Oct 11, 2022

75277ce

[Live Range Selection] Some tests fail due to ApplyStyleCommand not canonicalizing ending selection
https://bugs.webkit.org/show_bug.cgi?id=246314

Reviewed by Darin Adler.

Explicitly canonicalize positions in ApplyStyleCommand::updateStartEnd so that enabling live range selection
do not cause a new test failure. Also add variants of the tests that used to fail without this patch.

* LayoutTests/editing/execCommand/remove-format-background-color-live-range-expected.txt: Added.
* LayoutTests/editing/execCommand/remove-format-background-color-live-range.html: Added.
* LayoutTests/editing/execCommand/remove-format-image-live-range-expected.txt: Added.
* LayoutTests/editing/execCommand/remove-format-image-live-range.html: Added.
* LayoutTests/editing/execCommand/remove-format-in-table-cell-live-range-expected.txt: Added.
* LayoutTests/editing/execCommand/remove-format-in-table-cell-live-range.html: Added.
* LayoutTests/editing/execCommand/remove-format-textdecoration-in-iframe-live-range-expected.txt: Added.
* LayoutTests/editing/execCommand/remove-format-textdecoration-in-iframe-live-range.html: Added.
* LayoutTests/editing/execCommand/remove-formatting-2-live-range-expected.txt: Added.
* LayoutTests/editing/execCommand/remove-formatting-2-live-range.html: Added.
* LayoutTests/editing/execCommand/remove-formatting-live-range-expected.txt: Added.
* LayoutTests/editing/execCommand/remove-formatting-live-range.html: Added.
* LayoutTests/editing/style/apply-font-size-to-multiple-nodes-live-range-expected.txt: Added.
* LayoutTests/editing/style/apply-font-size-to-multiple-nodes-live-range.html: Added.
* LayoutTests/editing/style/apply-style-atomic-live-range-expected.txt: Added.
* LayoutTests/editing/style/apply-style-atomic-live-range.html: Added.
* LayoutTests/editing/style/invalid-font-size-live-range-expected.txt: Added.
* LayoutTests/editing/style/invalid-font-size-live-range.html: Added.
* LayoutTests/editing/style/remove-styled-element-with-style-span-live-range-expected.txt: Added.
* LayoutTests/editing/style/remove-styled-element-with-style-span-live-range.html: Added.
* LayoutTests/editing/undo/redo-split-text-node-live-range-expected.txt: Added.
* LayoutTests/editing/undo/redo-split-text-node-live-range.html: Added.
* LayoutTests/platform/ios/editing/execCommand/remove-formatting-2-live-range-expected.txt: Added.

* Source/WebCore/editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::updateStartEnd):

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

19ab7f8

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

@rniwa rniwa self-assigned this Oct 11, 2022
@rniwa rniwa added HTML Editing For bugs in HTML editing support (including designMode and contentEditable). WebKit Nightly Build labels Oct 11, 2022
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Oct 11, 2022
@rniwa rniwa removed the merging-blocked Applied to prevent a change from being merged label Oct 11, 2022
@rniwa rniwa added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Oct 11, 2022
…anonicalizing ending selection

https://bugs.webkit.org/show_bug.cgi?id=246314

Reviewed by Darin Adler.

Explicitly canonicalize positions in ApplyStyleCommand::updateStartEnd so that enabling live range selection
do not cause a new test failure. Also add variants of the tests that used to fail without this patch.

* LayoutTests/editing/execCommand/remove-format-background-color-live-range-expected.txt: Added.
* LayoutTests/editing/execCommand/remove-format-background-color-live-range.html: Added.
* LayoutTests/editing/execCommand/remove-format-image-live-range-expected.txt: Added.
* LayoutTests/editing/execCommand/remove-format-image-live-range.html: Added.
* LayoutTests/editing/execCommand/remove-format-in-table-cell-live-range-expected.txt: Added.
* LayoutTests/editing/execCommand/remove-format-in-table-cell-live-range.html: Added.
* LayoutTests/editing/execCommand/remove-format-textdecoration-in-iframe-live-range-expected.txt: Added.
* LayoutTests/editing/execCommand/remove-format-textdecoration-in-iframe-live-range.html: Added.
* LayoutTests/editing/execCommand/remove-formatting-2-live-range-expected.txt: Added.
* LayoutTests/editing/execCommand/remove-formatting-2-live-range.html: Added.
* LayoutTests/editing/execCommand/remove-formatting-live-range-expected.txt: Added.
* LayoutTests/editing/execCommand/remove-formatting-live-range.html: Added.
* LayoutTests/editing/style/apply-font-size-to-multiple-nodes-live-range-expected.txt: Added.
* LayoutTests/editing/style/apply-font-size-to-multiple-nodes-live-range.html: Added.
* LayoutTests/editing/style/apply-style-atomic-live-range-expected.txt: Added.
* LayoutTests/editing/style/apply-style-atomic-live-range.html: Added.
* LayoutTests/editing/style/invalid-font-size-live-range-expected.txt: Added.
* LayoutTests/editing/style/invalid-font-size-live-range.html: Added.
* LayoutTests/editing/style/remove-styled-element-with-style-span-live-range-expected.txt: Added.
* LayoutTests/editing/style/remove-styled-element-with-style-span-live-range.html: Added.
* LayoutTests/editing/undo/redo-split-text-node-live-range-expected.txt: Added.
* LayoutTests/editing/undo/redo-split-text-node-live-range.html: Added.
* LayoutTests/platform/ios/editing/execCommand/remove-formatting-2-live-range-expected.txt: Added.

* Source/WebCore/editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::updateStartEnd):

Canonical link: https://commits.webkit.org/255409@main
@webkit-commit-queue
Copy link
Collaborator

Committed 255409@main (75277ce): https://commits.webkit.org/255409@main

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

@webkit-commit-queue webkit-commit-queue merged commit 75277ce into WebKit:main Oct 11, 2022
@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 Oct 11, 2022
@rniwa rniwa deleted the fix246314 branch February 2, 2023 02:22
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