mirror of
https://github.com/servo/servo
synced 2026-04-25 17:15:48 +02:00
layout: Make ::placeholder public and add property restriction for ::placeholder and ::marker (#43053)
Servo side of https://github.com/servo/stylo/pull/322. Update the WPT expectation following the changes to make `::placeholder` public and adding property restriction to `::placeholder` and `::marker`. Additionally ensure that `getComputedStyle` works for `::placeholder`. Testing: Existing WPTs Fixes: #43034 Fixes: #43035 Fixes: #19808 Signed-off-by: Jo Steven Novaryo <steven.novaryo@gmail.com>
This commit is contained in:
@@ -1841,6 +1841,9 @@ impl WindowMethods<crate::DomTypeHolder> for Window {
|
||||
|
||||
// Step 3: If pseudoElt is provided, is not the empty string, and starts with a colon, then:
|
||||
// Step 3.1: Parse pseudoElt as a <pseudo-element-selector>, and let type be the result.
|
||||
// TODO(#43095): This is quite hacky and it would be better to have a parsing function that
|
||||
// is integrated with stylo `PseudoElement` itself. Comparing with stylo, we are now currently
|
||||
// missing `::backdrop`, `::color-swatch`, and `::details-content`.
|
||||
let pseudo = pseudo.map(|mut s| {
|
||||
s.make_ascii_lowercase();
|
||||
s
|
||||
@@ -1854,6 +1857,7 @@ impl WindowMethods<crate::DomTypeHolder> for Window {
|
||||
},
|
||||
Some(ref pseudo) if pseudo == "::selection" => Some(PseudoElement::Selection),
|
||||
Some(ref pseudo) if pseudo == "::marker" => Some(PseudoElement::Marker),
|
||||
Some(ref pseudo) if pseudo == "::placeholder" => Some(PseudoElement::Placeholder),
|
||||
Some(ref pseudo) if pseudo.starts_with(':') => {
|
||||
// Step 3.2: If type is failure, or is a ::slotted() or ::part()
|
||||
// pseudo-element, let obj be null.
|
||||
|
||||
Reference in New Issue
Block a user