Skip to content

Conversation

jesxilin
Copy link
Contributor

@jesxilin jesxilin commented Jul 19, 2023

bf94cf5

CSS Custom Highlights text decoration does not respect priority
https://bugs.webkit.org/show_bug.cgi?id=259321
rdar://112494779

Reviewed by Wenson Hsieh.

Before if StyledMarkedText was of higher priority, just overrides textDecorationStyles.
Added a function to compute the textDecorationStyles.
Added WPT ref test for painting unclashing lower priority text decoration
over higher priority highlight without text decorations.

* LayoutTests/imported/w3c/web-platform-tests/css/css-highlight-api/painting/custom-highlight-painting-priority-text-decoration-001-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-highlight-api/painting/custom-highlight-painting-priority-text-decoration-001-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-highlight-api/painting/custom-highlight-painting-priority-text-decoration-001.html: Added.
* Source/WebCore/rendering/StyledMarkedText.cpp:
(WebCore::computeStylesForTextDecorations):
(WebCore::coalesceAdjacentWithSameRanges):

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

2bee93c

Misc iOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 wincairo
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🛠 gtk
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🧪 gtk-wk2
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🧪 api-gtk
✅ 🛠 tv ❌ 🧪 mac-AS-debug-wk2
✅ 🛠 tv-sim ✅ 🧪 mac-wk2-stress
✅ 🛠 🧪 merge ✅ 🛠 watch
✅ 🛠 watch-sim

@pxlcoder
Copy link
Member

Can we add a test?

@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jul 19, 2023
@Ahmad-S792 Ahmad-S792 removed the merging-blocked Applied to prevent a change from being merged label Jul 19, 2023
@Ahmad-S792 Ahmad-S792 added the CSS Cascading Style Sheets implementation label Jul 19, 2023
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jul 20, 2023
@rr-codes rr-codes added merge-queue Applied to send a pull request to merge-queue and removed merging-blocked Applied to prevent a change from being merged labels Jul 20, 2023
https://bugs.webkit.org/show_bug.cgi?id=259321
rdar://112494779

Reviewed by Wenson Hsieh.

Before if StyledMarkedText was of higher priority, just overrides textDecorationStyles.
Added a function to compute the textDecorationStyles.
Added WPT ref test for painting unclashing lower priority text decoration
over higher priority highlight without text decorations.

* LayoutTests/imported/w3c/web-platform-tests/css/css-highlight-api/painting/custom-highlight-painting-priority-text-decoration-001-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-highlight-api/painting/custom-highlight-painting-priority-text-decoration-001-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-highlight-api/painting/custom-highlight-painting-priority-text-decoration-001.html: Added.
* Source/WebCore/rendering/StyledMarkedText.cpp:
(WebCore::computeStylesForTextDecorations):
(WebCore::coalesceAdjacentWithSameRanges):

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

Committed 266184@main (bf94cf5): https://commits.webkit.org/266184@main

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

@webkit-commit-queue webkit-commit-queue merged commit bf94cf5 into WebKit:main Jul 20, 2023
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CSS Cascading Style Sheets implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants