mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-03 14:50:18 +00:00
LibWeb: Stop constructing temporary ElementInlineCSSStyleDeclarations
Previously, parse_css_style_attribute() would parse the string, extract the properties, add them to a newly-created ElementInlineCSSStyleDeclarations, and then user code would take the properties back out of it again and throw it away. Instead, just return the list of properties, and the caller can create an EICSD if it needs one.
This commit is contained in:
parent
f0d198ca3f
commit
50455c2f5e
Notes:
github-actions[bot]
2025-03-19 13:54:35 +00:00
Author: https://github.com/AtkinsSJ
Commit: 50455c2f5e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3983
5 changed files with 19 additions and 22 deletions
|
@ -668,8 +668,8 @@ void ElementInlineCSSStyleDeclaration::set_declarations_from_text(StringView css
|
|||
}
|
||||
|
||||
empty_the_declarations();
|
||||
auto style = parse_css_style_attribute(CSS::Parser::ParsingParams(element->element().document()), css_text, element->element());
|
||||
set_the_declarations(style->properties(), style->custom_properties());
|
||||
auto style = parse_css_style_attribute(Parser::ParsingParams(element->element().document()), css_text);
|
||||
set_the_declarations(style.properties, style.custom_properties);
|
||||
}
|
||||
|
||||
// https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-csstext
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue