Title: [207319] trunk
Revision
207319
Author
cdu...@apple.com
Date
2016-10-13 19:50:07 -0700 (Thu, 13 Oct 2016)

Log Message

[Web IDL] Add support for [SameObject] extended attribute
https://bugs.webkit.org/show_bug.cgi?id=163414

Reviewed by Darin Adler.

Source/WebCore:

Add support for [SameObject] Web IDL extended attribute:
- https://heycam.github.io/webidl/#SameObject

Start using it on DOM / HTML attributes where the specification
mandates it.

Test: js/dom/SameObject-support.html

* bindings/scripts/CodeGeneratorJS.pm:
(ShouldCacheAttribute):
(GenerateHeader):
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* dom/DataTransfer.idl:
* dom/Document.idl:
* dom/Element.idl:
* dom/MutationRecord.idl:
* dom/Node.idl:
* dom/NodeIterator.idl:
* dom/ParentNode.idl:
* dom/TreeWalker.idl:
* html/HTMLAnchorElement.idl:
* html/HTMLAreaElement.idl:
* html/HTMLButtonElement.idl:
* html/HTMLDataListElement.idl:
* html/HTMLDocument.idl:
* html/HTMLElement.idl:
* html/HTMLFieldSetElement.idl:
* html/HTMLFormElement.idl:
* html/HTMLIFrameElement.idl:
* html/HTMLInputElement.idl:
* html/HTMLKeygenElement.idl:
* html/HTMLLinkElement.idl:
* html/HTMLMapElement.idl:
* html/HTMLMediaElement.idl:
* html/HTMLMeterElement.idl:
* html/HTMLOutputElement.idl:
* html/HTMLProgressElement.idl:
* html/HTMLSelectElement.idl:
* html/HTMLTableElement.idl:
* html/HTMLTableRowElement.idl:
* html/HTMLTableSectionElement.idl:
* html/HTMLTextAreaElement.idl:
* page/Location.idl:
* page/Navigator.idl:

LayoutTests:

Add layout test coverage.

* js/dom/SameObject-support-expected.txt: Added.
* js/dom/SameObject-support.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (207318 => 207319)


--- trunk/LayoutTests/ChangeLog	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/LayoutTests/ChangeLog	2016-10-14 02:50:07 UTC (rev 207319)
@@ -1,3 +1,15 @@
+2016-10-13  Chris Dumez  <cdu...@apple.com>
+
+        [Web IDL] Add support for [SameObject] extended attribute
+        https://bugs.webkit.org/show_bug.cgi?id=163414
+
+        Reviewed by Darin Adler.
+
+        Add layout test coverage.
+
+        * js/dom/SameObject-support-expected.txt: Added.
+        * js/dom/SameObject-support.html: Added.
+
 2016-10-13  Nan Wang  <n_w...@apple.com>
 
         AX: [Mac] better accessibility support for Summary elements

Added: trunk/LayoutTests/js/dom/SameObject-support-expected.txt (0 => 207319)


