Rest of patch (partial commit before). Remove nsFormFrame forever. bug 125578, r=alexsavulov@netscape.com, sr=jst@netscape.com

This commit is contained in:
jkeiser%netscape.com 2002-06-04 02:00:34 +00:00
parent b3be2089fb
commit 3e2a1902ca
6 changed files with 4 additions and 56 deletions

View File

@ -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<nsIAtom> 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);

View File

@ -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;
}

View File

@ -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;
}

View File

@ -123,10 +123,6 @@ h6 {
margin: 2.33em 0;
}
form {
display: block !important;
}
listing {
display: block;
font-family: -moz-fixed;

View File

@ -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<nsIAtom> 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);

View File

@ -123,10 +123,6 @@ h6 {
margin: 2.33em 0;
}
form {
display: block !important;
}
listing {
display: block;
font-family: -moz-fixed;