#include "third_party/blink/renderer/core/animation/effect_input.h"
#include "third_party/blink/renderer/bindings/core/v8/dictionary.h"
#include "third_party/blink/renderer/bindings/core/v8/idl_types.h"
#include "third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h"
#include "third_party/blink/renderer/bindings/core/v8/script_iterator.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_base_keyframe.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_base_property_indexed_keyframe.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_timeline_range.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_timeline_range_offset.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_union_compositeoperationorauto_compositeoperationorautosequence.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_union_double_doubleorstringortimelinerangeoffsetornullsequence_string_timelinerangeoffset_null.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_union_double_string_timelinerangeoffset.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_union_string_stringsequence.h"
#include "third_party/blink/renderer/core/animation/animation_input_helpers.h"
#include "third_party/blink/renderer/core/animation/compositor_animations.h"
#include "third_party/blink/renderer/core/animation/css/css_animations.h"
#include "third_party/blink/renderer/core/animation/keyframe_effect_model.h"
#include "third_party/blink/renderer/core/animation/string_keyframe.h"
#include "third_party/blink/renderer/core/css/css_identifier_value.h"
#include "third_party/blink/renderer/core/css/css_primitive_value_mappings.h"
#include "third_party/blink/renderer/core/css/css_style_sheet.h"
#include "third_party/blink/renderer/core/css/css_value_id_mappings_generated.h"
#include "third_party/blink/renderer/core/css/parser/css_parser.h"
#include "third_party/blink/renderer/core/css/properties/computed_style_utils.h"
#include "third_party/blink/renderer/core/css/properties/css_parsing_utils.h"
#include "third_party/blink/renderer/core/css/resolver/element_resolve_context.h"
#include "third_party/blink/renderer/core/css/style_sheet_contents.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/element.h"
#include "third_party/blink/renderer/core/dom/node_computed_style.h"
#include "third_party/blink/renderer/core/execution_context/security_context.h"
#include "third_party/blink/renderer/core/frame/frame_console.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/inspector/console_message.h"
#include "third_party/blink/renderer/platform/heap/collection_support/heap_hash_map.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/wtf/hash_map.h"
#include "third_party/blink/renderer/platform/wtf/text/ascii_ctype.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#include "v8/include/v8.h"
namespace blink {
namespace {
BaseKeyframeOffset;
BasePropertyIndexedKeyframeOffset;
Vector<std::optional<EffectModel::CompositeOperation>> ParseCompositeProperty(
const BasePropertyIndexedKeyframe* keyframe) { … }
struct ParsedOffset { … };
std::optional<ParsedOffset> ParseOffsetFromTimelineRangeOffset(
TimelineRangeOffset* timeline_range_offset,
ExceptionState& exception_state) { … }
std::optional<ParsedOffset> ParseOffsetFromCssText(
Document& document,
String css_text,
ExceptionState& exception_state) { … }
template <typename T>
std::optional<ParsedOffset> ParseOffset(Document& document,
T* keyframe_offset,
ExceptionState& exception_state) { … }
void SetKeyframeOffset(Keyframe& keyframe, ParsedOffset& offset) { … }
Vector<std::optional<ParsedOffset>> ExtractPropertyIndexedKeyframeOffsets(
Document& document,
BasePropertyIndexedKeyframe& base_property_indexed_keyframe,
ExceptionState& exception_state) { … }
void SetKeyframeValue(Element* element,
Document& document,
StringKeyframe& keyframe,
const String& property,
const String& value,
ExecutionContext* execution_context) { … }
bool IsAnimatableKeyframeAttribute(const String& property,
Element* element,
const Document& document) { … }
void AddPropertyValuePairsForKeyframe(
v8::Isolate* isolate,
v8::Local<v8::Object> keyframe_obj,
Element* element,
const Document& document,
Vector<std::pair<String, String>>& property_value_pairs,
ExceptionState& exception_state) { … }
StringKeyframeVector ConvertArrayForm(Element* element,
Document& document,
ScriptIterator iterator,
ScriptState* script_state,
ExceptionState& exception_state) { … }
bool GetPropertyIndexedKeyframeValues(const v8::Local<v8::Object>& keyframe,
const String& property,
ScriptState* script_state,
ExceptionState& exception_state,
Vector<String>& result) { … }
StringKeyframeVector ConvertObjectForm(Element* element,
Document& document,
const v8::Local<v8::Object>& v8_keyframe,
ScriptState* script_state,
ExceptionState& exception_state) { … }
}
KeyframeEffectModelBase* EffectInput::Convert(
Element* element,
const ScriptValue& keyframes,
EffectModel::CompositeOperation composite,
ScriptState* script_state,
ExceptionState& exception_state) { … }
StringKeyframeVector EffectInput::ParseKeyframesArgument(
Element* element,
const ScriptValue& keyframes,
ScriptState* script_state,
ExceptionState& exception_state) { … }
}