Changeset 204045 in webkit
- Timestamp:
- Aug 2, 2016 3:23:22 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r204044 r204045 1 2016-08-02 Chris Dumez <cdumez@apple.com> 2 3 Named / Indexed properties should be configurable 4 https://bugs.webkit.org/show_bug.cgi?id=160457 5 6 Reviewed by Darin Adler. 7 8 Update / rebaseline existing tests to reflect behavior change. 9 10 * fast/dom/NodeList/nodelist-name-getter-properties-expected.txt: 11 * fast/dom/NodeList/nodelist-name-getter-properties.html: 12 * js/dom/getOwnPropertyDescriptor-expected.txt: 13 * js/resources/getOwnPropertyDescriptor.js: 14 1 15 2016-08-02 Anders Carlsson <andersca@apple.com> 2 16 -
trunk/LayoutTests/fast/dom/NodeList/nodelist-name-getter-properties-expected.txt
r162801 r204045 4 4 5 5 6 PASS Object.getOwnPropertyDescriptor(NodeList, 'aWildId').configurable is false6 PASS Object.getOwnPropertyDescriptor(NodeList, 'aWildId').configurable is true 7 7 PASS Object.getOwnPropertyDescriptor(NodeList, 'aWildId').enumerable is false 8 8 PASS Object.getOwnPropertyDescriptor(NodeList, 'aWildId').writable is false -
trunk/LayoutTests/fast/dom/NodeList/nodelist-name-getter-properties.html
r162801 r204045 11 11 var NodeList = document.getElementsByTagName('div'); 12 12 13 shouldBe ("Object.getOwnPropertyDescriptor(NodeList, 'aWildId').configurable", 'false');14 shouldBe ("Object.getOwnPropertyDescriptor(NodeList, 'aWildId').enumerable", 'false');15 shouldBe ("Object.getOwnPropertyDescriptor(NodeList, 'aWildId').writable", 'false');13 shouldBeTrue("Object.getOwnPropertyDescriptor(NodeList, 'aWildId').configurable"); 14 shouldBeFalse("Object.getOwnPropertyDescriptor(NodeList, 'aWildId').enumerable"); 15 shouldBeFalse("Object.getOwnPropertyDescriptor(NodeList, 'aWildId').writable"); 16 16 </script> 17 17 <script src="../../../resources/js-test-post.js"></script> -
trunk/LayoutTests/imported/w3c/ChangeLog
r204034 r204045 1 2016-08-02 Chris Dumez <cdumez@apple.com> 2 3 Named / Indexed properties should be configurable 4 https://bugs.webkit.org/show_bug.cgi?id=160457 5 6 Reviewed by Darin Adler. 7 8 Rebaseline several W3C tests now that more checks are passing. 9 10 * web-platform-tests/dom/nodes/Document-getElementsByTagName-expected.txt: 11 * web-platform-tests/dom/nodes/Element-getElementsByTagName-expected.txt: 12 1 13 2016-08-02 Chris Dumez <cdumez@apple.com> 2 14 -
trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Document-getElementsByTagName-expected.txt
r204034 r204045 9 9 PASS Should be able to set expando shadowing a proto prop (item) 10 10 PASS Should be able to set expando shadowing a proto prop (namedItem) 11 FAIL hasOwnProperty, getOwnPropertyDescriptor, getOwnPropertyNames assert_true: desc.configurable expected true got false 11 PASS hasOwnProperty, getOwnPropertyDescriptor, getOwnPropertyNames 12 12 PASS HTML element with uppercase tagName never matches in HTML Documents 13 13 PASS Element in non-HTML namespace, no prefix, lowercase name -
trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-getElementsByTagName-expected.txt
r200309 r204045 9 9 PASS Should be able to set expando shadowing a proto prop (item) 10 10 PASS Should be able to set expando shadowing a proto prop (namedItem) 11 FAIL hasOwnProperty, getOwnPropertyDescriptor, getOwnPropertyNames assert_true: desc.configurable expected true got false 11 PASS hasOwnProperty, getOwnPropertyDescriptor, getOwnPropertyNames 12 12 PASS HTML element with uppercase tagName never matches in HTML Documents 13 13 PASS Element in non-HTML namespace, no prefix, lowercase name -
trunk/LayoutTests/js/dom/getOwnPropertyDescriptor-expected.txt
r201702 r204045 135 135 PASS Object.getOwnPropertyDescriptor(document.getElementsByTagName('div'), 0).hasOwnProperty('set') is false 136 136 PASS Object.getOwnPropertyDescriptor(document.getElementsByTagName('div'), 0).enumerable is true 137 PASS Object.getOwnPropertyDescriptor(document.getElementsByTagName('div'), 0).configurable is false137 PASS Object.getOwnPropertyDescriptor(document.getElementsByTagName('div'), 0).configurable is true 138 138 PASS Object.getOwnPropertyDescriptor(document.getElementsByClassName('pass'), 0).value is document.getElementsByClassName('pass')[0] 139 139 PASS Object.getOwnPropertyDescriptor(document.getElementsByClassName('pass'), 0).hasOwnProperty('get') is false 140 140 PASS Object.getOwnPropertyDescriptor(document.getElementsByClassName('pass'), 0).hasOwnProperty('set') is false 141 141 PASS Object.getOwnPropertyDescriptor(document.getElementsByClassName('pass'), 0).enumerable is true 142 PASS Object.getOwnPropertyDescriptor(document.getElementsByClassName('pass'), 0).configurable is false142 PASS Object.getOwnPropertyDescriptor(document.getElementsByClassName('pass'), 0).configurable is true 143 143 PASS Object.getOwnPropertyDescriptor(canvasPixelArray, 0).value is canvasPixelArray[0] 144 144 PASS Object.getOwnPropertyDescriptor(canvasPixelArray, 0).hasOwnProperty('get') is false … … 150 150 PASS Object.getOwnPropertyDescriptor(select, 0).hasOwnProperty('set') is false 151 151 PASS Object.getOwnPropertyDescriptor(select, 0).enumerable is true 152 PASS Object.getOwnPropertyDescriptor(select, 0).configurable is false152 PASS Object.getOwnPropertyDescriptor(select, 0).configurable is true 153 153 PASS Object.getOwnPropertyDescriptor(objectWithGetter, 'getter').get is getterFunc 154 154 PASS Object.getOwnPropertyDescriptor(objectWithGetter, 'getter').set is undefined -
trunk/LayoutTests/js/resources/getOwnPropertyDescriptor.js
r201702 r204045 46 46 descriptorShouldBe("global", "'XMLHttpRequest'", {writable: true, enumerable: false, configurable: true, value:"XMLHttpRequest"}); 47 47 descriptorShouldBe("global", "0", {writable: true, enumerable: false, configurable: false, value:"global[0]"}); 48 descriptorShouldBe("document.getElementsByTagName('div')", "0", {writable: false, enumerable: true, configurable: false, value:"document.getElementsByTagName('div')[0]"});49 descriptorShouldBe("document.getElementsByClassName('pass')", "0", {writable: false, enumerable: true, configurable: false, value:"document.getElementsByClassName('pass')[0]"});48 descriptorShouldBe("document.getElementsByTagName('div')", "0", {writable: false, enumerable: true, configurable: true, value:"document.getElementsByTagName('div')[0]"}); 49 descriptorShouldBe("document.getElementsByClassName('pass')", "0", {writable: false, enumerable: true, configurable: true, value:"document.getElementsByClassName('pass')[0]"}); 50 50 var canvas = document.createElement("canvas"); 51 51 var canvasPixelArray = canvas.getContext("2d").createImageData(10,10).data; … … 53 53 var select = document.createElement("select"); 54 54 select.innerHTML = "<option>foo</option>"; 55 descriptorShouldBe("select", "0", {writable: true, enumerable: true, configurable: false, value:"select[0]"});55 descriptorShouldBe("select", "0", {writable: true, enumerable: true, configurable: true, value:"select[0]"}); 56 56 57 57 var objectWithGetter = {}; -
trunk/Source/WebCore/ChangeLog
r204044 r204045 1 2016-08-02 Chris Dumez <cdumez@apple.com> 2 3 Named / Indexed properties should be configurable 4 https://bugs.webkit.org/show_bug.cgi?id=160457 5 6 Reviewed by Darin Adler. 7 8 Report Named / Indexed properties as being configurable to comply with 9 the Web IDL specification: 10 - http://heycam.github.io/webidl/#getownproperty-guts (step 1. and 2.) 11 12 Firefox and Chrome also report them as being configurable. 13 14 No new tests, rebaselined existing tests. 15 16 * bindings/scripts/CodeGeneratorJS.pm: 17 (GenerateGetOwnPropertySlotBody): 18 1 19 2016-08-02 Anders Carlsson <andersca@apple.com> 2 20 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r204043 r204045 318 318 # Assume that if there's a setter, the index will be writable 319 319 if ($interface->extendedAttributes->{"CustomIndexedSetter"}) { 320 push(@getOwnPropertySlotImpl, " unsigned attributes = ${namespaceMaybe}DontDelete;\n");320 push(@getOwnPropertySlotImpl, " unsigned attributes = 0;\n"); 321 321 } else { 322 push(@getOwnPropertySlotImpl, " unsigned attributes = ${namespaceMaybe} DontDelete | ${namespaceMaybe}ReadOnly;\n");322 push(@getOwnPropertySlotImpl, " unsigned attributes = ${namespaceMaybe}ReadOnly;\n"); 323 323 } 324 324 push(@getOwnPropertySlotImpl, " slot.setValue(thisObject, attributes, " . GetIndexedGetterExpression($indexedGetterFunction) . ");\n"); … … 345 345 push(@getOwnPropertySlotImpl, " JSValue value;\n"); 346 346 push(@getOwnPropertySlotImpl, " if (thisObject->nameGetter(state, propertyName, value)) {\n"); 347 push(@getOwnPropertySlotImpl, " slot.setValue(thisObject, ReadOnly | Dont Delete | DontEnum, value);\n");347 push(@getOwnPropertySlotImpl, " slot.setValue(thisObject, ReadOnly | DontEnum, value);\n"); 348 348 push(@getOwnPropertySlotImpl, " return true;\n"); 349 349 push(@getOwnPropertySlotImpl, " }\n"); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp
r202281 r204045 137 137 JSValue value; 138 138 if (thisObject->nameGetter(state, propertyName, value)) { 139 slot.setValue(thisObject, ReadOnly | Dont Delete | DontEnum, value);139 slot.setValue(thisObject, ReadOnly | DontEnum, value); 140 140 return true; 141 141 } -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp
r202281 r204045 127 127 if (optionalIndex && optionalIndex.value() < thisObject->wrapped().length()) { 128 128 unsigned index = optionalIndex.value(); 129 unsigned attributes = DontDelete |ReadOnly;129 unsigned attributes = ReadOnly; 130 130 slot.setValue(thisObject, attributes, toJS(state, thisObject->globalObject(), thisObject->wrapped().item(index))); 131 131 return true; … … 140 140 JSValue value; 141 141 if (thisObject->nameGetter(state, propertyName, value)) { 142 slot.setValue(thisObject, ReadOnly | Dont Delete | DontEnum, value);142 slot.setValue(thisObject, ReadOnly | DontEnum, value); 143 143 return true; 144 144 } -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r204028 r204045 1351 1351 if (optionalIndex) { 1352 1352 unsigned index = optionalIndex.value(); 1353 unsigned attributes = DontDelete |ReadOnly;1353 unsigned attributes = ReadOnly; 1354 1354 slot.setValue(thisObject, attributes, jsStringOrUndefined(state, thisObject->wrapped().item(index))); 1355 1355 return true; -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp
r203797 r204045 133 133 JSValue value; 134 134 if (thisObject->nameGetter(state, propertyName, value)) { 135 slot.setValue(thisObject, ReadOnly | Dont Delete | DontEnum, value);135 slot.setValue(thisObject, ReadOnly | DontEnum, value); 136 136 return true; 137 137 }
Note: See TracChangeset
for help on using the changeset viewer.