[Web Animations] Provide basic timeline and animation interfaces
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Oct 2017 18:41:23 +0000 (18:41 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Oct 2017 18:41:23 +0000 (18:41 +0000)
commit9c4eaad7888e6b5105415c6b2c48956b3024ff58
tree2258b2096bfc13f0a2b6463373439e67523e548f
parenta99c5c77ab030f3c239ea83fa145c68d6bed4752
[Web Animations] Provide basic timeline and animation interfaces
https://bugs.webkit.org/show_bug.cgi?id=178526

Patch by Antoine Quint <graouts@apple.com> on 2017-10-20
Reviewed by Dean Jackson.

.:

Remove the WEB_ANIMATIONS compile-time flag.

* Source/cmake/OptionsWPE.cmake:
* Source/cmake/OptionsWin.cmake:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmake/tools/vsprops/FeatureDefines.props:
* Source/cmake/tools/vsprops/FeatureDefinesCairo.props:

Source/JavaScriptCore:

Remove the WEB_ANIMATIONS compile-time flag.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

We're getting Web Animations work started by implementing a very minimal codebase which provides
a DocumentTimeline class which has an instance created for each Document. The parent class,
AnimationTimeline, allows for animations to be added and removed, and animations can be created
using the Animation class, with an optional timeline as parameter.

Tests: webanimations/animation-creation-basic.html
       webanimations/document-timeline.html

* CMakeLists.txt:
* Configurations/FeatureDefines.xcconfig:
* DerivedSources.make:
* PlatformWin.cmake:
* WebCore.xcodeproj/project.pbxproj:
* animation/AnimationTimeline.cpp: Added.
(WebCore::AnimationTimeline::AnimationTimeline):
(WebCore::AnimationTimeline::~AnimationTimeline):
(WebCore::AnimationTimeline::addAnimation):
(WebCore::AnimationTimeline::removeAnimation):
* animation/AnimationTimeline.h: Added.
(WebCore::AnimationTimeline::isDocumentTimeline const):
(WebCore::AnimationTimeline::classType const):
* animation/AnimationTimeline.idl: Added.
* animation/DocumentTimeline.cpp: Added.
(WebCore::DocumentTimeline::create):
(WebCore::DocumentTimeline::DocumentTimeline):
* animation/DocumentTimeline.h: Added.
* animation/DocumentTimeline.idl: Added.
* animation/WebAnimation.cpp: Added.
(WebCore::WebAnimation::create):
(WebCore::WebAnimation::WebAnimation):
(WebCore::WebAnimation::~WebAnimation):
* animation/WebAnimation.h: Added.
* animation/WebAnimation.idl: Added.
* bindings/js/JSAnimationTimelineCustom.cpp: Added.
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
* bindings/js/WebCoreBuiltinNames.h:
* dom/Document.cpp:
(WebCore::Document::timeline):
* dom/Document.h:
* dom/Document.idl:
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::webAnimationsEnabled const):

Source/WebCore/PAL:

Remove the WEB_ANIMATIONS compile-time flag.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit:

Remove the WEB_ANIMATIONS compile-time flag.

* Configurations/FeatureDefines.xcconfig:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
(WebKit::InjectedBundle::setWebAnimationsEnabled):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Source/WebKitLegacy/mac:

Remove the WEB_ANIMATIONS compile-time flag.

* Configurations/FeatureDefines.xcconfig:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKitLegacy/win:

Remove the WEB_ANIMATIONS compile-time flag.

* WebView.cpp:
(WebView::notifyPreferencesChanged):

Source/WTF:

Remove the WEB_ANIMATIONS compile-time flag.

* wtf/FeatureDefines.h:

Tools:

Remove the WEB_ANIMATIONS compile-time flag.

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

LayoutTests:

Basic test coverage to check that we are exposing a DocumentTimeline instance on
the Document and that we can construct Animations, optionally associated with a timeline.

* platform/mac-elcapitan/TestExpectations:
* webanimations/animation-creation-basic-expected.txt: Added.
* webanimations/animation-creation-basic.html: Added.
* webanimations/document-timeline-expected.txt: Added.
* webanimations/document-timeline.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223779 268f45cc-cd09-0410-ab3c-d52691b4dbfc
51 files changed:
ChangeLog
LayoutTests/ChangeLog
LayoutTests/platform/mac-elcapitan/TestExpectations
LayoutTests/webanimations/animation-creation-basic-expected.txt [new file with mode: 0644]
LayoutTests/webanimations/animation-creation-basic.html [new file with mode: 0644]
LayoutTests/webanimations/document-timeline-expected.txt [new file with mode: 0644]
LayoutTests/webanimations/document-timeline.html [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig
Source/WTF/ChangeLog
Source/WTF/wtf/FeatureDefines.h
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/Configurations/FeatureDefines.xcconfig
Source/WebCore/DerivedSources.make
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig
Source/WebCore/PlatformWin.cmake
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/animation/AnimationTimeline.cpp [new file with mode: 0644]
Source/WebCore/animation/AnimationTimeline.h [new file with mode: 0644]
Source/WebCore/animation/AnimationTimeline.idl [new file with mode: 0644]
Source/WebCore/animation/DocumentTimeline.cpp [new file with mode: 0644]
Source/WebCore/animation/DocumentTimeline.h [new file with mode: 0644]
Source/WebCore/animation/DocumentTimeline.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/js/JSAnimationTimelineCustom.cpp [new file with mode: 0644]
Source/WebCore/bindings/js/WebCoreBuiltinNames.h
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/dom/Document.idl
Source/WebCore/page/RuntimeEnabledFeatures.h
Source/WebKit/ChangeLog
Source/WebKit/Configurations/FeatureDefines.xcconfig
Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp
Source/WebKit/WebProcess/WebPage/WebPage.cpp
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/Configurations/FeatureDefines.xcconfig
Source/WebKitLegacy/mac/WebView/WebPreferences.mm
Source/WebKitLegacy/mac/WebView/WebView.mm
Source/WebKitLegacy/win/ChangeLog
Source/WebKitLegacy/win/WebView.cpp
Source/cmake/OptionsWPE.cmake
Source/cmake/OptionsWin.cmake
Source/cmake/WebKitFeatures.cmake
Source/cmake/tools/vsprops/FeatureDefines.props
Source/cmake/tools/vsprops/FeatureDefinesCairo.props
Tools/ChangeLog
Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig