mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-13 03:29:49 +00:00
LibWeb: Only remember source CSSStyleDeclaration for animation-name
We were saving to source declarations for *every* property, even though we only ever looked it up for animation-name. This patch gets rid of the per-property source pointer and we now keep a single pointer to the animation-name source only. This shrinks StyleProperties from 6512 bytes to 4368 bytes per instance.
This commit is contained in:
parent
faebbbc281
commit
c288bfb404
Notes:
github-actions[bot]
2024-08-02 18:38:45 +00:00
Author: https://github.com/awesomekling
Commit: c288bfb404
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/935
7 changed files with 50 additions and 45 deletions
|
@ -617,7 +617,7 @@ NonnullRefPtr<CSS::StyleProperties> Element::resolved_css_values()
|
|||
auto maybe_value = element_computed_style->property(property_id);
|
||||
if (!maybe_value.has_value())
|
||||
continue;
|
||||
properties->set_property(property_id, maybe_value.release_value().value, nullptr);
|
||||
properties->set_property(property_id, maybe_value.release_value().value);
|
||||
}
|
||||
|
||||
return properties;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue