Backout last two commits because of ownership issue.
authorMounir Lamouri <mounir.lamouri@gmail.com>
Tue, 27 Sep 2011 12:18:02 +0200
changeset 77697 c1b3ff7c7d59f05bf4a3fd930f620217790a4ce9
parent 77696 74a8fda1c4b5d7777f32a0a8604da4b6325b4fa2
child 77698 5a6768dfca355e875968499be804e4dab08ecd78
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
milestone9.0a1
Backout last two commits because of ownership issue.
content/base/public/nsDeprecatedOperationList.h
content/base/src/nsDOMAttribute.cpp
content/base/src/nsDocument.cpp
content/base/src/nsGenericDOMDataNode.cpp
content/base/src/nsGenericDOMDataNode.h
content/base/src/nsGenericElement.cpp
dom/base/nsGlobalWindow.cpp
dom/locales/en-US/chrome/dom/dom.properties
js/src/xpconnect/src/dom_quickstubs.qsconf
--- a/content/base/public/nsDeprecatedOperationList.h
+++ b/content/base/public/nsDeprecatedOperationList.h
@@ -66,16 +66,8 @@ DEPRECATED_OPERATION(RemoveChild)
 DEPRECATED_OPERATION(AppendChild)
 DEPRECATED_OPERATION(CloneNode)
 DEPRECATED_OPERATION(OwnerDocument)
 DEPRECATED_OPERATION(Normalize)
 DEPRECATED_OPERATION(IsSupported)
 DEPRECATED_OPERATION(IsEqualNode)
 DEPRECATED_OPERATION(TextContent)
 DEPRECATED_OPERATION(EnablePrivilege)
