[web-animations] Add Animatable, AnimationEffect, KeyframeEffect and Animation interface
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Aug 2016 13:58:37 +0000 (13:58 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Aug 2016 13:58:37 +0000 (13:58 +0000)
commit4ed0240db5a8947c195985d67810911b1b5318df
tree78a4530ace025e22d9f5465c91f8963688d27d28
parent830a42b3826ba4287f287b9dbe3fb89b51ae6a09
[web-animations] Add Animatable, AnimationEffect, KeyframeEffect and Animation interface
https://bugs.webkit.org/show_bug.cgi?id=156096

Patch by Rawinder Singh <rawinder.singh-webkit@cisra.canon.com.au> on 2016-08-18
Reviewed by Dean Jackson.

Adds:
Source/JavaScriptCore:

- Animatable interface and implementation of getAnimations in Element.
- Interface and implementation for Document getAnimations method.
- AnimationEffect interface and class stub.
- KeyframeEffect interface and constructor implementation.
- 'Animation' interface, constructor and query methods for effect and timeline.
- Remove runtime condition on Web animation interfaces (compile time flag is specified).

* runtime/CommonIdentifiers.h:

Source/WebCore:

- Animatable interface and implementation of getAnimations in Element.
- Interface and implementation for Document getAnimations method.
- AnimationEffect interface and class stub.
- KeyframeEffect interface and constructor implementation.
- 'Animation' interface, constructor and query methods for effect and timeline.
- Remove runtime condition on Web animation interfaces (compile time flag is specified).

Test: webanimations/Document.html

* CMakeLists.txt:
* DerivedSources.make:
* PlatformGTK.cmake:
* WebCore.xcodeproj/project.pbxproj:
* animation/Animatable.idl: Copied from Source/WebCore/animation/AnimationTimeline.idl.
* animation/AnimationEffect.cpp: Copied from Source/WebCore/animation/AnimationTimeline.cpp.
(WebCore::AnimationEffect::AnimationEffect):
(WebCore::AnimationEffect::~AnimationEffect):
(WebCore::AnimationEffect::setAnimation):
(WebCore::AnimationEffect::isCurrent):
(WebCore::AnimationEffect::isInEffect):
* animation/AnimationEffect.h: Copied from Source/WebCore/animation/DocumentTimeline.cpp.
* animation/AnimationEffect.idl: Copied from Source/WebCore/animation/DocumentAnimation.idl.
* animation/AnimationTimeline.cpp:
(WebCore::AnimationTimeline::destroy):
(WebCore::AnimationTimeline::attachAnimation):
(WebCore::AnimationTimeline::detachAnimation):
* animation/AnimationTimeline.h:
* animation/AnimationTimeline.idl:
* animation/DocumentAnimation.cpp:
(WebCore::DocumentAnimation::timeline):
(WebCore::DocumentAnimation::getAnimations):
(WebCore::DocumentAnimation::addAnimation):
(WebCore::DocumentAnimation::removeAnimation):
* animation/DocumentAnimation.h:
(WebCore::DocumentAnimation::getAnimations):
* animation/DocumentAnimation.idl:
* animation/DocumentTimeline.cpp:
(WebCore::DocumentTimeline::create):
(WebCore::DocumentTimeline::DocumentTimeline):
(WebCore::DocumentTimeline::attach):
(WebCore::DocumentTimeline::detach):
* animation/DocumentTimeline.h:
* animation/DocumentTimeline.idl:
* animation/KeyframeEffect.cpp: Copied from Source/WebCore/animation/DocumentTimeline.cpp.
(WebCore::KeyframeEffect::create):
(WebCore::KeyframeEffect::KeyframeEffect):
(WebCore::KeyframeEffect::~KeyframeEffect):
* animation/KeyframeEffect.h: Copied from Source/WebCore/animation/DocumentTimeline.h.
* animation/KeyframeEffect.idl: Copied from Source/WebCore/animation/DocumentTimeline.idl.
* animation/WebAnimation.cpp: Copied from Source/WebCore/animation/DocumentAnimation.cpp.
(WebCore::WebAnimation::create):
(WebCore::WebAnimation::WebAnimation):
(WebCore::WebAnimation::~WebAnimation):
* animation/WebAnimation.h: Copied from Source/WebCore/animation/DocumentAnimation.h.
* animation/WebAnimation.idl: Copied from Source/WebCore/animation/DocumentTimeline.idl.
* bindings/scripts/CodeGeneratorGObject.pm:
* dom/Element.cpp:
(WebCore::Element::getAnimations):
* dom/Element.h:
* dom/Element.idl:

Source/WebKit/mac:

- Setup interface for enabling runtime flag for Web animations through preferences.

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences webAnimationsEnabled]):
(-[WebPreferences setWebAnimationsEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

LayoutTests:

- Animatable interface and implementation of getAnimations in Element.
- Interface and implementation for Document getAnimations method.
- AnimationEffect interface and class stub.
- KeyframeEffect interface and constructor implementation.
- 'Animation' interface, constructor and query methods for effect and timeline.
- Remove runtime condition on Web animation interfaces (compile time flag is specified).

* platform/gtk/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
* webanimations/Document-expected.txt: Added.
* webanimations/Document.html: Added.
* webanimations/script-tests/Document.js: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204594 268f45cc-cd09-0410-ab3c-d52691b4dbfc
42 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt
LayoutTests/webanimations/Document-expected.txt [new file with mode: 0644]
LayoutTests/webanimations/Document.html [new file with mode: 0644]
LayoutTests/webanimations/script-tests/Document.js [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/CommonIdentifiers.h
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/PlatformGTK.cmake
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/animation/Animatable.idl [new file with mode: 0644]
Source/WebCore/animation/AnimationEffect.cpp [new file with mode: 0644]
Source/WebCore/animation/AnimationEffect.h [new file with mode: 0644]
Source/WebCore/animation/AnimationEffect.idl [new file with mode: 0644]
Source/WebCore/animation/AnimationTimeline.cpp
Source/WebCore/animation/AnimationTimeline.h
Source/WebCore/animation/AnimationTimeline.idl
Source/WebCore/animation/DocumentAnimation.cpp
Source/WebCore/animation/DocumentAnimation.h
Source/WebCore/animation/DocumentAnimation.idl
Source/WebCore/animation/DocumentTimeline.cpp
Source/WebCore/animation/DocumentTimeline.h
Source/WebCore/animation/DocumentTimeline.h.rej [new file with mode: 0644]
Source/WebCore/animation/DocumentTimeline.idl
Source/WebCore/animation/KeyframeEffect.cpp [new file with mode: 0644]
Source/WebCore/animation/KeyframeEffect.h [new file with mode: 0644]
Source/WebCore/animation/KeyframeEffect.idl [new file with mode: 0644]
Source/WebCore/animation/WebAnimation.cpp [new file with mode: 0644]
Source/WebCore/animation/WebAnimation.h [new file with mode: 0644]
Source/WebCore/animation/WebAnimation.idl [new file with mode: 0644]
Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/Element.h
Source/WebCore/dom/Element.idl
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
Source/WebKit/mac/WebView/WebPreferences.mm
Source/WebKit/mac/WebView/WebPreferencesPrivate.h
Source/WebKit/mac/WebView/WebView.mm