--- trunk/LayoutTests/js/dom/SameObject-support-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/js/dom/SameObject-support-expected.txt	2016-10-14 02:50:07 UTC (rev 207319)
@@ -0,0 +1,146 @@
+Test support for [SameObject] extended attribute in Web IDL.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS document.implementation === document.implementation is true
+PASS document.implementation.foo is 1
+
+PASS document.images === document.images is true
+PASS document.images.foo is 1
+
+PASS document.applets === document.applets is true
+PASS document.applets.foo is 1
+
+PASS document.links === document.links is true
+PASS document.links.foo is 1
+
+PASS document.forms === document.forms is true
+PASS document.forms.foo is 1
+
+PASS document.anchors === document.anchors is true
+PASS document.anchors.foo is 1
+
+PASS document.embeds === document.embeds is true
+PASS document.embeds.foo is 1
+
+PASS document.plugins === document.plugins is true
+PASS document.plugins.foo is 1
+
+PASS document.scripts === document.scripts is true
+PASS document.scripts.foo is 1
+
+PASS htmlElement.childNodes === htmlElement.childNodes is true
+PASS htmlElement.childNodes.foo is 1
+
+PASS htmlElement.attributes === htmlElement.attributes is true
+PASS htmlElement.attributes.foo is 1
+
+PASS htmlElement.classList === htmlElement.classList is true
+PASS htmlElement.classList.foo is 1
+
+PASS htmlElement.children === htmlElement.children is true
+PASS htmlElement.children.foo is 1
+
+PASS htmlElement.dataset === htmlElement.dataset is true
+PASS htmlElement.dataset.foo is 1
+
+PASS anchorElement.relList === anchorElement.relList is true
+PASS anchorElement.relList.foo is 1
+
+PASS areaElement.relList === areaElement.relList is true
+PASS areaElement.relList.foo is 1
+
+PASS buttonElement.labels === buttonElement.labels is true
+PASS buttonElement.labels.foo is 1
+
+PASS fieldsetElement.elements === fieldsetElement.elements is true
+PASS fieldsetElement.elements.foo is 1
+
+PASS fieldsetElement.validity === fieldsetElement.validity is true
+PASS fieldsetElement.validity.foo is 1
+
+PASS formElement.elements === formElement.elements is true
+PASS formElement.elements.foo is 1
+
+PASS iframeElement.sandbox === iframeElement.sandbox is true
+PASS iframeElement.sandbox.foo is 1
+
+PASS inputElement.labels === inputElement.labels is true
+PASS inputElement.labels.foo is 1
+
+PASS keygenElement.labels === keygenElement.labels is true
+PASS keygenElement.labels.foo is 1
+
+PASS linkElement.sizes === linkElement.sizes is true
+PASS linkElement.sizes.foo is 1
+
+PASS linkElement.relList === linkElement.relList is true
+PASS linkElement.relList.foo is 1
+
+PASS mapElement.areas === mapElement.areas is true
+PASS mapElement.areas.foo is 1
+
+PASS mediaElement.audioTracks === mediaElement.audioTracks is true
+PASS mediaElement.audioTracks.foo is 1
+
+PASS mediaElement.textTracks === mediaElement.textTracks is true
+PASS mediaElement.textTracks.foo is 1
+
+PASS mediaElement.videoTracks === mediaElement.videoTracks is true
+PASS mediaElement.videoTracks.foo is 1
+
+PASS meterElement.labels === meterElement.labels is true
+PASS meterElement.labels.foo is 1
+
+PASS outputElement.htmlFor === outputElement.htmlFor is true
+PASS outputElement.htmlFor.foo is 1
+
+PASS outputElement.labels === outputElement.labels is true
+PASS outputElement.labels.foo is 1
+
+PASS progressElement.labels === progressElement.labels is true
+PASS progressElement.labels.foo is 1
+
+PASS selectElement.options === selectElement.options is true
+PASS selectElement.options.foo is 1
+
+PASS selectElement.selectedOptions === selectElement.selectedOptions is true
+PASS selectElement.selectedOptions.foo is 1
+
+PASS selectElement.labels === selectElement.labels is true
+PASS selectElement.labels.foo is 1
+
+PASS tableElement.rows === tableElement.rows is true
+PASS tableElement.rows.foo is 1
+
+PASS tableElement.tBodies === tableElement.tBodies is true
+PASS tableElement.tBodies.foo is 1
+
+PASS trElement.cells === trElement.cells is true
+PASS trElement.cells.foo is 1
+
+PASS tbodyElement.rows === tbodyElement.rows is true
+PASS tbodyElement.rows.foo is 1
+
+PASS textareaElement.labels === textareaElement.labels is true
+PASS textareaElement.labels.foo is 1
+
+PASS location.ancestorOrigins === location.ancestorOrigins is true
+
+PASS navigator.plugins === navigator.plugins is true
+PASS navigator.plugins.foo is 1
+
+PASS navigator.mimeTypes === navigator.mimeTypes is true
+PASS navigator.mimeTypes.foo is 1
+
+PASS nodeIterator.root === nodeIterator.root is true
+PASS nodeIterator.root.foo is 1
+
+PASS treeWalker.root === treeWalker.root is true
+PASS treeWalker.root.foo is 1
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/js/dom/SameObject-support.html (0 => 207319)


