Loading content/html/content/src/nsGenericHTMLElement.h +0 −25 Original line number Diff line number Diff line Loading @@ -1161,31 +1161,6 @@ PR_STATIC_ASSERT(ELEMENT_TYPE_SPECIFIC_BITS_OFFSET + 1 < 32); return SetAttrHelper(nsGkAtoms::_atom, aValue); \ } /** * A macro to implement the getter and setter for a given content * property that needs to set a positive integer. The method uses * the generic GetAttr and SetAttr methods. This macro is much like * the NS_IMPL_NON_NEGATIVE_INT_ATTR macro except the exception is * thrown also when the value is equal to 0. */ #define NS_IMPL_POSITIVE_INT_ATTR(_class, _method, _atom) \ NS_IMPL_POSITIVE_INT_ATTR_DEFAULT_VALUE(_class, _method, _atom, 1) #define NS_IMPL_POSITIVE_INT_ATTR_DEFAULT_VALUE(_class, _method, _atom, _default) \ NS_IMETHODIMP \ _class::Get##_method(PRInt32* aValue) \ { \ return GetIntAttr(nsGkAtoms::_atom, _default, aValue); \ } \ NS_IMETHODIMP \ _class::Set##_method(PRInt32 aValue) \ { \ if (aValue <= 0) { \ return NS_ERROR_DOM_INDEX_SIZE_ERR; \ } \ return SetIntAttr(nsGkAtoms::_atom, aValue); \ } /** * QueryInterface() implementation helper macros */ Loading Loading
content/html/content/src/nsGenericHTMLElement.h +0 −25 Original line number Diff line number Diff line Loading @@ -1161,31 +1161,6 @@ PR_STATIC_ASSERT(ELEMENT_TYPE_SPECIFIC_BITS_OFFSET + 1 < 32); return SetAttrHelper(nsGkAtoms::_atom, aValue); \ } /** * A macro to implement the getter and setter for a given content * property that needs to set a positive integer. The method uses * the generic GetAttr and SetAttr methods. This macro is much like * the NS_IMPL_NON_NEGATIVE_INT_ATTR macro except the exception is * thrown also when the value is equal to 0. */ #define NS_IMPL_POSITIVE_INT_ATTR(_class, _method, _atom) \ NS_IMPL_POSITIVE_INT_ATTR_DEFAULT_VALUE(_class, _method, _atom, 1) #define NS_IMPL_POSITIVE_INT_ATTR_DEFAULT_VALUE(_class, _method, _atom, _default) \ NS_IMETHODIMP \ _class::Get##_method(PRInt32* aValue) \ { \ return GetIntAttr(nsGkAtoms::_atom, _default, aValue); \ } \ NS_IMETHODIMP \ _class::Set##_method(PRInt32 aValue) \ { \ if (aValue <= 0) { \ return NS_ERROR_DOM_INDEX_SIZE_ERR; \ } \ return SetIntAttr(nsGkAtoms::_atom, aValue); \ } /** * QueryInterface() implementation helper macros */ Loading