Fix bug 197090; foo.style.background="" would throw instead of just doing

nothing.  r+sr=dbaron
This commit is contained in:
bzbarsky%mit.edu 2003-03-12 21:54:50 +00:00
parent 8042b25d4b
commit 78169362cd
2 changed files with 10 additions and 0 deletions

View File

@ -83,6 +83,11 @@ nsDOMCSSAttributeDeclaration::RemoveProperty(const nsAString& aPropertyName,
if (NS_SUCCEEDED(rv)) {
rv = SetCSSDeclaration(decl, PR_TRUE);
} else {
// RemoveProperty will throw in all sorts of situations -- eg if
// the property is a shorthand one. Do not propagate its return
// value to callers.
rv = NS_OK;
}
}

View File

@ -83,6 +83,11 @@ nsDOMCSSAttributeDeclaration::RemoveProperty(const nsAString& aPropertyName,
if (NS_SUCCEEDED(rv)) {
rv = SetCSSDeclaration(decl, PR_TRUE);
} else {
// RemoveProperty will throw in all sorts of situations -- eg if
// the property is a shorthand one. Do not propagate its return
// value to callers.
rv = NS_OK;
}
}