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:
parent
ad8183f7ba
commit
ca090e77c3
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user