Container floated elements are now wrapped in a BODY frame

This commit is contained in:
troy%netscape.com 1998-09-14 04:01:08 +00:00
Родитель 6a771ae2b8
Коммит c19913ecf4
4 изменённых файлов: 4 добавлений и 4753 удалений

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -1,52 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is Netscape Communications
* Corporation. Portions created by Netscape are Copyright (C) 1998
* Netscape Communications Corporation. All Rights Reserved.
*/
#include "nsCSSContainerFrame.h"
#include "nsPlaceholderFrame.h"
#include "nsIStyleContext.h"
nsCSSContainerFrame::nsCSSContainerFrame(nsIContent* aContent,
nsIFrame* aParent)
: nsHTMLContainerFrame(aContent, aParent)
{
}
nsCSSContainerFrame::~nsCSSContainerFrame()
{
}
nsPlaceholderFrame*
nsCSSContainerFrame::CreatePlaceholderFrame(nsIPresContext* aPresContext,
nsIFrame* aFloatedFrame)
{
nsIContent* content;
aFloatedFrame->GetContent(content);
// XXX We should wrap the floated element in a BODY frame...
nsPlaceholderFrame* placeholder;
nsPlaceholderFrame::NewFrame((nsIFrame**)&placeholder, content, this, aFloatedFrame);
NS_IF_RELEASE(content);
// Let the placeholder share the same style context as the floated element
nsIStyleContext* kidSC;
aFloatedFrame->GetStyleContext(aPresContext, kidSC);
placeholder->SetStyleContext(aPresContext, kidSC);
NS_RELEASE(kidSC);
return placeholder;
}

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

@ -22,6 +22,7 @@
#include "nsIInlineReflow.h"
// Implementation of a frame that's used as a placeholder for an anchored item
class nsPlaceholderFrame : public nsFrame, public nsIInlineReflow {
public:
/**
@ -34,6 +35,7 @@ public:
// Returns the associated anchored item
nsIFrame* GetAnchoredItem() const {return mAnchoredItem;}
void SetAnchoredItem(nsIFrame* aAnchoredItem) {mAnchoredItem = aAnchoredItem;}
// nsISupports
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);

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

@ -22,6 +22,7 @@
#include "nsIInlineReflow.h"
// Implementation of a frame that's used as a placeholder for an anchored item
class nsPlaceholderFrame : public nsFrame, public nsIInlineReflow {
public:
/**
@ -34,6 +35,7 @@ public:
// Returns the associated anchored item
nsIFrame* GetAnchoredItem() const {return mAnchoredItem;}
void SetAnchoredItem(nsIFrame* aAnchoredItem) {mAnchoredItem = aAnchoredItem;}
// nsISupports
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);