mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-24 00:24:38 +00:00
LibWeb: Stop passing Realm unnecessarily to parse CSS properties
Also use the parse_css_value() helper in cases where we previously constructed a Parser manually.
This commit is contained in:
committed by
Alexander Kalenik
parent
ee9db99961
commit
bc77f84359
@@ -946,8 +946,7 @@ WebIDL::ExceptionOr<ParsedMatrix> parse_dom_matrix_init_string(JS::Realm& realm,
|
||||
// 2. Parse transformList into parsedValue given the grammar for the CSS transform property.
|
||||
// The result will be a <transform-list>, the keyword none, or failure.
|
||||
// If parsedValue is failure, or any <transform-function> has <length> values without absolute length units, or any keyword other than none is used, then return failure. [CSS3-SYNTAX] [CSS3-TRANSFORMS]
|
||||
auto parsing_context = CSS::Parser::ParsingContext { realm };
|
||||
auto transform_style_value = parse_css_value(parsing_context, transform_list, CSS::PropertyID::Transform);
|
||||
auto transform_style_value = parse_css_value(CSS::Parser::ParsingContext {}, transform_list, CSS::PropertyID::Transform);
|
||||
if (!transform_style_value)
|
||||
return WebIDL::SyntaxError::create(realm, "Failed to parse CSS transform string."_string);
|
||||
auto parsed_value = CSS::StyleProperties::transformations_for_style_value(*transform_style_value);
|
||||
|
||||
Reference in New Issue
Block a user