From: L. David Baron Bug 196292 - Make table inside align=left reset alignment just like for align=center and align=right. diff --git a/layout/style/nsStyleContext.cpp b/layout/style/nsStyleContext.cpp --- a/layout/style/nsStyleContext.cpp +++ b/layout/style/nsStyleContext.cpp @@ -622,20 +622,20 @@ nsStyleContext::ApplyStyleFixups(bool aS // Correct tables. const nsStyleDisplay* disp = StyleDisplay(); if (disp->mDisplay == NS_STYLE_DISPLAY_TABLE) { // -moz-center and -moz-right are used for HTML's alignment // This is covering the
...
case. // In this case, we don't want to inherit the text alignment into the table. const nsStyleText* text = StyleText(); - - if (text->mTextAlign == NS_STYLE_TEXT_ALIGN_MOZ_CENTER || + + if (text->mTextAlign == NS_STYLE_TEXT_ALIGN_MOZ_LEFT || + text->mTextAlign == NS_STYLE_TEXT_ALIGN_MOZ_CENTER || text->mTextAlign == NS_STYLE_TEXT_ALIGN_MOZ_RIGHT) - // XXX Why not MOZ_LEFT? { nsStyleText* uniqueText = (nsStyleText*)GetUniqueStyleData(eStyleStruct_Text); uniqueText->mTextAlign = NS_STYLE_TEXT_ALIGN_DEFAULT; } } // CSS2.1 section 9.2.4 specifies fixups for the 'display' property of // the root element. We can't implement them in nsRuleNode because we