mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibWeb/CSS: Parse custom-idents more consistently
These have a few rules that we didn't follow in most cases: - CSS-wide keywords are not allowed. (inherit, initial, etc) - `default` is not allowed. - The above and any other disallowed identifiers must be tested case-insensitively. This introduces a `parse_custom_ident_value()` method, which takes a list of disallowed identifier names, and handles the above rules.
This commit is contained in:
parent
d3f089dc26
commit
6ae2b8c3d9
Notes:
github-actions[bot]
2024-07-27 12:46:26 +00:00
Author: https://github.com/AtkinsSJ
Commit: 6ae2b8c3d9
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/847
4 changed files with 80 additions and 20 deletions
|
@ -279,6 +279,7 @@ private:
|
|||
Optional<PropertyAndValue> parse_css_value_for_properties(ReadonlySpan<PropertyID>, TokenStream<ComponentValue>&);
|
||||
RefPtr<StyleValue> parse_builtin_value(ComponentValue const&);
|
||||
RefPtr<CalculatedStyleValue> parse_calculated_value(ComponentValue const&);
|
||||
RefPtr<CustomIdentStyleValue> parse_custom_ident_value(TokenStream<ComponentValue>&, std::initializer_list<StringView> blacklist);
|
||||
// NOTE: Implemented in generated code. (GenerateCSSMathFunctions.cpp)
|
||||
OwnPtr<CalculationNode> parse_math_function(PropertyID, Function const&);
|
||||
OwnPtr<CalculationNode> parse_a_calc_function_node(Function const&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue