From 9acee9b20cc5af7936b7891d35fa8ea1766c793f Mon Sep 17 00:00:00 2001 From: "reed@reedloden.com" Date: Tue, 15 Jan 2008 21:07:09 -0800 Subject: [PATCH] Bug 400475 - ""ASSERTION: dangling frame without a content node" changing any attribute on " [p=vladimir.sukhoy@gmail.com (Vlad Sukhoy) r+sr=roc a1.9=schrep] --- layout/mathml/base/src/nsMathMLFrame.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/layout/mathml/base/src/nsMathMLFrame.cpp b/layout/mathml/base/src/nsMathMLFrame.cpp index fe5e790413de..6eeaea306e81 100644 --- a/layout/mathml/base/src/nsMathMLFrame.cpp +++ b/layout/mathml/base/src/nsMathMLFrame.cpp @@ -228,7 +228,8 @@ nsMathMLFrame::GetPresentationDataFrom(nsIFrame* aFrame, } // stop if we reach the root tag nsIContent* content = frame->GetContent(); - NS_ASSERTION(content, "dangling frame without a content node"); + NS_ASSERTION(content || !frame->GetParent(), // no assert for the root + "dangling frame without a content node"); if (!content) break; @@ -241,7 +242,8 @@ nsMathMLFrame::GetPresentationDataFrom(nsIFrame* aFrame, } frame = frame->GetParent(); } - NS_ASSERTION(frame, "bad MathML markup - could not find the top element"); + NS_WARN_IF_FALSE(frame && frame->GetContent(), + "bad MathML markup - could not find the top element"); } // helper to get an attribute from the content or the surrounding hierarchy