Changeset 207514 in webkit
- Timestamp:
- Oct 18, 2016 7:03:07 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r207509 r207514 1 2016-10-18 Chris Dumez <cdumez@apple.com> 2 3 Changing details.open should cause a toggle event to be fired asynchronously 4 https://bugs.webkit.org/show_bug.cgi?id=163568 5 6 Reviewed by Darin Adler. 7 8 Rebaseline existing test now that a new ontoggle attribute is exposed. 9 10 * js/dom/dom-static-property-for-in-iteration-expected.txt: 11 1 12 2016-10-18 Chris Dumez <cdumez@apple.com> 2 13 -
trunk/LayoutTests/imported/w3c/ChangeLog
r207497 r207514 1 2016-10-18 Chris Dumez <cdumez@apple.com> 2 3 Changing details.open should cause a toggle event to be fired asynchronously 4 https://bugs.webkit.org/show_bug.cgi?id=163568 5 6 Reviewed by Darin Adler. 7 8 * web-platform-tests/html/dom/interfaces-expected.txt: 9 Rebaseline W3C test now that more checks are passing. 10 11 * web-platform-tests/html/semantics/interactive-elements/the-details-element/toggleEvent-expected.txt: Added. 12 * web-platform-tests/html/semantics/interactive-elements/the-details-element/toggleEvent.html: Added. 13 * web-platform-tests/html/semantics/interactive-elements/the-details-element/w3c-import.log: 14 Import test coverage for the toggle event. 15 1 16 2016-10-18 Chris Dumez <cdumez@apple.com> 2 17 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt
r207380 r207514 115 115 PASS Document interface: attribute onsuspend 116 116 PASS Document interface: attribute ontimeupdate 117 FAIL Document interface: attribute ontoggle assert_true: The prototype object must have a property "ontoggle" expected true got false 117 PASS Document interface: attribute ontoggle 118 118 PASS Document interface: attribute onvolumechange 119 119 PASS Document interface: attribute onwaiting … … 301 301 PASS Document interface: iframe.contentDocument must inherit property "onsuspend" with the proper type (145) 302 302 PASS Document interface: iframe.contentDocument must inherit property "ontimeupdate" with the proper type (146) 303 FAIL Document interface: iframe.contentDocument must inherit property "ontoggle" with the proper type (147) assert_inherits: property "ontoggle" not found in prototype chain 303 PASS Document interface: iframe.contentDocument must inherit property "ontoggle" with the proper type (147) 304 304 PASS Document interface: iframe.contentDocument must inherit property "onvolumechange" with the proper type (148) 305 305 PASS Document interface: iframe.contentDocument must inherit property "onwaiting" with the proper type (149) … … 549 549 PASS Document interface: new Document() must inherit property "onsuspend" with the proper type (145) 550 550 PASS Document interface: new Document() must inherit property "ontimeupdate" with the proper type (146) 551 FAIL Document interface: new Document() must inherit property "ontoggle" with the proper type (147) assert_inherits: property "ontoggle" not found in prototype chain 551 PASS Document interface: new Document() must inherit property "ontoggle" with the proper type (147) 552 552 PASS Document interface: new Document() must inherit property "onvolumechange" with the proper type (148) 553 553 PASS Document interface: new Document() must inherit property "onwaiting" with the proper type (149) … … 797 797 PASS Document interface: document.implementation.createDocument(null, "", null) must inherit property "onsuspend" with the proper type (145) 798 798 PASS Document interface: document.implementation.createDocument(null, "", null) must inherit property "ontimeupdate" with the proper type (146) 799 FAIL Document interface: document.implementation.createDocument(null, "", null) must inherit property "ontoggle" with the proper type (147) assert_inherits: property "ontoggle" not found in prototype chain 799 PASS Document interface: document.implementation.createDocument(null, "", null) must inherit property "ontoggle" with the proper type (147) 800 800 PASS Document interface: document.implementation.createDocument(null, "", null) must inherit property "onvolumechange" with the proper type (148) 801 801 PASS Document interface: document.implementation.createDocument(null, "", null) must inherit property "onwaiting" with the proper type (149) … … 1014 1014 PASS HTMLElement interface: attribute onsuspend 1015 1015 PASS HTMLElement interface: attribute ontimeupdate 1016 FAIL HTMLElement interface: attribute ontoggle assert_true: The prototype object must have a property "ontoggle" expected true got false 1016 PASS HTMLElement interface: attribute ontoggle 1017 1017 PASS HTMLElement interface: attribute onvolumechange 1018 1018 PASS HTMLElement interface: attribute onwaiting … … 1099 1099 PASS HTMLElement interface: document.createElement("noscript") must inherit property "onsuspend" with the proper type (73) 1100 1100 PASS HTMLElement interface: document.createElement("noscript") must inherit property "ontimeupdate" with the proper type (74) 1101 FAIL HTMLElement interface: document.createElement("noscript") must inherit property "ontoggle" with the proper type (75) assert_inherits: property "ontoggle" not found in prototype chain 1101 PASS HTMLElement interface: document.createElement("noscript") must inherit property "ontoggle" with the proper type (75) 1102 1102 PASS HTMLElement interface: document.createElement("noscript") must inherit property "onvolumechange" with the proper type (76) 1103 1103 PASS HTMLElement interface: document.createElement("noscript") must inherit property "onwaiting" with the proper type (77) … … 5033 5033 PASS Window interface: attribute onsuspend 5034 5034 PASS Window interface: attribute ontimeupdate 5035 FAIL Window interface: attribute ontoggle assert_own_property: The global object must have a property "ontoggle" expected property "ontoggle" missing 5035 PASS Window interface: attribute ontoggle 5036 5036 PASS Window interface: attribute onvolumechange 5037 5037 PASS Window interface: attribute onwaiting … … 5160 5160 PASS Window interface: window must inherit property "onsuspend" with the proper type (93) 5161 5161 PASS Window interface: window must inherit property "ontimeupdate" with the proper type (94) 5162 FAIL Window interface: window must inherit property "ontoggle" with the proper type (95) assert_own_property: expected property "ontoggle" missing 5162 PASS Window interface: window must inherit property "ontoggle" with the proper type (95) 5163 5163 PASS Window interface: window must inherit property "onvolumechange" with the proper type (96) 5164 5164 PASS Window interface: window must inherit property "onwaiting" with the proper type (97) -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-details-element/w3c-import.log
r200238 r207514 17 17 List of files: 18 18 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-details-element/details.html 19 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-details-element/toggleEvent.html -
trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt
r204729 r207514 100 100 PASS a["onsuspend"] is null 101 101 PASS a["ontimeupdate"] is null 102 PASS a["ontoggle"] is null 102 103 PASS a["onvolumechange"] is null 103 104 PASS a["onwaiting"] is null … … 110 111 PASS a["localName"] is a 111 112 PASS a["offsetLeft"] is 8 112 PASS a["offsetTop"] is 16 74113 PASS a["offsetTop"] is 1689 113 114 PASS a["offsetWidth"] is 40 114 115 PASS a["offsetHeight"] is 18 -
trunk/Source/WebCore/ChangeLog
r207513 r207514 1 2016-10-18 Chris Dumez <cdumez@apple.com> 2 3 Changing details.open should cause a toggle event to be fired asynchronously 4 https://bugs.webkit.org/show_bug.cgi?id=163568 5 6 Reviewed by Darin Adler. 7 8 Changing details.open should cause a toggle event to be fired asynchronously: 9 - https://html.spec.whatwg.org/#details-notification-task-steps 10 11 Firefox and Chrome implement this, we don't. 12 13 Test: imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-details-element/toggleEvent.html 14 15 * dom/EventNames.h: 16 * dom/GlobalEventHandlers.idl: 17 * html/HTMLAttributeNames.in: 18 * html/HTMLDetailsElement.cpp: 19 (WebCore::detailToggleEventSender): 20 (WebCore::HTMLDetailsElement::~HTMLDetailsElement): 21 (WebCore::HTMLDetailsElement::dispatchPendingEvent): 22 (WebCore::HTMLDetailsElement::parseAttribute): 23 * html/HTMLDetailsElement.h: 24 * html/HTMLElement.cpp: 25 (WebCore::HTMLElement::createEventHandlerNameMap): 26 1 27 2016-10-18 Dave Hyatt <hyatt@apple.com> 2 28 -
trunk/Source/WebCore/dom/EventNames.h
r207040 r207514 219 219 macro(timeout) \ 220 220 macro(timeupdate) \ 221 macro(toggle) \ 221 222 macro(tonechange) \ 222 223 macro(touchcancel) \ -
trunk/Source/WebCore/dom/GlobalEventHandlers.idl
r204729 r207514 92 92 attribute EventHandler onsuspend; 93 93 attribute EventHandler ontimeupdate; 94 //attribute EventHandler ontoggle;94 attribute EventHandler ontoggle; 95 95 attribute EventHandler onvolumechange; 96 96 attribute EventHandler onwaiting; -
trunk/Source/WebCore/html/HTMLAttributeNames.in
r207040 r207514 267 267 onsubmit 268 268 ontimeupdate 269 ontoggle 269 270 ontouchforcechange 270 271 ontouchstart -
trunk/Source/WebCore/html/HTMLDetailsElement.cpp
r203302 r207514 25 25 #include "AXObjectCache.h" 26 26 #include "ElementIterator.h" 27 #include "EventNames.h" 28 #include "EventSender.h" 27 29 #include "HTMLSlotElement.h" 28 30 #include "HTMLSummaryElement.h" … … 38 40 39 41 using namespace HTMLNames; 42 43 static DetailEventSender& detailToggleEventSender() 44 { 45 static NeverDestroyed<DetailEventSender> sharedToggleEventSender(eventNames().toggleEvent); 46 return sharedToggleEventSender; 47 } 40 48 41 49 static const AtomicString& summarySlotName() … … 88 96 } 89 97 98 HTMLDetailsElement::~HTMLDetailsElement() 99 { 100 detailToggleEventSender().cancelEvent(*this); 101 } 102 90 103 RenderPtr<RenderElement> HTMLDetailsElement::createElementRenderer(RenderStyle&& style, const RenderTreePosition&) 91 104 { … … 124 137 } 125 138 139 void HTMLDetailsElement::dispatchPendingEvent(DetailEventSender* eventSender) 140 { 141 ASSERT_UNUSED(eventSender, eventSender == &detailToggleEventSender()); 142 dispatchEvent(Event::create(eventNames().toggleEvent, false, false)); 143 } 144 126 145 void HTMLDetailsElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 127 146 { … … 136 155 else 137 156 root->removeChild(*m_defaultSlot); 157 158 // https://html.spec.whatwg.org/#details-notification-task-steps. 159 detailToggleEventSender().cancelEvent(*this); 160 detailToggleEventSender().dispatchEventSoon(*this); 138 161 } 139 162 } else -
trunk/Source/WebCore/html/HTMLDetailsElement.h
r203264 r207514 28 28 class HTMLSlotElement; 29 29 30 template<typename T> class EventSender; 31 typedef EventSender<HTMLDetailsElement> DetailEventSender; 32 30 33 class HTMLDetailsElement final : public HTMLElement { 31 34 public: 32 35 static Ref<HTMLDetailsElement> create(const QualifiedName& tagName, Document&); 36 ~HTMLDetailsElement(); 37 33 38 void toggleOpen(); 34 39 35 40 bool isOpen() const { return m_isOpen; } 36 41 bool isActiveSummary(const HTMLSummaryElement&) const; 42 43 void dispatchPendingEvent(DetailEventSender*); 37 44 38 45 private: -
trunk/Source/WebCore/html/HTMLElement.cpp
r207458 r207514 296 296 &onsuspendAttr, 297 297 &ontimeupdateAttr, 298 &ontoggleAttr, 298 299 &ontouchcancelAttr, 299 300 &ontouchendAttr,
Note: See TracChangeset
for help on using the changeset viewer.