Diff
Modified: trunk/LayoutTests/ChangeLog (223882 => 223883)
--- trunk/LayoutTests/ChangeLog 2017-10-24 07:41:39 UTC (rev 223882)
+++ trunk/LayoutTests/ChangeLog 2017-10-24 07:51:59 UTC (rev 223883)
@@ -1,3 +1,26 @@
+2017-10-24 Antoine Quint <[email protected]>
+
+ [Web Animations] Add basic timing and target properties
+ https://bugs.webkit.org/show_bug.cgi?id=178674
+
+ Reviewed by Dean Jackson.
+
+ Add new tests to check the behavior of the newly exposed interfaces,
+ constructors and properties.
+
+ * webanimations/animation-effect-expected.txt: Added.
+ * webanimations/animation-effect-timing-expected.txt: Added.
+ * webanimations/animation-effect-timing.html: Added.
+ * webanimations/animation-effect.html: Added.
+ * webanimations/animation-interface-effect-property-expected.txt: Added.
+ * webanimations/animation-interface-effect-property.html: Added.
+ * webanimations/animation-interface-start-time-property-expected.txt: Added.
+ * webanimations/animation-interface-start-time-property.html: Added.
+ * webanimations/keyframe-effect-expected.txt: Added.
+ * webanimations/keyframe-effect-interface-timing-duration-expected.txt: Added.
+ * webanimations/keyframe-effect-interface-timing-duration.html: Added.
+ * webanimations/keyframe-effect.html: Added.
+
2017-10-24 Nan Wang <[email protected]>
AX: Crash at -[WebAccessibilityObjectWrapper _accessibilityMinValue] + 24
Added: trunk/LayoutTests/webanimations/animation-effect-expected.txt (0 => 223883)
--- trunk/LayoutTests/webanimations/animation-effect-expected.txt (rev 0)
+++ trunk/LayoutTests/webanimations/animation-effect-expected.txt 2017-10-24 07:51:59 UTC (rev 223883)
@@ -0,0 +1,15 @@
+Check that the AnimationEffect interface is defined and does not expose a constructor.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+The AnimationEffect interface is defined.
+PASS AnimationEffect is defined.
+
+The AnimationEffect interface cannot be constructed.
+PASS new AnimationEffect threw exception TypeError: function is not a constructor (evaluating 'new AnimationEffect').
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/webanimations/animation-effect-timing-expected.txt (0 => 223883)
--- trunk/LayoutTests/webanimations/animation-effect-timing-expected.txt (rev 0)
+++ trunk/LayoutTests/webanimations/animation-effect-timing-expected.txt 2017-10-24 07:51:59 UTC (rev 223883)
@@ -0,0 +1,15 @@
+Check that the AnimationEffectTiming interface is defined and does not expose a constructor.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+The AnimationEffectTiming interface is defined.
+PASS AnimationEffectTiming is defined.
+
+The AnimationEffectTiming interface cannot be constructed.
+PASS new AnimationEffectTiming threw exception TypeError: function is not a constructor (evaluating 'new AnimationEffectTiming').
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/webanimations/animation-effect-timing.html (0 => 223883)
--- trunk/LayoutTests/webanimations/animation-effect-timing.html (rev 0)
+++ trunk/LayoutTests/webanimations/animation-effect-timing.html 2017-10-24 07:51:59 UTC (rev 223883)
@@ -0,0 +1,16 @@
+<script src=""
+<script>
+
+description("Check that the AnimationEffectTiming interface is defined and does not expose a constructor.");
+
+debug("The AnimationEffectTiming interface is defined.");
+shouldBeDefined("AnimationEffectTiming");
+
+debug("");
+debug("The AnimationEffectTiming interface cannot be constructed.");
+shouldThrow("new AnimationEffectTiming");
+
+debug("");
+
+</script>
+<script src=""
\ No newline at end of file
Added: trunk/LayoutTests/webanimations/animation-effect.html (0 => 223883)
--- trunk/LayoutTests/webanimations/animation-effect.html (rev 0)
+++ trunk/LayoutTests/webanimations/animation-effect.html 2017-10-24 07:51:59 UTC (rev 223883)
@@ -0,0 +1,16 @@
+<script src=""
+<script>
+
+description("Check that the AnimationEffect interface is defined and does not expose a constructor.");
+
+debug("The AnimationEffect interface is defined.");
+shouldBeDefined("AnimationEffect");
+
+debug("");
+debug("The AnimationEffect interface cannot be constructed.");
+shouldThrow("new AnimationEffect");
+
+debug("");
+
+</script>
+<script src=""
\ No newline at end of file
Added: trunk/LayoutTests/webanimations/animation-interface-effect-property-expected.txt (0 => 223883)
--- trunk/LayoutTests/webanimations/animation-interface-effect-property-expected.txt (rev 0)
+++ trunk/LayoutTests/webanimations/animation-interface-effect-property-expected.txt 2017-10-24 07:51:59 UTC (rev 223883)
@@ -0,0 +1,28 @@
+Check the behavior of the effect property on Animation objects.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+The animation.effect property should be null by default.
+PASS animation.effect is null
+
+The animation.effect property can be set to a KeyframeEffect object.
+PASS animation.effect is effectA
+
+The animation.effect property can be set to another KeyframeEffect object.
+PASS animation.effect is effectB
+
+The animation.effect property can be set back to null.
+PASS animation.effect is null
+
+The animation.effect property cannot be set to something other than null or an AnimationEffect object.
+PASS animation.effect = 0 threw exception TypeError: The Animation.effect attribute must be an instance of AnimationEffect.
+PASS animation.effect = [] threw exception TypeError: The Animation.effect attribute must be an instance of AnimationEffect.
+PASS animation.effect = {} threw exception TypeError: The Animation.effect attribute must be an instance of AnimationEffect.
+PASS animation.effect = false threw exception TypeError: The Animation.effect attribute must be an instance of AnimationEffect.
+PASS animation.effect = 'effect' threw exception TypeError: The Animation.effect attribute must be an instance of AnimationEffect.
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/webanimations/animation-interface-effect-property.html (0 => 223883)
--- trunk/LayoutTests/webanimations/animation-interface-effect-property.html (rev 0)
+++ trunk/LayoutTests/webanimations/animation-interface-effect-property.html 2017-10-24 07:51:59 UTC (rev 223883)
@@ -0,0 +1,38 @@
+<script src=""
+<script>
+
+description("Check the behavior of the effect property on Animation objects.");
+
+debug("The animation.effect property should be null by default.");
+const animation = new Animation;
+shouldBeNull("animation.effect");
+
+debug("");
+debug("The animation.effect property can be set to a KeyframeEffect object.");
+const effectA = new KeyframeEffect(document.body);
+animation.effect = effectA;
+shouldBe("animation.effect", "effectA");
+
+debug("");
+debug("The animation.effect property can be set to another KeyframeEffect object.");
+const effectB = new KeyframeEffect(document.body);
+animation.effect = effectB;
+shouldBe("animation.effect", "effectB");
+
+debug("");
+debug("The animation.effect property can be set back to null.");
+animation.effect = null;
+shouldBeNull("animation.effect");
+
+debug("");
+debug("The animation.effect property cannot be set to something other than null or an AnimationEffect object.");
+shouldThrow("animation.effect = 0");
+shouldThrow("animation.effect = []");
+shouldThrow("animation.effect = {}");
+shouldThrow("animation.effect = false");
+shouldThrow("animation.effect = 'effect'");
+
+debug("");
+
+</script>
+<script src=""
\ No newline at end of file
Added: trunk/LayoutTests/webanimations/animation-interface-start-time-property-expected.txt (0 => 223883)
--- trunk/LayoutTests/webanimations/animation-interface-start-time-property-expected.txt (rev 0)
+++ trunk/LayoutTests/webanimations/animation-interface-start-time-property-expected.txt 2017-10-24 07:51:59 UTC (rev 223883)
@@ -0,0 +1,18 @@
+Check the behavior of the startTime property on Animation objects.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+The animation.startTime property should be null by default.
+PASS animation.startTime is null
+
+The animation.startTime property can be set to a number.
+PASS animation.startTime is 2
+
+The animation.effect property can be set back to null.
+PASS animation.startTime is null
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/webanimations/animation-interface-start-time-property.html (0 => 223883)
--- trunk/LayoutTests/webanimations/animation-interface-start-time-property.html (rev 0)
+++ trunk/LayoutTests/webanimations/animation-interface-start-time-property.html 2017-10-24 07:51:59 UTC (rev 223883)
@@ -0,0 +1,23 @@
+<script src=""
+<script>
+
+description("Check the behavior of the startTime property on Animation objects.");
+
+debug("The animation.startTime property should be null by default.");
+const animation = new Animation;
+shouldBeNull("animation.startTime");
+
+debug("");
+debug("The animation.startTime property can be set to a number.");
+animation.startTime = 2;
+shouldBe("animation.startTime", "2");
+
+debug("");
+debug("The animation.effect property can be set back to null.");
+animation.startTime = null;
+shouldBeNull("animation.startTime");
+
+debug("");
+
+</script>
+<script src=""
\ No newline at end of file
Added: trunk/LayoutTests/webanimations/keyframe-effect-expected.txt (0 => 223883)
--- trunk/LayoutTests/webanimations/keyframe-effect-expected.txt (rev 0)
+++ trunk/LayoutTests/webanimations/keyframe-effect-expected.txt 2017-10-24 07:51:59 UTC (rev 223883)
@@ -0,0 +1,28 @@
+Check that the KeyframeEffect interface is defined and exposes a constructor.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+The KeyframeEffect interface is defined.
+PASS KeyframeEffect is defined.
+
+The KeyframeEffect interface cannot be constructed without parameters.
+PASS new KeyframeEffect threw exception TypeError: Not enough arguments.
+
+The KeyframeEffect interface constructor throws if the parameter has the wrong type.
+PASS (new KeyframeEffect(0)) threw exception TypeError: Argument 1 ('target') to the KeyframeEffect constructor must be an instance of Element.
+PASS (new KeyframeEffect({})) threw exception TypeError: Argument 1 ('target') to the KeyframeEffect constructor must be an instance of Element.
+PASS (new KeyframeEffect([])) threw exception TypeError: Argument 1 ('target') to the KeyframeEffect constructor must be an instance of Element.
+PASS (new KeyframeEffect(false)) threw exception TypeError: Argument 1 ('target') to the KeyframeEffect constructor must be an instance of Element.
+PASS (new KeyframeEffect('element')) threw exception TypeError: Argument 1 ('target') to the KeyframeEffect constructor must be an instance of Element.
+
+The KeyframeEffect interface target is set to the provided Element.
+PASS (new KeyframeEffect(document.body)).target is document.body
+
+A KeyframeEffect object target is read-only.
+PASS effect.target is document.body
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/webanimations/keyframe-effect-interface-timing-duration-expected.txt (0 => 223883)
--- trunk/LayoutTests/webanimations/keyframe-effect-interface-timing-duration-expected.txt (rev 0)
+++ trunk/LayoutTests/webanimations/keyframe-effect-interface-timing-duration-expected.txt 2017-10-24 07:51:59 UTC (rev 223883)
@@ -0,0 +1,17 @@
+Check that KeyframeEffect objects expose a duration through its timing property.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Check the default state of the timing and duration properties.
+PASS keyframeEffect.timing is defined.
+PASS keyframeEffect.timing.duration is defined.
+PASS keyframeEffect.timing.duration is 0
+
+Check that we can update the timing duration.
+PASS keyframeEffect.timing.duration is 2
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/webanimations/keyframe-effect-interface-timing-duration.html (0 => 223883)
--- trunk/LayoutTests/webanimations/keyframe-effect-interface-timing-duration.html (rev 0)
+++ trunk/LayoutTests/webanimations/keyframe-effect-interface-timing-duration.html 2017-10-24 07:51:59 UTC (rev 223883)
@@ -0,0 +1,20 @@
+<script src=""
+<script>
+
+description("Check that KeyframeEffect objects expose a duration through its timing property.");
+
+debug("Check the default state of the timing and duration properties.");
+const keyframeEffect = new KeyframeEffect(document.body);
+shouldBeDefined("keyframeEffect.timing");
+shouldBeDefined("keyframeEffect.timing.duration");
+shouldBe("keyframeEffect.timing.duration", "0");
+
+debug("");
+debug("Check that we can update the timing duration.");
+keyframeEffect.timing.duration = 2;
+shouldBe("keyframeEffect.timing.duration", "2");
+
+debug("");
+
+</script>
+<script src=""
\ No newline at end of file
Added: trunk/LayoutTests/webanimations/keyframe-effect.html (0 => 223883)
--- trunk/LayoutTests/webanimations/keyframe-effect.html (rev 0)
+++ trunk/LayoutTests/webanimations/keyframe-effect.html 2017-10-24 07:51:59 UTC (rev 223883)
@@ -0,0 +1,34 @@
+<script src=""
+<script>
+
+description("Check that the KeyframeEffect interface is defined and exposes a constructor.");
+
+debug("The KeyframeEffect interface is defined.");
+shouldBeDefined("KeyframeEffect");
+
+debug("");
+debug("The KeyframeEffect interface cannot be constructed without parameters.");
+shouldThrow("new KeyframeEffect");
+
+debug("");
+debug("The KeyframeEffect interface constructor throws if the parameter has the wrong type.");
+shouldThrow("(new KeyframeEffect(0))");
+shouldThrow("(new KeyframeEffect({}))");
+shouldThrow("(new KeyframeEffect([]))");
+shouldThrow("(new KeyframeEffect(false))");
+shouldThrow("(new KeyframeEffect('element'))");
+
+debug("");
+debug("The KeyframeEffect interface target is set to the provided Element.");
+shouldBe("(new KeyframeEffect(document.body)).target", "document.body");
+
+debug("");
+debug("A KeyframeEffect object target is read-only.");
+const effect = new KeyframeEffect(document.body);
+effect.target = document.createElement("div");
+shouldBe("effect.target", "document.body");
+
+debug("");
+
+</script>
+<script src=""
\ No newline at end of file
Modified: trunk/Source/WebCore/CMakeLists.txt (223882 => 223883)
--- trunk/Source/WebCore/CMakeLists.txt 2017-10-24 07:41:39 UTC (rev 223882)
+++ trunk/Source/WebCore/CMakeLists.txt 2017-10-24 07:51:59 UTC (rev 223883)
@@ -418,8 +418,11 @@
Modules/webvr/VRPose.idl
Modules/webvr/VRStageParameters.idl
+ animation/AnimationEffect.idl
+ animation/AnimationEffectTiming.idl
animation/AnimationTimeline.idl
animation/DocumentTimeline.idl
+ animation/KeyframeEffect.idl
animation/WebAnimation.idl
crypto/CryptoAlgorithmParameters.idl
Modified: trunk/Source/WebCore/ChangeLog (223882 => 223883)
--- trunk/Source/WebCore/ChangeLog 2017-10-24 07:41:39 UTC (rev 223882)
+++ trunk/Source/WebCore/ChangeLog 2017-10-24 07:51:59 UTC (rev 223883)
@@ -1,3 +1,54 @@
+2017-10-24 Antoine Quint <[email protected]>
+
+ [Web Animations] Add basic timing and target properties
+ https://bugs.webkit.org/show_bug.cgi?id=178674
+
+ Reviewed by Dean Jackson.
+
+ We add three new interfaces to expose enough properties to establish basic timing properties,
+ a start time and duration, and the target of an animation. The startTime property is set on
+ the Animation object, the target is set on the KeyframeEffect set as the effect property on
+ the Animation object, and the duration is set on the AnimationEffectTiming set on the effect.
+
+ Tests: webanimations/animation-effect-timing.html
+ webanimations/animation-effect.html
+ webanimations/animation-interface-effect-property.html
+ webanimations/animation-interface-start-time-property.html
+ webanimations/keyframe-effect-interface-timing-duration.html
+ webanimations/keyframe-effect.html
+
+ * CMakeLists.txt:
+ * DerivedSources.make:
+ * Sources.txt:
+ * WebCore.xcodeproj/project.pbxproj:
+ * animation/AnimationEffect.cpp: Copied from Source/WebCore/animation/WebAnimation.idl.
+ (WebCore::AnimationEffect::AnimationEffect):
+ (WebCore::AnimationEffect::~AnimationEffect):
+ * animation/AnimationEffect.h: Copied from Source/WebCore/animation/WebAnimation.h.
+ (WebCore::AnimationEffect::isKeyframeEffect const):
+ (WebCore::AnimationEffect::timing const):
+ (WebCore::AnimationEffect::classType const):
+ * animation/AnimationEffect.idl: Copied from Source/WebCore/animation/WebAnimation.idl.
+ * animation/AnimationEffectTiming.cpp: Copied from Source/WebCore/animation/WebAnimation.idl.
+ (WebCore::AnimationEffectTiming::create):
+ (WebCore::AnimationEffectTiming::AnimationEffectTiming):
+ (WebCore::AnimationEffectTiming::~AnimationEffectTiming):
+ * animation/AnimationEffectTiming.h: Copied from Source/WebCore/animation/WebAnimation.h.
+ * animation/AnimationEffectTiming.idl: Copied from Source/WebCore/animation/WebAnimation.idl.
+ * animation/KeyframeEffect.cpp: Copied from Source/WebCore/animation/WebAnimation.idl.
+ (WebCore::KeyframeEffect::create):
+ (WebCore::KeyframeEffect::KeyframeEffect):
+ * animation/KeyframeEffect.h: Copied from Source/WebCore/animation/WebAnimation.h.
+ * animation/KeyframeEffect.idl: Copied from Source/WebCore/animation/WebAnimation.idl.
+ * animation/WebAnimation.cpp:
+ (WebCore::WebAnimation::setEffect):
+ * animation/WebAnimation.h:
+ * animation/WebAnimation.idl:
+ * bindings/js/JSAnimationEffectCustom.cpp: Copied from Source/WebCore/animation/WebAnimation.cpp.
+ (WebCore::toJSNewlyCreated):
+ (WebCore::toJS):
+ * bindings/js/WebCoreBuiltinNames.h:
+
2017-10-24 Ryosuke Niwa <[email protected]>
RenderSVGModelObject::checkIntersection triggers layout
Modified: trunk/Source/WebCore/DerivedSources.make (223882 => 223883)
--- trunk/Source/WebCore/DerivedSources.make 2017-10-24 07:41:39 UTC (rev 223882)
+++ trunk/Source/WebCore/DerivedSources.make 2017-10-24 07:51:59 UTC (rev 223883)
@@ -342,8 +342,11 @@
$(WebCore)/Modules/webvr/VRLayerInit.idl \
$(WebCore)/Modules/webvr/VRPose.idl \
$(WebCore)/Modules/webvr/VRStageParameters.idl \
+ $(WebCore)/animation/AnimationEffect.idl \
+ $(WebCore)/animation/AnimationEffectTiming.idl \
$(WebCore)/animation/AnimationTimeline.idl \
$(WebCore)/animation/DocumentTimeline.idl \
+ $(WebCore)/animation/KeyframeEffect.idl \
$(WebCore)/animation/WebAnimation.idl \
$(WebCore)/crypto/CryptoAlgorithmParameters.idl \
$(WebCore)/crypto/CryptoKey.idl \
Modified: trunk/Source/WebCore/Sources.txt (223882 => 223883)
--- trunk/Source/WebCore/Sources.txt 2017-10-24 07:41:39 UTC (rev 223882)
+++ trunk/Source/WebCore/Sources.txt 2017-10-24 07:51:59 UTC (rev 223883)
@@ -311,11 +311,13 @@
accessibility/AccessibilityTree.cpp
accessibility/AccessibilityTreeItem.cpp
+animation/AnimationEffect.cpp
+animation/AnimationEffectTiming.cpp
animation/AnimationTimeline.cpp
animation/DocumentTimeline.cpp
+animation/KeyframeEffect.cpp
animation/WebAnimation.cpp
-
bindings/js/CachedModuleScriptLoader.cpp
bindings/js/CachedScriptFetcher.cpp
bindings/js/CallTracer.cpp
@@ -323,6 +325,7 @@
bindings/js/DOMWrapperWorld.cpp
bindings/js/GCController.cpp
bindings/js/IDBBindingUtilities.cpp
+bindings/js/JSAnimationEffectCustom.cpp
bindings/js/JSAnimationTimelineCustom.cpp
bindings/js/JSAttrCustom.cpp
bindings/js/JSAudioTrackCustom.cpp
@@ -905,6 +908,8 @@
JSAesKeyParams.cpp
JSAnalyserNode.cpp
JSAnimationEvent.cpp
+JSAnimationEffect.cpp
+JSAnimationEffectTiming.cpp
JSAnimationTimeline.cpp
JSAttr.cpp
JSAudioBuffer.cpp
@@ -1221,6 +1226,7 @@
JSIntersectionObserverEntry.cpp
JSJsonWebKey.cpp
JSKeyboardEvent.cpp
+JSKeyframeEffect.cpp
JSLocation.cpp
JSLongRange.cpp
JSMediaController.cpp
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (223882 => 223883)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2017-10-24 07:41:39 UTC (rev 223882)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2017-10-24 07:51:59 UTC (rev 223883)
@@ -2554,6 +2554,12 @@
7134496D146941B300720312 /* SVGLengthContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7134496B146941B300720312 /* SVGLengthContext.cpp */; };
7134496E146941B300720312 /* SVGLengthContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 7134496C146941B300720312 /* SVGLengthContext.h */; settings = {ATTRIBUTES = (Private, ); }; };
71537A01146BD9D7008BD615 /* SVGPathData.h in Headers */ = {isa = PBXBuildFile; fileRef = 715379FF146BD9D6008BD615 /* SVGPathData.h */; };
+ 71556CB21F9F09BA00E78D08 /* AnimationEffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 71556CAD1F9F099D00E78D08 /* AnimationEffect.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 71556CB31F9F09BA00E78D08 /* AnimationEffectTiming.h in Headers */ = {isa = PBXBuildFile; fileRef = 71556CAE1F9F099D00E78D08 /* AnimationEffectTiming.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 71556CB41F9F09BA00E78D08 /* KeyframeEffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 71556CAA1F9F099B00E78D08 /* KeyframeEffect.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 71556CBC1F9F0A4900E78D08 /* JSAnimationEffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 71556CB81F9F09FC00E78D08 /* JSAnimationEffect.h */; };
+ 71556CBD1F9F0A4900E78D08 /* JSAnimationEffectTiming.h in Headers */ = {isa = PBXBuildFile; fileRef = 71556CB91F9F09FD00E78D08 /* JSAnimationEffectTiming.h */; };
+ 71556CBE1F9F0A4900E78D08 /* JSKeyframeEffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 71556CB71F9F09FC00E78D08 /* JSKeyframeEffect.h */; };
7157F062150B6564006EAABD /* SVGAnimatedTransformList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7157F061150B6564006EAABD /* SVGAnimatedTransformList.cpp */; };
71A1B6081DEE5AD70073BCFB /* modern-media-controls-localized-strings.js in Resources */ = {isa = PBXBuildFile; fileRef = 71A1B6061DEE5A820073BCFB /* modern-media-controls-localized-strings.js */; };
71A57DF1154BE25C0009D120 /* SVGPathUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 71A57DEF154BE25C0009D120 /* SVGPathUtilities.cpp */; };
@@ -9919,6 +9925,22 @@
7152CEC31DD2236B00FD5962 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
715379FE146BD9D6008BD615 /* SVGPathData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGPathData.cpp; sourceTree = "<group>"; };
715379FF146BD9D6008BD615 /* SVGPathData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathData.h; sourceTree = "<group>"; };
+ 71556CA81F9F099B00E78D08 /* KeyframeEffect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KeyframeEffect.cpp; sourceTree = "<group>"; };
+ 71556CAA1F9F099B00E78D08 /* KeyframeEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyframeEffect.h; sourceTree = "<group>"; };
+ 71556CAB1F9F099C00E78D08 /* KeyframeEffect.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = KeyframeEffect.idl; sourceTree = "<group>"; };
+ 71556CAC1F9F099D00E78D08 /* AnimationEffectTiming.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AnimationEffectTiming.cpp; sourceTree = "<group>"; };
+ 71556CAD1F9F099D00E78D08 /* AnimationEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationEffect.h; sourceTree = "<group>"; };
+ 71556CAE1F9F099D00E78D08 /* AnimationEffectTiming.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationEffectTiming.h; sourceTree = "<group>"; };
+ 71556CAF1F9F099E00E78D08 /* AnimationEffectTiming.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AnimationEffectTiming.idl; sourceTree = "<group>"; };
+ 71556CB01F9F099E00E78D08 /* AnimationEffect.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AnimationEffect.idl; sourceTree = "<group>"; };
+ 71556CB11F9F099F00E78D08 /* AnimationEffect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AnimationEffect.cpp; sourceTree = "<group>"; };
+ 71556CB51F9F09DC00E78D08 /* JSAnimationEffectCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAnimationEffectCustom.cpp; sourceTree = "<group>"; };
+ 71556CB61F9F09FC00E78D08 /* JSKeyframeEffect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSKeyframeEffect.cpp; sourceTree = "<group>"; };
+ 71556CB71F9F09FC00E78D08 /* JSKeyframeEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSKeyframeEffect.h; sourceTree = "<group>"; };
+ 71556CB81F9F09FC00E78D08 /* JSAnimationEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAnimationEffect.h; sourceTree = "<group>"; };
+ 71556CB91F9F09FD00E78D08 /* JSAnimationEffectTiming.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAnimationEffectTiming.h; sourceTree = "<group>"; };
+ 71556CBA1F9F09FD00E78D08 /* JSAnimationEffect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAnimationEffect.cpp; sourceTree = "<group>"; };
+ 71556CBB1F9F09FE00E78D08 /* JSAnimationEffectTiming.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAnimationEffectTiming.cpp; sourceTree = "<group>"; };
7157E3D11DC1EE4B0094550E /* scrubbing-support.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode._javascript_; path = "scrubbing-support.js"; sourceTree = "<group>"; };
7157F061150B6564006EAABD /* SVGAnimatedTransformList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedTransformList.cpp; sourceTree = "<group>"; };
716C8DF11E48B269005BD0DA /* volume-down-support.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode._javascript_; path = "volume-down-support.js"; sourceTree = "<group>"; };
@@ -16097,10 +16119,16 @@
1221E0581C02B409006A1A00 /* Animation */ = {
isa = PBXGroup;
children = (
+ 71556CBA1F9F09FD00E78D08 /* JSAnimationEffect.cpp */,
+ 71556CB81F9F09FC00E78D08 /* JSAnimationEffect.h */,
+ 71556CBB1F9F09FE00E78D08 /* JSAnimationEffectTiming.cpp */,
+ 71556CB91F9F09FD00E78D08 /* JSAnimationEffectTiming.h */,
71025EDA1F99F1A7004A250C /* JSAnimationTimeline.cpp */,
71025ED91F99F1A7004A250C /* JSAnimationTimeline.h */,
71025EDB1F99F1A8004A250C /* JSDocumentTimeline.cpp */,
71025EDC1F99F1A8004A250C /* JSDocumentTimeline.h */,
+ 71556CB61F9F09FC00E78D08 /* JSKeyframeEffect.cpp */,
+ 71556CB71F9F09FC00E78D08 /* JSKeyframeEffect.h */,
71025ED71F99F1A6004A250C /* JSWebAnimation.cpp */,
71025ED81F99F1A6004A250C /* JSWebAnimation.h */,
);
@@ -19303,6 +19331,12 @@
71025EC11F99F096004A250C /* animation */ = {
isa = PBXGroup;
children = (
+ 71556CB11F9F099F00E78D08 /* AnimationEffect.cpp */,
+ 71556CAD1F9F099D00E78D08 /* AnimationEffect.h */,
+ 71556CB01F9F099E00E78D08 /* AnimationEffect.idl */,
+ 71556CAC1F9F099D00E78D08 /* AnimationEffectTiming.cpp */,
+ 71556CAE1F9F099D00E78D08 /* AnimationEffectTiming.h */,
+ 71556CAF1F9F099E00E78D08 /* AnimationEffectTiming.idl */,
71025EC61F99F096004A250C /* AnimationTimeline.cpp */,
71025EC71F99F096004A250C /* AnimationTimeline.h */,
71025EC91F99F096004A250C /* AnimationTimeline.idl */,
@@ -19309,6 +19343,9 @@
71025EC41F99F096004A250C /* DocumentTimeline.cpp */,
71025EC51F99F096004A250C /* DocumentTimeline.h */,
71025ECA1F99F096004A250C /* DocumentTimeline.idl */,
+ 71556CA81F9F099B00E78D08 /* KeyframeEffect.cpp */,
+ 71556CAA1F9F099B00E78D08 /* KeyframeEffect.h */,
+ 71556CAB1F9F099C00E78D08 /* KeyframeEffect.idl */,
71025EC31F99F096004A250C /* WebAnimation.cpp */,
71025EC21F99F096004A250C /* WebAnimation.h */,
71025EC81F99F096004A250C /* WebAnimation.idl */,
@@ -19557,6 +19594,7 @@
7C3D8EE41E08BABE0023B084 /* GC / Wrapping Only */ = {
isa = PBXGroup;
children = (
+ 71556CB51F9F09DC00E78D08 /* JSAnimationEffectCustom.cpp */,
71025ED51F99F147004A250C /* JSAnimationTimelineCustom.cpp */,
BC2ED6BB0C6BD2F000920BFF /* JSAttrCustom.cpp */,
BE6DF70E171CA2DA00DD52B8 /* JSAudioTrackCustom.cpp */,
@@ -26559,6 +26597,8 @@
490707E71219C04300D90E51 /* ANGLEWebKitBridge.h in Headers */,
49E912AB0EFAC906009D0CAF /* Animation.h in Headers */,
316FE1120E6E1DA700BF6088 /* AnimationBase.h in Headers */,
+ 71556CB21F9F09BA00E78D08 /* AnimationEffect.h in Headers */,
+ 71556CB31F9F09BA00E78D08 /* AnimationEffectTiming.h in Headers */,
319848011A1D817B00A13318 /* AnimationEvent.h in Headers */,
49E912AD0EFAC906009D0CAF /* AnimationList.h in Headers */,
71025ECD1F99F0CE004A250C /* AnimationTimeline.h in Headers */,
@@ -27826,6 +27866,8 @@
57B5F8101E5E2A4E00F34F90 /* JSAesGcmParams.h in Headers */,
576814451E70CB1F00E77754 /* JSAesKeyParams.h in Headers */,
FDA15ECA12B03F50003A583A /* JSAnalyserNode.h in Headers */,
+ 71556CBC1F9F0A4900E78D08 /* JSAnimationEffect.h in Headers */,
+ 71556CBD1F9F0A4900E78D08 /* JSAnimationEffectTiming.h in Headers */,
3198480C1A1E6CE800A13318 /* JSAnimationEvent.h in Headers */,
71025EDE1F99F1EC004A250C /* JSAnimationTimeline.h in Headers */,
A1DF5A991F7EC8C00058A477 /* JSApplePayContactField.h in Headers */,
@@ -28187,6 +28229,7 @@
0F4710E81DB700C7002DCEC3 /* JSIntersectionObserverEntry.h in Headers */,
57E2335B1DC7D5E500F28D01 /* JSJsonWebKey.h in Headers */,
A86629D309DA2B48009633A5 /* JSKeyboardEvent.h in Headers */,
+ 71556CBE1F9F0A4900E78D08 /* JSKeyframeEffect.h in Headers */,
935F45430F7C3B5F00D7C1FB /* JSLazyEventListener.h in Headers */,
BCE1C43C0D9830D3003B02F2 /* JSLocation.h in Headers */,
93A806201E03B585008A1F26 /* JSLongRange.h in Headers */,
@@ -28635,6 +28678,7 @@
A513B3D7114B1666001C429B /* KeyEventCocoa.h in Headers */,
265541391489811C000DFC5D /* KeyEventCodesIOS.h in Headers */,
316FE11A0E6E1DA700BF6088 /* KeyframeAnimation.h in Headers */,
+ 71556CB41F9F09BA00E78D08 /* KeyframeEffect.h in Headers */,
BC5EBA110E823E4700B25965 /* KeyframeList.h in Headers */,
E15FF7D518C9553800FE4C87 /* KeypressCommand.h in Headers */,
450CEBF115073BBE002BB149 /* LabelableElement.h in Headers */,
Copied: trunk/Source/WebCore/animation/AnimationEffect.cpp (from rev 223882, trunk/Source/WebCore/animation/WebAnimation.idl) (0 => 223883)
--- trunk/Source/WebCore/animation/AnimationEffect.cpp (rev 0)
+++ trunk/Source/WebCore/animation/AnimationEffect.cpp 2017-10-24 07:51:59 UTC (rev 223883)
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "AnimationEffect.h"
+
+#include "AnimationEffectTiming.h"
+
+namespace WebCore {
+
+AnimationEffect::AnimationEffect(ClassType classType)
+ : m_classType(classType)
+{
+ m_timing = AnimationEffectTiming::create();
+}
+
+} // namespace WebCore
Copied: trunk/Source/WebCore/animation/AnimationEffect.h (from rev 223882, trunk/Source/WebCore/animation/WebAnimation.h) (0 => 223883)
--- trunk/Source/WebCore/animation/AnimationEffect.h (rev 0)
+++ trunk/Source/WebCore/animation/AnimationEffect.h 2017-10-24 07:51:59 UTC (rev 223883)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "AnimationEffectTiming.h"
+#include <wtf/Forward.h>
+#include <wtf/Ref.h>
+#include <wtf/RefCounted.h>
+#include <wtf/RefPtr.h>
+
+namespace WebCore {
+
+class AnimationEffect : public RefCounted<AnimationEffect> {
+public:
+ bool isKeyframeEffect() const { return m_classType == KeyframeEffectClass; }
+ AnimationEffectTiming* timing() const { return m_timing.get(); }
+
+ virtual ~AnimationEffect() { }
+
+protected:
+ enum ClassType {
+ KeyframeEffectClass
+ };
+
+ ClassType classType() const { return m_classType; }
+
+ explicit AnimationEffect(ClassType);
+
+private:
+ ClassType m_classType;
+ RefPtr<AnimationEffectTiming> m_timing;
+};
+
+} // namespace WebCore
+
+#define SPECIALIZE_TYPE_TRAITS_ANIMATION_EFFECT(ToValueTypeName, predicate) \
+SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::ToValueTypeName) \
+static bool isType(const WebCore::AnimationEffect& value) { return value.predicate; } \
+SPECIALIZE_TYPE_TRAITS_END()
Copied: trunk/Source/WebCore/animation/AnimationEffect.idl (from rev 223882, trunk/Source/WebCore/animation/WebAnimation.idl) (0 => 223883)
--- trunk/Source/WebCore/animation/AnimationEffect.idl (rev 0)
+++ trunk/Source/WebCore/animation/AnimationEffect.idl 2017-10-24 07:51:59 UTC (rev 223883)
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+ EnabledAtRuntime=WebAnimations,
+ CustomToJSObject
+] interface AnimationEffect {
+ readonly attribute AnimationEffectTiming timing;
+};
Copied: trunk/Source/WebCore/animation/AnimationEffectTiming.cpp (from rev 223882, trunk/Source/WebCore/animation/WebAnimation.idl) (0 => 223883)
--- trunk/Source/WebCore/animation/AnimationEffectTiming.cpp (rev 0)
+++ trunk/Source/WebCore/animation/AnimationEffectTiming.cpp 2017-10-24 07:51:59 UTC (rev 223883)
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "AnimationEffectTiming.h"
+
+namespace WebCore {
+
+Ref<AnimationEffectTiming> AnimationEffectTiming::create()
+{
+ return adoptRef(*new AnimationEffectTiming());
+}
+
+AnimationEffectTiming::AnimationEffectTiming()
+ : m_duration(0)
+{
+}
+
+AnimationEffectTiming::~AnimationEffectTiming()
+{
+}
+
+} // namespace WebCore
Copied: trunk/Source/WebCore/animation/AnimationEffectTiming.h (from rev 223882, trunk/Source/WebCore/animation/WebAnimation.h) (0 => 223883)
--- trunk/Source/WebCore/animation/AnimationEffectTiming.h (rev 0)
+++ trunk/Source/WebCore/animation/AnimationEffectTiming.h 2017-10-24 07:51:59 UTC (rev 223883)
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include <wtf/Forward.h>
+#include <wtf/Ref.h>
+#include <wtf/RefCounted.h>
+#include <wtf/RefPtr.h>
+#include <wtf/Seconds.h>
+
+namespace WebCore {
+
+class AnimationEffectTiming final : public RefCounted<AnimationEffectTiming> {
+public:
+ static Ref<AnimationEffectTiming> create();
+ ~AnimationEffectTiming();
+
+ double bindingsDuration() const { return m_duration.value(); }
+ void setBindingsDuration(double duration) { m_duration = Seconds(duration); }
+ Seconds duration() const { return m_duration; }
+ void setDuration(Seconds& duration) { m_duration = duration; }
+
+private:
+ AnimationEffectTiming();
+ Seconds m_duration;
+};
+
+} // namespace WebCore
Copied: trunk/Source/WebCore/animation/AnimationEffectTiming.idl (from rev 223882, trunk/Source/WebCore/animation/WebAnimation.idl) (0 => 223883)
--- trunk/Source/WebCore/animation/AnimationEffectTiming.idl (rev 0)
+++ trunk/Source/WebCore/animation/AnimationEffectTiming.idl 2017-10-24 07:51:59 UTC (rev 223883)
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+ EnabledAtRuntime=WebAnimations,
+ ImplementationLacksVTable
+] interface AnimationEffectTiming {
+ [ImplementedAs=bindingsDuration] attribute unrestricted double duration;
+};
Copied: trunk/Source/WebCore/animation/KeyframeEffect.cpp (from rev 223882, trunk/Source/WebCore/animation/WebAnimation.idl) (0 => 223883)
--- trunk/Source/WebCore/animation/KeyframeEffect.cpp (rev 0)
+++ trunk/Source/WebCore/animation/KeyframeEffect.cpp 2017-10-24 07:51:59 UTC (rev 223883)
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "KeyframeEffect.h"
+
+#include "Element.h"
+
+namespace WebCore {
+
+Ref<KeyframeEffect> KeyframeEffect::create(Element* target)
+{
+ return adoptRef(*new KeyframeEffect(target));
+}
+
+KeyframeEffect::KeyframeEffect(Element* target)
+ : AnimationEffect(KeyframeEffectClass)
+ , m_target(target)
+{
+}
+
+} // namespace WebCore
Copied: trunk/Source/WebCore/animation/KeyframeEffect.h (from rev 223882, trunk/Source/WebCore/animation/WebAnimation.h) (0 => 223883)
--- trunk/Source/WebCore/animation/KeyframeEffect.h (rev 0)
+++ trunk/Source/WebCore/animation/KeyframeEffect.h 2017-10-24 07:51:59 UTC (rev 223883)
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "AnimationEffect.h"
+#include <wtf/Ref.h>
+
+namespace WebCore {
+
+class Element;
+
+class KeyframeEffect final : public AnimationEffect {
+public:
+ static Ref<KeyframeEffect> create(Element*);
+ ~KeyframeEffect() { }
+
+ Element* target() const { return m_target.get(); }
+
+private:
+ KeyframeEffect(Element*);
+ RefPtr<Element> m_target;
+
+};
+
+} // namespace WebCore
+
+SPECIALIZE_TYPE_TRAITS_ANIMATION_EFFECT(KeyframeEffect, isKeyframeEffect());
Copied: trunk/Source/WebCore/animation/KeyframeEffect.idl (from rev 223882, trunk/Source/WebCore/animation/WebAnimation.idl) (0 => 223883)
--- trunk/Source/WebCore/animation/KeyframeEffect.idl (rev 0)
+++ trunk/Source/WebCore/animation/KeyframeEffect.idl 2017-10-24 07:51:59 UTC (rev 223883)
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+ EnabledAtRuntime=WebAnimations,
+ Constructor(Element? target)
+] interface KeyframeEffect : AnimationEffect {
+ readonly attribute Element? target;
+};
Modified: trunk/Source/WebCore/animation/WebAnimation.cpp (223882 => 223883)
--- trunk/Source/WebCore/animation/WebAnimation.cpp 2017-10-24 07:41:39 UTC (rev 223882)
+++ trunk/Source/WebCore/animation/WebAnimation.cpp 2017-10-24 07:51:59 UTC (rev 223883)
@@ -25,9 +25,10 @@
#include "config.h"
#include "WebAnimation.h"
-#include <wtf/text/WTFString.h>
+#include "AnimationEffect.h"
#include "AnimationTimeline.h"
+#include <wtf/text/WTFString.h>
namespace WebCore {
@@ -52,6 +53,26 @@
m_timeline->removeAnimation(*this);
}
+void WebAnimation::setEffect(RefPtr<AnimationEffect>&& effect)
+{
+ m_effect = WTFMove(effect);
+}
+
+std::optional<double> WebAnimation::bindingsStartTime() const
+{
+ if (m_startTime)
+ return m_startTime->secondsSinceEpoch().value();
+ return std::nullopt;
+}
+
+void WebAnimation::setBindingsStartTime(std::optional<double> startTime)
+{
+ if (startTime == std::nullopt)
+ m_startTime = std::nullopt;
+ else
+ m_startTime = MonotonicTime::fromRawSeconds(startTime.value());
+}
+
String WebAnimation::description()
{
return "Animation";
Modified: trunk/Source/WebCore/animation/WebAnimation.h (223882 => 223883)
--- trunk/Source/WebCore/animation/WebAnimation.h 2017-10-24 07:41:39 UTC (rev 223882)
+++ trunk/Source/WebCore/animation/WebAnimation.h 2017-10-24 07:51:59 UTC (rev 223883)
@@ -26,6 +26,8 @@
#pragma once
#include <wtf/Forward.h>
+#include <wtf/MonotonicTime.h>
+#include <wtf/Optional.h>
#include <wtf/Ref.h>
#include <wtf/RefCounted.h>
#include <wtf/RefPtr.h>
@@ -32,6 +34,7 @@
namespace WebCore {
+class AnimationEffect;
class AnimationTimeline;
class WebAnimation final : public RefCounted<WebAnimation> {
@@ -39,12 +42,21 @@
static Ref<WebAnimation> create(AnimationTimeline*);
~WebAnimation();
+ AnimationEffect* effect() const { return m_effect.get(); }
+ void setEffect(RefPtr<AnimationEffect>&&);
AnimationTimeline* timeline() const { return m_timeline.get(); }
+ std::optional<double> bindingsStartTime() const;
+ void setBindingsStartTime(std::optional<double>);
+ std::optional<MonotonicTime> startTime() const { return m_startTime; }
+ void setStartTime(MonotonicTime& startTime) { m_startTime = startTime; }
+
String description();
private:
WebAnimation(AnimationTimeline*);
+ RefPtr<AnimationEffect> m_effect;
RefPtr<AnimationTimeline> m_timeline;
+ std::optional<MonotonicTime> m_startTime;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/animation/WebAnimation.idl (223882 => 223883)
--- trunk/Source/WebCore/animation/WebAnimation.idl 2017-10-24 07:41:39 UTC (rev 223882)
+++ trunk/Source/WebCore/animation/WebAnimation.idl 2017-10-24 07:51:59 UTC (rev 223883)
@@ -29,5 +29,7 @@
ImplementationLacksVTable,
Constructor(optional AnimationTimeline? timeline)
] interface WebAnimation {
+ attribute AnimationEffect? effect;
readonly attribute AnimationTimeline? timeline;
+ [ImplementedAs=bindingsStartTime] attribute double? startTime;
};
Copied: trunk/Source/WebCore/bindings/js/JSAnimationEffectCustom.cpp (from rev 223882, trunk/Source/WebCore/animation/WebAnimation.cpp) (0 => 223883)
--- trunk/Source/WebCore/bindings/js/JSAnimationEffectCustom.cpp (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSAnimationEffectCustom.cpp 2017-10-24 07:51:59 UTC (rev 223883)
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "JSAnimationEffect.h"
+
+#include "JSDOMBinding.h"
+#include "JSKeyframeEffect.h"
+#include "KeyframeEffect.h"
+
+using namespace JSC;
+
+namespace WebCore {
+
+JSValue toJSNewlyCreated(ExecState*, JSDOMGlobalObject* globalObject, Ref<AnimationEffect>&& value)
+{
+ if (value->isKeyframeEffect())
+ return createWrapper<KeyframeEffect>(globalObject, WTFMove(value));
+ return createWrapper<AnimationEffect>(globalObject, WTFMove(value));
+}
+
+JSValue toJS(ExecState* state, JSDOMGlobalObject* globalObject, AnimationEffect& value)
+{
+ return wrap(state, globalObject, value);
+}
+
+} // namespace WebCore
Modified: trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h (223882 => 223883)
--- trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h 2017-10-24 07:41:39 UTC (rev 223882)
+++ trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h 2017-10-24 07:51:59 UTC (rev 223883)
@@ -32,6 +32,8 @@
#define WEBCORE_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(macro) \
macro(Animation) \
+ macro(AnimationEffect) \
+ macro(AnimationEffectTiming) \
macro(AnimationTimeline) \
macro(ApplePaySession) \
macro(AttachmentElement) \
@@ -75,6 +77,7 @@
macro(InputEvent) \
macro(IntersectionObserver) \
macro(IntersectionObserverEntry) \
+ macro(KeyframeEffect) \
macro(MediaEncryptedEvent) \
macro(MediaKeyMessageEvent) \
macro(MediaKeySession) \