mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:37:36 +00:00
LibWeb: Keep track of AnimationEffect's previous phase and iteration
This will be required for detecting transitions in StyleComputer
This commit is contained in:
parent
35859c0467
commit
9bab1a95a5
1 changed files with 9 additions and 0 deletions
|
@ -129,6 +129,11 @@ public:
|
|||
};
|
||||
Phase phase() const;
|
||||
|
||||
Phase previous_phase() const { return m_previous_phase; }
|
||||
void set_previous_phase(Phase value) { m_previous_phase = value; }
|
||||
double previous_current_iteration() const { return m_previous_current_iteration; }
|
||||
void set_previous_current_iteration(double value) { m_previous_current_iteration = value; }
|
||||
|
||||
Optional<double> overall_progress() const;
|
||||
Optional<double> directed_progress() const;
|
||||
AnimationDirection current_direction() const;
|
||||
|
@ -173,6 +178,10 @@ protected:
|
|||
|
||||
// https://www.w3.org/TR/web-animations-1/#time-transformations
|
||||
TimingFunction m_timing_function { linear_timing_function };
|
||||
|
||||
// Used for calculating transitions in StyleComputer
|
||||
Phase m_previous_phase { Phase::Idle };
|
||||
double m_previous_current_iteration { 0.0 };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue