Use compatability table for div align mappings

This commit is contained in:
kipp%netscape.com 1999-03-25 03:48:06 +00:00
Родитель fd4f6cc27c
Коммит 2e33bbba23
2 изменённых файлов: 34 добавлений и 0 удалений

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

@ -1475,6 +1475,15 @@ static nsGenericHTMLElement::EnumTable kAlignTable[] = {
{ 0 }
};
static nsGenericHTMLElement::EnumTable kCompatDivAlignTable[] = {
{ "left", NS_STYLE_TEXT_ALIGN_LEFT },
{ "right", NS_STYLE_TEXT_ALIGN_MOZ_RIGHT },
{ "center", NS_STYLE_TEXT_ALIGN_MOZ_CENTER },
{ "middle", NS_STYLE_TEXT_ALIGN_MOZ_CENTER },
{ "justify", NS_STYLE_TEXT_ALIGN_JUSTIFY },
{ 0 }
};
static nsGenericHTMLElement::EnumTable kDivAlignTable[] = {
{ "left", NS_STYLE_TEXT_ALIGN_LEFT },
{ "right", NS_STYLE_TEXT_ALIGN_RIGHT },
@ -1584,14 +1593,22 @@ PRBool
nsGenericHTMLElement::ParseDivAlignValue(const nsString& aString,
nsHTMLValue& aResult)
{
#if XXX_no_nav_compat
return ParseEnumValue(aString, kDivAlignTable, aResult);
#else
return ParseEnumValue(aString, kCompatDivAlignTable, aResult);
#endif
}
PRBool
nsGenericHTMLElement::DivAlignValueToString(const nsHTMLValue& aValue,
nsString& aResult)
{
#if XXX_no_nav_compat
return EnumValueToString(aValue, kDivAlignTable, aResult);
#else
return EnumValueToString(aValue, kCompatDivAlignTable, aResult);
#endif
}
PRBool

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

@ -1475,6 +1475,15 @@ static nsGenericHTMLElement::EnumTable kAlignTable[] = {
{ 0 }
};
static nsGenericHTMLElement::EnumTable kCompatDivAlignTable[] = {
{ "left", NS_STYLE_TEXT_ALIGN_LEFT },
{ "right", NS_STYLE_TEXT_ALIGN_MOZ_RIGHT },
{ "center", NS_STYLE_TEXT_ALIGN_MOZ_CENTER },
{ "middle", NS_STYLE_TEXT_ALIGN_MOZ_CENTER },
{ "justify", NS_STYLE_TEXT_ALIGN_JUSTIFY },
{ 0 }
};
static nsGenericHTMLElement::EnumTable kDivAlignTable[] = {
{ "left", NS_STYLE_TEXT_ALIGN_LEFT },
{ "right", NS_STYLE_TEXT_ALIGN_RIGHT },
@ -1584,14 +1593,22 @@ PRBool
nsGenericHTMLElement::ParseDivAlignValue(const nsString& aString,
nsHTMLValue& aResult)
{
#if XXX_no_nav_compat
return ParseEnumValue(aString, kDivAlignTable, aResult);
#else
return ParseEnumValue(aString, kCompatDivAlignTable, aResult);
#endif
}
PRBool
nsGenericHTMLElement::DivAlignValueToString(const nsHTMLValue& aValue,
nsString& aResult)
{
#if XXX_no_nav_compat
return EnumValueToString(aValue, kDivAlignTable, aResult);
#else
return EnumValueToString(aValue, kCompatDivAlignTable, aResult);
#endif
}
PRBool