Bug 852670 - Make nsContainerFrame::SetPropTableFrames return void since it's infallible. r=bzbarsky

This commit is contained in:
Mats Palmgren
2013-03-23 21:10:33 +01:00
parent a7f747148b
commit ae9655d975
2 changed files with 7 additions and 14 deletions

View File

@@ -1099,13 +1099,8 @@ nsContainerFrame::ReflowOverflowContainerChildren(nsPresContext* aPres
nsContainerFrame::ReparentFrameViewList(aPresContext, *excessFrames,
prev, this);
overflowContainers = excessFrames;
rv = SetPropTableFrames(aPresContext, overflowContainers,
OverflowContainersProperty());
if (NS_FAILED(rv)) {
excessFrames->DestroyFrames();
delete excessFrames;
return rv;
}
SetPropTableFrames(aPresContext, overflowContainers,
OverflowContainersProperty());
}
}
}
@@ -1445,7 +1440,7 @@ nsContainerFrame::RemovePropTableFrames(nsPresContext* aPresCont
return static_cast<nsFrameList*>(propTable->Remove(this, aProperty));
}
nsresult
void
nsContainerFrame::SetPropTableFrames(nsPresContext* aPresContext,
nsFrameList* aFrameList,
const FramePropertyDescriptor* aProperty)
@@ -1457,7 +1452,6 @@ nsContainerFrame::SetPropTableFrames(nsPresContext* aPresContext
IsFrameOfType(nsIFrame::eCanContainOverflowContainers),
"this type of frame can't have overflow containers");
aPresContext->PropertyTable()->Set(this, aProperty, aFrameList);
return NS_OK;
}
/**
@@ -1678,9 +1672,8 @@ nsOverflowContinuationTracker::Insert(nsIFrame* aOverflowCont,
}
if (!mOverflowContList) {
mOverflowContList = new nsFrameList();
rv = mParent->SetPropTableFrames(presContext, mOverflowContList,
mParent->SetPropTableFrames(presContext, mOverflowContList,
nsContainerFrame::ExcessOverflowContainersProperty());
NS_ENSURE_SUCCESS(rv, rv);
SetUpListWalker();
}
if (aOverflowCont->GetParent() != mParent) {

View File

@@ -501,9 +501,9 @@ protected:
* Set the PresContext-stored nsFrameList named aPropID for this frame
* to the given aFrameList, which must not be null.
*/
nsresult SetPropTableFrames(nsPresContext* aPresContext,
nsFrameList* aFrameList,
const FramePropertyDescriptor* aProperty);
void SetPropTableFrames(nsPresContext* aPresContext,
nsFrameList* aFrameList,
const FramePropertyDescriptor* aProperty);
/**
* Safely destroy the frames on the nsFrameList stored on aProp for this