#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/core/animation/keyframe_effect_model.h"
#include <limits>
#include <utility>
#include "third_party/blink/renderer/core/animation/animation_effect.h"
#include "third_party/blink/renderer/core/animation/compositor_animations.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/css/css_property_equality.h"
#include "third_party/blink/renderer/core/css/properties/longhands.h"
#include "third_party/blink/renderer/core/css/property_registry.h"
#include "third_party/blink/renderer/core/css/resolver/style_resolver.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/frame/web_feature.h"
#include "third_party/blink/renderer/core/style/computed_style.h"
#include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/blink/renderer/platform/wtf/text/string_hash.h"
#include "ui/gfx/geometry/transform.h"
namespace blink {
PropertyHandleSet KeyframeEffectModelBase::Properties() const { … }
const PropertyHandleSet& KeyframeEffectModelBase::EnsureDynamicProperties() const { … }
bool KeyframeEffectModelBase::HasStaticProperty() const { … }
template <class K>
void KeyframeEffectModelBase::SetFrames(HeapVector<K>& keyframes) { … }
template CORE_EXPORT void KeyframeEffectModelBase::SetFrames(
HeapVector<Member<Keyframe>>& keyframes);
template CORE_EXPORT void KeyframeEffectModelBase::SetFrames(
HeapVector<Member<StringKeyframe>>& keyframes);
void KeyframeEffectModelBase::SetComposite(CompositeOperation composite) { … }
bool KeyframeEffectModelBase::Sample(
int iteration,
double fraction,
TimingFunction::LimitDirection limit_direction,
AnimationTimeDelta iteration_duration,
HeapVector<Member<Interpolation>>& result) const { … }
namespace {
static const size_t num_compositable_properties = …;
const CSSProperty** CompositableProperties() { … }
enum class OffsetType { … };
}
bool KeyframeEffectModelBase::SnapshotNeutralCompositorKeyframes(
Element& element,
const ComputedStyle& old_style,
const ComputedStyle& new_style,
const ComputedStyle* parent_style) const { … }
bool KeyframeEffectModelBase::SnapshotAllCompositorKeyframesIfNecessary(
Element& element,
const ComputedStyle& base_style,
const ComputedStyle* parent_style) const { … }
bool KeyframeEffectModelBase::SnapshotCompositableProperties(
Element& element,
const ComputedStyle& computed_style,
const ComputedStyle* parent_style,
ShouldSnapshotPropertyFunction should_snapshot_property,
ShouldSnapshotKeyframeFunction should_snapshot_keyframe) const { … }
bool KeyframeEffectModelBase::SnapshotCompositorKeyFrames(
const PropertyHandle& property,
Element& element,
const ComputedStyle& computed_style,
const ComputedStyle* parent_style,
ShouldSnapshotPropertyFunction should_snapshot_property,
ShouldSnapshotKeyframeFunction should_snapshot_keyframe) const { … }
template <class K>
Vector<double> KeyframeEffectModelBase::GetComputedOffsets(
const HeapVector<K>& keyframes) { … }
template CORE_EXPORT Vector<double> KeyframeEffectModelBase::GetComputedOffsets(
const HeapVector<Member<Keyframe>>& keyframes);
template CORE_EXPORT Vector<double> KeyframeEffectModelBase::GetComputedOffsets(
const HeapVector<Member<StringKeyframe>>& keyframes);
bool KeyframeEffectModelBase::IsTransformRelatedEffect() const { … }
bool KeyframeEffectModelBase::SetLogicalPropertyResolutionContext(
WritingDirectionMode writing_direction) { … }
void KeyframeEffectModelBase::Trace(Visitor* visitor) const { … }
void KeyframeEffectModelBase::EnsureKeyframeGroups() const { … }
bool KeyframeEffectModelBase::RequiresPropertyNode() const { … }
void KeyframeEffectModelBase::EnsureInterpolationEffectPopulated() const { … }
void KeyframeEffectModelBase::IndexKeyframesAndResolveComputedOffsets() { … }
bool KeyframeEffectModelBase::ResolveTimelineOffsets(
const TimelineRange& timeline_range,
double range_start,
double range_end) { … }
void KeyframeEffectModelBase::ClearCachedData() { … }
bool KeyframeEffectModelBase::IsReplaceOnly() const { … }
void KeyframeEffectModelBase::PropertySpecificKeyframeGroup::AppendKeyframe(
Keyframe::PropertySpecificKeyframe* keyframe) { … }
void KeyframeEffectModelBase::PropertySpecificKeyframeGroup::
RemoveRedundantKeyframes() { … }
void KeyframeEffectModelBase::PropertySpecificKeyframeGroup::CheckIfStatic() { … }
bool KeyframeEffectModelBase::PropertySpecificKeyframeGroup::
AddSyntheticKeyframeIfRequired(
scoped_refptr<TimingFunction> zero_offset_easing) { … }
}