Bug 515530 - Remove nsHTMLContainerFrame. r=roc

This commit is contained in:
Mats Palmgren 2011-12-27 21:18:48 +01:00
parent d2a1b926b2
commit ecaac9ba30
57 changed files with 263 additions and 400 deletions

View File

@ -49,7 +49,7 @@
#include "nsFrameManager.h"
#include "nsBidiUtils.h"
#include "nsCSSFrameConstructor.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsInlineFrame.h"
#include "nsPlaceholderFrame.h"
#include "nsContainerFrame.h"

View File

@ -72,7 +72,7 @@
#include "nsStyleConsts.h"
#include "nsTableOuterFrame.h"
#include "nsIDOMXULElement.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsINameSpaceManager.h"
#include "nsIDOMHTMLSelectElement.h"
#include "nsIDOMHTMLLegendElement.h"

View File

@ -28,7 +28,7 @@ The table related tags have their own display types like "table-cell",
<h2>
Block and inline code</h2>
The main classes involved in the layout of HTML documents are nsBlockFrame
and nsInlineFrame, both of which inherit from nsHTMLContainerFrame (why?).&nbsp;
and nsInlineFrame, both of which inherit from nsContainerFrame (why?).&nbsp;
These classes are persistent across reflows and are organized in a hierarchy
to constitute the frame model of the Gecko system.&nbsp; The frame model
is derived by applying style and presentation semantics to the content
@ -77,7 +77,7 @@ to text runs and, so, determine where word breaks should occur.
Questions</h2>
What are anonymous blocks (nsBlockFrame.h)?
<br>What is the difference between a span and a band (nsLineLayout)?
<br>Why do nsBlockFrame and nsInlineFrame both inherit from nsHTMLContainerFrame?
<br>Why do nsBlockFrame and nsInlineFrame both inherit from nsContainerFrame?
<h2>
To Do</h2>

View File

@ -38,7 +38,7 @@
// YY need to pass isMultiple before create called
//#include "nsFormControlFrame.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsLegendFrame.h"
#include "nsIDOMNode.h"
#include "nsIDOMHTMLFieldSetElement.h"
@ -65,7 +65,7 @@
class nsLegendFrame;
class nsFieldSetFrame : public nsHTMLContainerFrame {
class nsFieldSetFrame : public nsContainerFrame {
public:
NS_DECL_FRAMEARENA_HELPERS
@ -138,7 +138,7 @@ NS_NewFieldSetFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
NS_IMPL_FRAMEARENA_HELPERS(nsFieldSetFrame)
nsFieldSetFrame::nsFieldSetFrame(nsStyleContext* aContext)
: nsHTMLContainerFrame(aContext)
: nsContainerFrame(aContext)
{
mContentFrame = nsnull;
mLegendFrame = nsnull;
@ -149,7 +149,7 @@ void
nsFieldSetFrame::DestroyFrom(nsIFrame* aDestructRoot)
{
DestroyAbsoluteFrames(aDestructRoot);
nsHTMLContainerFrame::DestroyFrom(aDestructRoot);
nsContainerFrame::DestroyFrom(aDestructRoot);
}
nsIAtom*
@ -173,7 +173,7 @@ nsFieldSetFrame::SetInitialChildList(ChildListID aListID,
}
// Queue up the frames for the content frame
return nsHTMLContainerFrame::SetInitialChildList(kPrincipalList, aChildList);
return nsContainerFrame::SetInitialChildList(kPrincipalList, aChildList);
}
class nsDisplayFieldSetBorderBackground : public nsDisplayItem {
@ -399,9 +399,8 @@ nsFieldSetFrame::ComputeSize(nsRenderingContext *aRenderingContext,
bool aShrinkWrap)
{
nsSize result =
nsHTMLContainerFrame::ComputeSize(aRenderingContext, aCBSize,
aAvailableWidth,
aMargin, aBorder, aPadding, aShrinkWrap);
nsContainerFrame::ComputeSize(aRenderingContext, aCBSize, aAvailableWidth,
aMargin, aBorder, aPadding, aShrinkWrap);
// Fieldsets never shrink below their min width.
nscoord minWidth = GetMinWidth(aRenderingContext);

View File

@ -38,7 +38,7 @@
#include "nsHTMLButtonControlFrame.h"
#include "nsCOMPtr.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsIFormControlFrame.h"
#include "nsHTMLParts.h"
#include "nsIFormControl.h"
@ -76,7 +76,7 @@ NS_NewHTMLButtonControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
NS_IMPL_FRAMEARENA_HELPERS(nsHTMLButtonControlFrame)
nsHTMLButtonControlFrame::nsHTMLButtonControlFrame(nsStyleContext* aContext)
: nsHTMLContainerFrame(aContext)
: nsContainerFrame(aContext)
{
}
@ -89,7 +89,7 @@ nsHTMLButtonControlFrame::DestroyFrom(nsIFrame* aDestructRoot)
{
nsFormControlFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), false);
DestroyAbsoluteFrames(aDestructRoot);
nsHTMLContainerFrame::DestroyFrom(aDestructRoot);
nsContainerFrame::DestroyFrom(aDestructRoot);
}
NS_IMETHODIMP
@ -98,7 +98,7 @@ nsHTMLButtonControlFrame::Init(
nsIFrame* aParent,
nsIFrame* aPrevInFlow)
{
nsresult rv = nsHTMLContainerFrame::Init(aContent, aParent, aPrevInFlow);
nsresult rv = nsContainerFrame::Init(aContent, aParent, aPrevInFlow);
if (NS_SUCCEEDED(rv)) {
mRenderer.SetFrame(this, PresContext());
}
@ -107,7 +107,7 @@ nsHTMLButtonControlFrame::Init(
NS_QUERYFRAME_HEAD(nsHTMLButtonControlFrame)
NS_QUERYFRAME_ENTRY(nsIFormControlFrame)
NS_QUERYFRAME_TAIL_INHERITING(nsHTMLContainerFrame)
NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
#ifdef ACCESSIBILITY
already_AddRefed<nsAccessible>

View File

@ -39,7 +39,7 @@
#define nsHTMLButtonControlFrame_h___
#include "nsCOMPtr.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsIFormControlFrame.h"
#include "nsHTMLParts.h"
@ -54,7 +54,7 @@
class nsRenderingContext;
class nsPresContext;
class nsHTMLButtonControlFrame : public nsHTMLContainerFrame,
class nsHTMLButtonControlFrame : public nsContainerFrame,
public nsIFormControlFrame
{
public:
@ -127,7 +127,7 @@ public:
virtual bool IsFrameOfType(PRUint32 aFlags) const
{
return nsHTMLContainerFrame::IsFrameOfType(aFlags &
return nsContainerFrame::IsFrameOfType(aFlags &
~(nsIFrame::eReplaced | nsIFrame::eReplacedContainsBlock));
}

View File

@ -145,7 +145,7 @@ public:
virtual already_AddRefed<nsAccessible> CreateAccessible();
#endif
// nsHTMLContainerFrame
// nsContainerFrame
virtual PRIntn GetSkipSides() const;
// nsIListControlFrame

View File

@ -63,7 +63,7 @@ NS_NewProgressFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
NS_IMPL_FRAMEARENA_HELPERS(nsProgressFrame)
nsProgressFrame::nsProgressFrame(nsStyleContext* aContext)
: nsHTMLContainerFrame(aContext)
: nsContainerFrame(aContext)
, mBarDiv(nsnull)
{
}
@ -80,7 +80,7 @@ nsProgressFrame::DestroyFrom(nsIFrame* aDestructRoot)
"need to call RegUnregAccessKey only for the first.");
nsFormControlFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), false);
nsContentUtils::DestroyAnonymousContent(&mBarDiv);
nsHTMLContainerFrame::DestroyFrom(aDestructRoot);
nsContainerFrame::DestroyFrom(aDestructRoot);
}
nsresult
@ -123,9 +123,17 @@ nsProgressFrame::AppendAnonymousContentTo(nsBaseContentList& aElements,
NS_QUERYFRAME_HEAD(nsProgressFrame)
NS_QUERYFRAME_ENTRY(nsProgressFrame)
NS_QUERYFRAME_ENTRY(nsIAnonymousContentCreator)
NS_QUERYFRAME_TAIL_INHERITING(nsHTMLContainerFrame)
NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
NS_IMETHODIMP
nsProgressFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
return BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
}
NS_IMETHODIMP nsProgressFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
@ -252,8 +260,7 @@ nsProgressFrame::AttributeChanged(PRInt32 aNameSpaceID,
Invalidate(GetVisualOverflowRectRelativeToSelf());
}
return nsHTMLContainerFrame::AttributeChanged(aNameSpaceID, aAttribute,
aModType);
return nsContainerFrame::AttributeChanged(aNameSpaceID, aAttribute, aModType);
}
nsSize

View File

@ -38,13 +38,13 @@
#ifndef nsProgressFrame_h___
#define nsProgressFrame_h___
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsIAnonymousContentCreator.h"
#include "nsCOMPtr.h"
class nsBaseContentList;
class nsProgressFrame : public nsHTMLContainerFrame,
class nsProgressFrame : public nsContainerFrame,
public nsIAnonymousContentCreator
{
public:
@ -57,6 +57,10 @@ public:
virtual void DestroyFrom(nsIFrame* aDestructRoot);
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
NS_IMETHOD Reflow(nsPresContext* aCX,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
@ -89,7 +93,7 @@ public:
virtual bool IsFrameOfType(PRUint32 aFlags) const
{
return nsHTMLContainerFrame::IsFrameOfType(aFlags &
return nsContainerFrame::IsFrameOfType(aFlags &
~(nsIFrame::eReplaced | nsIFrame::eReplacedContainsBlock));
}

View File

@ -95,7 +95,6 @@ CPPSRCS = \
nsFrameUtil.cpp \
nsGfxScrollFrame.cpp \
nsHTMLCanvasFrame.cpp \
nsHTMLContainerFrame.cpp \
nsCanvasFrame.cpp \
nsHTMLReflowMetrics.cpp \
nsHTMLReflowState.cpp \

View File

@ -44,7 +44,7 @@
#include "nsAbsoluteContainingBlock.h"
#include "nsContainerFrame.h"
#include "nsIPresShell.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsHTMLParts.h"
#include "nsPresContext.h"
#include "nsFrameManager.h"

View File

@ -44,7 +44,7 @@
#ifndef nsBlockFrame_h___
#define nsBlockFrame_h___
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsHTMLParts.h"
#include "nsAbsoluteContainingBlock.h"
#include "nsLineBox.h"
@ -123,7 +123,7 @@ class nsIntervalSet;
// (including <BR CLEAR="..."> frames)
#define NS_BLOCK_HAS_CLEAR_CHILDREN NS_FRAME_STATE_BIT(27)
#define nsBlockFrameSuper nsHTMLContainerFrame
#define nsBlockFrameSuper nsContainerFrame
/*
* Base class for block and inline frames.
@ -330,7 +330,7 @@ public:
protected:
nsBlockFrame(nsStyleContext* aContext)
: nsHTMLContainerFrame(aContext)
: nsContainerFrame(aContext)
, mMinWidth(NS_INTRINSIC_WIDTH_UNKNOWN)
, mPrefWidth(NS_INTRINSIC_WIDTH_UNKNOWN)
{

View File

@ -46,7 +46,7 @@
#include "nsFrameManager.h"
#include "nsIContent.h"
#include "nsStyleContext.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsBlockFrame.h"
#include "nsLineBox.h"
#include "nsIDOMHTMLTableCellElement.h"
@ -330,7 +330,7 @@ nsBlockReflowContext::ReflowBlock(const nsRect& aSpace,
// which detaches the placeholder from the float.
/* XXX promote DeleteChildsNextInFlow to nsIFrame to elminate this cast */
aState.mOverflowTracker->Finish(mFrame);
static_cast<nsHTMLContainerFrame*>(kidNextInFlow->GetParent())
static_cast<nsContainerFrame*>(kidNextInFlow->GetParent())
->DeleteNextInFlowChild(mPresContext, kidNextInFlow, true);
}
}

View File

@ -41,7 +41,7 @@
#include "nsBulletFrame.h"
#include "nsGkAtoms.h"
#include "nsHTMLParts.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsGenericHTMLElement.h"
#include "nsPresContext.h"
#include "nsIPresShell.h"

View File

@ -40,7 +40,7 @@
#include "nsCanvasFrame.h"
#include "nsIServiceManager.h"
#include "nsHTMLParts.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsCSSRendering.h"
#include "nsPresContext.h"
#include "nsStyleContext.h"
@ -74,7 +74,7 @@ NS_IMPL_FRAMEARENA_HELPERS(nsCanvasFrame)
NS_QUERYFRAME_HEAD(nsCanvasFrame)
NS_QUERYFRAME_ENTRY(nsCanvasFrame)
NS_QUERYFRAME_TAIL_INHERITING(nsHTMLContainerFrame)
NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
void
nsCanvasFrame::DestroyFrom(nsIFrame* aDestructRoot)
@ -86,7 +86,7 @@ nsCanvasFrame::DestroyFrom(nsIFrame* aDestructRoot)
sf->RemoveScrollPositionListener(this);
}
nsHTMLContainerFrame::DestroyFrom(aDestructRoot);
nsContainerFrame::DestroyFrom(aDestructRoot);
}
void
@ -124,7 +124,7 @@ nsCanvasFrame::SetInitialChildList(ChildListID aListID,
NS_ASSERTION(aListID != kPrincipalList ||
aChildList.IsEmpty() || aChildList.OnlyChild(),
"Primary child list can have at most one frame in it");
return nsHTMLContainerFrame::SetInitialChildList(aListID, aChildList);
return nsContainerFrame::SetInitialChildList(aListID, aChildList);
}
NS_IMETHODIMP

View File

@ -40,7 +40,7 @@
#ifndef nsCanvasFrame_h___
#define nsCanvasFrame_h___
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsIScrollPositionListener.h"
#include "nsDisplayList.h"
#include "nsGkAtoms.h"
@ -56,12 +56,12 @@ class nsEvent;
* It only supports having a single child frame which must be an area
* frame
*/
class nsCanvasFrame : public nsHTMLContainerFrame,
class nsCanvasFrame : public nsContainerFrame,
public nsIScrollPositionListener
{
public:
nsCanvasFrame(nsStyleContext* aContext)
: nsHTMLContainerFrame(aContext),
: nsContainerFrame(aContext),
mDoPaintFocus(false),
mAddedScrollPositionListener(false) {}
@ -90,7 +90,7 @@ public:
nsReflowStatus& aStatus);
virtual bool IsFrameOfType(PRUint32 aFlags) const
{
return nsHTMLContainerFrame::IsFrameOfType(aFlags &
return nsContainerFrame::IsFrameOfType(aFlags &
~(nsIFrame::eCanContainOverflowContainers));
}

View File

@ -38,7 +38,7 @@
/* rendering object for css3 multi-column layout */
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsIContent.h"
#include "nsIFrame.h"
#include "nsISupports.h"
@ -54,7 +54,7 @@
using namespace mozilla;
class nsColumnSetFrame : public nsHTMLContainerFrame {
class nsColumnSetFrame : public nsContainerFrame {
public:
NS_DECL_FRAMEARENA_HELPERS
@ -200,7 +200,7 @@ NS_NewColumnSetFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, PRUint3
NS_IMPL_FRAMEARENA_HELPERS(nsColumnSetFrame)
nsColumnSetFrame::nsColumnSetFrame(nsStyleContext* aContext)
: nsHTMLContainerFrame(aContext), mLastBalanceHeight(NS_INTRINSICSIZE),
: nsContainerFrame(aContext), mLastBalanceHeight(NS_INTRINSICSIZE),
mLastFrameStatus(NS_FRAME_COMPLETE)
{
}
@ -209,7 +209,7 @@ void
nsColumnSetFrame::DestroyFrom(nsIFrame* aDestructRoot)
{
DestroyAbsoluteFrames(aDestructRoot);
nsHTMLContainerFrame::DestroyFrom(aDestructRoot);
nsContainerFrame::DestroyFrom(aDestructRoot);
}
nsIAtom*
@ -305,7 +305,7 @@ nsColumnSetFrame::SetInitialChildList(ChildListID aListID,
NS_ASSERTION(aChildList.OnlyChild(),
"initial child list must have exactly one child");
// Queue up the frames for the content frame
return nsHTMLContainerFrame::SetInitialChildList(kPrincipalList, aChildList);
return nsContainerFrame::SetInitialChildList(kPrincipalList, aChildList);
}
static nscoord

View File

@ -40,7 +40,7 @@
/* base class #1 for rendering objects that have child lists */
#include "nsContainerFrame.h"
#include "nsHTMLContainerFrame.h"
#include "nsIContent.h"
#include "nsIDocument.h"
#include "nsPresContext.h"
@ -50,7 +50,6 @@
#include "nsGUIEvent.h"
#include "nsStyleConsts.h"
#include "nsIView.h"
#include "nsHTMLContainerFrame.h"
#include "nsFrameManager.h"
#include "nsIPresShell.h"
#include "nsCOMPtr.h"
@ -485,7 +484,7 @@ nsContainerFrame::CreateViewForFrame(nsIFrame* aFrame,
aFrame->SetView(view);
NS_FRAME_LOG(NS_FRAME_TRACE_CALLS,
("nsHTMLContainerFrame::CreateViewForFrame: frame=%p view=%p",
("nsContainerFrame::CreateViewForFrame: frame=%p view=%p",
aFrame));
return NS_OK;
}
@ -1298,6 +1297,42 @@ nsContainerFrame::DestroyOverflowList(nsPresContext* aPresContext,
}
}
/*
* Create a next-in-flow for aFrame. Will return the newly created
* frame in aNextInFlowResult <b>if and only if</b> a new frame is
* created; otherwise nsnull is returned in aNextInFlowResult.
*/
nsresult
nsContainerFrame::CreateNextInFlow(nsPresContext* aPresContext,
nsIFrame* aFrame,
nsIFrame*& aNextInFlowResult)
{
NS_PRECONDITION(GetType() != nsGkAtoms::blockFrame,
"you should have called nsBlockFrame::CreateContinuationFor instead");
NS_PRECONDITION(mFrames.ContainsFrame(aFrame), "expected an in-flow child frame");
aNextInFlowResult = nsnull;
nsIFrame* nextInFlow = aFrame->GetNextInFlow();
if (nsnull == nextInFlow) {
// Create a continuation frame for the child frame and insert it
// into our child list.
nsresult rv = aPresContext->PresShell()->FrameConstructor()->
CreateContinuingFrame(aPresContext, aFrame, this, &nextInFlow);
if (NS_FAILED(rv)) {
return rv;
}
mFrames.InsertFrame(nsnull, aFrame, nextInFlow);
NS_FRAME_LOG(NS_FRAME_TRACE_NEW_FRAMES,
("nsContainerFrame::CreateNextInFlow: frame=%p nextInFlow=%p",
aFrame, nextInFlow));
aNextInFlowResult = nextInFlow;
}
return NS_OK;
}
/**
* Remove and delete aNextInFlow and its next-in-flows. Updates the sibling and flow
* pointers

View File

@ -58,6 +58,19 @@
class nsOverflowContinuationTracker;
// Some macros for container classes to do sanity checking on
// width/height/x/y values computed during reflow.
// NOTE: AppUnitsPerCSSPixel value hardwired here to remove the
// dependency on nsDeviceContext.h. It doesn't matter if it's a
// little off.
#ifdef DEBUG
#define CRAZY_W (1000000*60)
#define CRAZY_H CRAZY_W
#define CRAZY_WIDTH(_x) (((_x) < -CRAZY_W) || ((_x) > CRAZY_W))
#define CRAZY_HEIGHT(_y) (((_y) < -CRAZY_H) || ((_y) > CRAZY_H))
#endif
/**
* Implementation of a container frame.
*/
@ -98,6 +111,23 @@ public:
// nsContainerFrame methods
/**
* Helper method to create next-in-flows if necessary. If aFrame
* already has a next-in-flow then this method does
* nothing. Otherwise, a new continuation frame is created and
* linked into the flow. In addition, the new frame is inserted
* into the principal child list after aFrame.
* @note calling this method on a block frame is illegal. Use
* nsBlockFrame::CreateContinuationFor() instead.
* @param aNextInFlowResult will contain the next-in-flow
* <b>if and only if</b> one is created. If a next-in-flow already
* exists aNextInFlowResult is set to nsnull.
* @return NS_OK if a next-in-flow already exists or is successfully created.
*/
nsresult CreateNextInFlow(nsPresContext* aPresContext,
nsIFrame* aFrame,
nsIFrame*& aNextInFlowResult);
/**
* Delete aNextInFlow and its next-in-flows.
* @param aDeletingEmptyFrames if set, then the reflow for aNextInFlow's
@ -366,6 +396,21 @@ protected:
const nsDisplayListSet& aLists,
PRUint32 aFlags = 0);
/**
* A version of BuildDisplayList that use DISPLAY_CHILD_INLINE.
* Intended as a convenience for derived classes.
*/
nsresult BuildDisplayListForInline(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) {
nsresult rv = DisplayBorderBackgroundOutline(aBuilder, aLists);
NS_ENSURE_SUCCESS(rv, rv);
rv = BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists,
DISPLAY_CHILD_INLINE);
NS_ENSURE_SUCCESS(rv, rv);
return rv;
}
// ==========================================================================
/* Overflow Frames are frames that did not fit and must be pulled by

View File

@ -62,7 +62,7 @@ NS_IMPL_FRAMEARENA_HELPERS(nsFirstLetterFrame)
NS_QUERYFRAME_HEAD(nsFirstLetterFrame)
NS_QUERYFRAME_ENTRY(nsFirstLetterFrame)
NS_QUERYFRAME_TAIL_INHERITING(nsFirstLetterFrameSuper)
NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
#ifdef NS_DEBUG
NS_IMETHODIMP
@ -84,6 +84,14 @@ nsFirstLetterFrame::GetSkipSides() const
return 0;
}
NS_IMETHODIMP
nsFirstLetterFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
return BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
}
NS_IMETHODIMP
nsFirstLetterFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
@ -103,7 +111,7 @@ nsFirstLetterFrame::Init(nsIContent* aContent,
}
}
return nsFirstLetterFrameSuper::Init(aContent, aParent, aPrevInFlow);
return nsContainerFrame::Init(aContent, aParent, aPrevInFlow);
}
NS_IMETHODIMP
@ -179,7 +187,7 @@ nsFirstLetterFrame::ComputeSize(nsRenderingContext *aRenderingContext,
// inline frame.
return nsSize(NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE);
}
return nsFirstLetterFrameSuper::ComputeSize(aRenderingContext,
return nsContainerFrame::ComputeSize(aRenderingContext,
aCBSize, aAvailableWidth, aMargin, aBorder, aPadding, aShrinkWrap);
}

View File

@ -40,17 +40,19 @@
/* rendering object for CSS :first-letter pseudo-element */
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#define nsFirstLetterFrameSuper nsHTMLContainerFrame
class nsFirstLetterFrame : public nsFirstLetterFrameSuper {
class nsFirstLetterFrame : public nsContainerFrame {
public:
NS_DECL_QUERYFRAME_TARGET(nsFirstLetterFrame)
NS_DECL_QUERYFRAME
NS_DECL_FRAMEARENA_HELPERS
nsFirstLetterFrame(nsStyleContext* aContext) : nsHTMLContainerFrame(aContext) {}
nsFirstLetterFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
@ -66,7 +68,7 @@ public:
{
if (!GetStyleDisplay()->IsFloating())
aFlags = aFlags & ~(nsIFrame::eLineParticipant);
return nsFirstLetterFrameSuper::IsFrameOfType(aFlags &
return nsContainerFrame::IsFrameOfType(aFlags &
~(nsIFrame::eBidiInlineContainer));
}

View File

@ -112,7 +112,7 @@
#include "nsUnicharUtils.h"
#include "nsLayoutErrors.h"
#include "nsContentErrors.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsBoxLayoutState.h"
#include "nsBlockFrame.h"
#include "nsDisplayList.h"

View File

@ -41,7 +41,7 @@
#include "nsFrameSetFrame.h"
#include "nsGenericHTMLElement.h"
#include "nsLeafFrame.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsPresContext.h"
#include "nsIPresShell.h"
#include "nsIComponentManager.h"
@ -202,7 +202,7 @@ bool nsHTMLFramesetFrame::gDragInProgress = false;
#define DEFAULT_BORDER_WIDTH_PX 6
nsHTMLFramesetFrame::nsHTMLFramesetFrame(nsStyleContext* aContext)
: nsHTMLContainerFrame(aContext)
: nsContainerFrame(aContext)
{
mNumRows = 0;
mRowSizes = nsnull;
@ -244,7 +244,7 @@ nsHTMLFramesetFrame::~nsHTMLFramesetFrame()
NS_QUERYFRAME_HEAD(nsHTMLFramesetFrame)
NS_QUERYFRAME_ENTRY(nsHTMLFramesetFrame)
NS_QUERYFRAME_TAIL_INHERITING(nsHTMLContainerFrame)
NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
// static
int
@ -285,7 +285,7 @@ nsHTMLFramesetFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsIFrame* aPrevInFlow)
{
nsHTMLContainerFrame::Init(aContent, aParent, aPrevInFlow);
nsContainerFrame::Init(aContent, aParent, aPrevInFlow);
// find the highest ancestor that is a frameset
nsresult rv = NS_OK;
nsIFrame* parentFrame = GetParent();
@ -484,7 +484,7 @@ nsHTMLFramesetFrame::SetInitialChildList(ChildListID aListID,
return NS_OK;
}
return nsHTMLContainerFrame::SetInitialChildList(aListID, aChildList);
return nsContainerFrame::SetInitialChildList(aListID, aChildList);
}
// XXX should this try to allocate twips based on an even pixel boundary?
@ -827,7 +827,7 @@ nsHTMLFramesetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
nsresult rv = nsHTMLContainerFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
nsresult rv = BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
NS_ENSURE_SUCCESS(rv, rv);
if (mDragger && aBuilder->IsForEventDelivery()) {

View File

@ -41,7 +41,7 @@
#define nsHTMLFrameset_h___
#include "nsGkAtoms.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsColor.h"
#include "nsIObserver.h"
#include "nsWeakPtr.h"
@ -98,7 +98,7 @@ struct nsFramesetDrag {
/*******************************************************************************
* nsHTMLFramesetFrame
******************************************************************************/
class nsHTMLFramesetFrame : public nsHTMLContainerFrame
class nsHTMLFramesetFrame : public nsContainerFrame
{
public:
NS_DECL_QUERYFRAME_TARGET(nsHTMLFramesetFrame)

View File

@ -46,7 +46,7 @@
#include "nsIView.h"
#include "nsIScrollable.h"
#include "nsIViewManager.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsGfxScrollFrame.h"
#include "nsGkAtoms.h"
#include "nsINameSpaceManager.h"
@ -100,7 +100,7 @@ NS_NewHTMLScrollFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, bool a
NS_IMPL_FRAMEARENA_HELPERS(nsHTMLScrollFrame)
nsHTMLScrollFrame::nsHTMLScrollFrame(nsIPresShell* aShell, nsStyleContext* aContext, bool aIsRoot)
: nsHTMLContainerFrame(aContext),
: nsContainerFrame(aContext),
mInner(this, aIsRoot)
{
}
@ -123,14 +123,14 @@ nsHTMLScrollFrame::DestroyFrom(nsIFrame* aDestructRoot)
{
mInner.Destroy();
DestroyAbsoluteFrames(aDestructRoot);
nsHTMLContainerFrame::DestroyFrom(aDestructRoot);
nsContainerFrame::DestroyFrom(aDestructRoot);
}
NS_IMETHODIMP
nsHTMLScrollFrame::SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList)
{
nsresult rv = nsHTMLContainerFrame::SetInitialChildList(aListID, aChildList);
nsresult rv = nsContainerFrame::SetInitialChildList(aListID, aChildList);
mInner.ReloadChildFrames();
return rv;
}
@ -226,21 +226,21 @@ nsHTMLScrollFrame::InvalidateInternal(const nsRect& aDamageRect,
nsRect thebesLayerDamage = damage + GetScrollPosition() - mInner.mScrollPosAtLastPaint;
if (parentDamage.IsEqualInterior(thebesLayerDamage)) {
// This single call will take care of both rects
nsHTMLContainerFrame::InvalidateInternal(parentDamage, 0, 0, aForChild, aFlags);
nsContainerFrame::InvalidateInternal(parentDamage, 0, 0, aForChild, aFlags);
} else {
// Invalidate rects separately
if (!(aFlags & INVALIDATE_NO_THEBES_LAYERS)) {
nsHTMLContainerFrame::InvalidateInternal(thebesLayerDamage, 0, 0, aForChild,
aFlags | INVALIDATE_ONLY_THEBES_LAYERS);
nsContainerFrame::InvalidateInternal(thebesLayerDamage, 0, 0, aForChild,
aFlags | INVALIDATE_ONLY_THEBES_LAYERS);
}
if (!(aFlags & INVALIDATE_ONLY_THEBES_LAYERS) && !parentDamage.IsEmpty()) {
nsHTMLContainerFrame::InvalidateInternal(parentDamage, 0, 0, aForChild,
aFlags | INVALIDATE_NO_THEBES_LAYERS);
nsContainerFrame::InvalidateInternal(parentDamage, 0, 0, aForChild,
aFlags | INVALIDATE_NO_THEBES_LAYERS);
}
}
} else {
if (!parentDamage.IsEmpty()) {
nsHTMLContainerFrame::InvalidateInternal(parentDamage, 0, 0, aForChild, aFlags);
nsContainerFrame::InvalidateInternal(parentDamage, 0, 0, aForChild, aFlags);
}
}
@ -272,7 +272,7 @@ nsHTMLScrollFrame::InvalidateInternal(const nsRect& aDamageRect,
}
}
nsHTMLContainerFrame::InvalidateInternal(aDamageRect, aX, aY, aForChild, aFlags);
nsContainerFrame::InvalidateInternal(aDamageRect, aX, aY, aForChild, aFlags);
}
/**
@ -987,7 +987,7 @@ NS_QUERYFRAME_HEAD(nsHTMLScrollFrame)
NS_QUERYFRAME_ENTRY(nsIAnonymousContentCreator)
NS_QUERYFRAME_ENTRY(nsIScrollableFrame)
NS_QUERYFRAME_ENTRY(nsIStatefulFrame)
NS_QUERYFRAME_TAIL_INHERITING(nsHTMLContainerFrame)
NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
//----------nsXULScrollFrame-------------------------------------------

View File

@ -40,7 +40,7 @@
#ifndef nsGfxScrollFrame_h___
#define nsGfxScrollFrame_h___
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsIAnonymousContentCreator.h"
#include "nsBoxFrame.h"
#include "nsDisplayList.h"
@ -341,7 +341,7 @@ public:
* Scroll frames don't support incremental changes, i.e. you can't replace
* or remove the scrolled frame
*/
class nsHTMLScrollFrame : public nsHTMLContainerFrame,
class nsHTMLScrollFrame : public nsContainerFrame,
public nsIScrollableFrame,
public nsIAnonymousContentCreator,
public nsIStatefulFrame {

View File

@ -1,121 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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/MPL/
*
* 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.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Michael Ventnor <m.ventnor@gmail.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* base class #2 for rendering objects that have child lists */
#include "nsHTMLContainerFrame.h"
#include "nsFirstLetterFrame.h"
#include "nsRenderingContext.h"
#include "nsPresContext.h"
#include "nsIPresShell.h"
#include "nsStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIContent.h"
#include "nsGkAtoms.h"
#include "nsLayoutUtils.h"
#include "nsCSSAnonBoxes.h"
#include "nsILinkHandler.h"
#include "nsGUIEvent.h"
#include "nsIDocument.h"
#include "nsIURL.h"
#include "nsPlaceholderFrame.h"
#include "nsHTMLParts.h"
#include "nsIView.h"
#include "nsIViewManager.h"
#include "nsIDOMEvent.h"
#include "nsWidgetsCID.h"
#include "nsCOMPtr.h"
#include "gfxFont.h"
#include "nsCSSFrameConstructor.h"
#include "nsDisplayList.h"
#include "nsBlockFrame.h"
#include "nsLineBox.h"
#include "nsDisplayList.h"
#include "nsCSSRendering.h"
NS_IMETHODIMP
nsHTMLContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) {
nsresult rv = DisplayBorderBackgroundOutline(aBuilder, aLists);
NS_ENSURE_SUCCESS(rv, rv);
rv = BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists,
DISPLAY_CHILD_INLINE);
NS_ENSURE_SUCCESS(rv, rv);
return NS_OK;
}
/*
* Create a next-in-flow for aFrame. Will return the newly created
* frame in aNextInFlowResult <b>if and only if</b> a new frame is
* created; otherwise nsnull is returned in aNextInFlowResult.
*/
nsresult
nsHTMLContainerFrame::CreateNextInFlow(nsPresContext* aPresContext,
nsIFrame* aFrame,
nsIFrame*& aNextInFlowResult)
{
NS_PRECONDITION(GetType() != nsGkAtoms::blockFrame,
"you should have called nsBlockFrame::CreateContinuationFor instead");
NS_PRECONDITION(mFrames.ContainsFrame(aFrame), "expected an in-flow child frame");
aNextInFlowResult = nsnull;
nsIFrame* nextInFlow = aFrame->GetNextInFlow();
if (nsnull == nextInFlow) {
// Create a continuation frame for the child frame and insert it
// into our child list.
nsresult rv = aPresContext->PresShell()->FrameConstructor()->
CreateContinuingFrame(aPresContext, aFrame, this, &nextInFlow);
if (NS_FAILED(rv)) {
return rv;
}
mFrames.InsertFrame(nsnull, aFrame, nextInFlow);
NS_FRAME_LOG(NS_FRAME_TRACE_NEW_FRAMES,
("nsHTMLContainerFrame::CreateNextInFlow: frame=%p nextInFlow=%p",
aFrame, nextInFlow));
aNextInFlowResult = nextInFlow;
}
return NS_OK;
}
NS_IMPL_FRAMEARENA_HELPERS(nsHTMLContainerFrame)

View File

@ -1,105 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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/MPL/
*
* 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.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* base class #2 for rendering objects that have child lists */
#ifndef nsHTMLContainerFrame_h___
#define nsHTMLContainerFrame_h___
#include "nsContainerFrame.h"
#include "nsDisplayList.h"
#include "gfxPoint.h"
class nsString;
class nsAbsoluteFrame;
class nsPlaceholderFrame;
struct nsStyleDisplay;
struct nsStylePosition;
struct nsHTMLReflowMetrics;
struct nsHTMLReflowState;
class nsLineBox;
// Some macros for container classes to do sanity checking on
// width/height/x/y values computed during reflow.
// NOTE: AppUnitsPerCSSPixel value hardwired here to remove the
// dependency on nsDeviceContext.h. It doesn't matter if it's a
// little off.
#ifdef DEBUG
#define CRAZY_W (1000000*60)
#define CRAZY_H CRAZY_W
#define CRAZY_WIDTH(_x) (((_x) < -CRAZY_W) || ((_x) > CRAZY_W))
#define CRAZY_HEIGHT(_y) (((_y) < -CRAZY_H) || ((_y) > CRAZY_H))
#endif
// Base class for html container frames that provides common
// functionality.
class nsHTMLContainerFrame : public nsContainerFrame {
public:
NS_DECL_FRAMEARENA_HELPERS
/**
* Helper method to create next-in-flows if necessary. If aFrame
* already has a next-in-flow then this method does
* nothing. Otherwise, a new continuation frame is created and
* linked into the flow. In addition, the new frame is inserted
* into the principal child list after aFrame.
* @note calling this method on a block frame is illegal. Use
* nsBlockFrame::CreateContinuationFor() instead.
* @param aNextInFlowResult will contain the next-in-flow
* <b>if and only if</b> one is created. If a next-in-flow already
* exists aNextInFlowResult is set to nsnull.
* @return NS_OK if a next-in-flow already exists or is successfully created.
*/
nsresult CreateNextInFlow(nsPresContext* aPresContext,
nsIFrame* aFrame,
nsIFrame*& aNextInFlowResult);
/**
* Displays the standard border, background and outline for the frame
* and calls DisplayTextDecorationsAndChildren. This is suitable for
* inline frames or frames that behave like inlines.
*/
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
protected:
nsHTMLContainerFrame(nsStyleContext *aContext) : nsContainerFrame(aContext) {}
};
#endif /* nsHTMLContainerFrame_h___ */

View File

@ -67,7 +67,7 @@
#include "nsISupportsPriority.h"
#include "nsIServiceManager.h"
#include "nsNetUtil.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "prprf.h"
#include "nsCSSRendering.h"
#include "nsILink.h"

View File

@ -75,7 +75,7 @@ NS_IMPL_FRAMEARENA_HELPERS(nsInlineFrame)
NS_QUERYFRAME_HEAD(nsInlineFrame)
NS_QUERYFRAME_ENTRY(nsInlineFrame)
NS_QUERYFRAME_TAIL_INHERITING(nsInlineFrameSuper)
NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
#ifdef DEBUG
NS_IMETHODIMP
@ -185,9 +185,9 @@ nsInlineFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
nsresult rv = nsHTMLContainerFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
nsresult rv = BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
NS_ENSURE_SUCCESS(rv, rv);
// The sole purpose of this is to trigger display of the selection
// window for Named Anchors, which don't have any children and
// normally don't have any size, but in Editor we use CSS to display
@ -924,7 +924,7 @@ void
nsInlineFrame::DestroyFrom(nsIFrame* aDestructRoot)
{
DestroyAbsoluteFrames(aDestructRoot);
nsInlineFrameSuper::DestroyFrom(aDestructRoot);
nsContainerFrame::DestroyFrom(aDestructRoot);
}
#ifdef ACCESSIBILITY

View File

@ -40,13 +40,9 @@
#ifndef nsInlineFrame_h___
#define nsInlineFrame_h___
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsLineLayout.h"
class nsAnonymousBlockFrame;
#define nsInlineFrameSuper nsHTMLContainerFrame
/** In Bidi left (or right) margin/padding/border should be applied to left
* (or right) most frame (or a continuation frame).
* This state value shows if this frame is left (or right) most continuation
@ -64,7 +60,7 @@ class nsAnonymousBlockFrame;
* This class manages a list of child frames that are inline frames. Working with
* nsLineLayout, the class will reflow and place inline frames on a line.
*/
class nsInlineFrame : public nsInlineFrameSuper
class nsInlineFrame : public nsContainerFrame
{
public:
NS_DECL_QUERYFRAME_TARGET(nsInlineFrame)
@ -89,7 +85,7 @@ public:
virtual bool IsFrameOfType(PRUint32 aFlags) const
{
return nsInlineFrameSuper::IsFrameOfType(aFlags &
return nsContainerFrame::IsFrameOfType(aFlags &
~(nsIFrame::eBidiInlineContainer | nsIFrame::eLineParticipant));
}
@ -162,7 +158,7 @@ protected:
}
};
nsInlineFrame(nsStyleContext* aContext) : nsInlineFrameSuper(aContext) {}
nsInlineFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
virtual PRIntn GetSkipSides() const;

View File

@ -39,7 +39,7 @@
#include "nsCOMPtr.h"
#include "nsLeafFrame.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsHTMLParts.h"
#include "nsPresContext.h"

View File

@ -52,7 +52,7 @@
#include "nsBlockFrame.h"
#include "nsInlineFrame.h"
#include "nsStyleConsts.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsFloatManager.h"
#include "nsStyleContext.h"
#include "nsPresContext.h"
@ -999,7 +999,7 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
// Remove all of the childs next-in-flows. Make sure that we ask
// the right parent to do the removal (it's possible that the
// parent is not this because we are executing pullup code)
nsHTMLContainerFrame* parent = static_cast<nsHTMLContainerFrame*>
nsContainerFrame* parent = static_cast<nsContainerFrame*>
(kidNextInFlow->GetParent());
parent->DeleteNextInFlowChild(mPresContext, kidNextInFlow, true);
}

View File

@ -38,7 +38,7 @@
#include "nsPageFrame.h"
#include "nsPlaceholderFrame.h"
#include "nsCSSFrameConstructor.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsHTMLParts.h"
#include "nsIContent.h"
#include "nsPresContext.h"

View File

@ -103,7 +103,6 @@ public:
nsGroupBoxFrame_id,
nsHTMLButtonControlFrame_id,
nsHTMLCanvasFrame_id,
nsHTMLContainerFrame_id,
nsHTMLFramesetBlankFrame_id,
nsHTMLFramesetBorderFrame_id,
nsHTMLFramesetFrame_id,

View File

@ -74,7 +74,7 @@ NS_IMPL_FRAMEARENA_HELPERS(nsMathMLContainerFrame)
NS_QUERYFRAME_HEAD(nsMathMLContainerFrame)
NS_QUERYFRAME_ENTRY(nsMathMLFrame)
NS_QUERYFRAME_TAIL_INHERITING(nsHTMLContainerFrame)
NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
// =============================================================================
@ -898,7 +898,7 @@ nsMathMLContainerFrame::ReflowChild(nsIFrame* aChildFrame,
NS_ASSERTION(!inlineFrame, "Inline frames should be wrapped in blocks");
#endif
nsresult rv = nsHTMLContainerFrame::
nsresult rv = nsContainerFrame::
ReflowChild(aChildFrame, aPresContext, aDesiredSize, aReflowState,
0, 0, NS_FRAME_NO_MOVE_FRAME, aStatus);

View File

@ -44,7 +44,7 @@
#define nsMathMLContainerFrame_h___
#include "nsCOMPtr.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsBlockFrame.h"
#include "nsInlineFrame.h"
#include "nsMathMLAtoms.h"
@ -66,11 +66,11 @@
#define STRETCH_CONSIDER_ACTUAL_SIZE 0x00000001 // just use our current size
#define STRETCH_CONSIDER_EMBELLISHMENTS 0x00000002 // size calculations include embellishments
class nsMathMLContainerFrame : public nsHTMLContainerFrame,
class nsMathMLContainerFrame : public nsContainerFrame,
public nsMathMLFrame {
friend class nsMathMLmfencedFrame;
public:
nsMathMLContainerFrame(nsStyleContext* aContext) : nsHTMLContainerFrame(aContext) {}
nsMathMLContainerFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
NS_DECL_QUERYFRAME
NS_DECL_FRAMEARENA_HELPERS
@ -108,12 +108,12 @@ public:
SetIncrementScriptLevel(PRInt32 aChildIndex, bool aIncrement);
// --------------------------------------------------------------------------
// Overloaded nsHTMLContainerFrame methods -- see documentation in nsIFrame.h
// Overloaded nsContainerFrame methods -- see documentation in nsIFrame.h
virtual bool IsFrameOfType(PRUint32 aFlags) const
{
return !(aFlags & nsIFrame::eLineParticipant) &&
nsHTMLContainerFrame::IsFrameOfType(aFlags &
nsContainerFrame::IsFrameOfType(aFlags &
~(nsIFrame::eMathML | nsIFrame::eExcludesIgnorableWhitespace));
}
@ -154,7 +154,7 @@ public:
WillReflow(nsPresContext* aPresContext)
{
mPresentationData.flags &= ~NS_MATHML_ERROR;
return nsHTMLContainerFrame::WillReflow(aPresContext);
return nsContainerFrame::WillReflow(aPresContext);
}
NS_IMETHOD
@ -164,7 +164,7 @@ public:
{
mPresentationData.flags &= ~NS_MATHML_STRETCH_DONE;
return nsHTMLContainerFrame::DidReflow(aPresContext, aReflowState, aStatus);
return nsContainerFrame::DidReflow(aPresContext, aReflowState, aStatus);
}
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,

View File

@ -71,7 +71,7 @@ using namespace mozilla;
nsTableCellFrame::nsTableCellFrame(nsStyleContext* aContext) :
nsHTMLContainerFrame(aContext)
nsContainerFrame(aContext)
{
mColIndex = 0;
mPriorAvailWidth = 0;
@ -106,7 +106,7 @@ nsTableCellFrame::Init(nsIContent* aContent,
nsIFrame* aPrevInFlow)
{
// Let the base class do its initialization
nsresult rv = nsHTMLContainerFrame::Init(aContent, aParent, aPrevInFlow);
nsresult rv = nsContainerFrame::Init(aContent, aParent, aPrevInFlow);
if (aPrevInFlow) {
// Set the column index
@ -746,7 +746,7 @@ nsTableCellFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
nsTableCellFrame::IntrinsicWidthOffsets(nsRenderingContext* aRenderingContext)
{
IntrinsicWidthOffsetData result =
nsHTMLContainerFrame::IntrinsicWidthOffsets(aRenderingContext);
nsContainerFrame::IntrinsicWidthOffsets(aRenderingContext);
result.hMargin = 0;
result.hPctMargin = 0;
@ -987,7 +987,7 @@ NS_QUERYFRAME_HEAD(nsTableCellFrame)
NS_QUERYFRAME_ENTRY(nsTableCellFrame)
NS_QUERYFRAME_ENTRY(nsITableCellLayout)
NS_QUERYFRAME_ENTRY(nsIPercentHeightObserver)
NS_QUERYFRAME_TAIL_INHERITING(nsHTMLContainerFrame)
NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
#ifdef ACCESSIBILITY
already_AddRefed<nsAccessible>

View File

@ -39,7 +39,7 @@
#include "nsITableCellLayout.h"
#include "nscore.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsTableRowFrame.h" // need to actually include this here to inline GetRowIndex
#include "nsStyleContext.h"
#include "nsIPercentHeightObserver.h"
@ -67,7 +67,7 @@ class nsTableFrame;
*
* @author sclark
*/
class nsTableCellFrame : public nsHTMLContainerFrame,
class nsTableCellFrame : public nsContainerFrame,
public nsITableCellLayout,
public nsIPercentHeightObserver
{
@ -241,7 +241,7 @@ public:
nsPoint aPt);
protected:
/** implement abstract method on nsHTMLContainerFrame */
/** implement abstract method on nsContainerFrame */
virtual PRIntn GetSkipSides() const;
/**

View File

@ -38,7 +38,7 @@
#define nsTableColGroupFrame_h__
#include "nscore.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsTableColFrame.h"
#include "nsTablePainter.h"
@ -56,7 +56,7 @@ enum nsTableColGroupType {
*
* @author sclark
*/
class nsTableColGroupFrame : public nsHTMLContainerFrame
class nsTableColGroupFrame : public nsContainerFrame
{
public:
NS_DECL_FRAMEARENA_HELPERS
@ -233,7 +233,7 @@ protected:
void InsertColsReflow(PRInt32 aColIndex,
const nsFrameList::Slice& aCols);
/** implement abstract method on nsHTMLContainerFrame */
/** implement abstract method on nsContainerFrame */
virtual PRIntn GetSkipSides() const;
// data members
@ -247,7 +247,7 @@ protected:
};
inline nsTableColGroupFrame::nsTableColGroupFrame(nsStyleContext *aContext)
: nsHTMLContainerFrame(aContext), mColCount(0), mStartColIndex(0)
: nsContainerFrame(aContext), mColCount(0), mStartColIndex(0)
{
SetColType(eColGroupContent);
}

View File

@ -184,7 +184,7 @@ nsTableFrame::GetType() const
nsTableFrame::nsTableFrame(nsStyleContext* aContext)
: nsHTMLContainerFrame(aContext),
: nsContainerFrame(aContext),
mCellMap(nsnull),
mTableLayoutStrategy(nsnull)
{
@ -198,7 +198,7 @@ nsTableFrame::nsTableFrame(nsStyleContext* aContext)
NS_QUERYFRAME_HEAD(nsTableFrame)
NS_QUERYFRAME_ENTRY(nsITableLayout)
NS_QUERYFRAME_TAIL_INHERITING(nsHTMLContainerFrame)
NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
NS_IMETHODIMP
nsTableFrame::Init(nsIContent* aContent,
@ -208,7 +208,7 @@ nsTableFrame::Init(nsIContent* aContent,
nsresult rv;
// Let the base class do its processing
rv = nsHTMLContainerFrame::Init(aContent, aParent, aPrevInFlow);
rv = nsContainerFrame::Init(aContent, aParent, aPrevInFlow);
// see if border collapse is on, if so set it
const nsStyleTableBorder* tableStyle = GetStyleTableBorder();
@ -260,7 +260,7 @@ void
nsTableFrame::DestroyFrom(nsIFrame* aDestructRoot)
{
mColGroups.DestroyFramesFrom(aDestructRoot);
nsHTMLContainerFrame::DestroyFrom(aDestructRoot);
nsContainerFrame::DestroyFrom(aDestructRoot);
}
// Make sure any views are positioned properly
@ -1060,13 +1060,13 @@ nsTableFrame::GetChildList(ChildListID aListID) const
if (aListID == kColGroupList) {
return mColGroups;
}
return nsHTMLContainerFrame::GetChildList(aListID);
return nsContainerFrame::GetChildList(aListID);
}
void
nsTableFrame::GetChildLists(nsTArray<ChildList>* aLists) const
{
nsHTMLContainerFrame::GetChildLists(aLists);
nsContainerFrame::GetChildLists(aLists);
mColGroups.AppendIfNonempty(aLists, kColGroupList);
}
@ -1469,7 +1469,7 @@ nsTableFrame::MarkIntrinsicWidthsDirty()
// XXXldb Call SetBCDamageArea?
nsHTMLContainerFrame::MarkIntrinsicWidthsDirty();
nsContainerFrame::MarkIntrinsicWidthsDirty();
}
/* virtual */ nscoord
@ -1498,7 +1498,7 @@ nsTableFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
nsTableFrame::IntrinsicWidthOffsets(nsRenderingContext* aRenderingContext)
{
IntrinsicWidthOffsetData result =
nsHTMLContainerFrame::IntrinsicWidthOffsets(aRenderingContext);
nsContainerFrame::IntrinsicWidthOffsets(aRenderingContext);
result.hMargin = 0;
result.hPctMargin = 0;
@ -1521,9 +1521,8 @@ nsTableFrame::ComputeSize(nsRenderingContext *aRenderingContext,
bool aShrinkWrap)
{
nsSize result =
nsHTMLContainerFrame::ComputeSize(aRenderingContext, aCBSize,
aAvailableWidth,
aMargin, aBorder, aPadding, aShrinkWrap);
nsContainerFrame::ComputeSize(aRenderingContext, aCBSize, aAvailableWidth,
aMargin, aBorder, aPadding, aShrinkWrap);
// Tables never shrink below their min width.
nscoord minWidth = GetMinWidth(aRenderingContext);
@ -2322,7 +2321,7 @@ nsTableFrame::RemoveFrame(ChildListID aListID,
nsTableFrame::GetUsedBorder() const
{
if (!IsBorderCollapse())
return nsHTMLContainerFrame::GetUsedBorder();
return nsContainerFrame::GetUsedBorder();
return GetIncludedOuterBCBorder();
}
@ -2331,7 +2330,7 @@ nsTableFrame::GetUsedBorder() const
nsTableFrame::GetUsedPadding() const
{
if (!IsBorderCollapse())
return nsHTMLContainerFrame::GetUsedPadding();
return nsContainerFrame::GetUsedPadding();
return nsMargin(0,0,0,0);
}

View File

@ -38,7 +38,7 @@
#define nsTableFrame_h__
#include "nscore.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsStyleCoord.h"
#include "nsStyleConsts.h"
#include "nsITableLayout.h"
@ -128,7 +128,7 @@ private:
* The principal child list contains row group frames. There is also an
* additional child list, kColGroupList, which contains the col group frames.
*/
class nsTableFrame : public nsHTMLContainerFrame, public nsITableLayout
class nsTableFrame : public nsContainerFrame, public nsITableLayout
{
public:
NS_DECL_QUERYFRAME
@ -518,7 +518,7 @@ protected:
void InitChildReflowState(nsHTMLReflowState& aReflowState);
/** implement abstract method on nsHTMLContainerFrame */
/** implement abstract method on nsContainerFrame */
virtual PRIntn GetSkipSides() const;
public:

View File

@ -83,7 +83,7 @@ nsTableOuterFrame::GetBaseline() const
nsIFrame* kid = mFrames.FirstChild();
if (!kid) {
NS_NOTREACHED("no inner table");
return nsHTMLContainerFrame::GetBaseline();
return nsContainerFrame::GetBaseline();
}
return kid->GetBaseline() + kid->GetPosition().y;
@ -173,7 +173,7 @@ NS_IMPL_FRAMEARENA_HELPERS(nsTableCaptionFrame)
/* ----------- nsTableOuterFrame ---------- */
nsTableOuterFrame::nsTableOuterFrame(nsStyleContext* aContext):
nsHTMLContainerFrame(aContext)
nsContainerFrame(aContext)
{
}
@ -183,7 +183,7 @@ nsTableOuterFrame::~nsTableOuterFrame()
NS_QUERYFRAME_HEAD(nsTableOuterFrame)
NS_QUERYFRAME_ENTRY(nsITableLayout)
NS_QUERYFRAME_TAIL_INHERITING(nsHTMLContainerFrame)
NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
#ifdef ACCESSIBILITY
already_AddRefed<nsAccessible>
@ -204,7 +204,7 @@ nsTableOuterFrame::DestroyFrom(nsIFrame* aDestructRoot)
{
DestroyAbsoluteFrames(aDestructRoot);
mCaptionFrames.DestroyFramesFrom(aDestructRoot);
nsHTMLContainerFrame::DestroyFrom(aDestructRoot);
nsContainerFrame::DestroyFrom(aDestructRoot);
}
nsFrameList
@ -214,13 +214,13 @@ nsTableOuterFrame::GetChildList(ChildListID aListID) const
return mCaptionFrames;
}
return nsHTMLContainerFrame::GetChildList(aListID);
return nsContainerFrame::GetChildList(aListID);
}
void
nsTableOuterFrame::GetChildLists(nsTArray<ChildList>* aLists) const
{
nsHTMLContainerFrame::GetChildLists(aLists);
nsContainerFrame::GetChildLists(aLists);
mCaptionFrames.AppendIfNonempty(aLists, kCaptionList);
}

View File

@ -38,7 +38,7 @@
#define nsTableOuterFrame_h__
#include "nscore.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsBlockFrame.h"
#include "nsITableLayout.h"
#include "nsTableFrame.h"
@ -82,7 +82,7 @@ protected:
* the nsTableOuterFrame contains 0 or one caption frame, and a nsTableFrame
* pseudo-frame (referred to as the "inner frame').
*/
class nsTableOuterFrame : public nsHTMLContainerFrame, public nsITableLayout
class nsTableOuterFrame : public nsContainerFrame, public nsITableLayout
{
public:
NS_DECL_QUERYFRAME
@ -188,7 +188,7 @@ protected:
/** Always returns 0, since the outer table frame has no border of its own
* The inner table frame can answer this question in a meaningful way.
* @see nsHTMLContainerFrame::GetSkipSides */
* @see nsContainerFrame::GetSkipSides */
virtual PRIntn GetSkipSides() const;
PRUint8 GetCaptionSide(); // NS_STYLE_CAPTION_SIDE_* or NO_SIDE

View File

@ -148,10 +148,10 @@ nsTableRowFrame::SetPctHeight(float aPctValue,
NS_QUERYFRAME_HEAD(nsTableRowFrame)
NS_QUERYFRAME_ENTRY(nsTableRowFrame)
NS_QUERYFRAME_TAIL_INHERITING(nsHTMLContainerFrame)
NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
nsTableRowFrame::nsTableRowFrame(nsStyleContext* aContext)
: nsHTMLContainerFrame(aContext)
: nsContainerFrame(aContext)
{
mBits.mRowIndex = mBits.mFirstInserted = 0;
ResetHeight(0);
@ -169,7 +169,7 @@ nsTableRowFrame::Init(nsIContent* aContent,
nsresult rv;
// Let the base class do its initialization
rv = nsHTMLContainerFrame::Init(aContent, aParent, aPrevInFlow);
rv = nsContainerFrame::Init(aContent, aParent, aPrevInFlow);
NS_ASSERTION(NS_STYLE_DISPLAY_TABLE_ROW == GetStyleDisplay()->mDisplay,
"wrong display on table row frame");

View File

@ -38,7 +38,7 @@
#define nsTableRowFrame_h__
#include "nscore.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsTablePainter.h"
class nsTableFrame;
@ -64,7 +64,7 @@ struct nsTableCellReflowState;
* @see nsTableRowGroupFrame
* @see nsTableCellFrame
*/
class nsTableRowFrame : public nsHTMLContainerFrame
class nsTableRowFrame : public nsContainerFrame
{
public:
NS_DECL_QUERYFRAME_TARGET(nsTableRowFrame)
@ -267,7 +267,7 @@ protected:
bool aBorderCollapse,
nsTableCellReflowState& aReflowState);
/** implement abstract method on nsHTMLContainerFrame */
/** implement abstract method on nsContainerFrame */
virtual PRIntn GetSkipSides() const;
// row-specific methods

View File

@ -56,7 +56,7 @@
using namespace mozilla;
nsTableRowGroupFrame::nsTableRowGroupFrame(nsStyleContext* aContext):
nsHTMLContainerFrame(aContext)
nsContainerFrame(aContext)
{
SetRepeatable(false);
}
@ -67,7 +67,7 @@ nsTableRowGroupFrame::~nsTableRowGroupFrame()
NS_QUERYFRAME_HEAD(nsTableRowGroupFrame)
NS_QUERYFRAME_ENTRY(nsTableRowGroupFrame)
NS_QUERYFRAME_TAIL_INHERITING(nsHTMLContainerFrame)
NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
PRInt32
nsTableRowGroupFrame::GetRowCount()

View File

@ -38,7 +38,7 @@
#define nsTableRowGroupFrame_h__
#include "nscore.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsIAtom.h"
#include "nsILineIterator.h"
#include "nsTablePainter.h"
@ -92,7 +92,7 @@ struct nsRowGroupReflowState {
* @see nsTableRowFrame
*/
class nsTableRowGroupFrame
: public nsHTMLContainerFrame
: public nsContainerFrame
, public nsILineIterator
{
public:
@ -363,7 +363,7 @@ protected:
bool aBorderCollapse,
nsHTMLReflowState& aReflowState);
/** implement abstract method on nsHTMLContainerFrame */
/** implement abstract method on nsContainerFrame */
virtual PRIntn GetSkipSides() const;
void PlaceChild(nsPresContext* aPresContext,

View File

@ -43,7 +43,7 @@
#include "nsPresContext.h"
#include "nsCOMPtr.h"
#include "nsIContent.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsINameSpaceManager.h"
#include "nsGkAtoms.h"
#include "nsFrameManager.h"
@ -616,12 +616,8 @@ nsBox::SyncLayout(nsBoxLayoutState& aState)
if (view) {
// Make sure the frame's view is properly sized and positioned and has
// things like opacity correct
nsHTMLContainerFrame::SyncFrameViewAfterReflow(
presContext,
this,
view,
visualOverflow,
flags);
nsContainerFrame::SyncFrameViewAfterReflow(presContext, this, view,
visualOverflow, flags);
}
return NS_OK;

View File

@ -84,7 +84,7 @@
#include "nsIScrollableFrame.h"
#include "nsWidgetsCID.h"
#include "nsCSSAnonBoxes.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsIDOMDocument.h"
#include "nsIDOMElement.h"
#include "nsITheme.h"

View File

@ -45,7 +45,7 @@
#include "nsBox.h"
#include "nsCOMPtr.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsBoxLayout.h"
void

View File

@ -56,7 +56,7 @@
#include "nsBoxLayoutState.h"
#include "nsStackLayout.h"
#include "nsDisplayList.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
nsIFrame*
NS_NewDeckFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)

View File

@ -61,7 +61,7 @@
#include "nsILinkHandler.h"
#include "nsIURL.h"
#include "nsILoadGroup.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "prprf.h"
#include "nsCSSRendering.h"
#include "nsIDOMHTMLImageElement.h"

View File

@ -53,7 +53,7 @@
#include "nsBoxLayoutState.h"
#include "nsWidgetsCID.h"
#include "nsIViewManager.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsDisplayList.h"
//

View File

@ -63,7 +63,7 @@
#include "nsBoxLayoutState.h"
#include "nsIXBLService.h"
#include "nsIServiceManager.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsGUIEvent.h"
#include "nsAutoPtr.h"
#include "nsContentCID.h"

View File

@ -50,7 +50,7 @@
#include "nsCOMPtr.h"
#include "nsIContent.h"
#include "nsIPresShell.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsBoxFrame.h"
#include "nsBoxFrame.h"

View File

@ -77,7 +77,7 @@
#include "nsCSSRendering.h"
#include "nsIXULTemplateBuilder.h"
#include "nsXPIDLString.h"
#include "nsHTMLContainerFrame.h"
#include "nsContainerFrame.h"
#include "nsIView.h"
#include "nsIViewManager.h"
#include "nsWidgetsCID.h"