Changeset 189825 in webkit
- Timestamp:
- Sep 15, 2015, 2:39:02 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r189823 r189825 1 2015-09-15 Chris Dumez <cdumez@apple.com> 2 3 Element.getAttributeNS() should return null if the attribute does not exist 4 https://bugs.webkit.org/show_bug.cgi?id=149180 5 <rdar://problem/22561011> 6 7 Reviewed by Ryosuke Niwa. 8 9 Rebaseline / update existing tests now that our behavior has changed. 10 11 * fast/dom/Element/attribute-uppercase-expected.txt: 12 * fast/dom/Element/mozilla-dom-base-tests/test_bug1075702-expected.txt: 13 * fast/dom/Element/mozilla-dom-base-tests/test_bug1075702.html: 14 * fast/dom/Element/setAttributeNode-overriding-lowercase-values-1-expected.txt: 15 * fast/dom/Element/setAttributeNode-overriding-lowercase-values-2-expected.txt: 16 1 17 2015-09-15 Chris Dumez <cdumez@apple.com> 2 18 -
trunk/LayoutTests/fast/dom/Element/attribute-uppercase-expected.txt
r13289 r189825 24 24 The following should be empty, false, or null. 25 25 26 getAttributeNS(ATTR_NAME) = 26 getAttributeNS(ATTR_NAME) = null 27 27 hasAttributeNS(ATTR_NAME) = false 28 28 getAttributeNodeNS(ATTR_NAME) = null -
trunk/LayoutTests/fast/dom/Element/mozilla-dom-base-tests/test_bug1075702-expected.txt
r179497 r189825 5 5 6 6 PASS document.documentElement.hasAttributeNS("", "aa") is false 7 PASS document.documentElement.getAttributeNS("", "aa") is ""7 PASS document.documentElement.getAttributeNS("", "aa") is null 8 8 PASS document.documentElement.hasAttributeNS("", "AA") is true 9 9 PASS document.documentElement.getAttributeNS("", "AA") is "UPPERCASE" -
trunk/LayoutTests/fast/dom/Element/mozilla-dom-base-tests/test_bug1075702.html
r179497 r189825 30 30 31 31 shouldBeFalse('document.documentElement.hasAttributeNS("", "aa")'); 32 shouldBe EqualToString('document.documentElement.getAttributeNS("", "aa")', '');32 shouldBeNull('document.documentElement.getAttributeNS("", "aa")'); 33 33 shouldBeTrue('document.documentElement.hasAttributeNS("", "AA")'); 34 34 shouldBeEqualToString('document.documentElement.getAttributeNS("", "AA")', 'UPPERCASE'); -
trunk/LayoutTests/fast/dom/Element/setAttributeNode-overriding-lowercase-values-1-expected.txt
r179497 r189825 10 10 PASS document.documentElement.getAttributeNS("", "foobar") is "WebKit" 11 11 PASS document.documentElement.hasAttributeNS("", "foobar") is true 12 FAIL document.documentElement.getAttributeNS("", "FooBar") should be null (of type object). Was (of type string). 12 PASS document.documentElement.getAttributeNS("", "FooBar") is null 13 13 PASS document.documentElement.hasAttributeNS("", "FooBar") is false 14 14 PASS document.documentElement.attributes.length is 1 … … 18 18 PASS document.documentElement.getAttribute("FooBar") is null 19 19 PASS document.documentElement.hasAttribute("FooBar") is false 20 FAIL document.documentElement.getAttributeNS("", "foobar") should be null (of type object). Was (of type string). 20 PASS document.documentElement.getAttributeNS("", "foobar") is null 21 21 PASS document.documentElement.hasAttributeNS("", "foobar") is false 22 22 PASS document.documentElement.getAttributeNS("", "FooBar") is "Rocks!" -
trunk/LayoutTests/fast/dom/Element/setAttributeNode-overriding-lowercase-values-2-expected.txt
r179497 r189825 11 11 PASS testElement.getAttributeNS("ns1", "foobar") is "WebKit" 12 12 PASS testElement.hasAttributeNS("ns1", "foobar") is true 13 FAIL testElement.getAttributeNS("ns1", "FooBar") should be null (of type object). Was (of type string). 13 PASS testElement.getAttributeNS("ns1", "FooBar") is null 14 14 PASS testElement.hasAttributeNS("ns1", "FooBar") is false 15 FAIL testElement.getAttributeNS("", "foobar") should be null (of type object). Was (of type string). 15 PASS testElement.getAttributeNS("", "foobar") is null 16 16 PASS testElement.hasAttributeNS("", "foobar") is false 17 FAIL testElement.getAttributeNS("", "FooBar") should be null (of type object). Was (of type string). 17 PASS testElement.getAttributeNS("", "FooBar") is null 18 18 PASS testElement.hasAttributeNS("", "FooBar") is false 19 19 PASS testElement.attributes.length is 1 … … 22 22 PASS testElement.getAttribute("FooBar") is null 23 23 PASS testElement.hasAttribute("FooBar") is false 24 FAIL testElement.getAttributeNS("ns1", "foobar") should be null (of type object). Was (of type string). 24 PASS testElement.getAttributeNS("ns1", "foobar") is null 25 25 PASS testElement.hasAttributeNS("ns1", "foobar") is false 26 26 PASS testElement.getAttributeNS("ns1", "FooBar") is "Rocks!" 27 27 PASS testElement.hasAttributeNS("ns1", "FooBar") is true 28 FAIL testElement.getAttributeNS("", "foobar") should be null (of type object). Was (of type string). 28 PASS testElement.getAttributeNS("", "foobar") is null 29 29 PASS testElement.hasAttributeNS("", "foobar") is false 30 FAIL testElement.getAttributeNS("", "FooBar") should be null (of type object). Was (of type string). 30 PASS testElement.getAttributeNS("", "FooBar") is null 31 31 PASS testElement.hasAttributeNS("", "FooBar") is false 32 32 PASS successfullyParsed is true -
trunk/LayoutTests/imported/w3c/ChangeLog
r189770 r189825 1 2015-09-15 Chris Dumez <cdumez@apple.com> 2 3 Element.getAttributeNS() should return null if the attribute does not exist 4 https://bugs.webkit.org/show_bug.cgi?id=149180 5 <rdar://problem/22561011> 6 7 Reviewed by Ryosuke Niwa. 8 9 Rebaseline several W3C DOM tests now that more checks are passing. 10 11 * web-platform-tests/dom/nodes/attributes-expected.txt: 12 * web-platform-tests/dom/nodes/case-expected.txt: 13 1 14 2015-09-14 Chris Dumez <cdumez@apple.com> 2 15 -
trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/attributes-expected.txt
r189471 r189825 2 2 FAIL AttrExodus assert_false: expected false got true 3 3 PASS When qualifiedName does not match the Name production, an INVALID_CHARACTER_ERR exception is to be thrown. (setAttribute) 4 FAIL setAttribute should lowercase its name argument (upper case attribute) assert_equals: expected (object) null but got (string) "" 5 FAIL setAttribute should lowercase its name argument (mixed case attribute) assert_equals: expected (object) null but got (string) "" 4 PASS setAttribute should lowercase its name argument (upper case attribute) 5 PASS setAttribute should lowercase its name argument (mixed case attribute) 6 6 PASS setAttribute should not throw even when qualifiedName starts with 'xmlns' 7 7 PASS Basic functionality should be intact. … … 27 27 PASS Specified attributes should be accessible. 28 28 PASS Entities in attributes should have been expanded while parsing. 29 FAIL Unset attributes return null assert_equals: expected (object) null but got (string) "" 30 FAIL First set attribute is returned by getAttribute assert_equals: expected (object) null but got (string) "" 29 PASS Unset attributes return null 30 PASS First set attribute is returned by getAttribute 31 31 PASS Style attributes are not normalized 32 FAIL Only lowercase attributes are returned on HTML elements (upper case attribute) assert_equals: expected (object) null but got (string) "" 33 FAIL Only lowercase attributes are returned on HTML elements (mixed case attribute) assert_equals: expected (object) null but got (string) "" 32 PASS Only lowercase attributes are returned on HTML elements (upper case attribute) 33 PASS Only lowercase attributes are returned on HTML elements (mixed case attribute) 34 34 PASS First set attribute is returned with mapped attribute set first 35 35 PASS First set attribute is returned with mapped attribute set later -
trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/case-expected.txt
r189471 r189825 30 30 PASS createElementNS http://www.w3.org/1999/xhtml,abc,Abc 31 31 PASS setAttributeNS http://www.w3.org/1999/xhtml,abc,Abc 32 FAIL getAttributeNS http://www.w3.org/1999/xhtml,abc,Abc assert_equals: expected (object) null but got (string) "" 32 PASS getAttributeNS http://www.w3.org/1999/xhtml,abc,Abc 33 33 PASS createElementNS http://www.w3.org/1999/xhtml,abc,ABC 34 34 PASS setAttributeNS http://www.w3.org/1999/xhtml,abc,ABC 35 FAIL getAttributeNS http://www.w3.org/1999/xhtml,abc,ABC assert_equals: expected (object) null but got (string) "" 35 PASS getAttributeNS http://www.w3.org/1999/xhtml,abc,ABC 36 36 PASS createElementNS http://www.w3.org/1999/xhtml,abc,ä 37 37 PASS setAttributeNS http://www.w3.org/1999/xhtml,abc,ä … … 45 45 PASS createElementNS http://www.w3.org/1999/xhtml,Abc,Abc 46 46 PASS setAttributeNS http://www.w3.org/1999/xhtml,Abc,Abc 47 FAIL getAttributeNS http://www.w3.org/1999/xhtml,Abc,Abc assert_equals: expected (object) null but got (string) "" 47 PASS getAttributeNS http://www.w3.org/1999/xhtml,Abc,Abc 48 48 PASS createElementNS http://www.w3.org/1999/xhtml,Abc,ABC 49 49 PASS setAttributeNS http://www.w3.org/1999/xhtml,Abc,ABC 50 FAIL getAttributeNS http://www.w3.org/1999/xhtml,Abc,ABC assert_equals: expected (object) null but got (string) "" 50 PASS getAttributeNS http://www.w3.org/1999/xhtml,Abc,ABC 51 51 PASS createElementNS http://www.w3.org/1999/xhtml,Abc,ä 52 52 PASS setAttributeNS http://www.w3.org/1999/xhtml,Abc,ä … … 60 60 PASS createElementNS http://www.w3.org/1999/xhtml,ABC,Abc 61 61 PASS setAttributeNS http://www.w3.org/1999/xhtml,ABC,Abc 62 FAIL getAttributeNS http://www.w3.org/1999/xhtml,ABC,Abc assert_equals: expected (object) null but got (string) "" 62 PASS getAttributeNS http://www.w3.org/1999/xhtml,ABC,Abc 63 63 PASS createElementNS http://www.w3.org/1999/xhtml,ABC,ABC 64 64 PASS setAttributeNS http://www.w3.org/1999/xhtml,ABC,ABC 65 FAIL getAttributeNS http://www.w3.org/1999/xhtml,ABC,ABC assert_equals: expected (object) null but got (string) "" 65 PASS getAttributeNS http://www.w3.org/1999/xhtml,ABC,ABC 66 66 PASS createElementNS http://www.w3.org/1999/xhtml,ABC,ä 67 67 PASS setAttributeNS http://www.w3.org/1999/xhtml,ABC,ä … … 75 75 PASS createElementNS http://www.w3.org/1999/xhtml,ä,Abc 76 76 PASS setAttributeNS http://www.w3.org/1999/xhtml,ä,Abc 77 FAIL getAttributeNS http://www.w3.org/1999/xhtml,ä,Abc assert_equals: expected (object) null but got (string) "" 77 PASS getAttributeNS http://www.w3.org/1999/xhtml,ä,Abc 78 78 PASS createElementNS http://www.w3.org/1999/xhtml,ä,ABC 79 79 PASS setAttributeNS http://www.w3.org/1999/xhtml,ä,ABC 80 FAIL getAttributeNS http://www.w3.org/1999/xhtml,ä,ABC assert_equals: expected (object) null but got (string) "" 80 PASS getAttributeNS http://www.w3.org/1999/xhtml,ä,ABC 81 81 PASS createElementNS http://www.w3.org/1999/xhtml,ä,ä 82 82 PASS setAttributeNS http://www.w3.org/1999/xhtml,ä,ä … … 90 90 PASS createElementNS http://www.w3.org/1999/xhtml,Ä,Abc 91 91 PASS setAttributeNS http://www.w3.org/1999/xhtml,Ä,Abc 92 FAIL getAttributeNS http://www.w3.org/1999/xhtml,Ä,Abc assert_equals: expected (object) null but got (string) "" 92 PASS getAttributeNS http://www.w3.org/1999/xhtml,Ä,Abc 93 93 PASS createElementNS http://www.w3.org/1999/xhtml,Ä,ABC 94 94 PASS setAttributeNS http://www.w3.org/1999/xhtml,Ä,ABC 95 FAIL getAttributeNS http://www.w3.org/1999/xhtml,Ä,ABC assert_equals: expected (object) null but got (string) "" 95 PASS getAttributeNS http://www.w3.org/1999/xhtml,Ä,ABC 96 96 PASS createElementNS http://www.w3.org/1999/xhtml,Ä,ä 97 97 PASS setAttributeNS http://www.w3.org/1999/xhtml,Ä,ä … … 105 105 PASS createElementNS http://www.w3.org/2000/svg,abc,Abc 106 106 PASS setAttributeNS http://www.w3.org/2000/svg,abc,Abc 107 FAIL getAttributeNS http://www.w3.org/2000/svg,abc,Abc assert_equals: expected (object) null but got (string) "" 107 PASS getAttributeNS http://www.w3.org/2000/svg,abc,Abc 108 108 PASS createElementNS http://www.w3.org/2000/svg,abc,ABC 109 109 PASS setAttributeNS http://www.w3.org/2000/svg,abc,ABC 110 FAIL getAttributeNS http://www.w3.org/2000/svg,abc,ABC assert_equals: expected (object) null but got (string) "" 110 PASS getAttributeNS http://www.w3.org/2000/svg,abc,ABC 111 111 PASS createElementNS http://www.w3.org/2000/svg,abc,ä 112 112 PASS setAttributeNS http://www.w3.org/2000/svg,abc,ä … … 120 120 PASS createElementNS http://www.w3.org/2000/svg,Abc,Abc 121 121 PASS setAttributeNS http://www.w3.org/2000/svg,Abc,Abc 122 FAIL getAttributeNS http://www.w3.org/2000/svg,Abc,Abc assert_equals: expected (object) null but got (string) "" 122 PASS getAttributeNS http://www.w3.org/2000/svg,Abc,Abc 123 123 PASS createElementNS http://www.w3.org/2000/svg,Abc,ABC 124 124 PASS setAttributeNS http://www.w3.org/2000/svg,Abc,ABC 125 FAIL getAttributeNS http://www.w3.org/2000/svg,Abc,ABC assert_equals: expected (object) null but got (string) "" 125 PASS getAttributeNS http://www.w3.org/2000/svg,Abc,ABC 126 126 PASS createElementNS http://www.w3.org/2000/svg,Abc,ä 127 127 PASS setAttributeNS http://www.w3.org/2000/svg,Abc,ä … … 135 135 PASS createElementNS http://www.w3.org/2000/svg,ABC,Abc 136 136 PASS setAttributeNS http://www.w3.org/2000/svg,ABC,Abc 137 FAIL getAttributeNS http://www.w3.org/2000/svg,ABC,Abc assert_equals: expected (object) null but got (string) "" 137 PASS getAttributeNS http://www.w3.org/2000/svg,ABC,Abc 138 138 PASS createElementNS http://www.w3.org/2000/svg,ABC,ABC 139 139 PASS setAttributeNS http://www.w3.org/2000/svg,ABC,ABC 140 FAIL getAttributeNS http://www.w3.org/2000/svg,ABC,ABC assert_equals: expected (object) null but got (string) "" 140 PASS getAttributeNS http://www.w3.org/2000/svg,ABC,ABC 141 141 PASS createElementNS http://www.w3.org/2000/svg,ABC,ä 142 142 PASS setAttributeNS http://www.w3.org/2000/svg,ABC,ä … … 150 150 PASS createElementNS http://www.w3.org/2000/svg,ä,Abc 151 151 PASS setAttributeNS http://www.w3.org/2000/svg,ä,Abc 152 FAIL getAttributeNS http://www.w3.org/2000/svg,ä,Abc assert_equals: expected (object) null but got (string) "" 152 PASS getAttributeNS http://www.w3.org/2000/svg,ä,Abc 153 153 PASS createElementNS http://www.w3.org/2000/svg,ä,ABC 154 154 PASS setAttributeNS http://www.w3.org/2000/svg,ä,ABC 155 FAIL getAttributeNS http://www.w3.org/2000/svg,ä,ABC assert_equals: expected (object) null but got (string) "" 155 PASS getAttributeNS http://www.w3.org/2000/svg,ä,ABC 156 156 PASS createElementNS http://www.w3.org/2000/svg,ä,ä 157 157 PASS setAttributeNS http://www.w3.org/2000/svg,ä,ä … … 165 165 PASS createElementNS http://www.w3.org/2000/svg,Ä,Abc 166 166 PASS setAttributeNS http://www.w3.org/2000/svg,Ä,Abc 167 FAIL getAttributeNS http://www.w3.org/2000/svg,Ä,Abc assert_equals: expected (object) null but got (string) "" 167 PASS getAttributeNS http://www.w3.org/2000/svg,Ä,Abc 168 168 PASS createElementNS http://www.w3.org/2000/svg,Ä,ABC 169 169 PASS setAttributeNS http://www.w3.org/2000/svg,Ä,ABC 170 FAIL getAttributeNS http://www.w3.org/2000/svg,Ä,ABC assert_equals: expected (object) null but got (string) "" 170 PASS getAttributeNS http://www.w3.org/2000/svg,Ä,ABC 171 171 PASS createElementNS http://www.w3.org/2000/svg,Ä,ä 172 172 PASS setAttributeNS http://www.w3.org/2000/svg,Ä,ä … … 180 180 PASS createElementNS http://FOO,abc,Abc 181 181 PASS setAttributeNS http://FOO,abc,Abc 182 FAIL getAttributeNS http://FOO,abc,Abc assert_equals: expected (object) null but got (string) "" 182 PASS getAttributeNS http://FOO,abc,Abc 183 183 PASS createElementNS http://FOO,abc,ABC 184 184 PASS setAttributeNS http://FOO,abc,ABC 185 FAIL getAttributeNS http://FOO,abc,ABC assert_equals: expected (object) null but got (string) "" 185 PASS getAttributeNS http://FOO,abc,ABC 186 186 PASS createElementNS http://FOO,abc,ä 187 187 PASS setAttributeNS http://FOO,abc,ä … … 195 195 PASS createElementNS http://FOO,Abc,Abc 196 196 PASS setAttributeNS http://FOO,Abc,Abc 197 FAIL getAttributeNS http://FOO,Abc,Abc assert_equals: expected (object) null but got (string) "" 197 PASS getAttributeNS http://FOO,Abc,Abc 198 198 PASS createElementNS http://FOO,Abc,ABC 199 199 PASS setAttributeNS http://FOO,Abc,ABC 200 FAIL getAttributeNS http://FOO,Abc,ABC assert_equals: expected (object) null but got (string) "" 200 PASS getAttributeNS http://FOO,Abc,ABC 201 201 PASS createElementNS http://FOO,Abc,ä 202 202 PASS setAttributeNS http://FOO,Abc,ä … … 210 210 PASS createElementNS http://FOO,ABC,Abc 211 211 PASS setAttributeNS http://FOO,ABC,Abc 212 FAIL getAttributeNS http://FOO,ABC,Abc assert_equals: expected (object) null but got (string) "" 212 PASS getAttributeNS http://FOO,ABC,Abc 213 213 PASS createElementNS http://FOO,ABC,ABC 214 214 PASS setAttributeNS http://FOO,ABC,ABC 215 FAIL getAttributeNS http://FOO,ABC,ABC assert_equals: expected (object) null but got (string) "" 215 PASS getAttributeNS http://FOO,ABC,ABC 216 216 PASS createElementNS http://FOO,ABC,ä 217 217 PASS setAttributeNS http://FOO,ABC,ä … … 225 225 PASS createElementNS http://FOO,ä,Abc 226 226 PASS setAttributeNS http://FOO,ä,Abc 227 FAIL getAttributeNS http://FOO,ä,Abc assert_equals: expected (object) null but got (string) "" 227 PASS getAttributeNS http://FOO,ä,Abc 228 228 PASS createElementNS http://FOO,ä,ABC 229 229 PASS setAttributeNS http://FOO,ä,ABC 230 FAIL getAttributeNS http://FOO,ä,ABC assert_equals: expected (object) null but got (string) "" 230 PASS getAttributeNS http://FOO,ä,ABC 231 231 PASS createElementNS http://FOO,ä,ä 232 232 PASS setAttributeNS http://FOO,ä,ä … … 240 240 PASS createElementNS http://FOO,Ä,Abc 241 241 PASS setAttributeNS http://FOO,Ä,Abc 242 FAIL getAttributeNS http://FOO,Ä,Abc assert_equals: expected (object) null but got (string) "" 242 PASS getAttributeNS http://FOO,Ä,Abc 243 243 PASS createElementNS http://FOO,Ä,ABC 244 244 PASS setAttributeNS http://FOO,Ä,ABC 245 FAIL getAttributeNS http://FOO,Ä,ABC assert_equals: expected (object) null but got (string) "" 245 PASS getAttributeNS http://FOO,Ä,ABC 246 246 PASS createElementNS http://FOO,Ä,ä 247 247 PASS setAttributeNS http://FOO,Ä,ä … … 275 275 PASS createElementNS Abc 276 276 PASS setAttributeNS Abc 277 FAIL getAttributeNS Abc assert_equals: expected (object) null but got (string) "" 277 PASS getAttributeNS Abc 278 278 PASS createElementNS ABC 279 279 PASS setAttributeNS ABC 280 FAIL getAttributeNS ABC assert_equals: expected (object) null but got (string) "" 280 PASS getAttributeNS ABC 281 281 PASS createElementNS ä 282 282 PASS setAttributeNS ä -
trunk/Source/WebCore/ChangeLog
r189824 r189825 1 2015-09-15 Chris Dumez <cdumez@apple.com> 2 3 Element.getAttributeNS() should return null if the attribute does not exist 4 https://bugs.webkit.org/show_bug.cgi?id=149180 5 <rdar://problem/22561011> 6 7 Reviewed by Ryosuke Niwa. 8 9 Element.getAttributeNS() should return null if the attribute does not 10 exist, similarly to what Element.getAttribute() does: 11 - https://dom.spec.whatwg.org/#element (both return a nullable DOMString). 12 - https://dom.spec.whatwg.org/#dom-element-getattributens (step 2) 13 14 Firefox and Chrome match the specification. However, WebKit was returning 15 an empty string for getAttributeNS() and null for getAttribute(). This 16 patch aligns WebKit's behavior with the specification and other browsers. 17 18 No new tests, already covered by existing tests. 19 20 * dom/Element.idl: 21 1 22 2015-09-15 Ryosuke Niwa <rniwa@webkit.org> 2 23 -
trunk/Source/WebCore/dom/Element.idl
r188809 r189825 1 1 /* 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.2 * Copyright (C) 2006, 2007, 2009, 2015 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 4 * … … 50 50 // DOM Level 2 Core 51 51 52 [ObjCLegacyUnnamedParameters ] DOMString getAttributeNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI,52 [ObjCLegacyUnnamedParameters, TreatReturnedNullStringAs=Null] DOMString getAttributeNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI, 53 53 [Default=Undefined] optional DOMString localName); 54 54 [ObjCLegacyUnnamedParameters, RaisesException] void setAttributeNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI,
Note:
See TracChangeset
for help on using the changeset viewer.