Changeset 251840 in webkit
- Timestamp:
- Oct 31, 2019 5:43:37 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r251839 r251840 1 2019-10-31 Antoine Quint <graouts@apple.com> 2 3 [Web Animations] Add support for AnimationEvent.pseudoElement 4 https://bugs.webkit.org/show_bug.cgi?id=203671 5 6 Reviewed by Dean Jackson. 7 8 Mark WPT progressions. 9 10 * web-platform-tests/css/css-animations/animationevent-interface-expected.txt: 11 * web-platform-tests/css/css-animations/animationevent-pseudoelement-expected.txt: 12 * web-platform-tests/css/css-animations/animationevent-types-expected.txt: 13 * web-platform-tests/css/css-animations/idlharness-expected.txt: 14 1 15 2019-10-31 Antoine Quint <graouts@apple.com> 2 16 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animationevent-interface-expected.txt
r251591 r251840 13 13 PASS animationEventInit argument is undefined 14 14 PASS animationEventInit argument is empty dictionary 15 FAIL AnimationEvent.pseudoElement initialized from the dictionary assert_equals: expected (string) "::testPseudo" but got (undefined) undefined 15 PASS AnimationEvent.pseudoElement initialized from the dictionary 16 16 PASS animationName set to 'sample' 17 17 PASS animationName set to undefined -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animationevent-pseudoelement-expected.txt
r232288 r251840 1 1 2 FAIL AnimationEvent should have the correct pseudoElement memeber assert_equals: expected (string) "::before" but got (undefined) undefined 2 PASS AnimationEvent should have the correct pseudoElement memeber 3 3 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animationevent-types-expected.txt
r232288 r251840 1 1 Filler Text 2 2 3 FAIL animationstart event is instanceof AnimationEvent assert_idl_attribute: animationstart has pseudoElement property property "pseudoElement" not found in prototype chain 4 FAIL animationend event is instanceof AnimationEvent assert_idl_attribute: animationstart has pseudoElement property property "pseudoElement" not found in prototype chain 5 FAIL animationiteration event is instanceof AnimationEvent assert_idl_attribute: animationstart has pseudoElement property property "pseudoElement" not found in prototype chain 3 PASS animationstart event is instanceof AnimationEvent 4 PASS animationend event is instanceof AnimationEvent 5 PASS animationiteration event is instanceof AnimationEvent 6 6 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/idlharness-expected.txt
r251591 r251840 11 11 PASS AnimationEvent interface: attribute animationName 12 12 PASS AnimationEvent interface: attribute elapsedTime 13 FAIL AnimationEvent interface: attribute pseudoElement assert_true: The prototype object must have a property "pseudoElement" expected true got false 13 PASS AnimationEvent interface: attribute pseudoElement 14 14 PASS AnimationEvent must be primary interface of new AnimationEvent("animationstart") 15 15 PASS Stringification of new AnimationEvent("animationstart") 16 16 PASS AnimationEvent interface: new AnimationEvent("animationstart") must inherit property "animationName" with the proper type 17 17 PASS AnimationEvent interface: new AnimationEvent("animationstart") must inherit property "elapsedTime" with the proper type 18 FAIL AnimationEvent interface: new AnimationEvent("animationstart") must inherit property "pseudoElement" with the proper type assert_inherits: property "pseudoElement" not found in prototype chain 18 PASS AnimationEvent interface: new AnimationEvent("animationstart") must inherit property "pseudoElement" with the proper type 19 19 PASS CSSKeyframeRule interface: existence and properties of interface object 20 20 PASS CSSKeyframeRule interface object length -
trunk/Source/WebCore/ChangeLog
r251839 r251840 1 2019-10-31 Antoine Quint <graouts@apple.com> 2 3 [Web Animations] Add support for AnimationEvent.pseudoElement 4 https://bugs.webkit.org/show_bug.cgi?id=203671 5 6 Reviewed by Dean Jackson. 7 8 * animation/DeclarativeAnimation.cpp: 9 (WebCore::DeclarativeAnimation::enqueueDOMEvent): 10 * dom/AnimationEvent.cpp: 11 (WebCore::AnimationEvent::AnimationEvent): 12 (WebCore::AnimationEvent::pseudoElement const): 13 * dom/AnimationEvent.h: 14 * dom/AnimationEvent.idl: 15 * dom/WebKitAnimationEvent.cpp: 16 (WebCore::WebKitAnimationEvent::WebKitAnimationEvent): 17 (WebCore::WebKitAnimationEvent::pseudoElement const): 18 * dom/WebKitAnimationEvent.h: 19 * dom/WebKitAnimationEvent.idl: 20 * page/animation/CSSAnimationController.cpp: 21 (WebCore::CSSAnimationControllerPrivate::fireEventsAndUpdateStyle): 22 1 23 2019-10-31 Antoine Quint <graouts@apple.com> 2 24 -
trunk/Source/WebCore/animation/DeclarativeAnimation.cpp
r251742 r251840 342 342 auto time = secondsToWebAnimationsAPITime(elapsedTime) / 1000; 343 343 if (is<CSSAnimation>(this)) 344 m_eventQueue->enqueueEvent(AnimationEvent::create(eventType, downcast<CSSAnimation>(this)->animationName(), time ));344 m_eventQueue->enqueueEvent(AnimationEvent::create(eventType, downcast<CSSAnimation>(this)->animationName(), time, PseudoElement::pseudoElementNameForEvents(m_owningElement->pseudoId()))); 345 345 else if (is<CSSTransition>(this)) 346 346 m_eventQueue->enqueueEvent(TransitionEvent::create(eventType, downcast<CSSTransition>(this)->transitionProperty(), time, PseudoElement::pseudoElementNameForEvents(m_owningElement->pseudoId()))); -
trunk/Source/WebCore/dom/AnimationEvent.cpp
r250060 r251840 37 37 , m_animationName(initializer.animationName) 38 38 , m_elapsedTime(initializer.elapsedTime) 39 , m_pseudoElement(initializer.pseudoElement) 39 40 { 40 41 } 41 42 42 AnimationEvent::AnimationEvent(const AtomString& type, const String& animationName, double elapsedTime )43 AnimationEvent::AnimationEvent(const AtomString& type, const String& animationName, double elapsedTime, const String& pseudoElement) 43 44 : Event(type, CanBubble::Yes, IsCancelable::No) 44 45 , m_animationName(animationName) 45 46 , m_elapsedTime(elapsedTime) 47 , m_pseudoElement(pseudoElement) 46 48 { 47 49 } … … 59 61 } 60 62 63 const String& AnimationEvent::pseudoElement() const 64 { 65 return m_pseudoElement; 66 } 67 61 68 EventInterface AnimationEvent::eventInterface() const 62 69 { -
trunk/Source/WebCore/dom/AnimationEvent.h
r250060 r251840 33 33 WTF_MAKE_ISO_ALLOCATED(AnimationEvent); 34 34 public: 35 static Ref<AnimationEvent> create(const AtomString& type, const String& animationName, double elapsedTime )35 static Ref<AnimationEvent> create(const AtomString& type, const String& animationName, double elapsedTime, const String& pseudoElement) 36 36 { 37 return adoptRef(*new AnimationEvent(type, animationName, elapsedTime ));37 return adoptRef(*new AnimationEvent(type, animationName, elapsedTime, pseudoElement)); 38 38 } 39 39 … … 41 41 String animationName; 42 42 double elapsedTime { 0 }; 43 String pseudoElement; 43 44 }; 44 45 … … 52 53 const String& animationName() const; 53 54 double elapsedTime() const; 55 const String& pseudoElement() const; 54 56 55 57 EventInterface eventInterface() const override; 56 58 57 59 private: 58 AnimationEvent(const AtomString& type, const String& animationName, double elapsedTime );60 AnimationEvent(const AtomString& type, const String& animationName, double elapsedTime, const String& pseudoElement); 59 61 AnimationEvent(const AtomString&, const Init&, IsTrusted); 60 62 61 63 String m_animationName; 62 64 double m_elapsedTime; 65 String m_pseudoElement; 63 66 }; 64 67 -
trunk/Source/WebCore/dom/AnimationEvent.idl
r207188 r251840 29 29 readonly attribute DOMString animationName; 30 30 readonly attribute double elapsedTime; 31 32 // FIXME: This is not supported yet. 33 // readonly attribute DOMString pseudoElement; 31 readonly attribute DOMString pseudoElement; 34 32 }; 35 33 … … 37 35 DOMString animationName = ""; 38 36 double elapsedTime = 0.0; 39 40 // FIXME: This is not supported yet. 41 // DOMString pseudoElement = ""; 37 DOMString pseudoElement = ""; 42 38 }; 43 39 -
trunk/Source/WebCore/dom/WebKitAnimationEvent.cpp
r250060 r251840 37 37 , m_animationName(initializer.animationName) 38 38 , m_elapsedTime(initializer.elapsedTime) 39 , m_pseudoElement(initializer.pseudoElement) 39 40 { 40 41 } 41 42 42 WebKitAnimationEvent::WebKitAnimationEvent(const AtomString& type, const String& animationName, double elapsedTime )43 WebKitAnimationEvent::WebKitAnimationEvent(const AtomString& type, const String& animationName, double elapsedTime, const String& pseudoElement) 43 44 : Event(type, CanBubble::Yes, IsCancelable::Yes) 44 45 , m_animationName(animationName) 45 46 , m_elapsedTime(elapsedTime) 47 , m_pseudoElement(pseudoElement) 46 48 { 47 49 } … … 59 61 } 60 62 63 const String& WebKitAnimationEvent::pseudoElement() const 64 { 65 return m_pseudoElement; 66 } 67 61 68 EventInterface WebKitAnimationEvent::eventInterface() const 62 69 { -
trunk/Source/WebCore/dom/WebKitAnimationEvent.h
r250060 r251840 33 33 WTF_MAKE_ISO_ALLOCATED(WebKitAnimationEvent); 34 34 public: 35 static Ref<WebKitAnimationEvent> create(const AtomString& type, const String& animationName, double elapsedTime )35 static Ref<WebKitAnimationEvent> create(const AtomString& type, const String& animationName, double elapsedTime, const String& pseudoElement) 36 36 { 37 return adoptRef(*new WebKitAnimationEvent(type, animationName, elapsedTime ));37 return adoptRef(*new WebKitAnimationEvent(type, animationName, elapsedTime, pseudoElement)); 38 38 } 39 39 … … 41 41 String animationName; 42 42 double elapsedTime { 0.0 }; 43 String pseudoElement; 43 44 }; 44 45 … … 52 53 const String& animationName() const; 53 54 double elapsedTime() const; 55 const String& pseudoElement() const; 54 56 55 57 EventInterface eventInterface() const override; 56 58 57 59 private: 58 WebKitAnimationEvent(const AtomString& type, const String& animationName, double elapsedTime );60 WebKitAnimationEvent(const AtomString& type, const String& animationName, double elapsedTime, const String& pseudoElement); 59 61 WebKitAnimationEvent(const AtomString&, const Init&, IsTrusted); 60 62 61 63 String m_animationName; 62 64 double m_elapsedTime; 65 String m_pseudoElement; 63 66 }; 64 67 -
trunk/Source/WebCore/dom/WebKitAnimationEvent.idl
r207215 r251840 29 29 readonly attribute DOMString animationName; 30 30 readonly attribute double elapsedTime; 31 readonly attribute DOMString pseudoElement; 31 32 }; 32 33 … … 34 35 DOMString animationName = ""; 35 36 double elapsedTime = 0; 37 DOMString pseudoElement = ""; 36 38 }; -
trunk/Source/WebCore/page/animation/CSSAnimationController.cpp
r251220 r251840 228 228 element.dispatchEvent(TransitionEvent::create(event.eventType, event.name, event.elapsedTime, PseudoElement::pseudoElementNameForEvents(element.pseudoId()))); 229 229 else 230 element.dispatchEvent(AnimationEvent::create(event.eventType, event.name, event.elapsedTime ));230 element.dispatchEvent(AnimationEvent::create(event.eventType, event.name, event.elapsedTime, PseudoElement::pseudoElementNameForEvents(element.pseudoId()))); 231 231 } 232 232
Note: See TracChangeset
for help on using the changeset viewer.