diff --git a/mozilla/content/html/content/src/nsGenericHTMLElement.cpp b/mozilla/content/html/content/src/nsGenericHTMLElement.cpp index d49710d090b..619c6cbb12e 100644 --- a/mozilla/content/html/content/src/nsGenericHTMLElement.cpp +++ b/mozilla/content/html/content/src/nsGenericHTMLElement.cpp @@ -1931,26 +1931,6 @@ PRBool nsGenericHTMLElement::IsEventName(nsIAtom* aName) aName == nsLayoutAtoms::onDOMNodeRemoved); } -static nsChangeHint GetStyleImpactFrom(const nsHTMLValue& aValue) -{ - nsChangeHint hint = NS_STYLE_HINT_NONE; - - if (eHTMLUnit_ISupports == aValue.GetUnit()) { - nsCOMPtr supports(dont_AddRef(aValue.GetISupportsValue())); - nsCOMPtr cssRule(do_QueryInterface(supports)); - - if (cssRule) { - nsCSSDeclaration* declaration = cssRule->GetDeclaration(); - - if (declaration) { - hint = declaration->GetStyleImpact(); - } - } - } - - return hint; -} - nsresult nsGenericHTMLElement::SetHTMLAttribute(nsIAtom* aAttribute, const nsHTMLValue& aValue, @@ -2097,24 +2077,11 @@ nsGenericHTMLElement::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute, } } - nsChangeHint impact = NS_STYLE_HINT_UNKNOWN; if (mDocument) { if (aNotify) { mDocument->BeginUpdate(); mDocument->AttributeWillChange(this, aNameSpaceID, aAttribute); - - if (aNameSpaceID == kNameSpaceID_None && - aAttribute == nsHTMLAtoms::style) { - nsHTMLValue oldValue; - if (NS_CONTENT_ATTR_NOT_THERE != GetHTMLAttribute(aAttribute, - oldValue)) { - impact = GetStyleImpactFrom(oldValue); - } - else { - impact = NS_STYLE_HINT_NONE; - } - } } if (nsGenericElement::HasMutationListeners(this, NS_EVENT_BITS_MUTATION_ATTRMODIFIED)) { @@ -2165,7 +2132,9 @@ nsGenericHTMLElement::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute, binding->AttributeChanged(aAttribute, aNameSpaceID, PR_TRUE, aNotify); if (aNotify) { - mDocument->AttributeChanged(this, aNameSpaceID, aAttribute, nsIDOMMutationEvent::REMOVAL, impact); + mDocument->AttributeChanged(this, aNameSpaceID, aAttribute, + nsIDOMMutationEvent::REMOVAL, + NS_STYLE_HINT_UNKNOWN); mDocument->EndUpdate(); } } diff --git a/mozilla/content/html/style/src/nsCSSDeclaration.cpp b/mozilla/content/html/style/src/nsCSSDeclaration.cpp index 1c652b43bc2..dcb3c6f3a5d 100644 --- a/mozilla/content/html/style/src/nsCSSDeclaration.cpp +++ b/mozilla/content/html/style/src/nsCSSDeclaration.cpp @@ -1218,19 +1218,6 @@ nsCSSDeclaration::GetNthProperty(PRUint32 aIndex, nsAString& aReturn) const return NS_OK; } -nsChangeHint -nsCSSDeclaration::GetStyleImpact() const -{ - nsChangeHint hint = NS_STYLE_HINT_NONE; - for (PRInt32 index = mOrder.Count() - 1; index >= 0; --index) { - nsCSSProperty property = OrderValueAt(index); - if (eCSSProperty_UNKNOWN < property) { - NS_UpdateHint(hint, nsCSSProps::kHintTable[property]); - } - } - return hint; -} - nsCSSDeclaration* nsCSSDeclaration::Clone() const { diff --git a/mozilla/content/html/style/src/nsCSSDeclaration.h b/mozilla/content/html/style/src/nsCSSDeclaration.h index e74f88f9e30..9a62bd8a63c 100644 --- a/mozilla/content/html/style/src/nsCSSDeclaration.h +++ b/mozilla/content/html/style/src/nsCSSDeclaration.h @@ -90,9 +90,6 @@ public: PRUint32 Count() const; nsresult GetNthProperty(PRUint32 aIndex, nsAString& aReturn) const; - // XXX This should go away, along with the rest of the property-based hints. - nsChangeHint GetStyleImpact() const; - nsresult ToString(nsAString& aString) const; nsCSSDeclaration* Clone() const; diff --git a/mozilla/content/shared/public/nsCSSProps.h b/mozilla/content/shared/public/nsCSSProps.h index d07b0052d04..3e79dede4a3 100644 --- a/mozilla/content/shared/public/nsCSSProps.h +++ b/mozilla/content/shared/public/nsCSSProps.h @@ -73,7 +73,6 @@ public: static PRInt32 SearchKeywordTableInt(PRInt32 aValue, const PRInt32 aTable[]); static const nsAFlatCString& SearchKeywordTable(PRInt32 aValue, const PRInt32 aTable[]); - static const nsChangeHint kHintTable[eCSSProperty_COUNT]; static const nsCSSType kTypeTable[eCSSProperty_COUNT_no_shorthands]; static const nsStyleStructID kSIDTable[eCSSProperty_COUNT_no_shorthands]; diff --git a/mozilla/content/shared/src/nsCSSProps.cpp b/mozilla/content/shared/src/nsCSSProps.cpp index 1d38ea7d635..987ecd18314 100644 --- a/mozilla/content/shared/src/nsCSSProps.cpp +++ b/mozilla/content/shared/src/nsCSSProps.cpp @@ -1335,16 +1335,6 @@ PRBool nsCSSProps::GetColorName(PRInt32 aPropValue, nsCString &aStr) return rv; } -// define array of all CSS property hints -const nsChangeHint nsCSSProps::kHintTable[eCSSProperty_COUNT] = { - #define CSS_PROP(name_, id_, method_, hint_, datastruct_, member_, type_, iscoord_) hint_, - #include "nsCSSPropList.h" - #undef CSS_PROP - #define CSS_PROP_SHORTHAND(name_, id_, method_, hint_) hint_, - #include "nsCSSPropList.h" - #undef CSS_PROP_SHORTHAND -}; - // define array of all CSS property types const nsCSSType nsCSSProps::kTypeTable[eCSSProperty_COUNT_no_shorthands] = { #define CSS_PROP(name_, id_, method_, hint_, datastruct_, member_, type_, iscoord_) type_, diff --git a/mozilla/layout/style/nsCSSDeclaration.cpp b/mozilla/layout/style/nsCSSDeclaration.cpp index 1c652b43bc2..dcb3c6f3a5d 100644 --- a/mozilla/layout/style/nsCSSDeclaration.cpp +++ b/mozilla/layout/style/nsCSSDeclaration.cpp @@ -1218,19 +1218,6 @@ nsCSSDeclaration::GetNthProperty(PRUint32 aIndex, nsAString& aReturn) const return NS_OK; } -nsChangeHint -nsCSSDeclaration::GetStyleImpact() const -{ - nsChangeHint hint = NS_STYLE_HINT_NONE; - for (PRInt32 index = mOrder.Count() - 1; index >= 0; --index) { - nsCSSProperty property = OrderValueAt(index); - if (eCSSProperty_UNKNOWN < property) { - NS_UpdateHint(hint, nsCSSProps::kHintTable[property]); - } - } - return hint; -} - nsCSSDeclaration* nsCSSDeclaration::Clone() const { diff --git a/mozilla/layout/style/nsCSSDeclaration.h b/mozilla/layout/style/nsCSSDeclaration.h index e74f88f9e30..9a62bd8a63c 100644 --- a/mozilla/layout/style/nsCSSDeclaration.h +++ b/mozilla/layout/style/nsCSSDeclaration.h @@ -90,9 +90,6 @@ public: PRUint32 Count() const; nsresult GetNthProperty(PRUint32 aIndex, nsAString& aReturn) const; - // XXX This should go away, along with the rest of the property-based hints. - nsChangeHint GetStyleImpact() const; - nsresult ToString(nsAString& aString) const; nsCSSDeclaration* Clone() const; diff --git a/mozilla/layout/style/nsCSSProps.cpp b/mozilla/layout/style/nsCSSProps.cpp index 1d38ea7d635..987ecd18314 100644 --- a/mozilla/layout/style/nsCSSProps.cpp +++ b/mozilla/layout/style/nsCSSProps.cpp @@ -1335,16 +1335,6 @@ PRBool nsCSSProps::GetColorName(PRInt32 aPropValue, nsCString &aStr) return rv; } -// define array of all CSS property hints -const nsChangeHint nsCSSProps::kHintTable[eCSSProperty_COUNT] = { - #define CSS_PROP(name_, id_, method_, hint_, datastruct_, member_, type_, iscoord_) hint_, - #include "nsCSSPropList.h" - #undef CSS_PROP - #define CSS_PROP_SHORTHAND(name_, id_, method_, hint_) hint_, - #include "nsCSSPropList.h" - #undef CSS_PROP_SHORTHAND -}; - // define array of all CSS property types const nsCSSType nsCSSProps::kTypeTable[eCSSProperty_COUNT_no_shorthands] = { #define CSS_PROP(name_, id_, method_, hint_, datastruct_, member_, type_, iscoord_) type_, diff --git a/mozilla/layout/style/nsCSSProps.h b/mozilla/layout/style/nsCSSProps.h index d07b0052d04..3e79dede4a3 100644 --- a/mozilla/layout/style/nsCSSProps.h +++ b/mozilla/layout/style/nsCSSProps.h @@ -73,7 +73,6 @@ public: static PRInt32 SearchKeywordTableInt(PRInt32 aValue, const PRInt32 aTable[]); static const nsAFlatCString& SearchKeywordTable(PRInt32 aValue, const PRInt32 aTable[]); - static const nsChangeHint kHintTable[eCSSProperty_COUNT]; static const nsCSSType kTypeTable[eCSSProperty_COUNT_no_shorthands]; static const nsStyleStructID kSIDTable[eCSSProperty_COUNT_no_shorthands];