From 7c45b2cbf79d2c36ebfb79fe32aeec9846af169a Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Mon, 7 May 2007 17:57:33 +0000 Subject: [PATCH] Better check for first-letter. Bug 379799, r+sr=dbaron git-svn-id: svn://10.0.0.236/trunk@226057 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/base/nsCSSFrameConstructor.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp index 4c64938df14..cc8693f80d1 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp @@ -8473,11 +8473,10 @@ nsCSSFrameConstructor::ContentAppended(nsIContent* aContainer, PRBool haveFirstLetterStyle = PR_FALSE, haveFirstLineStyle = PR_FALSE; nsIFrame* containingBlock = state.mFloatedItems.containingBlock; if (containingBlock) { - nsIContent* blockContent = containingBlock->GetContent(); - nsStyleContext* blockSC = containingBlock->GetStyleContext(); - HaveSpecialBlockStyle(blockContent, blockSC, - &haveFirstLetterStyle, - &haveFirstLineStyle); + haveFirstLetterStyle = HaveFirstLetterStyle(containingBlock); + haveFirstLineStyle = + HaveFirstLineStyle(containingBlock->GetContent(), + containingBlock->GetStyleContext()); } if (haveFirstLetterStyle) { @@ -9002,11 +9001,10 @@ nsCSSFrameConstructor::ContentInserted(nsIContent* aContainer, (NS_STYLE_DISPLAY_INLINE_BLOCK == parentDisplay->mDisplay)) { // Recover the special style flags for the containing block if (containingBlock) { - blockSC = containingBlock->GetStyleContext(); - blockContent = containingBlock->GetContent(); - HaveSpecialBlockStyle(blockContent, blockSC, - &haveFirstLetterStyle, - &haveFirstLineStyle); + haveFirstLetterStyle = HaveFirstLetterStyle(containingBlock); + haveFirstLineStyle = + HaveFirstLineStyle(containingBlock->GetContent(), + containingBlock->GetStyleContext()); } if (haveFirstLetterStyle) {