-
alexis@webkit.org authored
https://bugs.webkit.org/show_bug.cgi?id=107319 Reviewed by Dean Jackson. Source/WebCore: Make possible to construct unprefixed DOM events for transitions. Unfortunately I have to duplicate the C++ implementation class of the events (TransitionEvent.h and TransitionEvent.cpp). I can't find a better way to re-use the WebKitTransitionEvent class to back the TransitionEvent.idl as our code generators don't allow to have a different name for the C++ class used in the generated file than the interface name specified in the IDL file. Unfortunately https://trac.webkit.org/wiki/WebKitIDL#InterfaceName doesn't help as it's only a way to unlink the interface name specified in the IDL with the one exposed in JavaScript. I don't think we should support such a feature in our code generators as WebKitTransitionEvent class and more exactly prefixed DOM events for transitions will be removed one day so this use case will become obselete. Test: fast/events/constructors/transition-event-constructor.html * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/DOMAllInOne.cpp: * dom/EventNames.in: * dom/TransitionEvent.cpp: Added. (WebCore): (WebCore::TransitionEventInit::TransitionEventInit): (WebCore::TransitionEvent::TransitionEvent): (WebCore::TransitionEvent::~TransitionEvent): (WebCore::TransitionEvent::propertyName): (WebCore::TransitionEvent::elapsedTime): (WebCore::TransitionEvent::interfaceName): * dom/TransitionEvent.h: Added. (WebCore): (TransitionEventInit): (TransitionEvent): (WebCore::TransitionEvent::create): * dom/TransitionEvent.idl: Added. * page/DOMWindow.idl: * page/animation/AnimationController.cpp: (WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle): always create a TransitionEvent now. EventTarget will be responsible to create a WebKitTransitionEvent if necessary. LayoutTests: Add new tests to cover the feature. Update some existing ones with new expected results as a new constructor was added. * fast/dom/constructed-objects-prototypes.html: * fast/dom/constructed-objects-prototypes-expected.txt: * fast/events/constructors/transition-event-constructor-expected.txt: Added. * fast/events/constructors/transition-event-constructor.html: Added. * fast/events/event-creation.html: * platform/chromium/TestExpectations: Chromium turns the feature off. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140448 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1693c0c9