From 5d386068cfbd56912bc986d6077abeb8dfbc2fdb Mon Sep 17 00:00:00 2001 From: "bernd.mielke%snafu.de" Date: Fri, 6 Jul 2001 14:17:08 +0000 Subject: [PATCH] Inherit color into the table elements in quirks mode bug 46480 patch by fantasai@escape.com r=bernd sr=attinasi git-svn-id: svn://10.0.0.236/trunk@98810 18797224-902f-48f8-a5cc-f745e15eee43 --- .../html/style/src/nsHTMLStyleSheet.cpp | 23 +++++++------------ mozilla/layout/style/nsHTMLStyleSheet.cpp | 23 +++++++------------ 2 files changed, 16 insertions(+), 30 deletions(-) diff --git a/mozilla/content/html/style/src/nsHTMLStyleSheet.cpp b/mozilla/content/html/style/src/nsHTMLStyleSheet.cpp index c28be5ae538..3fcab47be96 100644 --- a/mozilla/content/html/style/src/nsHTMLStyleSheet.cpp +++ b/mozilla/content/html/style/src/nsHTMLStyleSheet.cpp @@ -813,22 +813,15 @@ HTMLStyleSheetImpl::RulesMatching(nsIPresContext* aPresContext, } } // end link/visited/active rules } // end A tag - // add the quirks background compatibility rule if in quirks mode - // and/or the Table TH rule for handling differently than - else if ((tag == nsHTMLAtoms::td) || - (tag == nsHTMLAtoms::th) || - (tag == nsHTMLAtoms::tr) || - (tag == nsHTMLAtoms::thead) || // Nav4.X doesn't support row groups, but it is a lot - (tag == nsHTMLAtoms::tbody) || // easier passing from the table to rows this way - (tag == nsHTMLAtoms::tfoot)) { - // add the rule to handle text-align for a - if (tag == nsHTMLAtoms::th) { + // add the rule to handle text-align for a + else if (tag == nsHTMLAtoms::th) { aRuleWalker->Forward(mTableTHRule); - } - nsCompatibility mode; - aPresContext->GetCompatibilityMode(&mode); - if (eCompatibility_NavQuirks == mode) { - if (mDocumentColorRule) { + } + else if (tag == nsHTMLAtoms::table) { + if (mDocumentColorRule) { + nsCompatibility mode; + aPresContext->GetCompatibilityMode(&mode); + if (eCompatibility_NavQuirks == mode) { aRuleWalker->Forward(mDocumentColorRule); } } diff --git a/mozilla/layout/style/nsHTMLStyleSheet.cpp b/mozilla/layout/style/nsHTMLStyleSheet.cpp index c28be5ae538..3fcab47be96 100644 --- a/mozilla/layout/style/nsHTMLStyleSheet.cpp +++ b/mozilla/layout/style/nsHTMLStyleSheet.cpp @@ -813,22 +813,15 @@ HTMLStyleSheetImpl::RulesMatching(nsIPresContext* aPresContext, } } // end link/visited/active rules } // end A tag - // add the quirks background compatibility rule if in quirks mode - // and/or the Table TH rule for handling differently than - else if ((tag == nsHTMLAtoms::td) || - (tag == nsHTMLAtoms::th) || - (tag == nsHTMLAtoms::tr) || - (tag == nsHTMLAtoms::thead) || // Nav4.X doesn't support row groups, but it is a lot - (tag == nsHTMLAtoms::tbody) || // easier passing from the table to rows this way - (tag == nsHTMLAtoms::tfoot)) { - // add the rule to handle text-align for a - if (tag == nsHTMLAtoms::th) { + // add the rule to handle text-align for a + else if (tag == nsHTMLAtoms::th) { aRuleWalker->Forward(mTableTHRule); - } - nsCompatibility mode; - aPresContext->GetCompatibilityMode(&mode); - if (eCompatibility_NavQuirks == mode) { - if (mDocumentColorRule) { + } + else if (tag == nsHTMLAtoms::table) { + if (mDocumentColorRule) { + nsCompatibility mode; + aPresContext->GetCompatibilityMode(&mode); + if (eCompatibility_NavQuirks == mode) { aRuleWalker->Forward(mDocumentColorRule); } }