mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-23 10:50:49 +00:00
LibWeb/DOM: Fire transition[cancel,start,run,end] events
This commit is contained in:
parent
a2ab3769f4
commit
1c61ccef40
Notes:
github-actions[bot]
2024-12-25 16:15:01 +00:00
Author: https://github.com/LucasChollet
Commit: 1c61ccef40
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3024
6 changed files with 152 additions and 1 deletions
|
@ -39,6 +39,17 @@ public:
|
|||
double timing_function_output_at_time(double t) const;
|
||||
NonnullRefPtr<CSSStyleValue const> value_at_time(double t) const;
|
||||
|
||||
// This is designed to be created from AnimationEffect::Phase.
|
||||
enum class Phase : u8 {
|
||||
Before,
|
||||
Active,
|
||||
After,
|
||||
Idle,
|
||||
Pending,
|
||||
};
|
||||
Phase previous_phase() const { return m_previous_phase; }
|
||||
void set_previous_phase(Phase phase) { m_previous_phase = phase; }
|
||||
|
||||
private:
|
||||
CSSTransition(JS::Realm&, DOM::Element&, PropertyID, size_t transition_generation,
|
||||
double start_time, double end_time, NonnullRefPtr<CSSStyleValue const> start_value, NonnullRefPtr<CSSStyleValue const> end_value,
|
||||
|
@ -75,6 +86,8 @@ private:
|
|||
GC::Ref<Animations::KeyframeEffect> m_keyframe_effect;
|
||||
|
||||
GC::Ptr<CSS::CSSStyleDeclaration const> m_cached_declaration;
|
||||
|
||||
Phase m_previous_phase { Phase::Idle };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue