Make sure to push a null float containing block for <mtd>. Bug 399676, r+sr=roc
authorbzbarsky@mit.edu
Wed, 13 Feb 2008 14:06:59 -0800
changeset 11687 921d17d761ed8ecd7139175d98ed7f9aa98d1f2a
parent 11686 2bfe379a633c66653652f12c1d537dc96c6db585
child 11688 a0c60ae16229a354e76e43b3f67e520268731341
push id1
push userbsmedberg@mozilla.com
push dateThu, 20 Mar 2008 16:49:24 +0000
treeherdermozilla-central@61007906a1f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs399676
milestone1.9b4pre
Make sure to push a null float containing block for <mtd>. Bug 399676, r+sr=roc
layout/base/nsCSSFrameConstructor.cpp
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -4072,28 +4072,27 @@ nsCSSFrameConstructor::ConstructTableCel
     aNewCellOuterFrame->Destroy();
     aNewCellOuterFrame = nsnull;
     return NS_ERROR_OUT_OF_MEMORY;
   }
 
   InitAndRestoreFrame(aState, aContent, aNewCellOuterFrame, nsnull, aNewCellInnerFrame);
 
   if (!aIsPseudo) {
-    PRBool haveFirstLetterStyle, haveFirstLineStyle;
+    PRBool haveFirstLetterStyle = PR_FALSE, haveFirstLineStyle = PR_FALSE;
     if (isBlock) {
       ShouldHaveSpecialBlockStyle(aContent, aStyleContext,
                                   &haveFirstLetterStyle, &haveFirstLineStyle);
     }
 
     // The block frame is a float container
     nsFrameConstructorSaveState floatSaveState;
-    if (isBlock) {
-      aState.PushFloatContainingBlock(aNewCellInnerFrame, floatSaveState,
-                                      haveFirstLetterStyle, haveFirstLineStyle);
-    }
+    aState.PushFloatContainingBlock(isBlock ? aNewCellInnerFrame : nsnull,
+                                    floatSaveState,
+                                    haveFirstLetterStyle, haveFirstLineStyle);
 
     // Process the child content
     nsFrameItems childItems;
     rv = ProcessChildren(aState, aContent, aNewCellInnerFrame, 
                          PR_TRUE, childItems, isBlock);
 
     if (NS_FAILED(rv)) {
       // Clean up