{{ message }}
layout: Disregard 'content' property for <input> elements#44762
Merged
TimvdLippe merged 1 commit intoMay 6, 2026
Conversation
Collaborator
|
🤖 Opened new upstream WPT pull request (web-platform-tests/wpt#59691) with upstreamable changes. |
|
Test results for linux-wpt from try job (#25435009743): Flaky unexpected result (30)
Stable unexpected results that are known to be intermittent (19)
Stable unexpected results (1)
|
|
|
On elements (as opposed to pseudo-elements), CSS `content: url(something)` turns the element into a replaced element like <img> and ignores the DOM child nodes Some elements like `<input>` are "widgets" that can have native appearance: https://drafts.csswg.org/css-ui/#widget When both apply to the same element like in the added test case, the native appearance should take priority and the `content` property should be disregarded: https://drafts.csswg.org/css-ui/#disregard Previously Servo would do something half-way, generating boxes for the native appearance (including an absolutely-positioned pseudo-element for the slider of `<input type=range>`) but not generate fragments and later expect to find fragments, causing a panic. Fixes: servo#44540 Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Simon Sapin <simon@igalia.com>
aadfc18 to
566d52c
Compare
Collaborator
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#59691). |
SimonSapin
commented
May 6, 2026
Comment on lines
-1
to
-2
Member
Author
There was a problem hiding this comment.
The test harness now considers this test passing but it’s arguably still failing: it says “You should see a red dot” but Servo does not render any red. Both the reftest and the reference use <input type="image"> which Servo presumably does not implement correctly yet
TimvdLippe
approved these changes
May 6, 2026
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.

On elements (as opposed to pseudo-elements), CSS
content: url(something)turns the element into a replaced element like<img>and ignores the DOM child nodesSome elements like
<input>are "widgets" that can have native appearance: https://drafts.csswg.org/css-ui/#widgetWhen both apply to the same element like in the added test case, the native appearance should take priority and the
contentproperty should be disregarded: https://drafts.csswg.org/css-ui/#disregardPreviously Servo would do something half-way, generating boxes for the native appearance (including an absolutely-positioned pseudo-element for the slider of
<input type=range>) but not generate fragments and later expect to find fragments, causing a panic.Testing: adding the issue reproduction as a WPT crashtest
Fixes: #44540