зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1147412 part 3 - Fix completely broken nsHTMLCSSUtils::IsCSSEquivalentToHTMLInlineStyleSet implementation; r=ehsan
This commit is contained in:
Родитель
66f099e3c6
Коммит
6afe078be0
|
@ -1034,14 +1034,25 @@ nsHTMLCSSUtils::IsCSSEquivalentToHTMLInlineStyleSet(nsINode* aNode,
|
|||
const nsAString* aAttribute,
|
||||
const nsAString& aValue,
|
||||
StyleType aStyleType)
|
||||
{
|
||||
// Use aValue as only an in param, not in-out
|
||||
nsAutoString value(aValue);
|
||||
return IsCSSEquivalentToHTMLInlineStyleSet(aNode, aProperty, aAttribute,
|
||||
value, aStyleType);
|
||||
}
|
||||
|
||||
bool
|
||||
nsHTMLCSSUtils::IsCSSEquivalentToHTMLInlineStyleSet(nsINode* aNode,
|
||||
nsIAtom* aProperty,
|
||||
const nsAString* aAttribute,
|
||||
nsAString& aValue,
|
||||
StyleType aStyleType)
|
||||
{
|
||||
MOZ_ASSERT(aNode && aProperty);
|
||||
bool isSet;
|
||||
nsAutoString value(aValue);
|
||||
nsresult res = IsCSSEquivalentToHTMLInlineStyleSet(aNode->AsDOMNode(),
|
||||
aProperty, aAttribute,
|
||||
isSet, value, aStyleType);
|
||||
NS_ASSERTION(NS_SUCCEEDED(res), "IsCSSEquivalentToHTMLInlineStyleSet failed");
|
||||
isSet, aValue, aStyleType);
|
||||
NS_ENSURE_SUCCESS(res, false);
|
||||
return isSet;
|
||||
}
|
||||
|
|
|
@ -194,6 +194,12 @@ public:
|
|||
const nsAString& aValue,
|
||||
StyleType aStyleType);
|
||||
|
||||
bool IsCSSEquivalentToHTMLInlineStyleSet(nsINode* aContent,
|
||||
nsIAtom* aProperty,
|
||||
const nsAString* aAttribute,
|
||||
nsAString& aValue,
|
||||
StyleType aStyleType);
|
||||
|
||||
nsresult IsCSSEquivalentToHTMLInlineStyleSet(nsIDOMNode * aNode,
|
||||
nsIAtom * aHTMLProperty,
|
||||
const nsAString * aAttribute,
|
||||
|
|
Загрузка…
Ссылка в новой задаче