mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Fix serialization of the list-style-type part of counter values. (Bug 481591) r+sr=bzbarsky
This commit is contained in:
parent
7d5c8d1dac
commit
83643d3790
@ -106,7 +106,13 @@ nsCounterUseNode::GetText(nsString& aResult)
|
||||
for (nsCounterNode *n = mScopeStart; n->mScopePrev; n = n->mScopeStart)
|
||||
stack.AppendElement(n->mScopePrev);
|
||||
|
||||
PRInt32 style = mCounterStyle->Item(mAllCounters ? 2 : 1).GetIntValue();
|
||||
const nsCSSValue& styleItem = mCounterStyle->Item(mAllCounters ? 2 : 1);
|
||||
PRInt32 style;
|
||||
if (styleItem.GetUnit() == eCSSUnit_None) {
|
||||
style = NS_STYLE_LIST_STYLE_NONE;
|
||||
} else {
|
||||
style = styleItem.GetIntValue();
|
||||
}
|
||||
const PRUnichar* separator;
|
||||
if (mAllCounters)
|
||||
separator = mCounterStyle->Item(1).GetStringBufferValue();
|
||||
|
@ -4548,7 +4548,11 @@ CSSParserImpl::ParseCounter(nsCSSValue& aValue)
|
||||
}
|
||||
}
|
||||
PRInt32 typeItem = eCSSUnit_Counters == unit ? 2 : 1;
|
||||
val->Item(typeItem).SetIntValue(type, eCSSUnit_Enumerated);
|
||||
if (type == NS_STYLE_LIST_STYLE_NONE) {
|
||||
val->Item(typeItem).SetNoneValue();
|
||||
} else {
|
||||
val->Item(typeItem).SetIntValue(type, eCSSUnit_Enumerated);
|
||||
}
|
||||
|
||||
if (!ExpectSymbol(')', PR_TRUE)) {
|
||||
SkipUntil(')');
|
||||
|
@ -751,12 +751,12 @@ nsComputedDOMStyle::GetContent(nsIDOMCSSValue** aValue)
|
||||
nsStyleUtil::AppendEscapedCSSString(
|
||||
nsDependentString(a->Item(1).GetStringBufferValue()), str);
|
||||
}
|
||||
PRInt32 type = a->Item(typeItem).GetIntValue();
|
||||
if (type != NS_STYLE_LIST_STYLE_DECIMAL) {
|
||||
str.AppendLiteral(", ");
|
||||
if (type == NS_STYLE_LIST_STYLE_NONE) {
|
||||
str.AppendLiteral("none");
|
||||
} else {
|
||||
if (a->Item(typeItem).GetUnit() == eCSSUnit_None) {
|
||||
str.AppendLiteral(", none");
|
||||
} else {
|
||||
PRInt32 type = a->Item(typeItem).GetIntValue();
|
||||
if (type != NS_STYLE_LIST_STYLE_DECIMAL) {
|
||||
str.AppendLiteral(", ");
|
||||
AppendASCIItoUTF16(
|
||||
nsCSSProps::ValueToKeyword(type, nsCSSProps::kListStyleKTable),
|
||||
str);
|
||||
|
Loading…
Reference in New Issue
Block a user