mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:37:44 +00:00
LibWeb: Generate KeyframeSet in KeyframeEffect::set_keyframes
This is similar to the logic used in StyleComputer (except a bit closer to the spec), and will eventually be shared between the two.
This commit is contained in:
parent
1735f3d9aa
commit
1d98f812af
2 changed files with 61 additions and 0 deletions
|
@ -58,6 +58,8 @@ class KeyframeEffect : public AnimationEffect {
|
|||
JS_DECLARE_ALLOCATOR(KeyframeEffect);
|
||||
|
||||
public:
|
||||
constexpr static double AnimationKeyFrameKeyScaleFactor = 1000.0; // 0..100000
|
||||
|
||||
struct KeyFrameSet : public RefCounted<KeyFrameSet> {
|
||||
struct UseInitial { };
|
||||
struct ResolvedKeyFrame {
|
||||
|
@ -65,6 +67,7 @@ public:
|
|||
};
|
||||
RedBlackTree<u64, ResolvedKeyFrame> keyframes_by_key;
|
||||
};
|
||||
static void generate_initial_and_final_frames(RefPtr<KeyFrameSet>, HashTable<CSS::PropertyID> const& animated_properties);
|
||||
|
||||
static JS::NonnullGCPtr<KeyframeEffect> create(JS::Realm&);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue