Backed out 2 changesets (bug 957431) because we decided we're keeping Attr.ownerElement in the end; a=sylvestre
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 27 Mar 2014 10:36:28 -0400
changeset 192346 69e896713b11581ff4d12b692465ddad8e77c382
parent 192345 d8e00ee13c02260f7ea8aadc4b279a652d8cb8a6
child 192347 48812cc39b833111fa3cf16a0f535b53284283fd
push id474
push userasasaki@mozilla.com
push dateMon, 02 Jun 2014 21:01:02 +0000
treeherdermozilla-release@967f4cf1b31c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssylvestre
bugs957431
milestone30.0a2
Backed out 2 changesets (bug 957431) because we decided we're keeping Attr.ownerElement in the end; a=sylvestre Backed out changeset ab12a8416a1d (bug 957431) Backed out changeset 188d1e255d40 (bug 957431)
content/base/public/nsDeprecatedOperationList.h
content/base/src/Attr.cpp
content/base/src/Attr.h
content/base/src/nsDocument.cpp
content/base/test/test_bug364413.xhtml
dom/interfaces/core/nsIDOMAttr.idl
dom/locales/en-US/chrome/dom/dom.properties
dom/tests/mochitest/dom-level2-core/mochitest.ini
dom/tests/mochitest/dom-level2-core/test_attrgetownerelement01.html
dom/tests/mochitest/dom-level2-core/test_attrgetownerelement02.html
dom/tests/mochitest/dom-level2-core/test_attrgetownerelement03.html
dom/tests/mochitest/dom-level2-core/test_attrgetownerelement04.html
dom/tests/mochitest/dom-level2-core/test_attrgetownerelement05.html
dom/tests/mochitest/dom-level2-core/test_importNode01.html
dom/tests/mochitest/dom-level2-core/test_ownerElement01.html
dom/tests/mochitest/dom-level2-core/test_ownerElement02.html
dom/webidl/Attr.webidl
dom/xslt/tests/mochitest/test_bug319374.xhtml
webapprt/locales/en-US/webapprt/overrides/dom.properties
--- a/content/base/public/nsDeprecatedOperationList.h
+++ b/content/base/public/nsDeprecatedOperationList.h
@@ -11,16 +11,17 @@
 DEPRECATED_OPERATION(GetAttributeNode)
 DEPRECATED_OPERATION(SetAttributeNode)
 DEPRECATED_OPERATION(GetAttributeNodeNS)
 DEPRECATED_OPERATION(SetAttributeNodeNS)
 DEPRECATED_OPERATION(RemoveAttributeNode)
 DEPRECATED_OPERATION(CreateAttribute)
 DEPRECATED_OPERATION(CreateAttributeNS)
 DEPRECATED_OPERATION(Specified)
+DEPRECATED_OPERATION(OwnerElement)
 DEPRECATED_OPERATION(NodeValue)
 DEPRECATED_OPERATION(TextContent)
 DEPRECATED_OPERATION(EnablePrivilege)
 DEPRECATED_OPERATION(InputEncoding)
 DEPRECATED_OPERATION(MozBeforePaint)
 DEPRECATED_OPERATION(DOMExceptionCode)
 DEPRECATED_OPERATION(NoExposedProps)
 DEPRECATED_OPERATION(MutationEvent)
--- a/content/base/src/Attr.cpp
+++ b/content/base/src/Attr.cpp
@@ -130,23 +130,16 @@ Attr::SetMap(nsDOMAttributeMap *aMap)
 }
 
 nsIContent*
 Attr::GetContent() const
 {
   return GetContentInternal();
 }
 
