script: Use an implemented pseudo-element to fortype=color ::color-swatch#37427
Merged
Loirooriol merged 5 commits intoservo:mainfrom Jul 9, 2025
Merged
script: Use an implemented pseudo-element to fortype=color ::color-swatch#37427Loirooriol merged 5 commits intoservo:mainfrom
type=color ::color-swatch#37427Loirooriol merged 5 commits intoservo:mainfrom
Conversation
xiaochengh
reviewed
Jun 13, 2025
Contributor
xiaochengh
left a comment
There was a problem hiding this comment.
Very good!
Could you also link the Stylo-side PR in the PR description?
This was referenced Jun 13, 2025
xiaochengh
approved these changes
Jun 16, 2025
type=color Input
type=color Inputtype=color
fffc35e to
ab012a5
Compare
|
🔨 Triggering try run (#15921748309) for Linux (WPT) |
|
|
ab012a5 to
7598425
Compare
|
🔨 Triggering try run (#15921880207) for Linux (WPT) |
|
Test results for linux-wpt from try job (#15921880207): Flaky unexpected result (16)
Stable unexpected results that are known to be intermittent (16)
|
|
✨ Try run (#15921880207) succeeded. |
Loirooriol
requested changes
Jun 30, 2025
Loirooriol
reviewed
Jul 3, 2025
Loirooriol
approved these changes
Jul 9, 2025
Signed-off-by: stevennovaryo <[email protected]>
Signed-off-by: stevennovaryo <[email protected]>
type=colortype=color ::color-swatch
Signed-off-by: stevennovaryo <[email protected]>
Signed-off-by: stevennovaryo <[email protected]>
Signed-off-by: stevennovaryo <[email protected]>
896402a to
523edea
Compare
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jul 23, 2025
) Depends on #37427. In addition to the changes introduced by #37065, there are several performance improvements and nits as follows: - Use the internal pseudo element for style matching, this will reduce the performance regression by ~66%. - Manual construction of the `Text` node inside a text container. This is followed by the modification of the inner `Text` node instead of using `SetTextContent` which is more expensive. - Use `implemented_pseudo_element` instead of `text_control_inner_editor` `NodeFlag` to handle the special cases that these elements should follow, specifically the: - focus delegation workaround; - selections; and - line height resolving. - More documentation. Servo's side of: servo/stylo#217 Testing: No new unexpected WPT failure, except for the one introduced by #37065. Fixes: #36307 #37205 --------- Signed-off-by: stevennovaryo <[email protected]>
18 tasks
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jul 25, 2025
Depend on: - #37427 - #37483 Utilize input `type=text` for the display of all textual input. In which, consist of https://html.spec.whatwg.org/#the-input-element-as-a-text-entry-widget and https://html.spec.whatwg.org/#the-input-element-as-domain-specific-widgets inputs. For `password`, `url`, `tel`, and, `email` input, the appearance of input container is exactly the same as the `text` input. Other types of textual input simply extends `text` input by adding extra components inside the container. Testing: Servo textual input appearance WPT. --------- Signed-off-by: stevennovaryo <[email protected]> Signed-off-by: Jo Steven Novaryo <[email protected]>
minghuaw
pushed a commit
to minghuaw/servo
that referenced
this pull request
Aug 1, 2025
Depend on: - servo#37427 - servo#37483 Utilize input `type=text` for the display of all textual input. In which, consist of https://html.spec.whatwg.org/#the-input-element-as-a-text-entry-widget and https://html.spec.whatwg.org/#the-input-element-as-domain-specific-widgets inputs. For `password`, `url`, `tel`, and, `email` input, the appearance of input container is exactly the same as the `text` input. Other types of textual input simply extends `text` input by adding extra components inside the container. Testing: Servo textual input appearance WPT. --------- Signed-off-by: stevennovaryo <[email protected]> Signed-off-by: Jo Steven Novaryo <[email protected]>
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.
Implement internal pseudo element, which would be resolved as a "Implemented Pseudo Element" within style computation. This is an concrete element that would has a primary style after the style computation, but could match and style resolved like an pseudo element. Therefore, it would have a different behavior compared to how does
pseudos thatServoLayoutNodehad. Where they would not have a concrete element behind it. Note that, due to the nature of these pseudo elements residing inside a UA widget, these pseudo elements would therefore not be accessible in JavaScript by default.This kind of element is required in order to implement the form control pseudo element like
::placeholder,::color-swatch,::field-text, etc.See this docs for more details of the implementation.
Then, the implemented pseudo element is utilized to implement style matching for input
type=text.Servo's side of: servo/stylo#212
Testing: No WPT regression.