Bug 1025359 - Correct -moz-tamil according to Predefined Counter Styles. r=jfkthame

This commit is contained in:
Xidorn Quan 2014-06-13 17:01:00 +02:00
parent a979fe44b7
commit 71ecac82d4
5 changed files with 8 additions and 32 deletions

View File

@ -216,24 +216,6 @@ DecimalToText(CounterValue aOrdinal, nsSubstring& aResult)
return true;
}
static bool
TamilToText(CounterValue aOrdinal, nsSubstring& aResult)
{
if (aOrdinal < 1 || aOrdinal > 9999) {
return false;
}
char16_t diff = 0x0BE6 - char16_t('0');
// We're going to be appending to whatever is in "result" already, so make
// sure to only munge the new bits. Note that we can't just grab the pointer
// to the new stuff here, since appending to the string can realloc.
DecimalToText(aOrdinal, aResult);
char16_t* p = aResult.BeginWriting();
for(; '\0' != *p ; p++)
if(*p != char16_t('0'))
*p += diff;
return true;
}
// We know cjk-ideographic need 31 characters to display 99,999,999,999,999,999
// georgian needs 6 at most
// armenian needs 12 at most
@ -776,10 +758,6 @@ BuiltinCounterStyle::IsOrdinalInRange(CounterValue aOrdinal)
// use HebrewToText
case NS_STYLE_LIST_STYLE_HEBREW:
return aOrdinal >= 1 && aOrdinal <= 999999;
// use TamilToText
case NS_STYLE_LIST_STYLE_MOZ_TAMIL:
return aOrdinal >= 1 && aOrdinal <= 9999;
}
}
@ -813,7 +791,6 @@ BuiltinCounterStyle::IsOrdinalInAutoRange(CounterValue aOrdinal)
case NS_STYLE_LIST_STYLE_SIMP_CHINESE_FORMAL:
case NS_STYLE_LIST_STYLE_SIMP_CHINESE_INFORMAL:
case NS_STYLE_LIST_STYLE_ETHIOPIC_NUMERIC:
case NS_STYLE_LIST_STYLE_MOZ_TAMIL:
return IsOrdinalInRange(aOrdinal);
default:
@ -945,9 +922,6 @@ BuiltinCounterStyle::GetInitialCounterText(CounterValue aOrdinal,
aIsRTL = true;
return HebrewToText(aOrdinal, aResult);
case NS_STYLE_LIST_STYLE_MOZ_TAMIL:
return TamilToText(aOrdinal, aResult);
case NS_STYLE_LIST_STYLE_ETHIOPIC_NUMERIC:
return EthiopicToText(aOrdinal, aResult);

View File

@ -156,6 +156,11 @@
symbols: \B66 \B67 \B68 \B69 \B6A \B6B \B6C \B6D \B6F \B70;
}
@counter-style -moz-tamil {
system: numeric;
symbols: \BE6 \BE7 \BE8 \BE9 \BEA \BEB \BEC \BED \BEE \BEF;
}
@counter-style -moz-telugu {
system: numeric;
symbols: \C66 \C67 \C68 \C69 \C6A \C6B \C6C \C6D \C6F \C70;

View File

@ -114,7 +114,6 @@ CSS_KEY(-moz-scrollbars-none, _moz_scrollbars_none)
CSS_KEY(-moz-scrollbars-vertical, _moz_scrollbars_vertical)
CSS_KEY(-moz-show-background, _moz_show_background)
CSS_KEY(-moz-stack, _moz_stack)
CSS_KEY(-moz-tamil, _moz_tamil)
CSS_KEY(-moz-use-system-font, _moz_use_system_font)
CSS_KEY(-moz-use-text-color, _moz_use_text_color)
CSS_KEY(-moz-visitedhyperlinktext, _moz_visitedhyperlinktext)

View File

@ -1388,7 +1388,6 @@ const KTableValue nsCSSProps::kListStyleKTable[] = {
eCSSKeyword_trad_chinese_informal, NS_STYLE_LIST_STYLE_TRAD_CHINESE_INFORMAL,
eCSSKeyword_trad_chinese_formal, NS_STYLE_LIST_STYLE_TRAD_CHINESE_FORMAL,
eCSSKeyword_ethiopic_numeric, NS_STYLE_LIST_STYLE_ETHIOPIC_NUMERIC,
eCSSKeyword__moz_tamil, NS_STYLE_LIST_STYLE_MOZ_TAMIL,
eCSSKeyword_UNKNOWN,-1
};

View File

@ -655,10 +655,9 @@ static inline mozilla::css::Side operator++(mozilla::css::Side& side, int) {
#define NS_STYLE_LIST_STYLE_TRAD_CHINESE_INFORMAL 17
#define NS_STYLE_LIST_STYLE_TRAD_CHINESE_FORMAL 18
#define NS_STYLE_LIST_STYLE_ETHIOPIC_NUMERIC 19
#define NS_STYLE_LIST_STYLE_MOZ_TAMIL 20
#define NS_STYLE_LIST_STYLE_DISCLOSURE_CLOSED 21
#define NS_STYLE_LIST_STYLE_DISCLOSURE_OPEN 22
#define NS_STYLE_LIST_STYLE__MAX 23
#define NS_STYLE_LIST_STYLE_DISCLOSURE_CLOSED 20
#define NS_STYLE_LIST_STYLE_DISCLOSURE_OPEN 21
#define NS_STYLE_LIST_STYLE__MAX 22
// See nsStyleList
#define NS_STYLE_LIST_STYLE_POSITION_INSIDE 0