LibWeb/CSS: Allow getting a property's computed value without animations

The algorithm for starting a transition requires us to examine the
before-change and after-change values of the property, without taking
any current animations into account.
This commit is contained in:
Sam Atkins 2024-09-19 10:46:32 +01:00 committed by Andreas Kling
commit 3a10596136
Notes: github-actions[bot] 2024-09-22 04:43:20 +00:00
2 changed files with 10 additions and 4 deletions

View file

@ -74,7 +74,11 @@ public:
void set_property(CSS::PropertyID, NonnullRefPtr<CSSStyleValue const> value, Inherited = Inherited::No, Important = Important::No);
void set_animated_property(CSS::PropertyID, NonnullRefPtr<CSSStyleValue const> value);
NonnullRefPtr<CSSStyleValue const> property(CSS::PropertyID) const;
enum class WithAnimationsApplied {
No,
Yes,
};
NonnullRefPtr<CSSStyleValue const> property(CSS::PropertyID, WithAnimationsApplied = WithAnimationsApplied::Yes) const;
RefPtr<CSSStyleValue const> maybe_null_property(CSS::PropertyID) const;
void revert_property(CSS::PropertyID, StyleProperties const& style_for_revert);