Bug 835439 - Remove support for the table[layout] attribute; r=dbaron
authorMs2ger <ms2ger@gmail.com>
Thu, 07 Feb 2013 09:08:57 +0100
changeset 130948 83ffdc5f972ded18a375037d5f448a22e0247e66
parent 130947 6e70ec079074eee12079a45debb5a486b03c12ff
child 130949 df5858bb2c0137ba718e374ca4691c156abd5f34
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs835439
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 835439 - Remove support for the table[layout] attribute; r=dbaron
content/html/content/src/HTMLTableElement.cpp
--- a/content/html/content/src/HTMLTableElement.cpp
+++ b/content/html/content/src/HTMLTableElement.cpp
@@ -896,22 +896,16 @@ static const nsAttrValue::EnumTable kRul
   { "none",   NS_STYLE_TABLE_RULES_NONE },
   { "groups", NS_STYLE_TABLE_RULES_GROUPS },
   { "rows",   NS_STYLE_TABLE_RULES_ROWS },
   { "cols",   NS_STYLE_TABLE_RULES_COLS },
   { "all",    NS_STYLE_TABLE_RULES_ALL },
   { 0 }
 };
 
-static const nsAttrValue::EnumTable kLayoutTable[] = {
-  { "auto",   NS_STYLE_TABLE_LAYOUT_AUTO },
-  { "fixed",  NS_STYLE_TABLE_LAYOUT_FIXED },
-  { 0 }
-};
-
 
 bool
 HTMLTableElement::ParseAttribute(int32_t aNamespaceID,
                                  nsIAtom* aAttribute,
                                  const nsAString& aValue,
                                  nsAttrValue& aResult)
 {
   /* ignore summary, just a string */
@@ -941,19 +935,16 @@ HTMLTableElement::ParseAttribute(int32_t
     }
     if (aAttribute == nsGkAtoms::bgcolor ||
         aAttribute == nsGkAtoms::bordercolor) {
       return aResult.ParseColor(aValue);
     }
     if (aAttribute == nsGkAtoms::frame) {
       return aResult.ParseEnumValue(aValue, kFrameTable, false);
     }
-    if (aAttribute == nsGkAtoms::layout) {
-      return aResult.ParseEnumValue(aValue, kLayoutTable, false);
-    }
     if (aAttribute == nsGkAtoms::rules) {
       return aResult.ParseEnumValue(aValue, kRulesTable, false);
     }
     if (aAttribute == nsGkAtoms::hspace ||
         aAttribute == nsGkAtoms::vspace) {
       return aResult.ParseIntWithBounds(aValue, 0);
     }
   }
@@ -989,26 +980,16 @@ MapAttributesIntoRule(const nsMappedAttr
     const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::cellspacing);
     nsCSSValue* borderSpacing = aData->ValueForBorderSpacing();
     if (value && value->Type() == nsAttrValue::eInteger &&
         borderSpacing->GetUnit() == eCSSUnit_Null) {
       borderSpacing->
         SetFloatValue(float(value->GetIntegerValue()), eCSSUnit_Pixel);
     }
   }
-  if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Table)) {
-    const nsAttrValue* value;
-    // layout
-    nsCSSValue* tableLayout = aData->ValueForTableLayout();
-    if (tableLayout->GetUnit() == eCSSUnit_Null) {
-      value = aAttributes->GetAttr(nsGkAtoms::layout);
-      if (value && value->Type() == nsAttrValue::eEnum)
-        tableLayout->SetIntValue(value->GetEnumValue(), eCSSUnit_Enumerated);
-    }
-  }
   if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Margin)) {
     // align; Check for enumerated type (it may be another type if
     // illegal)
     const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::align);
 
     if (value && value->Type() == nsAttrValue::eEnum) {
       if (value->GetEnumValue() == NS_STYLE_TEXT_ALIGN_CENTER ||
           value->GetEnumValue() == NS_STYLE_TEXT_ALIGN_MOZ_CENTER) {
@@ -1116,17 +1097,16 @@ MapAttributesIntoRule(const nsMappedAttr
   nsGenericHTMLElement::MapBackgroundAttributesInto(aAttributes, aData);
   nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
 }
 
 NS_IMETHODIMP_(bool)
 HTMLTableElement::IsAttributeMapped(const nsIAtom* aAttribute) const
 {
   static const MappedAttributeEntry attributes[] = {
-    { &nsGkAtoms::layout },
     { &nsGkAtoms::cellpadding },
     { &nsGkAtoms::cellspacing },
     { &nsGkAtoms::border },
     { &nsGkAtoms::width },
     { &nsGkAtoms::height },
     { &nsGkAtoms::hspace },
     { &nsGkAtoms::vspace },