--- trunk/LayoutTests/js/dom/SameObject-support.html	                        (rev 0)
+++ trunk/LayoutTests/js/dom/SameObject-support.html	2016-10-14 02:50:07 UTC (rev 207319)
@@ -0,0 +1,119 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src=""
+<script>
+description("Test support for [SameObject] extended attribute in Web IDL.");
+
+var htmlElement = document.createElement("test");
+var anchorElement = document.createElement("a");
+var areaElement = document.createElement("area");
+var buttonElement = document.createElement("button");
+var formElement = document.createElement("form");
+var iframeElement = document.createElement("iframe");
+var inputElement = document.createElement("input");
+var keygenElement = document.createElement("keygen");
+var fieldsetElement = document.createElement("fieldset");
+var linkElement = document.createElement("link");
+var mapElement = document.createElement("map");
+var mediaElement = document.createElement("video");
+var meterElement = document.createElement("meter");
+var outputElement = document.createElement("output");
+var progressElement = document.createElement("progress");
+var selectElement = document.createElement("select");
+var tableElement = document.createElement("table");
+var trElement = document.createElement("tr");
+var tbodyElement = document.createElement("tbody");
+var textareaElement = document.createElement("textarea");
+var nodeIterator = document.createNodeIterator(document.body);
+var treeWalker = document.createTreeWalker(document.body);
+
+function testSameObjectAttribute(object, attributeName)
+{
+    try {
+        shouldBeTrue(object + "." + attributeName + " === " + object + "." + attributeName);
+
+        var attributeObject = eval(object + "['" + attributeName + "']");
+        if (!Object.isFrozen(attributeObject)) {
+            Object.defineProperty(attributeObject, "foo", { value: 1 });
+            document.body.appendChild(document.createElement('span')); // DOM tree mutation.
+            gc();
+            shouldBe(object + "." + attributeName + ".foo", "1");
+        }
+    } catch(e) {
+        testFailed("" + e);
+    }
+    debug("");
+}
+
+var documentAttributes = ["implementation", "images", "applets", "links", "forms", "anchors", "embeds", "plugins", "scripts"];
+for (var attribute of documentAttributes)
+    testSameObjectAttribute("document", attribute);
+
+var htmlElementAttributes = ["childNodes", "attributes", "classList", "children", "dataset"];
+for (var attribute of htmlElementAttributes)
+    testSameObjectAttribute("htmlElement", attribute);
+
+testSameObjectAttribute("anchorElement", "relList");
+
+testSameObjectAttribute("areaElement", "relList");
+
+testSameObjectAttribute("buttonElement", "labels");
+
+var fiedsetElementAttributes = ["elements", "validity"];
+for (var attribute of fiedsetElementAttributes)
+    testSameObjectAttribute("fieldsetElement", attribute);
+
+testSameObjectAttribute("formElement", "elements");
+
+testSameObjectAttribute("iframeElement", "sandbox");
+
+testSameObjectAttribute("inputElement", "labels");
+
+testSameObjectAttribute("keygenElement", "labels");
+
+var linkElementAttributes = ["sizes", "relList"];
+for (var attribute of linkElementAttributes)
+    testSameObjectAttribute("linkElement", attribute);
+
+testSameObjectAttribute("mapElement", "areas");
+
+var mediaElementAttributes = ["audioTracks", "textTracks", "videoTracks"];
+for (var attribute of mediaElementAttributes)
+    testSameObjectAttribute("mediaElement", attribute);
+
+testSameObjectAttribute("meterElement", "labels");
+
+var outputElementAttributes = ["htmlFor", "labels"];
+for (var attribute of outputElementAttributes)
+    testSameObjectAttribute("outputElement", attribute);
+
+testSameObjectAttribute("progressElement", "labels");
+
+var selectElementAttributes = ["options", "selectedOptions", "labels"];
+for (var attribute of selectElementAttributes)
+    testSameObjectAttribute("selectElement", attribute);
+
+var tableElementAttributes = ["rows", "tBodies"];
+for (var attribute of tableElementAttributes)
+    testSameObjectAttribute("tableElement", attribute);
+
+testSameObjectAttribute("trElement", "cells");
+
+testSameObjectAttribute("tbodyElement", "rows");
+
+testSameObjectAttribute("textareaElement", "labels");
+
+testSameObjectAttribute("location", "ancestorOrigins");
+
+var navigatorAttributes = ["plugins", "mimeTypes"];
+for (var attribute of navigatorAttributes)
+    testSameObjectAttribute("navigator", attribute);
+
+testSameObjectAttribute("nodeIterator", "root");
+
+testSameObjectAttribute("treeWalker", "root");
+</script>
+<script src=""
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (207318 => 207319)


--- trunk/Source/WebCore/ChangeLog	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/ChangeLog	2016-10-14 02:50:07 UTC (rev 207319)
@@ -1,3 +1,56 @@
+2016-10-13  Chris Dumez  <cdu...@apple.com>
+
+        [Web IDL] Add support for [SameObject] extended attribute
+        https://bugs.webkit.org/show_bug.cgi?id=163414
+
+        Reviewed by Darin Adler.
+
+        Add support for [SameObject] Web IDL extended attribute:
+        - https://heycam.github.io/webidl/#SameObject
+
+        Start using it on DOM / HTML attributes where the specification
+        mandates it.
+
+        Test: js/dom/SameObject-support.html
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (ShouldCacheAttribute):
+        (GenerateHeader):
+        (GenerateImplementation):
+        * bindings/scripts/IDLAttributes.txt:
+        * dom/DataTransfer.idl:
+        * dom/Document.idl:
+        * dom/Element.idl:
+        * dom/MutationRecord.idl:
+        * dom/Node.idl:
+        * dom/NodeIterator.idl:
+        * dom/ParentNode.idl:
+        * dom/TreeWalker.idl:
+        * html/HTMLAnchorElement.idl:
+        * html/HTMLAreaElement.idl:
+        * html/HTMLButtonElement.idl:
+        * html/HTMLDataListElement.idl:
+        * html/HTMLDocument.idl:
+        * html/HTMLElement.idl:
+        * html/HTMLFieldSetElement.idl:
+        * html/HTMLFormElement.idl:
+        * html/HTMLIFrameElement.idl:
+        * html/HTMLInputElement.idl:
+        * html/HTMLKeygenElement.idl:
+        * html/HTMLLinkElement.idl:
+        * html/HTMLMapElement.idl:
+        * html/HTMLMediaElement.idl:
+        * html/HTMLMeterElement.idl:
+        * html/HTMLOutputElement.idl:
+        * html/HTMLProgressElement.idl:
+        * html/HTMLSelectElement.idl:
+        * html/HTMLTableElement.idl:
+        * html/HTMLTableRowElement.idl:
+        * html/HTMLTableSectionElement.idl:
+        * html/HTMLTextAreaElement.idl:
+        * page/Location.idl:
+        * page/Navigator.idl:
+
 2016-10-13  Andy Estes  <aes...@apple.com>
 
         [iOS] Support Web Archive previews generated by QuickLook

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (207318 => 207319)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2016-10-14 02:50:07 UTC (rev 207319)
@@ -352,6 +352,15 @@
     return IsDOMGlobalObject($interface);
 }
 
+sub ShouldCacheAttribute
+{
+    my $attribute = shift;
+
+    return 1 if $attribute->signature->extendedAttributes->{CachedAttribute};
+    return 1 if $attribute->signature->extendedAttributes->{SameObject};
+    return 0;
+}
+
 sub GenerateGetOwnPropertySlotBody
 {
     my ($interface, $className, $inlined) = @_;
@@ -1481,7 +1490,7 @@
             my $attribute = $_;
             $numCustomAttributes++ if HasCustomGetter($attribute->signature->extendedAttributes);
             $numCustomAttributes++ if HasCustomSetter($attribute->signature->extendedAttributes);
-            if ($attribute->signature->extendedAttributes->{CachedAttribute}) {
+            if (ShouldCacheAttribute($attribute)) {
                 my $conditionalString = $codeGenerator->GenerateConditionalString($attribute->signature);
                 push(@headerContent, "#if ${conditionalString}\n") if $conditionalString;
                 push(@headerContent, "    mutable JSC::WriteBarrier<JSC::Unknown> m_" . $attribute->signature->name . ";\n");
@@ -3064,7 +3073,7 @@
                 }
             }
 
-            $needsVisitChildren = 1 if $attribute->signature->extendedAttributes->{CachedAttribute};
+            $needsVisitChildren = 1 if ShouldCacheAttribute($attribute);
 
             if ($interface->extendedAttributes->{CheckSecurity} &&
                 !$attribute->signature->extendedAttributes->{DoNotCheckSecurity} &&
@@ -3139,7 +3148,7 @@
                 }
             } elsif (!$attribute->signature->extendedAttributes->{GetterMayThrowLegacyException}) {
                 my $cacheIndex = 0;
-                if ($attribute->signature->extendedAttributes->{CachedAttribute}) {
+                if (ShouldCacheAttribute($attribute)) {
                     $cacheIndex = $currentCachedAttribute;
                     $currentCachedAttribute++;
                     push(@implContent, "    if (JSValue cachedValue = thisObject.m_" . $attribute->signature->name . ".get())\n");
@@ -3182,7 +3191,7 @@
                     }
                 }
 
-                push(@implContent, "    thisObject.m_" . $attribute->signature->name . ".set(state.vm(), &thisObject, result);\n") if $attribute->signature->extendedAttributes->{CachedAttribute};
+                push(@implContent, "    thisObject.m_" . $attribute->signature->name . ".set(state.vm(), &thisObject, result);\n") if ShouldCacheAttribute($attribute);
                 push(@implContent, "    return result;\n");
 
             } else {
@@ -3762,7 +3771,7 @@
         if ($numCachedAttributes > 0) {
             foreach (@{$interface->attributes}) {
                 my $attribute = $_;
-                if ($attribute->signature->extendedAttributes->{CachedAttribute}) {
+                if (ShouldCacheAttribute($attribute)) {
                     push(@implContent, "    visitor.append(&thisObject->m_" . $attribute->signature->name . ");\n");
                 }
             }

Modified: trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt (207318 => 207319)


--- trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt	2016-10-14 02:50:07 UTC (rev 207319)
@@ -114,6 +114,7 @@
 ReportExtraMemoryCost
 ReportExternalMemoryCost
 RequiresExistingAtomicString
+SameObject
 SetterCallWith=ScriptExecutionContext|ScriptState|ScriptArguments|CallStack|ActiveWindow|FirstWindow
 SetterMayThrowException
 SetterMayThrowLegacyException

Modified: trunk/Source/WebCore/dom/DataTransfer.idl (207318 => 207319)


--- trunk/Source/WebCore/dom/DataTransfer.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/dom/DataTransfer.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -33,7 +33,7 @@
     attribute DOMString effectAllowed;
 
     [CustomGetter] readonly attribute Array types;
-    readonly attribute FileList files;
+    [SameObject] readonly attribute FileList files;
 
     void clearData(optional DOMString type);
     DOMString getData(DOMString type);
@@ -40,5 +40,6 @@
     void setData(DOMString type, DOMString data);
     void setDragImage(Element? image, long x, long y); // FIXME: Element argument is not nullable in the HTML standard.
 
+    // FIXME: Should be [SameObject].
     [Conditional=DATA_TRANSFER_ITEMS] readonly attribute DataTransferItemList items;
 };

Modified: trunk/Source/WebCore/dom/Document.idl (207318 => 207319)


--- trunk/Source/WebCore/dom/Document.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/dom/Document.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -28,7 +28,7 @@
     JSGenerateToNativeObject,
 ] interface Document : Node {
     readonly attribute DocumentType? doctype;
-    readonly attribute DOMImplementation implementation;
+    [SameObject] readonly attribute DOMImplementation implementation;
     readonly attribute Element? documentElement;
 
     [NewObject, MayThrowLegacyException, ImplementedAs=createElementForBindings] Element createElement(DOMString tagName);
@@ -105,14 +105,14 @@
     [SetterMayThrowLegacyException, ImplementedAs=bodyOrFrameset] attribute HTMLElement? body;
 
     readonly attribute HTMLHeadElement? head;
-    readonly attribute HTMLCollection images;
-    readonly attribute HTMLCollection applets;
-    readonly attribute HTMLCollection links;
-    readonly attribute HTMLCollection forms;
-    readonly attribute HTMLCollection anchors;
-    readonly attribute HTMLCollection embeds;
-    readonly attribute HTMLCollection plugins;
-    readonly attribute HTMLCollection scripts;
+    [SameObject] readonly attribute HTMLCollection images;
+    [SameObject] readonly attribute HTMLCollection applets;
+    [SameObject] readonly attribute HTMLCollection links;
+    [SameObject] readonly attribute HTMLCollection forms;
+    [SameObject] readonly attribute HTMLCollection anchors;
+    [SameObject] readonly attribute HTMLCollection embeds;
+    [SameObject] readonly attribute HTMLCollection plugins;
+    [SameObject] readonly attribute HTMLCollection scripts;
     readonly attribute DOMString lastModified;
 
     NodeList getElementsByName([AtomicString] DOMString elementName);

Modified: trunk/Source/WebCore/dom/Element.idl (207318 => 207319)


--- trunk/Source/WebCore/dom/Element.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/dom/Element.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -38,7 +38,7 @@
 
     HTMLCollection getElementsByTagName(DOMString name);
 
-    readonly attribute NamedNodeMap attributes;
+    [SameObject] readonly attribute NamedNodeMap attributes;
     boolean hasAttributes();
 
     DOMString? getAttributeNS(DOMString? namespaceURI, DOMString localName);
@@ -101,7 +101,7 @@
     [TreatNullAs=EmptyString, SetterMayThrowLegacyException] attribute DOMString outerHTML;
 
     [CEReactions, Reflect=class] attribute DOMString className;
-    [PutForwards=value] readonly attribute DOMTokenList classList;
+    [SameObject, PutForwards=value] readonly attribute DOMTokenList classList;
 
     [MayThrowLegacyException] boolean matches(DOMString selectors);
     [MayThrowLegacyException] Element closest(DOMString selectors);    

Modified: trunk/Source/WebCore/dom/MutationRecord.idl (207318 => 207319)


--- trunk/Source/WebCore/dom/MutationRecord.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/dom/MutationRecord.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -32,10 +32,10 @@
     SkipVTableValidation
 ] interface MutationRecord {
     readonly attribute DOMString type;
-    readonly attribute Node target;
+    [SameObject] readonly attribute Node target;
 
-    readonly attribute NodeList addedNodes;
-    readonly attribute NodeList removedNodes;
+    [SameObject] readonly attribute NodeList addedNodes;
+    [SameObject] readonly attribute NodeList removedNodes;
     readonly attribute Node previousSibling;
     readonly attribute Node nextSibling;
 

Modified: trunk/Source/WebCore/dom/Node.idl (207318 => 207319)


--- trunk/Source/WebCore/dom/Node.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/dom/Node.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -48,7 +48,7 @@
 
     [DOMJIT, CustomGetter] readonly attribute unsigned short nodeType;
     [DOMJIT] readonly attribute Node? parentNode;
-    readonly attribute NodeList childNodes;
+    [SameObject] readonly attribute NodeList childNodes;
     [DOMJIT] readonly attribute Node? firstChild;
     [DOMJIT] readonly attribute Node? lastChild;
     [DOMJIT] readonly attribute Node? previousSibling;

Modified: trunk/Source/WebCore/dom/NodeIterator.idl (207318 => 207319)


--- trunk/Source/WebCore/dom/NodeIterator.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/dom/NodeIterator.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -23,7 +23,7 @@
     ImplementationLacksVTable,
     JSCustomMarkFunction,
 ] interface NodeIterator {
-    readonly attribute Node root;
+    [SameObject] readonly attribute Node root;
     readonly attribute unsigned long whatToShow;
     readonly attribute NodeFilter filter;
     readonly attribute Node referenceNode;

Modified: trunk/Source/WebCore/dom/ParentNode.idl (207318 => 207319)


--- trunk/Source/WebCore/dom/ParentNode.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/dom/ParentNode.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -28,7 +28,7 @@
 [
     NoInterfaceObject,
 ] interface ParentNode {
-    readonly attribute HTMLCollection children;
+    [SameObject] readonly attribute HTMLCollection children;
     readonly attribute Element firstElementChild;
     readonly attribute Element lastElementChild;
     readonly attribute unsigned long childElementCount;

Modified: trunk/Source/WebCore/dom/TreeWalker.idl (207318 => 207319)


--- trunk/Source/WebCore/dom/TreeWalker.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/dom/TreeWalker.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -23,7 +23,7 @@
     ImplementationLacksVTable,
     JSCustomMarkFunction,
 ] interface TreeWalker {
-    readonly attribute Node root;
+    [SameObject] readonly attribute Node root;
     readonly attribute unsigned long whatToShow;
     readonly attribute NodeFilter filter;
     attribute Node currentNode;

Modified: trunk/Source/WebCore/html/HTMLAnchorElement.idl (207318 => 207319)


--- trunk/Source/WebCore/html/HTMLAnchorElement.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/html/HTMLAnchorElement.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -33,7 +33,7 @@
 
     attribute DOMString text;
 
-    [PutForwards=value] readonly attribute DOMTokenList relList;
+    [SameObject, PutForwards=value] readonly attribute DOMTokenList relList;
 };
 
 HTMLAnchorElement implements HTMLHyperlinkElementUtils;

Modified: trunk/Source/WebCore/html/HTMLAreaElement.idl (207318 => 207319)


--- trunk/Source/WebCore/html/HTMLAreaElement.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/html/HTMLAreaElement.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -29,7 +29,7 @@
 
     [Conditional=DOWNLOAD_ATTRIBUTE, EnabledAtRuntime=DownloadAttribute, Reflect] attribute DOMString download;
 
-    [PutForwards=value] readonly attribute DOMTokenList relList;
+    [SameObject, PutForwards=value] readonly attribute DOMTokenList relList;
 };
 
 HTMLAreaElement implements HTMLHyperlinkElementUtils;

Modified: trunk/Source/WebCore/html/HTMLButtonElement.idl (207318 => 207319)


--- trunk/Source/WebCore/html/HTMLButtonElement.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/html/HTMLButtonElement.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -39,5 +39,5 @@
     boolean checkValidity();
     void setCustomValidity(DOMString? error);
 
-    readonly attribute NodeList labels;
+    [SameObject] readonly attribute NodeList labels;
 };

Modified: trunk/Source/WebCore/html/HTMLDataListElement.idl (207318 => 207319)


--- trunk/Source/WebCore/html/HTMLDataListElement.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/html/HTMLDataListElement.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -31,5 +31,5 @@
 [
     Conditional=DATALIST_ELEMENT,
 ] interface HTMLDataListElement : HTMLElement {
-    readonly attribute HTMLCollection options;
+    [SameObject] readonly attribute HTMLCollection options;
 };

Modified: trunk/Source/WebCore/html/HTMLDocument.idl (207318 => 207319)


--- trunk/Source/WebCore/html/HTMLDocument.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/html/HTMLDocument.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -30,6 +30,7 @@
     [Custom] void write(optional DOMString text);
     [Custom] void writeln(optional DOMString text);
 
+    // FIXME: Should be [SameObject].
     [Custom, Replaceable, Deletable] readonly attribute HTMLAllCollection all;
 
     void clear();

Modified: trunk/Source/WebCore/html/HTMLElement.idl (207318 => 207319)


--- trunk/Source/WebCore/html/HTMLElement.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/html/HTMLElement.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -36,7 +36,7 @@
 
     [Reflect] attribute DOMString webkitdropzone;
     // FIXME: Support the standard HTML equivalent.
-    // [PutForwards=value] readonly attribute DOMTokenList dropzone;
+    // [SameObject, PutForwards=value] readonly attribute DOMTokenList dropzone;
 
     [Reflect] attribute boolean hidden;
     [Reflect] attribute DOMString accessKey;
