Title: [208083] trunk
Revision
208083
Author
[email protected]
Date
2016-10-28 16:53:28 -0700 (Fri, 28 Oct 2016)

Log Message

DOMStringMap reports properties as non-enumerable
https://bugs.webkit.org/show_bug.cgi?id=164114

Reviewed by Sam Weinig.

Source/WebCore:

DOMStringMap's named properties should be configurable, enumerable
and writable as per:
- https://heycam.github.io/webidl/#getownproperty-guts (2.7-9)
- https://html.spec.whatwg.org/multipage/dom.html#domstringmap

Firefox and Chrome agree with the specification. However, WebKit
was doing the complete opposite.

No new tests, updated existing test.

* bindings/js/JSDOMStringMapCustom.cpp:
(WebCore::JSDOMStringMap::getOwnPropertySlotDelegate):

LayoutTests:

Update existing test to reflect behavior change.

* fast/dom/dataset-name-getter-properties-expected.txt:
* fast/dom/dataset-name-getter-properties.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (208082 => 208083)


--- trunk/LayoutTests/ChangeLog	2016-10-28 23:49:46 UTC (rev 208082)
+++ trunk/LayoutTests/ChangeLog	2016-10-28 23:53:28 UTC (rev 208083)
@@ -1,3 +1,15 @@
+2016-10-28  Chris Dumez  <[email protected]>
+
+        DOMStringMap reports properties as non-enumerable
+        https://bugs.webkit.org/show_bug.cgi?id=164114
+
+        Reviewed by Sam Weinig.
+
+        Update existing test to reflect behavior change.
+
+        * fast/dom/dataset-name-getter-properties-expected.txt:
+        * fast/dom/dataset-name-getter-properties.html:
+
 2016-10-28  Ryosuke Niwa  <[email protected]>
 
         Add CEReactions to the remaining HTML DOM APIs

Modified: trunk/LayoutTests/fast/dom/dataset-name-getter-properties-expected.txt (208082 => 208083)


--- trunk/LayoutTests/fast/dom/dataset-name-getter-properties-expected.txt	2016-10-28 23:49:46 UTC (rev 208082)
+++ trunk/LayoutTests/fast/dom/dataset-name-getter-properties-expected.txt	2016-10-28 23:53:28 UTC (rev 208083)
@@ -3,9 +3,9 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS Object.getOwnPropertyDescriptor(document.body.dataset, 'webkitRocks').configurable is false
-PASS Object.getOwnPropertyDescriptor(document.body.dataset, 'webkitRocks').enumerable is false
-PASS Object.getOwnPropertyDescriptor(document.body.dataset, 'webkitRocks').writable is false
+PASS Object.getOwnPropertyDescriptor(document.body.dataset, 'webkitRocks').configurable is true
+PASS Object.getOwnPropertyDescriptor(document.body.dataset, 'webkitRocks').enumerable is true
+PASS Object.getOwnPropertyDescriptor(document.body.dataset, 'webkitRocks').writable is true
 PASS Object.getOwnPropertyDescriptor(document.body.dataset, 'webkitRocks').value is "yes"
 PASS successfullyParsed is true
 

Modified: trunk/LayoutTests/fast/dom/dataset-name-getter-properties.html (208082 => 208083)


--- trunk/LayoutTests/fast/dom/dataset-name-getter-properties.html	2016-10-28 23:49:46 UTC (rev 208082)
+++ trunk/LayoutTests/fast/dom/dataset-name-getter-properties.html	2016-10-28 23:53:28 UTC (rev 208083)
@@ -7,9 +7,9 @@
 <script>
 description('Test the _javascript_ property descriptor of the name getter.');
 
-shouldBe("Object.getOwnPropertyDescriptor(document.body.dataset, 'webkitRocks').configurable", 'false');
-shouldBe("Object.getOwnPropertyDescriptor(document.body.dataset, 'webkitRocks').enumerable", 'false');
-shouldBe("Object.getOwnPropertyDescriptor(document.body.dataset, 'webkitRocks').writable", 'false');
+shouldBeTrue("Object.getOwnPropertyDescriptor(document.body.dataset, 'webkitRocks').configurable");
+shouldBeTrue("Object.getOwnPropertyDescriptor(document.body.dataset, 'webkitRocks').enumerable");
+shouldBeTrue("Object.getOwnPropertyDescriptor(document.body.dataset, 'webkitRocks').writable");
 shouldBeEqualToString("Object.getOwnPropertyDescriptor(document.body.dataset, 'webkitRocks').value", 'yes');
 
 </script>

Modified: trunk/Source/WebCore/ChangeLog (208082 => 208083)


--- trunk/Source/WebCore/ChangeLog	2016-10-28 23:49:46 UTC (rev 208082)
+++ trunk/Source/WebCore/ChangeLog	2016-10-28 23:53:28 UTC (rev 208083)
@@ -1,3 +1,23 @@
+2016-10-28  Chris Dumez  <[email protected]>
+
+        DOMStringMap reports properties as non-enumerable
+        https://bugs.webkit.org/show_bug.cgi?id=164114
+
+        Reviewed by Sam Weinig.
+
+        DOMStringMap's named properties should be configurable, enumerable
+        and writable as per:
+        - https://heycam.github.io/webidl/#getownproperty-guts (2.7-9)
+        - https://html.spec.whatwg.org/multipage/dom.html#domstringmap
+
+        Firefox and Chrome agree with the specification. However, WebKit
+        was doing the complete opposite.
+
+        No new tests, updated existing test.
+
+        * bindings/js/JSDOMStringMapCustom.cpp:
+        (WebCore::JSDOMStringMap::getOwnPropertySlotDelegate):
+
 2016-10-28  Ryosuke Niwa  <[email protected]>
 
         Add CEReactions to the remaining HTML DOM APIs

Modified: trunk/Source/WebCore/bindings/js/JSDOMStringMapCustom.cpp (208082 => 208083)


--- trunk/Source/WebCore/bindings/js/JSDOMStringMapCustom.cpp	2016-10-28 23:49:46 UTC (rev 208082)
+++ trunk/Source/WebCore/bindings/js/JSDOMStringMapCustom.cpp	2016-10-28 23:53:28 UTC (rev 208083)
@@ -44,7 +44,7 @@
     bool nameIsValid;
     const AtomicString& item = wrapped().item(propertyNameToString(propertyName), nameIsValid);
     if (nameIsValid) {
-        slot.setValue(this, ReadOnly | DontDelete | DontEnum, toJS<IDLDOMString>(*exec, item));
+        slot.setValue(this, 0, toJS<IDLDOMString>(*exec, item));
         return true;
     }
     return false;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to