Changed some nsIFrame member functions to use ** instead of *& for OUT

paremeters
This commit is contained in:
troy%netscape.com 1999-02-10 00:42:56 +00:00
Родитель a1e753ffb3
Коммит c9c1fa187e
82 изменённых файлов: 333 добавлений и 259 удалений

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

@ -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;

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

@ -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);

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

@ -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);

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

@ -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);

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

@ -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);

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

@ -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);

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

@ -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;

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

@ -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);

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

@ -510,7 +510,7 @@ nsRangeList::HandleKeyEvent(nsIFocusTracker *aTracker, nsGUIEvent *aGuiEvent, ns
return NS_ERROR_NULL_POINTER;
if (NS_KEY_DOWN == aGuiEvent->message) {
nsCOMPtr<nsIContent> 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<nsIDOMNode> domnode(content);
if (!domnode)
@ -618,10 +618,10 @@ compareFrames(nsIFrame *aBegin, nsIFrame *aEnd)
if (aBegin == aEnd)
return 0;
nsCOMPtr<nsIContent> beginContent;
if (NS_SUCCEEDED(aBegin->GetContent(*getter_AddRefs(beginContent))) && beginContent){
if (NS_SUCCEEDED(aBegin->GetContent(getter_AddRefs(beginContent))) && beginContent){
nsCOMPtr<nsIDOMNode>beginNode (beginContent);
nsCOMPtr<nsIContent> endContent;
if (NS_SUCCEEDED(aEnd->GetContent(*getter_AddRefs(endContent))) && endContent){
if (NS_SUCCEEDED(aEnd->GetContent(getter_AddRefs(endContent))) && endContent){
nsCOMPtr<nsIDOMNode>endNode (endContent);
PRBool storage;
PRInt32 int1;
@ -684,7 +684,7 @@ nsRangeList::TakeFocus(nsIFocusTracker *aTracker, nsIFrame *aFrame, PRInt32 aOff
//HACKHACKHACK
nsCOMPtr<nsIContent> content;
nsCOMPtr<nsIDOMNode> domNode;
if (NS_SUCCEEDED(aFrame->GetContent(*getter_AddRefs(content))) && content){
if (NS_SUCCEEDED(aFrame->GetContent(getter_AddRefs(content))) && content){
domNode = content;
nsCOMPtr<nsIDOMNode> parent;
nsCOMPtr<nsIDOMNode> 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.
nsCOMPtr<nsIContent>oldContent;
if (NS_SUCCEEDED(frame->GetContent(*getter_AddRefs(oldContent))) && oldContent){
if (NS_SUCCEEDED(frame->GetContent(getter_AddRefs(oldContent))) && oldContent){
nsCOMPtr<nsIDOMNode>oldDomNode(oldContent);
if (oldDomNode && oldDomNode == GetFocusNode()) {
nsCOMPtr<nsIContent>anchorContent;
if (NS_SUCCEEDED(anchor->GetContent(*getter_AddRefs(anchorContent))) && anchorContent){
if (NS_SUCCEEDED(anchor->GetContent(getter_AddRefs(anchorContent))) && anchorContent){
nsCOMPtr<nsIDOMNode>anchorDomNode(anchorContent);
if (anchorDomNode && anchorDomNode == GetAnchorNode()) {
@ -850,7 +850,7 @@ findFrameFromContent(nsIFrame *aParent, nsIContent *aContent, PRBool aTurnOff)
if (!aParent || !aContent)
return nsnull;
nsCOMPtr<nsIContent> 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<nsIContent> content;
result->GetContent(*getter_AddRefs(content));
result->GetContent(getter_AddRefs(content));
if (content == endContent){
if (endContent == frameContent)
frameOffset = GetFocusOffset();

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

@ -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;

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

@ -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);

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

@ -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);

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

@ -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;
}
//--------------------------------------------------------------

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

@ -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);

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

@ -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

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

@ -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

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

@ -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

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

@ -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

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

@ -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);

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

@ -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;

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

@ -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;

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

@ -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;

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

@ -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;

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

@ -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 ==

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

@ -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);
}

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

@ -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,

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

@ -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;
}

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

@ -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);

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

@ -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);
}

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

@ -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);

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

@ -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;

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

@ -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);

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

@ -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)
{

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

@ -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,

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

@ -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);

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

@ -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

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

@ -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);

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

@ -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;

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

@ -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;

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

@ -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;

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

@ -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 ==

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

@ -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);
}

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

@ -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,

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

@ -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);
}

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

@ -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);

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

@ -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);

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

@ -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)
{

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

@ -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,

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

@ -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);

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

@ -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);

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

@ -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

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

@ -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);

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

@ -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;
}

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

@ -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);

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

@ -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:

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

@ -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;
}
//--------------------------------------------------------------

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

@ -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);

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

@ -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

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

@ -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

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

@ -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;

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

@ -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

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

@ -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

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

@ -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);

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

@ -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;

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

@ -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);

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

@ -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);

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

@ -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 (colIndex<numCols)
{
@ -560,7 +560,7 @@ NS_METHOD nsTableColGroupFrame::SetStyleContextForFirstPass(nsIPresContext& aPre
if (eStyleUnit_Auto==colPosition->mWidth.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);

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

@ -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

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

@ -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);

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

@ -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);

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

@ -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);

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

@ -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;

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

@ -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);

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

@ -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 (colIndex<numCols)
{
@ -560,7 +560,7 @@ NS_METHOD nsTableColGroupFrame::SetStyleContextForFirstPass(nsIPresContext& aPre
if (eStyleUnit_Auto==colPosition->mWidth.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);

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

@ -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

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

@ -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);

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

@ -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);

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

@ -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);

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

@ -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<nsIContent> toolboxContent;
GetContent ( *getter_AddRefs(toolboxContent) );
GetContent ( getter_AddRefs(toolboxContent) );
nsCOMPtr<nsIContent> 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<nsIContent> 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);

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

@ -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<nsIStyleContext> parentContext;
pRowGroupFrame->GetStyleContext(*getter_AddRefs(parentContext));
pRowGroupFrame->GetStyleContext(getter_AddRefs(parentContext));
if (parentContext)
{
const nsStyleDisplay* display = (const nsStyleDisplay*)

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

@ -75,7 +75,7 @@ nsTreeIndentationFrame::Reflow(nsIPresContext& aPresContext,
// First climb out to the tree row level.
nsIFrame* aFrame = this;
nsCOMPtr<nsIContent> pContent;
aFrame->GetContent(*getter_AddRefs(pContent));
aFrame->GetContent(getter_AddRefs(pContent));
nsCOMPtr<nsIAtom> 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));
}

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

@ -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);