From 457dea0ee6fc5329ed8733581d7deab320bcdcb4 Mon Sep 17 00:00:00 2001 From: "peterl%netscape.com" Date: Fri, 18 Jun 1999 05:36:58 +0000 Subject: [PATCH] force display type of viewport frame to BLOCK --- layout/base/nsCSSFrameConstructor.cpp | 5 +++++ layout/html/style/src/nsCSSFrameConstructor.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 1f714b0b34d..e78dc10f274 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -2033,6 +2033,11 @@ nsCSSFrameConstructor::ConstructRootFrame(nsIPresContext* aPresContext, nsnull, PR_FALSE, getter_AddRefs(viewportPseudoStyle)); + { // ensure that the viewport thinks it is a block frame, layout goes pootsy if it doesn't + nsStyleDisplay* display = (nsStyleDisplay*)viewportPseudoStyle->GetMutableStyleData(eStyleStruct_Display); + display->mDisplay = NS_STYLE_DISPLAY_BLOCK; + } + // Initialize the viewport frame. It has a NULL content object viewportFrame->Init(*aPresContext, nsnull, nsnull, viewportPseudoStyle, nsnull); diff --git a/layout/html/style/src/nsCSSFrameConstructor.cpp b/layout/html/style/src/nsCSSFrameConstructor.cpp index 1f714b0b34d..e78dc10f274 100644 --- a/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -2033,6 +2033,11 @@ nsCSSFrameConstructor::ConstructRootFrame(nsIPresContext* aPresContext, nsnull, PR_FALSE, getter_AddRefs(viewportPseudoStyle)); + { // ensure that the viewport thinks it is a block frame, layout goes pootsy if it doesn't + nsStyleDisplay* display = (nsStyleDisplay*)viewportPseudoStyle->GetMutableStyleData(eStyleStruct_Display); + display->mDisplay = NS_STYLE_DISPLAY_BLOCK; + } + // Initialize the viewport frame. It has a NULL content object viewportFrame->Init(*aPresContext, nsnull, nsnull, viewportPseudoStyle, nsnull);