LibWeb: Rename CSS::StyleProperties => CSS::ComputedProperties

Now that StyleProperties is only used to hold computed properties, let's
name it ComputedProperties.
This commit is contained in:
Andreas Kling 2024-12-20 11:32:17 +01:00 committed by Andreas Kling
commit c1cad8fa0e
Notes: github-actions[bot] 2024-12-22 09:13:51 +00:00
168 changed files with 397 additions and 397 deletions

View file

@ -143,7 +143,7 @@ public:
virtual DOM::Element* target() const { return {}; }
virtual bool is_keyframe_effect() const { return false; }
virtual void update_style_properties() = 0;
virtual void update_computed_properties() = 0;
protected:
AnimationEffect(JS::Realm&);

View file

@ -915,13 +915,13 @@ static CSS::RequiredInvalidationAfterStyleChange compute_required_invalidation(H
return invalidation;
}
void KeyframeEffect::update_style_properties()
void KeyframeEffect::update_computed_properties()
{
auto target = this->target();
if (!target)
return;
Optional<CSS::StyleProperties&> style = {};
Optional<CSS::ComputedProperties&> style = {};
if (!pseudo_element_type().has_value())
style = target->computed_css_values();
else
@ -944,7 +944,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(static_cast<CSS::PropertyID>(i), &element);
element_style->set_property(static_cast<CSS::PropertyID>(i), *new_value, CSS::StyleProperties::Inherited::Yes);
element_style->set_property(static_cast<CSS::PropertyID>(i), *new_value, CSS::ComputedProperties::Inherited::Yes);
}
}

View file

@ -105,7 +105,7 @@ public:
virtual bool is_keyframe_effect() const override { return true; }
virtual void update_style_properties() override;
virtual void update_computed_properties() override;
Optional<CSS::AnimationPlayState> last_css_animation_play_state() const { return m_last_css_animation_play_state; }
void set_last_css_animation_play_state(CSS::AnimationPlayState state) { m_last_css_animation_play_state = state; }