Disallow vendor-prefixed and allow other properties in highlight pseudo-elements#62580
Merged
webkit-commit-queue merged 1 commit intoApr 13, 2026
Conversation
Collaborator
|
EWS run on previous version of this PR (hash bd5b74a) Details
|
bd5b74a to
2e84a96
Compare
Collaborator
|
EWS run on previous version of this PR (hash 2e84a96) Details
|
2e84a96 to
3ee5ba3
Compare
Collaborator
|
EWS run on previous version of this PR (hash 3ee5ba3) Details
|
3ee5ba3 to
9c63fcc
Compare
Collaborator
|
EWS run on current version of this PR (hash 9c63fcc) Details
|
anttijk
approved these changes
Apr 13, 2026
…do-elements https://bugs.webkit.org/show_bug.cgi?id=312085 rdar://174590593 Reviewed by Antti Koivisto. The CSS Pseudo 4 spec [1] states that vendor-prefixed properties such as -webkit-text-fill-color are not applicable to highlight pseudo-elements. This adds a PropertyAllowlist for highlight pseudos (::selection, ::highlight(), ::spelling-error, ::grammar-error, ::target-text) with the spec-defined set of applicable properties: color, background-color, text-decoration and sub-properties, text-shadow, stroke-color, stroke-width, and custom properties. Also consolidates propertyAllowlistForPseudoElement() and determinePropertyAllowlist() to use switch statements instead of repeated if-chains. [1] https://drafts.csswg.org/css-pseudo-4/#highlight-styling * LayoutTests/TestExpectations: Progressions * LayoutTests/platform/ios/TestExpectations: Skip Test on iOS * LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/highlight-cascade/highlight-cascade-007-expected.txt: Ditto * Source/WebCore/style/PropertyAllowlist.cpp: (WebCore::Style::propertyAllowlistForPseudoElement): (WebCore::Style::isValidHighlightStyleProperty): * Source/WebCore/style/PropertyAllowlist.h: * Source/WebCore/style/PropertyCascade.cpp: (WebCore::Style::PropertyCascade::addMatch): * Source/WebCore/style/RuleData.cpp: (WebCore::Style::determinePropertyAllowlist): * Source/WebCore/style/RuleData.h: Canonical link: https://commits.webkit.org/311073@main
9c63fcc to
a30d9c1
Compare
Collaborator
|
Committed 311073@main (a30d9c1): https://commits.webkit.org/311073@main Reviewed commits have been landed. Closing PR #62580 and removing active labels. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
a30d9c1
9c63fcc