diff --git a/mozilla/content/html/content/src/nsHTMLTableCellElement.cpp b/mozilla/content/html/content/src/nsHTMLTableCellElement.cpp
index 944c654ced8..c7864d1bd25 100644
--- a/mozilla/content/html/content/src/nsHTMLTableCellElement.cpp
+++ b/mozilla/content/html/content/src/nsHTMLTableCellElement.cpp
@@ -280,7 +280,6 @@ nsHTMLTableCellElement::WalkContentStyleRules(nsRuleWalker* aRuleWalker)
NS_IMPL_STRING_ATTR(nsHTMLTableCellElement, Abbr, abbr)
-NS_IMPL_STRING_ATTR_DEFAULT_VALUE(nsHTMLTableCellElement, Align, align, "left")
NS_IMPL_STRING_ATTR(nsHTMLTableCellElement, Axis, axis)
NS_IMPL_STRING_ATTR(nsHTMLTableCellElement, BgColor, bgcolor)
NS_IMPL_STRING_ATTR_DEFAULT_VALUE(nsHTMLTableCellElement, Ch, _char, ".")
@@ -295,6 +294,32 @@ NS_IMPL_STRING_ATTR_DEFAULT_VALUE(nsHTMLTableCellElement, VAlign, valign, "middl
NS_IMPL_STRING_ATTR(nsHTMLTableCellElement, Width, width)
+NS_IMETHODIMP
+nsHTMLTableCellElement::GetAlign(nsAString& aValue)
+{
+ nsresult rv = GetAttr(kNameSpaceID_None, nsHTMLAtoms::align, aValue);
+
+ if (rv == NS_CONTENT_ATTR_NOT_THERE) {
+ // There's no align attribute, ask the row for the alignment.
+
+ nsCOMPtr row;
+ GetRow(getter_AddRefs(row));
+
+ if (row) {
+ return row->GetAlign(aValue);
+ }
+ }
+
+ return NS_OK;
+}
+
+NS_IMETHODIMP
+nsHTMLTableCellElement::SetAlign(const nsAString& aValue)
+{
+ return SetAttr(kNameSpaceID_None, nsHTMLAtoms::align, aValue, PR_TRUE);
+}
+
+
static nsGenericHTMLElement::EnumTable kCellScopeTable[] = {
{ "row", NS_STYLE_CELL_SCOPE_ROW },
{ "col", NS_STYLE_CELL_SCOPE_COL },
diff --git a/mozilla/content/html/content/src/nsHTMLTableRowElement.cpp b/mozilla/content/html/content/src/nsHTMLTableRowElement.cpp
index f07a7507891..a17941aea48 100644
--- a/mozilla/content/html/content/src/nsHTMLTableRowElement.cpp
+++ b/mozilla/content/html/content/src/nsHTMLTableRowElement.cpp
@@ -529,13 +529,16 @@ NS_IMPL_STRING_ATTR_DEFAULT_VALUE(nsHTMLTableRowElement, VAlign, valign, "middle
NS_IMETHODIMP
nsHTMLTableRowElement::StringToAttribute(nsIAtom* aAttribute,
- const nsAString& aValue,
- nsHTMLValue& aResult)
+ const nsAString& aValue,
+ nsHTMLValue& aResult)
{
- /* ignore these attributes, stored simply as strings
- ch
+ /*
+ * ignore these attributes, stored simply as strings
+ *
+ * ch
*/
- /* attributes that resolve to integers with default=0*/
+
+ /* attributes that resolve to integers with default = 0 */
if (aAttribute == nsHTMLAtoms::charoff) {
if (ParseValue(aValue, 0, aResult, eHTMLUnit_Integer)) {
return NS_CONTENT_ATTR_HAS_VALUE;