From 597d5a42e56aa144cb01fe063df0edf9526557e6 Mon Sep 17 00:00:00 2001 From: "troy%netscape.com" Date: Thu, 18 Feb 1999 16:56:15 +0000 Subject: [PATCH] Fixed a style context problem git-svn-id: svn://10.0.0.236/trunk@21147 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/base/nsCSSFrameConstructor.cpp | 14 +++----------- .../html/style/src/nsCSSFrameConstructor.cpp | 14 +++----------- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp index d35133b64f2..75e7e48567c 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp @@ -2886,20 +2886,12 @@ nsCSSFrameConstructor::ContentInserted(nsIPresContext* aPresContext, // If we have a null parent, then this must be the document element // being inserted if (nsnull == aContainer) { - NS_PRECONDITION(nsnull == mInitialContainingBlock, "initial containing block already created"); - nsCOMPtr rootPseudoStyle; - nsIContent* docElement = nsnull; + nsIContent* docElement = mDocument->GetRootContent(); - docElement = mDocument->GetRootContent(); - - // Create a pseudo element style context + // Get the style context of the containing block frame nsCOMPtr containerStyle; mDocElementContainingBlock->GetStyleContext(getter_AddRefs(containerStyle)); - // XXX Use a different pseudo style context... - aPresContext->ResolvePseudoStyleContextFor(nsnull, nsHTMLAtoms::rootPseudo, - containerStyle, PR_FALSE, - getter_AddRefs(rootPseudoStyle)); // Create frames for the document element and its child elements nsIFrame* docElementFrame; @@ -2907,7 +2899,7 @@ nsCSSFrameConstructor::ContentInserted(nsIPresContext* aPresContext, ConstructDocElementFrame(aPresContext, docElement, mDocElementContainingBlock, - rootPseudoStyle, + containerStyle, docElementFrame, fixedItems); NS_IF_RELEASE(docElement); diff --git a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp index d35133b64f2..75e7e48567c 100644 --- a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -2886,20 +2886,12 @@ nsCSSFrameConstructor::ContentInserted(nsIPresContext* aPresContext, // If we have a null parent, then this must be the document element // being inserted if (nsnull == aContainer) { - NS_PRECONDITION(nsnull == mInitialContainingBlock, "initial containing block already created"); - nsCOMPtr rootPseudoStyle; - nsIContent* docElement = nsnull; + nsIContent* docElement = mDocument->GetRootContent(); - docElement = mDocument->GetRootContent(); - - // Create a pseudo element style context + // Get the style context of the containing block frame nsCOMPtr containerStyle; mDocElementContainingBlock->GetStyleContext(getter_AddRefs(containerStyle)); - // XXX Use a different pseudo style context... - aPresContext->ResolvePseudoStyleContextFor(nsnull, nsHTMLAtoms::rootPseudo, - containerStyle, PR_FALSE, - getter_AddRefs(rootPseudoStyle)); // Create frames for the document element and its child elements nsIFrame* docElementFrame; @@ -2907,7 +2899,7 @@ nsCSSFrameConstructor::ContentInserted(nsIPresContext* aPresContext, ConstructDocElementFrame(aPresContext, docElement, mDocElementContainingBlock, - rootPseudoStyle, + containerStyle, docElementFrame, fixedItems); NS_IF_RELEASE(docElement);