Fixed somecomments which had been copied from elsewhere and we not

completely accurate
This commit is contained in:
troy%netscape.com 1998-10-22 21:02:19 +00:00
Родитель 2017acf95a
Коммит afea3ec53b
2 изменённых файлов: 6 добавлений и 8 удалений

Просмотреть файл

@ -215,18 +215,17 @@ nsHTMLContainerFrame::CreateWrapperFrame(nsIPresContext& aPresContext,
nsIFrame* aFrame, nsIFrame* aFrame,
nsIFrame*& aWrapperFrame) nsIFrame*& aWrapperFrame)
{ {
// If the floated element can contain children then wrap it in a // If the frame can contain children then wrap it in a BODY frame
// BODY frame before floating it
nsIContent* content; nsIContent* content;
PRBool isContainer; PRBool isContainer;
aFrame->GetContent(content); aFrame->GetContent(content);
content->CanContainChildren(isContainer); content->CanContainChildren(isContainer);
if (isContainer) { if (isContainer) {
// Wrap the floated element in a BODY frame. // Wrap the frame in a BODY frame.
NS_NewBodyFrame(content, this, aWrapperFrame, NS_BODY_SHRINK_WRAP);/* XXX auto margins? */ NS_NewBodyFrame(content, this, aWrapperFrame, NS_BODY_SHRINK_WRAP);/* XXX auto margins? */
// The body wrapper frame gets the original style context, and the floated // The body wrapper frame gets the original style context, and the wrapped
// frame gets a pseudo style context // frame gets a pseudo style context
nsIStyleContext* kidStyle; nsIStyleContext* kidStyle;
aFrame->GetStyleContext(&aPresContext, kidStyle); aFrame->GetStyleContext(&aPresContext, kidStyle);

Просмотреть файл

@ -215,18 +215,17 @@ nsHTMLContainerFrame::CreateWrapperFrame(nsIPresContext& aPresContext,
nsIFrame* aFrame, nsIFrame* aFrame,
nsIFrame*& aWrapperFrame) nsIFrame*& aWrapperFrame)
{ {
// If the floated element can contain children then wrap it in a // If the frame can contain children then wrap it in a BODY frame
// BODY frame before floating it
nsIContent* content; nsIContent* content;
PRBool isContainer; PRBool isContainer;
aFrame->GetContent(content); aFrame->GetContent(content);
content->CanContainChildren(isContainer); content->CanContainChildren(isContainer);
if (isContainer) { if (isContainer) {
// Wrap the floated element in a BODY frame. // Wrap the frame in a BODY frame.
NS_NewBodyFrame(content, this, aWrapperFrame, NS_BODY_SHRINK_WRAP);/* XXX auto margins? */ NS_NewBodyFrame(content, this, aWrapperFrame, NS_BODY_SHRINK_WRAP);/* XXX auto margins? */
// The body wrapper frame gets the original style context, and the floated // The body wrapper frame gets the original style context, and the wrapped
// frame gets a pseudo style context // frame gets a pseudo style context
nsIStyleContext* kidStyle; nsIStyleContext* kidStyle;
aFrame->GetStyleContext(&aPresContext, kidStyle); aFrame->GetStyleContext(&aPresContext, kidStyle);