Bug 538063. Fix the assert condition to not trigger for <area>s. r=tn
--- 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.