@@ -54,7 +54,7 @@
     void focus();
     void blur();
 
-    readonly attribute DOMStringMap dataset;
+    [SameObject] readonly attribute DOMStringMap dataset;
 };
 
 HTMLElement implements GlobalEventHandlers;

Modified: trunk/Source/WebCore/html/HTMLFieldSetElement.idl (207318 => 207319)


--- trunk/Source/WebCore/html/HTMLFieldSetElement.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/html/HTMLFieldSetElement.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -24,10 +24,10 @@
 
     readonly attribute DOMString type;
 
-    readonly attribute HTMLFormControlsCollection elements;
+    [SameObject] readonly attribute HTMLFormControlsCollection elements;
 
     readonly attribute boolean         willValidate;
-    readonly attribute ValidityState   validity;
+    [SameObject] readonly attribute ValidityState validity;
     readonly attribute DOMString       validationMessage;
     boolean  checkValidity();
     void     setCustomValidity(DOMString? error);

Modified: trunk/Source/WebCore/html/HTMLFormElement.idl (207318 => 207319)


--- trunk/Source/WebCore/html/HTMLFormElement.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/html/HTMLFormElement.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -35,7 +35,7 @@
     [Reflect] attribute boolean noValidate;
     [Reflect] attribute DOMString target;
 
-    readonly attribute HTMLFormControlsCollection elements;
+    [SameObject] readonly attribute HTMLFormControlsCollection elements;
     readonly attribute long length;
 
     getter Element (unsigned long index);

Modified: trunk/Source/WebCore/html/HTMLIFrameElement.idl (207318 => 207319)


--- trunk/Source/WebCore/html/HTMLIFrameElement.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/html/HTMLIFrameElement.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -27,7 +27,7 @@
     [Reflect, TreatNullAs=EmptyString] attribute DOMString marginWidth;
     [Reflect] attribute DOMString name;
 
-    [PutForwards=value] readonly attribute DOMTokenList sandbox;
+    [SameObject, PutForwards=value] readonly attribute DOMTokenList sandbox;
     [Reflect] attribute boolean allowFullscreen;
 
     [Reflect] attribute DOMString scrolling;

Modified: trunk/Source/WebCore/html/HTMLInputElement.idl (207318 => 207319)


--- trunk/Source/WebCore/html/HTMLInputElement.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/html/HTMLInputElement.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -73,7 +73,7 @@
     boolean checkValidity();
     void setCustomValidity(DOMString? error);
 
