1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 10:44:57 +00:00

LibWeb: Move CSS Parser into new Web::CSS::Parser namespace

The goal here is to move the parser-internal classes into this namespace
so they can have more convenient names without causing collisions. The
Parser itself won't collide, and would be more convenient to just
remain `CSS::Parser`, but having a namespace and a class with the same
name makes C++ unhappy.
This commit is contained in:
Sam Atkins 2022-04-12 12:00:07 +01:00 committed by Andreas Kling
parent 1304bf5a21
commit c449cabae3
23 changed files with 61 additions and 58 deletions

View file

@ -114,7 +114,7 @@ static StyleSheet& default_stylesheet()
if (!sheet) {
extern char const default_stylesheet_source[];
String css = default_stylesheet_source;
sheet = parse_css_stylesheet(CSS::ParsingContext(), css).leak_ref();
sheet = parse_css_stylesheet(CSS::Parser::ParsingContext(), css).leak_ref();
}
return *sheet;
}
@ -125,7 +125,7 @@ static StyleSheet& quirks_mode_stylesheet()
if (!sheet) {
extern char const quirks_mode_stylesheet_source[];
String css = quirks_mode_stylesheet_source;
sheet = parse_css_stylesheet(CSS::ParsingContext(), css).leak_ref();
sheet = parse_css_stylesheet(CSS::Parser::ParsingContext(), css).leak_ref();
}
return *sheet;
}
@ -652,7 +652,7 @@ RefPtr<StyleValue> StyleComputer::resolve_unresolved_style_value(DOM::Element& e
if (!expand_unresolved_values(element, string_from_property_id(property_id), dependencies, unresolved.values(), expanded_values, 0))
return {};
if (auto parsed_value = Parser::parse_css_value({}, ParsingContext { document() }, property_id, expanded_values))
if (auto parsed_value = Parser::Parser::parse_css_value({}, Parser::ParsingContext { document() }, property_id, expanded_values))
return parsed_value.release_nonnull();
return {};