|foo.style.cssText = "";| should work (need to take old hint into

account).  Bug 131905, r=caillon, sr=jst, a=scc.
This commit is contained in:
bzbarsky%mit.edu 2002-03-19 22:38:08 +00:00
Родитель ed809c77eb
Коммит 3d23ee1924
2 изменённых файлов: 12 добавлений и 4 удалений

Просмотреть файл

@ -315,7 +315,7 @@ nsDOMCSSAttributeDeclaration::ParseDeclaration(const nsAReadableString& aDecl,
getter_AddRefs(cssParser));
if (NS_SUCCEEDED(result)) {
PRInt32 hint;
PRInt32 hint = NS_STYLE_HINT_NONE;
if (doc) {
doc->BeginUpdate();
@ -325,6 +325,7 @@ nsDOMCSSAttributeDeclaration::ParseDeclaration(const nsAReadableString& aDecl,
nsCSSDeclaration* declClone = decl->Clone();
if (aClearOldDecl) {
hint = decl->GetStyleImpact();
// This should be done with decl->Clear() once such a method exists.
nsAutoString propName;
PRUint32 count, i;
@ -341,8 +342,11 @@ nsDOMCSSAttributeDeclaration::ParseDeclaration(const nsAReadableString& aDecl,
}
}
PRInt32 newHint = NS_STYLE_HINT_NONE;
result = cssParser->ParseAndAppendDeclaration(aDecl, baseURI, decl,
aParseOnlyOneDecl, &hint);
aParseOnlyOneDecl, &newHint);
hint = PR_MAX(hint, newHint);
if (result == NS_CSS_PARSER_DROP_DECLARATION) {
SetCSSDeclaration(declClone);
result = NS_OK;

Просмотреть файл

@ -315,7 +315,7 @@ nsDOMCSSAttributeDeclaration::ParseDeclaration(const nsAReadableString& aDecl,
getter_AddRefs(cssParser));
if (NS_SUCCEEDED(result)) {
PRInt32 hint;
PRInt32 hint = NS_STYLE_HINT_NONE;
if (doc) {
doc->BeginUpdate();
@ -325,6 +325,7 @@ nsDOMCSSAttributeDeclaration::ParseDeclaration(const nsAReadableString& aDecl,
nsCSSDeclaration* declClone = decl->Clone();
if (aClearOldDecl) {
hint = decl->GetStyleImpact();
// This should be done with decl->Clear() once such a method exists.
nsAutoString propName;
PRUint32 count, i;
@ -341,8 +342,11 @@ nsDOMCSSAttributeDeclaration::ParseDeclaration(const nsAReadableString& aDecl,
}
}
PRInt32 newHint = NS_STYLE_HINT_NONE;
result = cssParser->ParseAndAppendDeclaration(aDecl, baseURI, decl,
aParseOnlyOneDecl, &hint);
aParseOnlyOneDecl, &newHint);
hint = PR_MAX(hint, newHint);
if (result == NS_CSS_PARSER_DROP_DECLARATION) {
SetCSSDeclaration(declClone);
result = NS_OK;