-    readonly attribute NodeList labels;
+    [SameObject] readonly attribute NodeList labels;
 
     void select();
     [Custom] attribute long selectionStart;

Modified: trunk/Source/WebCore/html/HTMLKeygenElement.idl (207318 => 207319)


--- trunk/Source/WebCore/html/HTMLKeygenElement.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/html/HTMLKeygenElement.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -44,6 +44,6 @@
     boolean checkValidity();
     void setCustomValidity(DOMString? error);
 
-    readonly attribute NodeList labels;
+    [SameObject] readonly attribute NodeList labels;
 };
 

Modified: trunk/Source/WebCore/html/HTMLLinkElement.idl (207318 => 207319)


--- trunk/Source/WebCore/html/HTMLLinkElement.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/html/HTMLLinkElement.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -30,7 +30,7 @@
     [Reflect] attribute DOMString media;
     [Reflect] attribute DOMString rel;
     [Reflect] attribute DOMString rev;
-    [PutForwards=value] readonly attribute DOMTokenList sizes;
+    [SameObject, PutForwards=value] readonly attribute DOMTokenList sizes;
     [Reflect] attribute DOMString target;
     [Reflect] attribute DOMString type;
     [Reflect] attribute DOMString as;
@@ -39,6 +39,6 @@
     // DOM Level 2 Style
     readonly attribute StyleSheet sheet;
 
-    [PutForwards=value] readonly attribute DOMTokenList relList;
+    [SameObject, PutForwards=value] readonly attribute DOMTokenList relList;
 };
 

Modified: trunk/Source/WebCore/html/HTMLMapElement.idl (207318 => 207319)


--- trunk/Source/WebCore/html/HTMLMapElement.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/html/HTMLMapElement.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -19,7 +19,7 @@
  */
 
 interface HTMLMapElement : HTMLElement {
-    readonly attribute HTMLCollection areas;
+    [SameObject] readonly attribute HTMLCollection areas;
     [Reflect] attribute DOMString name;
 };
 

Modified: trunk/Source/WebCore/html/HTMLMediaElement.idl (207318 => 207319)


--- trunk/Source/WebCore/html/HTMLMediaElement.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/html/HTMLMediaElement.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -95,9 +95,9 @@
     [Conditional=LEGACY_ENCRYPTED_MEDIA] void webkitSetMediaKeys(WebKitMediaKeys? mediaKeys);
 
     [Conditional=VIDEO_TRACK, MayThrowLegacyException] TextTrack addTextTrack(DOMString kind, optional DOMString label = "", optional DOMString language = "");
-    [Conditional=VIDEO_TRACK] readonly attribute AudioTrackList audioTracks;
-    [Conditional=VIDEO_TRACK] readonly attribute TextTrackList textTracks;
-    [Conditional=VIDEO_TRACK] readonly attribute VideoTrackList videoTracks;
+    [Conditional=VIDEO_TRACK, SameObject] readonly attribute AudioTrackList audioTracks;
+    [Conditional=VIDEO_TRACK, SameObject] readonly attribute TextTrackList textTracks;
+    [Conditional=VIDEO_TRACK, SameObject] readonly attribute VideoTrackList videoTracks;
 
     [Reflect] attribute DOMString mediaGroup;
 

Modified: trunk/Source/WebCore/html/HTMLMeterElement.idl (207318 => 207319)


--- trunk/Source/WebCore/html/HTMLMeterElement.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/html/HTMLMeterElement.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -26,5 +26,5 @@
     attribute double low;
     attribute double high;
     attribute double optimum;
-    readonly attribute NodeList labels;
+    [SameObject] readonly attribute NodeList labels;
 };

Modified: trunk/Source/WebCore/html/HTMLOutputElement.idl (207318 => 207319)


--- trunk/Source/WebCore/html/HTMLOutputElement.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/html/HTMLOutputElement.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -23,7 +23,7 @@
  */
 
 interface HTMLOutputElement : HTMLElement {
-    [PutForwards=value] readonly attribute DOMTokenList htmlFor;
+    [SameObject, PutForwards=value] readonly attribute DOMTokenList htmlFor;
 
     readonly attribute HTMLFormElement form;
     [Reflect] attribute DOMString name;
@@ -38,5 +38,5 @@
     boolean checkValidity();
     void setCustomValidity(DOMString? error);
 
-    readonly attribute NodeList labels;
+    [SameObject] readonly attribute NodeList labels;
 };

Modified: trunk/Source/WebCore/html/HTMLProgressElement.idl (207318 => 207319)


--- trunk/Source/WebCore/html/HTMLProgressElement.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/html/HTMLProgressElement.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -18,9 +18,9 @@
  */
 
 interface HTMLProgressElement : HTMLElement {
-    [SetterMayThrowLegacyException] attribute  unrestricted double value;
-    [SetterMayThrowLegacyException] attribute  unrestricted double max;
-    readonly attribute  unrestricted double                position;
-    readonly attribute  NodeList              labels;
+    [SetterMayThrowLegacyException] attribute unrestricted double value;
+    [SetterMayThrowLegacyException] attribute unrestricted double max;
+    readonly attribute  unrestricted double position;
+    [SameObject] readonly attribute NodeList labels;
 };
 

