Remove unreachable code, since text-decoration:none is not stored as an enumerated value. (Bug 481595) r+sr=bzbarsky

This commit is contained in:
L. David Baron 2009-03-06 13:05:01 +09:00
parent 73dcd3c824
commit a9baf2d0c2

View File

@ -311,23 +311,20 @@ nsCSSDeclaration::AppendCSSValueToString(nsCSSProperty aProperty,
else if (eCSSUnit_Enumerated == unit) {
if (eCSSProperty_text_decoration == aProperty) {
PRInt32 intValue = aValue.GetIntValue();
if (NS_STYLE_TEXT_DECORATION_NONE != intValue) {
PRInt32 mask;
for (mask = NS_STYLE_TEXT_DECORATION_UNDERLINE;
mask <= NS_STYLE_TEXT_DECORATION_BLINK;
mask <<= 1) {
if ((mask & intValue) == mask) {
AppendASCIItoUTF16(nsCSSProps::LookupPropertyValue(aProperty, mask), aResult);
intValue &= ~mask;
if (0 != intValue) { // more left
aResult.Append(PRUnichar(' '));
}
NS_ABORT_IF_FALSE(NS_STYLE_TEXT_DECORATION_NONE != intValue,
"none should be parsed as eCSSUnit_None");
PRInt32 mask;
for (mask = NS_STYLE_TEXT_DECORATION_UNDERLINE;
mask <= NS_STYLE_TEXT_DECORATION_BLINK;
mask <<= 1) {
if ((mask & intValue) == mask) {
AppendASCIItoUTF16(nsCSSProps::LookupPropertyValue(aProperty, mask), aResult);
intValue &= ~mask;
if (0 != intValue) { // more left
aResult.Append(PRUnichar(' '));
}
}
}
else {
AppendASCIItoUTF16(nsCSSProps::LookupPropertyValue(aProperty, NS_STYLE_TEXT_DECORATION_NONE), aResult);
}
}
else if (eCSSProperty_azimuth == aProperty) {
PRInt32 intValue = aValue.GetIntValue();