From e3703f0d3d86e9154b4bed785e455a984aaa7c22 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 23 Jan 2009 10:16:10 -0500 Subject: [PATCH] Bug 474938. Restore silly speculative parsing workaround. r+sr=peterv --- layout/base/nsCSSFrameConstructor.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 4666f8fe82a..4892cb87c5f 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -5073,6 +5073,10 @@ nsCSSFrameConstructor::FindInputData(nsIContent* aContent, nsCOMPtr control = do_QueryInterface(aContent); NS_ASSERTION(control, "input doesn't implement nsIFormControl?"); + if (!control) { // Speculative parsing is screwing up somehow, dammit + return nsnull; + } + return FindDataByInt(control->GetType(), aContent, aStyleContext, sInputData, NS_ARRAY_LENGTH(sInputData)); }