Bug 957430 - Stop pretending Attr.specified is deprecated; r=ehsan
authorAryeh Gregor <ayg@aryeh.name>
Fri, 25 Apr 2014 13:29:56 +0300
changeset 180482 fce4b77ed366a4a3b67e844e7f196311c2a1340c
parent 180481 4708d7dc81af96a71f89d77cc13fd0e8922948f8
child 180483 956c2f9e62ff511c4d6a0eee4056f5a33777f882
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewersehsan
bugs957430
milestone31.0a1
Bug 957430 - Stop pretending Attr.specified is deprecated; r=ehsan
content/base/public/nsDeprecatedOperationList.h
content/base/src/Attr.cpp
dom/locales/en-US/chrome/dom/dom.properties
dom/webidl/Attr.webidl
webapprt/locales/en-US/webapprt/overrides/dom.properties
--- a/content/base/public/nsDeprecatedOperationList.h
+++ b/content/base/public/nsDeprecatedOperationList.h
@@ -10,17 +10,16 @@
 
 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)
--- a/content/base/src/Attr.cpp
+++ b/content/base/src/Attr.cpp
@@ -221,17 +221,16 @@ Attr::SetValue(const nsAString& aValue)
   ErrorResult rv;
   SetValue(aValue, rv);
   return rv.ErrorCode();
 }
 
 bool
 Attr::Specified() const
 {
-  OwnerDoc()->WarnOnceAbout(nsIDocument::eSpecified);
   return true;
 }
 
 NS_IMETHODIMP
 Attr::GetSpecified(bool* aSpecified)
 {
   NS_ENSURE_ARG_POINTER(aSpecified);
   *aSpecified = Specified();
--- a/dom/locales/en-US/chrome/dom/dom.properties
+++ b/dom/locales/en-US/chrome/dom/dom.properties
@@ -44,17 +44,16 @@ FormValidationStepMismatchOneValue=Pleas
 FormValidationBadInputNumber=Please enter a number.
 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.
--- a/dom/webidl/Attr.webidl
+++ b/dom/webidl/Attr.webidl
@@ -13,19 +13,18 @@
 interface Attr : Node {
   readonly attribute DOMString localName;
            [SetterThrows]
            attribute DOMString value;
 
   readonly attribute DOMString name;
   readonly attribute DOMString? namespaceURI;
   readonly attribute DOMString? prefix;
+
+  readonly attribute boolean specified;
 };
 
 // Mozilla extensions
 
 partial interface Attr {
-  readonly attribute boolean specified;
-
-
            [GetterThrows]
   readonly attribute Element? ownerElement;
 };
--- a/webapprt/locales/en-US/webapprt/overrides/dom.properties
+++ b/webapprt/locales/en-US/webapprt/overrides/dom.properties
@@ -44,17 +44,16 @@ FormValidationStepMismatchOneValue=Pleas
 FormValidationBadInputNumber=Please enter a number.
 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.