servo/components/layout/stylesheets
Steven Novaryo 378c4648e4
script: Use an implemented pseudo-element to fortype=color ::color-swatch (#37427)
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
`pseudo`s that `ServoLayoutNode` had. 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](https://drafts.csswg.org/css-forms-1/#pseudo-elements)
like `::placeholder`, `::color-swatch`, `::field-text`, etc.
 
See [this docs](https://hackmd.io/@ChaKweTiau/BJ3zRdLQlg) 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: https://github.com/servo/stylo/pull/212

Testing: No WPT regression.

---------

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>
2025-07-09 15:36:58 +00:00
..
presentational-hints.css Embed user agent stylesheets and media control resouces in libservo (#36803) 2025-05-04 18:48:09 +00:00
quirks-mode.css layout: Implement list-style-position quirk (#37837) 2025-07-03 09:16:54 +00:00
servo.css script: Use an implemented pseudo-element to fortype=color ::color-swatch (#37427) 2025-07-09 15:36:58 +00:00
user-agent.css Embed user agent stylesheets and media control resouces in libservo (#36803) 2025-05-04 18:48:09 +00:00