Modified: trunk/Source/WebCore/html/HTMLSelectElement.idl (207318 => 207319)


--- trunk/Source/WebCore/html/HTMLSelectElement.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/html/HTMLSelectElement.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -34,7 +34,7 @@
 
     readonly attribute DOMString type;
 
-    readonly attribute HTMLOptionsCollection options;
+    [SameObject] readonly attribute HTMLOptionsCollection options;
     [SetterMayThrowLegacyException] attribute unsigned long length;
 
     getter HTMLOptionElement? item(unsigned long index);
@@ -50,7 +50,7 @@
     void remove(HTMLOptionElement option);
     [ImplementedAs=removeByIndex] void remove(long index);
 
-    readonly attribute HTMLCollection selectedOptions;
+    [SameObject] readonly attribute HTMLCollection selectedOptions;
     attribute long selectedIndex;
 
     attribute DOMString value;
@@ -61,7 +61,7 @@
     boolean checkValidity();
     void setCustomValidity(DOMString? error); // FIXME: Argument should not be nullable.
 
-    readonly attribute NodeList labels;
+    [SameObject] readonly attribute NodeList labels;
 
     attribute DOMString autocomplete;
 };

Modified: trunk/Source/WebCore/html/HTMLTableElement.idl (207318 => 207319)


--- trunk/Source/WebCore/html/HTMLTableElement.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/html/HTMLTableElement.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -23,8 +23,8 @@
     [SetterMayThrowLegacyException] attribute HTMLTableSectionElement? tHead;
     [SetterMayThrowLegacyException] attribute HTMLTableSectionElement? tFoot;
 
-    readonly attribute HTMLCollection rows;
-    readonly attribute HTMLCollection tBodies;
+    [SameObject] readonly attribute HTMLCollection rows;
+    [SameObject] readonly attribute HTMLCollection tBodies;
     [Reflect] attribute DOMString align;
     [Reflect, TreatNullAs=EmptyString] attribute DOMString bgColor;
     [Reflect] attribute DOMString border;

Modified: trunk/Source/WebCore/html/HTMLTableRowElement.idl (207318 => 207319)


--- trunk/Source/WebCore/html/HTMLTableRowElement.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/html/HTMLTableRowElement.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -21,7 +21,7 @@
 interface HTMLTableRowElement : HTMLElement {
     readonly attribute long rowIndex;
     readonly attribute long sectionRowIndex;
-    readonly attribute HTMLCollection cells;
+    [SameObject] readonly attribute HTMLCollection cells;
     [Reflect] attribute DOMString align;
     [Reflect, TreatNullAs=EmptyString] attribute DOMString bgColor;
     [Reflect=char] attribute DOMString ch;

Modified: trunk/Source/WebCore/html/HTMLTableSectionElement.idl (207318 => 207319)


--- trunk/Source/WebCore/html/HTMLTableSectionElement.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/html/HTMLTableSectionElement.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -25,7 +25,7 @@
     [Reflect=char] attribute DOMString ch;
     [Reflect=charoff] attribute DOMString chOff;
     [Reflect] attribute DOMString vAlign;
-    readonly attribute HTMLCollection rows;
+    [SameObject] readonly attribute HTMLCollection rows;
     [MayThrowLegacyException] HTMLElement insertRow(optional long index = -1);
     [MayThrowLegacyException] void deleteRow(long index);
 };

Modified: trunk/Source/WebCore/html/HTMLTextAreaElement.idl (207318 => 207319)


--- trunk/Source/WebCore/html/HTMLTextAreaElement.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/html/HTMLTextAreaElement.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -45,7 +45,7 @@
     boolean checkValidity();
     void setCustomValidity(DOMString? error);
 
-    readonly attribute NodeList labels;
+    [SameObject] readonly attribute NodeList labels;
 
     void select();
     attribute long selectionStart;

Modified: trunk/Source/WebCore/page/Location.idl (207318 => 207319)


--- trunk/Source/WebCore/page/Location.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/page/Location.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -58,6 +58,5 @@
 
     readonly attribute USVString origin;
 
-    // FIXME: Add support for SameObject
-    [Unforgeable, CachedAttribute] readonly attribute FrozenArray<USVString> ancestorOrigins;
+    [Unforgeable, SameObject] readonly attribute FrozenArray<USVString> ancestorOrigins;
 };

Modified: trunk/Source/WebCore/page/Navigator.idl (207318 => 207319)


--- trunk/Source/WebCore/page/Navigator.idl	2016-10-14 01:14:05 UTC (rev 207318)
+++ trunk/Source/WebCore/page/Navigator.idl	2016-10-14 02:50:07 UTC (rev 207319)
@@ -20,8 +20,8 @@
 [
     GenerateIsReachable=ImplFrame,
 ] interface Navigator {
-    readonly attribute DOMPluginArray plugins;
-    readonly attribute DOMMimeTypeArray mimeTypes;
+    [SameObject] readonly attribute DOMPluginArray plugins;
+    [SameObject] readonly attribute DOMMimeTypeArray mimeTypes;
     [Nondeterministic] readonly attribute boolean cookieEnabled;
     [Nondeterministic] boolean javaEnabled();
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to