Bug 1055467 - Rename MozNamedAttrMap to NamedNodeMap, r=smaug
authorAndrea Marchesini <amarchesini@mozilla.com>
Mon, 25 Aug 2014 10:25:34 +0100
changeset 222985 4e528ecd25c9eb033194f65cd0a890e175a9b63c
parent 222984 42312104737a96c3d95a627311aeaf0ca7369821
child 222986 0adf0a108a7f7335cf5d3519d318528a75fbd56d
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1055467
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1055467 - Rename MozNamedAttrMap to NamedNodeMap, r=smaug
browser/devtools/webconsole/test/browser_webconsole_output_03.js
content/base/src/nsDOMAttributeMap.cpp
dom/bindings/Bindings.conf
dom/imptests/html/dom/test_historical.html
dom/tests/mochitest/general/test_interfaces.html
dom/webidl/Element.webidl
dom/webidl/LegacyQueryInterface.webidl
dom/webidl/MozNamedAttrMap.webidl
dom/webidl/NamedNodeMap.webidl
dom/webidl/moz.build
xpcom/reflect/xptinfo/ShimInterfaceInfo.cpp
--- a/browser/devtools/webconsole/test/browser_webconsole_output_03.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_output_03.js
@@ -68,20 +68,20 @@ let inputTests = [
     printOutput: TEST_URI,
     inspectable: true,
     variablesViewLabel: "Location \u2192 test-console-output-03.html",
   },
 
   // 7
   {
     input: "document.body.attributes",
-    output: "MozNamedAttrMap [  ]",
-    printOutput: "[object MozNamedAttrMap]",
+    output: "NamedNodeMap [  ]",
+    printOutput: "[object NamedNodeMap]",
     inspectable: true,
-    variablesViewLabel: "MozNamedAttrMap[0]",
+    variablesViewLabel: "NamedNodeMap[0]",
   },
 
   // 8
   {
     input: "document.styleSheets",
     output: "StyleSheetList [  ]",
     printOutput: "[object StyleSheetList",
     inspectable: true,
@@ -132,21 +132,21 @@ let inputTests = [
     printOutput: "[object DOMStringMap]",
     inspectable: true,
     variablesViewLabel: "DOMStringMap[1]",
   },
 
   // 14
   {
     input: "document.body.attributes",
-    output: 'MozNamedAttrMap [ class="test1 tezt2", id="foobarid", ' +
+    output: 'NamedNodeMap [ class="test1 tezt2", id="foobarid", ' +
             'data-preview="zuzu&quot;&lt;a&gt;foo" ]',
-    printOutput: "[object MozNamedAttrMap]",
+    printOutput: "[object NamedNodeMap]",
     inspectable: true,
-    variablesViewLabel: "MozNamedAttrMap[3]",
+    variablesViewLabel: "NamedNodeMap[3]",
   },
 
   // 15
   {
     input: "document.body.attributes[0]",
     output: 'class="test1 tezt2"',
     printOutput: "[object Attr]",
     inspectable: true,
--- a/content/base/src/nsDOMAttributeMap.cpp
+++ b/content/base/src/nsDOMAttributeMap.cpp
@@ -7,17 +7,17 @@
  * Implementation of the |attributes| property of DOM Core's Element object.
  */
 
 #include "nsDOMAttributeMap.h"
 
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/dom/Attr.h"
 #include "mozilla/dom/Element.h"
-#include "mozilla/dom/MozNamedAttrMapBinding.h"
+#include "mozilla/dom/NamedNodeMapBinding.h"
 #include "nsAttrName.h"
 #include "nsContentUtils.h"
 #include "nsError.h"
 #include "nsIContentInlines.h"
 #include "nsIDocument.h"
 #include "nsNameSpaceManager.h"
 #include "nsNodeInfoManager.h"
 #include "nsUnicharUtils.h"
@@ -556,10 +556,10 @@ nsDOMAttributeMap::SizeOfIncludingThis(M
 
   // NB: mContent is non-owning and thus not counted.
   return n;
 }
 
 /* virtual */ JSObject*
 nsDOMAttributeMap::WrapObject(JSContext* aCx)
 {
-  return MozNamedAttrMapBinding::Wrap(aCx, this);
+  return NamedNodeMapBinding::Wrap(aCx, this);
 }
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -854,20 +854,16 @@ DOMInterfaces = {
 'MozMobileMessageManager': {
     'nativeType': 'mozilla::dom::MobileMessageManager',
 },
 
 'MozMobileNetworkInfo': {
     'nativeType': 'mozilla::dom::MobileNetworkInfo',
 },
 
-'MozNamedAttrMap': {
-    'nativeType': 'nsDOMAttributeMap',
-},
-
 'MozSpeakerManager': {
     'nativeType': 'mozilla::dom::SpeakerManager',
     'headerFile': 'SpeakerManager.h'
 },
 
 'MozPowerManager': {
     'nativeType': 'mozilla::dom::PowerManager',
 },
@@ -890,16 +886,20 @@ DOMInterfaces = {
 
 'MutationRecord': {
     'nativeType': 'nsDOMMutationRecord',
     'headerFile': 'nsDOMMutationObserver.h',
     'resultNotAddRefed': [ 'target', 'addedNodes', 'removedNodes',
                            'previousSibling', 'nextSibling' ]
 },
 
+'NamedNodeMap': {
+    'nativeType': 'nsDOMAttributeMap',
+},
+
 'NetworkInformation': {
     'nativeType': 'mozilla::dom::network::Connection',
 },
 
 'Node': {
     'nativeType': 'nsINode',
     'concrete': False,
     'resultNotAddRefed': [ 'ownerDocument', 'parentNode', 'parentElement',
--- a/dom/imptests/html/dom/test_historical.html
+++ b/dom/imptests/html/dom/test_historical.html
@@ -16,17 +16,16 @@ var nukedInterfaces = [
   "DOMImplementationList",
   "DOMImplementationSource",
   "DOMLocator",
   "DOMObject",
   "DOMUserData",
   "Entity",
   "EntityReference",
   "EventException", // DOM Events
-  "NamedNodeMap",
   "NameList",
   "Notation",
   "TypeInfo",
   "UserDataHandler",
   "RangeException" // DOM Range
 ]
 nukedInterfaces.forEach(isInterfaceNuked)
 
--- a/dom/tests/mochitest/general/test_interfaces.html
+++ b/dom/tests/mochitest/general/test_interfaces.html
@@ -682,18 +682,16 @@ var interfaceNamesInGlobalScope =
     {name: "MozMobileConnectionInfo", b2g: true, pref: "dom.mobileconnection.enabled"},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "MozMobileNetworkInfo", b2g: true, pref: "dom.mobileconnection.enabled"},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "MozMobileMessageManager", b2g: true, pref: "dom.sms.enabled"},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "MozMobileMessageThread",
 // IMPORTANT: Do not change this list without review from a DOM peer!
-    "MozNamedAttrMap",
-// IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "MozNDEFRecord", b2g: true},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "MozNFCPeer", b2g: true},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "MozNFCPeerEvent", b2g: true, permission: "nfc-write"},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "MozNFCTag", b2g: true},
 // IMPORTANT: Do not change this list without review from a DOM peer!
@@ -748,16 +746,18 @@ var interfaceNamesInGlobalScope =
     {name: "MozWifiP2pStatusChangeEvent", b2g: true, permission: "wifi-manage"},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "MutationEvent",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "MutationObserver",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "MutationRecord",
 // IMPORTANT: Do not change this list without review from a DOM peer!
+    "NamedNodeMap",
+// IMPORTANT: Do not change this list without review from a DOM peer!
     "Navigator",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "NetworkInformation", pref: "dom.netinfo.enabled"},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "Node",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "NodeFilter",
 // IMPORTANT: Do not change this list without review from a DOM peer!
--- a/dom/webidl/Element.webidl
+++ b/dom/webidl/Element.webidl
@@ -29,17 +29,17 @@ interface Element : Node {
   [Pure]
            attribute DOMString id;
   [Pure]
            attribute DOMString className;
   [Constant]
   readonly attribute DOMTokenList classList;
 
   [SameObject]
-  readonly attribute MozNamedAttrMap attributes;
+  readonly attribute NamedNodeMap attributes;
   [Pure]
   DOMString? getAttribute(DOMString name);
   [Pure]
   DOMString? getAttributeNS(DOMString? namespace, DOMString localName);
   [Throws]
   void setAttribute(DOMString name, DOMString value);
   [Throws]
   void setAttributeNS(DOMString? namespace, DOMString name, DOMString value);
--- a/dom/webidl/LegacyQueryInterface.webidl
+++ b/dom/webidl/LegacyQueryInterface.webidl
@@ -36,17 +36,17 @@ DocumentType implements LegacyQueryInter
 Element implements LegacyQueryInterface;
 Event implements LegacyQueryInterface;
 EventSource implements LegacyQueryInterface;
 FileList implements LegacyQueryInterface;
 FormData implements LegacyQueryInterface;
 HTMLCollection implements LegacyQueryInterface;
 History implements LegacyQueryInterface;
 MimeTypeArray implements LegacyQueryInterface;
-MozNamedAttrMap implements LegacyQueryInterface;
+NamedNodeMap implements LegacyQueryInterface;
 MutationObserver implements LegacyQueryInterface;
 MutationRecord implements LegacyQueryInterface;
 Navigator implements LegacyQueryInterface;
 NodeIterator implements LegacyQueryInterface;
 NodeList implements LegacyQueryInterface;
 Notification implements LegacyQueryInterface;
 OfflineResourceList implements LegacyQueryInterface;
 PaintRequest implements LegacyQueryInterface;
rename from dom/webidl/MozNamedAttrMap.webidl
rename to dom/webidl/NamedNodeMap.webidl
--- a/dom/webidl/MozNamedAttrMap.webidl
+++ b/dom/webidl/NamedNodeMap.webidl
@@ -1,18 +1,14 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/**
- * This is a temporary, non-standard interface, to ease the transition to a
- * world where Attr no longer inherits from Node.
- */
-interface MozNamedAttrMap {
+interface NamedNodeMap {
   getter Attr? getNamedItem(DOMString name);
   [Throws]
   Attr? setNamedItem(Attr arg);
   [Throws]
   Attr removeNamedItem(DOMString name);
 
   getter Attr? item(unsigned long index);
   readonly attribute unsigned long length;
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -257,24 +257,24 @@ WEBIDL_FILES = [
     'MessagePortList.webidl',
     'MimeType.webidl',
     'MimeTypeArray.webidl',
     'MouseEvent.webidl',
     'MouseScrollEvent.webidl',
     'MozActivity.webidl',
     'MozMmsMessage.webidl',
     'MozMobileMessageManager.webidl',
-    'MozNamedAttrMap.webidl',
     'MozPowerManager.webidl',
     'MozSelfSupport.webidl',
     'MozTetheringManager.webidl',
     'MozTimeManager.webidl',
     'MozWakeLock.webidl',
     'MutationEvent.webidl',
     'MutationObserver.webidl',
+    'NamedNodeMap.webidl',
     'NativeOSFileInternals.webidl',
     'NetDashboard.webidl',
     'NetworkInformation.webidl',
     'NetworkOptions.webidl',
     'Node.webidl',
     'NodeFilter.webidl',
     'NodeIterator.webidl',
     'NodeList.webidl',
--- a/xpcom/reflect/xptinfo/ShimInterfaceInfo.cpp
+++ b/xpcom/reflect/xptinfo/ShimInterfaceInfo.cpp
@@ -240,17 +240,17 @@
 #include "mozilla/dom/LocalMediaStreamBinding.h"
 #include "mozilla/dom/MediaErrorBinding.h"
 #include "mozilla/dom/MediaListBinding.h"
 #include "mozilla/dom/MediaStreamBinding.h"
 #include "mozilla/dom/MessageEventBinding.h"
 #include "mozilla/dom/MouseEventBinding.h"
 #include "mozilla/dom/MouseScrollEventBinding.h"
 #include "mozilla/dom/MutationEventBinding.h"
-#include "mozilla/dom/MozNamedAttrMapBinding.h"
+#include "mozilla/dom/NamedNodeMapBinding.h"
 #include "mozilla/dom/NodeIteratorBinding.h"
 #include "mozilla/dom/NodeBinding.h"
 #include "mozilla/dom/NotifyPaintEventBinding.h"
 #include "mozilla/dom/EventBinding.h"
 #include "mozilla/dom/OfflineResourceListBinding.h"
 #include "mozilla/dom/PaintRequestBinding.h"
 #include "mozilla/dom/PositionErrorBinding.h"
 #include "mozilla/dom/ProcessingInstructionBinding.h"
@@ -429,17 +429,17 @@ const ComponentsInterfaceShimEntry kComp
   DEFINE_SHIM(LocalMediaStream),
   DEFINE_SHIM(MediaError),
   DEFINE_SHIM(MediaList),
   DEFINE_SHIM(MediaStream),
   DEFINE_SHIM(MessageEvent),
   DEFINE_SHIM(MouseEvent),
   DEFINE_SHIM(MouseScrollEvent),
   DEFINE_SHIM(MutationEvent),
-  DEFINE_SHIM(MozNamedAttrMap),
+  DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMMozNamedAttrMap, NamedNodeMap),
   DEFINE_SHIM(NodeIterator),
   DEFINE_SHIM(Node),
   DEFINE_SHIM(NotifyPaintEvent),
   DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMNSEvent, Event),
   DEFINE_SHIM(OfflineResourceList),
   DEFINE_SHIM(PaintRequest),
   DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMParser, DOMParser),
   DEFINE_SHIM(ProcessingInstruction),