Changeset 203852 in webkit
- Timestamp:
- Jul 28, 2016 6:19:41 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r203849 r203852 1 2016-07-28 Chris Dumez <cdumez@apple.com> 2 3 Add support for Element.getAttributeNames() 4 https://bugs.webkit.org/show_bug.cgi?id=160327 5 6 Reviewed by Alex Christensen. 7 8 Add layout test coverage. I have verified that this test is passing in 9 Firefox 47. 10 11 * fast/dom/Element/getAttributeNames-expected.txt: Added. 12 * fast/dom/Element/getAttributeNames.html: Added. 13 1 14 2016-07-28 Chris Dumez <cdumez@apple.com> 2 15 -
trunk/LayoutTests/imported/w3c/ChangeLog
r203849 r203852 1 2016-07-28 Chris Dumez <cdumez@apple.com> 2 3 Add support for Element.getAttributeNames() 4 https://bugs.webkit.org/show_bug.cgi?id=160327 5 6 Reviewed by Alex Christensen. 7 8 Rebaseline several W3C tests now that more checks are passing. 9 10 * web-platform-tests/dom/interfaces-expected.txt: 11 * web-platform-tests/dom/nodes/attributes-expected.txt: 12 * web-platform-tests/html/dom/interfaces-expected.txt: 13 1 14 2016-07-28 Chris Dumez <cdumez@apple.com> 2 15 -
trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt
r203848 r203852 743 743 PASS Element interface: operation hasAttributes() 744 744 PASS Element interface: attribute attributes 745 FAIL Element interface: operation getAttributeNames() assert_own_property: interface prototype object missing non-static operation expected property "getAttributeNames" missing 745 PASS Element interface: operation getAttributeNames() 746 746 PASS Element interface: operation getAttribute(DOMString) 747 747 PASS Element interface: operation getAttributeNS(DOMString,DOMString) … … 794 794 PASS Element interface: element must inherit property "hasAttributes" with the proper type (8) 795 795 PASS Element interface: element must inherit property "attributes" with the proper type (9) 796 FAIL Element interface: element must inherit property "getAttributeNames" with the proper type (10) assert_inherits: property "getAttributeNames" not found in prototype chain 796 PASS Element interface: element must inherit property "getAttributeNames" with the proper type (10) 797 797 PASS Element interface: element must inherit property "getAttribute" with the proper type (11) 798 798 PASS Element interface: calling getAttribute(DOMString) on element with too few arguments must throw TypeError -
trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/attributes-expected.txt
r200309 r203852 49 49 PASS setAttributeNode, if it fires mutation events, should fire one with the new node when resetting an existing attribute (outer shell) 50 50 PASS setAttributeNode called with an Attr that has the same name as an existing one should not change attribute order 51 FAIL getAttributeNames tests el.getAttributeNames is not a function. (In 'el.getAttributeNames()', 'el.getAttributeNames' is undefined) 51 PASS getAttributeNames tests 52 52 FAIL Own property correctness with basic attributes assert_array_equals: lengths differ, expected 4 got 2 53 53 FAIL Own property correctness with non-namespaced attribute before same-name namespaced one assert_array_equals: lengths differ, expected 5 got 3 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt
r203849 r203852 1150 1150 PASS Element interface: document.createElement("noscript") must inherit property "hasAttributes" with the proper type (7) 1151 1151 PASS Element interface: document.createElement("noscript") must inherit property "attributes" with the proper type (8) 1152 FAIL Element interface: document.createElement("noscript") must inherit property "getAttributeNames" with the proper type (9) assert_inherits: property "getAttributeNames" not found in prototype chain 1152 PASS Element interface: document.createElement("noscript") must inherit property "getAttributeNames" with the proper type (9) 1153 1153 PASS Element interface: document.createElement("noscript") must inherit property "getAttribute" with the proper type (10) 1154 1154 PASS Element interface: calling getAttribute(DOMString) on document.createElement("noscript") with too few arguments must throw TypeError -
trunk/Source/WebCore/ChangeLog
r203849 r203852 1 2016-07-28 Chris Dumez <cdumez@apple.com> 2 3 Add support for Element.getAttributeNames() 4 https://bugs.webkit.org/show_bug.cgi?id=160327 5 6 Reviewed by Alex Christensen. 7 8 Add support for Element.getAttributeNames(): 9 - https://dom.spec.whatwg.org/#dom-element-getattributenames 10 11 Firefox already supports this, Chrome 52 does not yet. 12 13 Test: fast/dom/Element/getAttributeNames.html 14 15 * bindings/js/JSDOMBinding.h: 16 (WebCore::JSValueTraits<AtomicString>::arrayJSValue): 17 * dom/Element.cpp: 18 (WebCore::Element::getAttributeNames): 19 * dom/Element.h: 20 * dom/Element.idl: 21 1 22 2016-07-28 Chris Dumez <cdumez@apple.com> 2 23 -
trunk/Source/WebCore/dom/Element.cpp
r203324 r203852 499 499 } 500 500 501 Vector<String> Element::getAttributeNames() const 502 { 503 Vector<String> attributesVector; 504 if (!hasAttributes()) 505 return attributesVector; 506 507 auto attributes = attributesIterator(); 508 attributesVector.reserveInitialCapacity(attributes.attributeCount()); 509 for (auto& attribute : attributes) 510 attributesVector.uncheckedAppend(attribute.name().toString()); 511 return attributesVector; 512 } 513 501 514 bool Element::isFocusable() const 502 515 { -
trunk/Source/WebCore/dom/Element.h
r203383 r203852 78 78 void setSynchronizedLazyAttribute(const QualifiedName&, const AtomicString& value); 79 79 bool removeAttribute(const QualifiedName&); 80 Vector<String> getAttributeNames() const; 80 81 81 82 // Typed getters and setters for language bindings. -
trunk/Source/WebCore/dom/Element.idl
r203547 r203852 119 119 void scrollIntoView(optional boolean alignWithTop = true); 120 120 121 sequence<DOMString> getAttributeNames(); 122 121 123 // WebKit extensions 122 124
Note: See TracChangeset
for help on using the changeset viewer.