Bug 328926. Remove aPresContext from nsIFrame::Init and nsIFrame::DidSetStyleContext. r+sr=roc, patch by Marc Liddell

This commit is contained in:
roc+%cs.cmu.edu 2006-03-09 18:55:21 +00:00
Родитель 9fd87a8636
Коммит d0abdc1385
118 изменённых файлов: 353 добавлений и 471 удалений

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

@ -2045,8 +2045,7 @@ nsCSSFrameConstructor::CreateAttributeContent(nsIContent* aParentContent,
// Create a text frame and initialize it
nsIFrame* textFrame = NS_NewTextFrame(mPresShell);
rv = textFrame->Init(mPresShell->GetPresContext(), content, aParentFrame,
aStyleContext, nsnull);
rv = textFrame->Init(content, aParentFrame, aStyleContext, nsnull);
if (NS_FAILED(rv)) {
content->UnbindFromTree();
textFrame->Destroy(mPresShell->GetPresContext());
@ -2118,8 +2117,7 @@ nsCSSFrameConstructor::CreateGeneratedFrameFor(nsIFrame* aParentFram
return NS_ERROR_OUT_OF_MEMORY;
}
rv = imageFrame->Init(presContext, content, aParentFrame, aStyleContext,
nsnull);
rv = imageFrame->Init(content, aParentFrame, aStyleContext, nsnull);
if (NS_FAILED(rv)) {
imageFrame->Destroy(presContext);
return rv == NS_ERROR_FRAME_REPLACED ? NS_OK : rv;
@ -2293,8 +2291,7 @@ nsCSSFrameConstructor::CreateGeneratedFrameFor(nsIFrame* aParentFram
return NS_ERROR_OUT_OF_MEMORY;
}
textFrame->Init(presContext, textContent, aParentFrame, aStyleContext,
nsnull);
textFrame->Init(textContent, aParentFrame, aStyleContext, nsnull);
content = textContent;
} else {
@ -4767,8 +4764,7 @@ nsCSSFrameConstructor::ConstructRootFrame(nsIContent* aDocElement,
// XXXbz do we _have_ to pass a null content pointer to that frame?
// Would it really kill us to pass in the root element or something?
// What would that break?
viewportFrame->Init(presContext, nsnull, nsnull,
viewportPseudoStyle, nsnull);
viewportFrame->Init(nsnull, nsnull, viewportPseudoStyle, nsnull);
// Bind the viewport frame to the root view
nsIViewManager* viewManager = mPresShell->GetViewManager();
@ -4933,8 +4929,7 @@ nsCSSFrameConstructor::ConstructRootFrame(nsIContent* aDocElement,
}
rootFrame->Init(presContext, aDocElement, parentFrame,
rootPseudoStyle, nsnull);
rootFrame->Init(aDocElement, parentFrame, rootPseudoStyle, nsnull);
if (isScrollable) {
FinishBuildingScrollFrame(parentFrame, rootFrame);
@ -4982,7 +4977,7 @@ nsCSSFrameConstructor::ConstructPageFrame(nsIPresShell* aPresShell,
// Initialize the page frame and force it to have a view. This makes printing of
// the pages easier and faster.
aPageFrame->Init(aPresContext, nsnull, aParentFrame, pagePseudoStyle, aPrevPageFrame);
aPageFrame->Init(nsnull, aParentFrame, pagePseudoStyle, aPrevPageFrame);
// XXXbz should we be passing in a non-null aContentParentFrame?
nsresult rv = nsHTMLContainerFrame::CreateViewForFrame(aPageFrame, nsnull, PR_TRUE);
if (NS_FAILED(rv))
@ -4997,7 +4992,7 @@ nsCSSFrameConstructor::ConstructPageFrame(nsIPresShell* aPresShell,
// Initialize the page content frame and force it to have a view. Also make it the
// containing block for fixed elements which are repeated on every page.
aPageContentFrame->Init(aPresContext, nsnull, aPageFrame, pageContentPseudoStyle, nsnull);
aPageContentFrame->Init(nsnull, aPageFrame, pageContentPseudoStyle, nsnull);
// XXXbz should we be passing in a non-null aContentParentFrame?
nsHTMLContainerFrame::CreateViewForFrame(aPageContentFrame, nsnull, PR_TRUE);
if (NS_FAILED(rv))
@ -5030,8 +5025,7 @@ nsCSSFrameConstructor::CreatePlaceholderFrameFor(nsIPresShell* aPresShell,
nsStyleContext* parentContext = aStyleContext->GetParent();
placeholderStyle = aPresShell->StyleSet()->
ResolveStyleForNonElement(parentContext);
placeholderFrame->Init(aPresContext, aContent, aParentFrame,
placeholderStyle, nsnull);
placeholderFrame->Init(aContent, aParentFrame, placeholderStyle, nsnull);
// The placeholder frame has a pointer back to the out-of-flow frame
placeholderFrame->SetOutOfFlowFrame(aFrame);
@ -5381,8 +5375,7 @@ nsCSSFrameConstructor::InitializeSelectFrame(nsFrameConstructorState& aState,
// the scrollable view). So we have to split Init and Restore.
// Initialize the frame
scrollFrame->Init(aState.mPresContext, aContent, geometricParent,
aStyleContext, nsnull);
scrollFrame->Init(aContent, geometricParent, aStyleContext, nsnull);
if (!aBuildCombobox) {
nsresult rv = aState.AddChild(scrollFrame, aFrameItems, display,
@ -7175,8 +7168,7 @@ nsCSSFrameConstructor::InitAndRestoreFrame(const nsFrameConstructorState& aState
return NS_ERROR_NULL_POINTER;
// Initialize the frame
rv = aNewFrame->Init(aState.mPresContext, aContent, aParentFrame,
aStyleContext, aPrevInFlow);
rv = aNewFrame->Init(aContent, aParentFrame, aStyleContext, aPrevInFlow);
if (aState.mFrameState && aState.mFrameManager) {
// Restore frame state for just the newly created frame.
@ -10909,7 +10901,7 @@ nsCSSFrameConstructor::CreateContinuingOuterTableFrame(nsIPresShell* aPresShe
nsIFrame* newFrame = NS_NewTableOuterFrame(aPresShell);
if (newFrame) {
newFrame->Init(aPresContext, aContent, aParentFrame, aStyleContext, aFrame);
newFrame->Init(aContent, aParentFrame, aStyleContext, aFrame);
// XXXbz should we be passing in a non-null aContentParentFrame?
nsHTMLContainerFrame::CreateViewForFrame(newFrame, nsnull, PR_FALSE);
@ -10950,7 +10942,7 @@ nsCSSFrameConstructor::CreateContinuingTableFrame(nsIPresShell* aPresShell,
nsIFrame* newFrame = NS_NewTableFrame(aPresShell);
if (newFrame) {
newFrame->Init(aPresContext, aContent, aParentFrame, aStyleContext, aFrame);
newFrame->Init(aContent, aParentFrame, aStyleContext, aFrame);
// XXXbz should we be passing in a non-null aContentParentFrame?
nsHTMLContainerFrame::CreateViewForFrame(newFrame, nsnull, PR_FALSE);
@ -10979,8 +10971,7 @@ nsCSSFrameConstructor::CreateContinuingTableFrame(nsIPresShell* aPresShell,
headerFooterFrame = NS_NewTableRowGroupFrame(aPresShell);
nsIContent* headerFooter = rowGroupFrame->GetContent();
headerFooterFrame->Init(aPresContext, headerFooter, newFrame,
rowGroupStyle, nsnull);
headerFooterFrame->Init(headerFooter, newFrame, rowGroupStyle, nsnull);
nsTableCreator tableCreator(aPresShell);
ProcessChildren(state, headerFooter, headerFooterFrame,
PR_FALSE, childItems, PR_FALSE, &tableCreator);
@ -11035,7 +11026,7 @@ nsCSSFrameConstructor::CreateContinuingFrame(nsPresContext* aPresContext,
newFrame = NS_NewContinuingTextFrame(shell);
if (newFrame) {
newFrame->Init(aPresContext, content, aParentFrame, styleContext, aFrame);
newFrame->Init(content, aParentFrame, styleContext, aFrame);
// XXXbz should we be passing in a non-null aContentParentFrame?
nsHTMLContainerFrame::CreateViewForFrame(newFrame, nsnull, PR_FALSE);
}
@ -11044,7 +11035,7 @@ nsCSSFrameConstructor::CreateContinuingFrame(nsPresContext* aPresContext,
newFrame = NS_NewInlineFrame(shell);
if (newFrame) {
newFrame->Init(aPresContext, content, aParentFrame, styleContext, aFrame);
newFrame->Init(content, aParentFrame, styleContext, aFrame);
// XXXbz should we be passing in a non-null aContentParentFrame?
nsHTMLContainerFrame::CreateViewForFrame(newFrame, nsnull, PR_FALSE);
}
@ -11053,7 +11044,7 @@ nsCSSFrameConstructor::CreateContinuingFrame(nsPresContext* aPresContext,
newFrame = NS_NewBlockFrame(shell);
if (newFrame) {
newFrame->Init(aPresContext, content, aParentFrame, styleContext, aFrame);
newFrame->Init(content, aParentFrame, styleContext, aFrame);
// XXXbz should we be passing in a non-null aContentParentFrame?
nsHTMLContainerFrame::CreateViewForFrame(newFrame, nsnull, PR_FALSE);
}
@ -11062,8 +11053,7 @@ nsCSSFrameConstructor::CreateContinuingFrame(nsPresContext* aPresContext,
newFrame = NS_NewAreaFrame(shell, 0);
if (newFrame) {
newFrame->Init(aPresContext, content, aParentFrame, styleContext,
aFrame);
newFrame->Init(content, aParentFrame, styleContext, aFrame);
// XXXbz should we be passing in a non-null aContentParentFrame?
nsHTMLContainerFrame::CreateViewForFrame(newFrame, nsnull, PR_FALSE);
}
@ -11072,8 +11062,7 @@ nsCSSFrameConstructor::CreateContinuingFrame(nsPresContext* aPresContext,
newFrame = NS_NewColumnSetFrame(shell, 0);
if (newFrame) {
newFrame->Init(aPresContext, content, aParentFrame, styleContext,
aFrame);
newFrame->Init(content, aParentFrame, styleContext, aFrame);
// XXXbz should we be passing in a non-null aContentParentFrame?
nsHTMLContainerFrame::CreateViewForFrame(newFrame, nsnull, PR_FALSE);
}
@ -11082,7 +11071,7 @@ nsCSSFrameConstructor::CreateContinuingFrame(nsPresContext* aPresContext,
newFrame = NS_NewPositionedInlineFrame(shell);
if (newFrame) {
newFrame->Init(aPresContext, content, aParentFrame, styleContext, aFrame);
newFrame->Init(content, aParentFrame, styleContext, aFrame);
// XXXbz should we be passing in a non-null aContentParentFrame?
nsHTMLContainerFrame::CreateViewForFrame(newFrame, nsnull, PR_FALSE);
}
@ -11103,7 +11092,7 @@ nsCSSFrameConstructor::CreateContinuingFrame(nsPresContext* aPresContext,
newFrame = NS_NewTableRowGroupFrame(shell);
if (newFrame) {
newFrame->Init(aPresContext, content, aParentFrame, styleContext, aFrame);
newFrame->Init(content, aParentFrame, styleContext, aFrame);
// XXXbz should we be passing in a non-null aContentParentFrame?
nsHTMLContainerFrame::CreateViewForFrame(newFrame, nsnull, PR_FALSE);
}
@ -11112,7 +11101,7 @@ nsCSSFrameConstructor::CreateContinuingFrame(nsPresContext* aPresContext,
newFrame = NS_NewTableRowFrame(shell);
if (newFrame) {
newFrame->Init(aPresContext, content, aParentFrame, styleContext, aFrame);
newFrame->Init(content, aParentFrame, styleContext, aFrame);
// XXXbz should we be passing in a non-null aContentParentFrame?
nsHTMLContainerFrame::CreateViewForFrame(newFrame, nsnull, PR_FALSE);
@ -11138,7 +11127,7 @@ nsCSSFrameConstructor::CreateContinuingFrame(nsPresContext* aPresContext,
newFrame = NS_NewTableCellFrame(shell, IsBorderCollapse(aParentFrame));
if (newFrame) {
newFrame->Init(aPresContext, content, aParentFrame, styleContext, aFrame);
newFrame->Init(content, aParentFrame, styleContext, aFrame);
// XXXbz should we be passing in a non-null aContentParentFrame?
nsHTMLContainerFrame::CreateViewForFrame(newFrame, nsnull, PR_FALSE);
@ -11155,7 +11144,7 @@ nsCSSFrameConstructor::CreateContinuingFrame(nsPresContext* aPresContext,
newFrame = NS_NewFirstLineFrame(shell);
if (newFrame) {
newFrame->Init(aPresContext, content, aParentFrame, styleContext, aFrame);
newFrame->Init(content, aParentFrame, styleContext, aFrame);
// XXXbz should we be passing in a non-null aContentParentFrame?
nsHTMLContainerFrame::CreateViewForFrame(newFrame, nsnull, PR_FALSE);
}
@ -11164,7 +11153,7 @@ nsCSSFrameConstructor::CreateContinuingFrame(nsPresContext* aPresContext,
newFrame = NS_NewFirstLetterFrame(shell);
if (newFrame) {
newFrame->Init(aPresContext, content, aParentFrame, styleContext, aFrame);
newFrame->Init(content, aParentFrame, styleContext, aFrame);
// XXXbz should we be passing in a non-null aContentParentFrame?
nsHTMLContainerFrame::CreateViewForFrame(newFrame, nsnull, PR_FALSE);
}
@ -11173,7 +11162,7 @@ nsCSSFrameConstructor::CreateContinuingFrame(nsPresContext* aPresContext,
newFrame = NS_NewImageFrame(shell);
if (newFrame) {
newFrame->Init(aPresContext, content, aParentFrame, styleContext, aFrame);
newFrame->Init(content, aParentFrame, styleContext, aFrame);
}
} else if (nsLayoutAtoms::placeholderFrame == frameType) {
// create a continuing out of flow frame
@ -11188,13 +11177,12 @@ nsCSSFrameConstructor::CreateContinuingFrame(nsPresContext* aPresContext,
oofContFrame, styleContext, aParentFrame, &newFrame);
if (!newFrame)
return NS_ERROR_NULL_POINTER;
newFrame->Init(aPresContext, content, aParentFrame, styleContext, aFrame);
newFrame->Init(content, aParentFrame, styleContext, aFrame);
} else if (nsLayoutAtoms::fieldSetFrame == frameType) {
newFrame = NS_NewFieldSetFrame(shell);
if (newFrame) {
newFrame->Init(aPresContext, content, aParentFrame, styleContext,
aFrame);
newFrame->Init(content, aParentFrame, styleContext, aFrame);
// XXXbz should we be passing in a non-null aContentParentFrame?
nsHTMLContainerFrame::CreateViewForFrame(newFrame, nsnull, PR_FALSE);
@ -12325,7 +12313,7 @@ nsCSSFrameConstructor::CreateFloatingLetterFrame(
nsRefPtr<nsStyleContext> newSC;
newSC = styleSet->ResolveStyleForNonElement(parentStyleContext);
if (newSC) {
nextTextFrame->SetStyleContext(aState.mPresContext, newSC);
nextTextFrame->SetStyleContext(newSC);
}
}
}
@ -12388,8 +12376,7 @@ nsCSSFrameConstructor::CreateLetterFrame(nsFrameConstructorState& aState,
if (letterFrame) {
// Initialize the first-letter-frame.
letterFrame->Init(aState.mPresContext, aTextContent, aParentFrame,
sc, nsnull);
letterFrame->Init(aTextContent, aParentFrame, sc, nsnull);
nsRefPtr<nsStyleContext> textSC;
textSC = mPresShell->StyleSet()->ResolveStyleForNonElement(sc);
@ -12597,7 +12584,7 @@ nsCSSFrameConstructor::RemoveFloatingFirstLetterFrames(
if (NS_UNLIKELY(!newTextFrame)) {
return NS_ERROR_OUT_OF_MEMORY;;
}
newTextFrame->Init(aPresContext, textContent, parentFrame, newSC, nsnull);
newTextFrame->Init(textContent, parentFrame, newSC, nsnull);
// Destroy the old text frame's continuations (the old text frame
// will be destroyed when its letter frame is destroyed).
@ -12682,7 +12669,7 @@ nsCSSFrameConstructor::RemoveFirstLetterFrames(nsPresContext* aPresContext,
break;
}
textFrame = NS_NewTextFrame(aPresShell);
textFrame->Init(aPresContext, textContent, aFrame, newSC, nsnull);
textFrame->Init(textContent, aFrame, newSC, nsnull);
// Next rip out the kid and replace it with the text frame
::DeletingFrameSubtree(aPresContext, aFrameManager, kid);

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

@ -911,7 +911,7 @@ nsFrameManager::ReParentStyleContext(nsIFrame* aFrame,
nsIAtom* childList = nsnull;
nsIFrame* child;
aFrame->SetStyleContext(presContext, newContext);
aFrame->SetStyleContext(newContext);
do {
child = aFrame->GetFirstChild(childList);
@ -1099,7 +1099,7 @@ nsFrameManager::ReResolveStyleContext(nsPresContext *aPresContext,
assumeDifferenceHint);
if (!(aMinChange & nsChangeHint_ReconstructFrame)) {
// if frame gets regenerated, let it keep old context
aFrame->SetStyleContext(aPresContext, newContext);
aFrame->SetStyleContext(newContext);
}
// if old context had image and new context does not have the same image,
// stop the image load for the frame

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

@ -408,7 +408,7 @@ NS_IMETHODIMP nsComboboxControlFrame::GetAccessible(nsIAccessible** aAccessible)
NS_IMETHODIMP
nsComboboxControlFrame::Init(nsPresContext* aPresContext,
nsComboboxControlFrame::Init(
nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
@ -416,7 +416,7 @@ nsComboboxControlFrame::Init(nsPresContext* aPresContext,
{
mEventQueueService = do_GetService(kEventQueueServiceCID);
return nsAreaFrame::Init(aPresContext, aContent, aParent, aContext, aPrevInFlow);
return nsAreaFrame::Init(aContent, aParent, aContext, aPrevInFlow);
}
void
@ -1922,8 +1922,7 @@ nsComboboxControlFrame::CreateFrameFor(nsPresContext* aPresContext,
return NS_ERROR_OUT_OF_MEMORY;
}
nsresult rv = mDisplayFrame->Init(aPresContext, mContent, this, styleContext,
nsnull);
nsresult rv = mDisplayFrame->Init(mContent, this, styleContext, nsnull);
if (NS_FAILED(rv)) {
mDisplayFrame->Destroy(aPresContext);
mDisplayFrame = nsnull;
@ -1937,8 +1936,7 @@ nsComboboxControlFrame::CreateFrameFor(nsPresContext* aPresContext,
}
// initialize the text frame
rv = mTextFrame->Init(aPresContext, aContent, mDisplayFrame,
textStyleContext, nsnull);
rv = mTextFrame->Init(aContent, mDisplayFrame, textStyleContext, nsnull);
if (NS_FAILED(rv)) {
mDisplayFrame->Destroy(aPresContext);
mDisplayFrame = nsnull;

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

@ -107,7 +107,7 @@ public:
#endif
// nsIFrame
NS_IMETHOD Init(nsPresContext* aPresContext,
NS_IMETHOD Init(
nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,

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

@ -60,12 +60,11 @@ public:
virtual ~nsFileControlFrame();
// XXX Hack so we can squirrel away the pres context pointer
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow) {
return nsAreaFrame::Init(aPresContext, aContent, aParent, aContext, aPrevInFlow);
return nsAreaFrame::Init(aContent, aParent, aContext, aPrevInFlow);
}
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,

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

@ -155,7 +155,7 @@ nsGfxButtonControlFrame::CreateFrameFor(nsPresContext* aPresContext,
if (styleContext) {
// initialize the text frame
newFrame->Init(aPresContext, content, parentFrame, textStyleContext, nsnull);
newFrame->Init(content, parentFrame, textStyleContext, nsnull);
newFrame->SetInitialChildList(aPresContext, nsnull, nsnull);
rv = NS_OK;
}

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

@ -98,14 +98,14 @@ nsHTMLButtonControlFrame::Destroy(nsPresContext *aPresContext)
}
NS_IMETHODIMP
nsHTMLButtonControlFrame::Init(nsPresContext* aPresContext,
nsHTMLButtonControlFrame::Init(
nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult rv = nsHTMLContainerFrame::Init(aPresContext, aContent, aParent, aContext, aPrevInFlow);
mRenderer.SetFrame(this,aPresContext);
nsresult rv = nsHTMLContainerFrame::Init(aContent, aParent, aContext, aPrevInFlow);
mRenderer.SetFrame(this,GetPresContext());
return rv;
}

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

@ -83,8 +83,7 @@ public:
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus);
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* asPrevInFlow);

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

@ -61,12 +61,11 @@ public:
virtual ~nsIsIndexFrame();
// XXX Hack so we can squirrel away the pres context pointer for the KeyPress method
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow) {
return nsAreaFrame::Init(aPresContext, aContent, aParent, aContext, aPrevInFlow);
return nsAreaFrame::Init(aContent, aParent, aContext, aPrevInFlow);
}
/**

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

@ -1433,14 +1433,12 @@ nsListControlFrame::GetSizeAttribute(PRInt32 *aSize) {
//---------------------------------------------------------
NS_IMETHODIMP
nsListControlFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsListControlFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult result = nsHTMLScrollFrame::Init(aPresContext, aContent, aParent, aContext,
aPrevInFlow);
nsresult result = nsHTMLScrollFrame::Init(aContent, aParent, aContext, aPrevInFlow);
// get the receiver interface from the browser button's content node
nsCOMPtr<nsIDOMEventReceiver> receiver(do_QueryInterface(mContent));

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

@ -98,8 +98,7 @@ public:
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);

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

@ -120,14 +120,12 @@ nsAreaFrame::RegUnregAccessKey(nsPresContext* aPresContext,
#ifdef MOZ_XUL
NS_IMETHODIMP
nsAreaFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsAreaFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult rv = nsBlockFrame::Init(aPresContext,
aContent,
nsresult rv = nsBlockFrame::Init(aContent,
aParent,
aContext,
aPrevInFlow);
@ -135,7 +133,7 @@ nsAreaFrame::Init(nsPresContext* aPresContext,
return rv;
// register access key
return RegUnregAccessKey(aPresContext, PR_TRUE);
return RegUnregAccessKey(GetPresContext(), PR_TRUE);
}
NS_IMETHODIMP

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

@ -58,8 +58,7 @@ public:
// nsIFrame
#ifdef MOZ_XUL
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);

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

@ -6649,8 +6649,7 @@ nsBlockFrame::VerifyTree() const
//////////////////////////////////////////////////////////////////////
NS_IMETHODIMP
nsBlockFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsBlockFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
@ -6662,8 +6661,7 @@ nsBlockFrame::Init(nsPresContext* aPresContext,
SetFlags(blockFrame->mState & NS_BLOCK_FLAGS_MASK);
}
nsresult rv = nsBlockFrameSuper::Init(aPresContext, aContent, aParent,
aContext, aPrevInFlow);
nsresult rv = nsBlockFrameSuper::Init(aContent, aParent, aContext, aPrevInFlow);
if (IsBoxWrapped())
mState |= NS_BLOCK_SPACE_MGR;
@ -6735,7 +6733,7 @@ nsBlockFrame::SetInitialChildList(nsPresContext* aPresContext,
if (nsnull == bullet) {
return NS_ERROR_OUT_OF_MEMORY;
}
bullet->Init(aPresContext, mContent, this, kidSC, nsnull);
bullet->Init(mContent, this, kidSC, nsnull);
// If the list bullet frame should be positioned inside then add
// it to the flow now.

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

@ -137,8 +137,7 @@ public:
NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr);
// nsIFrame
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);

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

@ -124,7 +124,7 @@ nsBulletFrame::GetType() const
}
NS_IMETHODIMP
nsBulletFrame::DidSetStyleContext(nsPresContext* aPresContext)
nsBulletFrame::DidSetStyleContext()
{
imgIRequest *newRequest = GetStyleList()->mListStyleImage;

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

@ -59,7 +59,7 @@ public:
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
virtual nsIAtom* GetType() const;
NS_IMETHOD DidSetStyleContext(nsPresContext* aPresContext);
NS_IMETHOD DidSetStyleContext();
#ifdef NS_DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const;
#endif

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

@ -78,14 +78,13 @@ nsContainerFrame::~nsContainerFrame()
}
NS_IMETHODIMP
nsContainerFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsContainerFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult rv;
rv = nsSplittableFrame::Init(aPresContext, aContent, aParent, aContext, aPrevInFlow);
rv = nsSplittableFrame::Init(aContent, aParent, aContext, aPrevInFlow);
if (aPrevInFlow) {
// Make sure we copy bits from our prev-in-flow that will affect
// us. A continuation for a container frame needs to know if it

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

@ -54,8 +54,7 @@ class nsContainerFrame : public nsSplittableFrame
{
public:
// nsIFrame overrides
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);

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

@ -52,8 +52,7 @@ class nsFirstLetterFrame : public nsFirstLetterFrameSuper {
public:
nsFirstLetterFrame();
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);
@ -116,13 +115,11 @@ nsFirstLetterFrame::GetSkipSides() const
}
NS_IMETHODIMP
nsFirstLetterFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsFirstLetterFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult rv;
nsRefPtr<nsStyleContext> newSC;
if (aPrevInFlow) {
// Get proper style context for ourselves. We're creating the frame
@ -130,15 +127,14 @@ nsFirstLetterFrame::Init(nsPresContext* aPresContext,
// a style context like we would for a text node.
nsStyleContext* parentStyleContext = aContext->GetParent();
if (parentStyleContext) {
newSC = aPresContext->StyleSet()->
newSC = aContext->GetRuleNode()->GetPresContext()->StyleSet()->
ResolveStyleForNonElement(parentStyleContext);
if (newSC)
aContext = newSC;
}
}
rv = nsFirstLetterFrameSuper::Init(aPresContext, aContent, aParent,
aContext, aPrevInFlow);
return rv;
return nsFirstLetterFrameSuper::Init(aContent, aParent, aContext, aPrevInFlow);
}
NS_IMETHODIMP
@ -340,7 +336,7 @@ nsFirstLetterFrame::DrainOverflowFrames(nsPresContext* aPresContext)
"should contain only text nodes");
sc = aPresContext->StyleSet()->ResolveStyleForNonElement(mStyleContext);
if (sc) {
kid->SetStyleContext(aPresContext, sc);
kid->SetStyleContext(sc);
}
}
}

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

@ -538,8 +538,7 @@ nsrefcnt nsFrame::Release(void)
// nsIFrame
NS_IMETHODIMP
nsFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
@ -570,7 +569,7 @@ nsFrame::Init(nsPresContext* aPresContext,
mState |= state & (NS_FRAME_INDEPENDENT_SELECTION |
NS_FRAME_GENERATED_CONTENT);
}
SetStyleContext(aPresContext, aContext);
SetStyleContext(aContext);
if (IsBoxWrapped())
InitBoxMetrics(PR_FALSE);
@ -672,7 +671,7 @@ nsFrame::GetOffsets(PRInt32 &aStart, PRInt32 &aEnd) const
}
// Subclass hook for style post processing
NS_IMETHODIMP nsFrame::DidSetStyleContext(nsPresContext* aPresContext)
NS_IMETHODIMP nsFrame::DidSetStyleContext()
{
return NS_OK;
}

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

@ -161,8 +161,7 @@ public:
NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr);
// nsIFrame
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* asPrevInFlow);
@ -486,7 +485,7 @@ protected:
NS_IMETHOD GetFrameFromDirection(nsPresContext* aPresContext, nsPeekOffsetStruct *aPos);
// Style post processing hook
NS_IMETHOD DidSetStyleContext(nsPresContext* aPresContext);
NS_IMETHOD DidSetStyleContext();
//return the line number of the aFrame
static PRInt32 GetLineNumber(nsIFrame *aFrame);

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

@ -116,8 +116,7 @@ public:
virtual nsIAtom* GetType() const;
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);
@ -210,8 +209,7 @@ nsSubDocumentFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr)
}
NS_IMETHODIMP
nsSubDocumentFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsSubDocumentFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
@ -222,10 +220,11 @@ nsSubDocumentFrame::Init(nsPresContext* aPresContext,
mIsInline = frameElem ? PR_FALSE : PR_TRUE;
}
nsresult rv = nsLeafFrame::Init(aPresContext, aContent, aParent,
aContext, aPrevInFlow);
nsresult rv = nsLeafFrame::Init(aContent, aParent, aContext, aPrevInFlow);
if (NS_FAILED(rv))
return rv;
nsPresContext *aPresContext = GetPresContext();
// We are going to create an inner view. If we need a view for the
// OuterFrame but we wait for the normal view creation path in

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

@ -298,14 +298,12 @@ nsHTMLFramesetFrame::FrameResizePrefCallback(const char* aPref, void* aClosure)
#define BLANK 2
NS_IMETHODIMP
nsHTMLFramesetFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsHTMLFramesetFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsHTMLContainerFrame::Init(aPresContext, aContent, aParent,
aContext, aPrevInFlow);
nsHTMLContainerFrame::Init(aContent, aParent, aContext, aPrevInFlow);
// find the highest ancestor that is a frameset
nsresult rv = NS_OK;
nsIFrame* parentFrame = GetParent();
@ -321,6 +319,8 @@ nsHTMLFramesetFrame::Init(nsPresContext* aPresContext,
break;
}
}
nsPresContext* aPresContext = GetPresContext();
// create the view. a view is needed since it needs to be a mouse grabber
nsIViewManager* viewMan = aPresContext->GetViewManager();
@ -410,7 +410,7 @@ nsHTMLFramesetFrame::Init(nsPresContext* aPresContext,
childFrame->SetParentFrameborder(frameborder);
childFrame->SetParentBorderWidth(borderWidth);
childFrame->SetParentBorderColor(borderColor);
result = frame->Init(aPresContext, child, this, kidSC, nsnull);
result = frame->Init(child, this, kidSC, nsnull);
if (NS_FAILED(result)) {
frame->Destroy(aPresContext);
return result;
@ -422,7 +422,7 @@ nsHTMLFramesetFrame::Init(nsPresContext* aPresContext,
if (NS_UNLIKELY(!frame))
return NS_ERROR_OUT_OF_MEMORY;
result = frame->Init(aPresContext, child, this, kidSC, nsnull);
result = frame->Init(child, this, kidSC, nsnull);
if (NS_FAILED(result)) {
frame->Destroy(aPresContext);
return result;
@ -465,7 +465,7 @@ nsHTMLFramesetFrame::Init(nsPresContext* aPresContext,
return NS_ERROR_OUT_OF_MEMORY;
}
result = blankFrame->Init(aPresContext, mContent, this, pseudoStyleContext, nsnull);
result = blankFrame->Init(mContent, this, pseudoStyleContext, nsnull);
if (NS_FAILED(result)) {
blankFrame->Destroy(aPresContext);
return result;
@ -1061,7 +1061,7 @@ nsHTMLFramesetFrame::Reflow(nsPresContext* aPresContext,
pseudoStyleContext = styleSet->ResolvePseudoStyleFor(mContent,
nsCSSPseudoElements::horizontalFramesetBorder,
mStyleContext);
borderFrame->Init(aPresContext, mContent, this, pseudoStyleContext, nsnull);
borderFrame->Init(mContent, this, pseudoStyleContext, nsnull);
mChildCount++;
lastChild->SetNextSibling(borderFrame);
@ -1090,7 +1090,7 @@ nsHTMLFramesetFrame::Reflow(nsPresContext* aPresContext,
pseudoStyleContext = styleSet->ResolvePseudoStyleFor(mContent,
nsCSSPseudoElements::verticalFramesetBorder,
mStyleContext);
borderFrame->Init(aPresContext, mContent, this, pseudoStyleContext, nsnull);
borderFrame->Init(mContent, this, pseudoStyleContext, nsnull);
mChildCount++;
lastChild->SetNextSibling(borderFrame);

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

@ -114,8 +114,7 @@ public:
NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr);
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);

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

@ -90,11 +90,10 @@ public:
// nsISupports
NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr);
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);
NS_IMETHOD Destroy(nsPresContext* aPresContext);
NS_IMETHOD AppendFrames(nsIAtom* aListName,
@ -184,15 +183,14 @@ CanvasFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr)
}
NS_IMETHODIMP
CanvasFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
CanvasFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult rv = nsHTMLContainerFrame::Init(aPresContext,aContent,aParent,aContext,aPrevInFlow);
nsresult rv = nsHTMLContainerFrame::Init(aContent, aParent, aContext, aPrevInFlow);
mViewManager = aPresContext->GetViewManager();
mViewManager = GetPresContext()->GetViewManager();
nsIScrollableView* scrollingView = nsnull;
mViewManager->GetRootScrollableView(&scrollingView);

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

@ -418,8 +418,7 @@ public:
* @param aPrevInFlow the prev-in-flow frame
* @see #AppendToFlow()
*/
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow) = 0;
@ -548,7 +547,7 @@ public:
*
*/
nsStyleContext* GetStyleContext() const { return mStyleContext; }
void SetStyleContext(nsPresContext* aPresContext, nsStyleContext* aContext)
void SetStyleContext(nsStyleContext* aContext)
{
if (aContext != mStyleContext) {
if (mStyleContext)
@ -556,13 +555,13 @@ public:
mStyleContext = aContext;
if (aContext) {
aContext->AddRef();
DidSetStyleContext(aPresContext);
DidSetStyleContext();
}
}
}
// Style post processing hook
NS_IMETHOD DidSetStyleContext(nsPresContext* aPresContext) = 0;
NS_IMETHOD DidSetStyleContext() = 0;
/**
* Get the style data associated with this frame. This returns a

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

@ -265,14 +265,12 @@ nsImageFrame::Destroy(nsPresContext* aPresContext)
NS_IMETHODIMP
nsImageFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsImageFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult rv = nsSplittableFrame::Init(aPresContext, aContent, aParent,
aContext, aPrevInFlow);
nsresult rv = nsSplittableFrame::Init(aContent, aParent, aContext, aPrevInFlow);
NS_ENSURE_SUCCESS(rv, rv);
mListener = new nsImageListener(this);
@ -282,6 +280,8 @@ nsImageFrame::Init(nsPresContext* aPresContext,
NS_ENSURE_TRUE(imageLoader, NS_ERROR_UNEXPECTED);
imageLoader->AddObserver(mListener);
nsPresContext *aPresContext = GetPresContext();
if (!gIconLoad)
LoadIcons(aPresContext);

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

@ -90,8 +90,7 @@ public:
NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr);
NS_IMETHOD Destroy(nsPresContext* aPresContext);
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);

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

@ -990,7 +990,7 @@ nsFirstLineFrame::Reflow(nsPresContext* aPresContext,
nsCSSAnonBoxes::mozLineFrame, parentContext);
if (newSC) {
// Switch to the new style context.
SetStyleContext(aPresContext, newSC);
SetStyleContext(newSC);
// Re-resolve all children
ReParentChildListStyle(aPresContext, mStyleContext, mFrames);

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

@ -464,8 +464,7 @@ static NS_DEFINE_CID(kCPluginManagerCID, NS_PLUGINMANAGER_CID);
// #define DO_DIRTY_INTERSECT 1 // enable dirty rect intersection during paint
NS_IMETHODIMP
nsObjectFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsObjectFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
@ -474,8 +473,7 @@ nsObjectFrame::Init(nsPresContext* aPresContext,
mInstantiating = PR_FALSE;
#endif
nsresult rv = nsObjectFrameSuper::Init(aPresContext, aContent, aParent,
aContext, aPrevInFlow);
nsresult rv = nsObjectFrameSuper::Init(aContent, aParent, aContext, aPrevInFlow);
nsCOMPtr<nsIObjectLoadingContent> objContent(do_QueryInterface(mContent));
NS_ASSERTION(objContent, "Why not an object loading content?");
objContent->HasNewFrame(this);

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

@ -56,8 +56,7 @@ public:
// nsISupports
NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr);
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);

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

@ -40,15 +40,14 @@
#include "nsStyleContext.h"
NS_IMETHODIMP
nsSplittableFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsSplittableFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult rv;
rv = nsFrame::Init(aPresContext, aContent, aParent, aContext, aPrevInFlow);
rv = nsFrame::Init(aContent, aParent, aContext, aPrevInFlow);
if (aPrevInFlow) {
// Hook the frame into the flow

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

@ -43,8 +43,7 @@
class nsSplittableFrame : public nsFrame
{
public:
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);

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

@ -1400,8 +1400,7 @@ nsTextFrame::Destroy(nsPresContext* aPresContext)
class nsContinuingTextFrame : public nsTextFrame {
public:
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);
@ -1441,15 +1440,14 @@ protected:
};
NS_IMETHODIMP
nsContinuingTextFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsContinuingTextFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult rv;
rv = nsTextFrame::Init(aPresContext, aContent, aParent, aContext, aPrevInFlow);
rv = nsTextFrame::Init(aContent, aParent, aContext, aPrevInFlow);
if (aPrevInFlow) {
nsIFrame* nextContinuation = aPrevInFlow->GetNextContinuation();
@ -1461,7 +1459,7 @@ nsContinuingTextFrame::Init(nsPresContext* aPresContext,
PRInt32 start, end;
aPrevInFlow->GetOffsets(start, mContentOffset);
nsPropertyTable *propTable = aPresContext->PropertyTable();
nsPropertyTable *propTable = GetPresContext()->PropertyTable();
propTable->SetProperty(this, nsLayoutAtoms::embeddingLevel,
propTable->GetProperty(aPrevInFlow, nsLayoutAtoms::embeddingLevel),
nsnull, nsnull);

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

@ -293,7 +293,7 @@ TestReflowUnmapped(nsPresContext* presContext)
nsRefPtr<nsStyleContext> styleContext;
styleContext = presContext->StyleSet()->ResolveStyleFor(b, nsnull);
f->SetStyleContext(presContext,styleContext);
f->SetStyleContext(styleContext);
// Reflow the HTML container
nsReflowMetrics reflowMetrics;
@ -387,7 +387,7 @@ TestChildrenThatDontFit(nsPresContext* presContext)
nsRefPtr<nsStyleContext> styleContext;
styleContext = presContext->StyleSet()->ResolveStyleFor(b, nsnull);
f->SetStyleContext(presContext,styleContext);
f->SetStyleContext(styleContext);
///////////////////////////////////////////////////////////////////////////
// Test #1a
@ -421,7 +421,7 @@ TestChildrenThatDontFit(nsPresContext* presContext)
// Create a new inline frame for the HTML container
InlineFrame* f1 = new InlineFrame(b, 0, nsnull);
f1->SetStyleContext(presContext,styleContext);
f1->SetStyleContext(styleContext);
// Reflow the frame with a width narrower than the first child frame. This
// tests how we handle children that don't fit when reflowing unmapped
@ -560,7 +560,7 @@ TestOverflow(nsPresContext* presContext)
nsRefPtr<nsStyleContext> styleContext;
styleContext = presContext->StyleSet()->ResolveStyleFor(b, nsnull);
f->SetStyleContext(presContext,styleContext);
f->SetStyleContext(styleContext);
///////////////////////////////////////////////////////////////////////////
// Test #1
@ -673,7 +673,7 @@ TestPushingPulling(nsPresContext* presContext)
nsRefPtr<nsStyleContext> styleContext;
styleContext = presContext->StyleSet()->ResolveStyleFor(b, nsnull);
f->SetStyleContext(presContext,styleContext);
f->SetStyleContext(styleContext);
// Reflow the inline frame so only the first frame fits
nsReflowMetrics reflowMetrics;
@ -1095,7 +1095,7 @@ TestSplittableChildren(nsPresContext* presContext)
nsRefPtr<nsStyleContext> styleContext;
styleContext = presContext->StyleSet()->ResolveStyleFor(b, nsnull);
f->SetStyleContext(presContext,styleContext);
f->SetStyleContext(styleContext);
///////////////////////////////////////////////////////////////////////////
// Test #1
@ -1455,7 +1455,7 @@ TestMaxElementSize(nsPresContext* presContext)
nsRefPtr<nsStyleContext> styleContext;
styleContext = presContext->StyleSet()->ResolveStyleFor(b, nsnull);
f->SetStyleContext(presContext,styleContext);
f->SetStyleContext(styleContext);
///////////////////////////////////////////////////////////////////////////
// Test #1

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

@ -749,16 +749,15 @@ nsMathMLContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// This method is called in a top-down manner, as we descend the frame tree
// during its construction
NS_IMETHODIMP
nsMathMLContainerFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsMathMLContainerFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
MapAttributesIntoCSS(aPresContext, aContent);
MapAttributesIntoCSS(aContext->GetRuleNode()->GetPresContext(), aContent);
// let the base class do its Init()
return nsHTMLContainerFrame::Init(aPresContext, aContent, aParent, aContext, aPrevInFlow);
return nsHTMLContainerFrame::Init(aContent, aParent, aContext, aPrevInFlow);
// ...We will build our automatic MathML data once the entire <math>...</math>
// tree is constructed.

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

@ -119,8 +119,7 @@ public:
virtual PRBool IsFrameOfType(PRUint32 aFlags) const;
NS_IMETHOD
Init(nsPresContext* aPresContext,
nsIContent* aContent,
Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);
@ -381,10 +380,10 @@ protected:
virtual ~nsMathMLmathBlockFrame() {}
NS_IMETHOD
DidSetStyleContext(nsPresContext* aPresContext)
DidSetStyleContext()
{
mScriptStyleChanged = PR_TRUE;
return nsBlockFrame::DidSetStyleContext(aPresContext);
return nsBlockFrame::DidSetStyleContext();
}
PRBool mScriptStyleChanged;
@ -457,10 +456,10 @@ protected:
virtual ~nsMathMLmathInlineFrame() {}
NS_IMETHOD
DidSetStyleContext(nsPresContext* aPresContext)
DidSetStyleContext()
{
mScriptStyleChanged = PR_TRUE;
return nsInlineFrame::DidSetStyleContext(aPresContext);
return nsInlineFrame::DidSetStyleContext();
}
PRBool mScriptStyleChanged;

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

@ -66,13 +66,12 @@ NS_NewMathMLForeignFrameWrapper(nsIPresShell* aPresShell)
}
NS_IMETHODIMP
nsMathMLForeignFrameWrapper::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsMathMLForeignFrameWrapper::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
return nsBlockFrame::Init(aPresContext, aContent, aParent, aContext, aPrevInFlow);
return nsBlockFrame::Init(aContent, aParent, aContext, aPrevInFlow);
}
NS_IMETHODIMP

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

@ -77,8 +77,7 @@ public:
// overloaded nsBlockFrame methods
NS_IMETHOD
Init(nsPresContext* aPresContext,
nsIContent* aContent,
Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);

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

@ -102,8 +102,7 @@ CompressWhitespace(nsIContent* aContent)
}
NS_IMETHODIMP
nsMathMLTokenFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsMathMLTokenFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
@ -114,7 +113,7 @@ nsMathMLTokenFrame::Init(nsPresContext* aPresContext,
CompressWhitespace(aContent);
// let the base class do its Init()
return nsMathMLContainerFrame::Init(aPresContext, aContent, aParent, aContext, aPrevInFlow);
return nsMathMLContainerFrame::Init(aContent, aParent, aContext, aPrevInFlow);
}
NS_IMETHODIMP

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

@ -52,8 +52,7 @@ public:
virtual nsIAtom* GetType() const;
NS_IMETHOD
Init(nsPresContext* aPresContext,
nsIContent* aContent,
Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);

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

@ -96,8 +96,7 @@ nsMathMLmactionFrame::~nsMathMLmactionFrame()
}
NS_IMETHODIMP
nsMathMLmactionFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsMathMLmactionFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
@ -106,8 +105,6 @@ nsMathMLmactionFrame::Init(nsPresContext* aPresContext,
// Init our local attributes
mPresContext = aPresContext;
mWasRestyled = PR_FALSE;
mChildCount = -1; // these will be updated in GetSelectedFrame()
mSelection = 0;
@ -150,8 +147,8 @@ nsMathMLmactionFrame::Init(nsPresContext* aPresContext,
// then, re-resolve our style
nsStyleContext* parentStyleContext = aParent->GetStyleContext();
newStyleContext = aPresContext->StyleSet()->
ResolveStyleFor(aContent, parentStyleContext);
newStyleContext = aContext->GetRuleNode()->GetPresContext()->
StyleSet()->ResolveStyleFor(aContent, parentStyleContext);
if (!newStyleContext)
mRestyle.Truncate();
@ -166,7 +163,7 @@ nsMathMLmactionFrame::Init(nsPresContext* aPresContext,
}
// Let the base class do the rest
return nsMathMLContainerFrame::Init(aPresContext, aContent, aParent, aContext, aPrevInFlow);
return nsMathMLContainerFrame::Init(aContent, aParent, aContext, aPrevInFlow);
}
nsresult
@ -379,7 +376,7 @@ nsMathMLmactionFrame::MouseOver(nsIDOMEvent* aMouseEvent)
// expected statusline prefix (11ch)...
if (11 < value.Length() && 0 == value.Find("statusline#")) {
value.Cut(0, 11);
ShowStatus(mPresContext, value);
ShowStatus(GetPresContext(), value);
}
}
return NS_OK;
@ -392,7 +389,7 @@ nsMathMLmactionFrame::MouseOut(nsIDOMEvent* aMouseEvent)
if (NS_MATHML_ACTION_TYPE_STATUSLINE == mActionType) {
nsAutoString value;
value.SetLength(0);
ShowStatus(mPresContext, value);
ShowStatus(GetPresContext(), value);
}
return NS_OK;
}
@ -411,7 +408,7 @@ nsMathMLmactionFrame::MouseClick(nsIDOMEvent* aMouseEvent)
mContent->SetAttr(kNameSpaceID_None, nsMathMLAtoms::selection_, value, notify);
// Now trigger a content-changed reflow...
ReflowDirtyChild(mPresContext->PresShell(), mSelectedFrame);
ReflowDirtyChild(GetPresContext()->PresShell(), mSelectedFrame);
}
}
else if (NS_MATHML_ACTION_TYPE_RESTYLE == mActionType) {
@ -431,7 +428,7 @@ nsMathMLmactionFrame::MouseClick(nsIDOMEvent* aMouseEvent)
// Cancel the reflow command that the change of attribute has
// caused, and post a style changed reflow request that is instead
// targeted at our selected frame
nsIPresShell *presShell = mPresContext->PresShell();
nsIPresShell *presShell = GetPresContext()->PresShell();
presShell->CancelReflowCommand(this, nsnull);
presShell->AppendReflowCommand(mSelectedFrame,
eReflowType_StyleChanged,

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

@ -61,8 +61,7 @@ public:
NS_DECL_ISUPPORTS_INHERITED
NS_IMETHOD
Init(nsPresContext* aPresContext,
nsIContent* aContent,
Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);
@ -108,7 +107,6 @@ protected:
virtual PRIntn GetSkipSides() const { return 0; }
private:
nsPresContext* mPresContext;
PRInt32 mActionType;
PRInt32 mChildCount;
PRInt32 mSelection;

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

@ -98,19 +98,20 @@ nsMathMLmfracFrame::IsBevelled()
}
NS_IMETHODIMP
nsMathMLmfracFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsMathMLmfracFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult rv = nsMathMLContainerFrame::Init(aPresContext, aContent, aParent, aContext, aPrevInFlow);
nsresult rv = nsMathMLContainerFrame::Init(aContent, aParent, aContext, aPrevInFlow);
if (NS_FAILED(rv)) return rv;
if (IsBevelled()) {
// enable the bevelled rendering
mSlashChar = new nsMathMLChar();
if (mSlashChar) {
nsPresContext *aPresContext = GetPresContext();
nsAutoString slashChar; slashChar.Assign(kSlashChar);
mSlashChar->SetData(aPresContext, slashChar);
ResolveMathMLCharStyle(aPresContext, mContent, mStyleContext, mSlashChar, PR_TRUE);

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

@ -101,8 +101,7 @@ public:
PRInt32 aModType);
NS_IMETHOD
Init(nsPresContext* aPresContext,
nsIContent* aContent,
Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);

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

@ -85,14 +85,14 @@ nsMathMLmrootFrame::~nsMathMLmrootFrame()
}
NS_IMETHODIMP
nsMathMLmrootFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsMathMLmrootFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult rv = nsMathMLContainerFrame::Init(aPresContext, aContent, aParent,
aContext, aPrevInFlow);
nsresult rv = nsMathMLContainerFrame::Init(aContent, aParent, aContext, aPrevInFlow);
nsPresContext *aPresContext = GetPresContext();
// No need to tract the style context given to our MathML char.
// The Style System will use Get/SetAdditionalStyleContext() to keep it

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

@ -58,8 +58,7 @@ public:
GetAdditionalStyleContext(PRInt32 aIndex) const;
NS_IMETHOD
Init(nsPresContext* aPresContext,
nsIContent* aContent,
Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);

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

@ -85,14 +85,14 @@ nsMathMLmsqrtFrame::~nsMathMLmsqrtFrame()
}
NS_IMETHODIMP
nsMathMLmsqrtFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsMathMLmsqrtFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult rv = nsMathMLContainerFrame::Init(aPresContext, aContent, aParent,
aContext, aPrevInFlow);
nsresult rv = nsMathMLContainerFrame::Init(aContent, aParent, aContext, aPrevInFlow);
nsPresContext *aPresContext = GetPresContext();
// No need to tract the style context given to our MathML char.
// The Style System will use Get/SetAdditionalStyleContext() to keep it

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

@ -82,8 +82,7 @@ public:
GetAdditionalStyleContext(PRInt32 aIndex) const;
NS_IMETHOD
Init(nsPresContext* aPresContext,
nsIContent* aContent,
Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);

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

@ -396,15 +396,14 @@ nsMathMLmtableOuterFrame::InheritAutomaticData(nsIFrame* aParent)
}
NS_IMETHODIMP
nsMathMLmtableOuterFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsMathMLmtableOuterFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
MapAttributesIntoCSS(aPresContext, aContent);
MapAttributesIntoCSS(aContext->GetRuleNode()->GetPresContext(), aContent);
return nsTableOuterFrame::Init(aPresContext, aContent, aParent, aContext, aPrevInFlow);
return nsTableOuterFrame::Init(aContent, aParent, aContext, aPrevInFlow);
}
nsIFrame*
@ -656,13 +655,12 @@ nsMathMLmtdInnerFrame::~nsMathMLmtdInnerFrame()
}
NS_IMETHODIMP
nsMathMLmtdInnerFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsMathMLmtdInnerFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult rv = nsBlockFrame::Init(aPresContext, aContent, aParent, aContext, aPrevInFlow);
nsresult rv = nsBlockFrame::Init(aContent, aParent, aContext, aPrevInFlow);
// record that children that are ignorable whitespace should be excluded
mState |= NS_FRAME_EXCLUDE_IGNORABLE_WHITESPACE;

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

@ -80,8 +80,7 @@ public:
// overloaded nsTableOuterFrame methods
NS_IMETHOD
Init(nsPresContext* aPresContext,
nsIContent* aContent,
Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);
@ -158,8 +157,7 @@ public:
// overloaded nsBlockFrame methods
NS_IMETHOD
Init(nsPresContext* aPresContext,
nsIContent* aContent,
Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);

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

@ -79,15 +79,14 @@ NS_INTERFACE_MAP_END_INHERITING(nsSVGDefsFrameBase)
//----------------------------------------------------------------------
// nsIFrame methods
NS_IMETHODIMP
nsSVGDefsFrame::Init(nsPresContext* aPresContext,
nsSVGDefsFrame::Init(
nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult rv;
rv = nsSVGDefsFrameBase::Init(aPresContext, aContent, aParent,
aContext, aPrevInFlow);
rv = nsSVGDefsFrameBase::Init(aContent, aParent, aContext, aPrevInFlow);
InitSVG();

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

@ -70,8 +70,7 @@ public:
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);

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

@ -156,15 +156,14 @@ NS_INTERFACE_MAP_END_INHERITING(nsSVGForeignObjectFrameBase)
//----------------------------------------------------------------------
// nsIFrame methods
NS_IMETHODIMP
nsSVGForeignObjectFrame::Init(nsPresContext* aPresContext,
nsSVGForeignObjectFrame::Init(
nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult rv;
rv = nsSVGForeignObjectFrameBase::Init(aPresContext, aContent, aParent,
aContext, aPrevInFlow);
rv = nsSVGForeignObjectFrameBase::Init(aContent, aParent, aContext, aPrevInFlow);
Init();

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

@ -72,8 +72,7 @@ private:
NS_IMETHOD_(nsrefcnt) Release() { return NS_OK; }
public:
// nsIFrame:
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);

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

@ -79,15 +79,14 @@ NS_INTERFACE_MAP_END_INHERITING(nsSVGGenericContainerFrameBase)
//----------------------------------------------------------------------
// nsIFrame methods
NS_IMETHODIMP
nsSVGGenericContainerFrame::Init(nsPresContext* aPresContext,
nsSVGGenericContainerFrame::Init(
nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult rv;
rv = nsSVGGenericContainerFrameBase::Init(aPresContext, aContent, aParent,
aContext, aPrevInFlow);
rv = nsSVGGenericContainerFrameBase::Init(aContent, aParent, aContext, aPrevInFlow);
Init();

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

@ -76,8 +76,7 @@ public:
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);

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

@ -92,17 +92,15 @@ public:
// nsIFrame interface:
NS_IMETHOD
Init(nsPresContext* aPresContext,
nsIContent* aContent,
Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);
NS_IMETHOD CharacterDataChanged(nsPresContext* aPresContext,
nsIContent* aChild,
NS_IMETHOD CharacterDataChanged(nsIContent* aChild,
PRBool aAppend);
NS_IMETHOD DidSetStyleContext(nsPresContext* aPresContext);
NS_IMETHOD DidSetStyleContext();
NS_IMETHOD SetSelected(nsPresContext* aPresContext,
nsIDOMRange* aRange,
@ -267,8 +265,7 @@ NS_INTERFACE_MAP_END_INHERITING(nsSVGGlyphFrameBase)
// nsIFrame methods
NS_IMETHODIMP
nsSVGGlyphFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsSVGGlyphFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
@ -288,7 +285,7 @@ nsSVGGlyphFrame::Init(nsPresContext* aPresContext,
nsISVGOuterSVGFrame* outerSVGFrame = nsSVGUtils::GetOuterSVGFrame(this);
if (!outerSVGFrame) {
NS_ERROR("No outerSVGFrame");
SetStyleContext(aPresContext, aContext);
SetStyleContext(aContext);
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsISVGRenderer> renderer;
@ -298,7 +295,7 @@ nsSVGGlyphFrame::Init(nsPresContext* aPresContext,
renderer->CreateGlyphGeometry(this, getter_AddRefs(mGeometry));
}
SetStyleContext(aPresContext, aContext);
SetStyleContext(aContext);
if (!renderer || !mMetrics || !mGeometry)
return NS_ERROR_FAILURE;
@ -307,8 +304,7 @@ nsSVGGlyphFrame::Init(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsSVGGlyphFrame::CharacterDataChanged(nsPresContext* aPresContext,
nsIContent* aChild,
nsSVGGlyphFrame::CharacterDataChanged(nsIContent* aChild,
PRBool aAppend)
{
return Update(nsISVGGeometrySource::UPDATEMASK_ALL);
@ -336,7 +332,7 @@ nsSVGGlyphFrame::Update(PRUint32 aFlags)
}
NS_IMETHODIMP
nsSVGGlyphFrame::DidSetStyleContext(nsPresContext* aPresContext)
nsSVGGlyphFrame::DidSetStyleContext()
{
// One of the styles that might have been changed are the urls that
// point to gradients, etc. Drop our cached values to those
@ -357,7 +353,7 @@ nsSVGGlyphFrame::DidSetStyleContext(nsPresContext* aPresContext)
mStrokePattern = nsnull;
}
return CharacterDataChanged(aPresContext, nsnull, PR_FALSE);
return CharacterDataChanged(nsnull, PR_FALSE);
}
NS_IMETHODIMP

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

@ -118,7 +118,7 @@ public:
nsISVGValue::modificationType aModType);
// nsIFrame interface:
NS_IMETHOD DidSetStyleContext(nsPresContext* aPresContext);
NS_IMETHOD DidSetStyleContext();
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
@ -302,7 +302,7 @@ nsSVGGradientFrame::DidModifySVGObservable(nsISVGValue* observable,
// nsIFrame methods:
NS_IMETHODIMP
nsSVGGradientFrame::DidSetStyleContext(nsPresContext* aPresContext)
nsSVGGradientFrame::DidSetStyleContext()
{
WillModify();
DidModify();

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

@ -93,8 +93,7 @@ public:
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);
@ -248,15 +247,13 @@ NS_INTERFACE_MAP_END_INHERITING(nsSVGInnerSVGFrameBase)
// nsIFrame methods
NS_IMETHODIMP
nsSVGInnerSVGFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsSVGInnerSVGFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult rv;
rv = nsSVGInnerSVGFrameBase::Init(aPresContext, aContent, aParent,
aContext, aPrevInFlow);
rv = nsSVGInnerSVGFrameBase::Init(aContent, aParent, aContext, aPrevInFlow);
Init();

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

@ -169,8 +169,7 @@ private:
NS_IMETHOD_(nsrefcnt) Release() { return NS_OK; }
public:
// nsIFrame:
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);
@ -344,15 +343,13 @@ NS_INTERFACE_MAP_END_INHERITING(nsSVGOuterSVGFrameBase)
// nsIFrame methods
NS_IMETHODIMP
nsSVGOuterSVGFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsSVGOuterSVGFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult rv;
rv = nsSVGOuterSVGFrameBase::Init(aPresContext, aContent, aParent,
aContext, aPrevInFlow);
rv = nsSVGOuterSVGFrameBase::Init(aContent, aParent, aContext, aPrevInFlow);
Init();

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

@ -117,8 +117,7 @@ NS_INTERFACE_MAP_END_INHERITING(nsSVGPathGeometryFrameBase)
// nsIFrame methods
NS_IMETHODIMP
nsSVGPathGeometryFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsSVGPathGeometryFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
@ -133,7 +132,7 @@ nsSVGPathGeometryFrame::Init(nsPresContext* aPresContext,
InitSVG();
SetStyleContext(aPresContext, aContext);
SetStyleContext(aContext);
return NS_OK;
}
@ -151,7 +150,7 @@ nsSVGPathGeometryFrame::AttributeChanged(PRInt32 aNameSpaceID,
}
NS_IMETHODIMP
nsSVGPathGeometryFrame::DidSetStyleContext(nsPresContext* aPresContext)
nsSVGPathGeometryFrame::DidSetStyleContext()
{
// One of the styles that might have been changed are the urls that
// point to gradients, etc. Drop our cached values to those

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

@ -77,8 +77,7 @@ public:
// nsIFrame interface:
NS_IMETHOD
Init(nsPresContext* aPresContext,
nsIContent* aContent,
Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);
@ -87,7 +86,7 @@ public:
nsIAtom* aAttribute,
PRInt32 aModType);
NS_IMETHOD DidSetStyleContext(nsPresContext* aPresContext);
NS_IMETHOD DidSetStyleContext();
/**
* Get the "type" of the frame

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

@ -127,7 +127,7 @@ public:
nsISVGValue::modificationType aModType);
// nsIFrame interface:
NS_IMETHOD DidSetStyleContext(nsPresContext* aPresContext);
NS_IMETHOD DidSetStyleContext();
// nsISVGContainerFrame interface:
already_AddRefed<nsIDOMSVGMatrix> GetCanvasTM();
@ -263,7 +263,7 @@ nsSVGPatternFrame::DidModifySVGObservable(nsISVGValue* observable,
// nsIFrame methods:
NS_IMETHODIMP
nsSVGPatternFrame::DidSetStyleContext(nsPresContext* aPresContext)
nsSVGPatternFrame::DidSetStyleContext()
{
WillModify(mod_other);
DidModify(mod_other);

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

@ -77,8 +77,7 @@ class nsSVGStopFrame : public nsSVGStopFrameBase,
}
#endif
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);
@ -97,7 +96,7 @@ protected:
private:
// nsIFrame interface:
NS_IMETHOD DidSetStyleContext(nsPresContext* aPresContext);
NS_IMETHOD DidSetStyleContext();
nsCOMPtr<nsIDOMSVGAnimatedNumber> mOffset;
};
@ -117,14 +116,14 @@ NS_INTERFACE_MAP_END_INHERITING(nsSVGStopFrameBase)
// nsIFrame methods:
NS_IMETHODIMP
nsSVGStopFrame::DidSetStyleContext(nsPresContext* aPresContext)
nsSVGStopFrame::DidSetStyleContext()
{
#ifdef DEBUG_scooter
printf("nsSVGStopFrame::DidSetStyleContext\n");
#endif
// Tell our parent
if (mParent)
mParent->DidSetStyleContext(aPresContext);
mParent->DidSetStyleContext();
return NS_OK;
}
@ -141,15 +140,13 @@ nsSVGStopFrame::IsFrameOfType(PRUint32 aFlags) const
}
NS_IMETHODIMP
nsSVGStopFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsSVGStopFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult rv;
rv = nsSVGStopFrameBase::Init(aPresContext, aContent, aParent,
aContext, aPrevInFlow);
rv = nsSVGStopFrameBase::Init(aContent, aParent, aContext, aPrevInFlow);
nsCOMPtr<nsIDOMSVGStopElement> stop = do_QueryInterface(mContent);
{

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

@ -111,7 +111,7 @@ public:
nsIAtom* aAttribute,
PRInt32 aModType);
NS_IMETHOD DidSetStyleContext(nsPresContext* aPresContext);
NS_IMETHOD DidSetStyleContext();
/**
* Get the "type" of the frame
@ -299,7 +299,7 @@ nsSVGTextFrame::AttributeChanged(PRInt32 aNameSpaceID,
}
NS_IMETHODIMP
nsSVGTextFrame::DidSetStyleContext(nsPresContext* aPresContext)
nsSVGTextFrame::DidSetStyleContext()
{
#ifdef DEBUG
printf("** nsSVGTextFrame::DidSetStyleContext\n");

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

@ -63,8 +63,7 @@ class nsSVGTextPathFrame : public nsSVGTextPathFrameBase,
public:
// nsIFrame:
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);
@ -156,14 +155,12 @@ nsSVGTextPathFrame::~nsSVGTextPathFrame()
}
NS_IMETHODIMP
nsSVGTextPathFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsSVGTextPathFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsSVGTextPathFrameBase::Init(aPresContext, aContent, aParent,
aContext, aPrevInFlow);
nsSVGTextPathFrameBase::Init(aContent, aParent, aContext, aPrevInFlow);
nsCOMPtr<nsIDOMSVGTextPathElement> tpath = do_QueryInterface(mContent);

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

@ -107,8 +107,7 @@ nsTableCellFrame::GetNextCell() const
}
NS_IMETHODIMP
nsTableCellFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsTableCellFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
@ -116,8 +115,7 @@ nsTableCellFrame::Init(nsPresContext* aPresContext,
nsresult rv;
// Let the base class do its initialization
rv = nsHTMLContainerFrame::Init(aPresContext, aContent, aParent, aContext,
aPrevInFlow);
rv = nsHTMLContainerFrame::Init(aContent, aParent, aContext, aPrevInFlow);
if (aPrevInFlow) {
// Set the column index

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

@ -81,8 +81,7 @@ public:
nsTableCellFrame();
~nsTableCellFrame();
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);

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

@ -244,8 +244,7 @@ NS_NewTableColFrame(nsIPresShell* aPresShell)
}
NS_IMETHODIMP
nsTableColFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsTableColFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
@ -253,8 +252,7 @@ nsTableColFrame::Init(nsPresContext* aPresContext,
nsresult rv;
// Let the base class do its initialization
rv = nsFrame::Init(aPresContext, aContent, aParent, aContext,
aPrevInFlow);
rv = nsFrame::Init(aContent, aParent, aContext, aPrevInFlow);
// record that children that are ignorable whitespace should be excluded
mState |= NS_FRAME_EXCLUDE_IGNORABLE_WHITESPACE;

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

@ -102,8 +102,7 @@ public:
nsTableColFrame* GetNextCol() const;
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);

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

@ -564,8 +564,7 @@ NS_NewTableColGroupFrame(nsIPresShell* aPresShell)
}
NS_IMETHODIMP
nsTableColGroupFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsTableColGroupFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
@ -573,8 +572,7 @@ nsTableColGroupFrame::Init(nsPresContext* aPresContext,
nsresult rv;
// Let the base class do its processing
rv = nsHTMLContainerFrame::Init(aPresContext, aContent, aParent, aContext,
aPrevInFlow);
rv = nsHTMLContainerFrame::Init(aContent, aParent, aContext, aPrevInFlow);
// record that children that are ignorable whitespace should be excluded
mState |= NS_FRAME_EXCLUDE_IGNORABLE_WHITESPACE;

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

@ -72,8 +72,7 @@ public:
/** sets defaults for the colgroup.
* @see nsIFrame::Init
*/
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);

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

@ -246,8 +246,7 @@ nsresult nsTableFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr)
}
NS_IMETHODIMP
nsTableFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsTableFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
@ -255,8 +254,7 @@ nsTableFrame::Init(nsPresContext* aPresContext,
nsresult rv;
// Let the base class do its processing
rv = nsHTMLContainerFrame::Init(aPresContext, aContent, aParent, aContext,
aPrevInFlow);
rv = nsHTMLContainerFrame::Init(aContent, aParent, aContext, aPrevInFlow);
// record that children that are ignorable whitespace should be excluded
mState |= NS_FRAME_EXCLUDE_IGNORABLE_WHITESPACE;
@ -280,7 +278,7 @@ nsTableFrame::Init(nsPresContext* aPresContext,
// create the strategy
mTableLayoutStrategy = (IsAutoLayout()) ?
new BasicTableLayoutStrategy(this,
eCompatibility_NavQuirks == aPresContext->CompatibilityMode())
eCompatibility_NavQuirks == GetPresContext()->CompatibilityMode())
: new FixedTableLayoutStrategy(this);
}
@ -817,7 +815,7 @@ nsTableFrame::CreateAnonymousColGroupFrame(nsTableColGroupType aColGroupType)
nsIFrame* newFrame = NS_NewTableColGroupFrame(shell);
if (newFrame) {
((nsTableColGroupFrame *)newFrame)->SetColType(aColGroupType);
newFrame->Init(presContext, colGroupContent, this, colGroupStyle, nsnull);
newFrame->Init(colGroupContent, this, colGroupStyle, nsnull);
}
return (nsTableColGroupFrame *)newFrame;
}
@ -929,8 +927,7 @@ nsTableFrame::CreateAnonymousColFrames(nsTableColGroupFrame* aColGroupFrame,
// create the new col frame
nsIFrame* colFrame = NS_NewTableColFrame(shell);
((nsTableColFrame *) colFrame)->SetColType(aColType);
colFrame->Init(presContext, iContent, aColGroupFrame,
styleContext, nsnull);
colFrame->Init(iContent, aColGroupFrame, styleContext, nsnull);
colFrame->SetInitialChildList(presContext, nsnull, nsnull);
// Add the col to the sibling chain

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

@ -191,8 +191,7 @@ public:
/** sets defaults for table-specific style.
* @see nsIFrame::Init
*/
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);

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

@ -145,14 +145,13 @@ nsTableOuterFrame::IsContainingBlock() const
}
NS_IMETHODIMP
nsTableOuterFrame::Init(nsPresContext* aPresContext,
nsTableOuterFrame::Init(
nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult rv = nsHTMLContainerFrame::Init(aPresContext, aContent, aParent,
aContext, aPrevInFlow);
nsresult rv = nsHTMLContainerFrame::Init(aContent, aParent, aContext, aPrevInFlow);
if (NS_FAILED(rv) || !mStyleContext) return rv;
// record that children that are ignorable whitespace should be excluded

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

@ -87,8 +87,7 @@ public:
// nsIFrame overrides - see there for a description
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);

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

@ -183,8 +183,7 @@ nsTableRowFrame::~nsTableRowFrame()
}
NS_IMETHODIMP
nsTableRowFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsTableRowFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
@ -192,8 +191,7 @@ nsTableRowFrame::Init(nsPresContext* aPresContext,
nsresult rv;
// Let the base class do its initialization
rv = nsHTMLContainerFrame::Init(aPresContext, aContent, aParent, aContext,
aPrevInFlow);
rv = nsHTMLContainerFrame::Init(aContent, aParent, aContext, aPrevInFlow);
// record that children that are ignorable whitespace should be excluded
mState |= NS_FRAME_EXCLUDE_IGNORABLE_WHITESPACE;
@ -973,7 +971,7 @@ nsTableRowFrame::ReflowChildren(nsPresContext* aPresContext,
cellToWatch = PR_TRUE;
}
if (cellToWatch) {
cellFrame->DidSetStyleContext(aPresContext); // XXX check this
cellFrame->DidSetStyleContext(); // XXX check this
if (!tablePrevInFlow && isAutoLayout) {
// request the maximum width if availWidth is constrained
// XXX we could just do this always, but blocks have some problems

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

@ -69,8 +69,7 @@ class nsTableRowFrame : public nsHTMLContainerFrame
public:
virtual ~nsTableRowFrame();
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);

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

@ -1776,8 +1776,7 @@ NS_NewTableRowGroupFrame(nsIPresShell* aPresShell)
}
NS_IMETHODIMP
nsTableRowGroupFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsTableRowGroupFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
@ -1785,8 +1784,7 @@ nsTableRowGroupFrame::Init(nsPresContext* aPresContext,
nsresult rv;
// Let the base class do its processing
rv = nsHTMLContainerFrame::Init(aPresContext, aContent, aParent, aContext,
aPrevInFlow);
rv = nsHTMLContainerFrame::Init(aContent, aParent, aContext, aPrevInFlow);
// record that children that are ignorable whitespace should be excluded
mState |= NS_FRAME_EXCLUDE_IGNORABLE_WHITESPACE;

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

@ -114,8 +114,7 @@ public:
friend nsIFrame* NS_NewTableRowGroupFrame(nsIPresShell* aPresShell);
virtual ~nsTableRowGroupFrame();
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);

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

@ -202,13 +202,12 @@ nsBoxFrame::SetInitialChildList(nsPresContext* aPresContext,
* Initialize us. This is a good time to get the alignment of the box
*/
NS_IMETHODIMP
nsBoxFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsBoxFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult rv = nsContainerFrame::Init(aPresContext, aContent, aParent, aContext, aPrevInFlow);
nsresult rv = nsContainerFrame::Init(aContent, aParent, aContext, aPrevInFlow);
// see if we need a widget
if (aParent && aParent->IsBoxFrame()) {
@ -224,6 +223,8 @@ nsBoxFrame::Init(nsPresContext* aPresContext,
}
CacheAttributes();
nsPresContext *aPresContext = GetPresContext();
#ifdef DEBUG_LAYOUT
// if we are root and this

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

@ -123,8 +123,7 @@ public:
NS_IMETHOD ReflowDirtyChild(nsIPresShell* aPresShell, nsIFrame* aChild);
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* asPrevInFlow);

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

@ -107,15 +107,12 @@ nsDeckFrame::AttributeChanged(PRInt32 aNameSpaceID,
}
NS_IMETHODIMP
nsDeckFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsDeckFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aStyleContext,
nsIFrame* aPrevInFlow)
{
nsresult rv = nsBoxFrame::Init(aPresContext, aContent,
aParent, aStyleContext,
aPrevInFlow);
nsresult rv = nsBoxFrame::Init(aContent, aParent, aStyleContext, aPrevInFlow);
mIndex = GetSelectedIndex();

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

@ -69,8 +69,7 @@ public:
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);

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

@ -300,11 +300,10 @@ nsImageBoxFrame::Destroy(nsPresContext* aPresContext)
NS_IMETHODIMP
nsImageBoxFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
nsImageBoxFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
if (!mListener) {
nsImageBoxListener *listener;
@ -316,7 +315,7 @@ nsImageBoxFrame::Init(nsPresContext* aPresContext,
}
mSuppressStyleCheck = PR_TRUE;
nsresult rv = nsLeafBoxFrame::Init(aPresContext, aContent, aParent, aContext, aPrevInFlow);
nsresult rv = nsLeafBoxFrame::Init(aContent, aParent, aContext, aPrevInFlow);
mSuppressStyleCheck = PR_FALSE;
UpdateLoadFlags();
@ -492,7 +491,7 @@ nsImageBoxFrame::PaintImage(nsIRenderingContext& aRenderingContext,
// When the style context changes, make sure that all of our image is up to date.
//
NS_IMETHODIMP
nsImageBoxFrame::DidSetStyleContext( nsPresContext* aPresContext )
nsImageBoxFrame::DidSetStyleContext()
{
// Fetch our subrect.
const nsStyleList* myList = GetStyleList();

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

@ -76,8 +76,7 @@ public:
// nsIBox frame interface
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* asPrevInFlow);
@ -86,7 +85,7 @@ public:
nsIAtom* aAttribute,
PRInt32 aModType);
NS_IMETHOD DidSetStyleContext (nsPresContext* aPresContext);
NS_IMETHOD DidSetStyleContext ();
NS_IMETHOD Destroy(nsPresContext* aPresContext);

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

@ -92,13 +92,13 @@ nsLeafBoxFrame::GetBoxName(nsAutoString& aName)
* Initialize us. This is a good time to get the alignment of the box
*/
NS_IMETHODIMP
nsLeafBoxFrame::Init(nsPresContext* aPresContext,
nsLeafBoxFrame::Init(
nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult rv = nsLeafFrame::Init(aPresContext, aContent, aParent, aContext, aPrevInFlow);
nsresult rv = nsLeafFrame::Init(aContent, aParent, aContext, aPrevInFlow);
// see if we need a widget
if (aParent && aParent->IsBoxFrame()) {

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

@ -76,7 +76,7 @@ public:
const nsHTMLReflowState* aReflowState,
nsDidReflowStatus aStatus);
NS_IMETHOD Init(nsPresContext* aPresContext,
NS_IMETHOD Init(
nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,

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

@ -230,11 +230,15 @@ NS_INTERFACE_MAP_END_INHERITING(nsBoxFrame)
////////// nsIFrame /////////////////
NS_IMETHODIMP
nsListBoxBodyFrame::Init(nsPresContext* aPresContext, nsIContent* aContent,
nsIFrame* aParent, nsStyleContext* aContext, nsIFrame* aPrevInFlow)
nsListBoxBodyFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult rv = nsBoxFrame::Init(aPresContext, aContent, aParent, aContext, aPrevInFlow);
nsresult rv = nsBoxFrame::Init(aContent, aParent, aContext, aPrevInFlow);
nsPresContext *aPresContext = GetPresContext();
mOnePixel = aPresContext->IntScaledPixelsToTwips(1);
nsIScrollableFrame* scrollFrame = nsLayoutUtils::GetScrollableFrameFor(this);

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

@ -71,8 +71,10 @@ public:
nsIBoxLayout* aLayoutManager);
// nsIFrame
NS_IMETHOD Init(nsPresContext* aPresContext, nsIContent* aContent,
nsIFrame* aParent, nsStyleContext* aContext, nsIFrame* aPrevInFlow);
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);
NS_IMETHOD Destroy(nsPresContext* aPresContext);
NS_IMETHOD AttributeChanged(PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType);

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

@ -124,13 +124,12 @@ nsMenuBarFrame::~nsMenuBarFrame()
}
NS_IMETHODIMP
nsMenuBarFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsMenuBarFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult rv = nsBoxFrame::Init(aPresContext, aContent, aParent, aContext, aPrevInFlow);
nsresult rv = nsBoxFrame::Init(aContent, aParent, aContext, aPrevInFlow);
// Create the menu bar listener.
mMenuBarListener = new nsMenuBarListener(this);

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

@ -106,8 +106,7 @@ public:
NS_IMETHOD CreateDismissalListener();
NS_IMETHOD AttachedDismissalListener() { return NS_OK; }
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);

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

@ -171,13 +171,12 @@ nsMenuFrame::SetParent(const nsIFrame* aParent)
}
NS_IMETHODIMP
nsMenuFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
nsMenuFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult rv = nsBoxFrame::Init(aPresContext, aContent, aParent, aContext, aPrevInFlow);
nsresult rv = nsBoxFrame::Init(aContent, aParent, aContext, aPrevInFlow);
// Set up a mediator which can be used for callbacks on this frame.
mTimerMediator = new nsMenuTimerMediator(this);
@ -193,7 +192,7 @@ nsMenuFrame::Init(nsPresContext* aPresContext,
}
// Do the type="checkbox" magic
UpdateMenuType(aPresContext);
UpdateMenuType(GetPresContext());
//load the display strings for the keyboard accelerators, but only once
if (gRefCnt++ == 0) {

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

@ -106,8 +106,7 @@ public:
NS_IMETHOD GetMinSize(nsBoxLayoutState& aBoxLayoutState, nsSize& aSize);
NS_IMETHOD GetPrefSize(nsBoxLayoutState& aBoxLayoutState, nsSize& aSize);
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);

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

@ -154,13 +154,14 @@ nsMenuPopupFrame::nsMenuPopupFrame(nsIPresShell* aShell)
NS_IMETHODIMP
nsMenuPopupFrame::Init(nsPresContext* aPresContext,
nsIContent* aContent,
nsMenuPopupFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult rv = nsBoxFrame::Init(aPresContext, aContent, aParent, aContext, aPrevInFlow);
nsresult rv = nsBoxFrame::Init(aContent, aParent, aContext, aPrevInFlow);
nsPresContext *aPresContext = GetPresContext();
// lookup if we're allowed to overlap the OS bar (menubar/taskbar) from the
// look&feel object

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

@ -118,8 +118,7 @@ public:
NS_IMETHOD AttachedDismissalListener();
// Overridden methods
NS_IMETHOD Init(nsPresContext* aPresContext,
nsIContent* aContent,
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);

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

@ -90,17 +90,19 @@ nsNativeScrollbarFrame::~nsNativeScrollbarFrame ( )
// Pass along to our parent, but also create the native widget that we wrap.
//
NS_IMETHODIMP
nsNativeScrollbarFrame::Init(nsPresContext* aPresContext, nsIContent* aContent,
nsIFrame* aParent, nsStyleContext* aContext, nsIFrame* aPrevInFlow)
nsNativeScrollbarFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult rv = nsBoxFrame::Init(aPresContext, aContent, aParent, aContext, aPrevInFlow);
nsresult rv = nsBoxFrame::Init(aContent, aParent, aContext, aPrevInFlow);
// create a view for this frame and then associate the view with the native
// scrollbar widget. The net result of this is that the view will automatically
// be resized and moved for us when things reflow, and the widget will follow
// suit. We don't have to lift a finger!
static NS_DEFINE_IID(kScrollbarCID, NS_NATIVESCROLLBAR_CID);
if ( NS_SUCCEEDED(CreateViewForFrame(aPresContext, this, aContext, PR_TRUE)) ) {
if ( NS_SUCCEEDED(CreateViewForFrame(GetPresContext(), this, aContext, PR_TRUE)) ) {
nsIView* myView = GetView();
if ( myView ) {
nsWidgetInitData widgetData;

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

@ -71,8 +71,10 @@ public:
}
#endif
NS_IMETHOD Init(nsPresContext* aPresContext, nsIContent* aContent,
nsIFrame* aParent, nsStyleContext* aContext, nsIFrame* aPrevInFlow);
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);
// nsIFrame overrides
NS_IMETHOD AttributeChanged(PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType);

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше