Add assertion. Bug 382199, r+sr=dbaron
authorbzbarsky@mit.edu
Mon, 23 Jul 2007 18:42:23 -0700
changeset 3812 89383b30a7430aaaee53b8198d17d7678ef22269
parent 3811 2c3484dcd913c88a9fcc3dada2bc4d36432bcd0d
child 3813 a4c3c600771f1feadbd32d09885a180e45ea103f
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)
bugs382199
milestone1.9a7pre
Add assertion. Bug 382199, r+sr=dbaron
layout/generic/nsBlockFrame.cpp
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -4734,16 +4734,21 @@ nsBlockFrame::AddFrames(nsIFrame* aFrame
   else if (! mLines.empty()) {
     prevSiblingNextFrame = mLines.front()->mFirstChild;
   }
 
   // Walk through the new frames being added and update the line data
   // structures to fit.
   nsIFrame* newFrame = aFrameList;
   while (newFrame) {
+    NS_ASSERTION(newFrame->GetType() != nsGkAtoms::placeholderFrame ||
+                 (!newFrame->GetStyleDisplay()->IsAbsolutelyPositioned() &&
+                  !newFrame->GetStyleDisplay()->IsFloating()),
+                 "Placeholders should not float or be positioned");
+
     PRBool isBlock = newFrame->GetStyleDisplay()->IsBlockOutside();
 
     // If the frame is a block frame, or if there is no previous line or if the
     // previous line is a block line we need to make a new line.  We also make
     // a new line, as an optimization, in the three cases we know we'll need it:
     // if the previous line ended with a <br>, if it has significant whitespace and
     // ended in a newline, or if it contains continuation placeholders.
     if (isBlock || prevSibLine == end_lines() || prevSibLine->IsBlock() ||