Use compatability table for div align mappings
git-svn-id: svn://10.0.0.236/trunk@25048 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user