mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-22 00:53:20 +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:
parent
1304bf5a21
commit
c449cabae3
Notes:
sideshowbarker
2024-07-17 11:53:05 +09:00
Author: https://github.com/AtkinsSJ
Commit: c449cabae3
Pull-request: https://github.com/SerenityOS/serenity/pull/13643
23 changed files with 61 additions and 58 deletions
|
@ -30,8 +30,7 @@ void HTMLTableCellElement::apply_presentational_hints(CSS::StyleProperties& styl
|
|||
if (value.equals_ignoring_case("center"sv) || value.equals_ignoring_case("middle"sv)) {
|
||||
style.set_property(CSS::PropertyID::TextAlign, CSS::IdentifierStyleValue::create(CSS::ValueID::LibwebCenter));
|
||||
} else {
|
||||
CSS::Parser parser(CSS::ParsingContext(document()), value.view());
|
||||
if (auto parsed_value = parser.parse_as_css_value(CSS::PropertyID::TextAlign))
|
||||
if (auto parsed_value = parse_css_value(CSS::Parser::ParsingContext { document() }, value.view(), CSS::PropertyID::TextAlign))
|
||||
style.set_property(CSS::PropertyID::TextAlign, parsed_value.release_nonnull());
|
||||
}
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue