mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-06 08:09:45 +00:00
LibWeb: Make CSS::ComputedProperties GC-allocated
This commit is contained in:
parent
c1cad8fa0e
commit
74469a0c1f
Notes:
github-actions[bot]
2024-12-22 09:13:42 +00:00
Author: https://github.com/awesomekling
Commit: 74469a0c1f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2995
138 changed files with 337 additions and 339 deletions
|
@ -921,13 +921,13 @@ void KeyframeEffect::update_computed_properties()
|
|||
if (!target)
|
||||
return;
|
||||
|
||||
Optional<CSS::ComputedProperties&> style = {};
|
||||
GC::Ptr<CSS::ComputedProperties> style = {};
|
||||
if (!pseudo_element_type().has_value())
|
||||
style = target->computed_css_values();
|
||||
style = target->computed_properties();
|
||||
else
|
||||
style = target->pseudo_element_computed_css_values(pseudo_element_type().value());
|
||||
style = target->pseudo_element_computed_properties(pseudo_element_type().value());
|
||||
|
||||
if (!style.has_value())
|
||||
if (!style)
|
||||
return;
|
||||
|
||||
auto animated_properties_before_update = style->animated_property_values();
|
||||
|
@ -937,8 +937,8 @@ void KeyframeEffect::update_computed_properties()
|
|||
|
||||
// Traversal of the subtree is necessary to update the animated properties inherited from the target element.
|
||||
target->for_each_in_subtree_of_type<DOM::Element>([&](auto& element) {
|
||||
auto element_style = element.computed_css_values();
|
||||
if (!element_style.has_value() || !element.layout_node())
|
||||
auto element_style = element.computed_properties();
|
||||
if (!element_style || !element.layout_node())
|
||||
return TraversalDecision::Continue;
|
||||
|
||||
for (auto i = to_underlying(CSS::first_property_id); i <= to_underlying(CSS::last_property_id); ++i) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue