Bug 508665 - part 4, Make nsCSSFrameConstructor use nsContainerFrame* for frames used as parent frames. r=roc

This commit is contained in:
Mats Palmgren 2014-05-24 22:20:40 +00:00
parent 90e503f700
commit d149ed014e
53 changed files with 635 additions and 585 deletions

View File

@ -433,7 +433,7 @@ SplitInlineAncestors(nsIFrame* aParent,
nsIFrame* newParent;
while (IsBidiSplittable(parent)) {
nsIFrame* grandparent = parent->GetParent();
nsContainerFrame* grandparent = parent->GetParent();
NS_ASSERTION(grandparent, "Couldn't get parent's parent in nsBidiPresUtils::SplitInlineAncestors");
// Split the child list after |frame|, unless it is the last child.
@ -540,7 +540,7 @@ CreateContinuation(nsIFrame* aFrame,
nsIPresShell *presShell = presContext->PresShell();
NS_ASSERTION(presShell, "PresShell must be set on PresContext before calling nsBidiPresUtils::CreateContinuation");
nsIFrame* parent = aFrame->GetParent();
nsContainerFrame* parent = aFrame->GetParent();
NS_ASSERTION(parent, "Couldn't get frame parent in nsBidiPresUtils::CreateContinuation");
nsresult rv = NS_OK;

File diff suppressed because it is too large Load Diff

View File

@ -210,7 +210,7 @@ public:
nsIFrame* EnsureFrameForTextNode(nsGenericDOMDataNode* aContent);
// generate the child frames and process bindings
nsresult GenerateChildFrames(nsIFrame* aFrame);
nsresult GenerateChildFrames(nsContainerFrame* aFrame);
// Should be called when a frame is going to be destroyed and
// WillDestroyFrameTree hasn't been called yet.
@ -225,10 +225,10 @@ public:
void WillDestroyFrameTree();
// Request to create a continuing frame. This method never returns null.
nsIFrame* CreateContinuingFrame(nsPresContext* aPresContext,
nsIFrame* aFrame,
nsIFrame* aParentFrame,
bool aIsFluid = true);
nsIFrame* CreateContinuingFrame(nsPresContext* aPresContext,
nsIFrame* aFrame,
nsContainerFrame* aParentFrame,
bool aIsFluid = true);
// Copy over fixed frames from aParentFrame's prev-in-flow
nsresult ReplicateFixedFrames(nsPageContentFrame* aParentFrame);
@ -238,41 +238,41 @@ public:
nsIContent* aChildContent,
bool* aMultiple = nullptr);
nsresult CreateListBoxContent(nsPresContext* aPresContext,
nsIFrame* aParentFrame,
nsIFrame* aPrevFrame,
nsIContent* aChild,
nsIFrame** aResult,
bool aIsAppend,
bool aIsScrollbar,
nsresult CreateListBoxContent(nsPresContext* aPresContext,
nsContainerFrame* aParentFrame,
nsIFrame* aPrevFrame,
nsIContent* aChild,
nsIFrame** aResult,
bool aIsAppend,
bool aIsScrollbar,
nsILayoutHistoryState* aFrameState);
// GetInitialContainingBlock() is deprecated in favor of GetRootElementFrame();
// nsIFrame* GetInitialContainingBlock() { return mRootElementFrame; }
// This returns the outermost frame for the root element
nsIFrame* GetRootElementFrame() { return mRootElementFrame; }
nsContainerFrame* GetRootElementFrame() { return mRootElementFrame; }
// This returns the frame for the root element that does not
// have a psuedo-element style
nsIFrame* GetRootElementStyleFrame() { return mRootElementStyleFrame; }
nsIFrame* GetPageSequenceFrame() { return mPageSequenceFrame; }
// Get the frame that is the parent of the root element.
nsIFrame* GetDocElementContainingBlock()
nsContainerFrame* GetDocElementContainingBlock()
{ return mDocElementContainingBlock; }
private:
struct FrameConstructionItem;
class FrameConstructionItemList;
nsIFrame* ConstructPageFrame(nsIPresShell* aPresShell,
nsPresContext* aPresContext,
nsIFrame* aParentFrame,
nsIFrame* aPrevPageFrame,
nsIFrame*& aCanvasFrame);
nsContainerFrame* ConstructPageFrame(nsIPresShell* aPresShell,
nsPresContext* aPresContext,
nsContainerFrame* aParentFrame,
nsIFrame* aPrevPageFrame,
nsContainerFrame*& aCanvasFrame);
void InitAndRestoreFrame (const nsFrameConstructorState& aState,
nsIContent* aContent,
nsIFrame* aParentFrame,
nsContainerFrame* aParentFrame,
nsIFrame* aNewFrame,
bool aAllowCounters = true);
@ -295,7 +295,7 @@ private:
void AddFrameConstructionItems(nsFrameConstructorState& aState,
nsIContent* aContent,
bool aSuppressWhiteSpaceOptimizations,
nsIFrame* aParentFrame,
nsContainerFrame* aParentFrame,
FrameConstructionItemList& aItems);
// Construct the frames for the document element. This can return null if the
@ -356,7 +356,7 @@ private:
// aFrame may be null; this method doesn't use it directly in any case.
void CreateGeneratedContentItem(nsFrameConstructorState& aState,
nsIFrame* aFrame,
nsContainerFrame* aFrame,
nsIContent* aContent,
nsStyleContext* aStyleContext,
nsCSSPseudoElements::Type aPseudoElement,
@ -368,7 +368,7 @@ private:
// be placed on aParentFrame's principal child list. It may be null if
// aFrameList is being added at the beginning of the child list.
nsresult AppendFramesToParent(nsFrameConstructorState& aState,
nsIFrame* aParentFrame,
nsContainerFrame* aParentFrame,
nsFrameItems& aFrameList,
nsIFrame* aPrevSibling,
bool aIsRecursiveCall = false);
@ -380,7 +380,7 @@ private:
*/
nsIFrame* ConstructTable(nsFrameConstructorState& aState,
FrameConstructionItem& aItem,
nsIFrame* aParentFrame,
nsContainerFrame* aParentFrame,
const nsStyleDisplay* aDisplay,
nsFrameItems& aFrameItems);
@ -389,7 +389,7 @@ private:
*/
nsIFrame* ConstructTableRowOrRowGroup(nsFrameConstructorState& aState,
FrameConstructionItem& aItem,
nsIFrame* aParentFrame,
nsContainerFrame* aParentFrame,
const nsStyleDisplay* aStyleDisplay,
nsFrameItems& aFrameItems);
@ -398,7 +398,7 @@ private:
*/
nsIFrame* ConstructTableCol(nsFrameConstructorState& aState,
FrameConstructionItem& aItem,
nsIFrame* aParentFrame,
nsContainerFrame* aParentFrame,
const nsStyleDisplay* aStyleDisplay,
nsFrameItems& aFrameItems);
@ -407,7 +407,7 @@ private:
*/
nsIFrame* ConstructTableCell(nsFrameConstructorState& aState,
FrameConstructionItem& aItem,
nsIFrame* aParentFrame,
nsContainerFrame* aParentFrame,
const nsStyleDisplay* aStyleDisplay,
nsFrameItems& aFrameItems);
@ -448,6 +448,7 @@ private:
the frame.
@param nsStyleContext the style context to use for the frame. */
typedef nsIFrame* (* FrameCreationFunc)(nsIPresShell*, nsStyleContext*);
typedef nsContainerFrame* (* ContainerFrameCreationFunc)(nsIPresShell*, nsStyleContext*);
/* A function that can be used to get a FrameConstructionData. Such
a function is allowed to return null.
@ -482,7 +483,7 @@ private:
typedef nsIFrame*
(nsCSSFrameConstructor::* FrameFullConstructor)(nsFrameConstructorState& aState,
FrameConstructionItem& aItem,
nsIFrame* aParentFrame,
nsContainerFrame* aParentFrame,
const nsStyleDisplay* aStyleDisplay,
nsFrameItems& aFrameItems);
@ -1053,27 +1054,27 @@ private:
// handling to be better. This should simply be part of the job of
// GetGeometricParent, and stuff like the frameitems and parent frame should
// be kept track of in the state...
void AdjustParentFrame(nsIFrame* & aParentFrame,
void AdjustParentFrame(nsContainerFrame** aParentFrame,
const FrameConstructionData* aFCData,
nsStyleContext* aStyleContext);
// END TABLE SECTION
protected:
static nsIFrame* CreatePlaceholderFrameFor(nsIPresShell* aPresShell,
nsIContent* aContent,
nsIFrame* aFrame,
nsStyleContext* aStyleContext,
nsIFrame* aParentFrame,
nsIFrame* aPrevInFlow,
nsFrameState aTypeBit);
static nsIFrame* CreatePlaceholderFrameFor(nsIPresShell* aPresShell,
nsIContent* aContent,
nsIFrame* aFrame,
nsStyleContext* aStyleContext,
nsContainerFrame* aParentFrame,
nsIFrame* aPrevInFlow,
nsFrameState aTypeBit);
private:
// ConstructSelectFrame puts the new frame in aFrameItems and
// handles the kids of the select.
nsIFrame* ConstructSelectFrame(nsFrameConstructorState& aState,
FrameConstructionItem& aItem,
nsIFrame* aParentFrame,
nsContainerFrame* aParentFrame,
const nsStyleDisplay* aStyleDisplay,
nsFrameItems& aFrameItems);
@ -1081,7 +1082,7 @@ private:
// handles the kids of the fieldset
nsIFrame* ConstructFieldSetFrame(nsFrameConstructorState& aState,
FrameConstructionItem& aItem,
nsIFrame* aParentFrame,
nsContainerFrame* aParentFrame,
const nsStyleDisplay* aStyleDisplay,
nsFrameItems& aFrameItems);
@ -1092,14 +1093,14 @@ private:
void ConstructTextFrame(const FrameConstructionData* aData,
nsFrameConstructorState& aState,
nsIContent* aContent,
nsIFrame* aParentFrame,
nsContainerFrame* aParentFrame,
nsStyleContext* aStyleContext,
nsFrameItems& aFrameItems);
// If aPossibleTextContent is a text node and doesn't have a frame, append a
// frame construction item for it to aItems.
void AddTextItemIfNeeded(nsFrameConstructorState& aState,
nsIFrame* aParentFrame,
nsContainerFrame* aParentFrame,
nsIContent* aPossibleTextContent,
FrameConstructionItemList& aItems);
@ -1146,7 +1147,7 @@ private:
*/
void ConstructFrameFromItemInternal(FrameConstructionItem& aItem,
nsFrameConstructorState& aState,
nsIFrame* aParentFrame,
nsContainerFrame* aParentFrame,
nsFrameItems& aFrameItems);
// possible flags for AddFrameConstructionItemInternal's aFlags argument
@ -1168,7 +1169,7 @@ private:
// inline frame.
void AddFrameConstructionItemsInternal(nsFrameConstructorState& aState,
nsIContent* aContent,
nsIFrame* aParentFrame,
nsContainerFrame* aParentFrame,
nsIAtom* aTag,
int32_t aNameSpaceID,
bool aSuppressWhiteSpaceOptimizations,
@ -1183,18 +1184,18 @@ private:
*/
void ConstructFramesFromItemList(nsFrameConstructorState& aState,
FrameConstructionItemList& aItems,
nsIFrame* aParentFrame,
nsContainerFrame* aParentFrame,
nsFrameItems& aFrameItems);
void ConstructFramesFromItem(nsFrameConstructorState& aState,
FCItemIterator& aItem,
nsIFrame* aParentFrame,
nsContainerFrame* aParentFrame,
nsFrameItems& aFrameItems);
static bool AtLineBoundary(FCItemIterator& aIter);
nsresult CreateAnonymousFrames(nsFrameConstructorState& aState,
nsIContent* aParent,
nsIFrame* aParentFrame,
PendingBinding * aPendingBinding,
nsContainerFrame* aParentFrame,
PendingBinding* aPendingBinding,
nsFrameItems& aChildItems);
nsresult GetAnonymousContent(nsIContent* aParent,
@ -1209,7 +1210,7 @@ private:
*/
void FlushAccumulatedBlock(nsFrameConstructorState& aState,
nsIContent* aContent,
nsIFrame* aParentFrame,
nsContainerFrame* aParentFrame,
nsFrameItems& aBlockItems,
nsFrameItems& aNewItems);
@ -1262,14 +1263,14 @@ private:
* and ConstructMarker, which both want an anonymous block child for their
* children to go in to.
*/
nsIFrame* ConstructFrameWithAnonymousChild(
nsContainerFrame* ConstructFrameWithAnonymousChild(
nsFrameConstructorState& aState,
FrameConstructionItem& aItem,
nsIFrame* aParentFrame,
nsContainerFrame* aParentFrame,
const nsStyleDisplay* aDisplay,
nsFrameItems& aFrameItems,
FrameCreationFunc aConstructor,
FrameCreationFunc aInnerConstructor,
ContainerFrameCreationFunc aConstructor,
ContainerFrameCreationFunc aInnerConstructor,
nsICSSAnonBoxPseudo* aInnerPseudo,
bool aCandidateRootFrame);
@ -1278,7 +1279,7 @@ private:
*/
nsIFrame* ConstructOuterSVG(nsFrameConstructorState& aState,
FrameConstructionItem& aItem,
nsIFrame* aParentFrame,
nsContainerFrame* aParentFrame,
const nsStyleDisplay* aDisplay,
nsFrameItems& aFrameItems);
@ -1287,7 +1288,7 @@ private:
*/
nsIFrame* ConstructMarker(nsFrameConstructorState& aState,
FrameConstructionItem& aItem,
nsIFrame* aParentFrame,
nsContainerFrame* aParentFrame,
const nsStyleDisplay* aDisplay,
nsFrameItems& aFrameItems);
@ -1310,7 +1311,7 @@ private:
*/
nsIFrame* ConstructScrollableBlock(nsFrameConstructorState& aState,
FrameConstructionItem& aItem,
nsIFrame* aParentFrame,
nsContainerFrame* aParentFrame,
const nsStyleDisplay* aDisplay,
nsFrameItems& aFrameItems);
@ -1319,7 +1320,7 @@ private:
*/
nsIFrame* ConstructNonScrollableBlock(nsFrameConstructorState& aState,
FrameConstructionItem& aItem,
nsIFrame* aParentFrame,
nsContainerFrame* aParentFrame,
const nsStyleDisplay* aDisplay,
nsFrameItems& aFrameItems);
@ -1330,7 +1331,7 @@ private:
*/
void AddFCItemsForAnonymousContent(
nsFrameConstructorState& aState,
nsIFrame* aFrame,
nsContainerFrame* aFrame,
nsTArray<nsIAnonymousContentCreator::ContentInfo>& aAnonymousItems,
FrameConstructionItemList& aItemsToConstruct,
uint32_t aExtraFlags = 0);
@ -1349,7 +1350,7 @@ private:
* @param aState the frame construction state
* @param aContent the content node whose children need frames
* @param aStyleContext the style context for aContent
* @param aFrame the frame to use as the parent frame for the new in-flow
* @param aParentFrame the frame to use as the parent frame for the new in-flow
* kids. Note that this must be its own content insertion frame, but
* need not be be the primary frame for aContent. This frame will be
* pushed as the float containing block, as needed. aFrame is also
@ -1369,7 +1370,7 @@ private:
void ProcessChildren(nsFrameConstructorState& aState,
nsIContent* aContent,
nsStyleContext* aStyleContext,
nsIFrame* aFrame,
nsContainerFrame* aParentFrame,
const bool aCanHaveGeneratedContent,
nsFrameItems& aFrameItems,
const bool aAllowBlockStyles,
@ -1389,8 +1390,9 @@ public:
ABS_POS,
FIXED_POS
};
nsIFrame* GetAbsoluteContainingBlock(nsIFrame* aFrame, ContainingBlockType aType);
nsIFrame* GetFloatContainingBlock(nsIFrame* aFrame);
nsContainerFrame* GetAbsoluteContainingBlock(nsIFrame* aFrame,
ContainingBlockType aType);
nsContainerFrame* GetFloatContainingBlock(nsIFrame* aFrame);
private:
nsIContent* PropagateScrollToViewport();
@ -1404,23 +1406,23 @@ private:
nsIContent* aContent,
nsStyleContext* aContentStyle,
nsIFrame* aScrolledFrame,
nsIFrame* aParentFrame,
nsIFrame*& aNewFrame);
nsContainerFrame* aParentFrame,
nsContainerFrame*& aNewFrame);
// Builds the initial ScrollFrame
already_AddRefed<nsStyleContext>
BeginBuildingScrollFrame(nsFrameConstructorState& aState,
nsIContent* aContent,
nsStyleContext* aContentStyle,
nsIFrame* aParentFrame,
nsContainerFrame* aParentFrame,
nsIAtom* aScrolledPseudo,
bool aIsRoot,
nsIFrame*& aNewFrame);
nsContainerFrame*& aNewFrame);
// Completes the building of the scrollframe:
// Creates a view for the scrolledframe and makes it the child of the scrollframe.
void
FinishBuildingScrollFrame(nsIFrame* aScrollFrame,
FinishBuildingScrollFrame(nsContainerFrame* aScrollFrame,
nsIFrame* aScrolledFrame);
// InitializeSelectFrame puts scrollFrame in aFrameItems if aBuildCombobox is false
@ -1428,10 +1430,10 @@ private:
// popup widget or not.
nsresult
InitializeSelectFrame(nsFrameConstructorState& aState,
nsIFrame* scrollFrame,
nsIFrame* scrolledFrame,
nsContainerFrame* aScrollFrame,
nsContainerFrame* aScrolledFrame,
nsIContent* aContent,
nsIFrame* aParentFrame,
nsContainerFrame* aParentFrame,
nsStyleContext* aStyleContext,
bool aBuildCombobox,
PendingBinding* aPendingBinding,
@ -1455,19 +1457,19 @@ private:
bool MaybeRecreateContainerForFrameRemoval(nsIFrame* aFrame,
nsresult* aResult);
nsIFrame* CreateContinuingOuterTableFrame(nsIPresShell* aPresShell,
nsPresContext* aPresContext,
nsIFrame* aFrame,
nsIFrame* aParentFrame,
nsIContent* aContent,
nsStyleContext* aStyleContext);
nsIFrame* CreateContinuingOuterTableFrame(nsIPresShell* aPresShell,
nsPresContext* aPresContext,
nsIFrame* aFrame,
nsContainerFrame* aParentFrame,
nsIContent* aContent,
nsStyleContext* aStyleContext);
nsIFrame* CreateContinuingTableFrame(nsIPresShell* aPresShell,
nsPresContext* aPresContext,
nsIFrame* aFrame,
nsIFrame* aParentFrame,
nsIContent* aContent,
nsStyleContext* aStyleContext);
nsIFrame* CreateContinuingTableFrame(nsIPresShell* aPresShell,
nsPresContext* aPresContext,
nsIFrame* aFrame,
nsContainerFrame* aParentFrame,
nsIContent* aContent,
nsStyleContext* aStyleContext);
//----------------------------------------
@ -1515,17 +1517,17 @@ private:
void ConstructBlock(nsFrameConstructorState& aState,
const nsStyleDisplay* aDisplay,
nsIContent* aContent,
nsIFrame* aParentFrame,
nsIFrame* aContentParentFrame,
nsContainerFrame* aParentFrame,
nsContainerFrame* aContentParentFrame,
nsStyleContext* aStyleContext,
nsIFrame** aNewFrame,
nsContainerFrame** aNewFrame,
nsFrameItems& aFrameItems,
nsIFrame* aPositionedFrameForAbsPosContainer,
PendingBinding* aPendingBinding);
nsIFrame* ConstructInline(nsFrameConstructorState& aState,
FrameConstructionItem& aItem,
nsIFrame* aParentFrame,
nsContainerFrame* aParentFrame,
const nsStyleDisplay* aDisplay,
nsFrameItems& aFrameItems);
@ -1548,7 +1550,7 @@ private:
* needed.
*/
void CreateIBSiblings(nsFrameConstructorState& aState,
nsIFrame* aInitialInline,
nsContainerFrame* aInitialInline,
bool aIsPositioned,
nsFrameItems& aChildItems,
nsFrameItems& aSiblings);
@ -1568,7 +1570,7 @@ private:
// aIsAppend cases. Passing aIsAppend false even when an append is happening
// is ok in terms of correctness, but can lead to unnecessary reframing. If
// aIsAppend is true, then the caller MUST call
// nsCSSFrameConstructor::AppendFrames (as opposed to
// nsCSSFrameConstructor::AppendFramesToParent (as opposed to
// nsFrameManager::InsertFrames directly) to add the new frames.
// @return true if we reconstructed the containing block, false
// otherwise
@ -1586,23 +1588,22 @@ private:
// Methods support :first-letter style
void CreateFloatingLetterFrame(nsFrameConstructorState& aState,
nsIFrame* aBlockFrame,
nsContainerFrame* aBlockFrame,
nsIContent* aTextContent,
nsIFrame* aTextFrame,
nsIContent* aBlockContent,
nsIFrame* aParentFrame,
nsContainerFrame* aParentFrame,
nsStyleContext* aStyleContext,
nsFrameItems& aResult);
void CreateLetterFrame(nsIFrame* aBlockFrame,
nsIFrame* aBlockContinuation,
void CreateLetterFrame(nsContainerFrame* aBlockFrame,
nsContainerFrame* aBlockContinuation,
nsIContent* aTextContent,
nsIFrame* aParentFrame,
nsContainerFrame* aParentFrame,
nsFrameItems& aResult);
void WrapFramesInFirstLetterFrame(nsIContent* aBlockContent,
nsIFrame* aBlockFrame,
nsFrameItems& aBlockFrames);
void WrapFramesInFirstLetterFrame(nsIContent* aBlockContent,
nsContainerFrame* aBlockFrame,
nsFrameItems& aBlockFrames);
/**
* Looks in the block aBlockFrame for a text frame that contains the
@ -1626,29 +1627,29 @@ private:
* first-letter either because it was found or won't be
* found
*/
void WrapFramesInFirstLetterFrame(nsIFrame* aBlockFrame,
nsIFrame* aBlockContinuation,
nsIFrame* aParentFrame,
nsIFrame* aParentFrameList,
nsIFrame** aModifiedParent,
nsIFrame** aTextFrame,
nsIFrame** aPrevFrame,
nsFrameItems& aLetterFrames,
bool* aStopLooking);
void WrapFramesInFirstLetterFrame(nsContainerFrame* aBlockFrame,
nsContainerFrame* aBlockContinuation,
nsContainerFrame* aParentFrame,
nsIFrame* aParentFrameList,
nsContainerFrame** aModifiedParent,
nsIFrame** aTextFrame,
nsIFrame** aPrevFrame,
nsFrameItems& aLetterFrames,
bool* aStopLooking);
void RecoverLetterFrames(nsIFrame* aBlockFrame);
void RecoverLetterFrames(nsContainerFrame* aBlockFrame);
//
nsresult RemoveLetterFrames(nsPresContext* aPresContext,
nsIPresShell* aPresShell,
nsIFrame* aBlockFrame);
nsresult RemoveLetterFrames(nsPresContext* aPresContext,
nsIPresShell* aPresShell,
nsContainerFrame* aBlockFrame);
// Recursive helper for RemoveLetterFrames
nsresult RemoveFirstLetterFrames(nsPresContext* aPresContext,
nsIPresShell* aPresShell,
nsIFrame* aFrame,
nsIFrame* aBlockFrame,
bool* aStopLooking);
nsresult RemoveFirstLetterFrames(nsPresContext* aPresContext,
nsIPresShell* aPresShell,
nsContainerFrame* aFrame,
nsContainerFrame* aBlockFrame,
bool* aStopLooking);
// Special remove method for those pesky floating first-letter frames
nsresult RemoveFloatingFirstLetterFrames(nsPresContext* aPresContext,
@ -1674,7 +1675,7 @@ private:
// the block (possibly including line frames).
void WrapFramesInFirstLineFrame(nsFrameConstructorState& aState,
nsIContent* aBlockContent,
nsIFrame* aBlockFrame,
nsContainerFrame* aBlockFrame,
nsFirstLineFrame* aLineFrame,
nsFrameItems& aFrameItems);
@ -1682,7 +1683,7 @@ private:
// possibly calling WrapFramesInFirstLineFrame as needed).
void AppendFirstLineFrames(nsFrameConstructorState& aState,
nsIContent* aContent,
nsIFrame* aBlockFrame,
nsContainerFrame* aBlockFrame,
nsFrameItems& aFrameItems);
nsresult InsertFirstLineFrames(nsFrameConstructorState& aState,
@ -1781,15 +1782,15 @@ private:
// about the following frames.
// This is just the outermost frame for the root element.
nsIFrame* mRootElementFrame;
nsContainerFrame* mRootElementFrame;
// This is the frame for the root element that has no pseudo-element style.
nsIFrame* mRootElementStyleFrame;
// This is the containing block for fixed-pos frames --- the
// viewport or page frame
nsIFrame* mFixedContainingBlock;
nsContainerFrame* mFixedContainingBlock;
// This is the containing block that contains the root element ---
// the real "initial containing block" according to CSS 2.1.
nsIFrame* mDocElementContainingBlock;
nsContainerFrame* mDocElementContainingBlock;
nsIFrame* mGfxScrollFrame;
nsIFrame* mPageSequenceFrame;
nsQuoteList mQuoteList;

View File

@ -100,7 +100,7 @@ NS_IMPL_ISUPPORTS(nsComboButtonListener,
// static class data member for Bug 32920
nsComboboxControlFrame* nsComboboxControlFrame::sFocused = nullptr;
nsIFrame*
nsContainerFrame*
NS_NewComboboxControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, nsFrameState aStateFlags)
{
nsComboboxControlFrame* it = new (aPresShell) nsComboboxControlFrame(aContext);

View File

@ -46,7 +46,9 @@ class nsComboboxControlFrame : public nsBlockFrame,
public nsIStatefulFrame
{
public:
friend nsIFrame* NS_NewComboboxControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, nsFrameState aFlags);
friend nsContainerFrame* NS_NewComboboxControlFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext,
nsFrameState aFlags);
friend class nsComboboxDisplayFrame;
nsComboboxControlFrame(nsStyleContext* aContext);

View File

@ -23,7 +23,7 @@
using namespace mozilla;
using namespace mozilla::layout;
nsIFrame*
nsContainerFrame*
NS_NewFieldSetFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) nsFieldSetFrame(aContext);

View File

@ -22,7 +22,7 @@ nsGfxButtonControlFrame::nsGfxButtonControlFrame(nsStyleContext* aContext):
{
}
nsIFrame*
nsContainerFrame*
NS_NewGfxButtonControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) nsGfxButtonControlFrame(aContext);

View File

@ -19,7 +19,7 @@
using namespace mozilla;
nsIFrame*
nsContainerFrame*
NS_NewHTMLButtonControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) nsHTMLButtonControlFrame(aContext);

View File

@ -75,7 +75,7 @@ private:
};
//---------------------------------------------------------
nsIFrame*
nsContainerFrame*
NS_NewListControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
nsListControlFrame* it =

View File

@ -52,7 +52,8 @@ class nsListControlFrame : public nsHTMLScrollFrame,
public nsISelectControlFrame
{
public:
friend nsIFrame* NS_NewListControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
friend nsContainerFrame* NS_NewListControlFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext);
NS_DECL_QUERYFRAME
NS_DECL_FRAMEARENA_HELPERS

View File

@ -7,7 +7,7 @@
#include "nsListControlFrame.h"
#include "nsDisplayList.h"
nsIFrame*
nsContainerFrame*
NS_NewSelectsAreaFrame(nsIPresShell* aShell, nsStyleContext* aContext, nsFrameState aFlags)
{
nsSelectsAreaFrame* it = new (aShell) nsSelectsAreaFrame(aContext);

View File

@ -13,7 +13,9 @@ class nsSelectsAreaFrame : public nsBlockFrame
public:
NS_DECL_FRAMEARENA_HELPERS
friend nsIFrame* NS_NewSelectsAreaFrame(nsIPresShell* aShell, nsStyleContext* aContext, nsFrameState aFlags);
friend nsContainerFrame* NS_NewSelectsAreaFrame(nsIPresShell* aShell,
nsStyleContext* aContext,
nsFrameState aFlags);
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,

View File

@ -30,7 +30,7 @@ using namespace mozilla;
using namespace mozilla::layout;
using namespace mozilla::gfx;
nsIFrame*
nsCanvasFrame*
NS_NewCanvasFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) nsCanvasFrame(aContext);

View File

@ -20,7 +20,7 @@ using namespace mozilla::layout;
*
* XXX should we support CSS columns applied to table elements?
*/
nsIFrame*
nsContainerFrame*
NS_NewColumnSetFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, nsFrameState aStateFlags)
{
nsColumnSetFrame* it = new (aPresShell) nsColumnSetFrame(aContext);

View File

@ -21,7 +21,7 @@
using namespace mozilla;
using namespace mozilla::layout;
nsIFrame*
nsFirstLetterFrame*
NS_NewFirstLetterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) nsFirstLetterFrame(aContext);
@ -303,7 +303,7 @@ nsFirstLetterFrame::CreateContinuationForFloatingParent(nsPresContext* aPresCont
nsIPresShell* presShell = aPresContext->PresShell();
nsPlaceholderFrame* placeholderFrame =
presShell->FrameManager()->GetPlaceholderFrameFor(this);
nsIFrame* parent = placeholderFrame->GetParent();
nsContainerFrame* parent = placeholderFrame->GetParent();
nsIFrame* continuation = presShell->FrameConstructor()->
CreateContinuingFrame(aPresContext, aChild, parent, aIsFluid);

View File

@ -1464,7 +1464,7 @@ NS_QUERYFRAME_TAIL_INHERITING(nsFlexContainerFrameSuper)
NS_IMPL_FRAMEARENA_HELPERS(nsFlexContainerFrame)
nsIFrame*
nsContainerFrame*
NS_NewFlexContainerFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext)
{

View File

@ -16,8 +16,8 @@ namespace mozilla {
template <class T> class LinkedList;
}
nsIFrame* NS_NewFlexContainerFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext);
nsContainerFrame* NS_NewFlexContainerFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext);
typedef nsContainerFrame nsFlexContainerFrameSuper;
@ -28,8 +28,8 @@ public:
NS_DECL_QUERYFRAME
// Factory method:
friend nsIFrame* NS_NewFlexContainerFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext);
friend nsContainerFrame* NS_NewFlexContainerFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext);
// Forward-decls of helper classes
class FlexItem;

View File

@ -65,7 +65,7 @@ using namespace mozilla::layout;
//----------nsHTMLScrollFrame-------------------------------------------
nsIFrame*
nsHTMLScrollFrame*
NS_NewHTMLScrollFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, bool aIsRoot)
{
return new (aPresShell) nsHTMLScrollFrame(aPresShell, aContext, aIsRoot);
@ -899,7 +899,7 @@ NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
//----------nsXULScrollFrame-------------------------------------------
nsIFrame*
nsXULScrollFrame*
NS_NewXULScrollFrame(nsIPresShell* aPresShell, nsStyleContext* aContext,
bool aIsRoot, bool aClipAllDescendants)
{

View File

@ -450,7 +450,9 @@ class nsHTMLScrollFrame : public nsContainerFrame,
public:
typedef mozilla::ScrollFrameHelper ScrollFrameHelper;
typedef mozilla::CSSIntPoint CSSIntPoint;
friend nsIFrame* NS_NewHTMLScrollFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, bool aIsRoot);
friend nsHTMLScrollFrame* NS_NewHTMLScrollFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext,
bool aIsRoot);
NS_DECL_QUERYFRAME
NS_DECL_FRAMEARENA_HELPERS
@ -762,8 +764,10 @@ public:
NS_DECL_QUERYFRAME
NS_DECL_FRAMEARENA_HELPERS
friend nsIFrame* NS_NewXULScrollFrame(nsIPresShell* aPresShell, nsStyleContext* aContext,
bool aIsRoot, bool aClipAllDescendants);
friend nsXULScrollFrame* NS_NewXULScrollFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext,
bool aIsRoot,
bool aClipAllDescendants);
// Called to set the child frames. We typically have three: the scroll area,
// the vertical scrollbar, and the horizontal scrollbar.

View File

@ -23,7 +23,7 @@ NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
NS_IMPL_FRAMEARENA_HELPERS(nsGridContainerFrame)
nsIFrame*
nsContainerFrame*
NS_NewGridContainerFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext)
{

View File

@ -15,8 +15,8 @@
* Factory function.
* @return a newly allocated nsGridContainerFrame (infallible)
*/
nsIFrame* NS_NewGridContainerFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext);
nsContainerFrame* NS_NewGridContainerFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext);
class nsGridContainerFrame MOZ_FINAL : public nsContainerFrame
{
@ -37,8 +37,8 @@ public:
#endif
protected:
friend nsIFrame* NS_NewGridContainerFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext);
friend nsContainerFrame* NS_NewGridContainerFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext);
nsGridContainerFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
#ifdef DEBUG

View File

@ -63,7 +63,7 @@ NS_NewAttributeContent(nsNodeInfoManager *aNodeInfoManager,
// return the option frame
// By default, area frames will extend
// their height to cover any children that "stick out".
nsIFrame*
nsContainerFrame*
NS_NewSelectsAreaFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, nsFrameState aFlags);
// Create a block formatting context blockframe
@ -87,13 +87,16 @@ NS_NewSubDocumentFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
NS_NewHTMLFramesetFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
class ViewportFrame;
ViewportFrame*
NS_NewViewportFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
class nsCanvasFrame;
nsCanvasFrame*
NS_NewCanvasFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
NS_NewImageFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
class nsInlineFrame;
nsInlineFrame*
NS_NewInlineFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
NS_NewObjectFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
@ -108,37 +111,41 @@ NS_NewWBRFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) {
return NS_NewEmptyFrame(aPresShell, aContext);
}
nsIFrame*
nsContainerFrame*
NS_NewColumnSetFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, nsFrameState aStateFlags);
nsIFrame*
class nsSimplePageSequenceFrame;
nsSimplePageSequenceFrame*
NS_NewSimplePageSequenceFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
class nsPageFrame;
nsPageFrame*
NS_NewPageFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
class nsPageContentFrame;
nsPageContentFrame*
NS_NewPageContentFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
NS_NewPageBreakFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
class nsFirstLetterFrame;
nsFirstLetterFrame*
NS_NewFirstLetterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
class nsFirstLineFrame;
nsFirstLineFrame*
NS_NewFirstLineFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
// forms
nsIFrame*
nsContainerFrame*
NS_NewGfxButtonControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
NS_NewNativeButtonControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
NS_NewImageControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
nsContainerFrame*
NS_NewHTMLButtonControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
NS_NewGfxCheckboxControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
NS_NewNativeCheckboxControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
nsContainerFrame*
NS_NewFieldSetFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
NS_NewFileControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
@ -158,9 +165,9 @@ nsIFrame*
NS_NewNativeRadioControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
NS_NewNativeSelectControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
nsContainerFrame*
NS_NewListControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
nsContainerFrame*
NS_NewComboboxControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, nsFrameState aFlags);
nsIFrame*
NS_NewProgressFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
@ -172,21 +179,28 @@ nsIFrame*
NS_NewNumberControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
// Table frame factories
nsIFrame*
class nsTableOuterFrame;
nsTableOuterFrame*
NS_NewTableOuterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
class nsTableFrame;
nsTableFrame*
NS_NewTableFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
class nsTableCaptionFrame;
nsTableCaptionFrame*
NS_NewTableCaptionFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsTableColFrame*
NS_NewTableColFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
class nsTableColGroupFrame;
nsTableColGroupFrame*
NS_NewTableColGroupFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
class nsTableRowFrame;
nsTableRowFrame*
NS_NewTableRowFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
class nsTableRowGroupFrame;
nsTableRowGroupFrame*
NS_NewTableRowGroupFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
class nsTableCellFrame;
nsTableCellFrame*
NS_NewTableCellFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, bool aIsBorderCollapse);
nsresult

View File

@ -31,7 +31,7 @@ using namespace mozilla::layout;
// Basic nsInlineFrame methods
nsIFrame*
nsInlineFrame*
NS_NewInlineFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) nsInlineFrame(aContext);

View File

@ -28,7 +28,8 @@ public:
NS_DECL_QUERYFRAME
NS_DECL_FRAMEARENA_HELPERS
friend nsIFrame* NS_NewInlineFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
friend nsInlineFrame* NS_NewInlineFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext);
// nsIFrame overrides
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,

View File

@ -9,7 +9,7 @@
#include "nsIPresShell.h"
#include "nsSimplePageSequenceFrame.h"
nsIFrame*
nsPageContentFrame*
NS_NewPageContentFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) nsPageContentFrame(aContext);

View File

@ -16,7 +16,8 @@ class nsPageContentFrame : public ViewportFrame {
public:
NS_DECL_FRAMEARENA_HELPERS
friend nsIFrame* NS_NewPageContentFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
friend nsPageContentFrame* NS_NewPageContentFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext);
friend class nsPageFrame;
// nsIFrame

View File

@ -26,7 +26,7 @@ extern PRLogModuleInfo *GetLayoutPrintingLog();
using namespace mozilla;
nsIFrame*
nsPageFrame*
NS_NewPageFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) nsPageFrame(aContext);

View File

@ -17,7 +17,8 @@ class nsPageFrame : public nsContainerFrame {
public:
NS_DECL_FRAMEARENA_HELPERS
friend nsIFrame* NS_NewPageFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
friend nsPageFrame* NS_NewPageFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext);
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,

View File

@ -55,7 +55,7 @@ GetLayoutPrintingLog()
#define PR_PL(_p1)
#endif
nsIFrame*
nsSimplePageSequenceFrame*
NS_NewSimplePageSequenceFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) nsSimplePageSequenceFrame(aContext);

View File

@ -58,7 +58,8 @@ public:
class nsSimplePageSequenceFrame : public nsContainerFrame,
public nsIPageSequenceFrame {
public:
friend nsIFrame* NS_NewSimplePageSequenceFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
friend nsSimplePageSequenceFrame* NS_NewSimplePageSequenceFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext);
NS_DECL_QUERYFRAME
NS_DECL_FRAMEARENA_HELPERS

View File

@ -17,7 +17,7 @@
using namespace mozilla;
nsIFrame*
ViewportFrame*
NS_NewViewportFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) ViewportFrame(aContext);

View File

@ -24,11 +24,11 @@ nsIFrame* NS_NewMathMLmsupFrame(nsIPresShell* aPresShell, nsStyleContext* aConte
nsIFrame* NS_NewMathMLmsubsupFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame* NS_NewMathMLmunderoverFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame* NS_NewMathMLmmultiscriptsFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame* NS_NewMathMLmtableOuterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame* NS_NewMathMLmtableFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame* NS_NewMathMLmtrFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame* NS_NewMathMLmtdFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame* NS_NewMathMLmtdInnerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsContainerFrame* NS_NewMathMLmtableOuterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsContainerFrame* NS_NewMathMLmtableFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsContainerFrame* NS_NewMathMLmtrFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsContainerFrame* NS_NewMathMLmtdFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsContainerFrame* NS_NewMathMLmtdInnerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame* NS_NewMathMLmsqrtFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame* NS_NewMathMLmrootFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame* NS_NewMathMLmactionFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);

View File

@ -422,7 +422,7 @@ NS_QUERYFRAME_HEAD(nsMathMLmtableOuterFrame)
NS_QUERYFRAME_ENTRY(nsIMathMLFrame)
NS_QUERYFRAME_TAIL_INHERITING(nsTableOuterFrame)
nsIFrame*
nsContainerFrame*
NS_NewMathMLmtableOuterFrame (nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) nsMathMLmtableOuterFrame(aContext);
@ -647,7 +647,7 @@ nsMathMLmtableOuterFrame::Reflow(nsPresContext* aPresContext,
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
}
nsIFrame*
nsContainerFrame*
NS_NewMathMLmtableFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) nsMathMLmtableFrame(aContext);
@ -684,7 +684,7 @@ nsMathMLmtableFrame::RestyleTable()
// --------
// implementation of nsMathMLmtrFrame
nsIFrame*
nsContainerFrame*
NS_NewMathMLmtrFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) nsMathMLmtrFrame(aContext);
@ -730,7 +730,7 @@ nsMathMLmtrFrame::AttributeChanged(int32_t aNameSpaceID,
// --------
// implementation of nsMathMLmtdFrame
nsIFrame*
nsContainerFrame*
NS_NewMathMLmtdFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) nsMathMLmtdFrame(aContext);
@ -864,7 +864,7 @@ NS_QUERYFRAME_HEAD(nsMathMLmtdInnerFrame)
NS_QUERYFRAME_ENTRY(nsIMathMLFrame)
NS_QUERYFRAME_TAIL_INHERITING(nsBlockFrame)
nsIFrame*
nsContainerFrame*
NS_NewMathMLmtdInnerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) nsMathMLmtdInnerFrame(aContext);

View File

@ -21,7 +21,8 @@ class nsMathMLmtableOuterFrame : public nsTableOuterFrame,
public nsMathMLFrame
{
public:
friend nsIFrame* NS_NewMathMLmtableOuterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
friend nsContainerFrame* NS_NewMathMLmtableOuterFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext);
NS_DECL_QUERYFRAME
NS_DECL_FRAMEARENA_HELPERS
@ -63,7 +64,8 @@ class nsMathMLmtableFrame : public nsTableFrame
public:
NS_DECL_FRAMEARENA_HELPERS
friend nsIFrame* NS_NewMathMLmtableFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
friend nsContainerFrame* NS_NewMathMLmtableFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext);
// Overloaded nsTableFrame methods
@ -121,7 +123,8 @@ class nsMathMLmtrFrame : public nsTableRowFrame
public:
NS_DECL_FRAMEARENA_HELPERS
friend nsIFrame* NS_NewMathMLmtrFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
friend nsContainerFrame* NS_NewMathMLmtrFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext);
// overloaded nsTableRowFrame methods
@ -185,7 +188,8 @@ class nsMathMLmtdFrame : public nsTableCellFrame
public:
NS_DECL_FRAMEARENA_HELPERS
friend nsIFrame* NS_NewMathMLmtdFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
friend nsContainerFrame* NS_NewMathMLmtdFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext);
// overloaded nsTableCellFrame methods
@ -218,7 +222,7 @@ protected:
class nsMathMLmtdInnerFrame : public nsBlockFrame,
public nsMathMLFrame {
public:
friend nsIFrame* NS_NewMathMLmtdInnerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
friend nsContainerFrame* NS_NewMathMLmtdInnerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
NS_DECL_QUERYFRAME
NS_DECL_FRAMEARENA_HELPERS

View File

@ -27,7 +27,7 @@ using namespace mozilla::dom;
//----------------------------------------------------------------------
// Implementation
nsIFrame*
nsContainerFrame*
NS_NewSVGForeignObjectFrame(nsIPresShell *aPresShell,
nsStyleContext *aContext)
{

View File

@ -21,7 +21,7 @@ typedef nsContainerFrame nsSVGForeignObjectFrameBase;
class nsSVGForeignObjectFrame : public nsSVGForeignObjectFrameBase,
public nsISVGChildFrame
{
friend nsIFrame*
friend nsContainerFrame*
NS_NewSVGForeignObjectFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
protected:
nsSVGForeignObjectFrame(nsStyleContext* aContext);

View File

@ -17,7 +17,7 @@
using namespace mozilla::dom;
using namespace mozilla::gfx;
nsIFrame*
nsContainerFrame*
NS_NewSVGMarkerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) nsSVGMarkerFrame(aContext);
@ -244,7 +244,7 @@ nsSVGMarkerFrame::AutoMarkerReferencer::~AutoMarkerReferencer()
//----------------------------------------------------------------------
// Implementation of nsSVGMarkerAnonChildFrame
nsIFrame*
nsContainerFrame*
NS_NewSVGMarkerAnonChildFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext)
{

View File

@ -15,12 +15,7 @@
#include "nsSVGContainerFrame.h"
#include "nsSVGUtils.h"
class nsIAtom;
class nsIContent;
class nsIFrame;
class nsIPresShell;
class nsRenderingContext;
class nsStyleContext;
class nsSVGPathGeometryFrame;
namespace mozilla {
@ -36,7 +31,7 @@ typedef nsSVGContainerFrame nsSVGMarkerFrameBase;
class nsSVGMarkerFrame : public nsSVGMarkerFrameBase
{
friend class nsSVGMarkerAnonChildFrame;
friend nsIFrame*
friend nsContainerFrame*
NS_NewSVGMarkerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
protected:
nsSVGMarkerFrame(nsStyleContext* aContext)
@ -147,7 +142,7 @@ typedef nsSVGDisplayContainerFrame nsSVGMarkerAnonChildFrameBase;
class nsSVGMarkerAnonChildFrame
: public nsSVGMarkerAnonChildFrameBase
{
friend nsIFrame*
friend nsContainerFrame*
NS_NewSVGMarkerAnonChildFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext);

View File

@ -55,7 +55,7 @@ nsSVGOuterSVGFrame::UnregisterForeignObject(nsSVGForeignObjectFrame* aFrame)
//----------------------------------------------------------------------
// Implementation
nsIFrame*
nsContainerFrame*
NS_NewSVGOuterSVGFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) nsSVGOuterSVGFrame(aContext);
@ -901,7 +901,7 @@ nsSVGOuterSVGFrame::VerticalScrollbarNotNeeded() const
//----------------------------------------------------------------------
// Implementation of nsSVGOuterSVGAnonChildFrame
nsIFrame*
nsContainerFrame*
NS_NewSVGOuterSVGAnonChildFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext)
{

View File

@ -21,7 +21,7 @@ typedef nsSVGDisplayContainerFrame nsSVGOuterSVGFrameBase;
class nsSVGOuterSVGFrame : public nsSVGOuterSVGFrameBase,
public nsISVGSVGFrame
{
friend nsIFrame*
friend nsContainerFrame*
NS_NewSVGOuterSVGFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
protected:
nsSVGOuterSVGFrame(nsStyleContext* aContext);
@ -233,7 +233,7 @@ typedef nsSVGDisplayContainerFrame nsSVGOuterSVGAnonChildFrameBase;
class nsSVGOuterSVGAnonChildFrame
: public nsSVGOuterSVGAnonChildFrameBase
{
friend nsIFrame*
friend nsContainerFrame*
NS_NewSVGOuterSVGAnonChildFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext);

View File

@ -1047,7 +1047,7 @@ nsTableCellFrame::GetCellIndexes(int32_t &aRowIndex, int32_t &aColIndex)
return NS_OK;
}
nsIFrame*
nsTableCellFrame*
NS_NewTableCellFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext,
bool aIsBorderCollapse)

View File

@ -457,7 +457,7 @@ void nsTableColGroupFrame::GetContinuousBCBorderWidth(nsMargin& aBorder)
/* ----- global methods ----- */
nsIFrame*
nsTableColGroupFrame*
NS_NewTableColGroupFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) nsTableColGroupFrame(aContext);

View File

@ -37,7 +37,8 @@ public:
*
* @return the frame that was created
*/
friend nsIFrame* NS_NewTableColGroupFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
friend nsTableColGroupFrame* NS_NewTableColGroupFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext);
/** Initialize the colgroup frame with a set of children.
* @see nsIFrame::SetInitialChildList

View File

@ -3561,7 +3561,7 @@ nsTableFrame::GetBaseline() const
}
/* ----- global methods ----- */
nsIFrame*
nsTableFrame*
NS_NewTableFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) nsTableFrame(aContext);

View File

@ -122,7 +122,8 @@ public:
*
* @return the frame that was created
*/
friend nsIFrame* NS_NewTableFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
friend nsTableFrame* NS_NewTableFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext);
/** sets defaults for table-specific style.
* @see nsIFrame::Init

View File

@ -132,7 +132,7 @@ nsTableCaptionFrame::GetFrameName(nsAString& aResult) const
}
#endif
nsIFrame*
nsTableCaptionFrame*
NS_NewTableCaptionFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) nsTableCaptionFrame(aContext);
@ -1092,7 +1092,7 @@ nsTableOuterFrame::GetCellAt(uint32_t aRowIdx, uint32_t aColIdx) const
}
nsIFrame*
nsTableOuterFrame*
NS_NewTableOuterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) nsTableOuterFrame(aContext);

View File

@ -17,9 +17,10 @@ class nsTableCaptionFrame : public nsBlockFrame
public:
NS_DECL_FRAMEARENA_HELPERS
// nsISupports
friend nsTableCaptionFrame* NS_NewTableCaptionFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext);
// nsIFrame
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
friend nsIFrame* NS_NewTableCaptionFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
virtual nsSize ComputeAutoSize(nsRenderingContext *aRenderingContext,
nsSize aCBSize, nscoord aAvailableWidth,
@ -64,7 +65,8 @@ public:
*
* @return the frame that was created
*/
friend nsIFrame* NS_NewTableOuterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
friend nsTableOuterFrame* NS_NewTableOuterFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext);
// nsIFrame overrides - see there for a description

View File

@ -1435,7 +1435,7 @@ nsTableRowFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayI
/* ----- global methods ----- */
nsIFrame*
nsTableRowFrame*
NS_NewTableRowFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) nsTableRowFrame(aContext);

View File

@ -55,7 +55,8 @@ public:
*
* @return the frame that was created
*/
friend nsIFrame* NS_NewTableRowFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
friend nsTableRowFrame* NS_NewTableRowFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext);
virtual nsMargin GetUsedMargin() const MOZ_OVERRIDE;
virtual nsMargin GetUsedBorder() const MOZ_OVERRIDE;

View File

@ -1584,7 +1584,7 @@ nsTableRowGroupFrame::HasInternalBreakAfter() const
}
/* ----- global methods ----- */
nsIFrame*
nsTableRowGroupFrame*
NS_NewTableRowGroupFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) nsTableRowGroupFrame(aContext);

View File

@ -65,7 +65,8 @@ public:
*
* @return the frame that was created
*/
friend nsIFrame* NS_NewTableRowGroupFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
friend nsTableRowGroupFrame* NS_NewTableRowGroupFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext);
virtual ~nsTableRowGroupFrame();
virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;

View File

@ -64,7 +64,7 @@ private:
//----------------------------------------------------------------------
nsIFrame*
nsContainerFrame*
NS_NewDocElementBoxFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) nsDocElementBoxFrame (aPresShell, aContext);

View File

@ -105,7 +105,7 @@ protected:
//----------------------------------------------------------------------
nsIFrame*
nsContainerFrame*
NS_NewRootBoxFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) nsRootBoxFrame (aPresShell, aContext);