Changed frame construction code to set NS_FRAME_REPLACED_ELEMENT but, and

changed the HTML reflow state to read the bit


git-svn-id: svn://10.0.0.236/trunk@20660 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
troy%netscape.com
1999-02-13 05:59:19 +00:00
parent 8849170f95
commit 2aa3cd9ceb
4 changed files with 38 additions and 26 deletions

View File

@@ -82,18 +82,6 @@ nsHTMLReflowState::GetContainingBlockContentWidth(const nsReflowState* aParentRS
return width;
}
static inline PRBool
IsReplaced(nsIAtom* aTag)
{
return (nsHTMLAtoms::img == aTag) ||
(nsHTMLAtoms::applet == aTag) ||
(nsHTMLAtoms::object == aTag) ||
(nsHTMLAtoms::input == aTag) ||
(nsHTMLAtoms::select == aTag) ||
(nsHTMLAtoms::textarea == aTag) ||
(nsHTMLAtoms::iframe == aTag);
}
// XXX there is no CLEAN way to detect the "replaced" attribute (yet)
void
nsHTMLReflowState::DetermineFrameType(nsIPresContext& aPresContext)
@@ -155,7 +143,10 @@ nsHTMLReflowState::DetermineFrameType(nsIPresContext& aPresContext)
}
}
if (IsReplaced(tag)) {
// See if the frame is replaced
nsFrameState frameState;
frame->GetFrameState(&frameState);
if (frameState & NS_FRAME_REPLACED_ELEMENT) {
frameType = NS_FRAME_REPLACED(frameType);
}
NS_IF_RELEASE(tag);