mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb: Treat a CSS declaration with a "--" property name as invalid
This commit is contained in:
parent
bf37f3400e
commit
7a6e4f5ec8
Notes:
github-actions[bot]
2025-06-25 16:10:39 +00:00
Author: https://github.com/tcl3
Commit: 7a6e4f5ec8
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5210
Reviewed-by: https://github.com/AtkinsSJ ✅
3 changed files with 31 additions and 0 deletions
|
@ -1125,6 +1125,8 @@ Optional<Declaration> Parser::consume_a_declaration(TokenStream<T>& input, Neste
|
|||
|
||||
// 8. If decl’s name is a custom property name string, then set decl’s original text to the segment
|
||||
// of the original source text string corresponding to the tokens of decl’s value.
|
||||
if (is_invalid_custom_property_name_string(declaration.name))
|
||||
return {};
|
||||
if (is_a_custom_property_name_string(declaration.name)) {
|
||||
// TODO: If we could reach inside the source string that the TokenStream uses, we could grab this as
|
||||
// a single substring instead of having to reconstruct it.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue