Fix for bug 13948. We now correctly store and retrieve an OL element with type=1. R=pollmann.

This commit is contained in:
vidur%netscape.com 1999-11-12 02:06:09 +00:00
Родитель 96661a5c57
Коммит d563684b31
6 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

@ -151,6 +151,7 @@ nsGenericHTMLElement::EnumTable kListTypeTable[] = {
};
nsGenericHTMLElement::EnumTable kOldListTypeTable[] = {
{ "1", NS_STYLE_LIST_STYLE_OLD_DECIMAL },
{ "A", NS_STYLE_LIST_STYLE_OLD_UPPER_ALPHA },
{ "a", NS_STYLE_LIST_STYLE_OLD_LOWER_ALPHA },
{ "I", NS_STYLE_LIST_STYLE_OLD_UPPER_ROMAN },
@ -189,6 +190,7 @@ nsHTMLOListElement::AttributeToString(nsIAtom* aAttribute,
if (aAttribute == nsHTMLAtoms::type) {
PRInt32 v = aValue.GetIntValue();
switch (v) {
case NS_STYLE_LIST_STYLE_OLD_DECIMAL:
case NS_STYLE_LIST_STYLE_OLD_LOWER_ROMAN:
case NS_STYLE_LIST_STYLE_OLD_UPPER_ROMAN:
case NS_STYLE_LIST_STYLE_OLD_LOWER_ALPHA:

Просмотреть файл

@ -392,6 +392,7 @@
#define NS_STYLE_LIST_STYLE_OLD_UPPER_ROMAN 20
#define NS_STYLE_LIST_STYLE_OLD_LOWER_ALPHA 21
#define NS_STYLE_LIST_STYLE_OLD_UPPER_ALPHA 22
#define NS_STYLE_LIST_STYLE_OLD_DECIMAL 23
#define NS_STYLE_LIST_STYLE_BASIC 100 // not in css
// See nsStyleList

Просмотреть файл

@ -392,6 +392,7 @@
#define NS_STYLE_LIST_STYLE_OLD_UPPER_ROMAN 20
#define NS_STYLE_LIST_STYLE_OLD_LOWER_ALPHA 21
#define NS_STYLE_LIST_STYLE_OLD_UPPER_ALPHA 22
#define NS_STYLE_LIST_STYLE_OLD_DECIMAL 23
#define NS_STYLE_LIST_STYLE_BASIC 100 // not in css
// See nsStyleList

Просмотреть файл

@ -171,6 +171,7 @@ nsBulletFrame::Paint(nsIPresContext& aCX,
break;
case NS_STYLE_LIST_STYLE_DECIMAL:
case NS_STYLE_LIST_STYLE_OLD_DECIMAL:
case NS_STYLE_LIST_STYLE_DECIMAL_LEADING_ZERO:
case NS_STYLE_LIST_STYLE_LOWER_ROMAN:
case NS_STYLE_LIST_STYLE_UPPER_ROMAN:
@ -673,6 +674,7 @@ nsBulletFrame::GetListItemText(nsIPresContext& aCX,
{
switch (aListStyle.mListStyleType) {
case NS_STYLE_LIST_STYLE_DECIMAL:
case NS_STYLE_LIST_STYLE_OLD_DECIMAL:
default: // CSS2 say "A users agent that does not recognize a numbering system
// should use 'decimal'
DecimalToText(mOrdinal, result);
@ -834,6 +836,7 @@ nsBulletFrame::GetDesiredSize(nsIPresContext* aCX,
default:
case NS_STYLE_LIST_STYLE_DECIMAL_LEADING_ZERO:
case NS_STYLE_LIST_STYLE_DECIMAL:
case NS_STYLE_LIST_STYLE_OLD_DECIMAL:
case NS_STYLE_LIST_STYLE_LOWER_ROMAN:
case NS_STYLE_LIST_STYLE_UPPER_ROMAN:
case NS_STYLE_LIST_STYLE_LOWER_ALPHA:

Просмотреть файл

@ -171,6 +171,7 @@ nsBulletFrame::Paint(nsIPresContext& aCX,
break;
case NS_STYLE_LIST_STYLE_DECIMAL:
case NS_STYLE_LIST_STYLE_OLD_DECIMAL:
case NS_STYLE_LIST_STYLE_DECIMAL_LEADING_ZERO:
case NS_STYLE_LIST_STYLE_LOWER_ROMAN:
case NS_STYLE_LIST_STYLE_UPPER_ROMAN:
@ -673,6 +674,7 @@ nsBulletFrame::GetListItemText(nsIPresContext& aCX,
{
switch (aListStyle.mListStyleType) {
case NS_STYLE_LIST_STYLE_DECIMAL:
case NS_STYLE_LIST_STYLE_OLD_DECIMAL:
default: // CSS2 say "A users agent that does not recognize a numbering system
// should use 'decimal'
DecimalToText(mOrdinal, result);
@ -834,6 +836,7 @@ nsBulletFrame::GetDesiredSize(nsIPresContext* aCX,
default:
case NS_STYLE_LIST_STYLE_DECIMAL_LEADING_ZERO:
case NS_STYLE_LIST_STYLE_DECIMAL:
case NS_STYLE_LIST_STYLE_OLD_DECIMAL:
case NS_STYLE_LIST_STYLE_LOWER_ROMAN:
case NS_STYLE_LIST_STYLE_UPPER_ROMAN:
case NS_STYLE_LIST_STYLE_LOWER_ALPHA:

Просмотреть файл

@ -151,6 +151,7 @@ nsGenericHTMLElement::EnumTable kListTypeTable[] = {
};
nsGenericHTMLElement::EnumTable kOldListTypeTable[] = {
{ "1", NS_STYLE_LIST_STYLE_OLD_DECIMAL },
{ "A", NS_STYLE_LIST_STYLE_OLD_UPPER_ALPHA },
{ "a", NS_STYLE_LIST_STYLE_OLD_LOWER_ALPHA },
{ "I", NS_STYLE_LIST_STYLE_OLD_UPPER_ROMAN },
@ -189,6 +190,7 @@ nsHTMLOListElement::AttributeToString(nsIAtom* aAttribute,
if (aAttribute == nsHTMLAtoms::type) {
PRInt32 v = aValue.GetIntValue();
switch (v) {
case NS_STYLE_LIST_STYLE_OLD_DECIMAL:
case NS_STYLE_LIST_STYLE_OLD_LOWER_ROMAN:
case NS_STYLE_LIST_STYLE_OLD_UPPER_ROMAN:
case NS_STYLE_LIST_STYLE_OLD_LOWER_ALPHA: