Move CSS animation values into a mutable overlay on computed properties and make base computed style data immutable after construction. Base style mutation now goes through a builder that is consumed on publish, so installed styles no longer expose mutation APIs. Build new base style data for inherited style updates instead of cloning and mutating installed computed properties. Element-specific computed style adjustments now run before publication, while animation and transition updates continue to mutate only the animated overlay.
32 lines
715 B
C++
32 lines
715 B
C++
/*
|
|
* Copyright (c) 2026-present, the Ladybird developers.
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/FlyString.h>
|
|
#include <AK/String.h>
|
|
#include <AK/Variant.h>
|
|
#include <LibGC/Ptr.h>
|
|
#include <LibWeb/CSS/ComputedValues.h>
|
|
#include <LibWeb/CSS/EasingFunction.h>
|
|
#include <LibWeb/Forward.h>
|
|
|
|
namespace Web::CSS {
|
|
|
|
struct AnimationProperties {
|
|
Variant<double, String> duration;
|
|
EasingFunction timing_function;
|
|
double iteration_count;
|
|
AnimationDirection direction;
|
|
AnimationPlayState play_state;
|
|
double delay;
|
|
AnimationFillMode fill_mode;
|
|
AnimationComposition composition;
|
|
FlyString name;
|
|
GC::Ptr<Animations::AnimationTimeline> timeline;
|
|
};
|
|
|
|
}
|