Make Hebrew list numbering be ordered correctly. Bug 413928, r+sr=roc, blocking1.9=shrep

This commit is contained in:
smontagu@smontagu.org 2008-02-13 00:21:59 -08:00
parent 3187a0dc1a
commit 60180f6db8
12 changed files with 542 additions and 206 deletions

View File

@ -52,9 +52,6 @@
#include "nsIURL.h"
#include "nsNetUtil.h"
#include "prprf.h"
#ifdef IBMBIDI
#include "nsBidiPresUtils.h"
#endif // IBMBIDI
#include "nsDisplayList.h"
#include "imgILoader.h"
@ -242,13 +239,7 @@ nsBulletFrame::PaintBullet(nsIRenderingContext& aRenderingContext, nsPoint aPt,
nsCOMPtr<nsIFontMetrics> fm;
aRenderingContext.SetColor(myColor->mColor);
#ifdef IBMBIDI
nsCharType charType = eCharType_LeftToRight;
PRUint8 level = 0;
PRBool isBidiSystem = PR_FALSE;
const nsStyleVisibility* vis = GetStyleVisibility();
PRUint32 hints = 0;
#endif // IBMBIDI
mTextIsRTL = PR_FALSE;
nsAutoString text;
switch (listStyleType) {
@ -277,38 +268,6 @@ nsBulletFrame::PaintBullet(nsIRenderingContext& aRenderingContext, nsPoint aPt,
case NS_STYLE_LIST_STYLE_DECIMAL:
case NS_STYLE_LIST_STYLE_OLD_DECIMAL:
case NS_STYLE_LIST_STYLE_DECIMAL_LEADING_ZERO:
#ifdef IBMBIDI
GetListItemText(*myList, text);
charType = eCharType_EuropeanNumber;
break;
case NS_STYLE_LIST_STYLE_MOZ_ARABIC_INDIC:
if (GetListItemText(*myList, text))
charType = eCharType_ArabicNumber;
else
charType = eCharType_EuropeanNumber;
break;
case NS_STYLE_LIST_STYLE_HEBREW:
aRenderingContext.GetHints(hints);
isBidiSystem = !!(hints & NS_RENDERING_HINT_BIDI_REORDERING);
if (!isBidiSystem) {
if (GetListItemText(*myList, text)) {
charType = eCharType_RightToLeft;
level = 1;
} else {
charType = eCharType_EuropeanNumber;
}
if (NS_STYLE_DIRECTION_RTL == vis->mDirection) {
text.Cut(0, 1);
text.AppendLiteral(".");
}
break;
}
// else fall through
#endif // IBMBIDI
case NS_STYLE_LIST_STYLE_LOWER_ROMAN:
case NS_STYLE_LIST_STYLE_UPPER_ROMAN:
case NS_STYLE_LIST_STYLE_LOWER_ALPHA:
@ -318,9 +277,7 @@ nsBulletFrame::PaintBullet(nsIRenderingContext& aRenderingContext, nsPoint aPt,
case NS_STYLE_LIST_STYLE_OLD_LOWER_ALPHA:
case NS_STYLE_LIST_STYLE_OLD_UPPER_ALPHA:
case NS_STYLE_LIST_STYLE_LOWER_GREEK:
#ifndef IBMBIDI
case NS_STYLE_LIST_STYLE_HEBREW:
#endif
case NS_STYLE_LIST_STYLE_ARMENIAN:
case NS_STYLE_LIST_STYLE_GEORGIAN:
case NS_STYLE_LIST_STYLE_CJK_IDEOGRAPHIC:
@ -336,9 +293,7 @@ nsBulletFrame::PaintBullet(nsIRenderingContext& aRenderingContext, nsPoint aPt,
case NS_STYLE_LIST_STYLE_MOZ_JAPANESE_FORMAL:
case NS_STYLE_LIST_STYLE_MOZ_CJK_HEAVENLY_STEM:
case NS_STYLE_LIST_STYLE_MOZ_CJK_EARTHLY_BRANCH:
#ifndef IBMBIDI
case NS_STYLE_LIST_STYLE_MOZ_ARABIC_INDIC:
#endif
case NS_STYLE_LIST_STYLE_MOZ_PERSIAN:
case NS_STYLE_LIST_STYLE_MOZ_URDU:
case NS_STYLE_LIST_STYLE_MOZ_DEVANAGARI:
@ -362,57 +317,15 @@ nsBulletFrame::PaintBullet(nsIRenderingContext& aRenderingContext, nsPoint aPt,
case NS_STYLE_LIST_STYLE_MOZ_ETHIOPIC_HALEHAME_TI_ER:
case NS_STYLE_LIST_STYLE_MOZ_ETHIOPIC_HALEHAME_TI_ET:
nsLayoutUtils::GetFontMetricsForFrame(this, getter_AddRefs(fm));
#ifdef IBMBIDI
// If we can't render our numeral using the chars in the numbering
// system, we'll be using "decimal"...
PRBool usedChars =
#endif // IBMBIDI
GetListItemText(*myList, text);
#ifdef IBMBIDI
if (!usedChars)
charType = eCharType_EuropeanNumber;
#endif
aRenderingContext.SetFont(fm);
nscoord ascent;
fm->GetMaxAscent(ascent);
aRenderingContext.SetTextRunRTL(PR_FALSE);
aRenderingContext.SetTextRunRTL(mTextIsRTL);
aRenderingContext.DrawString(text, mPadding.left + aPt.x,
mPadding.top + aPt.y + ascent);
break;
}
#ifdef IBMBIDI
if (charType != eCharType_LeftToRight) {
nsPresContext* presContext = PresContext();
nsLayoutUtils::GetFontMetricsForFrame(this, getter_AddRefs(fm));
aRenderingContext.SetFont(fm);
nscoord ascent;
fm->GetMaxAscent(ascent);
nsBidiPresUtils* bidiUtils = presContext->GetBidiUtils();
if (bidiUtils) {
const PRUnichar* buffer = text.get();
PRInt32 textLength = text.Length();
PRUint32 hints = 0;
aRenderingContext.GetHints(hints);
PRBool isNewTextRunSystem = (hints & NS_RENDERING_HINT_NEW_TEXT_RUNS) != 0;
if (eCharType_RightToLeft == charType) {
bidiUtils->FormatUnicodeText(presContext, (PRUnichar*)buffer, textLength,
charType, level, PR_FALSE, isNewTextRunSystem);
}
else {
//Mohamed
aRenderingContext.GetHints(hints);
isBidiSystem = !!(hints & NS_RENDERING_HINT_ARABIC_SHAPING);
bidiUtils->FormatUnicodeText(presContext, (PRUnichar*)buffer, textLength,
charType, level, isBidiSystem, isNewTextRunSystem);//Mohamed
}
}
// XXX is this right?
aRenderingContext.SetTextRunRTL(level);
aRenderingContext.DrawString(text, mPadding.left + aPt.x,
mPadding.top + aPt.y + ascent);
}
#endif // IBMBIDI
}
PRInt32
@ -843,9 +756,7 @@ static const PRBool CJKIdeographicToText(PRInt32 ordinal, nsString& result,
return PR_TRUE;
}
#define HEBREW_THROSAND_SEP 0x0020
#define HEBREW_GERESH 0x05F3
#define HEBREW_GERSHAYIM 0x05F4
static const PRUnichar gHebrewDigit[22] =
{
// 1 2 3 4 5 6 7 8 9
@ -858,73 +769,22 @@ static const PRUnichar gHebrewDigit[22] =
static PRBool HebrewToText(PRInt32 ordinal, nsString& result)
{
if (ordinal < 0) {
if (ordinal < 1 || ordinal > 999999) {
DecimalToText(ordinal, result);
return PR_FALSE;
}
if (ordinal == 0) {
// This one is treated specially
#ifdef IBMBIDI
static const PRUnichar hebrewZero[] = { 0x05D0, 0x05E4, 0x05E1 };
#else
static const PRUnichar hebrewZero[] = { 0x05E1, 0x05E4, 0x05D0 };
#endif // IBMBIDI
result.Append(hebrewZero);
return PR_TRUE;
}
PRBool outputSep = PR_FALSE;
PRUnichar buf[NUM_BUF_SIZE];
#ifdef IBMBIDI
// Changes: 1) don't reverse the text; 2) don't insert geresh/gershayim.
PRInt32 idx = 0;
#else
PRInt32 idx = NUM_BUF_SIZE;
#endif // IBMBIDI
PRUnichar digit;
nsAutoString allText, thousandsGroup;
do {
thousandsGroup.Truncate();
PRInt32 n3 = ordinal % 1000;
if(outputSep)
#ifdef IBMBIDI
buf[idx++] = HEBREW_THROSAND_SEP; // output thousand separator
#else
buf[--idx] = HEBREW_THROSAND_SEP; // output thousand separator
#endif // IBMBIDI
outputSep = ( n3 > 0); // request to output thousand separator next time.
PRInt32 d = 0; // we need to keep track of digit got output per 3 digits,
// so we can handle Gershayim and Gersh correctly
// Process digit for 100 - 900
for(PRInt32 n1 = 400; n1 > 0; )
{
if( n3 >= n1)
{
n3 -= n1;
digit = gHebrewDigit[(n1/100)-1+18];
if( n3 > 0)
{
#ifdef IBMBIDI
buf[idx++] = digit;
#else
buf[--idx] = digit;
#endif // IBMBIDI
++d;
} else {
// if this is the last digit
#ifdef IBMBIDI
buf[idx++] = digit;
#else
if (d > 0)
{
buf[--idx] = HEBREW_GERSHAYIM;
buf[--idx] = digit;
} else {
buf[--idx] = digit;
buf[--idx] = HEBREW_GERESH;
} // if
#endif // IBMBIDI
} // if
thousandsGroup.Append(gHebrewDigit[(n1/100)-1+18]);
} else {
n1 -= 100;
} // if
@ -940,63 +800,28 @@ static PRBool HebrewToText(PRInt32 ordinal, nsString& result)
// 15 is represented by 9 and 6, not 10 and 5
// 16 is represented by 9 and 7, not 10 and 6
n2 = 9;
digit = gHebrewDigit[ n2 - 1];
thousandsGroup.Append(gHebrewDigit[ n2 - 1]);
} else {
n2 = n3 - (n3 % 10);
digit = gHebrewDigit[(n2/10)-1+9];
thousandsGroup.Append(gHebrewDigit[(n2/10)-1+9]);
} // if
n3 -= n2;
if( n3 > 0) {
#ifdef IBMBIDI
buf[idx++] = digit;
#else
buf[--idx] = digit;
#endif // IBMBIDI
++d;
} else {
// if this is the last digit
#ifdef IBMBIDI
buf[idx++] = digit;
#else
if (d > 0)
{
buf[--idx] = HEBREW_GERSHAYIM;
buf[--idx] = digit;
} else {
buf[--idx] = digit;
buf[--idx] = HEBREW_GERESH;
} // if
#endif // IBMBIDI
} // if
} // if
// Process digit for 1 - 9
if ( n3 > 0)
{
digit = gHebrewDigit[n3-1];
// must be the last digit
#ifdef IBMBIDI
buf[idx++] = digit;
#else
if (d > 0)
{
buf[--idx] = HEBREW_GERSHAYIM;
buf[--idx] = digit;
} else {
buf[--idx] = digit;
buf[--idx] = HEBREW_GERESH;
} // if
#endif // IBMBIDI
} // if
thousandsGroup.Append(gHebrewDigit[n3-1]);
if (outputSep)
thousandsGroup.Append((PRUnichar)HEBREW_GERESH);
if (allText.IsEmpty())
allText = thousandsGroup;
else
allText = thousandsGroup + allText;
ordinal /= 1000;
outputSep = PR_TRUE;
} while (ordinal >= 1);
#ifdef IBMBIDI
result.Append(buf, idx);
#else
result.Append(buf+idx,NUM_BUF_SIZE-idx);
#endif // IBMBIDI
result.Append(allText);
return PR_TRUE;
}
@ -1384,16 +1209,8 @@ PRBool
nsBulletFrame::GetListItemText(const nsStyleList& aListStyle,
nsString& result)
{
#ifdef IBMBIDI
const nsStyleVisibility* vis = GetStyleVisibility();
// XXX For some of these systems, "." is wrong! This should really be
// pushed down into the individual cases!
if (NS_STYLE_DIRECTION_RTL == vis->mDirection) {
result.AppendLiteral(".");
}
#endif // IBMBIDI
NS_ASSERTION(aListStyle.mListStyleType != NS_STYLE_LIST_STYLE_NONE &&
aListStyle.mListStyleType != NS_STYLE_LIST_STYLE_DISC &&
aListStyle.mListStyleType != NS_STYLE_LIST_STYLE_CIRCLE &&
@ -1401,13 +1218,20 @@ nsBulletFrame::GetListItemText(const nsStyleList& aListStyle,
"we should be using specialized code for these types");
PRBool success =
AppendCounterText(aListStyle.mListStyleType, mOrdinal, result);
if (success && aListStyle.mListStyleType == NS_STYLE_LIST_STYLE_HEBREW)
mTextIsRTL = PR_TRUE;
// XXX For some of these systems, "." is wrong! This should really be
// pushed up into the cases...
#ifdef IBMBIDI
if (NS_STYLE_DIRECTION_RTL != vis->mDirection)
#endif // IBMBIDI
result.AppendLiteral(".");
// pushed down into the individual cases!
nsString suffix = NS_LITERAL_STRING(".");
// We're not going to do proper Bidi reordering on the list item marker, but
// just display the whole thing as RTL or LTR, so we fake reordering by
// appending the suffix to the end of the list item marker if the
// directionality of the characters is the same as the style direction or
// prepending it to the beginning if they are different.
result = (mTextIsRTL == (vis->mDirection == NS_STYLE_DIRECTION_RTL)) ?
result + suffix : suffix + result;
return success;
}

View File

@ -116,6 +116,7 @@ protected:
nsSize mIntrinsicSize;
nsSize mComputedSize;
PRBool mTextIsRTL;
};
#endif /* nsBulletFrame_h___ */

View File

@ -0,0 +1,58 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Bug 413928</title>
<style type="text/css">
.li {
line-height: 24px;
}
.list-number-he {
direction: rtl;
unicode-bidi: bidi-override;
}
</style>
</head>
<body>
<div class="li"><span class="list-number">-3.</span></div>
<div class="li"><span class="list-number">-2.</span></div>
<div class="li"><span class="list-number">-1.</span></div>
<div class="li"><span class="list-number">0.</span></div>
<div class="li"><span class="list-number-he"></span></div>
<div class="li"><span class="list-number-he"></span></div>
<div class="li"><span class="list-number-he"></span></div>
<div class="li"><span class="list-number-he"></span></div>
<div class="li"><span class="list-number-he"></span></div>
<div class="li"><span class="list-number-he">.יד</span></div>
<div class="li"><span class="list-number-he">.טו</span></div>
<div class="li"><span class="list-number-he">.טז</span></div>
<div class="li"><span class="list-number-he">.יז</span></div>
<div class="li"><span class="list-number-he">.צז</span></div>
<div class="li"><span class="list-number-he">.צח</span></div>
<div class="li"><span class="list-number-he">.צט</span></div>
<div class="li"><span class="list-number-he"></span></div>
<div class="li"><span class="list-number-he">.קא</span></div>
<div class="li"><span class="list-number-he">.תתקמד</span></div>
<div class="li"><span class="list-number-he">.תתקמה</span></div>
<div class="li"><span class="list-number-he">.תתקמו</span></div>
<div class="li"><span class="list-number-he">.תתקצט</span></div>
<div class="li"><span class="list-number-he">.א׳</span></div>
<div class="li"><span class="list-number-he">.א׳א</span></div>
<div class="li"><span class="list-number-he">.א׳תתקצח</span></div>
<div class="li"><span class="list-number-he">.א׳תתקצט</span></div>
<div class="li"><span class="list-number-he">.ב׳</span></div>
<div class="li"><span class="list-number-he">.ב׳א</span></div>
<div class="li"><span class="list-number-he">.ב׳ג</span></div>
<div class="li"><span class="list-number-he">.ב׳תשמח</span></div>
<div class="li"><span class="list-number-he">.ב׳תשנ</span></div>
<div class="li"><span class="list-number">1000000.</span></div>
<div class="li"><span class="list-number">1500000.</span></div>
<div class="li"><span class="list-number">2000000.</span></div>
<div class="li"><span class="list-number">9999999.</span></div>
<div class="li"><span class="list-number">10000212.</span></div>
<div class="li"><span class="list-number">10000425.</span></div>
<div class="li"><span class="list-number">10000851.</span></div>
<div class="li"><span class="list-number">10001064.</span></div>
<div class="li"><span class="list-number">10001277.</span></div>
</body>
</html>

View File

@ -0,0 +1,63 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Bug 413928</title>
<style type="text/css">
ol {
list-style-type: hebrew;
list-style-position: inside;
padding: 0;
margin: 0;
}
li {
line-height: 24px;
}
</style>
</head>
<body>
<ol start="-3">
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li value="14"></li>
<li></li>
<li></li>
<li></li>
<li value="97"></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li value="944"></li>
<li></li>
<li></li>
<li value="999"></li>
<li></li>
<li></li>
<li value="1998"></li>
<li></li>
<li></li>
<li></li>
<li value="2003"></li>
<li value="2748"></li>
<li value="2750"></li>
<li value="1000000"></li>
<li value="1500000"></li>
<li value="2000000"></li>
<li value="9999999"></li>
<li value="10000212"></li>
<li value="10000425"></li>
<li value="10000851"></li>
<li value="10001064"></li>
<li value="10001277"></li>
</ol>
</body>
</html>

View File

@ -0,0 +1,58 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Bug 413928</title>
<style type="text/css">
.li {
line-height: 24px;
}
.list-number-he {
direction: rtl;
unicode-bidi: bidi-override;
}
</style>
</head>
<body dir="rtl">
<div class="li"><span class="list-number">&lrm;-3.</span></div>
<div class="li"><span class="list-number">&lrm;-2.</span></div>
<div class="li"><span class="list-number">&lrm;-1.</span></div>
<div class="li"><span class="list-number">0.</span></div>
<div class="li"><span class="list-number-he">א.</span></div>
<div class="li"><span class="list-number-he">ב.</span></div>
<div class="li"><span class="list-number-he">ג.</span></div>
<div class="li"><span class="list-number-he">ד.</span></div>
<div class="li"><span class="list-number-he">ה.</span></div>
<div class="li"><span class="list-number-he">יד.</span></div>
<div class="li"><span class="list-number-he">טו.</span></div>
<div class="li"><span class="list-number-he">טז.</span></div>
<div class="li"><span class="list-number-he">יז.</span></div>
<div class="li"><span class="list-number-he">צז.</span></div>
<div class="li"><span class="list-number-he">צח.</span></div>
<div class="li"><span class="list-number-he">צט.</span></div>
<div class="li"><span class="list-number-he">ק.</span></div>
<div class="li"><span class="list-number-he">קא.</span></div>
<div class="li"><span class="list-number-he">תתקמד.</span></div>
<div class="li"><span class="list-number-he">תתקמה.</span></div>
<div class="li"><span class="list-number-he">תתקמו.</span></div>
<div class="li"><span class="list-number-he">תתקצט.</span></div>
<div class="li"><span class="list-number-he">א׳.</span></div>
<div class="li"><span class="list-number-he">א׳א.</span></div>
<div class="li"><span class="list-number-he">א׳תתקצח.</span></div>
<div class="li"><span class="list-number-he">א׳תתקצט.</span></div>
<div class="li"><span class="list-number-he">ב׳.</span></div>
<div class="li"><span class="list-number-he">ב׳א.</span></div>
<div class="li"><span class="list-number-he">ב׳ג.</span></div>
<div class="li"><span class="list-number-he">ב׳תשמח.</span></div>
<div class="li"><span class="list-number-he">ב׳תשנ.</span></div>
<div class="li"><span class="list-number">1000000.</span></div>
<div class="li"><span class="list-number">1500000.</span></div>
<div class="li"><span class="list-number">2000000.</span></div>
<div class="li"><span class="list-number">9999999.</span></div>
<div class="li"><span class="list-number">10000212.</span></div>
<div class="li"><span class="list-number">10000425.</span></div>
<div class="li"><span class="list-number">10000851.</span></div>
<div class="li"><span class="list-number">10001064.</span></div>
<div class="li"><span class="list-number">10001277.</span></div>
</body>
</html>

View File

@ -0,0 +1,63 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Bug 413928</title>
<style type="text/css">
ol {
list-style-type: hebrew;
list-style-position: inside;
padding: 0;
margin: 0;
}
li {
line-height: 24px;
}
</style>
</head>
<body dir="rtl">
<ol start="-3">
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li value="14"></li>
<li></li>
<li></li>
<li></li>
<li value="97"></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li value="944"></li>
<li></li>
<li></li>
<li value="999"></li>
<li></li>
<li></li>
<li value="1998"></li>
<li></li>
<li></li>
<li></li>
<li value="2003"></li>
<li value="2748"></li>
<li value="2750"></li>
<li value="1000000"></li>
<li value="1500000"></li>
<li value="2000000"></li>
<li value="9999999"></li>
<li value="10000212"></li>
<li value="10000425"></li>
<li value="10000851"></li>
<li value="10001064"></li>
<li value="10001277"></li>
</ol>
</body>
</html>

View File

@ -21,3 +21,5 @@ random-if(MOZ_WIDGET_TOOLKIT=="gtk2") == mixedChartype-03-j.html mixedChartype-0
== 409375.html 409375-ref.html
== 413542-1.html 413542-1-ref.html
== 413542-2.html 413542-2-ref.html
== 413928-1.html 413928-1-ref.html
== 413928-2.html 413928-2-ref.html

View File

@ -0,0 +1,62 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS 2.1 Test Suite: content: counter() error cases</title>
<link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
<link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
<link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
</head>
<body>
<div>
<span>&#x5d0;</span>
<span>&#x5d1;</span>
<span>&#x5d2;</span>
<span>&#x5d3;</span>
<span>&#x5d4;</span>
<span>&#x5d5;</span>
<span>&#x5d6;</span>
<span>&#x5d7;</span>
<span>&#x5d8;</span>
<span>&#x5d9;</span>
<span>&#x5d9;&#x5d0;</span>
<span>&#x5d9;&#x5d1;</span>
<span>&#x5d9;&#x5d2;</span>
<span>&#x5d9;&#x5d3;</span>
<span>&#x5d8;&#x5d5;</span>
<span>&#x5d8;&#x5d6;</span>
<span>&#x5d9;&#x5d6;</span>
<span>&#x5db;</span>
<span>&#x5dc;</span>
<span>&#x5de;</span>
<span>&#x5e0;</span>
<span>&#x5e1;</span>
<span>&#x5e2;</span>
<span>&#x5e4;</span>
<span>&#x5e6;</span>
<span>&#x5e7;</span>
<span>&#x5e8;</span>
<span>&#x5e9;</span>
<span>&#x5ea;</span>
<span>&#x5ea;&#x5e7;</span>
<span>&#x5ea;&#x5e8;</span>
<span>&#x5ea;&#x5e9;</span>
<span>&#x5ea;&#x5ea;</span>
<span>&#x5ea;&#x5ea;&#x5e7;</span>
<span>&#x5d0;&#x05f3;</span>
<span>&#x5d1;&#x05f3;</span>
<span>&#x5d2;&#x05f3;</span>
<span>&#x5d3;&#x05f3;</span>
<span>&#x5d4;&#x05f3;</span>
<span>&#x5d5;&#x05f3;</span>
<span>&#x5d6;&#x05f3;</span>
<span>&#x5d7;&#x05f3;</span>
<span>&#x5d8;&#x05f3;</span>
<span>&#x5d8;&#x05f3;&#x5ea;&#x5ea;&#x5e7;&#x5e6;&#x5d8;</span>
<span>&#x5ea;&#x5ea;&#x5e7;&#x5e6;&#x5d8;&#x05f3;&#x5ea;&#x5ea;&#x5e7;&#x5e6;&#x5d8;</span>
<span>1000000</span>
</div>
</body>
</html>

View File

@ -0,0 +1,68 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS 2.1 Test Suite: content: counter() error cases</title>
<link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
<link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
<link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
<style type="text/css">
#test { counter-reset: c; }
#test span { counter-increment: c; }
#test span:before { content: counter(c, hebrew); }
</style>
</head>
<body>
<div id="test">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span style="counter-reset: c 19"></span>
<span style="counter-reset: c 29"></span>
<span style="counter-reset: c 39"></span>
<span style="counter-reset: c 49"></span>
<span style="counter-reset: c 59"></span>
<span style="counter-reset: c 69"></span>
<span style="counter-reset: c 79"></span>
<span style="counter-reset: c 89"></span>
<span style="counter-reset: c 99"></span>
<span style="counter-reset: c 199"></span>
<span style="counter-reset: c 299"></span>
<span style="counter-reset: c 399"></span>
<span style="counter-reset: c 499"></span>
<span style="counter-reset: c 599"></span>
<span style="counter-reset: c 699"></span>
<span style="counter-reset: c 799"></span>
<span style="counter-reset: c 899"></span>
<span style="counter-reset: c 999"></span>
<span style="counter-reset: c 1999"></span>
<span style="counter-reset: c 2999"></span>
<span style="counter-reset: c 3999"></span>
<span style="counter-reset: c 4999"></span>
<span style="counter-reset: c 5999"></span>
<span style="counter-reset: c 6999"></span>
<span style="counter-reset: c 7999"></span>
<span style="counter-reset: c 8999"></span>
<span style="counter-reset: c 9998"></span>
<span style="counter-reset: c 999998"></span>
<span></span>
</div>
</body>
</html>

View File

@ -0,0 +1,63 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS 2.1 Test Suite: content: counters(c, ".", hebrew)</title>
<link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
<link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
<link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
</head>
<body>
<p></p>
<div>
<span>&#x5d0;.&#x5d0;</span>
<span>&#x5d0;.&#x5d1;</span>
<span>&#x5d0;.&#x5d2;</span>
<span>&#x5d0;.&#x5d3;</span>
<span>&#x5d0;.&#x5d4;</span>
<span>&#x5d0;.&#x5d5;</span>
<span>&#x5d0;.&#x5d6;</span>
<span>&#x5d0;.&#x5d7;</span>
<span>&#x5d0;.&#x5d8;</span>
<span>&#x5d0;.&#x5d9;</span>
<span>&#x5d0;.&#x5d9;&#x5d0;</span>
<span>&#x5d0;.&#x5d9;&#x5d1;</span>
<span>&#x5d0;.&#x5d9;&#x5d2;</span>
<span>&#x5d0;.&#x5d9;&#x5d3;</span>
<span>&#x5d0;.&#x5d8;&#x5d5;</span>
<span>&#x5d0;.&#x5d8;&#x5d6;</span>
<span>&#x5d0;.&#x5d9;&#x5d6;</span>
<span>&#x5d0;.&#x5db;</span>
<span>&#x5d0;.&#x5dc;</span>
<span>&#x5d0;.&#x5de;</span>
<span>&#x5d0;.&#x5e0;</span>
<span>&#x5d0;.&#x5e1;</span>
<span>&#x5d0;.&#x5e2;</span>
<span>&#x5d0;.&#x5e4;</span>
<span>&#x5d0;.&#x5e6;</span>
<span>&#x5d0;.&#x5e7;</span>
<span>&#x5d0;.&#x5e8;</span>
<span>&#x5d0;.&#x5e9;</span>
<span>&#x5d0;.&#x5ea;</span>
<span>&#x5d0;.&#x5ea;&#x5e7;</span>
<span>&#x5d0;.&#x5ea;&#x5e8;</span>
<span>&#x5d0;.&#x5ea;&#x5e9;</span>
<span>&#x5d0;.&#x5ea;&#x5ea;</span>
<span>&#x5d0;.&#x5ea;&#x5ea;&#x5e7;</span>
<span>&#x5d0;.&#x5d0;&#x05f3;</span>
<span>&#x5d0;.&#x5d1;&#x05f3;</span>
<span>&#x5d0;.&#x5d2;&#x05f3;</span>
<span>&#x5d0;.&#x5d3;&#x05f3;</span>
<span>&#x5d0;.&#x5d4;&#x05f3;</span>
<span>&#x5d0;.&#x5d5;&#x05f3;</span>
<span>&#x5d0;.&#x5d6;&#x05f3;</span>
<span>&#x5d0;.&#x5d7;&#x05f3;</span>
<span>&#x5d0;.&#x5d8;&#x05f3;</span>
<span>&#x5d0;.&#x5d8;&#x05f3;&#x5ea;&#x5ea;&#x5e7;&#x5e6;&#x5d8;</span>
<span>&#x5d0;.&#x5ea;&#x5ea;&#x5e7;&#x5e6;&#x5d8;&#x05f3;&#x5ea;&#x5ea;&#x5e7;&#x5e6;&#x5d8;</span>
<span>&#x5d0;.1000000</span>
</div>
</body>
</html>

View File

@ -0,0 +1,72 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS 2.1 Test Suite: content: counters(c, ".", hebrew)</title>
<link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
<link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
<link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
<meta http-equiv="Content-Style-Type" content="text/css"/>
<style type="text/css">
body, #test span:first-child { counter-reset: c; }
p, #test span { counter-increment: c; }
#test span:before { content: counters(c, ".", hebrew); }
#test span { direction: rtl; }
</style>
</head>
<body>
<p></p>
<div id="test">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span style="counter-reset: c 19"></span>
<span style="counter-reset: c 29"></span>
<span style="counter-reset: c 39"></span>
<span style="counter-reset: c 49"></span>
<span style="counter-reset: c 59"></span>
<span style="counter-reset: c 69"></span>
<span style="counter-reset: c 79"></span>
<span style="counter-reset: c 89"></span>
<span style="counter-reset: c 99"></span>
<span style="counter-reset: c 199"></span>
<span style="counter-reset: c 299"></span>
<span style="counter-reset: c 399"></span>
<span style="counter-reset: c 499"></span>
<span style="counter-reset: c 599"></span>
<span style="counter-reset: c 699"></span>
<span style="counter-reset: c 799"></span>
<span style="counter-reset: c 899"></span>
<span style="counter-reset: c 999"></span>
<span style="counter-reset: c 1999"></span>
<span style="counter-reset: c 2999"></span>
<span style="counter-reset: c 3999"></span>
<span style="counter-reset: c 4999"></span>
<span style="counter-reset: c 5999"></span>
<span style="counter-reset: c 6999"></span>
<span style="counter-reset: c 7999"></span>
<span style="counter-reset: c 8999"></span>
<span style="counter-reset: c 9998"></span>
<span style="counter-reset: c 999998"></span>
<span></span>
</div>
</body>
</html>

View File

@ -58,3 +58,5 @@ fails == t1202-counters-10-b-test.html t1202-counters-10-b-reference.html # need
== t120403-display-none-00-c-test.html t120403-display-none-00-c-reference.html
== t120403-visibility-00-c-test.html t120403-visibility-00-c-reference.html
== text-boundaries-subpixel.html text-boundaries-subpixel-ref.html
== counter-hebrew-test.html counter-hebrew-reference.html
== counters-hebrew-test.html counters-hebrew-reference.html