Bug 538063. Fix the assert condition to not trigger for <area>s. r=tn
authorBoris Zbarsky <bzbarsky@mit.edu>
Mon, 25 Jan 2010 11:03:48 -0500
changeset 37483 fc6c823b524ae77fc56bc0dd447d86d4cf063310
parent 37482 b5a9cb0708ac2822002fa0ac46df0a6031329e5b
child 37484 3f6e2aed89125da7122949a140b8af01e2c8294a
child 46576 a5db6b7b9c189a631a3c65777a28a9e3657435f7
push id11327
push userbzbarsky@mozilla.com
push dateMon, 25 Jan 2010 16:04:30 +0000
treeherdermozilla-central@fc6c823b524a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstn
bugs538063
milestone1.9.3a1pre
Bug 538063. Fix the assert condition to not trigger for <area>s. r=tn
layout/base/nsCSSFrameConstructor.cpp
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -2160,17 +2160,21 @@ nsCSSFrameConstructor::ConstructTableCel
 
   return NS_OK;
 }
 
 static PRBool 
 NeedFrameFor(nsIFrame*   aParentFrame,
              nsIContent* aChildContent) 
 {
-  NS_PRECONDITION(!aChildContent->GetPrimaryFrame(), "Why did we get called?");
+  // XXX the GetContent() != aChildContent check is needed due to bug 135040.
+  // Remove it once that's fixed.
+  NS_PRECONDITION(!aChildContent->GetPrimaryFrame() ||
+                  aChildContent->GetPrimaryFrame()->GetContent() != aChildContent,
+                  "Why did we get called?");
 
   // don't create a whitespace frame if aParentFrame doesn't want it.
   // always create frames for children in generated content. counter(),
   // quotes, and attr() content can easily change dynamically and we don't
   // want to be reconstructing frames. It's not even clear that these
   // should be considered ignorable just because they evaluate to
   // whitespace.