From e13ea686b00836c9efbbd257f55230cf427f227c Mon Sep 17 00:00:00 2001 From: "hyatt%netscape.com" Date: Fri, 18 May 2001 07:14:37 +0000 Subject: [PATCH] Fix tables. git-svn-id: svn://10.0.0.236/branches/Style_20010509_Branch@95381 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/base/src/nsStyleContext.cpp | 26 ++++++++------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/mozilla/content/base/src/nsStyleContext.cpp b/mozilla/content/base/src/nsStyleContext.cpp index 9557d771eac..340d0eb4b32 100644 --- a/mozilla/content/base/src/nsStyleContext.cpp +++ b/mozilla/content/base/src/nsStyleContext.cpp @@ -428,25 +428,19 @@ StyleContextImpl::GetUniqueStyleData(nsIPresContext* aPresContext, const nsStyle nsStyleStruct* result = nsnull; switch (aSID) { case eStyleStruct_Background: { - if (mCachedStyleData.mResetData && mCachedStyleData.mResetData->mBackgroundData) - result = mCachedStyleData.mResetData->mBackgroundData; - else { - const nsStyleBackground* bg = (const nsStyleBackground*)GetStyleData(aSID); - nsStyleBackground* newBG = new (aPresContext) nsStyleBackground(*bg); - SetStyle(aSID, *newBG); - result = newBG; - } + const nsStyleBackground* bg = (const nsStyleBackground*)GetStyleData(aSID); + nsStyleBackground* newBG = new (aPresContext) nsStyleBackground(*bg); + SetStyle(aSID, *newBG); + result = newBG; + mBits &= ~NS_STYLE_INHERIT_BACKGROUND; break; } case eStyleStruct_Text: { - if (mCachedStyleData.mInheritedData && mCachedStyleData.mInheritedData->mTextData) - result = mCachedStyleData.mInheritedData->mTextData; - else { - const nsStyleText* text = (const nsStyleText*)GetStyleData(aSID); - nsStyleText* newText = new (aPresContext) nsStyleText(*text); - SetStyle(aSID, *newText); - result = newText; - } + const nsStyleText* text = (const nsStyleText*)GetStyleData(aSID); + nsStyleText* newText = new (aPresContext) nsStyleText(*text); + SetStyle(aSID, *newText); + result = newText; + mBits &= ~NS_STYLE_INHERIT_TEXT; break; } default: