mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +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
|
@ -977,7 +977,7 @@ void KeyframeEffect::update_style_properties()
|
|||
for (auto i = to_underlying(CSS::first_property_id); i <= to_underlying(CSS::last_property_id); ++i) {
|
||||
if (element_style->is_property_inherited(static_cast<CSS::PropertyID>(i))) {
|
||||
auto new_value = CSS::StyleComputer::get_inherit_value(document.realm(), static_cast<CSS::PropertyID>(i), &element);
|
||||
element_style->set_property(static_cast<CSS::PropertyID>(i), *new_value, nullptr, CSS::StyleProperties::Inherited::Yes);
|
||||
element_style->set_property(static_cast<CSS::PropertyID>(i), *new_value, CSS::StyleProperties::Inherited::Yes);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue