From 89346249828d1a668a54b98a6502a950f0cdfd78 Mon Sep 17 00:00:00 2001 From: "troy%netscape.com" Date: Wed, 10 Feb 1999 00:42:56 +0000 Subject: [PATCH] Changed some nsIFrame member functions to use ** instead of *& for OUT paremeters git-svn-id: svn://10.0.0.236/trunk@20199 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/base/src/nsStyleContext.cpp | 2 +- mozilla/content/events/src/nsDOMEvent.cpp | 2 +- .../events/src/nsEventStateManager.cpp | 12 +++--- mozilla/layout/base/nsCSSFrameConstructor.cpp | 42 +++++++++---------- mozilla/layout/base/nsPresContext.cpp | 2 +- mozilla/layout/base/nsPresShell.cpp | 6 +-- mozilla/layout/base/public/nsIFrame.h | 4 +- mozilla/layout/base/src/nsPresContext.cpp | 2 +- mozilla/layout/base/src/nsRangeList.cpp | 16 +++---- mozilla/layout/base/src/nsStyleContext.cpp | 2 +- mozilla/layout/events/src/nsDOMEvent.cpp | 2 +- .../layout/events/src/nsEventStateManager.cpp | 12 +++--- .../layout/forms/nsComboboxControlFrame.cpp | 6 ++- mozilla/layout/forms/nsFieldSetFrame.cpp | 2 +- mozilla/layout/forms/nsFileControlFrame.cpp | 7 +++- mozilla/layout/forms/nsFormControlFrame.cpp | 7 +++- .../layout/forms/nsHTMLButtonControlFrame.cpp | 9 +++- mozilla/layout/forms/nsImageControlFrame.cpp | 9 +++- mozilla/layout/forms/nsListControlFrame.cpp | 23 ++++++---- mozilla/layout/forms/nsTextControlFrame.cpp | 2 +- mozilla/layout/generic/nsBlockFrame.cpp | 10 ++--- mozilla/layout/generic/nsBlockReflowState.cpp | 10 ++--- mozilla/layout/generic/nsBlockReflowState.h | 10 ++--- mozilla/layout/generic/nsBulletFrame.cpp | 2 +- mozilla/layout/generic/nsFrame.cpp | 16 +++---- mozilla/layout/generic/nsFrame.h | 4 +- mozilla/layout/generic/nsFrameFrame.cpp | 6 ++- mozilla/layout/generic/nsFrameSetFrame.cpp | 6 +-- .../layout/generic/nsHTMLContainerFrame.cpp | 10 ++--- mozilla/layout/generic/nsHTMLReflowState.cpp | 4 +- mozilla/layout/generic/nsIFrame.h | 4 +- mozilla/layout/generic/nsImageFrame.cpp | 2 +- mozilla/layout/generic/nsObjectFrame.cpp | 8 ++-- mozilla/layout/generic/nsPageFrame.cpp | 2 +- .../layout/generic/nsSimplePageSequence.cpp | 2 +- mozilla/layout/generic/nsTextFrame.cpp | 6 +-- mozilla/layout/generic/nsTextTransformer.cpp | 2 +- mozilla/layout/html/base/src/nsBlockFrame.cpp | 10 ++--- .../html/base/src/nsBlockReflowState.cpp | 10 ++--- .../layout/html/base/src/nsBlockReflowState.h | 10 ++--- .../layout/html/base/src/nsBulletFrame.cpp | 2 +- mozilla/layout/html/base/src/nsFrame.cpp | 16 +++---- mozilla/layout/html/base/src/nsFrame.h | 4 +- .../html/base/src/nsHTMLContainerFrame.cpp | 10 ++--- .../html/base/src/nsHTMLReflowState.cpp | 4 +- mozilla/layout/html/base/src/nsImageFrame.cpp | 2 +- .../layout/html/base/src/nsObjectFrame.cpp | 8 ++-- mozilla/layout/html/base/src/nsPageFrame.cpp | 2 +- mozilla/layout/html/base/src/nsPresShell.cpp | 6 +-- .../html/base/src/nsSimplePageSequence.cpp | 2 +- mozilla/layout/html/base/src/nsTextFrame.cpp | 6 +-- .../html/base/src/nsTextTransformer.cpp | 2 +- .../layout/html/document/src/nsFrameFrame.cpp | 6 ++- .../html/document/src/nsFrameSetFrame.cpp | 6 +-- .../html/forms/src/nsButtonControlFrame.cpp | 2 +- .../html/forms/src/nsComboboxControlFrame.cpp | 6 ++- .../layout/html/forms/src/nsFieldSetFrame.cpp | 2 +- .../html/forms/src/nsFileControlFrame.cpp | 7 +++- .../html/forms/src/nsFormControlFrame.cpp | 7 +++- mozilla/layout/html/forms/src/nsFormFrame.cpp | 10 ++--- .../forms/src/nsHTMLButtonControlFrame.cpp | 9 +++- .../html/forms/src/nsImageControlFrame.cpp | 9 +++- .../html/forms/src/nsListControlFrame.cpp | 23 ++++++---- .../html/forms/src/nsTextControlFrame.cpp | 2 +- .../html/style/src/nsCSSFrameConstructor.cpp | 42 +++++++++---------- .../html/table/src/nsTableCellFrame.cpp | 4 +- .../html/table/src/nsTableColGroupFrame.cpp | 4 +- .../layout/html/table/src/nsTableFrame.cpp | 16 +++---- .../html/table/src/nsTableOuterFrame.cpp | 2 +- .../layout/html/table/src/nsTableRowFrame.cpp | 10 ++--- .../html/table/src/nsTableRowGroupFrame.cpp | 4 +- mozilla/layout/style/nsStyleContext.cpp | 2 +- mozilla/layout/tables/nsTableCellFrame.cpp | 4 +- .../layout/tables/nsTableColGroupFrame.cpp | 4 +- mozilla/layout/tables/nsTableFrame.cpp | 16 +++---- mozilla/layout/tables/nsTableOuterFrame.cpp | 2 +- mozilla/layout/tables/nsTableRowFrame.cpp | 10 ++--- .../layout/tables/nsTableRowGroupFrame.cpp | 4 +- .../layout/xul/base/src/nsToolboxFrame.cpp | 4 +- .../layout/xul/base/src/nsTreeCellFrame.cpp | 2 +- .../xul/base/src/nsTreeIndentationFrame.cpp | 4 +- .../webshell/tests/viewer/nsBrowserWindow.cpp | 2 +- 82 files changed, 333 insertions(+), 259 deletions(-) diff --git a/mozilla/content/base/src/nsStyleContext.cpp b/mozilla/content/base/src/nsStyleContext.cpp index a5effb1a562..92e9511f914 100644 --- a/mozilla/content/base/src/nsStyleContext.cpp +++ b/mozilla/content/base/src/nsStyleContext.cpp @@ -140,7 +140,7 @@ static nscoord CalcSideFor(const nsIFrame* aFrame, const nsStyleCoord& aCoord, aFrame->GetParent(parentFrame); // XXX may not be direct parent... if (nsnull != parentFrame) { nsIStyleContext* parentContext; - parentFrame->GetStyleContext(parentContext); + parentFrame->GetStyleContext(&parentContext); if (nsnull != parentContext) { const nsStyleSpacing* parentSpacing = (const nsStyleSpacing*)parentContext->GetStyleData(eStyleStruct_Spacing); nsMargin parentMargin; diff --git a/mozilla/content/events/src/nsDOMEvent.cpp b/mozilla/content/events/src/nsDOMEvent.cpp index 2a8ca0b50c8..b48ac59301d 100644 --- a/mozilla/content/events/src/nsDOMEvent.cpp +++ b/mozilla/content/events/src/nsDOMEvent.cpp @@ -114,7 +114,7 @@ NS_METHOD nsDOMEvent::GetTarget(nsIDOMNode** aTarget) NS_RELEASE(manager); } - if (NS_OK == targetFrame->GetContent(targetContent) && nsnull != targetContent) { + if (NS_OK == targetFrame->GetContent(&targetContent) && nsnull != targetContent) { if (NS_OK == targetContent->QueryInterface(kIDOMNodeIID, (void**)&mTarget)) { *aTarget = mTarget; NS_ADDREF(mTarget); diff --git a/mozilla/content/events/src/nsEventStateManager.cpp b/mozilla/content/events/src/nsEventStateManager.cpp index 8bd442617b2..e41a8174579 100644 --- a/mozilla/content/events/src/nsEventStateManager.cpp +++ b/mozilla/content/events/src/nsEventStateManager.cpp @@ -92,7 +92,7 @@ nsEventStateManager::PreHandleEvent(nsIPresContext& aPresContext, case NS_GOTFOCUS: NS_IF_RELEASE(mCurrentFocus); if (nsnull != mCurrentTarget) { - mCurrentTarget->GetContent(mCurrentFocus); + mCurrentTarget->GetContent(&mCurrentFocus); } break; } @@ -241,7 +241,7 @@ nsEventStateManager::GenerateMouseEnterExit(nsIPresContext& aPresContext, nsGUIE nsIContent *lastContent = nsnull; nsIContent *targetContent; - mCurrentTarget->GetContent(targetContent); + mCurrentTarget->GetContent(&targetContent); if (nsnull != mLastMouseOverFrame) { //fire mouseout @@ -252,7 +252,7 @@ nsEventStateManager::GenerateMouseEnterExit(nsIPresContext& aPresContext, nsGUIE event.widget = nsnull; //The frame has change but the content may not have. Check before dispatching to content - mLastMouseOverFrame->GetContent(lastContent); + mLastMouseOverFrame->GetContent(&lastContent); if (lastContent != targetContent) { //XXX This event should still go somewhere!! @@ -309,7 +309,7 @@ nsEventStateManager::GenerateMouseEnterExit(nsIPresContext& aPresContext, nsGUIE event.widget = nsnull; nsIContent *lastContent; - mLastMouseOverFrame->GetContent(lastContent); + mLastMouseOverFrame->GetContent(&lastContent); if (nsnull != lastContent) { lastContent->HandleDOMEvent(aPresContext, &event, nsnull, DOM_EVENT_INIT, status); @@ -373,7 +373,7 @@ nsEventStateManager::CheckForAndDispatchClick(nsIPresContext& aPresContext, event.widget = nsnull; nsIContent *content; - mCurrentTarget->GetContent(content); + mCurrentTarget->GetContent(&content); if (nsnull != content) { ret = content->HandleDOMEvent(aPresContext, &event, nsnull, DOM_EVENT_INIT, aStatus); @@ -403,7 +403,7 @@ nsEventStateManager::DispatchKeyPressEvent(nsIPresContext& aPresContext, event.keyCode = aEvent->keyCode; nsIContent *content; - mCurrentTarget->GetContent(content); + mCurrentTarget->GetContent(&content); if (nsnull != content) { ret = content->HandleDOMEvent(aPresContext, &event, nsnull, DOM_EVENT_INIT, aStatus); diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp index 2612aece0d2..1225f70aa1e 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp @@ -297,7 +297,7 @@ nsCSSFrameConstructor::ConstructTableFrame(nsIPresContext* aPresContext, nsHTMLContainerFrame::CreateViewForFrame(*aPresContext, aNewFrame, aStyleContext, PR_FALSE); nsIStyleContext* parentStyleContext; - aParentFrame->GetStyleContext(parentStyleContext); + aParentFrame->GetStyleContext(&parentStyleContext); #if 0 nsIStyleContext *outerStyleContext = aPresContext->ResolvePseudoStyleContextFor(aContent, nsHTMLAtoms::tableOuterPseudo, parentStyleContext); @@ -416,7 +416,7 @@ nsCSSFrameConstructor::ConstructAnonymousTableFrame (nsIPresContext* aPresConte nsresult result = NS_OK; if (NS_SUCCEEDED(result)) { nsIStyleContext* parentStyleContext = nsnull; - result = aParentFrame->GetStyleContext(parentStyleContext); + result = aParentFrame->GetStyleContext(&parentStyleContext); if (NS_SUCCEEDED(result)) { // create the outer table frames nsIStyleContext* outerStyleContext = @@ -471,7 +471,7 @@ nsCSSFrameConstructor::ConstructTableCaptionFrame(nsIPresContext* aPresContext, nsIFrame* outerFrame; ConstructAnonymousTableFrame(aPresContext, aContent, aParentFrame, outerFrame, innerFrame, aFixedItems); nsIStyleContext* outerStyleContext; - outerFrame->GetStyleContext(outerStyleContext); + outerFrame->GetStyleContext(&outerStyleContext); nsIStyleContext* adjStyleContext = aPresContext->ResolveStyleContextFor(aContent, outerStyleContext); aNewCaptionFrame->Init(*aPresContext, aContent, outerFrame, adjStyleContext); @@ -516,7 +516,7 @@ nsCSSFrameConstructor::ConstructTableGroupFrame(nsIPresContext* aPresContext, nsIStyleContext* styleContextRelease = nsnull; nsIStyleContext* parentStyleContext; - aParentFrame->GetStyleContext(parentStyleContext); + aParentFrame->GetStyleContext(&parentStyleContext); const nsStyleDisplay* parentDisplay = (const nsStyleDisplay*) parentStyleContext->GetStyleData(eStyleStruct_Display); @@ -534,7 +534,7 @@ nsCSSFrameConstructor::ConstructTableGroupFrame(nsIPresContext* aPresContext, nsIFrame* outerFrame; ConstructAnonymousTableFrame(aPresContext, aContent, aParentFrame, outerFrame, innerFrame, aFixedItems); nsIStyleContext* innerStyleContext; - innerFrame->GetStyleContext(innerStyleContext); + innerFrame->GetStyleContext(&innerStyleContext); if (contentDisplayIsGroup) { styleContext = aPresContext->ResolveStyleContextFor(aContent, innerStyleContext); } else { @@ -658,7 +658,7 @@ nsCSSFrameConstructor::ConstructTableRowFrame(nsIPresContext* aPresContext, (NS_STYLE_DISPLAY_TABLE_FOOTER_GROUP == parentDisplay->mDisplay)) { if (!contentDisplayIsRow) { // content is from some (soon to be) child of ours aParentFrame = TableGetAsNonScrollFrame(aPresContext, aParentFrame, parentDisplay); - aParentFrame->GetStyleContext(groupStyleContext); + aParentFrame->GetStyleContext(&groupStyleContext); styleContext = aPresContext->ResolvePseudoStyleContextFor(aContent, nsHTMLAtoms::tableRowPseudo, groupStyleContext); } @@ -673,7 +673,7 @@ nsCSSFrameConstructor::ConstructTableRowFrame(nsIPresContext* aPresContext, aAbsoluteItems, PR_TRUE, aNewTopMostFrame, groupFrame, aFixedItems, toDo); if (NS_SUCCEEDED(rv)) { - groupFrame->GetStyleContext(groupStyleContext); + groupFrame->GetStyleContext(&groupStyleContext); if (contentDisplayIsRow) { styleContext = aPresContext->ResolveStyleContextFor(aContent, groupStyleContext); } else { @@ -755,7 +755,7 @@ nsCSSFrameConstructor::ConstructTableColFrame(nsIPresContext* aPresContext, groupFrame, aFixedItems); if (NS_SUCCEEDED(rv)) { nsIStyleContext* groupStyleContext; - groupFrame->GetStyleContext(groupStyleContext); + groupFrame->GetStyleContext(&groupStyleContext); nsIStyleContext* styleContext = aPresContext->ResolveStyleContextFor(aContent, groupStyleContext); rv = NS_NewTableColFrame(aNewColFrame); aNewColFrame->Init(*aPresContext, aContent, groupFrame, styleContext); @@ -796,7 +796,7 @@ nsCSSFrameConstructor::ConstructTableCellFrame(nsIPresContext* aPresContext, PRBool contentDisplayIsCell = (NS_STYLE_DISPLAY_TABLE_CELL == display->mDisplay); nsIStyleContext* parentStyleContext; - aParentFrame->GetStyleContext(parentStyleContext); + aParentFrame->GetStyleContext(&parentStyleContext); const nsStyleDisplay* parentDisplay = (const nsStyleDisplay*) parentStyleContext->GetStyleData(eStyleStruct_Display); @@ -822,7 +822,7 @@ nsCSSFrameConstructor::ConstructTableCellFrame(nsIPresContext* aPresContext, aAbsoluteItems, aNewTopMostFrame, rowFrame, aFixedItems, &toDo); if (NS_SUCCEEDED(rv)) { nsIStyleContext* rowStyleContext; - rowFrame->GetStyleContext(rowStyleContext); + rowFrame->GetStyleContext(&rowStyleContext); if (contentDisplayIsCell) { styleContext = aPresContext->ResolveStyleContextFor(aContent, rowStyleContext); } else { @@ -918,7 +918,7 @@ nsCSSFrameConstructor::TableProcessChildren(nsIPresContext* aPresContext, PRInt32 count; nsIStyleContext* parentStyleContext; - aParentFrame->GetStyleContext(parentStyleContext); + aParentFrame->GetStyleContext(&parentStyleContext); aContent->ChildCount(count); for (PRInt32 i = 0; i < count; i++) { @@ -1053,7 +1053,7 @@ nsCSSFrameConstructor:: GetDisplay(nsIFrame* aFrame) return nsnull; } nsIStyleContext* styleContext = nsnull; - aFrame->GetStyleContext(styleContext); + aFrame->GetStyleContext(&styleContext); const nsStyleDisplay* display = (const nsStyleDisplay*)styleContext->GetStyleData(eStyleStruct_Display); NS_RELEASE(styleContext); @@ -2538,12 +2538,12 @@ nsCSSFrameConstructor::ConstructFrame(nsIPresContext* aPresContext, nsIStyleContext* styleContext; nsIStyleContext* parentStyleContext; - aParentFrame->GetStyleContext(parentStyleContext); + aParentFrame->GetStyleContext(&parentStyleContext); if (nsLayoutAtoms::textTagName == tag) { // Use a special pseudo element style context for text nsIContent* parentContent = nsnull; if (nsnull != aParentFrame) { - aParentFrame->GetContent(parentContent); + aParentFrame->GetContent(&parentContent); } styleContext = aPresContext->ResolvePseudoStyleContextFor(parentContent, nsHTMLAtoms::textPseudo, @@ -2554,7 +2554,7 @@ nsCSSFrameConstructor::ConstructFrame(nsIPresContext* aPresContext, // Use a special pseudo element style context for comments nsIContent* parentContent = nsnull; if (nsnull != aParentFrame) { - aParentFrame->GetContent(parentContent); + aParentFrame->GetContent(&parentContent); } styleContext = aPresContext->ResolvePseudoStyleContextFor(parentContent, nsHTMLAtoms::commentPseudo, @@ -2650,7 +2650,7 @@ nsCSSFrameConstructor::ReconstructFrames(nsIPresContext* aPresContext, nsIStyleContext* rootPseudoStyle; nsAbsoluteItems fixedItems(nsnull); // XXX FIX ME... - aParentFrame->GetStyleContext(rootPseudoStyle); + aParentFrame->GetStyleContext(&rootPseudoStyle); rv = ConstructDocElementFrame(aPresContext, aContent, aParentFrame, rootPseudoStyle, newChild, fixedItems); @@ -3258,7 +3258,7 @@ nsCSSFrameConstructor::AttributeChanged(nsIPresContext* aPresContext, // is there? if (nsnull != frame) { nsIStyleContext* frameContext; - frame->GetStyleContext(frameContext); + frame->GetStyleContext(&frameContext); NS_ASSERTION(nsnull != frameContext, "frame must have style context"); if (nsnull != frameContext) { nsIStyleContext* parentContext = frameContext->GetParent(); @@ -3316,7 +3316,7 @@ nsCSSFrameConstructor::StyleRuleChanged(nsIPresContext* aPresContext, if (restyle) { nsIStyleContext* sc; - frame->GetStyleContext(sc); + frame->GetStyleContext(&sc); sc->RemapStyle(aPresContext); NS_RELEASE(sc); @@ -3435,8 +3435,8 @@ nsCSSFrameConstructor::ConstructAlternateImageFrame(nsIPresContext* aPresContext nsIStyleContext* parentStyleContext; nsIContent* parentContent; - aParentFrame->GetContent(parentContent); - aParentFrame->GetStyleContext(parentStyleContext); + aParentFrame->GetContent(&parentContent); + aParentFrame->GetStyleContext(&parentStyleContext); textStyleContext = aPresContext->ResolvePseudoStyleContextFor (parentContent, nsHTMLAtoms::textPseudo, parentStyleContext); NS_RELEASE(parentStyleContext); @@ -3470,7 +3470,7 @@ nsCSSFrameConstructor::CantRenderReplacedElement(nsIPresContext* aPresContext, aFrame->GetParent(parentFrame); // Get the content object associated with aFrame - aFrame->GetContent(content); + aFrame->GetContent(&content); NS_ASSERTION(nsnull != content, "null content object"); content->GetTag(tag); diff --git a/mozilla/layout/base/nsPresContext.cpp b/mozilla/layout/base/nsPresContext.cpp index 79a806e5b2f..51f18d18119 100644 --- a/mozilla/layout/base/nsPresContext.cpp +++ b/mozilla/layout/base/nsPresContext.cpp @@ -192,7 +192,7 @@ nsPresContext::PreferenceChanged(const char* aPrefName) mShell->GetRootFrame(rootFrame); if (nsnull != rootFrame) { - rootFrame->GetStyleContext(rootStyleContext); + rootFrame->GetStyleContext(&rootStyleContext); rootStyleContext->RemapStyle(this); NS_RELEASE(rootStyleContext); diff --git a/mozilla/layout/base/nsPresShell.cpp b/mozilla/layout/base/nsPresShell.cpp index 960df7a793c..422e22b35a5 100644 --- a/mozilla/layout/base/nsPresShell.cpp +++ b/mozilla/layout/base/nsPresShell.cpp @@ -1373,7 +1373,7 @@ FindFrameWithContent(nsIFrame* aFrame, nsIContent* aContent) { nsIContent* frameContent; - aFrame->GetContent(frameContent); + aFrame->GetContent(&frameContent); if (frameContent == aContent) { nsIStyleContext* styleContext; nsIAtom* pseudoTag; @@ -1381,7 +1381,7 @@ FindFrameWithContent(nsIFrame* aFrame, nsIContent* aContent) // If it's a placeholder frame, then ignore it and keep looking for the // primary frame - aFrame->GetStyleContext(styleContext); + aFrame->GetStyleContext(&styleContext); styleContext->GetPseudoType(pseudoTag); if (pseudoTag == nsHTMLAtoms::placeholderPseudo) { isPlaceholder = PR_TRUE; @@ -1532,7 +1532,7 @@ PresShell::HandleEvent(nsIView *aView, //2. Give event to the DOM for third party and JS use. if (nsnull != mCurrentEventFrame && NS_OK == rv) { nsIContent* targetContent; - if (NS_OK == mCurrentEventFrame->GetContent(targetContent) && nsnull != targetContent) { + if (NS_OK == mCurrentEventFrame->GetContent(&targetContent) && nsnull != targetContent) { rv = targetContent->HandleDOMEvent(*mPresContext, (nsEvent*)aEvent, nsnull, DOM_EVENT_INIT, aEventStatus); NS_RELEASE(targetContent); diff --git a/mozilla/layout/base/public/nsIFrame.h b/mozilla/layout/base/public/nsIFrame.h index 04b8e2b4fbe..bf447de0770 100644 --- a/mozilla/layout/base/public/nsIFrame.h +++ b/mozilla/layout/base/public/nsIFrame.h @@ -261,7 +261,7 @@ public: * * @see nsISupports#Release() */ - NS_IMETHOD GetContent(nsIContent*& aContent) const = 0; + NS_IMETHOD GetContent(nsIContent** aContent) const = 0; /** * Get the offsets of the frame. most will be 0,0 @@ -275,7 +275,7 @@ public: * * @see nsISupports#Release() */ - NS_IMETHOD GetStyleContext(nsIStyleContext*& aStyleContext) const = 0; + NS_IMETHOD GetStyleContext(nsIStyleContext** aStyleContext) const = 0; NS_IMETHOD SetStyleContext(nsIPresContext* aPresContext, nsIStyleContext* aContext) = 0; diff --git a/mozilla/layout/base/src/nsPresContext.cpp b/mozilla/layout/base/src/nsPresContext.cpp index 79a806e5b2f..51f18d18119 100644 --- a/mozilla/layout/base/src/nsPresContext.cpp +++ b/mozilla/layout/base/src/nsPresContext.cpp @@ -192,7 +192,7 @@ nsPresContext::PreferenceChanged(const char* aPrefName) mShell->GetRootFrame(rootFrame); if (nsnull != rootFrame) { - rootFrame->GetStyleContext(rootStyleContext); + rootFrame->GetStyleContext(&rootStyleContext); rootStyleContext->RemapStyle(this); NS_RELEASE(rootStyleContext); diff --git a/mozilla/layout/base/src/nsRangeList.cpp b/mozilla/layout/base/src/nsRangeList.cpp index 76e1e4bf33f..38e2ca0d4fa 100644 --- a/mozilla/layout/base/src/nsRangeList.cpp +++ b/mozilla/layout/base/src/nsRangeList.cpp @@ -510,7 +510,7 @@ nsRangeList::HandleKeyEvent(nsIFocusTracker *aTracker, nsGUIEvent *aGuiEvent, ns return NS_ERROR_NULL_POINTER; if (NS_KEY_DOWN == aGuiEvent->message) { nsCOMPtr content; - if (NS_FAILED(aFrame->GetContent(*getter_AddRefs(content))) || !content) + if (NS_FAILED(aFrame->GetContent(getter_AddRefs(content))) || !content) return NS_ERROR_NULL_POINTER; nsCOMPtr domnode(content); if (!domnode) @@ -618,10 +618,10 @@ compareFrames(nsIFrame *aBegin, nsIFrame *aEnd) if (aBegin == aEnd) return 0; nsCOMPtr beginContent; - if (NS_SUCCEEDED(aBegin->GetContent(*getter_AddRefs(beginContent))) && beginContent){ + if (NS_SUCCEEDED(aBegin->GetContent(getter_AddRefs(beginContent))) && beginContent){ nsCOMPtrbeginNode (beginContent); nsCOMPtr endContent; - if (NS_SUCCEEDED(aEnd->GetContent(*getter_AddRefs(endContent))) && endContent){ + if (NS_SUCCEEDED(aEnd->GetContent(getter_AddRefs(endContent))) && endContent){ nsCOMPtrendNode (endContent); PRBool storage; PRInt32 int1; @@ -684,7 +684,7 @@ nsRangeList::TakeFocus(nsIFocusTracker *aTracker, nsIFrame *aFrame, PRInt32 aOff //HACKHACKHACK nsCOMPtr content; nsCOMPtr domNode; - if (NS_SUCCEEDED(aFrame->GetContent(*getter_AddRefs(content))) && content){ + if (NS_SUCCEEDED(aFrame->GetContent(getter_AddRefs(content))) && content){ domNode = content; nsCOMPtr parent; nsCOMPtr parent2; @@ -736,11 +736,11 @@ nsRangeList::TakeFocus(nsIFocusTracker *aTracker, nsIFrame *aFrame, PRInt32 aOff } else if (frame){ //we need to check to see what the order is. nsCOMPtroldContent; - if (NS_SUCCEEDED(frame->GetContent(*getter_AddRefs(oldContent))) && oldContent){ + if (NS_SUCCEEDED(frame->GetContent(getter_AddRefs(oldContent))) && oldContent){ nsCOMPtroldDomNode(oldContent); if (oldDomNode && oldDomNode == GetFocusNode()) { nsCOMPtranchorContent; - if (NS_SUCCEEDED(anchor->GetContent(*getter_AddRefs(anchorContent))) && anchorContent){ + if (NS_SUCCEEDED(anchor->GetContent(getter_AddRefs(anchorContent))) && anchorContent){ nsCOMPtranchorDomNode(anchorContent); if (anchorDomNode && anchorDomNode == GetAnchorNode()) { @@ -850,7 +850,7 @@ findFrameFromContent(nsIFrame *aParent, nsIContent *aContent, PRBool aTurnOff) if (!aParent || !aContent) return nsnull; nsCOMPtr content; - aParent->GetContent(*getter_AddRefs(content)); + aParent->GetContent(getter_AddRefs(content)); if (content == aContent){ return aParent; } @@ -925,7 +925,7 @@ nsRangeList::ResetSelection(nsIFocusTracker *aTracker, nsIFrame *aStartFrame) frameOffset = -1; while((result = getNextFrame(result)) != nsnull){ nsCOMPtr content; - result->GetContent(*getter_AddRefs(content)); + result->GetContent(getter_AddRefs(content)); if (content == endContent){ if (endContent == frameContent) frameOffset = GetFocusOffset(); diff --git a/mozilla/layout/base/src/nsStyleContext.cpp b/mozilla/layout/base/src/nsStyleContext.cpp index a5effb1a562..92e9511f914 100644 --- a/mozilla/layout/base/src/nsStyleContext.cpp +++ b/mozilla/layout/base/src/nsStyleContext.cpp @@ -140,7 +140,7 @@ static nscoord CalcSideFor(const nsIFrame* aFrame, const nsStyleCoord& aCoord, aFrame->GetParent(parentFrame); // XXX may not be direct parent... if (nsnull != parentFrame) { nsIStyleContext* parentContext; - parentFrame->GetStyleContext(parentContext); + parentFrame->GetStyleContext(&parentContext); if (nsnull != parentContext) { const nsStyleSpacing* parentSpacing = (const nsStyleSpacing*)parentContext->GetStyleData(eStyleStruct_Spacing); nsMargin parentMargin; diff --git a/mozilla/layout/events/src/nsDOMEvent.cpp b/mozilla/layout/events/src/nsDOMEvent.cpp index 2a8ca0b50c8..b48ac59301d 100644 --- a/mozilla/layout/events/src/nsDOMEvent.cpp +++ b/mozilla/layout/events/src/nsDOMEvent.cpp @@ -114,7 +114,7 @@ NS_METHOD nsDOMEvent::GetTarget(nsIDOMNode** aTarget) NS_RELEASE(manager); } - if (NS_OK == targetFrame->GetContent(targetContent) && nsnull != targetContent) { + if (NS_OK == targetFrame->GetContent(&targetContent) && nsnull != targetContent) { if (NS_OK == targetContent->QueryInterface(kIDOMNodeIID, (void**)&mTarget)) { *aTarget = mTarget; NS_ADDREF(mTarget); diff --git a/mozilla/layout/events/src/nsEventStateManager.cpp b/mozilla/layout/events/src/nsEventStateManager.cpp index 8bd442617b2..e41a8174579 100644 --- a/mozilla/layout/events/src/nsEventStateManager.cpp +++ b/mozilla/layout/events/src/nsEventStateManager.cpp @@ -92,7 +92,7 @@ nsEventStateManager::PreHandleEvent(nsIPresContext& aPresContext, case NS_GOTFOCUS: NS_IF_RELEASE(mCurrentFocus); if (nsnull != mCurrentTarget) { - mCurrentTarget->GetContent(mCurrentFocus); + mCurrentTarget->GetContent(&mCurrentFocus); } break; } @@ -241,7 +241,7 @@ nsEventStateManager::GenerateMouseEnterExit(nsIPresContext& aPresContext, nsGUIE nsIContent *lastContent = nsnull; nsIContent *targetContent; - mCurrentTarget->GetContent(targetContent); + mCurrentTarget->GetContent(&targetContent); if (nsnull != mLastMouseOverFrame) { //fire mouseout @@ -252,7 +252,7 @@ nsEventStateManager::GenerateMouseEnterExit(nsIPresContext& aPresContext, nsGUIE event.widget = nsnull; //The frame has change but the content may not have. Check before dispatching to content - mLastMouseOverFrame->GetContent(lastContent); + mLastMouseOverFrame->GetContent(&lastContent); if (lastContent != targetContent) { //XXX This event should still go somewhere!! @@ -309,7 +309,7 @@ nsEventStateManager::GenerateMouseEnterExit(nsIPresContext& aPresContext, nsGUIE event.widget = nsnull; nsIContent *lastContent; - mLastMouseOverFrame->GetContent(lastContent); + mLastMouseOverFrame->GetContent(&lastContent); if (nsnull != lastContent) { lastContent->HandleDOMEvent(aPresContext, &event, nsnull, DOM_EVENT_INIT, status); @@ -373,7 +373,7 @@ nsEventStateManager::CheckForAndDispatchClick(nsIPresContext& aPresContext, event.widget = nsnull; nsIContent *content; - mCurrentTarget->GetContent(content); + mCurrentTarget->GetContent(&content); if (nsnull != content) { ret = content->HandleDOMEvent(aPresContext, &event, nsnull, DOM_EVENT_INIT, aStatus); @@ -403,7 +403,7 @@ nsEventStateManager::DispatchKeyPressEvent(nsIPresContext& aPresContext, event.keyCode = aEvent->keyCode; nsIContent *content; - mCurrentTarget->GetContent(content); + mCurrentTarget->GetContent(&content); if (nsnull != content) { ret = content->HandleDOMEvent(aPresContext, &event, nsnull, DOM_EVENT_INIT, aStatus); diff --git a/mozilla/layout/forms/nsComboboxControlFrame.cpp b/mozilla/layout/forms/nsComboboxControlFrame.cpp index 56838951386..2d11ba809d0 100644 --- a/mozilla/layout/forms/nsComboboxControlFrame.cpp +++ b/mozilla/layout/forms/nsComboboxControlFrame.cpp @@ -172,7 +172,11 @@ nsComboboxControlFrame::GetType(PRInt32* aType) const NS_IMETHODIMP nsComboboxControlFrame::GetFormContent(nsIContent*& aContent) const { - return GetContent(aContent); + nsIContent* content; + nsresult rv; + rv = GetContent(&content); + aContent = content; + return rv; } //-------------------------------------------------------------- diff --git a/mozilla/layout/forms/nsFieldSetFrame.cpp b/mozilla/layout/forms/nsFieldSetFrame.cpp index f99e63ade3b..aa091695994 100644 --- a/mozilla/layout/forms/nsFieldSetFrame.cpp +++ b/mozilla/layout/forms/nsFieldSetFrame.cpp @@ -263,7 +263,7 @@ nsFieldSetFrame::Reflow(nsIPresContext& aPresContext, nsMargin legendMargin; if (mLegendFrame) { nsIStyleContext* legendSC = nsnull; - mLegendFrame->GetStyleContext(legendSC); + mLegendFrame->GetStyleContext(&legendSC); if (legendSC) { const nsStyleSpacing* legendSpacing = (const nsStyleSpacing*)legendSC->GetStyleData(eStyleStruct_Spacing); diff --git a/mozilla/layout/forms/nsFileControlFrame.cpp b/mozilla/layout/forms/nsFileControlFrame.cpp index efb631d80da..dcd088a911c 100644 --- a/mozilla/layout/forms/nsFileControlFrame.cpp +++ b/mozilla/layout/forms/nsFileControlFrame.cpp @@ -327,7 +327,12 @@ nsFileControlFrame::GetFrameName(nsString& aResult) const NS_IMETHODIMP nsFileControlFrame::GetFormContent(nsIContent*& aContent) const { - return GetContent(aContent); + nsIContent* content; + nsresult rv; + + rv = GetContent(&content); + aContent = content; + return rv; } NS_IMETHODIMP diff --git a/mozilla/layout/forms/nsFormControlFrame.cpp b/mozilla/layout/forms/nsFormControlFrame.cpp index dc992c6e09b..b9c3eb78f32 100644 --- a/mozilla/layout/forms/nsFormControlFrame.cpp +++ b/mozilla/layout/forms/nsFormControlFrame.cpp @@ -630,7 +630,12 @@ nsFormControlFrame::Reset() NS_IMETHODIMP nsFormControlFrame::GetFormContent(nsIContent*& aContent) const { - return GetContent(aContent); + nsIContent* content; + nsresult rv; + + rv = GetContent(&content); + aContent = content; + return rv; } NS_IMETHODIMP diff --git a/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp b/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp index 1ec6153632b..a2c6e1b893d 100644 --- a/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp +++ b/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp @@ -366,7 +366,7 @@ void ReflowTemp(nsIPresContext& aPresContext, nsHTMLButtonControlFrame* aFrame, NS_RELEASE(cmd); #else nsIContent* content; - aFrame->GetContent(content); + aFrame->GetContent(&content); if (nsnull != content) { nsIDocument* document; @@ -714,7 +714,12 @@ nsHTMLButtonControlFrame::GetFont(nsIPresContext* aPresContext, NS_IMETHODIMP nsHTMLButtonControlFrame::GetFormContent(nsIContent*& aContent) const { - return GetContent(aContent); + nsIContent* content; + nsresult rv; + + rv = GetContent(&content); + aContent = content; + return rv; } nscoord diff --git a/mozilla/layout/forms/nsImageControlFrame.cpp b/mozilla/layout/forms/nsImageControlFrame.cpp index ec69afd5043..8c29d9d3f2d 100644 --- a/mozilla/layout/forms/nsImageControlFrame.cpp +++ b/mozilla/layout/forms/nsImageControlFrame.cpp @@ -350,7 +350,7 @@ nsImageControlFrame::MouseClicked(nsIPresContext* aPresContext) if ((nsnull != mFormFrame) && !nsFormFrame::GetDisabled(this)) { nsIContent *formContent = nsnull; - mFormFrame->GetContent(formContent); + mFormFrame->GetContent(&formContent); nsEventStatus status; nsEvent event; @@ -377,7 +377,12 @@ nsImageControlFrame::GetFont(nsIPresContext* aPresContext, NS_IMETHODIMP nsImageControlFrame::GetFormContent(nsIContent*& aContent) const { - return GetContent(aContent); + nsIContent* content; + nsresult rv; + + rv = GetContent(&content); + aContent = content; + return rv; } nscoord diff --git a/mozilla/layout/forms/nsListControlFrame.cpp b/mozilla/layout/forms/nsListControlFrame.cpp index b171cff3b87..bc3b56609f0 100644 --- a/mozilla/layout/forms/nsListControlFrame.cpp +++ b/mozilla/layout/forms/nsListControlFrame.cpp @@ -195,7 +195,7 @@ nsListControlFrame::GetFrameForPointUsing(const nsPoint& aPoint, tmp.MoveTo(aPoint.x - kidRect.x, aPoint.y - kidRect.y); nsIContent * content; - kid->GetContent(content); + kid->GetContent(&content); static NS_DEFINE_IID(kIDOMHTMLOptionElementIID, NS_IDOMHTMLOPTIONELEMENT_IID); nsIDOMHTMLOptionElement* oe; if (content && (NS_OK == content->QueryInterface(kIDOMHTMLOptionElementIID, (void**) &oe))) { @@ -365,7 +365,7 @@ nsListControlFrame::GetOptionFromChild(nsIFrame* aParentFrame) aParentFrame->FirstChild(nsnull, kid); while (nsnull != kid) { nsIContent * content; - kid->GetContent(content); + kid->GetContent(&content); static NS_DEFINE_IID(kIDOMHTMLOptionElementIID, NS_IDOMHTMLOPTIONELEMENT_IID); nsIDOMHTMLOptionElement* element; if (content && (NS_OK == content->QueryInterface(kIDOMHTMLOptionElementIID, (void**) &element))) { @@ -387,7 +387,12 @@ nsListControlFrame::GetOptionFromChild(nsIFrame* aParentFrame) NS_IMETHODIMP nsListControlFrame::GetFormContent(nsIContent*& aContent) const { - return GetContent(aContent); + nsIContent* content; + nsresult rv; + + rv = GetContent(&content); + aContent = content; + return rv; } //-------------------------------------------------------------- @@ -427,7 +432,9 @@ PRInt32 nsListControlFrame::SetContentSelected(nsIFrame * aHitFrame, while (nsnull != kid) { if (kid == aHitFrame) { NS_IF_RELEASE(aHitContent); - kid->GetContent(aHitContent); + nsIContent* content; + kid->GetContent(&content); + aHitContent = content; aHitContent->SetAttribute(kNameSpaceID_HTML, nsHTMLAtoms::kClass, (aIsSelected?kSelectedFocus:kNormal), PR_TRUE); return index; } @@ -445,7 +452,7 @@ void nsListControlFrame::ClearSelection() mContentFrame->FirstChild(nsnull, kid); while (nsnull != kid) { nsIContent * content; - kid->GetContent(content); + kid->GetContent(&content); if (mIsFrameSelected[i]) { if (i != mSelectedIndex) { content->SetAttribute(kNameSpaceID_HTML, nsHTMLAtoms::kClass, kNormal, PR_TRUE); @@ -478,7 +485,7 @@ void nsListControlFrame::ExtendedSelection(PRInt32 aStartIndex, PRInt32 aEndInde mContentFrame->FirstChild(nsnull, kid); while (nsnull != kid) { nsIContent * content; - kid->GetContent(content); + kid->GetContent(&content); if (i == startInx) { startInverting = PR_TRUE; } @@ -1031,7 +1038,7 @@ nsListControlFrame::AboutToDropDown() mContentFrame->FirstChild(nsnull, kid); while (nsnull != kid) { nsIContent * content; - kid->GetContent(content); + kid->GetContent(&content); if (i == mSelectedIndex) { mSelectedContent = content; mSelectedFrame = kid; @@ -1059,7 +1066,7 @@ nsListControlFrame::InitializeFromContent(PRBool aDoDisplay) mContentFrame->FirstChild(nsnull, kid); while (nsnull != kid) { nsIContent * content; - kid->GetContent(content); + kid->GetContent(&content); nsIDOMHTMLOptionElement* option = nsnull; nsresult result = content->QueryInterface(kIDOMHTMLOptionElementIID, (void**)&option); diff --git a/mozilla/layout/forms/nsTextControlFrame.cpp b/mozilla/layout/forms/nsTextControlFrame.cpp index dd8a86b4ff4..b1de76fccd6 100644 --- a/mozilla/layout/forms/nsTextControlFrame.cpp +++ b/mozilla/layout/forms/nsTextControlFrame.cpp @@ -210,7 +210,7 @@ nsTextControlFrame::EnterPressed(nsIPresContext& aPresContext) if (mFormFrame && mFormFrame->CanSubmit(*this)) { nsIContent *formContent = nsnull; - mFormFrame->GetContent(formContent); + mFormFrame->GetContent(&formContent); if (nsnull != formContent) { nsEvent event; nsEventStatus status = nsEventStatus_eIgnore; diff --git a/mozilla/layout/generic/nsBlockFrame.cpp b/mozilla/layout/generic/nsBlockFrame.cpp index 0754230db40..af0587bc8be 100644 --- a/mozilla/layout/generic/nsBlockFrame.cpp +++ b/mozilla/layout/generic/nsBlockFrame.cpp @@ -2084,7 +2084,7 @@ nsBlockFrame::WillReflowFrame(nsBlockReflowState& aState, if (repairStyleContext) { // Update style context when appropriate nsIStyleContext* kidSC; - aFrame->GetStyleContext(kidSC); + aFrame->GetStyleContext(&kidSC); if (nsnull != kidSC) { nsIStyleContext* kidParentSC; kidParentSC = kidSC->GetParent(); @@ -2668,7 +2668,7 @@ nsBlockFrame::PlaceLine(nsBlockReflowState& aState, // that it can compress with other block margins. nsIStyleContext* brSC; nsIPresContext& px = aState.mPresContext; - nsresult rv = brFrame->GetStyleContext(brSC); + nsresult rv = brFrame->GetStyleContext(&brSC); if ((NS_OK == rv) && (nsnull != brSC)) { const nsStyleFont* font = (const nsStyleFont*) brSC->GetStyleData(eStyleStruct_Font); @@ -3129,7 +3129,7 @@ nsBlockFrame::AppendNewFrames(nsIPresContext& aPresContext, else { // Wrap the frame in a view if necessary nsIStyleContext* kidSC; - frame->GetStyleContext(kidSC); + frame->GetStyleContext(&kidSC); rv = CreateViewForFrame(aPresContext, frame, kidSC, PR_FALSE); NS_RELEASE(kidSC); if (NS_OK != rv) { @@ -3264,7 +3264,7 @@ nsBlockFrame::InsertNewFrames(nsIPresContext& aPresContext, else { // Wrap the frame in a view if necessary nsIStyleContext* kidSC; - newFrame->GetStyleContext(kidSC); + newFrame->GetStyleContext(&kidSC); nsresult rv = CreateViewForFrame(aPresContext, newFrame, kidSC, PR_FALSE); NS_RELEASE(kidSC); if (NS_OK != rv) { @@ -3563,7 +3563,7 @@ IsEmptyLine(nsIPresContext& aPresContext, nsLineBox* aLine) nsIFrame* frame = aLine->mFirstChild; for (i = 0; i < n; i++) { nsIContent* content; - nsresult rv = frame->GetContent(content); + nsresult rv = frame->GetContent(&content); if (NS_FAILED(rv) || (nsnull == content)) { // If it doesn't have any content then this can't be an empty line return PR_FALSE; diff --git a/mozilla/layout/generic/nsBlockReflowState.cpp b/mozilla/layout/generic/nsBlockReflowState.cpp index 0754230db40..af0587bc8be 100644 --- a/mozilla/layout/generic/nsBlockReflowState.cpp +++ b/mozilla/layout/generic/nsBlockReflowState.cpp @@ -2084,7 +2084,7 @@ nsBlockFrame::WillReflowFrame(nsBlockReflowState& aState, if (repairStyleContext) { // Update style context when appropriate nsIStyleContext* kidSC; - aFrame->GetStyleContext(kidSC); + aFrame->GetStyleContext(&kidSC); if (nsnull != kidSC) { nsIStyleContext* kidParentSC; kidParentSC = kidSC->GetParent(); @@ -2668,7 +2668,7 @@ nsBlockFrame::PlaceLine(nsBlockReflowState& aState, // that it can compress with other block margins. nsIStyleContext* brSC; nsIPresContext& px = aState.mPresContext; - nsresult rv = brFrame->GetStyleContext(brSC); + nsresult rv = brFrame->GetStyleContext(&brSC); if ((NS_OK == rv) && (nsnull != brSC)) { const nsStyleFont* font = (const nsStyleFont*) brSC->GetStyleData(eStyleStruct_Font); @@ -3129,7 +3129,7 @@ nsBlockFrame::AppendNewFrames(nsIPresContext& aPresContext, else { // Wrap the frame in a view if necessary nsIStyleContext* kidSC; - frame->GetStyleContext(kidSC); + frame->GetStyleContext(&kidSC); rv = CreateViewForFrame(aPresContext, frame, kidSC, PR_FALSE); NS_RELEASE(kidSC); if (NS_OK != rv) { @@ -3264,7 +3264,7 @@ nsBlockFrame::InsertNewFrames(nsIPresContext& aPresContext, else { // Wrap the frame in a view if necessary nsIStyleContext* kidSC; - newFrame->GetStyleContext(kidSC); + newFrame->GetStyleContext(&kidSC); nsresult rv = CreateViewForFrame(aPresContext, newFrame, kidSC, PR_FALSE); NS_RELEASE(kidSC); if (NS_OK != rv) { @@ -3563,7 +3563,7 @@ IsEmptyLine(nsIPresContext& aPresContext, nsLineBox* aLine) nsIFrame* frame = aLine->mFirstChild; for (i = 0; i < n; i++) { nsIContent* content; - nsresult rv = frame->GetContent(content); + nsresult rv = frame->GetContent(&content); if (NS_FAILED(rv) || (nsnull == content)) { // If it doesn't have any content then this can't be an empty line return PR_FALSE; diff --git a/mozilla/layout/generic/nsBlockReflowState.h b/mozilla/layout/generic/nsBlockReflowState.h index 0754230db40..af0587bc8be 100644 --- a/mozilla/layout/generic/nsBlockReflowState.h +++ b/mozilla/layout/generic/nsBlockReflowState.h @@ -2084,7 +2084,7 @@ nsBlockFrame::WillReflowFrame(nsBlockReflowState& aState, if (repairStyleContext) { // Update style context when appropriate nsIStyleContext* kidSC; - aFrame->GetStyleContext(kidSC); + aFrame->GetStyleContext(&kidSC); if (nsnull != kidSC) { nsIStyleContext* kidParentSC; kidParentSC = kidSC->GetParent(); @@ -2668,7 +2668,7 @@ nsBlockFrame::PlaceLine(nsBlockReflowState& aState, // that it can compress with other block margins. nsIStyleContext* brSC; nsIPresContext& px = aState.mPresContext; - nsresult rv = brFrame->GetStyleContext(brSC); + nsresult rv = brFrame->GetStyleContext(&brSC); if ((NS_OK == rv) && (nsnull != brSC)) { const nsStyleFont* font = (const nsStyleFont*) brSC->GetStyleData(eStyleStruct_Font); @@ -3129,7 +3129,7 @@ nsBlockFrame::AppendNewFrames(nsIPresContext& aPresContext, else { // Wrap the frame in a view if necessary nsIStyleContext* kidSC; - frame->GetStyleContext(kidSC); + frame->GetStyleContext(&kidSC); rv = CreateViewForFrame(aPresContext, frame, kidSC, PR_FALSE); NS_RELEASE(kidSC); if (NS_OK != rv) { @@ -3264,7 +3264,7 @@ nsBlockFrame::InsertNewFrames(nsIPresContext& aPresContext, else { // Wrap the frame in a view if necessary nsIStyleContext* kidSC; - newFrame->GetStyleContext(kidSC); + newFrame->GetStyleContext(&kidSC); nsresult rv = CreateViewForFrame(aPresContext, newFrame, kidSC, PR_FALSE); NS_RELEASE(kidSC); if (NS_OK != rv) { @@ -3563,7 +3563,7 @@ IsEmptyLine(nsIPresContext& aPresContext, nsLineBox* aLine) nsIFrame* frame = aLine->mFirstChild; for (i = 0; i < n; i++) { nsIContent* content; - nsresult rv = frame->GetContent(content); + nsresult rv = frame->GetContent(&content); if (NS_FAILED(rv) || (nsnull == content)) { // If it doesn't have any content then this can't be an empty line return PR_FALSE; diff --git a/mozilla/layout/generic/nsBulletFrame.cpp b/mozilla/layout/generic/nsBulletFrame.cpp index 3d9cd980650..7f584e7456b 100644 --- a/mozilla/layout/generic/nsBulletFrame.cpp +++ b/mozilla/layout/generic/nsBulletFrame.cpp @@ -167,7 +167,7 @@ nsBulletFrame::SetListItemOrdinal(PRInt32 aNextOrdinal) // because our parent is the list-item. nsHTMLValue value; nsIContent* parentContent; - mParent->GetContent(parentContent); + mParent->GetContent(&parentContent); nsIHTMLContent* hc; if (NS_OK == parentContent->QueryInterface(kIHTMLContentIID, (void**) &hc)) { if (NS_CONTENT_ATTR_HAS_VALUE == diff --git a/mozilla/layout/generic/nsFrame.cpp b/mozilla/layout/generic/nsFrame.cpp index 23a55c617ff..6010426408e 100644 --- a/mozilla/layout/generic/nsFrame.cpp +++ b/mozilla/layout/generic/nsFrame.cpp @@ -375,10 +375,11 @@ nsFrame::DeleteFrame(nsIPresContext& aPresContext) } NS_IMETHODIMP -nsFrame::GetContent(nsIContent*& aContent) const +nsFrame::GetContent(nsIContent** aContent) const { + NS_PRECONDITION(nsnull != aContent, "null OUT parameter pointer"); NS_IF_ADDREF(mContent); - aContent = mContent; + *aContent = mContent; return NS_OK; } @@ -392,11 +393,12 @@ nsFrame::GetOffsets(PRInt32 &aStart, PRInt32 &aEnd) const NS_IMETHODIMP -nsFrame::GetStyleContext(nsIStyleContext*& aStyleContext) const +nsFrame::GetStyleContext(nsIStyleContext** aStyleContext) const { + NS_PRECONDITION(nsnull != aStyleContext, "null OUT parameter pointer"); NS_ASSERTION(nsnull != mStyleContext, "frame should always have style context"); NS_IF_ADDREF(mStyleContext); - aStyleContext = mStyleContext; + *aStyleContext = mStyleContext; return NS_OK; } @@ -607,7 +609,7 @@ nsFrame::Paint(nsIPresContext& aPresContext, // Get Content nsIContent* content; - nsresult rv = GetContent(content); + nsresult rv = GetContent(&content); if (NS_FAILED(rv) || (nsnull == content)) { return rv; } @@ -1597,7 +1599,7 @@ PRInt32 nsFrame::ContentIndexInContainer(const nsIFrame* aFrame) nsIContent* content; PRInt32 result = -1; - aFrame->GetContent(content); + aFrame->GetContent(&content); if (nsnull != content) { nsIContent* parentContent; @@ -1937,7 +1939,7 @@ void nsFrame::NewContentIsBefore(nsIPresContext& aPresContext, static void RefreshAllContentFrames(nsIFrame * aFrame, nsIContent * aContent) { nsIContent* frameContent; - aFrame->GetContent(frameContent); + aFrame->GetContent(&frameContent); if (frameContent == aContent) { ForceDrawFrame((nsFrame *)aFrame); } diff --git a/mozilla/layout/generic/nsFrame.h b/mozilla/layout/generic/nsFrame.h index e7a441416bf..87a9680ab83 100644 --- a/mozilla/layout/generic/nsFrame.h +++ b/mozilla/layout/generic/nsFrame.h @@ -132,8 +132,8 @@ public: nsIAtom* aListName, nsIFrame* aOldFrame); NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); - NS_IMETHOD GetContent(nsIContent*& aContent) const; - NS_IMETHOD GetStyleContext(nsIStyleContext*& aStyleContext) const; + NS_IMETHOD GetContent(nsIContent** aContent) const; + NS_IMETHOD GetStyleContext(nsIStyleContext** aStyleContext) const; NS_IMETHOD SetStyleContext(nsIPresContext* aPresContext, nsIStyleContext* aContext); NS_IMETHOD GetStyleData(nsStyleStructID aSID, diff --git a/mozilla/layout/generic/nsFrameFrame.cpp b/mozilla/layout/generic/nsFrameFrame.cpp index d7444fcaf12..5e8e32ff2d7 100644 --- a/mozilla/layout/generic/nsFrameFrame.cpp +++ b/mozilla/layout/generic/nsFrameFrame.cpp @@ -603,7 +603,11 @@ nsHTMLFrameInnerFrame::GetParentContent(nsIContent*& aContent) { nsHTMLFrameOuterFrame* parent; GetParent((nsIFrame*&)parent); - return parent->GetContent((nsIContent*&)aContent); + + nsIContent* content; + nsresult rv = parent->GetContent(&content); + aContent = content; + return rv; } diff --git a/mozilla/layout/generic/nsFrameSetFrame.cpp b/mozilla/layout/generic/nsFrameSetFrame.cpp index 8c8f85a94a3..b19ab59197c 100644 --- a/mozilla/layout/generic/nsFrameSetFrame.cpp +++ b/mozilla/layout/generic/nsFrameSetFrame.cpp @@ -370,7 +370,7 @@ nsHTMLFramesetFrame* nsHTMLFramesetFrame::GetFramesetParent(nsIFrame* aChild) { nsHTMLFramesetFrame* parent = nsnull; nsIContent* content = nsnull; - aChild->GetContent(content); + aChild->GetContent(&content); if (nsnull != content) { nsIContent* contentParent = nsnull; content->GetParent(contentParent); @@ -600,7 +600,7 @@ nsHTMLFramesetFrame::ReflowPlaceChild(nsIFrame* aChild, if (aDrag && aCellIndex && ChildIsFrameset(aChild)) { nsIContent* childContent; - aChild->GetContent(childContent); + aChild->GetContent(&childContent); if (childContent) { nsIAtom* tag; childContent->GetTag(tag); @@ -1237,7 +1237,7 @@ nsHTMLFramesetFrame::GetNoResize(nsIFrame* aChildFrame) { PRBool result = PR_FALSE; nsIContent* content = nsnull; - aChildFrame->GetContent(content); + aChildFrame->GetContent(&content); if (nsnull != content) { nsIHTMLContent* htmlContent = nsnull; content->QueryInterface(kIHTMLContentIID, (void**)&htmlContent); diff --git a/mozilla/layout/generic/nsHTMLContainerFrame.cpp b/mozilla/layout/generic/nsHTMLContainerFrame.cpp index 24903e30d18..33cd4ee6601 100644 --- a/mozilla/layout/generic/nsHTMLContainerFrame.cpp +++ b/mozilla/layout/generic/nsHTMLContainerFrame.cpp @@ -83,14 +83,14 @@ nsHTMLContainerFrame::CreatePlaceholderFrame(nsIPresContext& aPresContext, nsIFrame* aFloatedFrame) { nsIContent* content; - aFloatedFrame->GetContent(content); + aFloatedFrame->GetContent(&content); nsPlaceholderFrame* placeholder; NS_NewPlaceholderFrame((nsIFrame**)&placeholder); // The placeholder frame gets a pseudo style context nsIStyleContext* kidSC; - aFloatedFrame->GetStyleContext(kidSC); + aFloatedFrame->GetStyleContext(&kidSC); nsIStyleContext* placeholderPseudoStyle = aPresContext.ResolvePseudoStyleContextFor(content, nsHTMLAtoms::placeholderPseudo, kidSC); @@ -159,7 +159,7 @@ nsHTMLContainerFrame::CreateNextInFlow(nsIPresContext& aPresContext, nsIFrame* nextFrame; aFrame->GetNextSibling(nextFrame); nsIStyleContext* kidSC; - aFrame->GetStyleContext(kidSC); + aFrame->GetStyleContext(&kidSC); aFrame->CreateContinuingFrame(aPresContext, aOuterFrame, kidSC, nextInFlow); NS_RELEASE(kidSC); @@ -357,9 +357,9 @@ nsHTMLContainerFrame::UpdateStyleContexts(nsIPresContext& aPresContext, nsIFrame* aNewParent) { nsIStyleContext* oldParentSC; - aOldParent->GetStyleContext(oldParentSC); + aOldParent->GetStyleContext(&oldParentSC); nsIStyleContext* newParentSC; - aNewParent->GetStyleContext(newParentSC); + aNewParent->GetStyleContext(&newParentSC); if (oldParentSC != newParentSC) { aFrame->ReResolveStyleContext(&aPresContext, newParentSC); } diff --git a/mozilla/layout/generic/nsHTMLReflowState.cpp b/mozilla/layout/generic/nsHTMLReflowState.cpp index 805193a86cc..563a941d9be 100644 --- a/mozilla/layout/generic/nsHTMLReflowState.cpp +++ b/mozilla/layout/generic/nsHTMLReflowState.cpp @@ -99,7 +99,7 @@ nsHTMLReflowState::DetermineFrameType(nsIPresContext& aPresContext) { nsIAtom* tag = nsnull; nsIContent* content; - if ((NS_OK == frame->GetContent(content)) && (nsnull != content)) { + if (NS_SUCCEEDED(frame->GetContent(&content)) && (nsnull != content)) { content->GetTag(tag); NS_RELEASE(content); } @@ -818,7 +818,7 @@ nsHTMLReflowState::CalcLineHeight(nsIPresContext& aPresContext, { nscoord lineHeight = -1; nsIStyleContext* sc; - aFrame->GetStyleContext(sc); + aFrame->GetStyleContext(&sc); const nsStyleFont* elementFont = nsnull; if (nsnull != sc) { elementFont = (const nsStyleFont*)sc->GetStyleData(eStyleStruct_Font); diff --git a/mozilla/layout/generic/nsIFrame.h b/mozilla/layout/generic/nsIFrame.h index 04b8e2b4fbe..bf447de0770 100644 --- a/mozilla/layout/generic/nsIFrame.h +++ b/mozilla/layout/generic/nsIFrame.h @@ -261,7 +261,7 @@ public: * * @see nsISupports#Release() */ - NS_IMETHOD GetContent(nsIContent*& aContent) const = 0; + NS_IMETHOD GetContent(nsIContent** aContent) const = 0; /** * Get the offsets of the frame. most will be 0,0 @@ -275,7 +275,7 @@ public: * * @see nsISupports#Release() */ - NS_IMETHOD GetStyleContext(nsIStyleContext*& aStyleContext) const = 0; + NS_IMETHOD GetStyleContext(nsIStyleContext** aStyleContext) const = 0; NS_IMETHOD SetStyleContext(nsIPresContext* aPresContext, nsIStyleContext* aContext) = 0; diff --git a/mozilla/layout/generic/nsImageFrame.cpp b/mozilla/layout/generic/nsImageFrame.cpp index e842dc0b832..b4dca343d0c 100644 --- a/mozilla/layout/generic/nsImageFrame.cpp +++ b/mozilla/layout/generic/nsImageFrame.cpp @@ -371,7 +371,7 @@ UpdateImageFrame(nsIPresContext& aPresContext, nsIFrame* aFrame, if (NS_IMAGE_LOAD_STATUS_SIZE_AVAILABLE & aStatus) { // Now that the size is available, trigger a content-changed reflow nsIContent* content = nsnull; - aFrame->GetContent(content); + aFrame->GetContent(&content); if (nsnull != content) { nsIDocument* document = nsnull; content->GetDocument(document); diff --git a/mozilla/layout/generic/nsObjectFrame.cpp b/mozilla/layout/generic/nsObjectFrame.cpp index b4108a69458..94ed7b6463f 100644 --- a/mozilla/layout/generic/nsObjectFrame.cpp +++ b/mozilla/layout/generic/nsObjectFrame.cpp @@ -892,7 +892,7 @@ NS_IMETHODIMP nsPluginInstanceOwner :: GetAttributes(PRUint16& n, nsIContent* iContent; if ((nsnull == mAttrNames) && (nsnull != mOwner)) { - rv = mOwner->GetContent(iContent); + rv = mOwner->GetContent(&iContent); if (NS_SUCCEEDED(rv)) { PRInt32 count; @@ -1043,7 +1043,7 @@ NS_IMETHODIMP nsPluginInstanceOwner :: GetURL(const char *aURL, const char *aTar if (NS_OK == rv) { nsIContent* content = nsnull; - mOwner->GetContent(content); + mOwner->GetContent(&content); rv = lh->OnLinkClick(content, eLinkVerb_Replace, fullurl.GetUnicode(), unitarget.GetUnicode(), nsnull); NS_IF_RELEASE(content); } @@ -1126,7 +1126,7 @@ NS_IMETHODIMP nsPluginInstanceOwner :: GetTagType(nsPluginTagType *result) { nsIContent *cont; - mOwner->GetContent(cont); + mOwner->GetContent(&cont); if (nsnull != cont) { @@ -1169,7 +1169,7 @@ NS_IMETHODIMP nsPluginInstanceOwner :: GetParameters(PRUint16& n, const char*con { nsIContent *cont; - mOwner->GetContent(cont); + mOwner->GetContent(&cont); if (nsnull != cont) { diff --git a/mozilla/layout/generic/nsPageFrame.cpp b/mozilla/layout/generic/nsPageFrame.cpp index b8ca5f23e46..ef0b80b54d1 100644 --- a/mozilla/layout/generic/nsPageFrame.cpp +++ b/mozilla/layout/generic/nsPageFrame.cpp @@ -77,7 +77,7 @@ NS_METHOD nsPageFrame::Reflow(nsIPresContext& aPresContext, // Create a continuing child of the previous page's last child nsIStyleContext* kidSC; - prevLastChild->GetStyleContext(kidSC); + prevLastChild->GetStyleContext(&kidSC); nsIFrame* newFrame; nsresult rv = prevLastChild->CreateContinuingFrame(aPresContext, this, kidSC, diff --git a/mozilla/layout/generic/nsSimplePageSequence.cpp b/mozilla/layout/generic/nsSimplePageSequence.cpp index afdcc277fbe..24555be5a6e 100644 --- a/mozilla/layout/generic/nsSimplePageSequence.cpp +++ b/mozilla/layout/generic/nsSimplePageSequence.cpp @@ -151,7 +151,7 @@ nsSimplePageSequenceFrame::Reflow(nsIPresContext& aPresContext, // The page isn't complete and it doesn't have a next-in-flow so // create a continuing page nsIStyleContext* kidSC; - kidFrame->GetStyleContext(kidSC); + kidFrame->GetStyleContext(&kidSC); nsIFrame* continuingPage; nsresult rv = kidFrame->CreateContinuingFrame(aPresContext, this, kidSC, continuingPage); diff --git a/mozilla/layout/generic/nsTextFrame.cpp b/mozilla/layout/generic/nsTextFrame.cpp index 603ca1967ca..2aefc494733 100644 --- a/mozilla/layout/generic/nsTextFrame.cpp +++ b/mozilla/layout/generic/nsTextFrame.cpp @@ -1459,7 +1459,7 @@ TextFrame::GetPosition(nsIPresContext& aCX, // Find the font metrics for this text nsIStyleContext* styleContext; - aNewFrame->GetStyleContext(styleContext); + aNewFrame->GetStyleContext(&styleContext); const nsStyleFont *font = (const nsStyleFont*) styleContext->GetStyleData(eStyleStruct_Font); NS_RELEASE(styleContext); @@ -2177,7 +2177,7 @@ TextFrame::ComputeTotalWordWidth(nsLineLayout& aLineLayout, nsIFrame* frame = aNextFrame; while (nsnull != frame) { nsIContent* content = nsnull; - if ((NS_OK == frame->GetContent(content)) && (nsnull != content)) { + if ((NS_OK == frame->GetContent(&content)) && (nsnull != content)) { #ifdef DEBUG_WORD_WRAPPING printf(" next textRun="); nsAutoString tmp; @@ -2253,7 +2253,7 @@ TextFrame::ComputeWordFragmentWidth(nsLineLayout& aLineLayout, aStop = contentLen < tx.GetContentLength(); nsIStyleContext* sc; - if ((NS_OK == aTextFrame->GetStyleContext(sc)) && + if ((NS_OK == aTextFrame->GetStyleContext(&sc)) && (nsnull != sc)) { // Measure the piece of text. Note that we have to select the // appropriate font into the text first because the rendering diff --git a/mozilla/layout/generic/nsTextTransformer.cpp b/mozilla/layout/generic/nsTextTransformer.cpp index f90608f636d..db13896ac4e 100644 --- a/mozilla/layout/generic/nsTextTransformer.cpp +++ b/mozilla/layout/generic/nsTextTransformer.cpp @@ -61,7 +61,7 @@ nsTextTransformer::Init(/*nsTextRun& aTextRun, XXX*/ // Get the frames text content nsIContent* content; - aFrame->GetContent(content); + aFrame->GetContent(&content); nsITextContent* tc; if (NS_OK != content->QueryInterface(kITextContentIID, (void**) &tc)) { NS_RELEASE(content); diff --git a/mozilla/layout/html/base/src/nsBlockFrame.cpp b/mozilla/layout/html/base/src/nsBlockFrame.cpp index 0754230db40..af0587bc8be 100644 --- a/mozilla/layout/html/base/src/nsBlockFrame.cpp +++ b/mozilla/layout/html/base/src/nsBlockFrame.cpp @@ -2084,7 +2084,7 @@ nsBlockFrame::WillReflowFrame(nsBlockReflowState& aState, if (repairStyleContext) { // Update style context when appropriate nsIStyleContext* kidSC; - aFrame->GetStyleContext(kidSC); + aFrame->GetStyleContext(&kidSC); if (nsnull != kidSC) { nsIStyleContext* kidParentSC; kidParentSC = kidSC->GetParent(); @@ -2668,7 +2668,7 @@ nsBlockFrame::PlaceLine(nsBlockReflowState& aState, // that it can compress with other block margins. nsIStyleContext* brSC; nsIPresContext& px = aState.mPresContext; - nsresult rv = brFrame->GetStyleContext(brSC); + nsresult rv = brFrame->GetStyleContext(&brSC); if ((NS_OK == rv) && (nsnull != brSC)) { const nsStyleFont* font = (const nsStyleFont*) brSC->GetStyleData(eStyleStruct_Font); @@ -3129,7 +3129,7 @@ nsBlockFrame::AppendNewFrames(nsIPresContext& aPresContext, else { // Wrap the frame in a view if necessary nsIStyleContext* kidSC; - frame->GetStyleContext(kidSC); + frame->GetStyleContext(&kidSC); rv = CreateViewForFrame(aPresContext, frame, kidSC, PR_FALSE); NS_RELEASE(kidSC); if (NS_OK != rv) { @@ -3264,7 +3264,7 @@ nsBlockFrame::InsertNewFrames(nsIPresContext& aPresContext, else { // Wrap the frame in a view if necessary nsIStyleContext* kidSC; - newFrame->GetStyleContext(kidSC); + newFrame->GetStyleContext(&kidSC); nsresult rv = CreateViewForFrame(aPresContext, newFrame, kidSC, PR_FALSE); NS_RELEASE(kidSC); if (NS_OK != rv) { @@ -3563,7 +3563,7 @@ IsEmptyLine(nsIPresContext& aPresContext, nsLineBox* aLine) nsIFrame* frame = aLine->mFirstChild; for (i = 0; i < n; i++) { nsIContent* content; - nsresult rv = frame->GetContent(content); + nsresult rv = frame->GetContent(&content); if (NS_FAILED(rv) || (nsnull == content)) { // If it doesn't have any content then this can't be an empty line return PR_FALSE; diff --git a/mozilla/layout/html/base/src/nsBlockReflowState.cpp b/mozilla/layout/html/base/src/nsBlockReflowState.cpp index 0754230db40..af0587bc8be 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowState.cpp +++ b/mozilla/layout/html/base/src/nsBlockReflowState.cpp @@ -2084,7 +2084,7 @@ nsBlockFrame::WillReflowFrame(nsBlockReflowState& aState, if (repairStyleContext) { // Update style context when appropriate nsIStyleContext* kidSC; - aFrame->GetStyleContext(kidSC); + aFrame->GetStyleContext(&kidSC); if (nsnull != kidSC) { nsIStyleContext* kidParentSC; kidParentSC = kidSC->GetParent(); @@ -2668,7 +2668,7 @@ nsBlockFrame::PlaceLine(nsBlockReflowState& aState, // that it can compress with other block margins. nsIStyleContext* brSC; nsIPresContext& px = aState.mPresContext; - nsresult rv = brFrame->GetStyleContext(brSC); + nsresult rv = brFrame->GetStyleContext(&brSC); if ((NS_OK == rv) && (nsnull != brSC)) { const nsStyleFont* font = (const nsStyleFont*) brSC->GetStyleData(eStyleStruct_Font); @@ -3129,7 +3129,7 @@ nsBlockFrame::AppendNewFrames(nsIPresContext& aPresContext, else { // Wrap the frame in a view if necessary nsIStyleContext* kidSC; - frame->GetStyleContext(kidSC); + frame->GetStyleContext(&kidSC); rv = CreateViewForFrame(aPresContext, frame, kidSC, PR_FALSE); NS_RELEASE(kidSC); if (NS_OK != rv) { @@ -3264,7 +3264,7 @@ nsBlockFrame::InsertNewFrames(nsIPresContext& aPresContext, else { // Wrap the frame in a view if necessary nsIStyleContext* kidSC; - newFrame->GetStyleContext(kidSC); + newFrame->GetStyleContext(&kidSC); nsresult rv = CreateViewForFrame(aPresContext, newFrame, kidSC, PR_FALSE); NS_RELEASE(kidSC); if (NS_OK != rv) { @@ -3563,7 +3563,7 @@ IsEmptyLine(nsIPresContext& aPresContext, nsLineBox* aLine) nsIFrame* frame = aLine->mFirstChild; for (i = 0; i < n; i++) { nsIContent* content; - nsresult rv = frame->GetContent(content); + nsresult rv = frame->GetContent(&content); if (NS_FAILED(rv) || (nsnull == content)) { // If it doesn't have any content then this can't be an empty line return PR_FALSE; diff --git a/mozilla/layout/html/base/src/nsBlockReflowState.h b/mozilla/layout/html/base/src/nsBlockReflowState.h index 0754230db40..af0587bc8be 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowState.h +++ b/mozilla/layout/html/base/src/nsBlockReflowState.h @@ -2084,7 +2084,7 @@ nsBlockFrame::WillReflowFrame(nsBlockReflowState& aState, if (repairStyleContext) { // Update style context when appropriate nsIStyleContext* kidSC; - aFrame->GetStyleContext(kidSC); + aFrame->GetStyleContext(&kidSC); if (nsnull != kidSC) { nsIStyleContext* kidParentSC; kidParentSC = kidSC->GetParent(); @@ -2668,7 +2668,7 @@ nsBlockFrame::PlaceLine(nsBlockReflowState& aState, // that it can compress with other block margins. nsIStyleContext* brSC; nsIPresContext& px = aState.mPresContext; - nsresult rv = brFrame->GetStyleContext(brSC); + nsresult rv = brFrame->GetStyleContext(&brSC); if ((NS_OK == rv) && (nsnull != brSC)) { const nsStyleFont* font = (const nsStyleFont*) brSC->GetStyleData(eStyleStruct_Font); @@ -3129,7 +3129,7 @@ nsBlockFrame::AppendNewFrames(nsIPresContext& aPresContext, else { // Wrap the frame in a view if necessary nsIStyleContext* kidSC; - frame->GetStyleContext(kidSC); + frame->GetStyleContext(&kidSC); rv = CreateViewForFrame(aPresContext, frame, kidSC, PR_FALSE); NS_RELEASE(kidSC); if (NS_OK != rv) { @@ -3264,7 +3264,7 @@ nsBlockFrame::InsertNewFrames(nsIPresContext& aPresContext, else { // Wrap the frame in a view if necessary nsIStyleContext* kidSC; - newFrame->GetStyleContext(kidSC); + newFrame->GetStyleContext(&kidSC); nsresult rv = CreateViewForFrame(aPresContext, newFrame, kidSC, PR_FALSE); NS_RELEASE(kidSC); if (NS_OK != rv) { @@ -3563,7 +3563,7 @@ IsEmptyLine(nsIPresContext& aPresContext, nsLineBox* aLine) nsIFrame* frame = aLine->mFirstChild; for (i = 0; i < n; i++) { nsIContent* content; - nsresult rv = frame->GetContent(content); + nsresult rv = frame->GetContent(&content); if (NS_FAILED(rv) || (nsnull == content)) { // If it doesn't have any content then this can't be an empty line return PR_FALSE; diff --git a/mozilla/layout/html/base/src/nsBulletFrame.cpp b/mozilla/layout/html/base/src/nsBulletFrame.cpp index 3d9cd980650..7f584e7456b 100644 --- a/mozilla/layout/html/base/src/nsBulletFrame.cpp +++ b/mozilla/layout/html/base/src/nsBulletFrame.cpp @@ -167,7 +167,7 @@ nsBulletFrame::SetListItemOrdinal(PRInt32 aNextOrdinal) // because our parent is the list-item. nsHTMLValue value; nsIContent* parentContent; - mParent->GetContent(parentContent); + mParent->GetContent(&parentContent); nsIHTMLContent* hc; if (NS_OK == parentContent->QueryInterface(kIHTMLContentIID, (void**) &hc)) { if (NS_CONTENT_ATTR_HAS_VALUE == diff --git a/mozilla/layout/html/base/src/nsFrame.cpp b/mozilla/layout/html/base/src/nsFrame.cpp index 23a55c617ff..6010426408e 100644 --- a/mozilla/layout/html/base/src/nsFrame.cpp +++ b/mozilla/layout/html/base/src/nsFrame.cpp @@ -375,10 +375,11 @@ nsFrame::DeleteFrame(nsIPresContext& aPresContext) } NS_IMETHODIMP -nsFrame::GetContent(nsIContent*& aContent) const +nsFrame::GetContent(nsIContent** aContent) const { + NS_PRECONDITION(nsnull != aContent, "null OUT parameter pointer"); NS_IF_ADDREF(mContent); - aContent = mContent; + *aContent = mContent; return NS_OK; } @@ -392,11 +393,12 @@ nsFrame::GetOffsets(PRInt32 &aStart, PRInt32 &aEnd) const NS_IMETHODIMP -nsFrame::GetStyleContext(nsIStyleContext*& aStyleContext) const +nsFrame::GetStyleContext(nsIStyleContext** aStyleContext) const { + NS_PRECONDITION(nsnull != aStyleContext, "null OUT parameter pointer"); NS_ASSERTION(nsnull != mStyleContext, "frame should always have style context"); NS_IF_ADDREF(mStyleContext); - aStyleContext = mStyleContext; + *aStyleContext = mStyleContext; return NS_OK; } @@ -607,7 +609,7 @@ nsFrame::Paint(nsIPresContext& aPresContext, // Get Content nsIContent* content; - nsresult rv = GetContent(content); + nsresult rv = GetContent(&content); if (NS_FAILED(rv) || (nsnull == content)) { return rv; } @@ -1597,7 +1599,7 @@ PRInt32 nsFrame::ContentIndexInContainer(const nsIFrame* aFrame) nsIContent* content; PRInt32 result = -1; - aFrame->GetContent(content); + aFrame->GetContent(&content); if (nsnull != content) { nsIContent* parentContent; @@ -1937,7 +1939,7 @@ void nsFrame::NewContentIsBefore(nsIPresContext& aPresContext, static void RefreshAllContentFrames(nsIFrame * aFrame, nsIContent * aContent) { nsIContent* frameContent; - aFrame->GetContent(frameContent); + aFrame->GetContent(&frameContent); if (frameContent == aContent) { ForceDrawFrame((nsFrame *)aFrame); } diff --git a/mozilla/layout/html/base/src/nsFrame.h b/mozilla/layout/html/base/src/nsFrame.h index e7a441416bf..87a9680ab83 100644 --- a/mozilla/layout/html/base/src/nsFrame.h +++ b/mozilla/layout/html/base/src/nsFrame.h @@ -132,8 +132,8 @@ public: nsIAtom* aListName, nsIFrame* aOldFrame); NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); - NS_IMETHOD GetContent(nsIContent*& aContent) const; - NS_IMETHOD GetStyleContext(nsIStyleContext*& aStyleContext) const; + NS_IMETHOD GetContent(nsIContent** aContent) const; + NS_IMETHOD GetStyleContext(nsIStyleContext** aStyleContext) const; NS_IMETHOD SetStyleContext(nsIPresContext* aPresContext, nsIStyleContext* aContext); NS_IMETHOD GetStyleData(nsStyleStructID aSID, diff --git a/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp b/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp index 24903e30d18..33cd4ee6601 100644 --- a/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp +++ b/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp @@ -83,14 +83,14 @@ nsHTMLContainerFrame::CreatePlaceholderFrame(nsIPresContext& aPresContext, nsIFrame* aFloatedFrame) { nsIContent* content; - aFloatedFrame->GetContent(content); + aFloatedFrame->GetContent(&content); nsPlaceholderFrame* placeholder; NS_NewPlaceholderFrame((nsIFrame**)&placeholder); // The placeholder frame gets a pseudo style context nsIStyleContext* kidSC; - aFloatedFrame->GetStyleContext(kidSC); + aFloatedFrame->GetStyleContext(&kidSC); nsIStyleContext* placeholderPseudoStyle = aPresContext.ResolvePseudoStyleContextFor(content, nsHTMLAtoms::placeholderPseudo, kidSC); @@ -159,7 +159,7 @@ nsHTMLContainerFrame::CreateNextInFlow(nsIPresContext& aPresContext, nsIFrame* nextFrame; aFrame->GetNextSibling(nextFrame); nsIStyleContext* kidSC; - aFrame->GetStyleContext(kidSC); + aFrame->GetStyleContext(&kidSC); aFrame->CreateContinuingFrame(aPresContext, aOuterFrame, kidSC, nextInFlow); NS_RELEASE(kidSC); @@ -357,9 +357,9 @@ nsHTMLContainerFrame::UpdateStyleContexts(nsIPresContext& aPresContext, nsIFrame* aNewParent) { nsIStyleContext* oldParentSC; - aOldParent->GetStyleContext(oldParentSC); + aOldParent->GetStyleContext(&oldParentSC); nsIStyleContext* newParentSC; - aNewParent->GetStyleContext(newParentSC); + aNewParent->GetStyleContext(&newParentSC); if (oldParentSC != newParentSC) { aFrame->ReResolveStyleContext(&aPresContext, newParentSC); } diff --git a/mozilla/layout/html/base/src/nsHTMLReflowState.cpp b/mozilla/layout/html/base/src/nsHTMLReflowState.cpp index 805193a86cc..563a941d9be 100644 --- a/mozilla/layout/html/base/src/nsHTMLReflowState.cpp +++ b/mozilla/layout/html/base/src/nsHTMLReflowState.cpp @@ -99,7 +99,7 @@ nsHTMLReflowState::DetermineFrameType(nsIPresContext& aPresContext) { nsIAtom* tag = nsnull; nsIContent* content; - if ((NS_OK == frame->GetContent(content)) && (nsnull != content)) { + if (NS_SUCCEEDED(frame->GetContent(&content)) && (nsnull != content)) { content->GetTag(tag); NS_RELEASE(content); } @@ -818,7 +818,7 @@ nsHTMLReflowState::CalcLineHeight(nsIPresContext& aPresContext, { nscoord lineHeight = -1; nsIStyleContext* sc; - aFrame->GetStyleContext(sc); + aFrame->GetStyleContext(&sc); const nsStyleFont* elementFont = nsnull; if (nsnull != sc) { elementFont = (const nsStyleFont*)sc->GetStyleData(eStyleStruct_Font); diff --git a/mozilla/layout/html/base/src/nsImageFrame.cpp b/mozilla/layout/html/base/src/nsImageFrame.cpp index e842dc0b832..b4dca343d0c 100644 --- a/mozilla/layout/html/base/src/nsImageFrame.cpp +++ b/mozilla/layout/html/base/src/nsImageFrame.cpp @@ -371,7 +371,7 @@ UpdateImageFrame(nsIPresContext& aPresContext, nsIFrame* aFrame, if (NS_IMAGE_LOAD_STATUS_SIZE_AVAILABLE & aStatus) { // Now that the size is available, trigger a content-changed reflow nsIContent* content = nsnull; - aFrame->GetContent(content); + aFrame->GetContent(&content); if (nsnull != content) { nsIDocument* document = nsnull; content->GetDocument(document); diff --git a/mozilla/layout/html/base/src/nsObjectFrame.cpp b/mozilla/layout/html/base/src/nsObjectFrame.cpp index b4108a69458..94ed7b6463f 100644 --- a/mozilla/layout/html/base/src/nsObjectFrame.cpp +++ b/mozilla/layout/html/base/src/nsObjectFrame.cpp @@ -892,7 +892,7 @@ NS_IMETHODIMP nsPluginInstanceOwner :: GetAttributes(PRUint16& n, nsIContent* iContent; if ((nsnull == mAttrNames) && (nsnull != mOwner)) { - rv = mOwner->GetContent(iContent); + rv = mOwner->GetContent(&iContent); if (NS_SUCCEEDED(rv)) { PRInt32 count; @@ -1043,7 +1043,7 @@ NS_IMETHODIMP nsPluginInstanceOwner :: GetURL(const char *aURL, const char *aTar if (NS_OK == rv) { nsIContent* content = nsnull; - mOwner->GetContent(content); + mOwner->GetContent(&content); rv = lh->OnLinkClick(content, eLinkVerb_Replace, fullurl.GetUnicode(), unitarget.GetUnicode(), nsnull); NS_IF_RELEASE(content); } @@ -1126,7 +1126,7 @@ NS_IMETHODIMP nsPluginInstanceOwner :: GetTagType(nsPluginTagType *result) { nsIContent *cont; - mOwner->GetContent(cont); + mOwner->GetContent(&cont); if (nsnull != cont) { @@ -1169,7 +1169,7 @@ NS_IMETHODIMP nsPluginInstanceOwner :: GetParameters(PRUint16& n, const char*con { nsIContent *cont; - mOwner->GetContent(cont); + mOwner->GetContent(&cont); if (nsnull != cont) { diff --git a/mozilla/layout/html/base/src/nsPageFrame.cpp b/mozilla/layout/html/base/src/nsPageFrame.cpp index b8ca5f23e46..ef0b80b54d1 100644 --- a/mozilla/layout/html/base/src/nsPageFrame.cpp +++ b/mozilla/layout/html/base/src/nsPageFrame.cpp @@ -77,7 +77,7 @@ NS_METHOD nsPageFrame::Reflow(nsIPresContext& aPresContext, // Create a continuing child of the previous page's last child nsIStyleContext* kidSC; - prevLastChild->GetStyleContext(kidSC); + prevLastChild->GetStyleContext(&kidSC); nsIFrame* newFrame; nsresult rv = prevLastChild->CreateContinuingFrame(aPresContext, this, kidSC, diff --git a/mozilla/layout/html/base/src/nsPresShell.cpp b/mozilla/layout/html/base/src/nsPresShell.cpp index 960df7a793c..422e22b35a5 100644 --- a/mozilla/layout/html/base/src/nsPresShell.cpp +++ b/mozilla/layout/html/base/src/nsPresShell.cpp @@ -1373,7 +1373,7 @@ FindFrameWithContent(nsIFrame* aFrame, nsIContent* aContent) { nsIContent* frameContent; - aFrame->GetContent(frameContent); + aFrame->GetContent(&frameContent); if (frameContent == aContent) { nsIStyleContext* styleContext; nsIAtom* pseudoTag; @@ -1381,7 +1381,7 @@ FindFrameWithContent(nsIFrame* aFrame, nsIContent* aContent) // If it's a placeholder frame, then ignore it and keep looking for the // primary frame - aFrame->GetStyleContext(styleContext); + aFrame->GetStyleContext(&styleContext); styleContext->GetPseudoType(pseudoTag); if (pseudoTag == nsHTMLAtoms::placeholderPseudo) { isPlaceholder = PR_TRUE; @@ -1532,7 +1532,7 @@ PresShell::HandleEvent(nsIView *aView, //2. Give event to the DOM for third party and JS use. if (nsnull != mCurrentEventFrame && NS_OK == rv) { nsIContent* targetContent; - if (NS_OK == mCurrentEventFrame->GetContent(targetContent) && nsnull != targetContent) { + if (NS_OK == mCurrentEventFrame->GetContent(&targetContent) && nsnull != targetContent) { rv = targetContent->HandleDOMEvent(*mPresContext, (nsEvent*)aEvent, nsnull, DOM_EVENT_INIT, aEventStatus); NS_RELEASE(targetContent); diff --git a/mozilla/layout/html/base/src/nsSimplePageSequence.cpp b/mozilla/layout/html/base/src/nsSimplePageSequence.cpp index afdcc277fbe..24555be5a6e 100644 --- a/mozilla/layout/html/base/src/nsSimplePageSequence.cpp +++ b/mozilla/layout/html/base/src/nsSimplePageSequence.cpp @@ -151,7 +151,7 @@ nsSimplePageSequenceFrame::Reflow(nsIPresContext& aPresContext, // The page isn't complete and it doesn't have a next-in-flow so // create a continuing page nsIStyleContext* kidSC; - kidFrame->GetStyleContext(kidSC); + kidFrame->GetStyleContext(&kidSC); nsIFrame* continuingPage; nsresult rv = kidFrame->CreateContinuingFrame(aPresContext, this, kidSC, continuingPage); diff --git a/mozilla/layout/html/base/src/nsTextFrame.cpp b/mozilla/layout/html/base/src/nsTextFrame.cpp index 603ca1967ca..2aefc494733 100644 --- a/mozilla/layout/html/base/src/nsTextFrame.cpp +++ b/mozilla/layout/html/base/src/nsTextFrame.cpp @@ -1459,7 +1459,7 @@ TextFrame::GetPosition(nsIPresContext& aCX, // Find the font metrics for this text nsIStyleContext* styleContext; - aNewFrame->GetStyleContext(styleContext); + aNewFrame->GetStyleContext(&styleContext); const nsStyleFont *font = (const nsStyleFont*) styleContext->GetStyleData(eStyleStruct_Font); NS_RELEASE(styleContext); @@ -2177,7 +2177,7 @@ TextFrame::ComputeTotalWordWidth(nsLineLayout& aLineLayout, nsIFrame* frame = aNextFrame; while (nsnull != frame) { nsIContent* content = nsnull; - if ((NS_OK == frame->GetContent(content)) && (nsnull != content)) { + if ((NS_OK == frame->GetContent(&content)) && (nsnull != content)) { #ifdef DEBUG_WORD_WRAPPING printf(" next textRun="); nsAutoString tmp; @@ -2253,7 +2253,7 @@ TextFrame::ComputeWordFragmentWidth(nsLineLayout& aLineLayout, aStop = contentLen < tx.GetContentLength(); nsIStyleContext* sc; - if ((NS_OK == aTextFrame->GetStyleContext(sc)) && + if ((NS_OK == aTextFrame->GetStyleContext(&sc)) && (nsnull != sc)) { // Measure the piece of text. Note that we have to select the // appropriate font into the text first because the rendering diff --git a/mozilla/layout/html/base/src/nsTextTransformer.cpp b/mozilla/layout/html/base/src/nsTextTransformer.cpp index f90608f636d..db13896ac4e 100644 --- a/mozilla/layout/html/base/src/nsTextTransformer.cpp +++ b/mozilla/layout/html/base/src/nsTextTransformer.cpp @@ -61,7 +61,7 @@ nsTextTransformer::Init(/*nsTextRun& aTextRun, XXX*/ // Get the frames text content nsIContent* content; - aFrame->GetContent(content); + aFrame->GetContent(&content); nsITextContent* tc; if (NS_OK != content->QueryInterface(kITextContentIID, (void**) &tc)) { NS_RELEASE(content); diff --git a/mozilla/layout/html/document/src/nsFrameFrame.cpp b/mozilla/layout/html/document/src/nsFrameFrame.cpp index d7444fcaf12..5e8e32ff2d7 100644 --- a/mozilla/layout/html/document/src/nsFrameFrame.cpp +++ b/mozilla/layout/html/document/src/nsFrameFrame.cpp @@ -603,7 +603,11 @@ nsHTMLFrameInnerFrame::GetParentContent(nsIContent*& aContent) { nsHTMLFrameOuterFrame* parent; GetParent((nsIFrame*&)parent); - return parent->GetContent((nsIContent*&)aContent); + + nsIContent* content; + nsresult rv = parent->GetContent(&content); + aContent = content; + return rv; } diff --git a/mozilla/layout/html/document/src/nsFrameSetFrame.cpp b/mozilla/layout/html/document/src/nsFrameSetFrame.cpp index 8c8f85a94a3..b19ab59197c 100644 --- a/mozilla/layout/html/document/src/nsFrameSetFrame.cpp +++ b/mozilla/layout/html/document/src/nsFrameSetFrame.cpp @@ -370,7 +370,7 @@ nsHTMLFramesetFrame* nsHTMLFramesetFrame::GetFramesetParent(nsIFrame* aChild) { nsHTMLFramesetFrame* parent = nsnull; nsIContent* content = nsnull; - aChild->GetContent(content); + aChild->GetContent(&content); if (nsnull != content) { nsIContent* contentParent = nsnull; content->GetParent(contentParent); @@ -600,7 +600,7 @@ nsHTMLFramesetFrame::ReflowPlaceChild(nsIFrame* aChild, if (aDrag && aCellIndex && ChildIsFrameset(aChild)) { nsIContent* childContent; - aChild->GetContent(childContent); + aChild->GetContent(&childContent); if (childContent) { nsIAtom* tag; childContent->GetTag(tag); @@ -1237,7 +1237,7 @@ nsHTMLFramesetFrame::GetNoResize(nsIFrame* aChildFrame) { PRBool result = PR_FALSE; nsIContent* content = nsnull; - aChildFrame->GetContent(content); + aChildFrame->GetContent(&content); if (nsnull != content) { nsIHTMLContent* htmlContent = nsnull; content->QueryInterface(kIHTMLContentIID, (void**)&htmlContent); diff --git a/mozilla/layout/html/forms/src/nsButtonControlFrame.cpp b/mozilla/layout/html/forms/src/nsButtonControlFrame.cpp index 41998d359f3..73d19e39b34 100644 --- a/mozilla/layout/html/forms/src/nsButtonControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsButtonControlFrame.cpp @@ -239,7 +239,7 @@ nsButtonControlFrame::MouseClicked(nsIPresContext* aPresContext) nsEvent event; event.eventStructType = NS_EVENT; nsIContent *formContent = nsnull; - mFormFrame->GetContent(formContent); + mFormFrame->GetContent(&formContent); switch(type) { case NS_FORM_INPUT_RESET: diff --git a/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp b/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp index 56838951386..2d11ba809d0 100644 --- a/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp @@ -172,7 +172,11 @@ nsComboboxControlFrame::GetType(PRInt32* aType) const NS_IMETHODIMP nsComboboxControlFrame::GetFormContent(nsIContent*& aContent) const { - return GetContent(aContent); + nsIContent* content; + nsresult rv; + rv = GetContent(&content); + aContent = content; + return rv; } //-------------------------------------------------------------- diff --git a/mozilla/layout/html/forms/src/nsFieldSetFrame.cpp b/mozilla/layout/html/forms/src/nsFieldSetFrame.cpp index f99e63ade3b..aa091695994 100644 --- a/mozilla/layout/html/forms/src/nsFieldSetFrame.cpp +++ b/mozilla/layout/html/forms/src/nsFieldSetFrame.cpp @@ -263,7 +263,7 @@ nsFieldSetFrame::Reflow(nsIPresContext& aPresContext, nsMargin legendMargin; if (mLegendFrame) { nsIStyleContext* legendSC = nsnull; - mLegendFrame->GetStyleContext(legendSC); + mLegendFrame->GetStyleContext(&legendSC); if (legendSC) { const nsStyleSpacing* legendSpacing = (const nsStyleSpacing*)legendSC->GetStyleData(eStyleStruct_Spacing); diff --git a/mozilla/layout/html/forms/src/nsFileControlFrame.cpp b/mozilla/layout/html/forms/src/nsFileControlFrame.cpp index efb631d80da..dcd088a911c 100644 --- a/mozilla/layout/html/forms/src/nsFileControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsFileControlFrame.cpp @@ -327,7 +327,12 @@ nsFileControlFrame::GetFrameName(nsString& aResult) const NS_IMETHODIMP nsFileControlFrame::GetFormContent(nsIContent*& aContent) const { - return GetContent(aContent); + nsIContent* content; + nsresult rv; + + rv = GetContent(&content); + aContent = content; + return rv; } NS_IMETHODIMP diff --git a/mozilla/layout/html/forms/src/nsFormControlFrame.cpp b/mozilla/layout/html/forms/src/nsFormControlFrame.cpp index dc992c6e09b..b9c3eb78f32 100644 --- a/mozilla/layout/html/forms/src/nsFormControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsFormControlFrame.cpp @@ -630,7 +630,12 @@ nsFormControlFrame::Reset() NS_IMETHODIMP nsFormControlFrame::GetFormContent(nsIContent*& aContent) const { - return GetContent(aContent); + nsIContent* content; + nsresult rv; + + rv = GetContent(&content); + aContent = content; + return rv; } NS_IMETHODIMP diff --git a/mozilla/layout/html/forms/src/nsFormFrame.cpp b/mozilla/layout/html/forms/src/nsFormFrame.cpp index 73c63d640f6..c278b1c914c 100644 --- a/mozilla/layout/html/forms/src/nsFormFrame.cpp +++ b/mozilla/layout/html/forms/src/nsFormFrame.cpp @@ -339,7 +339,7 @@ void nsFormFrame::AddFormControlFrame(nsIPresContext& aPresContext, nsIFrame& aF } nsIContent* iContent = nsnull; - aFrame.GetContent(iContent); + aFrame.GetContent(&iContent); if (nsnull != iContent) { nsIFormControl* formControl = nsnull; result = iContent->QueryInterface(kIFormControlIID, (void**)&formControl); @@ -1173,7 +1173,7 @@ nsFormFrame::GetDisabled(nsIFrame* aChildFrame, nsIContent* aContent) nsIContent* content = aContent; if (nsnull == content) { - aChildFrame->GetContent(content); + aChildFrame->GetContent(&content); } if (nsnull != content) { nsIHTMLContent* htmlContent = nsnull; @@ -1199,7 +1199,7 @@ nsFormFrame::GetReadonly(nsIFrame* aChildFrame, nsIContent* aContent) nsIContent* content = aContent; if (nsnull == content) { - aChildFrame->GetContent(content); + aChildFrame->GetContent(&content); } if (nsnull != content) { nsIHTMLContent* htmlContent = nsnull; @@ -1225,7 +1225,7 @@ nsFormFrame::GetName(nsIFrame* aChildFrame, nsString& aName, nsIContent* aConten nsIContent* content = aContent; if (nsnull == content) { - aChildFrame->GetContent(content); + aChildFrame->GetContent(&content); } if (nsnull != content) { nsIHTMLContent* htmlContent = nsnull; @@ -1254,7 +1254,7 @@ nsFormFrame::GetValue(nsIFrame* aChildFrame, nsString& aValue, nsIContent* aCont nsIContent* content = aContent; if (nsnull == content) { - aChildFrame->GetContent(content); + aChildFrame->GetContent(&content); } if (nsnull != content) { nsIHTMLContent* htmlContent = nsnull; diff --git a/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp b/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp index 1ec6153632b..a2c6e1b893d 100644 --- a/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp @@ -366,7 +366,7 @@ void ReflowTemp(nsIPresContext& aPresContext, nsHTMLButtonControlFrame* aFrame, NS_RELEASE(cmd); #else nsIContent* content; - aFrame->GetContent(content); + aFrame->GetContent(&content); if (nsnull != content) { nsIDocument* document; @@ -714,7 +714,12 @@ nsHTMLButtonControlFrame::GetFont(nsIPresContext* aPresContext, NS_IMETHODIMP nsHTMLButtonControlFrame::GetFormContent(nsIContent*& aContent) const { - return GetContent(aContent); + nsIContent* content; + nsresult rv; + + rv = GetContent(&content); + aContent = content; + return rv; } nscoord diff --git a/mozilla/layout/html/forms/src/nsImageControlFrame.cpp b/mozilla/layout/html/forms/src/nsImageControlFrame.cpp index ec69afd5043..8c29d9d3f2d 100644 --- a/mozilla/layout/html/forms/src/nsImageControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsImageControlFrame.cpp @@ -350,7 +350,7 @@ nsImageControlFrame::MouseClicked(nsIPresContext* aPresContext) if ((nsnull != mFormFrame) && !nsFormFrame::GetDisabled(this)) { nsIContent *formContent = nsnull; - mFormFrame->GetContent(formContent); + mFormFrame->GetContent(&formContent); nsEventStatus status; nsEvent event; @@ -377,7 +377,12 @@ nsImageControlFrame::GetFont(nsIPresContext* aPresContext, NS_IMETHODIMP nsImageControlFrame::GetFormContent(nsIContent*& aContent) const { - return GetContent(aContent); + nsIContent* content; + nsresult rv; + + rv = GetContent(&content); + aContent = content; + return rv; } nscoord diff --git a/mozilla/layout/html/forms/src/nsListControlFrame.cpp b/mozilla/layout/html/forms/src/nsListControlFrame.cpp index b171cff3b87..bc3b56609f0 100644 --- a/mozilla/layout/html/forms/src/nsListControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsListControlFrame.cpp @@ -195,7 +195,7 @@ nsListControlFrame::GetFrameForPointUsing(const nsPoint& aPoint, tmp.MoveTo(aPoint.x - kidRect.x, aPoint.y - kidRect.y); nsIContent * content; - kid->GetContent(content); + kid->GetContent(&content); static NS_DEFINE_IID(kIDOMHTMLOptionElementIID, NS_IDOMHTMLOPTIONELEMENT_IID); nsIDOMHTMLOptionElement* oe; if (content && (NS_OK == content->QueryInterface(kIDOMHTMLOptionElementIID, (void**) &oe))) { @@ -365,7 +365,7 @@ nsListControlFrame::GetOptionFromChild(nsIFrame* aParentFrame) aParentFrame->FirstChild(nsnull, kid); while (nsnull != kid) { nsIContent * content; - kid->GetContent(content); + kid->GetContent(&content); static NS_DEFINE_IID(kIDOMHTMLOptionElementIID, NS_IDOMHTMLOPTIONELEMENT_IID); nsIDOMHTMLOptionElement* element; if (content && (NS_OK == content->QueryInterface(kIDOMHTMLOptionElementIID, (void**) &element))) { @@ -387,7 +387,12 @@ nsListControlFrame::GetOptionFromChild(nsIFrame* aParentFrame) NS_IMETHODIMP nsListControlFrame::GetFormContent(nsIContent*& aContent) const { - return GetContent(aContent); + nsIContent* content; + nsresult rv; + + rv = GetContent(&content); + aContent = content; + return rv; } //-------------------------------------------------------------- @@ -427,7 +432,9 @@ PRInt32 nsListControlFrame::SetContentSelected(nsIFrame * aHitFrame, while (nsnull != kid) { if (kid == aHitFrame) { NS_IF_RELEASE(aHitContent); - kid->GetContent(aHitContent); + nsIContent* content; + kid->GetContent(&content); + aHitContent = content; aHitContent->SetAttribute(kNameSpaceID_HTML, nsHTMLAtoms::kClass, (aIsSelected?kSelectedFocus:kNormal), PR_TRUE); return index; } @@ -445,7 +452,7 @@ void nsListControlFrame::ClearSelection() mContentFrame->FirstChild(nsnull, kid); while (nsnull != kid) { nsIContent * content; - kid->GetContent(content); + kid->GetContent(&content); if (mIsFrameSelected[i]) { if (i != mSelectedIndex) { content->SetAttribute(kNameSpaceID_HTML, nsHTMLAtoms::kClass, kNormal, PR_TRUE); @@ -478,7 +485,7 @@ void nsListControlFrame::ExtendedSelection(PRInt32 aStartIndex, PRInt32 aEndInde mContentFrame->FirstChild(nsnull, kid); while (nsnull != kid) { nsIContent * content; - kid->GetContent(content); + kid->GetContent(&content); if (i == startInx) { startInverting = PR_TRUE; } @@ -1031,7 +1038,7 @@ nsListControlFrame::AboutToDropDown() mContentFrame->FirstChild(nsnull, kid); while (nsnull != kid) { nsIContent * content; - kid->GetContent(content); + kid->GetContent(&content); if (i == mSelectedIndex) { mSelectedContent = content; mSelectedFrame = kid; @@ -1059,7 +1066,7 @@ nsListControlFrame::InitializeFromContent(PRBool aDoDisplay) mContentFrame->FirstChild(nsnull, kid); while (nsnull != kid) { nsIContent * content; - kid->GetContent(content); + kid->GetContent(&content); nsIDOMHTMLOptionElement* option = nsnull; nsresult result = content->QueryInterface(kIDOMHTMLOptionElementIID, (void**)&option); diff --git a/mozilla/layout/html/forms/src/nsTextControlFrame.cpp b/mozilla/layout/html/forms/src/nsTextControlFrame.cpp index dd8a86b4ff4..b1de76fccd6 100644 --- a/mozilla/layout/html/forms/src/nsTextControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsTextControlFrame.cpp @@ -210,7 +210,7 @@ nsTextControlFrame::EnterPressed(nsIPresContext& aPresContext) if (mFormFrame && mFormFrame->CanSubmit(*this)) { nsIContent *formContent = nsnull; - mFormFrame->GetContent(formContent); + mFormFrame->GetContent(&formContent); if (nsnull != formContent) { nsEvent event; nsEventStatus status = nsEventStatus_eIgnore; diff --git a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp index 2612aece0d2..1225f70aa1e 100644 --- a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -297,7 +297,7 @@ nsCSSFrameConstructor::ConstructTableFrame(nsIPresContext* aPresContext, nsHTMLContainerFrame::CreateViewForFrame(*aPresContext, aNewFrame, aStyleContext, PR_FALSE); nsIStyleContext* parentStyleContext; - aParentFrame->GetStyleContext(parentStyleContext); + aParentFrame->GetStyleContext(&parentStyleContext); #if 0 nsIStyleContext *outerStyleContext = aPresContext->ResolvePseudoStyleContextFor(aContent, nsHTMLAtoms::tableOuterPseudo, parentStyleContext); @@ -416,7 +416,7 @@ nsCSSFrameConstructor::ConstructAnonymousTableFrame (nsIPresContext* aPresConte nsresult result = NS_OK; if (NS_SUCCEEDED(result)) { nsIStyleContext* parentStyleContext = nsnull; - result = aParentFrame->GetStyleContext(parentStyleContext); + result = aParentFrame->GetStyleContext(&parentStyleContext); if (NS_SUCCEEDED(result)) { // create the outer table frames nsIStyleContext* outerStyleContext = @@ -471,7 +471,7 @@ nsCSSFrameConstructor::ConstructTableCaptionFrame(nsIPresContext* aPresContext, nsIFrame* outerFrame; ConstructAnonymousTableFrame(aPresContext, aContent, aParentFrame, outerFrame, innerFrame, aFixedItems); nsIStyleContext* outerStyleContext; - outerFrame->GetStyleContext(outerStyleContext); + outerFrame->GetStyleContext(&outerStyleContext); nsIStyleContext* adjStyleContext = aPresContext->ResolveStyleContextFor(aContent, outerStyleContext); aNewCaptionFrame->Init(*aPresContext, aContent, outerFrame, adjStyleContext); @@ -516,7 +516,7 @@ nsCSSFrameConstructor::ConstructTableGroupFrame(nsIPresContext* aPresContext, nsIStyleContext* styleContextRelease = nsnull; nsIStyleContext* parentStyleContext; - aParentFrame->GetStyleContext(parentStyleContext); + aParentFrame->GetStyleContext(&parentStyleContext); const nsStyleDisplay* parentDisplay = (const nsStyleDisplay*) parentStyleContext->GetStyleData(eStyleStruct_Display); @@ -534,7 +534,7 @@ nsCSSFrameConstructor::ConstructTableGroupFrame(nsIPresContext* aPresContext, nsIFrame* outerFrame; ConstructAnonymousTableFrame(aPresContext, aContent, aParentFrame, outerFrame, innerFrame, aFixedItems); nsIStyleContext* innerStyleContext; - innerFrame->GetStyleContext(innerStyleContext); + innerFrame->GetStyleContext(&innerStyleContext); if (contentDisplayIsGroup) { styleContext = aPresContext->ResolveStyleContextFor(aContent, innerStyleContext); } else { @@ -658,7 +658,7 @@ nsCSSFrameConstructor::ConstructTableRowFrame(nsIPresContext* aPresContext, (NS_STYLE_DISPLAY_TABLE_FOOTER_GROUP == parentDisplay->mDisplay)) { if (!contentDisplayIsRow) { // content is from some (soon to be) child of ours aParentFrame = TableGetAsNonScrollFrame(aPresContext, aParentFrame, parentDisplay); - aParentFrame->GetStyleContext(groupStyleContext); + aParentFrame->GetStyleContext(&groupStyleContext); styleContext = aPresContext->ResolvePseudoStyleContextFor(aContent, nsHTMLAtoms::tableRowPseudo, groupStyleContext); } @@ -673,7 +673,7 @@ nsCSSFrameConstructor::ConstructTableRowFrame(nsIPresContext* aPresContext, aAbsoluteItems, PR_TRUE, aNewTopMostFrame, groupFrame, aFixedItems, toDo); if (NS_SUCCEEDED(rv)) { - groupFrame->GetStyleContext(groupStyleContext); + groupFrame->GetStyleContext(&groupStyleContext); if (contentDisplayIsRow) { styleContext = aPresContext->ResolveStyleContextFor(aContent, groupStyleContext); } else { @@ -755,7 +755,7 @@ nsCSSFrameConstructor::ConstructTableColFrame(nsIPresContext* aPresContext, groupFrame, aFixedItems); if (NS_SUCCEEDED(rv)) { nsIStyleContext* groupStyleContext; - groupFrame->GetStyleContext(groupStyleContext); + groupFrame->GetStyleContext(&groupStyleContext); nsIStyleContext* styleContext = aPresContext->ResolveStyleContextFor(aContent, groupStyleContext); rv = NS_NewTableColFrame(aNewColFrame); aNewColFrame->Init(*aPresContext, aContent, groupFrame, styleContext); @@ -796,7 +796,7 @@ nsCSSFrameConstructor::ConstructTableCellFrame(nsIPresContext* aPresContext, PRBool contentDisplayIsCell = (NS_STYLE_DISPLAY_TABLE_CELL == display->mDisplay); nsIStyleContext* parentStyleContext; - aParentFrame->GetStyleContext(parentStyleContext); + aParentFrame->GetStyleContext(&parentStyleContext); const nsStyleDisplay* parentDisplay = (const nsStyleDisplay*) parentStyleContext->GetStyleData(eStyleStruct_Display); @@ -822,7 +822,7 @@ nsCSSFrameConstructor::ConstructTableCellFrame(nsIPresContext* aPresContext, aAbsoluteItems, aNewTopMostFrame, rowFrame, aFixedItems, &toDo); if (NS_SUCCEEDED(rv)) { nsIStyleContext* rowStyleContext; - rowFrame->GetStyleContext(rowStyleContext); + rowFrame->GetStyleContext(&rowStyleContext); if (contentDisplayIsCell) { styleContext = aPresContext->ResolveStyleContextFor(aContent, rowStyleContext); } else { @@ -918,7 +918,7 @@ nsCSSFrameConstructor::TableProcessChildren(nsIPresContext* aPresContext, PRInt32 count; nsIStyleContext* parentStyleContext; - aParentFrame->GetStyleContext(parentStyleContext); + aParentFrame->GetStyleContext(&parentStyleContext); aContent->ChildCount(count); for (PRInt32 i = 0; i < count; i++) { @@ -1053,7 +1053,7 @@ nsCSSFrameConstructor:: GetDisplay(nsIFrame* aFrame) return nsnull; } nsIStyleContext* styleContext = nsnull; - aFrame->GetStyleContext(styleContext); + aFrame->GetStyleContext(&styleContext); const nsStyleDisplay* display = (const nsStyleDisplay*)styleContext->GetStyleData(eStyleStruct_Display); NS_RELEASE(styleContext); @@ -2538,12 +2538,12 @@ nsCSSFrameConstructor::ConstructFrame(nsIPresContext* aPresContext, nsIStyleContext* styleContext; nsIStyleContext* parentStyleContext; - aParentFrame->GetStyleContext(parentStyleContext); + aParentFrame->GetStyleContext(&parentStyleContext); if (nsLayoutAtoms::textTagName == tag) { // Use a special pseudo element style context for text nsIContent* parentContent = nsnull; if (nsnull != aParentFrame) { - aParentFrame->GetContent(parentContent); + aParentFrame->GetContent(&parentContent); } styleContext = aPresContext->ResolvePseudoStyleContextFor(parentContent, nsHTMLAtoms::textPseudo, @@ -2554,7 +2554,7 @@ nsCSSFrameConstructor::ConstructFrame(nsIPresContext* aPresContext, // Use a special pseudo element style context for comments nsIContent* parentContent = nsnull; if (nsnull != aParentFrame) { - aParentFrame->GetContent(parentContent); + aParentFrame->GetContent(&parentContent); } styleContext = aPresContext->ResolvePseudoStyleContextFor(parentContent, nsHTMLAtoms::commentPseudo, @@ -2650,7 +2650,7 @@ nsCSSFrameConstructor::ReconstructFrames(nsIPresContext* aPresContext, nsIStyleContext* rootPseudoStyle; nsAbsoluteItems fixedItems(nsnull); // XXX FIX ME... - aParentFrame->GetStyleContext(rootPseudoStyle); + aParentFrame->GetStyleContext(&rootPseudoStyle); rv = ConstructDocElementFrame(aPresContext, aContent, aParentFrame, rootPseudoStyle, newChild, fixedItems); @@ -3258,7 +3258,7 @@ nsCSSFrameConstructor::AttributeChanged(nsIPresContext* aPresContext, // is there? if (nsnull != frame) { nsIStyleContext* frameContext; - frame->GetStyleContext(frameContext); + frame->GetStyleContext(&frameContext); NS_ASSERTION(nsnull != frameContext, "frame must have style context"); if (nsnull != frameContext) { nsIStyleContext* parentContext = frameContext->GetParent(); @@ -3316,7 +3316,7 @@ nsCSSFrameConstructor::StyleRuleChanged(nsIPresContext* aPresContext, if (restyle) { nsIStyleContext* sc; - frame->GetStyleContext(sc); + frame->GetStyleContext(&sc); sc->RemapStyle(aPresContext); NS_RELEASE(sc); @@ -3435,8 +3435,8 @@ nsCSSFrameConstructor::ConstructAlternateImageFrame(nsIPresContext* aPresContext nsIStyleContext* parentStyleContext; nsIContent* parentContent; - aParentFrame->GetContent(parentContent); - aParentFrame->GetStyleContext(parentStyleContext); + aParentFrame->GetContent(&parentContent); + aParentFrame->GetStyleContext(&parentStyleContext); textStyleContext = aPresContext->ResolvePseudoStyleContextFor (parentContent, nsHTMLAtoms::textPseudo, parentStyleContext); NS_RELEASE(parentStyleContext); @@ -3470,7 +3470,7 @@ nsCSSFrameConstructor::CantRenderReplacedElement(nsIPresContext* aPresContext, aFrame->GetParent(parentFrame); // Get the content object associated with aFrame - aFrame->GetContent(content); + aFrame->GetContent(&content); NS_ASSERTION(nsnull != content, "null content object"); content->GetTag(tag); diff --git a/mozilla/layout/html/table/src/nsTableCellFrame.cpp b/mozilla/layout/html/table/src/nsTableCellFrame.cpp index efc0491e1ba..3ae9823e8e0 100644 --- a/mozilla/layout/html/table/src/nsTableCellFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableCellFrame.cpp @@ -576,7 +576,7 @@ nsTableCellFrame::CreateContinuingFrame(nsIPresContext& aPresContext, nsIStyleContext* kidSC; nsIFrame* firstKid = mFrames.FirstChild(); - firstKid->GetStyleContext(kidSC); + firstKid->GetStyleContext(&kidSC); firstKid->CreateContinuingFrame(aPresContext, cf, kidSC, childList); NS_RELEASE(kidSC); cf->SetInitialChildList(aPresContext, nsnull, childList); @@ -616,7 +616,7 @@ void nsTableCellFrame::MapHTMLBorderStyle(nsIPresContext* aPresContext, nsTableFrame::GetTableFrame(this, tableFrame); nsIStyleContext* styleContext = nsnull; - tableFrame->GetStyleContext(styleContext); + tableFrame->GetStyleContext(&styleContext); const nsStyleColor* colorData = nsStyleUtil::FindNonTransparentBackground(styleContext); diff --git a/mozilla/layout/html/table/src/nsTableColGroupFrame.cpp b/mozilla/layout/html/table/src/nsTableColGroupFrame.cpp index f3b88655f9d..960e1d48026 100644 --- a/mozilla/layout/html/table/src/nsTableColGroupFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableColGroupFrame.cpp @@ -522,7 +522,7 @@ NS_METHOD nsTableColGroupFrame::SetStyleContextForFirstPass(nsIPresContext& aPre { nsIStyleContextPtr colStyleContext; nsStylePosition * colPosition=nsnull; - colFrame->GetStyleContext(colStyleContext.AssignRef()); + colFrame->GetStyleContext(colStyleContext.AssignPtr()); colPosition = (nsStylePosition*)colStyleContext->GetMutableStyleData(eStyleStruct_Position); if (colIndexmWidth.GetUnit()) { // notice how we defer getting a mutable style context until we're sure we really need one - colFrame->GetStyleContext(colStyleContext.AssignRef()); + colFrame->GetStyleContext(colStyleContext.AssignPtr()); nsStylePosition * mutableColPosition = (nsStylePosition*)colStyleContext->GetMutableStyleData(eStyleStruct_Position); mutableColPosition->mWidth = position->mWidth; colStyleContext->RecalcAutomaticData(&aPresContext); diff --git a/mozilla/layout/html/table/src/nsTableFrame.cpp b/mozilla/layout/html/table/src/nsTableFrame.cpp index ca4c8e4476d..04c8857fc20 100644 --- a/mozilla/layout/html/table/src/nsTableFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableFrame.cpp @@ -706,12 +706,12 @@ void nsTableFrame::EnsureColumns(nsIPresContext& aPresContext) if (PR_TRUE==gsDebug) printf("EnsureColumns:creating colgroup frame\n"); // Resolve style for the colgroup frame // first, need to get the nearest containing content object - GetContent(lastColGroupElement); // ADDREF a: lastColGroupElement++ (either here or in the loop below) + GetContent(&lastColGroupElement); // ADDREF a: lastColGroupElement++ (either here or in the loop below) nsIFrame *parentFrame; GetParent(parentFrame); while (nsnull==lastColGroupElement) { - parentFrame->GetContent(lastColGroupElement); + parentFrame->GetContent(&lastColGroupElement); if (nsnull==lastColGroupElement) parentFrame->GetParent(parentFrame); } @@ -732,7 +732,7 @@ void nsTableFrame::EnsureColumns(nsIPresContext& aPresContext) } else { - lastColGroupFrame->GetContent((nsIContent *&)lastColGroupElement); // ADDREF b: lastColGroupElement++ + lastColGroupFrame->GetContent(&lastColGroupElement); // ADDREF b: lastColGroupElement++ } // XXX It would be better to do this in the style code while constructing @@ -743,7 +743,7 @@ void nsTableFrame::EnsureColumns(nsIPresContext& aPresContext) nsIFrame* firstNewColFrame = nsnull; nsIFrame* lastNewColFrame = nsnull; nsIStyleContextPtr lastColGroupStyle; - lastColGroupFrame->GetStyleContext(lastColGroupStyle.AssignRef()); + lastColGroupFrame->GetStyleContext(lastColGroupStyle.AssignPtr()); for ( ; excessColumns > 0; excessColumns--) { // Create a new col frame @@ -3318,7 +3318,7 @@ NS_METHOD nsTableFrame::ReflowMappedChildren(nsIPresContext& aPresContext, nsIFrame* continuingFrame; nsIStyleContext* kidSC; - kidFrame->GetStyleContext(kidSC); + kidFrame->GetStyleContext(&kidSC); kidFrame->CreateContinuingFrame(aPresContext, this, kidSC, continuingFrame); NS_RELEASE(kidSC); NS_ASSERTION(nsnull != continuingFrame, "frame creation failed"); @@ -3470,7 +3470,7 @@ NS_METHOD nsTableFrame::PullUpChildren(nsIPresContext& aPresContext, nsIFrame* continuingFrame; nsIStyleContext* kidSC; - kidFrame->GetStyleContext(kidSC); + kidFrame->GetStyleContext(&kidSC); kidFrame->CreateContinuingFrame(aPresContext, this, kidSC, continuingFrame); NS_RELEASE(kidSC); NS_ASSERTION(nsnull != continuingFrame, "frame creation failed"); @@ -3850,7 +3850,7 @@ nsTableFrame::SetColumnStyleFromCell(nsIPresContext & aPresContext, } // get the column style nsIStyleContext *colSC; - colFrame->GetStyleContext(colSC); + colFrame->GetStyleContext(&colSC); nsStylePosition* colPosition = (nsStylePosition*) colSC->GetMutableStyleData(eStyleStruct_Position); // if colSpan==1, then we can just set the column width if (1==colSpan) @@ -4190,7 +4190,7 @@ nsTableFrame::CreateContinuingFrame(nsIPresContext& aPresContext, for ( ; nsnull!=rg; index++) { nsIContent *content = nsnull; - rg->GetContent(content); // content: REFCNT++ + rg->GetContent(&content); // content: REFCNT++ NS_ASSERTION(nsnull!=content, "bad frame, returned null content."); const nsStyleDisplay* display; //XXX: TROY: this was just this->GetStyleData which can't be right diff --git a/mozilla/layout/html/table/src/nsTableOuterFrame.cpp b/mozilla/layout/html/table/src/nsTableOuterFrame.cpp index ad9b7729cb4..d4a512d1a05 100644 --- a/mozilla/layout/html/table/src/nsTableOuterFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableOuterFrame.cpp @@ -1103,7 +1103,7 @@ nsTableOuterFrame::CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* childList; nsIStyleContext* kidSC; - mInnerTableFrame->GetStyleContext(kidSC); + mInnerTableFrame->GetStyleContext(&kidSC); mInnerTableFrame->CreateContinuingFrame(aPresContext, cf, kidSC, childList); NS_RELEASE(kidSC); cf->SetInitialChildList(aPresContext, nsnull, childList); diff --git a/mozilla/layout/html/table/src/nsTableRowFrame.cpp b/mozilla/layout/html/table/src/nsTableRowFrame.cpp index d80c817ec36..3d34dc6c448 100644 --- a/mozilla/layout/html/table/src/nsTableRowFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableRowFrame.cpp @@ -139,7 +139,7 @@ nsTableRowFrame::InitChildren(PRInt32 aRowIndex) * see nsHTMLStyleSheet::RulesMatching */ nsIContent* cell; - kidFrame->GetContent(cell); + kidFrame->GetContent(&cell); nsIHTMLTableCellElement *cellContent = nsnull; nsresult rv = cell->QueryInterface(kIHTMLTableCellElementIID, (void **)&cellContent); // cellContent: REFCNT++ @@ -637,7 +637,7 @@ NS_METHOD nsTableRowFrame::ResizeReflow(nsIPresContext& aPresContext, nscoord specifiedHeight = 0; nscoord cellHeight = desiredSize.height; nsIStyleContextPtr kidSC; - kidFrame->GetStyleContext(kidSC.AssignRef()); + kidFrame->GetStyleContext(kidSC.AssignPtr()); const nsStylePosition* kidPosition = (const nsStylePosition*) kidSC->GetStyleData(eStyleStruct_Position); switch (kidPosition->mHeight.GetUnit()) { @@ -882,7 +882,7 @@ NS_METHOD nsTableRowFrame::RecoverState(nsIPresContext& aPresContext, // See if it has a specified height that overrides the desired size nscoord specifiedHeight = 0; nsIStyleContextPtr kidSC; - frame->GetStyleContext(kidSC.AssignRef()); + frame->GetStyleContext(kidSC.AssignPtr()); const nsStylePosition* kidPosition = (const nsStylePosition*) kidSC->GetStyleData(eStyleStruct_Position); switch (kidPosition->mHeight.GetUnit()) { @@ -1305,7 +1305,7 @@ NS_METHOD nsTableRowFrame::IR_TargetIsChild(nsIPresContext& aPresContext, nscoord specifiedHeight = 0; nscoord cellHeight = desiredSize.height; nsIStyleContextPtr kidSC; - aNextFrame->GetStyleContext(kidSC.AssignRef()); + aNextFrame->GetStyleContext(kidSC.AssignPtr()); const nsStylePosition* kidPosition = (const nsStylePosition*) kidSC->GetStyleData(eStyleStruct_Position); switch (kidPosition->mHeight.GetUnit()) { @@ -1475,7 +1475,7 @@ nsTableRowFrame::CreateContinuingFrame(nsIPresContext& aPresContext, nsIStyleContext* kidSC; // Create a continuing cell frame - kidFrame->GetStyleContext(kidSC); + kidFrame->GetStyleContext(&kidSC); kidFrame->CreateContinuingFrame(aPresContext, cf, kidSC, contCellFrame); NS_RELEASE(kidSC); diff --git a/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp b/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp index a6063fba31a..33eb3b80d91 100644 --- a/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp @@ -592,7 +592,7 @@ NS_METHOD nsTableRowGroupFrame::PullUpChildren(nsIPresContext& aPresContext // prepares it for reflow. nsIFrame* continuingFrame; nsIStyleContext* kidSC; - kidFrame->GetStyleContext(kidSC); + kidFrame->GetStyleContext(&kidSC); kidFrame->CreateContinuingFrame(aPresContext, this, kidSC, continuingFrame); NS_RELEASE(kidSC); @@ -901,7 +901,7 @@ nsTableRowGroupFrame::SplitRowGroup(nsIPresContext& aPresContext, nsIFrame* continuingFrame; nsIStyleContext* kidSC; - kidFrame->GetStyleContext(kidSC); + kidFrame->GetStyleContext(&kidSC); kidFrame->CreateContinuingFrame(aPresContext, this, kidSC, continuingFrame); NS_RELEASE(kidSC); diff --git a/mozilla/layout/style/nsStyleContext.cpp b/mozilla/layout/style/nsStyleContext.cpp index a5effb1a562..92e9511f914 100644 --- a/mozilla/layout/style/nsStyleContext.cpp +++ b/mozilla/layout/style/nsStyleContext.cpp @@ -140,7 +140,7 @@ static nscoord CalcSideFor(const nsIFrame* aFrame, const nsStyleCoord& aCoord, aFrame->GetParent(parentFrame); // XXX may not be direct parent... if (nsnull != parentFrame) { nsIStyleContext* parentContext; - parentFrame->GetStyleContext(parentContext); + parentFrame->GetStyleContext(&parentContext); if (nsnull != parentContext) { const nsStyleSpacing* parentSpacing = (const nsStyleSpacing*)parentContext->GetStyleData(eStyleStruct_Spacing); nsMargin parentMargin; diff --git a/mozilla/layout/tables/nsTableCellFrame.cpp b/mozilla/layout/tables/nsTableCellFrame.cpp index efc0491e1ba..3ae9823e8e0 100644 --- a/mozilla/layout/tables/nsTableCellFrame.cpp +++ b/mozilla/layout/tables/nsTableCellFrame.cpp @@ -576,7 +576,7 @@ nsTableCellFrame::CreateContinuingFrame(nsIPresContext& aPresContext, nsIStyleContext* kidSC; nsIFrame* firstKid = mFrames.FirstChild(); - firstKid->GetStyleContext(kidSC); + firstKid->GetStyleContext(&kidSC); firstKid->CreateContinuingFrame(aPresContext, cf, kidSC, childList); NS_RELEASE(kidSC); cf->SetInitialChildList(aPresContext, nsnull, childList); @@ -616,7 +616,7 @@ void nsTableCellFrame::MapHTMLBorderStyle(nsIPresContext* aPresContext, nsTableFrame::GetTableFrame(this, tableFrame); nsIStyleContext* styleContext = nsnull; - tableFrame->GetStyleContext(styleContext); + tableFrame->GetStyleContext(&styleContext); const nsStyleColor* colorData = nsStyleUtil::FindNonTransparentBackground(styleContext); diff --git a/mozilla/layout/tables/nsTableColGroupFrame.cpp b/mozilla/layout/tables/nsTableColGroupFrame.cpp index f3b88655f9d..960e1d48026 100644 --- a/mozilla/layout/tables/nsTableColGroupFrame.cpp +++ b/mozilla/layout/tables/nsTableColGroupFrame.cpp @@ -522,7 +522,7 @@ NS_METHOD nsTableColGroupFrame::SetStyleContextForFirstPass(nsIPresContext& aPre { nsIStyleContextPtr colStyleContext; nsStylePosition * colPosition=nsnull; - colFrame->GetStyleContext(colStyleContext.AssignRef()); + colFrame->GetStyleContext(colStyleContext.AssignPtr()); colPosition = (nsStylePosition*)colStyleContext->GetMutableStyleData(eStyleStruct_Position); if (colIndexmWidth.GetUnit()) { // notice how we defer getting a mutable style context until we're sure we really need one - colFrame->GetStyleContext(colStyleContext.AssignRef()); + colFrame->GetStyleContext(colStyleContext.AssignPtr()); nsStylePosition * mutableColPosition = (nsStylePosition*)colStyleContext->GetMutableStyleData(eStyleStruct_Position); mutableColPosition->mWidth = position->mWidth; colStyleContext->RecalcAutomaticData(&aPresContext); diff --git a/mozilla/layout/tables/nsTableFrame.cpp b/mozilla/layout/tables/nsTableFrame.cpp index ca4c8e4476d..04c8857fc20 100644 --- a/mozilla/layout/tables/nsTableFrame.cpp +++ b/mozilla/layout/tables/nsTableFrame.cpp @@ -706,12 +706,12 @@ void nsTableFrame::EnsureColumns(nsIPresContext& aPresContext) if (PR_TRUE==gsDebug) printf("EnsureColumns:creating colgroup frame\n"); // Resolve style for the colgroup frame // first, need to get the nearest containing content object - GetContent(lastColGroupElement); // ADDREF a: lastColGroupElement++ (either here or in the loop below) + GetContent(&lastColGroupElement); // ADDREF a: lastColGroupElement++ (either here or in the loop below) nsIFrame *parentFrame; GetParent(parentFrame); while (nsnull==lastColGroupElement) { - parentFrame->GetContent(lastColGroupElement); + parentFrame->GetContent(&lastColGroupElement); if (nsnull==lastColGroupElement) parentFrame->GetParent(parentFrame); } @@ -732,7 +732,7 @@ void nsTableFrame::EnsureColumns(nsIPresContext& aPresContext) } else { - lastColGroupFrame->GetContent((nsIContent *&)lastColGroupElement); // ADDREF b: lastColGroupElement++ + lastColGroupFrame->GetContent(&lastColGroupElement); // ADDREF b: lastColGroupElement++ } // XXX It would be better to do this in the style code while constructing @@ -743,7 +743,7 @@ void nsTableFrame::EnsureColumns(nsIPresContext& aPresContext) nsIFrame* firstNewColFrame = nsnull; nsIFrame* lastNewColFrame = nsnull; nsIStyleContextPtr lastColGroupStyle; - lastColGroupFrame->GetStyleContext(lastColGroupStyle.AssignRef()); + lastColGroupFrame->GetStyleContext(lastColGroupStyle.AssignPtr()); for ( ; excessColumns > 0; excessColumns--) { // Create a new col frame @@ -3318,7 +3318,7 @@ NS_METHOD nsTableFrame::ReflowMappedChildren(nsIPresContext& aPresContext, nsIFrame* continuingFrame; nsIStyleContext* kidSC; - kidFrame->GetStyleContext(kidSC); + kidFrame->GetStyleContext(&kidSC); kidFrame->CreateContinuingFrame(aPresContext, this, kidSC, continuingFrame); NS_RELEASE(kidSC); NS_ASSERTION(nsnull != continuingFrame, "frame creation failed"); @@ -3470,7 +3470,7 @@ NS_METHOD nsTableFrame::PullUpChildren(nsIPresContext& aPresContext, nsIFrame* continuingFrame; nsIStyleContext* kidSC; - kidFrame->GetStyleContext(kidSC); + kidFrame->GetStyleContext(&kidSC); kidFrame->CreateContinuingFrame(aPresContext, this, kidSC, continuingFrame); NS_RELEASE(kidSC); NS_ASSERTION(nsnull != continuingFrame, "frame creation failed"); @@ -3850,7 +3850,7 @@ nsTableFrame::SetColumnStyleFromCell(nsIPresContext & aPresContext, } // get the column style nsIStyleContext *colSC; - colFrame->GetStyleContext(colSC); + colFrame->GetStyleContext(&colSC); nsStylePosition* colPosition = (nsStylePosition*) colSC->GetMutableStyleData(eStyleStruct_Position); // if colSpan==1, then we can just set the column width if (1==colSpan) @@ -4190,7 +4190,7 @@ nsTableFrame::CreateContinuingFrame(nsIPresContext& aPresContext, for ( ; nsnull!=rg; index++) { nsIContent *content = nsnull; - rg->GetContent(content); // content: REFCNT++ + rg->GetContent(&content); // content: REFCNT++ NS_ASSERTION(nsnull!=content, "bad frame, returned null content."); const nsStyleDisplay* display; //XXX: TROY: this was just this->GetStyleData which can't be right diff --git a/mozilla/layout/tables/nsTableOuterFrame.cpp b/mozilla/layout/tables/nsTableOuterFrame.cpp index ad9b7729cb4..d4a512d1a05 100644 --- a/mozilla/layout/tables/nsTableOuterFrame.cpp +++ b/mozilla/layout/tables/nsTableOuterFrame.cpp @@ -1103,7 +1103,7 @@ nsTableOuterFrame::CreateContinuingFrame(nsIPresContext& aPresContext, nsIFrame* childList; nsIStyleContext* kidSC; - mInnerTableFrame->GetStyleContext(kidSC); + mInnerTableFrame->GetStyleContext(&kidSC); mInnerTableFrame->CreateContinuingFrame(aPresContext, cf, kidSC, childList); NS_RELEASE(kidSC); cf->SetInitialChildList(aPresContext, nsnull, childList); diff --git a/mozilla/layout/tables/nsTableRowFrame.cpp b/mozilla/layout/tables/nsTableRowFrame.cpp index d80c817ec36..3d34dc6c448 100644 --- a/mozilla/layout/tables/nsTableRowFrame.cpp +++ b/mozilla/layout/tables/nsTableRowFrame.cpp @@ -139,7 +139,7 @@ nsTableRowFrame::InitChildren(PRInt32 aRowIndex) * see nsHTMLStyleSheet::RulesMatching */ nsIContent* cell; - kidFrame->GetContent(cell); + kidFrame->GetContent(&cell); nsIHTMLTableCellElement *cellContent = nsnull; nsresult rv = cell->QueryInterface(kIHTMLTableCellElementIID, (void **)&cellContent); // cellContent: REFCNT++ @@ -637,7 +637,7 @@ NS_METHOD nsTableRowFrame::ResizeReflow(nsIPresContext& aPresContext, nscoord specifiedHeight = 0; nscoord cellHeight = desiredSize.height; nsIStyleContextPtr kidSC; - kidFrame->GetStyleContext(kidSC.AssignRef()); + kidFrame->GetStyleContext(kidSC.AssignPtr()); const nsStylePosition* kidPosition = (const nsStylePosition*) kidSC->GetStyleData(eStyleStruct_Position); switch (kidPosition->mHeight.GetUnit()) { @@ -882,7 +882,7 @@ NS_METHOD nsTableRowFrame::RecoverState(nsIPresContext& aPresContext, // See if it has a specified height that overrides the desired size nscoord specifiedHeight = 0; nsIStyleContextPtr kidSC; - frame->GetStyleContext(kidSC.AssignRef()); + frame->GetStyleContext(kidSC.AssignPtr()); const nsStylePosition* kidPosition = (const nsStylePosition*) kidSC->GetStyleData(eStyleStruct_Position); switch (kidPosition->mHeight.GetUnit()) { @@ -1305,7 +1305,7 @@ NS_METHOD nsTableRowFrame::IR_TargetIsChild(nsIPresContext& aPresContext, nscoord specifiedHeight = 0; nscoord cellHeight = desiredSize.height; nsIStyleContextPtr kidSC; - aNextFrame->GetStyleContext(kidSC.AssignRef()); + aNextFrame->GetStyleContext(kidSC.AssignPtr()); const nsStylePosition* kidPosition = (const nsStylePosition*) kidSC->GetStyleData(eStyleStruct_Position); switch (kidPosition->mHeight.GetUnit()) { @@ -1475,7 +1475,7 @@ nsTableRowFrame::CreateContinuingFrame(nsIPresContext& aPresContext, nsIStyleContext* kidSC; // Create a continuing cell frame - kidFrame->GetStyleContext(kidSC); + kidFrame->GetStyleContext(&kidSC); kidFrame->CreateContinuingFrame(aPresContext, cf, kidSC, contCellFrame); NS_RELEASE(kidSC); diff --git a/mozilla/layout/tables/nsTableRowGroupFrame.cpp b/mozilla/layout/tables/nsTableRowGroupFrame.cpp index a6063fba31a..33eb3b80d91 100644 --- a/mozilla/layout/tables/nsTableRowGroupFrame.cpp +++ b/mozilla/layout/tables/nsTableRowGroupFrame.cpp @@ -592,7 +592,7 @@ NS_METHOD nsTableRowGroupFrame::PullUpChildren(nsIPresContext& aPresContext // prepares it for reflow. nsIFrame* continuingFrame; nsIStyleContext* kidSC; - kidFrame->GetStyleContext(kidSC); + kidFrame->GetStyleContext(&kidSC); kidFrame->CreateContinuingFrame(aPresContext, this, kidSC, continuingFrame); NS_RELEASE(kidSC); @@ -901,7 +901,7 @@ nsTableRowGroupFrame::SplitRowGroup(nsIPresContext& aPresContext, nsIFrame* continuingFrame; nsIStyleContext* kidSC; - kidFrame->GetStyleContext(kidSC); + kidFrame->GetStyleContext(&kidSC); kidFrame->CreateContinuingFrame(aPresContext, this, kidSC, continuingFrame); NS_RELEASE(kidSC); diff --git a/mozilla/layout/xul/base/src/nsToolboxFrame.cpp b/mozilla/layout/xul/base/src/nsToolboxFrame.cpp index fb329f3607d..ad4395f43e3 100644 --- a/mozilla/layout/xul/base/src/nsToolboxFrame.cpp +++ b/mozilla/layout/xul/base/src/nsToolboxFrame.cpp @@ -285,7 +285,7 @@ nsToolboxFrame :: Reflow(nsIPresContext& aPresContext, // Get the first child of the toolbox content node and the first child frame of the toolbox nsCOMPtr toolboxContent; - GetContent ( *getter_AddRefs(toolboxContent) ); + GetContent ( getter_AddRefs(toolboxContent) ); nsCOMPtr childContent; toolboxContent->ChildAt(0, *getter_AddRefs(childContent)); unsigned int contentCounter = 0; @@ -312,7 +312,7 @@ nsToolboxFrame :: Reflow(nsIPresContext& aPresContext, // first determine if the current content node matches the current frame nsCOMPtr currentFrameContent; - childFrame->GetContent(*getter_AddRefs(currentFrameContent)); + childFrame->GetContent(getter_AddRefs(currentFrameContent)); if ( childContent == currentFrameContent ) { // they are the same, so find the width/height desired by the toolbar frame. nsSize maxSize(aReflowState.availableWidth, aReflowState.availableHeight); diff --git a/mozilla/layout/xul/base/src/nsTreeCellFrame.cpp b/mozilla/layout/xul/base/src/nsTreeCellFrame.cpp index c950e710d8a..d0820c55355 100644 --- a/mozilla/layout/xul/base/src/nsTreeCellFrame.cpp +++ b/mozilla/layout/xul/base/src/nsTreeCellFrame.cpp @@ -95,7 +95,7 @@ nsTreeCellFrame::Init(nsIPresContext& aPresContext, { // Get the display type of the row group frame and see if it's a header or body nsCOMPtr parentContext; - pRowGroupFrame->GetStyleContext(*getter_AddRefs(parentContext)); + pRowGroupFrame->GetStyleContext(getter_AddRefs(parentContext)); if (parentContext) { const nsStyleDisplay* display = (const nsStyleDisplay*) diff --git a/mozilla/layout/xul/base/src/nsTreeIndentationFrame.cpp b/mozilla/layout/xul/base/src/nsTreeIndentationFrame.cpp index cf34f6caf05..691262b6528 100644 --- a/mozilla/layout/xul/base/src/nsTreeIndentationFrame.cpp +++ b/mozilla/layout/xul/base/src/nsTreeIndentationFrame.cpp @@ -75,7 +75,7 @@ nsTreeIndentationFrame::Reflow(nsIPresContext& aPresContext, // First climb out to the tree row level. nsIFrame* aFrame = this; nsCOMPtr pContent; - aFrame->GetContent(*getter_AddRefs(pContent)); + aFrame->GetContent(getter_AddRefs(pContent)); nsCOMPtr pTag; pContent->GetTag(*getter_AddRefs(pTag)); if (pTag) @@ -85,7 +85,7 @@ nsTreeIndentationFrame::Reflow(nsIPresContext& aPresContext, aFrame->GetParent(aFrame); // nsCOMPtr correctly handles releasing the old |pContent| and |pTag| - aFrame->GetContent(*getter_AddRefs(pContent)); + aFrame->GetContent(getter_AddRefs(pContent)); pContent->GetTag(*getter_AddRefs(pTag)); } diff --git a/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp b/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp index eac3a94dca7..943b36ea45d 100644 --- a/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp +++ b/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp @@ -2744,7 +2744,7 @@ nsBrowserWindow::DumpStyleContexts(FILE* out) fputs("null root frame\n", out); } else { nsIStyleContext* rootContext; - root->GetStyleContext(rootContext); + root->GetStyleContext(&rootContext); if (nsnull != rootContext) { styleSet->ListContexts(rootContext, out); NS_RELEASE(rootContext);