From 19c16e67fa428ff86f696f2d22929908427bf91d Mon Sep 17 00:00:00 2001 From: "vidur%netscape.com" Date: Fri, 12 Nov 1999 02:06:09 +0000 Subject: [PATCH] Fix for bug 13948. We now correctly store and retrieve an OL element with type=1. R=pollmann. git-svn-id: svn://10.0.0.236/trunk@53296 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/html/content/src/nsHTMLOListElement.cpp | 2 ++ mozilla/layout/base/nsStyleConsts.h | 1 + mozilla/layout/base/public/nsStyleConsts.h | 1 + mozilla/layout/generic/nsBulletFrame.cpp | 3 +++ mozilla/layout/html/base/src/nsBulletFrame.cpp | 3 +++ mozilla/layout/html/content/src/nsHTMLOListElement.cpp | 2 ++ 6 files changed, 12 insertions(+) diff --git a/mozilla/content/html/content/src/nsHTMLOListElement.cpp b/mozilla/content/html/content/src/nsHTMLOListElement.cpp index b145b8c8122..7504f3a7099 100644 --- a/mozilla/content/html/content/src/nsHTMLOListElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLOListElement.cpp @@ -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: diff --git a/mozilla/layout/base/nsStyleConsts.h b/mozilla/layout/base/nsStyleConsts.h index b04de9cea09..5e5161ddd30 100644 --- a/mozilla/layout/base/nsStyleConsts.h +++ b/mozilla/layout/base/nsStyleConsts.h @@ -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 diff --git a/mozilla/layout/base/public/nsStyleConsts.h b/mozilla/layout/base/public/nsStyleConsts.h index b04de9cea09..5e5161ddd30 100644 --- a/mozilla/layout/base/public/nsStyleConsts.h +++ b/mozilla/layout/base/public/nsStyleConsts.h @@ -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 diff --git a/mozilla/layout/generic/nsBulletFrame.cpp b/mozilla/layout/generic/nsBulletFrame.cpp index 4aa1da05052..81c10f5273e 100644 --- a/mozilla/layout/generic/nsBulletFrame.cpp +++ b/mozilla/layout/generic/nsBulletFrame.cpp @@ -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: diff --git a/mozilla/layout/html/base/src/nsBulletFrame.cpp b/mozilla/layout/html/base/src/nsBulletFrame.cpp index 4aa1da05052..81c10f5273e 100644 --- a/mozilla/layout/html/base/src/nsBulletFrame.cpp +++ b/mozilla/layout/html/base/src/nsBulletFrame.cpp @@ -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: diff --git a/mozilla/layout/html/content/src/nsHTMLOListElement.cpp b/mozilla/layout/html/content/src/nsHTMLOListElement.cpp index b145b8c8122..7504f3a7099 100644 --- a/mozilla/layout/html/content/src/nsHTMLOListElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLOListElement.cpp @@ -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: