Fix for bug #30492 and last part of #9876. Setting a style property to an empty string through the DOM now removes the property.

git-svn-id: svn://10.0.0.236/trunk@67782 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jst%netscape.com 2000-05-01 22:59:54 +00:00
parent ad8183f7ba
commit ca090e77c3
3 changed files with 21 additions and 0 deletions

View File

@ -233,6 +233,13 @@ nsDOMCSSDeclaration::SetProperty(const nsString& aPropertyName,
const nsString& aValue,
const nsString& aPriority)
{
if (!aValue.Length()) {
// If the new value of the property is an empty string we remove the
// property.
nsAutoString tmp;
return RemoveProperty(aPropertyName, tmp);
}
nsAutoString declString;
declString.Assign(aPropertyName);

View File

@ -233,6 +233,13 @@ nsDOMCSSDeclaration::SetProperty(const nsString& aPropertyName,
const nsString& aValue,
const nsString& aPriority)
{
if (!aValue.Length()) {
// If the new value of the property is an empty string we remove the
// property.
nsAutoString tmp;
return RemoveProperty(aPropertyName, tmp);
}
nsAutoString declString;
declString.Assign(aPropertyName);

View File

@ -233,6 +233,13 @@ nsDOMCSSDeclaration::SetProperty(const nsString& aPropertyName,
const nsString& aValue,
const nsString& aPriority)
{
if (!aValue.Length()) {
// If the new value of the property is an empty string we remove the
// property.
nsAutoString tmp;
return RemoveProperty(aPropertyName, tmp);
}
nsAutoString declString;
declString.Assign(aPropertyName);