-Element*
-Attr::GetElement() const
-{
-  nsIContent* content = GetContent();
-  return content ? content->AsElement() : nullptr;
-}
-
 nsresult
 Attr::SetOwnerDocument(nsIDocument* aDocument)
 {
   NS_ASSERTION(aDocument, "Missing document");
 
   nsIDocument *doc = OwnerDoc();
   NS_ASSERTION(doc != aDocument, "bad call to Attr::SetOwnerDocument");
   doc->DeleteAllPropertiesFor(this);
@@ -236,16 +229,39 @@ Attr::Specified() const
 NS_IMETHODIMP
 Attr::GetSpecified(bool* aSpecified)
 {
   NS_ENSURE_ARG_POINTER(aSpecified);
   *aSpecified = Specified();
   return NS_OK;
 }
 
+Element*
+Attr::GetOwnerElement(ErrorResult& aRv)
+{
+  OwnerDoc()->WarnOnceAbout(nsIDocument::eOwnerElement);
+  return GetContentInternal();
+}
+
+NS_IMETHODIMP
+Attr::GetOwnerElement(nsIDOMElement** aOwnerElement)
+{
+  NS_ENSURE_ARG_POINTER(aOwnerElement);
+  OwnerDoc()->WarnOnceAbout(nsIDocument::eOwnerElement);
+
+  nsIContent* content = GetContentInternal();
+  if (content) {
+    return CallQueryInterface(content, aOwnerElement);
+  }
+
+  *aOwnerElement = nullptr;
+
+  return NS_OK;
+}
+
 void
 Attr::GetNodeValueInternal(nsAString& aNodeValue)
 {
   OwnerDoc()->WarnOnceAbout(nsIDocument::eNodeValue);
 
   GetValue(aNodeValue);
 }
 
--- a/content/base/src/Attr.h
+++ b/content/base/src/Attr.h
@@ -51,17 +51,16 @@ public:
   // nsIDOMAttr interface
   NS_DECL_NSIDOMATTR
 
   virtual nsresult PreHandleEvent(nsEventChainPreVisitor& aVisitor) MOZ_OVERRIDE;
 
   // nsIAttribute interface
   void SetMap(nsDOMAttributeMap *aMap) MOZ_OVERRIDE;
   nsIContent *GetContent() const MOZ_OVERRIDE;
-  Element *GetElement() const;
   nsresult SetOwnerDocument(nsIDocument* aDocument) MOZ_OVERRIDE;
 
   // nsINode interface
   virtual bool IsNodeOfType(uint32_t aFlags) const MOZ_OVERRIDE;
   virtual uint32_t GetChildCount() const MOZ_OVERRIDE;
   virtual nsIContent *GetChildAt(uint32_t aIndex) const MOZ_OVERRIDE;
   virtual nsIContent * const * GetChildArray(uint32_t* aChildCount) const MOZ_OVERRIDE;
   virtual int32_t IndexOf(const nsINode* aPossibleChild) const MOZ_OVERRIDE;
@@ -89,16 +88,18 @@ public:
   void SetValue(const nsAString& aValue, ErrorResult& aRv);
 
   bool Specified() const;
 
   // XPCOM GetNamespaceURI() is OK
   // XPCOM GetPrefix() is OK
   // XPCOM GetLocalName() is OK
 
+  Element* GetOwnerElement(ErrorResult& aRv);
+
 protected:
   virtual Element* GetNameSpaceElement()
   {
     return GetContentInternal();
   }
 
   static bool sInitialized;
 
--- a/content/base/src/nsDocument.cpp
+++ b/content/base/src/nsDocument.cpp
@@ -7251,17 +7251,20 @@ nsIDocument::AdoptNode(nsINode& aAdopted
   nsAutoScriptBlocker scriptBlocker;
 
   switch (adoptedNode->NodeType()) {
     case nsIDOMNode::ATTRIBUTE_NODE:
     {
       // Remove from ownerElement.
       nsRefPtr<Attr> adoptedAttr = static_cast<Attr*>(adoptedNode);
 
-      nsCOMPtr<Element> ownerElement = adoptedAttr->GetElement();
+      nsCOMPtr<Element> ownerElement = adoptedAttr->GetOwnerElement(rv);
+      if (rv.Failed()) {
+        return nullptr;
+      }
 
       if (ownerElement) {
         nsRefPtr<Attr> newAttr =
           ownerElement->RemoveAttributeNode(*adoptedAttr, rv);
         if (rv.Failed()) {
           return nullptr;
         }
 
--- a/content/base/test/test_bug364413.xhtml
+++ b/content/base/test/test_bug364413.xhtml
@@ -24,16 +24,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <pre id="test">
 <script class="testbody" type="text/javascript">
 /** Test for Bug 364413 **/
 
   var test1 = document.getElementById("test1");
   var attrNode = test1.getAttributeNodeNS("http://www.foobar.com", "foo");
   function mutationHandler(aEvent) {
     ok(attrNode == aEvent.relatedNode);
+    ok(aEvent.target == attrNode.ownerElement);
   }
 
   function runTest() {
     test1.removeAttributeNode(attrNode);
     test1.addEventListener("DOMAttrModified", mutationHandler, true);
     test1.setAttributeNodeNS(attrNode);
     test1.removeEventListener("DOMAttrModified", mutationHandler, true);
   }
--- a/dom/interfaces/core/nsIDOMAttr.idl
+++ b/dom/interfaces/core/nsIDOMAttr.idl
@@ -9,18 +9,21 @@
  * The nsIDOMAttr interface represents an attribute in an "Element" object. 
  * Typically the allowable values for the attribute are defined in a document 
  * type definition.
  * 
  * For more information on this interface please see 
  * http://www.w3.org/TR/DOM-Level-2-Core/
  */
 
-[scriptable, builtinclass, uuid(58f9b5f5-0e39-4999-85b1-095895569c0e)]
+[scriptable, builtinclass, uuid(a974a4d3-2ff1-445b-8b8e-0aada5d4eedc)]
 interface nsIDOMAttr : nsIDOMNode
 {
   readonly attribute DOMString            name;
   readonly attribute boolean              specified;
            attribute DOMString            value;
                                             // raises(DOMException) on setting
 
+  // Introduced in DOM Level 2:
+  readonly attribute  nsIDOMElement       ownerElement;
+
   readonly attribute boolean              isId;
 };
--- a/dom/locales/en-US/chrome/dom/dom.properties
+++ b/dom/locales/en-US/chrome/dom/dom.properties
@@ -45,16 +45,17 @@ FormValidationBadInputNumber=Please ente
 GetAttributeNodeWarning=Use of getAttributeNode() is deprecated. Use getAttribute() instead.
 SetAttributeNodeWarning=Use of setAttributeNode() is deprecated. Use setAttribute() instead.
 GetAttributeNodeNSWarning=Use of getAttributeNodeNS() is deprecated. Use getAttributeNS() instead.
 SetAttributeNodeNSWarning=Use of setAttributeNodeNS() is deprecated. Use setAttributeNS() instead.
 RemoveAttributeNodeWarning=Use of removeAttributeNode() is deprecated. Use removeAttribute() instead.
 CreateAttributeWarning=Use of document.createAttribute() is deprecated. Use element.setAttribute() instead.
 CreateAttributeNSWarning=Use of document.createAttributeNS() is deprecated. Use element.setAttributeNS() instead.
 SpecifiedWarning=Use of attributes' specified attribute is deprecated. It always returns true.
+OwnerElementWarning=Use of attributes' ownerElement attribute is deprecated.
 NodeValueWarning=Use of attributes' nodeValue attribute is deprecated. Use value instead.
 TextContentWarning=Use of attributes' textContent attribute is deprecated. Use value instead.
 EnablePrivilegeWarning=Use of enablePrivilege is deprecated.  Please use code that runs with the system principal (e.g. an extension) instead.
 nsIJSONDecodeDeprecatedWarning=nsIJSON.decode is deprecated.  Please use JSON.parse instead.
 nsIJSONEncodeDeprecatedWarning=nsIJSON.encode is deprecated.  Please use JSON.stringify instead.
 nsIDOMWindowInternalWarning=Use of nsIDOMWindowInternal is deprecated. Use nsIDOMWindow instead.
 InputEncodingWarning=Use of inputEncoding is deprecated.
 # LOCALIZATION NOTE: Do not translate "MozBeforePaint" and "mozRequestAnimationFrame"
--- a/dom/tests/mochitest/dom-level2-core/mochitest.ini
+++ b/dom/tests/mochitest/dom-level2-core/mochitest.ini
@@ -23,16 +23,21 @@ support-files =
   files/svgunit.js
   files/xhtml-lat1.ent
   files/xhtml-special.ent
   files/xhtml-symbol.ent
   files/xhtml1-frameset.dtd
   files/xhtml1-strict.dtd
   files/xhtml1-transitional.dtd
 
+[test_attrgetownerelement01.html]
+[test_attrgetownerelement02.html]
+[test_attrgetownerelement03.html]
+[test_attrgetownerelement04.html]
+[test_attrgetownerelement05.html]
 [test_createAttributeNS01.html]
 [test_createAttributeNS02.html]
 [test_createAttributeNS03.html]
 [test_createAttributeNS04.html]
 [test_createAttributeNS05.html]
 [test_createAttributeNS06.html]
 [test_createDocument01.html]
 [test_createDocument02.html]
@@ -229,16 +234,18 @@ support-files =
 [test_nodegetprefix03.html]
 [test_nodehasattributes01.html]
 [test_nodehasattributes02.html]
 [test_nodehasattributes03.html]
 [test_nodehasattributes04.html]
 [test_nodenormalize01.html]
 [test_normalize01.html]
 [test_ownerDocument01.html]
+[test_ownerElement01.html]
+[test_ownerElement02.html]
 [test_prefix01.html]
 [test_prefix02.html]
 [test_prefix03.html]
 [test_prefix04.html]
 [test_publicId01.html]
 [test_removeAttributeNS01.html]
 [test_removeAttributeNS02.html]
 [test_removeNamedItemNS01.html]
new file mode 100644
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-core/test_attrgetownerelement01.html
@@ -0,0 +1,134 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/core/attrgetownerelement01</title>
+<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
+<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+<script type="text/javascript" src="DOMTestCase.js"></script>
+<script type="text/javascript" src="exclusions.js"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['attrgetownerelement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+       setImplementationAttribute("namespaceAware", true);
+       setImplementationAttribute("validating", true);
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staffNS");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+    	catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+  if (++docsLoaded == 1) {
+    setUpPageStatus = 'complete';
+    runJSUnitTests();
+    markTodos();
+    SimpleTest.finish();
+  }
+}
+
+var docName = 'attrgetownerelement01';
+
+
+/**
+* 
+	The "getOwnerElement()" will return the Element node this attribute is attached to or 
+	null if this attribute is not in use.  
+  
+   Retreive the default attribute defaultAttr and check its owner element.  Verify if the name
+   the nodeName of the returned ownerElement is emp:employee.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/DOM-Level-2-Core/core#Attr-ownerElement
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=259
+*/
+function attrgetownerelement01() {
+   var success;
+    if(checkInitialization(builder, "attrgetownerelement01") != null) return;
+    var doc;
+      var attr;
+      var element;
+      var ownerElement;
+      var ownerElementName;
+      var elementList;
+      var attributes;
+      var nullNS = null;
+
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staffNS");
+      elementList = doc.getElementsByTagNameNS("http://www.nist.gov","employee");
+      element = elementList.item(1);
+      attributes = element.attributes;
+
+      attr = attributes.getNamedItemNS(nullNS,"defaultAttr");
+      ownerElement = attr.ownerElement;
+
+      ownerElementName = ownerElement.nodeName;
+
+      assertEquals("attrgetownerelement01","emp:employee",ownerElementName);
+       
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/core/attrgetownerelement01</h2>
+<p></p>
+<p>
+Copyright (c) 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the <a href="http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231">W3C(r) Software License</a> in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+</p>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-core/test_attrgetownerelement02.html
@@ -0,0 +1,127 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/core/attrgetownerelement02</title>
+<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
+<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+<script type="text/javascript" src="DOMTestCase.js"></script>
+<script type="text/javascript" src="exclusions.js"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['attrgetownerelement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+       setImplementationAttribute("namespaceAware", true);
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staffNS");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+    	catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+  if (++docsLoaded == 1) {
+    setUpPageStatus = 'complete';
+    runJSUnitTests();
+    markTodos();
+    SimpleTest.finish();
+  }
+}
+
+var docName = 'attrgetownerelement02';
+
+
+/**
+* 
+  The "getOwnerElement()" will return the Element node this attribute
+  is attached to or null if this attribute is not in use.  
+  
+  Create a new element and attribute node, attach the attribute to the element.
+  Check the value of owner element of the new attribute node
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/DOM-Level-2-Core/core#Attr-ownerElement
+*/
+function attrgetownerelement02() {
+   var success;
+    if(checkInitialization(builder, "attrgetownerelement02") != null) return;
+    var doc;
+      var element;
+      var ownerElement;
+      var ownerElementName;
+      var attr;
+      var newAttr;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staffNS");
+      element = doc.createElement("root");
+      attr = doc.createAttributeNS("http://www.w3.org/DOM/L1","L1:att");
+      newAttr = element.setAttributeNodeNS(attr);
+      ownerElement = attr.ownerElement;
+
+      ownerElementName = ownerElement.nodeName;
+
+      assertEquals("attrgetownerelement02","root".toLowerCase(),ownerElementName.toLowerCase());
+       
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/core/attrgetownerelement02</h2>
+<p></p>
+<p>
+Copyright (c) 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the <a href="http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231">W3C(r) Software License</a> in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+</p>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-core/test_attrgetownerelement03.html
@@ -0,0 +1,119 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/core/attrgetownerelement03</title>
+<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
+<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+<script type="text/javascript" src="DOMTestCase.js"></script>
+<script type="text/javascript" src="exclusions.js"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['attrgetownerelement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staffNS");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+    	catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+  if (++docsLoaded == 1) {
+    setUpPageStatus = 'complete';
+    runJSUnitTests();
+    markTodos();
+    SimpleTest.finish();
+  }
+}
+
+var docName = 'attrgetownerelement03';
+
+
+/**
+* 
+  The "getOwnerElement()" will return the Element node this attribute
+  is attached to or null if this attribute is not in use.  
+  
+  Create a new attribute node for this document node.  Since the newly attribute is
+  not it use its owner element should be null.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/DOM-Level-2-Core/core#Attr-ownerElement
+*/
+function attrgetownerelement03() {
+   var success;
+    if(checkInitialization(builder, "attrgetownerelement03") != null) return;
+    var doc;
+      var ownerElement;
+      var attr;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staffNS");
+      attr = doc.createAttributeNS("http://www.w3.org/DOM","dom:attr");
+      ownerElement = attr.ownerElement;
+
+      assertNull("attrgetownerelement03",ownerElement);
+    
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/core/attrgetownerelement03</h2>
+<p></p>
+<p>
+Copyright (c) 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the <a href="http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231">W3C(r) Software License</a> in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+</p>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-core/test_attrgetownerelement04.html
@@ -0,0 +1,140 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/core/attrgetownerelement04</title>
+<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
+<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+<script type="text/javascript" src="DOMTestCase.js"></script>
+<script type="text/javascript" src="exclusions.js"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['attrgetownerelement04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+       setImplementationAttribute("namespaceAware", true);
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staffNS");
+        
+      var docImpRef = null;
+      if (typeof(this.docImp) != 'undefined') {
+        docImpRef = this.docImp;
+      }
+      docsLoaded += preload(docImpRef, "docImp", "staff");
+        
+       if (docsLoaded == 2) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+    	catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+  if (++docsLoaded == 2) {
+    setUpPageStatus = 'complete';
+    runJSUnitTests();
+    markTodos();
+    SimpleTest.finish();
+  }
+}
+
+var docName = 'attrgetownerelement04';
+
+
+/**
+* 
+  The "getOwnerElement()" will return the Element node this attribute is attached to or 
+  null if this attribute is not in use.  
+  Import an attribute node to another document.  If an Attr node is imported, its 
+  ownerElement attribute should be set to null.  Verify if the ownerElement has been set 
+  to null.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/DOM-Level-2-Core/core#Attr-ownerElement
+*/
+function attrgetownerelement04() {
+   var success;
+    if(checkInitialization(builder, "attrgetownerelement04") != null) return;
+    var doc;
+      var docImp;
+      var ownerElement;
+      var element;
+      var attr;
+      var attrImp;
+      var addresses;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staffNS");
+      
+      var docImpRef = null;
+      if (typeof(this.docImp) != 'undefined') {
+        docImpRef = this.docImp;
+      }
+      docImp = load(docImpRef, "docImp", "staff");
+      addresses = doc.getElementsByTagNameNS("http://www.nist.gov","address");
+      element = addresses.item(1);
+      assertNotNull("empAddressNotNull",element);
+attr = element.getAttributeNodeNS("http://www.nist.gov","zone");
+      attrImp = docImp.importNode(attr,true);
+      ownerElement = attrImp.ownerElement;
+
+      assertNull("attrgetownerelement04",ownerElement);
+    
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/core/attrgetownerelement04</h2>
+<p></p>
+<p>
+Copyright (c) 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the <a href="http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231">W3C(r) Software License</a> in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+</p>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-core/test_attrgetownerelement05.html
@@ -0,0 +1,138 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/core/attrgetownerelement05</title>
+<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
+<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+<script type="text/javascript" src="DOMTestCase.js"></script>
+<script type="text/javascript" src="exclusions.js"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['attrgetownerelement05'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+       setImplementationAttribute("namespaceAware", true);
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staffNS");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+    	catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+  if (++docsLoaded == 1) {
+    setUpPageStatus = 'complete';
+    runJSUnitTests();
+    markTodos();
+    SimpleTest.finish();
+  }
+}
+
+var docName = 'attrgetownerelement05';
+
+
+/**
+* 
+  The "getOwnerElement()" will return the Element node this attribute is attached to 
+  or null if this attribute is not in use.  
+  
+  Retreive an element and its attributes.  Then remove the element and check the name of 
+  the ownerElement of attribute of the attribute "street".  
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/DOM-Level-2-Core/core#Attr-ownerElement
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=259
+*/
+function attrgetownerelement05() {
+   var success;
+    if(checkInitialization(builder, "attrgetownerelement05") != null) return;
+    var doc;
+      var element;
+      var ownerElement;
+      var parentElement;
+      var elementList;
+      var ownerElementName;
+      var attr;
+      var removedChild;
+      var nodeMap;
+      var nullNS = null;
+
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staffNS");
+      elementList = doc.getElementsByTagNameNS("*","address");
+      element = elementList.item(1);
+      parentElement = element.parentNode;
+
+      nodeMap = element.attributes;
+
+      removedChild = parentElement.removeChild(element);
+      attr = nodeMap.getNamedItemNS(nullNS,"street");
+      ownerElement = attr.ownerElement;
+
+      ownerElementName = ownerElement.nodeName;
+
+      assertEquals("attrgetownerelement05","address",ownerElementName);
+       
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/core/attrgetownerelement05</h2>
+<p></p>
+<p>
+Copyright (c) 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the <a href="http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231">W3C(r) Software License</a> in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+</p>
+</body>
+</html>
--- a/dom/tests/mochitest/dom-level2-core/test_importNode01.html
+++ b/dom/tests/mochitest/dom-level2-core/test_importNode01.html
@@ -139,16 +139,19 @@ function importNode01() {
       ownerDocument = aNode.ownerDocument;
 
       docType = ownerDocument.doctype;
 
       system = docType.systemId;
 
       assertNotNull("aNode",aNode);
 assertURIEquals("systemId",null,null,null,"staffNS.dtd",null,null,null,null,system);
+attrOwnerElement = aNode.ownerElement;
+
+      assertNull("ownerElement",attrOwnerElement);
     specified = aNode.specified;
 
       assertTrue("specified",specified);
 childList = aNode.childNodes;
 
       assertSize("childList",1,childList);
 nodeName = aNode.nodeName;
 
new file mode 100644
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-core/test_ownerElement01.html
@@ -0,0 +1,129 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/core/ownerElement01</title>
+<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
+<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+<script type="text/javascript" src="DOMTestCase.js"></script>
+<script type="text/javascript" src="exclusions.js"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['ownerElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staff");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+    	catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+  if (++docsLoaded == 1) {
+    setUpPageStatus = 'complete';
+    runJSUnitTests();
+    markTodos();
+    SimpleTest.finish();
+  }
+}
+
+var docName = 'ownerElement01';
+
+
+/**
+* 
+    The "getOwnerElement()" will return the Element node this attribute
+  is attached to or null if this attribute is not in use.  
+  Get the "domestic" attribute from the first "address" node.
+  Apply the "getOwnerElement()" method to get the Element associated 
+  with the attribute.  The value returned should be "address".
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/DOM-Level-2-Core/core#ID-F68D095
+*/
+function ownerElement01() {
+   var success;
+    if(checkInitialization(builder, "ownerElement01") != null) return;
+    var doc;
+      var addressList;
+      var testNode;
+      var attributes;
+      var domesticAttr;
+      var elementNode;
+      var name;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staff");
+      addressList = doc.getElementsByTagName("address");
+      testNode = addressList.item(0);
+      attributes = testNode.attributes;
+
+      domesticAttr = attributes.getNamedItem("domestic");
+      elementNode = domesticAttr.ownerElement;
+
+      name = elementNode.nodeName;
+
+      assertEquals("throw_Equals","address",name);
+       
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/core/ownerElement01</h2>
+<p></p>
+<p>
+Copyright (c) 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the <a href="http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231">W3C(r) Software License</a> in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+</p>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-core/test_ownerElement02.html
@@ -0,0 +1,120 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/core/ownerElement02</title>
+<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
+<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+<script type="text/javascript" src="DOMTestCase.js"></script>
+<script type="text/javascript" src="exclusions.js"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['ownerElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staff");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+    	catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+  if (++docsLoaded == 1) {
+    setUpPageStatus = 'complete';
+    runJSUnitTests();
+    markTodos();
+    SimpleTest.finish();
+  }
+}
+
+var docName = 'ownerElement02';
+
+
+/**
+* 
+    The "getOwnerElement()" will return the Element node this attribute
+  is attached to or null if this attribute is not in use.  
+  Create a new attribute.
+  Apply the "getOwnerElement()" method to get the Element associated 
+  with the attribute.  The value returned should be "null" since this
+  attribute is not in use.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/DOM-Level-2-Core/core#Attr-ownerElement
+*/
+function ownerElement02() {
+   var success;
+    if(checkInitialization(builder, "ownerElement02") != null) return;
+    var doc;
+      var newAttr;
+      var elementNode;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staff");
+      newAttr = doc.createAttribute("newAttribute");
+      elementNode = newAttr.ownerElement;
+
+      assertNull("throw_Null",elementNode);
+    
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/core/ownerElement02</h2>
+<p></p>
+<p>
+Copyright (c) 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the <a href="http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231">W3C(r) Software License</a> in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+</p>
+</body>
+</html>
--- a/dom/webidl/Attr.webidl
+++ b/dom/webidl/Attr.webidl
@@ -19,9 +19,13 @@ interface Attr : Node {
   readonly attribute DOMString? namespaceURI;
   readonly attribute DOMString? prefix;
 };
 
 // Mozilla extensions
 
 partial interface Attr {
   readonly attribute boolean specified;
+
+
+           [GetterThrows]
+  readonly attribute Element? ownerElement;
 };
--- a/dom/xslt/tests/mochitest/test_bug319374.xhtml
+++ b/dom/xslt/tests/mochitest/test_bug319374.xhtml
@@ -53,20 +53,19 @@ https://bugzilla.mozilla.org/show_bug.cg
     } catch (e) {
       error = e;
     }
     ok(!error, error);
     ok(counter == 3, "XPathEvaluator should have found 3 elements.")
 
     // Test 2: If the context node is in anonymous content, changing some
     //         other anonymous tree shouldn't cause XPath result to throw.
-    var anonElem1 =
+    var anonAttr1 =
       getAnonymousNodes(document.getElementById('content').
-        firstChild)[0];
-    var anonAttr1 = anonElem1.getAttributeNode('attr');
+        firstChild)[0].getAttributeNode('attr');
     var anonAttr2 =
       getAnonymousNodes(document.getElementById('content').
         lastChild)[0].getAttributeNode('attr');
     var resultAttr = null;
     try {
       var xp2 = xp.evaluate(".",
                             anonAttr1,
                             null,
@@ -87,17 +86,17 @@ https://bugzilla.mozilla.org/show_bug.cg
     try {
       var xp3 = xp.evaluate(".",
                             anonAttr1,
                             null,
                             SpecialPowers.Ci.nsIDOMXPathResult.
                               UNORDERED_NODE_ITERATOR_TYPE,
                             null);
       // Attribute changing in the same anonymous tree.
-      anonElem1.setAttribute("foo", "bar");
+      anonAttr1.ownerElement.setAttribute("foo", "bar");
       resultAttr = xp3.iterateNext();
       ok(resultAttr == anonAttr1,
          "XPathEvaluator should have thrown an exception!")
     } catch (e) {
       ok(true, e);
     }
 
     SimpleTest.finish();
--- a/webapprt/locales/en-US/webapprt/overrides/dom.properties
+++ b/webapprt/locales/en-US/webapprt/overrides/dom.properties
@@ -45,16 +45,17 @@ FormValidationBadInputNumber=Please ente
 GetAttributeNodeWarning=Use of getAttributeNode() is deprecated. Use getAttribute() instead.
 SetAttributeNodeWarning=Use of setAttributeNode() is deprecated. Use setAttribute() instead.
 GetAttributeNodeNSWarning=Use of getAttributeNodeNS() is deprecated. Use getAttributeNS() instead.
 SetAttributeNodeNSWarning=Use of setAttributeNodeNS() is deprecated. Use setAttributeNS() instead.
 RemoveAttributeNodeWarning=Use of removeAttributeNode() is deprecated. Use removeAttribute() instead.
 CreateAttributeWarning=Use of document.createAttribute() is deprecated. Use element.setAttribute() instead.
 CreateAttributeNSWarning=Use of document.createAttributeNS() is deprecated. Use element.setAttributeNS() instead.
 SpecifiedWarning=Use of attributes' specified attribute is deprecated. It always returns true.
+OwnerElementWarning=Use of attributes' ownerElement attribute is deprecated.
 NodeValueWarning=Use of attributes' nodeValue attribute is deprecated. Use value instead.
 TextContentWarning=Use of attributes' textContent attribute is deprecated. Use value instead.
 EnablePrivilegeWarning=Use of enablePrivilege is deprecated. Please use code that runs with the system principal (e.g. an extension) instead.
 nsIJSONDecodeDeprecatedWarning=nsIJSON.decode is deprecated. Please use JSON.parse instead.
 nsIJSONEncodeDeprecatedWarning=nsIJSON.encode is deprecated. Please use JSON.stringify instead.
 nsIDOMWindowInternalWarning=Use of nsIDOMWindowInternal is deprecated. Use nsIDOMWindow instead.
 InputEncodingWarning=Use of inputEncoding is deprecated.
 # LOCALIZATION NOTE: Do not translate "MozBeforePaint" and "mozRequestAnimationFrame"