mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
LibWeb: Implement animation class-specific composite order
This is a part of determining the composite order of two animations
This commit is contained in:
parent
78b3c552c2
commit
c3b689488e
3 changed files with 58 additions and 0 deletions
|
@ -12,6 +12,15 @@
|
|||
|
||||
namespace Web::Animations {
|
||||
|
||||
// Sorted by composite order:
|
||||
// https://www.w3.org/TR/css-animations-2/#animation-composite-order
|
||||
enum class AnimationClass {
|
||||
CSSAnimationWithOwningElement,
|
||||
CSSTransition,
|
||||
CSSAnimationWithoutOwningElement,
|
||||
None,
|
||||
};
|
||||
|
||||
// https://www.w3.org/TR/web-animations-1/#the-animation-interface
|
||||
class Animation : public DOM::EventTarget {
|
||||
WEB_PLATFORM_OBJECT(Animation, DOM::EventTarget);
|
||||
|
@ -69,6 +78,9 @@ public:
|
|||
|
||||
virtual bool is_css_animation() const { return false; }
|
||||
|
||||
virtual AnimationClass animation_class() const { return AnimationClass::None; }
|
||||
virtual Optional<int> class_specific_composite_order(JS::NonnullGCPtr<Animation>) const { return {}; }
|
||||
|
||||
protected:
|
||||
Animation(JS::Realm&);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue