From 8941ea78e7950612a88c6a352cf261ff3e8d1d2b Mon Sep 17 00:00:00 2001 From: "mats.palmgren%bredband.net" Date: Thu, 23 Dec 2004 22:02:54 +0000 Subject: [PATCH] Enable 'text-align' values that were derived from HTML align for tables again in Standards mode. b=273857 r=bernd sr=dbaron git-svn-id: svn://10.0.0.236/trunk@167003 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/style/nsStyleContext.cpp | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/mozilla/layout/style/nsStyleContext.cpp b/mozilla/layout/style/nsStyleContext.cpp index ce617b39524..cc501c38794 100644 --- a/mozilla/layout/style/nsStyleContext.cpp +++ b/mozilla/layout/style/nsStyleContext.cpp @@ -364,22 +364,6 @@ nsStyleContext::ApplyStyleFixups(nsPresContext* aPresContext) mBits |= NS_STYLE_HAS_TEXT_DECORATIONS; } - // Correct tables. - const nsStyleDisplay* disp = GetStyleDisplay(); - 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 = GetStyleText(); - - if (text->mTextAlign == NS_STYLE_TEXT_ALIGN_MOZ_CENTER || - text->mTextAlign == NS_STYLE_TEXT_ALIGN_MOZ_RIGHT) - { - 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 // don't want to store all display structs that aren't 'block', @@ -388,6 +372,7 @@ nsStyleContext::ApplyStyleFixups(nsPresContext* aPresContext) // here if needed, by changing the style data, so that other code // doesn't get confused by looking at the style data. if (!mParent) { + const nsStyleDisplay* disp = GetStyleDisplay(); if (disp->mDisplay != NS_STYLE_DISPLAY_NONE && disp->mDisplay != NS_STYLE_DISPLAY_BLOCK && disp->mDisplay != NS_STYLE_DISPLAY_TABLE) {