-DEPRECATED_OPERATION(IsSameNode)
-DEPRECATED_OPERATION(ReplaceWholeText)
-DEPRECATED_OPERATION(GlobalStorage)
-DEPRECATED_OPERATION(XmlEncoding)
-DEPRECATED_OPERATION(XmlVersion)
-DEPRECATED_OPERATION(InputEncoding)
-DEPRECATED_OPERATION(XmlStandalone)
-DEPRECATED_OPERATION(IsElementContentWhitespace)
--- a/content/base/src/nsDOMAttribute.cpp
+++ b/content/base/src/nsDOMAttribute.cpp
@@ -655,21 +655,16 @@ nsDOMAttribute::SetTextContent(const nsA
     document->WarnOnceAbout(nsIDocument::eTextContent);
   }
   return SetNodeValue(aTextContent);
 }
 
 NS_IMETHODIMP
 nsDOMAttribute::IsSameNode(nsIDOMNode *other, PRBool *aResult)
 {
-  nsIDocument* document = GetOwnerDoc();
-  if (document) {
-    document->WarnOnceAbout(nsIDocument::eIsSameNode);
-  }
-
   *aResult = other == this;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsDOMAttribute::Contains(nsIDOMNode* aOther, PRBool* aReturn)
 {
   return nsINode::Contains(aOther, aReturn);
--- a/content/base/src/nsDocument.cpp
+++ b/content/base/src/nsDocument.cpp
@@ -5821,17 +5821,16 @@ NS_IMETHODIMP
 nsDocument::SetTextContent(const nsAString & aTextContent)
 {
   return nsINode::SetTextContent(aTextContent);
 }
 
 NS_IMETHODIMP
 nsDocument::IsSameNode(nsIDOMNode *other, PRBool *aResult)
 {
-  WarnOnceAbout(eIsSameNode);
   *aResult = other == this;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsDocument::LookupPrefix(const nsAString & namespaceURI, nsAString & aResult)
 {
   SetDOMStringToNull(aResult);
@@ -5873,46 +5872,43 @@ NS_IMETHODIMP
 nsDocument::Contains(nsIDOMNode* aOther, PRBool* aReturn)
 {
   return nsINode::Contains(aOther, aReturn);
 }
 
 NS_IMETHODIMP
 nsDocument::GetInputEncoding(nsAString& aInputEncoding)
 {
-  WarnOnceAbout(eInputEncoding);
   if (mHaveInputEncoding) {
     return GetCharacterSet(aInputEncoding);
   }
 
   SetDOMStringToNull(aInputEncoding);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsDocument::GetXmlEncoding(nsAString& aXmlEncoding)
 {
-  WarnOnceAbout(eXmlEncoding);
   if (!IsHTML() &&
       mXMLDeclarationBits & XML_DECLARATION_BITS_DECLARATION_EXISTS &&
       mXMLDeclarationBits & XML_DECLARATION_BITS_ENCODING_EXISTS) {
     // XXX We don't store the encoding given in the xml declaration.
     // For now, just output the inputEncoding which we do store.
     GetInputEncoding(aXmlEncoding);
   } else {
     SetDOMStringToNull(aXmlEncoding);
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsDocument::GetXmlStandalone(PRBool *aXmlStandalone)
 {
-  WarnOnceAbout(eXmlStandalone);
   *aXmlStandalone = 
     !IsHTML() &&
     mXMLDeclarationBits & XML_DECLARATION_BITS_DECLARATION_EXISTS &&
     mXMLDeclarationBits & XML_DECLARATION_BITS_STANDALONE_EXISTS &&
     mXMLDeclarationBits & XML_DECLARATION_BITS_STANDALONE_YES;
 
   return NS_OK;
 }
@@ -5928,17 +5924,16 @@ nsDocument::GetMozSyntheticDocument(PRBo
 {
   *aSyntheticDocument = mIsSyntheticDocument;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsDocument::GetXmlVersion(nsAString& aXmlVersion)
 {
-  WarnOnceAbout(eXmlVersion);
   if (IsHTML()) {
     SetDOMStringToNull(aXmlVersion);
     return NS_OK;
   }
 
   // If there is no declaration, the value is "1.0".
 
   // XXX We only support "1.0", so always output "1.0" until that changes.
--- a/content/base/src/nsGenericDOMDataNode.cpp
+++ b/content/base/src/nsGenericDOMDataNode.cpp
@@ -841,18 +841,16 @@ nsGenericDOMDataNode::GetWholeText(nsASt
 }
 
 nsresult
 nsGenericDOMDataNode::ReplaceWholeText(const nsAString& aContent,
                                        nsIDOMText **aResult)
 {
   *aResult = nsnull;
 
-  GetOwnerDoc()->WarnOnceAbout(nsIDocument::eReplaceWholeText);
-
   // Handle parent-less nodes
   nsCOMPtr<nsIContent> parent = GetParent();
   if (!parent) {
     if (aContent.IsEmpty()) {
       return NS_OK;
     }
 
     SetNodeValue(aContent);
--- a/content/base/src/nsGenericDOMDataNode.h
+++ b/content/base/src/nsGenericDOMDataNode.h
@@ -329,17 +329,16 @@ protected:
   nsresult SplitText(PRUint32 aOffset, nsIDOMText** aReturn);
 
   nsresult GetWholeText(nsAString& aWholeText);
 
   nsresult ReplaceWholeText(const nsAString& aContent, nsIDOMText **aReturn);
 
   nsresult GetIsElementContentWhitespace(PRBool *aReturn)
   {
-    GetOwnerDoc()->WarnOnceAbout(nsIDocument::eIsElementContentWhitespace);
     *aReturn = TextIsOnlyWhitespace();
     return NS_OK;
   }
 
   static PRInt32 FirstLogicallyAdjacentTextNode(nsIContent* aParent,
                                                 PRInt32 aIndex);
 
   static PRInt32 LastLogicallyAdjacentTextNode(nsIContent* aParent,
--- a/content/base/src/nsGenericElement.cpp
+++ b/content/base/src/nsGenericElement.cpp
@@ -4205,20 +4205,16 @@ nsINode::IsEqualNode(nsIDOMNode* aOther,
   nsCOMPtr<nsINode> other = do_QueryInterface(aOther);
   *aReturn = IsEqualTo(other);
   return NS_OK;
 }
 
 nsresult
 nsINode::IsSameNode(nsIDOMNode* aOther, PRBool* aReturn)
 {
-  nsIDocument* owner = GetOwnerDoc();
-  if (owner) {
-    owner->WarnOnceAbout(nsIDocument::eIsSameNode);
-  }
   nsCOMPtr<nsINode> other = do_QueryInterface(aOther);
   *aReturn = other == this;
   return NS_OK;
 }
 
 //----------------------------------------------------------------------
 
 // nsISupports implementation
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -8154,21 +8154,16 @@ nsGlobalWindow::GetSessionStorage(nsIDOM
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsGlobalWindow::GetGlobalStorage(nsIDOMStorageList ** aGlobalStorage)
 {
   NS_ENSURE_ARG_POINTER(aGlobalStorage);
 
-  nsCOMPtr<nsIDocument> document = do_QueryInterface(GetExtantDocument());
-  if (document) {
-    document->WarnOnceAbout(nsIDocument::eGlobalStorage);
-  }
-
   if (!Preferences::GetBool(kStorageEnabled)) {
     *aGlobalStorage = nsnull;
     return NS_OK;
   }
 
   if (!sGlobalStorageList) {
     nsresult rv = NS_NewDOMStorageList(&sGlobalStorageList);
     NS_ENSURE_SUCCESS(rv, rv);
--- a/dom/locales/en-US/chrome/dom/dom.properties
+++ b/dom/locales/en-US/chrome/dom/dom.properties
@@ -106,16 +106,8 @@ OwnerDocumentWarning=Use of attributes' 
 NormalizeWarning=Use of attributes' normalize() is deprecated.
 IsSupportedWarning=Use of attributes' isSupported() is deprecated.
 IsEqualNodeWarning=Use of attributes' isEqualNode() is deprecated.
 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.
-IsSameNodeWarning=Use of isSameNode is deprecated.  Please use A == B to test for equality instead.
-ReplaceWholeTextWarning=Use of replaceWholeText is deprecated. Please call normalize() on the parent and set the data attribute, or use textContent instead.
-XmlEncodingWarning=Use of xmlEncoding is deprecated.
-XmlVersionWarning=Use of xmlVersion is deprecated.
-InputEncodingWarning=Use of inputEncoding is deprecated.
-XmlStandaloneWarning=Use of xmlStandalone is deprecated.
-IsElementContentWhitespaceWarning=Use of isElementContentWhitespaceWarning is deprecated.
-GlobalStorageWarning=Use of globalStorage is deprecated. Please use localStorage instead.
--- a/js/src/xpconnect/src/dom_quickstubs.qsconf
+++ b/js/src/xpconnect/src/dom_quickstubs.qsconf
@@ -812,16 +812,22 @@ customMethodCalls = {
         'code': '    PRUint16 result;\n'
                 '    rv = self->CompareDocPosition(arg0, &result);',
         'canFail': True
         },
     'nsIDOMNode_GetTextContent': {
         'thisType': 'nsINode',
         'canFail': False
         },
+    'nsIDOMNode_IsSameNode': {
+        'thisType': 'nsINode',
+        'arg0Type': 'nsINode',
+        'code': '    PRBool result = self == arg0;',
+        'canFail': False
+        },
     'nsIDOMNode_LookupPrefix': {
         'thisType': 'nsINode',
         'canFail': False
         },
     'nsIDOMNode_IsDefaultNamespace': {
         'thisType': 'nsINode',
         'canFail': False
         },