From 91e11b4fc1f751844a555d8ed5a6e0dd870380e8 Mon Sep 17 00:00:00 2001 From: "Ms2ger@gmail.com" Date: Fri, 11 Jun 2010 20:47:56 +0200 Subject: [PATCH] Bug 559834 - Remove support for table@align=abscenter/absmiddle/middle. r=jst --- .../html/content/src/nsGenericHTMLElement.cpp | 19 +------------------ .../html/content/src/nsGenericHTMLElement.h | 4 ++-- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/content/html/content/src/nsGenericHTMLElement.cpp b/content/html/content/src/nsGenericHTMLElement.cpp index 6facd8863bc7..4edd6bdcb4e7 100644 --- a/content/html/content/src/nsGenericHTMLElement.cpp +++ b/content/html/content/src/nsGenericHTMLElement.cpp @@ -1516,7 +1516,6 @@ nsGenericHTMLElement::ParseAlignValue(const nsAString& aString, //---------------------------------------- -// Vanilla table as defined by the html4 spec... static const nsAttrValue::EnumTable kTableHAlignTable[] = { { "left", NS_STYLE_TEXT_ALIGN_LEFT }, { "right", NS_STYLE_TEXT_ALIGN_RIGHT }, @@ -1526,26 +1525,10 @@ static const nsAttrValue::EnumTable kTableHAlignTable[] = { { 0 } }; -// This table is used for TABLE when in compatability mode -static const nsAttrValue::EnumTable kCompatTableHAlignTable[] = { - { "left", NS_STYLE_TEXT_ALIGN_LEFT }, - { "right", NS_STYLE_TEXT_ALIGN_RIGHT }, - { "center", NS_STYLE_TEXT_ALIGN_CENTER }, - { "char", NS_STYLE_TEXT_ALIGN_CHAR }, - { "justify",NS_STYLE_TEXT_ALIGN_JUSTIFY }, - { "abscenter", NS_STYLE_TEXT_ALIGN_CENTER }, - { "absmiddle", NS_STYLE_TEXT_ALIGN_CENTER }, - { "middle", NS_STYLE_TEXT_ALIGN_CENTER }, - { 0 } -}; - PRBool nsGenericHTMLElement::ParseTableHAlignValue(const nsAString& aString, - nsAttrValue& aResult) const + nsAttrValue& aResult) { - if (InNavQuirksMode(GetOwnerDoc())) { - return aResult.ParseEnumValue(aString, kCompatTableHAlignTable, PR_FALSE); - } return aResult.ParseEnumValue(aString, kTableHAlignTable, PR_FALSE); } diff --git a/content/html/content/src/nsGenericHTMLElement.h b/content/html/content/src/nsGenericHTMLElement.h index 1294a6a2b1cf..e71919974633 100644 --- a/content/html/content/src/nsGenericHTMLElement.h +++ b/content/html/content/src/nsGenericHTMLElement.h @@ -264,8 +264,8 @@ public: * @param aResult the resulting HTMLValue * @return whether the value was parsed */ - PRBool ParseTableHAlignValue(const nsAString& aString, - nsAttrValue& aResult) const; + static PRBool ParseTableHAlignValue(const nsAString& aString, + nsAttrValue& aResult); /** * Convert a table cell halign string to value