From 54975d102edc46e1ba21077383bce69e4ecc097f Mon Sep 17 00:00:00 2001 From: "jkeiser%netscape.com" Date: Tue, 4 Jun 2002 02:00:34 +0000 Subject: [PATCH] Rest of patch (partial commit before). Remove nsFormFrame forever. bug 125578, r=alexsavulov@netscape.com, sr=jst@netscape.com git-svn-id: svn://10.0.0.236/trunk@122621 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/base/nsCSSFrameConstructor.cpp | 18 ++---------------- mozilla/layout/generic/nsHTMLReflowState.cpp | 8 -------- .../layout/html/base/src/nsHTMLReflowState.cpp | 8 -------- mozilla/layout/html/document/src/html.css | 4 ---- .../html/style/src/nsCSSFrameConstructor.cpp | 18 ++---------------- mozilla/layout/style/html.css | 4 ---- 6 files changed, 4 insertions(+), 56 deletions(-) diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp index 8b291b04af8..fc254c40c2f 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp @@ -2907,6 +2907,7 @@ nsCSSFrameConstructor::MustGeneratePseudoParent(nsIPresContext* aPresContext, } // exclude tags + // XXX Now that form does not have a special frame, can we remove this? if ( (nsLayoutAtoms::commentTagName == aTag) || (nsHTMLAtoms::form == aTag) ) { return PR_FALSE; @@ -3143,6 +3144,7 @@ nsCSSFrameConstructor::TableProcessChild(nsIPresShell* aPresShell, nsCOMPtr tag; aChildContent->GetTag(*getter_AddRefs(tag)); // A form doesn't get a psuedo frame parent, but it needs a frame, so just use the current parent + // XXX now that form is a normal frame, do we need to do this? if (nsHTMLAtoms::form == tag.get()) { nsFrameItems items; rv = ConstructFrame(aPresShell, aPresContext, aState, aChildContent, @@ -4762,22 +4764,6 @@ nsCSSFrameConstructor::ConstructHTMLFrame(nsIPresShell* aPresShell, processChildren = PR_TRUE; canBePositioned = PR_FALSE; } - else if (nsHTMLAtoms::form == aTag) { - if (!aState.mPseudoFrames.IsEmpty()) { // process pending pseudo frames - ProcessPseudoFrames(aPresContext, aState.mPseudoFrames, aFrameItems); - } - PRBool isOutOfFlow = isFloating || isAbsolutelyPositioned || isFixedPositioned; - - rv = NS_NewFormFrame(aPresShell, &newFrame, - isOutOfFlow ? NS_BLOCK_SPACE_MGR|NS_BLOCK_MARGIN_ROOT : 0); - processChildren = PR_TRUE; - - // A form frame is a block frame therefore it can contain floaters - isFloaterContainer = PR_TRUE; - - // See if it's a containing block for absolutely positioned elements - isPositionedContainingBlock = isAbsolutelyPositioned || isFixedPositioned || isRelativePositioned; - } else if (nsHTMLAtoms::frameset == aTag) { if (!aState.mPseudoFrames.IsEmpty()) { // process pending pseudo frames ProcessPseudoFrames(aPresContext, aState.mPseudoFrames, aFrameItems); diff --git a/mozilla/layout/generic/nsHTMLReflowState.cpp b/mozilla/layout/generic/nsHTMLReflowState.cpp index a8f9ca52a51..ed818c4de79 100644 --- a/mozilla/layout/generic/nsHTMLReflowState.cpp +++ b/mozilla/layout/generic/nsHTMLReflowState.cpp @@ -61,9 +61,6 @@ #undef NOISY_VERTICAL_ALIGN #endif -// hack for bug 50695 -#include "nsIFormManager.h" - // Prefs-driven control for |text-decoration: blink| static PRPackedBool sPrefIsLoaded = PR_FALSE; static PRPackedBool sBlinkIsAllowed = PR_TRUE; @@ -1427,11 +1424,6 @@ CalcQuirkContainingBlockHeight(const nsHTMLReflowState& aReflowState, // if the ancestor is auto height then skip it and continue up if it // is the first block/area frame and possibly the body/html if (nsLayoutAtoms::blockFrame == frameType.get()) { - // special hack for bug 50695, skip form frames - nsIFrame* formFrame; - if (NS_OK == rs->frame->QueryInterface(NS_GET_IID(nsIFormManager), (void **)&formFrame)) { - continue; - } if (aRestrictToFirstLevel && firstBlockRS) { break; } diff --git a/mozilla/layout/html/base/src/nsHTMLReflowState.cpp b/mozilla/layout/html/base/src/nsHTMLReflowState.cpp index a8f9ca52a51..ed818c4de79 100644 --- a/mozilla/layout/html/base/src/nsHTMLReflowState.cpp +++ b/mozilla/layout/html/base/src/nsHTMLReflowState.cpp @@ -61,9 +61,6 @@ #undef NOISY_VERTICAL_ALIGN #endif -// hack for bug 50695 -#include "nsIFormManager.h" - // Prefs-driven control for |text-decoration: blink| static PRPackedBool sPrefIsLoaded = PR_FALSE; static PRPackedBool sBlinkIsAllowed = PR_TRUE; @@ -1427,11 +1424,6 @@ CalcQuirkContainingBlockHeight(const nsHTMLReflowState& aReflowState, // if the ancestor is auto height then skip it and continue up if it // is the first block/area frame and possibly the body/html if (nsLayoutAtoms::blockFrame == frameType.get()) { - // special hack for bug 50695, skip form frames - nsIFrame* formFrame; - if (NS_OK == rs->frame->QueryInterface(NS_GET_IID(nsIFormManager), (void **)&formFrame)) { - continue; - } if (aRestrictToFirstLevel && firstBlockRS) { break; } diff --git a/mozilla/layout/html/document/src/html.css b/mozilla/layout/html/document/src/html.css index 5bb870678b6..eb5caa6a722 100644 --- a/mozilla/layout/html/document/src/html.css +++ b/mozilla/layout/html/document/src/html.css @@ -123,10 +123,6 @@ h6 { margin: 2.33em 0; } -form { - display: block !important; -} - listing { display: block; font-family: -moz-fixed; diff --git a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp index 8b291b04af8..fc254c40c2f 100644 --- a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -2907,6 +2907,7 @@ nsCSSFrameConstructor::MustGeneratePseudoParent(nsIPresContext* aPresContext, } // exclude tags + // XXX Now that form does not have a special frame, can we remove this? if ( (nsLayoutAtoms::commentTagName == aTag) || (nsHTMLAtoms::form == aTag) ) { return PR_FALSE; @@ -3143,6 +3144,7 @@ nsCSSFrameConstructor::TableProcessChild(nsIPresShell* aPresShell, nsCOMPtr tag; aChildContent->GetTag(*getter_AddRefs(tag)); // A form doesn't get a psuedo frame parent, but it needs a frame, so just use the current parent + // XXX now that form is a normal frame, do we need to do this? if (nsHTMLAtoms::form == tag.get()) { nsFrameItems items; rv = ConstructFrame(aPresShell, aPresContext, aState, aChildContent, @@ -4762,22 +4764,6 @@ nsCSSFrameConstructor::ConstructHTMLFrame(nsIPresShell* aPresShell, processChildren = PR_TRUE; canBePositioned = PR_FALSE; } - else if (nsHTMLAtoms::form == aTag) { - if (!aState.mPseudoFrames.IsEmpty()) { // process pending pseudo frames - ProcessPseudoFrames(aPresContext, aState.mPseudoFrames, aFrameItems); - } - PRBool isOutOfFlow = isFloating || isAbsolutelyPositioned || isFixedPositioned; - - rv = NS_NewFormFrame(aPresShell, &newFrame, - isOutOfFlow ? NS_BLOCK_SPACE_MGR|NS_BLOCK_MARGIN_ROOT : 0); - processChildren = PR_TRUE; - - // A form frame is a block frame therefore it can contain floaters - isFloaterContainer = PR_TRUE; - - // See if it's a containing block for absolutely positioned elements - isPositionedContainingBlock = isAbsolutelyPositioned || isFixedPositioned || isRelativePositioned; - } else if (nsHTMLAtoms::frameset == aTag) { if (!aState.mPseudoFrames.IsEmpty()) { // process pending pseudo frames ProcessPseudoFrames(aPresContext, aState.mPseudoFrames, aFrameItems); diff --git a/mozilla/layout/style/html.css b/mozilla/layout/style/html.css index 5bb870678b6..eb5caa6a722 100644 --- a/mozilla/layout/style/html.css +++ b/mozilla/layout/style/html.css @@ -123,10 +123,6 @@ h6 { margin: 2.33em 0; } -form { - display: block !important; -} - listing { display: block; font-family: -moz-fixed;