mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:38:11 +00:00
LibWeb: Parse the -webkit-progress-bar/value pseudo elements
These will be needed for styling progress bars, sadly this can only be done with these non-standard selectors. These are, hovever, in use on real sites such as https://rpcs3.net/compatibility.
This commit is contained in:
parent
218e6d2f5e
commit
b5febe538c
4 changed files with 21 additions and 3 deletions
|
@ -458,10 +458,12 @@ Parser::ParseErrorOr<Selector::SimpleSelector> Parser::parse_pseudo_simple_selec
|
|||
}
|
||||
|
||||
auto pseudo_name = name_token.token().ident();
|
||||
if (has_ignored_vendor_prefix(pseudo_name))
|
||||
auto pseudo_element = pseudo_element_from_string(pseudo_name);
|
||||
|
||||
// Note: We allow the "ignored" -webkit prefix here for -webkit-progress-bar/-webkit-progress-bar
|
||||
if (!pseudo_element.has_value() && has_ignored_vendor_prefix(pseudo_name))
|
||||
return ParseError::IncludesIgnoredVendorPrefix;
|
||||
|
||||
auto pseudo_element = pseudo_element_from_string(pseudo_name);
|
||||
if (!pseudo_element.has_value()) {
|
||||
dbgln_if(CSS_PARSER_DEBUG, "Unrecognized pseudo-element: '::{}'", pseudo_name);
|
||||
return ParseError::SyntaxError;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue