Remove prescontext args for some nsIFrame methods

(Append/Insert/Remove/ReplaceFrames) and for some methods in table land.  Patch
by Vidar Braut Haarr <bugmail@q1n.org>, r+sr=bzbarsky
This commit is contained in:
bzbarsky%mit.edu 2005-02-07 01:58:25 +00:00
Родитель 2b1acc7897
Коммит b626abc29c
57 изменённых файлов: 761 добавлений и 1371 удалений

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

@ -130,8 +130,7 @@ CreateBidiContinuation(nsPresContext* aPresContext,
(*aNewFrame)->SetNextSibling(nsnull);
// The list name nsLayoutAtoms::nextBidi would indicate we don't want reflow
parent->InsertFrames(aPresContext, *presShell, nsLayoutAtoms::nextBidi,
aFrame, *aNewFrame);
parent->InsertFrames(nsLayoutAtoms::nextBidi, aFrame, *aNewFrame);
return NS_OK;
}
@ -768,8 +767,6 @@ nsBidiPresUtils::RemoveBidiContinuation(nsPresContext* aPresContext,
PRInt32 index;
nsIFrame* parent = aFrame->GetParent();
nsIPresShell *presShell = aPresContext->PresShell();
aOffset = 0;
for (index = aLastIndex; index > aFirstIndex; index--) {
@ -782,8 +779,7 @@ nsBidiPresUtils::RemoveBidiContinuation(nsPresContext* aPresContext,
if (frame->GetStateBits() & NS_FRAME_IS_BIDI) {
// only delete Bidi frames
if (parent) {
parent->RemoveFrame(aPresContext, *presShell,
nsLayoutAtoms::nextBidi, frame);
parent->RemoveFrame(nsLayoutAtoms::nextBidi, frame);
}
else {
frame->Destroy(aPresContext);

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

@ -1317,8 +1317,7 @@ nsFrameConstructorState::ProcessFrameInsertions(nsAbsoluteItems& aFrameItems,
firstNewFrame->GetContent(),
containingBlock->GetContent()) < 0) {
// no lastChild, or lastChild comes before the new children, so just append
rv = containingBlock->AppendFrames(mPresContext, *mPresShell, aChildListName,
firstNewFrame);
rv = containingBlock->AppendFrames(aChildListName, firstNewFrame);
} else {
nsIFrame* insertionPoint = nsnull;
// try the other children
@ -1332,9 +1331,9 @@ nsFrameConstructorState::ProcessFrameInsertions(nsAbsoluteItems& aFrameItems,
}
insertionPoint = f;
}
rv = containingBlock->InsertFrames(mPresContext, *mPresShell, aChildListName,
insertionPoint, firstNewFrame);
rv = containingBlock->InsertFrames(aChildListName, insertionPoint,
firstNewFrame);
}
}
aFrameItems.childList = nsnull;
@ -9197,10 +9196,7 @@ nsCSSFrameConstructor::ContentInserted(nsPresContext* aPresContext,
// empty, so we can simply append).
NS_ASSERTION(mDocElementContainingBlock->GetFirstChild(nsnull) == nsnull,
"Unexpected child of document element containing block");
mDocElementContainingBlock->AppendFrames(aPresContext,
*shell,
nsnull,
docElementFrame);
mDocElementContainingBlock->AppendFrames(nsnull, docElementFrame);
}
#ifdef DEBUG
@ -9467,7 +9463,8 @@ nsCSSFrameConstructor::ContentInserted(nsPresContext* aPresContext,
// XXXwaterson this seems wrong; i.e., how can we assume
// that appending is the right thing to do here?
state.mFrameManager->AppendFrames(outerTableFrame,
nsLayoutAtoms::captionList, newFrame);
nsLayoutAtoms::captionList,
newFrame);
}
else {
state.mFrameManager->InsertFrames(parentFrame,
@ -12274,8 +12271,7 @@ nsCSSFrameConstructor::InsertFirstLineFrames(
// We got lucky: aPrevSibling was the last inline frame in
// the line-frame.
ReparentFrame(aPresContext, aBlockFrame, firstLineStyle, newFrame);
aState.mFrameManager->InsertFrames(aPresContext, *aState.mPresShell,
aBlockFrame, nsnull,
aState.mFrameManager->InsertFrames(aBlockFrame, nsnull,
prevSiblingParent, newFrame);
aFrameItems.childList = nsnull;
aFrameItems.lastChild = nsnull;
@ -12546,12 +12542,10 @@ nsCSSFrameConstructor::WrapFramesInFirstLetterFrame(
// Take the old textFrame out of the inline parents child list
DeletingFrameSubtree(aPresContext, aState.mPresShell,
aState.mFrameManager, textFrame);
parentFrame->RemoveFrame(aPresContext, *aState.mPresShell,
nsnull, textFrame);
parentFrame->RemoveFrame(nsnull, textFrame);
// Insert in the letter frame(s)
parentFrame->InsertFrames(aPresContext, *aState.mPresShell,
nsnull, prevFrame, letterFrames.childList);
parentFrame->InsertFrames(nsnull, prevFrame, letterFrames.childList);
}
}
@ -12849,12 +12843,10 @@ nsCSSFrameConstructor::RecoverLetterFrames(nsIPresShell* aPresShell, nsPresConte
// Take the old textFrame out of the parents child list
DeletingFrameSubtree(aPresContext, aState.mPresShell,
aState.mFrameManager, textFrame);
parentFrame->RemoveFrame(aPresContext, *aState.mPresShell,
nsnull, textFrame);
parentFrame->RemoveFrame(nsnull, textFrame);
// Insert in the letter frame(s)
parentFrame->InsertFrames(aPresContext, *aState.mPresShell,
nsnull, prevFrame, letterFrames.childList);
parentFrame->InsertFrames(nsnull, prevFrame, letterFrames.childList);
}
return rv;
}
@ -13509,7 +13501,7 @@ nsCSSFrameConstructor::SplitToContainingBlock(nsPresContext* aPresContext,
aRightInlineChildFrame->SetParent(aFrame);
aBlockChildFrame->SetNextSibling(aRightInlineChildFrame);
aFrame->InsertFrames(aPresContext, *shell, nsnull, aLeftInlineChildFrame, aBlockChildFrame);
aFrame->InsertFrames(nsnull, aLeftInlineChildFrame, aBlockChildFrame);
// If aLeftInlineChild has a view...
if (aLeftInlineChildFrame && aLeftInlineChildFrame->HasView()) {

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

@ -700,12 +700,10 @@ nsFrameManager::InsertFrames(nsIFrame* aParentFrame,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
{
nsIPresShell *presShell = GetPresShell();
nsPresContext *presContext = presShell->GetPresContext();
#ifdef IBMBIDI
if (aPrevFrame) {
// Insert aFrameList after the last bidi continuation of aPrevFrame.
nsPropertyTable *propTable = presContext->PropertyTable();
nsPropertyTable *propTable = GetPresContext()->PropertyTable();
nsIFrame* nextBidi;
for (; ;) {
nextBidi = NS_STATIC_CAST(nsIFrame*,
@ -718,8 +716,7 @@ nsFrameManager::InsertFrames(nsIFrame* aParentFrame,
}
#endif // IBMBIDI
return aParentFrame->InsertFrames(GetPresContext(), *presShell,
aListName, aPrevFrame, aFrameList);
return aParentFrame->InsertFrames(aListName, aPrevFrame, aFrameList);
}
nsresult
@ -736,8 +733,7 @@ nsFrameManager::RemoveFrame(nsIFrame* aParentFrame,
}
#endif // IBMBIDI
return aParentFrame->RemoveFrame(GetPresContext(), *GetPresShell(),
aListName, aOldFrame);
return aParentFrame->RemoveFrame(aListName, aOldFrame);
}
//----------------------------------------------------------------------

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

@ -139,8 +139,7 @@ public:
nsIAtom* aListName,
nsIFrame* aFrameList)
{
return aParentFrame->AppendFrames(GetPresContext(), *GetPresShell(),
aListName, aFrameList);
return aParentFrame->AppendFrames(aListName, aFrameList);
}
NS_HIDDEN_(nsresult) InsertFrames(nsIFrame* aParentFrame,
@ -157,8 +156,7 @@ public:
nsIFrame* aOldFrame,
nsIFrame* aNewFrame)
{
return aParentFrame->ReplaceFrame(GetPresContext(), *GetPresShell(),
aListName, aOldFrame, aNewFrame);
return aParentFrame->ReplaceFrame(aListName, aOldFrame, aNewFrame);
}
// Notification that we were unable to render a replaced element

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

@ -86,26 +86,15 @@ public:
PRUint32 aFlags);
virtual PRBool CanPaintBackground();
NS_IMETHOD AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
NS_IMETHOD ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame);
@ -613,39 +602,32 @@ nsFieldSetFrame::GetSkipSides() const
}
NS_IMETHODIMP
nsFieldSetFrame::AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsFieldSetFrame::AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList)
{
aFrameList = MaybeSetLegend(aFrameList, aListName);
if (aFrameList) {
ReParentFrameList(aFrameList);
return mContentFrame->AppendFrames(aPresContext, aPresShell, aListName, aFrameList);
return mContentFrame->AppendFrames(aListName, aFrameList);
}
return NS_OK;
}
NS_IMETHODIMP
nsFieldSetFrame::InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsFieldSetFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
{
aFrameList = MaybeSetLegend(aFrameList, aListName);
if (aFrameList) {
ReParentFrameList(aFrameList);
return mContentFrame->InsertFrames(aPresContext, aPresShell, aListName,
aPrevFrame, aFrameList);
return mContentFrame->InsertFrames(aListName, aPrevFrame, aFrameList);
}
return NS_OK;
}
NS_IMETHODIMP
nsFieldSetFrame::RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsFieldSetFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
// For reference, see bug 70648, bug 276104 and bug 236071.
@ -653,31 +635,28 @@ nsFieldSetFrame::RemoveFrame(nsPresContext* aPresContext,
NS_ASSERTION(!aListName, "Unexpected frame list when removing legend frame");
NS_ASSERTION(mLegendFrame->GetParent() == this, "Legend Parent has wrong parent");
NS_ASSERTION(mLegendFrame->GetNextSibling() == mContentFrame, "mContentFrame is not next sibling");
mFrames.DestroyFrame(aPresContext, mLegendFrame);
nsPresContext* presContext = GetPresContext();
mFrames.DestroyFrame(presContext, mLegendFrame);
mLegendFrame = nsnull;
AddStateBits(NS_FRAME_IS_DIRTY);
if (GetParent()) {
GetParent()->ReflowDirtyChild(aPresContext->GetPresShell(), this);
GetParent()->ReflowDirtyChild(presContext->GetPresShell(), this);
}
return NS_OK;
}
return mContentFrame->RemoveFrame(aPresContext, aPresShell, aListName, aOldFrame);
return mContentFrame->RemoveFrame(aListName, aOldFrame);
}
NS_IMETHODIMP
nsFieldSetFrame::ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsFieldSetFrame::ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame)
{
if (aOldFrame == mLegendFrame) {
mLegendFrame = aNewFrame;
return nsContainerFrame::ReplaceFrame(aPresContext, aPresShell, aListName,
aOldFrame, aNewFrame);
return nsContainerFrame::ReplaceFrame(aListName, aOldFrame, aNewFrame);
}
return mContentFrame->ReplaceFrame(aPresContext, aPresShell, aListName,
aOldFrame, aNewFrame);
return mContentFrame->ReplaceFrame(aListName, aOldFrame, aNewFrame);
}
NS_IMETHODIMP

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

@ -645,58 +645,36 @@ NS_IMETHODIMP nsHTMLButtonControlFrame::SetSuggestedSize(nscoord aWidth, nscoord
NS_IMETHODIMP
nsHTMLButtonControlFrame::AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsHTMLButtonControlFrame::AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList)
{
ReParentFrameList(aPresContext->FrameManager(), aFrameList);
return mFrames.FirstChild()->AppendFrames(aPresContext,
aPresShell,
aListName,
aFrameList);
ReParentFrameList(GetPresContext()->FrameManager(), aFrameList);
return mFrames.FirstChild()->AppendFrames(aListName, aFrameList);
}
NS_IMETHODIMP
nsHTMLButtonControlFrame::InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsHTMLButtonControlFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
{
ReParentFrameList(aPresContext->FrameManager(), aFrameList);
return mFrames.FirstChild()->InsertFrames(aPresContext,
aPresShell,
aListName,
aPrevFrame,
aFrameList);
ReParentFrameList(GetPresContext()->FrameManager(), aFrameList);
return mFrames.FirstChild()->InsertFrames(aListName, aPrevFrame, aFrameList);
}
NS_IMETHODIMP
nsHTMLButtonControlFrame::RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsHTMLButtonControlFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
return mFrames.FirstChild()->RemoveFrame(aPresContext,
aPresShell,
aListName,
aOldFrame);
return mFrames.FirstChild()->RemoveFrame(aListName, aOldFrame);
}
NS_IMETHODIMP
nsHTMLButtonControlFrame::ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsHTMLButtonControlFrame::ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame)
{
ReParentFrameList(aPresContext->FrameManager(), aNewFrame);
return mFrames.FirstChild()->ReplaceFrame(aPresContext,
aPresShell,
aListName,
aOldFrame,
aNewFrame);
ReParentFrameList(GetPresContext()->FrameManager(), aNewFrame);
return mFrames.FirstChild()->ReplaceFrame(aListName, aOldFrame, aNewFrame);
}
NS_IMETHODIMP

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

@ -101,25 +101,17 @@ public:
virtual void SetAdditionalStyleContext(PRInt32 aIndex,
nsStyleContext* aStyleContext);
NS_IMETHOD AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
NS_IMETHOD ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame);

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

@ -74,11 +74,9 @@ nsAbsoluteContainingBlock::SetInitialChildList(nsIFrame* aDelegatingFrame,
}
nsresult
nsAbsoluteContainingBlock::AppendFrames(nsIFrame* aDelegatingFrame,
nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aFrameList)
nsAbsoluteContainingBlock::AppendFrames(nsIFrame* aDelegatingFrame,
nsIAtom* aListName,
nsIFrame* aFrameList)
{
nsresult rv = NS_OK;
@ -93,19 +91,18 @@ nsAbsoluteContainingBlock::AppendFrames(nsIFrame* aDelegatingFrame,
rv = NS_NewHTMLReflowCommand(&reflowCmd, aDelegatingFrame, eReflowType_ReflowDirty);
if (NS_SUCCEEDED(rv)) {
reflowCmd->SetChildListName(GetChildListName());
aPresShell.AppendReflowCommand(reflowCmd);
aDelegatingFrame->GetPresContext()->PresShell()->
AppendReflowCommand(reflowCmd);
}
return rv;
}
nsresult
nsAbsoluteContainingBlock::InsertFrames(nsIFrame* aDelegatingFrame,
nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
nsAbsoluteContainingBlock::InsertFrames(nsIFrame* aDelegatingFrame,
nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
{
nsresult rv = NS_OK;
@ -120,7 +117,8 @@ nsAbsoluteContainingBlock::InsertFrames(nsIFrame* aDelegatingFrame,
rv = NS_NewHTMLReflowCommand(&reflowCmd, aDelegatingFrame, eReflowType_ReflowDirty);
if (NS_SUCCEEDED(rv)) {
reflowCmd->SetChildListName(GetChildListName());
aPresShell.AppendReflowCommand(reflowCmd);
aDelegatingFrame->GetPresContext()->PresShell()->
AppendReflowCommand(reflowCmd);
}
return rv;
@ -128,12 +126,11 @@ nsAbsoluteContainingBlock::InsertFrames(nsIFrame* aDelegatingFrame,
nsresult
nsAbsoluteContainingBlock::RemoveFrame(nsIFrame* aDelegatingFrame,
nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aOldFrame)
{
PRBool result = mAbsoluteFrames.DestroyFrame(aPresContext, aOldFrame);
PRBool result = mAbsoluteFrames.DestroyFrame(aDelegatingFrame->
GetPresContext(), aOldFrame);
NS_ASSERTION(result, "didn't find frame to delete");
// Because positioned frames aren't part of a flow, there's no additional
// work to do, e.g. reflowing sibling frames. And because positioned frames
@ -142,14 +139,12 @@ nsAbsoluteContainingBlock::RemoveFrame(nsIFrame* aDelegatingFrame,
}
nsresult
nsAbsoluteContainingBlock::ReplaceFrame(nsIFrame* aDelegatingFrame,
nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame)
nsAbsoluteContainingBlock::ReplaceFrame(nsIFrame* aDelegatingFrame,
nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame)
{
PRBool result = mAbsoluteFrames.ReplaceFrame(aPresContext, aDelegatingFrame,
PRBool result = mAbsoluteFrames.ReplaceFrame(aDelegatingFrame,
aOldFrame, aNewFrame, PR_TRUE);
NS_ASSERTION(result, "Problems replacing a frame");
return result ? NS_OK : NS_ERROR_FAILURE;

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

@ -73,28 +73,20 @@ public:
nsPresContext* aPresContext,
nsIAtom* aListName,
nsIFrame* aChildList);
nsresult AppendFrames(nsIFrame* aDelegatingFrame,
nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aFrameList);
nsresult InsertFrames(nsIFrame* aDelegatingFrame,
nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
nsresult RemoveFrame(nsIFrame* aDelegatingFrame,
nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aOldFrame);
nsresult ReplaceFrame(nsIFrame* aDelegatingFrame,
nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame);
nsresult AppendFrames(nsIFrame* aDelegatingFrame,
nsIAtom* aListName,
nsIFrame* aFrameList);
nsresult InsertFrames(nsIFrame* aDelegatingFrame,
nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
nsresult RemoveFrame(nsIFrame* aDelegatingFrame,
nsIAtom* aListName,
nsIFrame* aOldFrame);
nsresult ReplaceFrame(nsIFrame* aDelegatingFrame,
nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame);
// Called by the delegating frame after it has done its reflow first. This
// function will reflow any absolutely positioned child frames that need to

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

@ -4900,17 +4900,14 @@ nsBlockFrame::LastChild()
}
NS_IMETHODIMP
nsBlockFrame::AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsBlockFrame::AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList)
{
if (nsnull == aFrameList) {
return NS_OK;
}
if (mAbsoluteContainer.GetChildListName() == aListName) {
return mAbsoluteContainer.AppendFrames(this, aPresContext, aPresShell, aListName,
aFrameList);
return mAbsoluteContainer.AppendFrames(this, aListName, aFrameList);
}
else if (nsLayoutAtoms::floatList == aListName) {
// XXX we don't *really* care about this right now because we are
@ -4940,24 +4937,22 @@ nsBlockFrame::AppendFrames(nsPresContext* aPresContext,
}
printf("\n");
#endif
nsresult rv = AddFrames(aPresContext, aFrameList, lastKid);
nsresult rv = AddFrames(aFrameList, lastKid);
if (NS_SUCCEEDED(rv)) {
// Ask the parent frame to reflow me.
ReflowDirtyChild(&aPresShell, nsnull);
ReflowDirtyChild(GetPresContext()->PresShell(), nsnull);
}
return rv;
}
NS_IMETHODIMP
nsBlockFrame::InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsBlockFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
{
if (mAbsoluteContainer.GetChildListName() == aListName) {
return mAbsoluteContainer.InsertFrames(this, aPresContext, aPresShell, aListName,
aPrevFrame, aFrameList);
return mAbsoluteContainer.InsertFrames(this, aListName, aPrevFrame,
aFrameList);
}
else if (nsLayoutAtoms::floatList == aListName) {
// XXX we don't *really* care about this right now because we are
@ -4982,20 +4977,19 @@ nsBlockFrame::InsertFrames(nsPresContext* aPresContext,
}
printf("\n");
#endif
nsresult rv = AddFrames(aPresContext, aFrameList, aPrevFrame);
nsresult rv = AddFrames(aFrameList, aPrevFrame);
#ifdef IBMBIDI
if (aListName != nsLayoutAtoms::nextBidi)
#endif // IBMBIDI
if (NS_SUCCEEDED(rv)) {
// Ask the parent frame to reflow me.
ReflowDirtyChild(&aPresShell, nsnull);
ReflowDirtyChild(GetPresContext()->PresShell(), nsnull);
}
return rv;
}
nsresult
nsBlockFrame::AddFrames(nsPresContext* aPresContext,
nsIFrame* aFrameList,
nsBlockFrame::AddFrames(nsIFrame* aFrameList,
nsIFrame* aPrevSibling)
{
// Clear our line cursor, since our lines may change.
@ -5005,7 +4999,7 @@ nsBlockFrame::AddFrames(nsPresContext* aPresContext,
return NS_OK;
}
nsIPresShell *presShell = aPresContext->PresShell();
nsIPresShell *presShell = GetPresContext()->PresShell();
// Attempt to find the line that contains the previous sibling
nsLineList::iterator prevSibLine = end_lines();
@ -5116,9 +5110,7 @@ nsBlockFrame::RemoveFloat(nsIFrame* aFloat) {
}
NS_IMETHODIMP
nsBlockFrame::RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsBlockFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
nsresult rv = NS_OK;
@ -5131,11 +5123,10 @@ nsBlockFrame::RemoveFrame(nsPresContext* aPresContext,
#endif
if (nsnull == aListName) {
rv = DoRemoveFrame(aPresContext, aOldFrame);
rv = DoRemoveFrame(aOldFrame);
}
else if (mAbsoluteContainer.GetChildListName() == aListName) {
return mAbsoluteContainer.RemoveFrame(this, aPresContext, aPresShell,
aListName, aOldFrame);
return mAbsoluteContainer.RemoveFrame(this, aListName, aOldFrame);
}
else if (nsLayoutAtoms::floatList == aListName) {
line_iterator line = RemoveFloat(aOldFrame);
@ -5150,7 +5141,7 @@ nsBlockFrame::RemoveFrame(nsPresContext* aPresContext,
#ifdef IBMBIDI
else if (nsLayoutAtoms::nextBidi == aListName) {
// Skip the call to |ReflowDirtyChild| below by returning now.
return DoRemoveFrame(aPresContext, aOldFrame);
return DoRemoveFrame(aOldFrame);
}
#endif // IBMBIDI
else {
@ -5159,19 +5150,18 @@ nsBlockFrame::RemoveFrame(nsPresContext* aPresContext,
if (NS_SUCCEEDED(rv)) {
// Ask the parent frame to reflow me.
ReflowDirtyChild(&aPresShell, nsnull);
ReflowDirtyChild(GetPresContext()->PresShell(), nsnull);
}
return rv;
}
void
nsBlockFrame::DoRemoveOutOfFlowFrame(nsPresContext* aPresContext,
nsIFrame* aFrame)
nsBlockFrame::DoRemoveOutOfFlowFrame(nsIFrame* aFrame)
{
// First remove aFrame's next in flow
nsIFrame* nextInFlow = aFrame->GetNextInFlow();
if (nextInFlow) {
nsBlockFrame::DoRemoveOutOfFlowFrame(aPresContext, nextInFlow);
nsBlockFrame::DoRemoveOutOfFlowFrame(nextInFlow);
}
// Now remove aFrame
const nsStyleDisplay* display = aFrame->GetStyleDisplay();
@ -5188,10 +5178,10 @@ nsBlockFrame::DoRemoveOutOfFlowFrame(nsPresContext* aPresContext,
nsBlockFrame* block = (nsBlockFrame*)parent;
// Remove aFrame from the appropriate list.
if (display->IsAbsolutelyPositioned()) {
block->mAbsoluteContainer.RemoveFrame(block, aPresContext,
*(aPresContext->PresShell()),
block->mAbsoluteContainer.GetChildListName(), aFrame);
aFrame->Destroy(aPresContext);
block->mAbsoluteContainer.RemoveFrame(block,
block->mAbsoluteContainer.GetChildListName(),
aFrame);
aFrame->Destroy(aFrame->GetPresContext());
}
else {
// This also destroys the frame.
@ -5225,19 +5215,19 @@ nsBlockFrame::TryAllLines(nsLineList::iterator* aIterator,
// start by locating aDeletedFrame and then scanning from that point
// on looking for continuations.
nsresult
nsBlockFrame::DoRemoveFrame(nsPresContext* aPresContext,
nsIFrame* aDeletedFrame)
nsBlockFrame::DoRemoveFrame(nsIFrame* aDeletedFrame)
{
// Clear our line cursor, since our lines may change.
ClearLineCursor();
if (aDeletedFrame->GetStateBits() & NS_FRAME_OUT_OF_FLOW) {
DoRemoveOutOfFlowFrame(aPresContext, aDeletedFrame);
DoRemoveOutOfFlowFrame(aDeletedFrame);
return NS_OK;
}
nsIPresShell *presShell = aPresContext->PresShell();
nsPresContext* presContext = GetPresContext();
nsIPresShell* presShell = presContext->PresShell();
// Find the line and the previous sibling that contains
// deletedFrame; we also find the pointer to the line.
nsLineList::iterator line = mLines.begin(),
@ -5325,7 +5315,7 @@ found_frame:;
nsFrame::ListTag(stdout, aDeletedFrame);
printf(" prevSibling=%p deletedNextInFlow=%p\n", prevSibling, deletedNextInFlow);
#endif
aDeletedFrame->Destroy(aPresContext);
aDeletedFrame->Destroy(presContext);
aDeletedFrame = deletedNextInFlow;
// If line is empty, remove it now.
@ -5399,7 +5389,7 @@ found_frame:;
nsBlockFrame* nextBlock = NS_STATIC_CAST(nsBlockFrame*, aDeletedFrame->GetParent());
NS_ASSERTION(nextBlock->GetType() == nsLayoutAtoms::blockFrame,
"Our child's continuation's parent is not a block?");
return nextBlock->DoRemoveFrame(aPresContext, aDeletedFrame);
return nextBlock->DoRemoveFrame(aDeletedFrame);
}
return NS_OK;
@ -5419,7 +5409,7 @@ nsBlockFrame::DeleteNextInFlowChild(nsPresContext* aPresContext,
aPresContext->PropertyTable()->GetProperty(prevInFlow, nsLayoutAtoms::nextBidi)) !=
aNextInFlow))
#endif // IBMBIDI
DoRemoveFrame(aPresContext, aNextInFlow);
DoRemoveFrame(aNextInFlow);
}
////////////////////////////////////////////////////////////////////////
@ -6757,7 +6747,7 @@ nsBlockFrame::SetInitialChildList(nsPresContext* aPresContext,
}
}
rv = AddFrames(aPresContext, aChildList, nsnull);
rv = AddFrames(aChildList, nsnull);
if (NS_FAILED(rv)) {
return rv;
}
@ -6800,7 +6790,7 @@ nsBlockFrame::SetInitialChildList(nsPresContext* aPresContext,
// it to the flow now.
if (NS_STYLE_LIST_STYLE_POSITION_INSIDE ==
styleList->mListStylePosition) {
AddFrames(aPresContext, mBullet, nsnull);
AddFrames(mBullet, nsnull);
mState &= ~NS_BLOCK_FRAME_HAS_OUTSIDE_BULLET;
}
else {

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

@ -119,18 +119,12 @@ public:
NS_IMETHOD SetInitialChildList(nsPresContext* aPresContext,
nsIAtom* aListName,
nsIFrame* aChildList);
NS_IMETHOD AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
virtual nsIFrame* GetFirstChild(nsIAtom* aListName) const;
NS_IMETHOD SetParent(const nsIFrame* aParent);
@ -333,8 +327,7 @@ protected:
* contains aPrevSibling and add aFrameList after aPrevSibling on that line.
* new lines are created as necessary to handle block data in aFrameList.
*/
nsresult AddFrames(nsPresContext* aPresContext,
nsIFrame* aFrameList,
nsresult AddFrames(nsIFrame* aFrameList,
nsIFrame* aPrevSibling);
/** does all the real work for removing aDeletedFrame from this
@ -342,8 +335,7 @@ protected:
* handled continued frames
* marks lines dirty as needed
*/
nsresult DoRemoveFrame(nsPresContext* aPresContext,
nsIFrame* aDeletedFrame);
nsresult DoRemoveFrame(nsIFrame* aDeletedFrame);
/** grab overflow lines from this block's prevInFlow, and make them
* part of this block's mLines list.
@ -358,8 +350,7 @@ protected:
line_iterator RemoveFloat(nsIFrame* aFloat);
// Remove a float, abs, rel positioned frame from the appropriate block's list
static void DoRemoveOutOfFlowFrame(nsPresContext* aPresContext,
nsIFrame* aFrame);
static void DoRemoveOutOfFlowFrame(nsIFrame* aFrame);
/** set up the conditions necessary for an initial reflow */
nsresult PrepareInitialReflow(nsBlockReflowState& aState);

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

@ -61,18 +61,12 @@ public:
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
NS_IMETHOD AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
virtual nsIFrame* GetContentInsertionFrame() {
@ -860,31 +854,25 @@ nsColumnSetFrame::GetSkipSides() const
}
NS_IMETHODIMP
nsColumnSetFrame::AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aFrameList)
nsColumnSetFrame::AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList)
{
NS_NOTREACHED("AppendFrames not supported");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsColumnSetFrame::InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
nsColumnSetFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
{
NS_NOTREACHED("InsertFrames not supported");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsColumnSetFrame::RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aOldFrame)
nsColumnSetFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
NS_NOTREACHED("RemoveFrame not supported");
return NS_ERROR_NOT_IMPLEMENTED;

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

@ -386,9 +386,7 @@ nsContainerFrame::GetFrameForPointUsing(const nsPoint& aPoint,
}
NS_IMETHODIMP
nsContainerFrame::ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsContainerFrame::ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame)
{
@ -401,9 +399,9 @@ nsContainerFrame::ReplaceFrame(nsPresContext* aPresContext,
prevFrame = frames.GetPrevSiblingFor(aOldFrame);
// Default implementation treats it like two separate operations
rv = RemoveFrame(aPresContext, aPresShell, aListName, aOldFrame);
rv = RemoveFrame(aListName, aOldFrame);
if (NS_SUCCEEDED(rv)) {
rv = InsertFrames(aPresContext, aPresShell, aListName, prevFrame, aNewFrame);
rv = InsertFrames(aListName, prevFrame, aNewFrame);
}
return rv;

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

@ -73,9 +73,7 @@ public:
NS_IMETHOD GetFrameForPoint(const nsPoint& aPoint,
nsFramePaintLayer aWhichLayer,
nsIFrame** aFrame);
NS_IMETHOD ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame);
NS_IMETHOD ReflowDirtyChild(nsIPresShell* aPresShell, nsIFrame* aChild);

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

@ -590,9 +590,7 @@ NS_IMETHODIMP nsFrame::SetInitialChildList(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsFrame::AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsFrame::AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList)
{
NS_PRECONDITION(PR_FALSE, "not a container");
@ -600,9 +598,7 @@ nsFrame::AppendFrames(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsFrame::InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
{
@ -611,9 +607,7 @@ nsFrame::InsertFrames(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsFrame::RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
NS_PRECONDITION(PR_FALSE, "not a container");
@ -621,9 +615,7 @@ nsFrame::RemoveFrame(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsFrame::ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsFrame::ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame)
{

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

@ -169,22 +169,14 @@ public:
NS_IMETHOD SetInitialChildList(nsPresContext* aPresContext,
nsIAtom* aListName,
nsIFrame* aChildList);
NS_IMETHOD AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
NS_IMETHOD ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame);
NS_IMETHOD Destroy(nsPresContext* aPresContext);

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

@ -321,8 +321,7 @@ nsFrameList::DoReplaceFrame(nsIFrame* aParent,
}
PRBool
nsFrameList::ReplaceFrame(nsPresContext* aPresContext,
nsIFrame* aParent,
nsFrameList::ReplaceFrame(nsIFrame* aParent,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame,
PRBool aDestroy)
@ -331,7 +330,7 @@ nsFrameList::ReplaceFrame(nsPresContext* aPresContext,
NS_PRECONDITION(aNewFrame, "null ptr");
if (DoReplaceFrame(aParent, aOldFrame, aNewFrame)) {
if (aDestroy) {
aOldFrame->Destroy(aPresContext);
aOldFrame->Destroy(aOldFrame->GetPresContext());
}
return PR_TRUE;
}

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

@ -106,8 +106,7 @@ public:
aFrameList.mFirstChild = nsnull;
}
PRBool ReplaceFrame(nsPresContext* aPresContext,
nsIFrame* aParent,
PRBool ReplaceFrame(nsIFrame* aParent,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame,
PRBool aDestroy);

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

@ -208,62 +208,40 @@ nsHTMLScrollFrame::SetInitialChildList(nsPresContext* aPresContext,
NS_IMETHODIMP
nsHTMLScrollFrame::AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aFrameList)
nsHTMLScrollFrame::AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList)
{
nsresult rv = nsBoxFrame::AppendFrames(aPresContext,
aPresShell,
aListName,
aFrameList);
nsresult rv = nsBoxFrame::AppendFrames(aListName, aFrameList);
mInner.ReloadChildFrames();
return rv;
}
NS_IMETHODIMP
nsHTMLScrollFrame::InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
nsHTMLScrollFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
{
nsresult rv = nsBoxFrame::InsertFrames(aPresContext,
aPresShell,
aListName,
aPrevFrame,
aFrameList);
nsresult rv = nsBoxFrame::InsertFrames(aListName, aPrevFrame, aFrameList);
mInner.ReloadChildFrames();
return rv;
}
NS_IMETHODIMP
nsHTMLScrollFrame::RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aOldFrame)
nsHTMLScrollFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
nsresult rv = nsBoxFrame::RemoveFrame(aPresContext,
aPresShell,
aListName,
aOldFrame);
nsresult rv = nsBoxFrame::RemoveFrame(aListName, aOldFrame);
mInner.ReloadChildFrames();
return rv;
}
NS_IMETHODIMP
nsHTMLScrollFrame::ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame)
nsHTMLScrollFrame::ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame)
{
nsresult rv = nsBoxFrame::ReplaceFrame(aPresContext,
aPresShell,
aListName,
aOldFrame,
aNewFrame);
nsresult rv = nsBoxFrame::ReplaceFrame(aListName, aOldFrame, aNewFrame);
mInner.ReloadChildFrames();
return rv;
}
@ -731,62 +709,40 @@ nsXULScrollFrame::SetInitialChildList(nsPresContext* aPresContext,
NS_IMETHODIMP
nsXULScrollFrame::AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aFrameList)
nsXULScrollFrame::AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList)
{
nsresult rv = nsBoxFrame::AppendFrames(aPresContext,
aPresShell,
aListName,
aFrameList);
nsresult rv = nsBoxFrame::AppendFrames(aListName, aFrameList);
mInner.ReloadChildFrames();
return rv;
}
NS_IMETHODIMP
nsXULScrollFrame::InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
nsXULScrollFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
{
nsresult rv = nsBoxFrame::InsertFrames(aPresContext,
aPresShell,
aListName,
aPrevFrame,
aFrameList);
nsresult rv = nsBoxFrame::InsertFrames(aListName, aPrevFrame, aFrameList);
mInner.ReloadChildFrames();
return rv;
}
NS_IMETHODIMP
nsXULScrollFrame::RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aOldFrame)
nsXULScrollFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
nsresult rv = nsBoxFrame::RemoveFrame(aPresContext,
aPresShell,
aListName,
aOldFrame);
nsresult rv = nsBoxFrame::RemoveFrame(aListName, aOldFrame);
mInner.ReloadChildFrames();
return rv;
}
NS_IMETHODIMP
nsXULScrollFrame::ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame)
nsXULScrollFrame::ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame)
{
nsresult rv = nsBoxFrame::ReplaceFrame(aPresContext,
aPresShell,
aListName,
aOldFrame,
aNewFrame);
nsresult rv = nsBoxFrame::ReplaceFrame(aListName, aOldFrame, aNewFrame);
mInner.ReloadChildFrames();
return rv;
}

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

@ -187,27 +187,19 @@ public:
// Because there can be only one child frame, these two function return
// NS_ERROR_FAILURE
NS_IMETHOD AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
NS_IMETHOD ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame);
NS_IMETHOD ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame);
NS_IMETHOD Destroy(nsPresContext* aPresContext);
NS_IMETHOD RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
@ -333,27 +325,19 @@ public:
// Because there can be only one child frame, these two function return
// NS_ERROR_FAILURE
NS_IMETHOD AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
NS_IMETHOD ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame);
NS_IMETHOD ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame);
NS_IMETHOD Destroy(nsPresContext* aPresContext);
NS_IMETHOD RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);

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

@ -97,18 +97,12 @@ public:
nsIFrame* aPrevInFlow);
NS_IMETHOD Destroy(nsPresContext* aPresContext);
NS_IMETHOD AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
NS_IMETHOD Reflow(nsPresContext* aPresContext,
@ -271,9 +265,7 @@ CanvasFrame::ScrollPositionDidChange(nsIScrollableView* aScrollable, nscoord aX,
}
NS_IMETHODIMP
CanvasFrame::AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
CanvasFrame::AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList)
{
nsresult rv;
@ -299,7 +291,7 @@ CanvasFrame::AppendFrames(nsPresContext* aPresContext,
nsHTMLReflowCommand* reflowCmd;
rv = NS_NewHTMLReflowCommand(&reflowCmd, this, eReflowType_ReflowDirty);
if (NS_SUCCEEDED(rv)) {
aPresShell.AppendReflowCommand(reflowCmd);
GetPresContext()->PresShell()->AppendReflowCommand(reflowCmd);
}
}
@ -307,9 +299,7 @@ CanvasFrame::AppendFrames(nsPresContext* aPresContext,
}
NS_IMETHODIMP
CanvasFrame::InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
CanvasFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
{
@ -321,16 +311,14 @@ CanvasFrame::InsertFrames(nsPresContext* aPresContext,
if (aPrevFrame) {
rv = NS_ERROR_UNEXPECTED;
} else {
rv = AppendFrames(aPresContext, aPresShell, aListName, aFrameList);
rv = AppendFrames(aListName, aFrameList);
}
return rv;
}
NS_IMETHODIMP
CanvasFrame::RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
CanvasFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
nsresult rv;
@ -348,13 +336,13 @@ CanvasFrame::RemoveFrame(nsPresContext* aPresContext,
Invalidate(aOldFrame->GetOverflowRect() + aOldFrame->GetPosition(), PR_FALSE);
// Remove the frame and destroy it
mFrames.DestroyFrame(aPresContext, aOldFrame);
mFrames.DestroyFrame(GetPresContext(), aOldFrame);
// Generate a reflow command so we get reflowed
nsHTMLReflowCommand* reflowCmd;
rv = NS_NewHTMLReflowCommand(&reflowCmd, this, eReflowType_ReflowDirty);
if (NS_SUCCEEDED(rv)) {
aPresShell.AppendReflowCommand(reflowCmd);
GetPresContext()->PresShell()->AppendReflowCommand(reflowCmd);
}
} else {

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

@ -483,9 +483,7 @@ public:
* NS_ERROR_UNEXPECTED if the frame is an atomic frame,
* NS_OK otherwise
*/
NS_IMETHOD AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList) = 0;
/**
@ -503,9 +501,7 @@ public:
* NS_ERROR_UNEXPECTED if the frame is an atomic frame,
* NS_OK otherwise
*/
NS_IMETHOD InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList) = 0;
@ -525,9 +521,7 @@ public:
* NS_ERROR_UNEXPECTED if the frame is an atomic frame,
* NS_OK otherwise
*/
NS_IMETHOD RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame) = 0;
/**
@ -547,9 +541,7 @@ public:
* NS_ERROR_UNEXPECTED if the frame is an atomic frame,
* NS_OK otherwise
*/
NS_IMETHOD ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame) = 0;

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

@ -189,10 +189,8 @@ nsInlineFrame::IsEmpty()
}
NS_IMETHODIMP
nsInlineFrame::AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aFrameList)
nsInlineFrame::AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList)
{
if (nsnull != aListName) {
return NS_ERROR_INVALID_ARG;
@ -201,17 +199,15 @@ nsInlineFrame::AppendFrames(nsPresContext* aPresContext,
mFrames.AppendFrames(this, aFrameList);
// Ask the parent frame to reflow me.
ReflowDirtyChild(&aPresShell, nsnull);
ReflowDirtyChild(GetPresContext()->PresShell(), nsnull);
}
return NS_OK;
}
NS_IMETHODIMP
nsInlineFrame::InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
nsInlineFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
{
if (nsnull != aListName) {
#ifdef IBMBIDI
@ -227,16 +223,14 @@ nsInlineFrame::InsertFrames(nsPresContext* aPresContext,
if (nsnull == aListName)
#endif
// Ask the parent frame to reflow me.
ReflowDirtyChild(&aPresShell, nsnull);
ReflowDirtyChild(GetPresContext()->PresShell(), nsnull);
}
return NS_OK;
}
NS_IMETHODIMP
nsInlineFrame::RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aOldFrame)
nsInlineFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
if (nsnull != aListName) {
#ifdef IBMBIDI
@ -272,7 +266,7 @@ nsInlineFrame::RemoveFrame(nsPresContext* aPresContext,
// remove the frame from its parents list and generate a reflow
// command.
nsIFrame* oldFrameNextInFlow = aOldFrame->GetNextInFlow();
parent->mFrames.DestroyFrame(aPresContext, aOldFrame);
parent->mFrames.DestroyFrame(GetPresContext(), aOldFrame);
aOldFrame = oldFrameNextInFlow;
if (aOldFrame) {
parent = NS_STATIC_CAST(nsInlineFrame*, aOldFrame->GetParent());
@ -281,7 +275,7 @@ nsInlineFrame::RemoveFrame(nsPresContext* aPresContext,
if (generateReflowCommand) {
// Ask the parent frame to reflow me.
ReflowDirtyChild(&aPresShell, nsnull);
ReflowDirtyChild(GetPresContext()->PresShell(), nsnull);
}
}
@ -289,11 +283,9 @@ nsInlineFrame::RemoveFrame(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsInlineFrame::ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame)
nsInlineFrame::ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame)
{
if (aListName) {
NS_ERROR("Don't have any special lists on inline frames!");
@ -305,10 +297,10 @@ nsInlineFrame::ReplaceFrame(nsPresContext* aPresContext,
}
PRBool retval =
mFrames.ReplaceFrame(aPresContext, this, aOldFrame, aNewFrame, PR_TRUE);
mFrames.ReplaceFrame(this, aOldFrame, aNewFrame, PR_TRUE);
// Ask the parent frame to reflow me.
ReflowDirtyChild(&aPresShell, nsnull);
ReflowDirtyChild(GetPresContext()->PresShell(), nsnull);
return retval ? NS_OK : NS_ERROR_FAILURE;
}
@ -1124,74 +1116,62 @@ nsPositionedInlineFrame::SetInitialChildList(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsPositionedInlineFrame::AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsPositionedInlineFrame::AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList)
{
nsresult rv;
if (mAbsoluteContainer.GetChildListName() == aListName) {
rv = mAbsoluteContainer.AppendFrames(this, aPresContext, aPresShell, aListName,
aFrameList);
rv = mAbsoluteContainer.AppendFrames(this, aListName, aFrameList);
} else {
rv = nsInlineFrame::AppendFrames(aPresContext, aPresShell, aListName,
aFrameList);
rv = nsInlineFrame::AppendFrames(aListName, aFrameList);
}
return rv;
}
NS_IMETHODIMP
nsPositionedInlineFrame::InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsPositionedInlineFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
{
nsresult rv;
if (mAbsoluteContainer.GetChildListName() == aListName) {
rv = mAbsoluteContainer.InsertFrames(this, aPresContext, aPresShell, aListName,
aPrevFrame, aFrameList);
rv = mAbsoluteContainer.InsertFrames(this, aListName, aPrevFrame,
aFrameList);
} else {
rv = nsInlineFrame::InsertFrames(aPresContext, aPresShell, aListName, aPrevFrame,
aFrameList);
rv = nsInlineFrame::InsertFrames(aListName, aPrevFrame, aFrameList);
}
return rv;
}
NS_IMETHODIMP
nsPositionedInlineFrame::RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsPositionedInlineFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
nsresult rv;
if (mAbsoluteContainer.GetChildListName() == aListName) {
rv = mAbsoluteContainer.RemoveFrame(this, aPresContext, aPresShell, aListName, aOldFrame);
rv = mAbsoluteContainer.RemoveFrame(this, aListName, aOldFrame);
} else {
rv = nsInlineFrame::RemoveFrame(aPresContext, aPresShell, aListName, aOldFrame);
rv = nsInlineFrame::RemoveFrame(aListName, aOldFrame);
}
return rv;
}
NS_IMETHODIMP
nsPositionedInlineFrame::ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsPositionedInlineFrame::ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame)
{
if (mAbsoluteContainer.GetChildListName() == aListName) {
return mAbsoluteContainer.ReplaceFrame(this, aPresContext, aPresShell,
aListName, aOldFrame, aNewFrame);
return mAbsoluteContainer.ReplaceFrame(this, aListName, aOldFrame,
aNewFrame);
} else {
return nsInlineFrame::ReplaceFrame(aPresContext, aPresShell, aListName,
aOldFrame, aNewFrame);
return nsInlineFrame::ReplaceFrame(aListName, aOldFrame, aNewFrame);
}
}

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

@ -74,24 +74,16 @@ public:
NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr);
// nsIFrame overrides
NS_IMETHOD AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aOldFrame);
NS_IMETHOD ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame);
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
NS_IMETHOD ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame);
NS_IMETHOD Paint(nsPresContext* aPresContext,
nsIRenderingContext& aRenderingContext,
const nsRect& aDirtyRect,
@ -215,24 +207,16 @@ public:
NS_IMETHOD SetInitialChildList(nsPresContext* aPresContext,
nsIAtom* aListName,
nsIFrame* aChildList);
NS_IMETHOD AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aOldFrame);
NS_IMETHOD ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame);
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
NS_IMETHOD ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame);
virtual nsIAtom* GetAdditionalChildListName(PRInt32 aIndex) const;

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

@ -1680,7 +1680,7 @@ nsObjectFrame::CreateDefaultFrames(nsPresContext *aPresContext,
break;
nsHTMLContainerFrame::CreateViewForFrame(imgFrame, divFrame, PR_FALSE);
divFrame->AppendFrames(aPresContext, *shell, nsnull, imgFrame);
divFrame->AppendFrames(nsnull, imgFrame);
rv = NS_NewTextFrame(shell, &textFrame);
if (NS_FAILED(rv))
@ -1693,7 +1693,7 @@ nsObjectFrame::CreateDefaultFrames(nsPresContext *aPresContext,
textFrame->SetInitialChildList(aPresContext, nsnull, nsnull);
divFrame->AppendFrames(aPresContext, *shell, nsnull, textFrame);
divFrame->AppendFrames(nsnull, textFrame);
} while (0);
if (NS_FAILED(rv)) {

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

@ -99,16 +99,13 @@ ViewportFrame::GetFrameForPoint(const nsPoint& aPoint,
}
NS_IMETHODIMP
ViewportFrame::AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
ViewportFrame::AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList)
{
nsresult rv = NS_OK;
if (mFixedContainer.GetChildListName() == aListName) {
rv = mFixedContainer.AppendFrames(this, aPresContext, aPresShell,
aListName, aFrameList);
rv = mFixedContainer.AppendFrames(this, aListName, aFrameList);
}
else {
// We only expect incremental changes for our fixed frames
@ -120,17 +117,14 @@ ViewportFrame::AppendFrames(nsPresContext* aPresContext,
}
NS_IMETHODIMP
ViewportFrame::InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
ViewportFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
{
nsresult rv = NS_OK;
if (mFixedContainer.GetChildListName() == aListName) {
rv = mFixedContainer.InsertFrames(this, aPresContext, aPresShell, aListName,
aPrevFrame, aFrameList);
rv = mFixedContainer.InsertFrames(this, aListName, aPrevFrame, aFrameList);
}
else {
// We only expect incremental changes for our fixed frames
@ -142,15 +136,13 @@ ViewportFrame::InsertFrames(nsPresContext* aPresContext,
}
NS_IMETHODIMP
ViewportFrame::RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
ViewportFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
nsresult rv = NS_OK;
if (mFixedContainer.GetChildListName() == aListName) {
rv = mFixedContainer.RemoveFrame(this, aPresContext, aPresShell, aListName, aOldFrame);
rv = mFixedContainer.RemoveFrame(this, aListName, aOldFrame);
}
else {
// We only expect incremental changes for our fixed frames

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

@ -75,20 +75,14 @@ public:
nsFramePaintLayer aWhichLayer,
nsIFrame** aFrame);
NS_IMETHOD AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
virtual nsIAtom* GetAdditionalChildListName(PRInt32 aIndex) const;

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

@ -127,22 +127,17 @@ nsSVGDefsFrame::Init(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsSVGDefsFrame::AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aFrameList)
nsSVGDefsFrame::AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList)
{
// append == insert at end:
return InsertFrames(aPresContext, aPresShell, aListName,
mFrames.LastChild(), aFrameList);
return InsertFrames(aListName, mFrames.LastChild(), aFrameList);
}
NS_IMETHODIMP
nsSVGDefsFrame::InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
nsSVGDefsFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
{
// memorize last new frame
nsIFrame* lastNewFrame = nsnull;
@ -172,10 +167,8 @@ nsSVGDefsFrame::InsertFrames(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsSVGDefsFrame::RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aOldFrame)
nsSVGDefsFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
nsCOMPtr<nsISVGRendererRegion> dirty_region;
@ -185,7 +178,7 @@ nsSVGDefsFrame::RemoveFrame(nsPresContext* aPresContext,
if (SVGFrame)
dirty_region = SVGFrame->GetCoveredRegion();
PRBool result = mFrames.DestroyFrame(aPresContext, aOldFrame);
PRBool result = mFrames.DestroyFrame(GetPresContext(), aOldFrame);
nsISVGOuterSVGFrame* outerSVGFrame = GetOuterSVGFrame();
NS_ASSERTION(outerSVGFrame, "no outer svg frame");
@ -197,11 +190,9 @@ nsSVGDefsFrame::RemoveFrame(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsSVGDefsFrame::ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame)
nsSVGDefsFrame::ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_UNEXPECTED;

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

@ -68,22 +68,14 @@ private:
public:
// nsIFrame:
NS_IMETHOD AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
NS_IMETHOD ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame);
NS_IMETHOD Init(nsPresContext* aPresContext,

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

@ -96,25 +96,17 @@ public:
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
NS_IMETHOD AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
NS_IMETHOD ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame);
@ -371,55 +363,45 @@ nsSVGForeignObjectFrame::Reflow(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsSVGForeignObjectFrame::AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsSVGForeignObjectFrame::AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList)
{
#ifdef DEBUG
printf("**nsSVGForeignObjectFrame::AppendFrames()\n");
#endif
nsresult rv;
rv = nsSVGForeignObjectFrameBase::AppendFrames(aPresContext, aPresShell,
aListName, aFrameList);
rv = nsSVGForeignObjectFrameBase::AppendFrames(aListName, aFrameList);
Update();
return rv;
}
NS_IMETHODIMP
nsSVGForeignObjectFrame::InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
nsSVGForeignObjectFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
{
#ifdef DEBUG
printf("**nsSVGForeignObjectFrame::InsertFrames()\n");
#endif
nsresult rv;
rv = nsSVGForeignObjectFrameBase::InsertFrames(aPresContext, aPresShell,
aListName, aPrevFrame, aFrameList);
rv = nsSVGForeignObjectFrameBase::InsertFrames(aListName, aPrevFrame,
aFrameList);
Update();
return rv;
}
NS_IMETHODIMP
nsSVGForeignObjectFrame::RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsSVGForeignObjectFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
nsresult rv;
rv = nsSVGForeignObjectFrameBase::RemoveFrame(aPresContext, aPresShell,
aListName, aOldFrame);
rv = nsSVGForeignObjectFrameBase::RemoveFrame(aListName, aOldFrame);
Update();
return rv;
}
NS_IMETHODIMP
nsSVGForeignObjectFrame::ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsSVGForeignObjectFrame::ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame)
{
@ -427,8 +409,8 @@ nsSVGForeignObjectFrame::ReplaceFrame(nsPresContext* aPresContext,
printf("**nsSVGForeignObjectFrame::ReplaceFrame()\n");
#endif
nsresult rv;
rv = nsSVGForeignObjectFrameBase::ReplaceFrame(aPresContext, aPresShell,
aListName, aOldFrame, aNewFrame);
rv = nsSVGForeignObjectFrameBase::ReplaceFrame(aListName, aOldFrame,
aNewFrame);
Update();
return rv;
}

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

@ -101,22 +101,17 @@ nsSVGGenericContainerFrame::Init(nsPresContext* aPresContext,
NS_IMETHODIMP
nsSVGGenericContainerFrame::AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsSVGGenericContainerFrame::AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList)
{
// append == insert at end:
return InsertFrames(aPresContext, aPresShell, aListName,
mFrames.LastChild(), aFrameList);
return InsertFrames(aListName, mFrames.LastChild(), aFrameList);
}
NS_IMETHODIMP
nsSVGGenericContainerFrame::InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
nsSVGGenericContainerFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
{
nsIFrame* lastNewFrame = nsnull;
{
@ -144,10 +139,8 @@ nsSVGGenericContainerFrame::InsertFrames(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsSVGGenericContainerFrame::RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aOldFrame)
nsSVGGenericContainerFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
nsCOMPtr<nsISVGRendererRegion> dirty_region;
@ -157,7 +150,7 @@ nsSVGGenericContainerFrame::RemoveFrame(nsPresContext* aPresContext,
if (SVGFrame)
dirty_region = SVGFrame->GetCoveredRegion();
PRBool result = mFrames.DestroyFrame(aPresContext, aOldFrame);
PRBool result = mFrames.DestroyFrame(GetPresContext(), aOldFrame);
nsISVGOuterSVGFrame* outerSVGFrame = GetOuterSVGFrame();
NS_ASSERTION(outerSVGFrame, "no outer svg frame");
@ -169,11 +162,9 @@ nsSVGGenericContainerFrame::RemoveFrame(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsSVGGenericContainerFrame::ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame)
nsSVGGenericContainerFrame::ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_UNEXPECTED;

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

@ -68,22 +68,14 @@ private:
public:
// nsIFrame:
NS_IMETHOD AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
NS_IMETHOD ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame);
NS_IMETHOD Init(nsPresContext* aPresContext,

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

@ -78,22 +78,14 @@ private:
public:
// nsIFrame:
NS_IMETHOD AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
NS_IMETHOD ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame);
NS_IMETHOD Init(nsPresContext* aPresContext,
@ -251,20 +243,15 @@ nsSVGInnerSVGFrame::Init(nsPresContext* aPresContext,
NS_IMETHODIMP
nsSVGInnerSVGFrame::AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsSVGInnerSVGFrame::AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList)
{
// append == insert at end:
return InsertFrames(aPresContext, aPresShell, aListName,
mFrames.LastChild(), aFrameList);
return InsertFrames(aListName, mFrames.LastChild(), aFrameList);
}
NS_IMETHODIMP
nsSVGInnerSVGFrame::InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsSVGInnerSVGFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
{
@ -294,9 +281,7 @@ nsSVGInnerSVGFrame::InsertFrames(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsSVGInnerSVGFrame::RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsSVGInnerSVGFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
nsCOMPtr<nsISVGRendererRegion> dirty_region;
@ -307,7 +292,7 @@ nsSVGInnerSVGFrame::RemoveFrame(nsPresContext* aPresContext,
if (SVGFrame)
dirty_region = SVGFrame->GetCoveredRegion();
PRBool result = mFrames.DestroyFrame(aPresContext, aOldFrame);
PRBool result = mFrames.DestroyFrame(GetPresContext(), aOldFrame);
nsISVGOuterSVGFrame* outerSVGFrame = GetOuterSVGFrame();
NS_ASSERTION(outerSVGFrame, "no outer svg frame");
@ -319,9 +304,7 @@ nsSVGInnerSVGFrame::RemoveFrame(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsSVGInnerSVGFrame::ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsSVGInnerSVGFrame::ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame)
{

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

@ -186,22 +186,14 @@ public:
nsDidReflowStatus aStatus);
NS_IMETHOD AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
NS_IMETHOD ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame);
@ -608,22 +600,17 @@ nsSVGOuterSVGFrame::DidReflow(nsPresContext* aPresContext,
// container methods
NS_IMETHODIMP
nsSVGOuterSVGFrame::AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aFrameList)
nsSVGOuterSVGFrame::AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList)
{
// append == insert at end:
return InsertFrames(aPresContext, aPresShell, aListName,
mFrames.LastChild(), aFrameList);
return InsertFrames(aListName, mFrames.LastChild(), aFrameList);
}
NS_IMETHODIMP
nsSVGOuterSVGFrame::InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
nsSVGOuterSVGFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
{
// memorize last new frame
nsIFrame* lastNewFrame = nsnull;
@ -658,10 +645,8 @@ nsSVGOuterSVGFrame::InsertFrames(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsSVGOuterSVGFrame::RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aOldFrame)
nsSVGOuterSVGFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
nsCOMPtr<nsISVGRendererRegion> dirty_region;
@ -671,7 +656,7 @@ nsSVGOuterSVGFrame::RemoveFrame(nsPresContext* aPresContext,
if (SVGFrame)
dirty_region = SVGFrame->GetCoveredRegion();
PRBool result = mFrames.DestroyFrame(aPresContext, aOldFrame);
PRBool result = mFrames.DestroyFrame(GetPresContext(), aOldFrame);
nsISVGOuterSVGFrame* outerSVGFrame = GetOuterSVGFrame();
NS_ASSERTION(outerSVGFrame, "no outer svg frame");
@ -683,11 +668,9 @@ nsSVGOuterSVGFrame::RemoveFrame(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsSVGOuterSVGFrame::ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame)
nsSVGOuterSVGFrame::ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_UNEXPECTED;

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

@ -85,22 +85,14 @@ private:
public:
// nsIFrame:
NS_IMETHOD AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
NS_IMETHOD ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame);
NS_IMETHOD Init(nsPresContext* aPresContext,
@ -263,20 +255,15 @@ nsSVGTSpanFrame::Init(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsSVGTSpanFrame::AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsSVGTSpanFrame::AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList)
{
// append == insert at end:
return InsertFrames(aPresContext, aPresShell, aListName,
mFrames.LastChild(), aFrameList);
return InsertFrames(aListName, mFrames.LastChild(), aFrameList);
}
NS_IMETHODIMP
nsSVGTSpanFrame::InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsSVGTSpanFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
{
@ -309,9 +296,7 @@ nsSVGTSpanFrame::InsertFrames(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsSVGTSpanFrame::RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsSVGTSpanFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
nsCOMPtr<nsISVGRendererRegion> dirty_region;
@ -322,7 +307,7 @@ nsSVGTSpanFrame::RemoveFrame(nsPresContext* aPresContext,
if (SVGFrame)
dirty_region = SVGFrame->GetCoveredRegion();
PRBool result = mFrames.DestroyFrame(aPresContext, aOldFrame);
PRBool result = mFrames.DestroyFrame(GetPresContext(), aOldFrame);
nsISVGOuterSVGFrame* outerSVGFrame = GetOuterSVGFrame();
NS_ASSERTION(outerSVGFrame, "no outer svg frame");
@ -345,9 +330,7 @@ nsSVGTSpanFrame::RemoveFrame(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsSVGTSpanFrame::ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsSVGTSpanFrame::ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame)
{

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

@ -90,22 +90,14 @@ private:
public:
// nsIFrame:
NS_IMETHOD AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
NS_IMETHOD ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame);
@ -328,20 +320,15 @@ nsSVGTextFrame::DidSetStyleContext(nsPresContext* aPresContext)
}
NS_IMETHODIMP
nsSVGTextFrame::AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsSVGTextFrame::AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList)
{
// append == insert at end:
return InsertFrames(aPresContext, aPresShell, aListName,
mFrames.LastChild(), aFrameList);
return InsertFrames(aListName, mFrames.LastChild(), aFrameList);
}
NS_IMETHODIMP
nsSVGTextFrame::InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsSVGTextFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
{
@ -374,9 +361,7 @@ nsSVGTextFrame::InsertFrames(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsSVGTextFrame::RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsSVGTextFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
nsCOMPtr<nsISVGRendererRegion> dirty_region;
@ -387,7 +372,7 @@ nsSVGTextFrame::RemoveFrame(nsPresContext* aPresContext,
if (SVGFrame)
dirty_region = SVGFrame->GetCoveredRegion();
PRBool result = mFrames.DestroyFrame(aPresContext, aOldFrame);
PRBool result = mFrames.DestroyFrame(GetPresContext(), aOldFrame);
nsISVGOuterSVGFrame* outerSVGFrame = GetOuterSVGFrame();
NS_ASSERTION(outerSVGFrame, "no outer svg frame");
@ -410,9 +395,7 @@ nsSVGTextFrame::RemoveFrame(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsSVGTextFrame::ReplaceFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsSVGTextFrame::ReplaceFrame(nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame)
{

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

@ -213,7 +213,7 @@ nsTableCellFrame::AttributeChanged(nsIContent* aChild,
nsTableFrame* tableFrame = nsnull;
nsresult rv = nsTableFrame::GetTableFrame(this, tableFrame);
if ((NS_SUCCEEDED(rv)) && (tableFrame)) {
tableFrame->AttributeChangedFor(GetPresContext(), this, aChild, aAttribute);
tableFrame->AttributeChangedFor(this, aChild, aAttribute);
}
return NS_OK;
}
@ -239,9 +239,7 @@ void nsTableCellFrame::SetPass1MaxElementWidth(nscoord aMaxWidth,
}
NS_IMETHODIMP
nsTableCellFrame::AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsTableCellFrame::AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList)
{
NS_PRECONDITION(PR_FALSE, "unsupported operation");
@ -249,9 +247,7 @@ nsTableCellFrame::AppendFrames(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsTableCellFrame::InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsTableCellFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
{
@ -260,9 +256,7 @@ nsTableCellFrame::InsertFrames(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsTableCellFrame::RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsTableCellFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
NS_PRECONDITION(PR_FALSE, "unsupported operation");
@ -424,7 +418,7 @@ nsTableCellFrame::Paint(nsPresContext* aPresContext,
// bottom and/or right portion of the cell is painted by translating
// the rendering context.
nsPoint offset;
GetCollapseOffset(aPresContext, offset);
GetCollapseOffset(offset);
PRBool pushed = PR_FALSE;
if ((0 != offset.x) || (0 != offset.y)) {
aRenderingContext.PushState();
@ -526,13 +520,13 @@ PRBool nsTableCellFrame::ParentDisablesSelection() const //override default beha
// Align the cell's child frame within the cell
void nsTableCellFrame::VerticallyAlignChild(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
void nsTableCellFrame::VerticallyAlignChild(const nsHTMLReflowState& aReflowState,
nscoord aMaxAscent)
{
const nsStyleTextReset* textStyle = GetStyleTextReset();
/* XXX: remove tableFrame when border-collapse inherits */
GET_PIXELS_TO_TWIPS(aPresContext, p2t);
nsPresContext* presContext = GetPresContext();
GET_PIXELS_TO_TWIPS(presContext, p2t);
nsMargin borderPadding = nsTableFrame::GetBorderPadding(aReflowState, p2t, this);
nscoord topInset = borderPadding.top;
@ -585,7 +579,7 @@ void nsTableCellFrame::VerticallyAlignChild(nsPresContext* aPresContext
// Align the middle of the child frame with the middle of the content area,
kidYTop = (height - childHeight - bottomInset + topInset) / 2;
kidYTop = nsTableFrame::RoundToPixel(kidYTop,
aPresContext->ScaledPixelsToTwips(),
presContext->ScaledPixelsToTwips(),
eAlwaysRoundDown);
}
// if the content is larger than the cell height align from top
@ -604,7 +598,9 @@ void nsTableCellFrame::VerticallyAlignChild(nsPresContext* aPresContext
nsContainerFrame::PositionChildViews(firstKid);
}
if (HasView()) {
nsContainerFrame::SyncFrameViewAfterReflow(aPresContext, this, GetView(), &desiredSize.mOverflowArea, 0);
nsContainerFrame::SyncFrameViewAfterReflow(presContext, this,
GetView(),
&desiredSize.mOverflowArea, 0);
}
}
@ -1184,33 +1180,30 @@ nsTableCellFrame::GetFrameName(nsAString& aResult) const
}
#endif
void nsTableCellFrame::SetCollapseOffsetX(nsPresContext* aPresContext,
nscoord aXOffset)
void nsTableCellFrame::SetCollapseOffsetX(nscoord aXOffset)
{
// Get the frame property (creating a point struct if necessary)
nsPoint* offset = (nsPoint*)nsTableFrame::GetProperty(aPresContext, this, nsLayoutAtoms::collapseOffsetProperty, aXOffset != 0);
nsPoint* offset = (nsPoint*)nsTableFrame::GetProperty(this, nsLayoutAtoms::collapseOffsetProperty, aXOffset != 0);
if (offset) {
offset->x = aXOffset;
}
}
void nsTableCellFrame::SetCollapseOffsetY(nsPresContext* aPresContext,
nscoord aYOffset)
void nsTableCellFrame::SetCollapseOffsetY(nscoord aYOffset)
{
// Get the property (creating a point struct if necessary)
nsPoint* offset = (nsPoint*)nsTableFrame::GetProperty(aPresContext, this, nsLayoutAtoms::collapseOffsetProperty, aYOffset != 0);
nsPoint* offset = (nsPoint*)nsTableFrame::GetProperty(this, nsLayoutAtoms::collapseOffsetProperty, aYOffset != 0);
if (offset) {
offset->y = aYOffset;
}
}
void nsTableCellFrame::GetCollapseOffset(nsPresContext* aPresContext,
nsPoint& aOffset)
void nsTableCellFrame::GetCollapseOffset(nsPoint& aOffset)
{
// See if the property is set
nsPoint* offset = (nsPoint*)nsTableFrame::GetProperty(aPresContext, this, nsLayoutAtoms::collapseOffsetProperty);
nsPoint* offset = (nsPoint*)nsTableFrame::GetProperty(this, nsLayoutAtoms::collapseOffsetProperty);
if (offset) {
aOffset = *offset;

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

@ -100,18 +100,12 @@ public:
// table cells contain an area frame which does most of the work, and
// so these functions should never be called. They assert and return
// NS_ERROR_NOT_IMPLEMENTED
NS_IMETHOD AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
virtual nsIFrame* GetContentInsertionFrame() {
@ -161,8 +155,7 @@ public:
NS_IMETHOD GetFrameName(nsAString& aResult) const;
#endif
virtual void VerticallyAlignChild(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
virtual void VerticallyAlignChild(const nsHTMLReflowState& aReflowState,
nscoord aMaxAscent);
PRBool HasVerticalAlignBaseline();
@ -263,9 +256,9 @@ public:
void SetLastBlockHeight(nscoord aValue);
// The collapse offset is (0,0) except for cells originating in a row/col which is collapsed
void SetCollapseOffsetX(nsPresContext* aPresContext, nscoord aXOffset);
void SetCollapseOffsetY(nsPresContext* aPresContext, nscoord aYOffset);
void GetCollapseOffset(nsPresContext* aPresContext, nsPoint& aOffset);
void SetCollapseOffsetX(nscoord aXOffset);
void SetCollapseOffsetY(nscoord aYOffset);
void GetCollapseOffset(nsPoint& aOffset);
nsTableCellFrame* GetNextCell() const;

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

@ -97,8 +97,7 @@ void nsTableColGroupFrame::ResetColIndices(nsIFrame* aFirstColGroup,
nsresult
nsTableColGroupFrame::AddColsToTable(nsPresContext& aPresContext,
PRInt32 aFirstColIndex,
nsTableColGroupFrame::AddColsToTable(PRInt32 aFirstColIndex,
PRBool aResetSubsequentColIndices,
nsIFrame* aFirstFrame,
nsIFrame* aLastFrame)
@ -117,7 +116,7 @@ nsTableColGroupFrame::AddColsToTable(nsPresContext& aPresContext,
((nsTableColFrame*)kidFrame)->SetColIndex(colIndex);
if (!foundLastFrame) {
mColCount++;
tableFrame->InsertCol(aPresContext, (nsTableColFrame &)*kidFrame, colIndex);
tableFrame->InsertCol((nsTableColFrame &)*kidFrame, colIndex);
}
colIndex++;
}
@ -184,7 +183,7 @@ nsTableColGroupFrame::SetInitialChildList(nsPresContext* aPresContext,
if (!aChildList) {
nsIFrame* firstChild;
tableFrame->CreateAnonymousColFrames(*aPresContext, this, GetSpan(), eColAnonymousColGroup,
tableFrame->CreateAnonymousColFrames(this, GetSpan(), eColAnonymousColGroup,
PR_FALSE, nsnull, &firstChild);
if (firstChild) {
SetInitialChildList(aPresContext, aListName, firstChild);
@ -197,20 +196,16 @@ nsTableColGroupFrame::SetInitialChildList(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsTableColGroupFrame::AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsTableColGroupFrame::AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList)
{
mFrames.AppendFrames(this, aFrameList);
InsertColsReflow(*aPresContext, aPresShell, mColCount, aFrameList);
InsertColsReflow(mColCount, aFrameList);
return NS_OK;
}
NS_IMETHODIMP
nsTableColGroupFrame::InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsTableColGroupFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrameIn,
nsIFrame* aFrameList)
{
@ -222,19 +217,17 @@ nsTableColGroupFrame::InsertFrames(nsPresContext* aPresContext,
nsLayoutAtoms::tableColFrame);
PRInt32 colIndex = (prevFrame) ? ((nsTableColFrame*)prevFrame)->GetColIndex() + 1 : 0;
InsertColsReflow(*aPresContext, aPresShell, colIndex, aFrameList, lastFrame);
InsertColsReflow(colIndex, aFrameList, lastFrame);
return NS_OK;
}
void
nsTableColGroupFrame::InsertColsReflow(nsPresContext& aPresContext,
nsIPresShell& aPresShell,
PRInt32 aColIndex,
nsTableColGroupFrame::InsertColsReflow(PRInt32 aColIndex,
nsIFrame* aFirstFrame,
nsIFrame* aLastFrame)
{
AddColsToTable(aPresContext, aColIndex, PR_TRUE, aFirstFrame, aLastFrame);
AddColsToTable(aColIndex, PR_TRUE, aFirstFrame, aLastFrame);
nsTableFrame* tableFrame;
nsTableFrame::GetTableFrame(this, tableFrame);
@ -244,12 +237,11 @@ nsTableColGroupFrame::InsertColsReflow(nsPresContext& aPresContext,
tableFrame->SetNeedStrategyInit(PR_TRUE);
// Generate a reflow command so we reflow the table
nsTableFrame::AppendDirtyReflowCommand(&aPresShell, tableFrame);
nsTableFrame::AppendDirtyReflowCommand(tableFrame);
}
void
nsTableColGroupFrame::RemoveChild(nsPresContext& aPresContext,
nsTableColFrame& aChild,
nsTableColGroupFrame::RemoveChild(nsTableColFrame& aChild,
PRBool aResetSubsequentColIndices)
{
PRInt32 colIndex = 0;
@ -258,7 +250,7 @@ nsTableColGroupFrame::RemoveChild(nsPresContext& aPresContext,
colIndex = aChild.GetColIndex();
nextChild = aChild.GetNextSibling();
}
if (mFrames.DestroyFrame(&aPresContext, (nsIFrame*)&aChild)) {
if (mFrames.DestroyFrame(GetPresContext(), (nsIFrame*)&aChild)) {
mColCount--;
if (aResetSubsequentColIndices) {
if (nextChild) { // reset inside this and all following colgroups
@ -278,13 +270,11 @@ nsTableColGroupFrame::RemoveChild(nsPresContext& aPresContext,
// XXX this could be optimized with much effort
tableFrame->SetNeedStrategyInit(PR_TRUE);
// Generate a reflow command so we reflow the table
nsTableFrame::AppendDirtyReflowCommand(aPresContext.PresShell(), tableFrame);
nsTableFrame::AppendDirtyReflowCommand(tableFrame);
}
NS_IMETHODIMP
nsTableColGroupFrame::RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsTableColGroupFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
if (!aOldFrame) return NS_OK;
@ -292,21 +282,21 @@ nsTableColGroupFrame::RemoveFrame(nsPresContext* aPresContext,
if (nsLayoutAtoms::tableColFrame == aOldFrame->GetType()) {
nsTableColFrame* colFrame = (nsTableColFrame*)aOldFrame;
PRInt32 colIndex = colFrame->GetColIndex();
RemoveChild(*aPresContext, *colFrame, PR_TRUE);
RemoveChild(*colFrame, PR_TRUE);
nsTableFrame* tableFrame;
nsTableFrame::GetTableFrame(this, tableFrame);
if (!tableFrame) return NS_ERROR_NULL_POINTER;
tableFrame->RemoveCol(*aPresContext, this, colIndex, PR_TRUE, PR_TRUE);
tableFrame->RemoveCol(this, colIndex, PR_TRUE, PR_TRUE);
// XXX This could probably be optimized with much effort
tableFrame->SetNeedStrategyInit(PR_TRUE);
// Generate a reflow command so we reflow the table
nsTableFrame::AppendDirtyReflowCommand(&aPresShell, tableFrame);
nsTableFrame::AppendDirtyReflowCommand(tableFrame);
}
else {
mFrames.DestroyFrame(aPresContext, aOldFrame);
mFrames.DestroyFrame(GetPresContext(), aOldFrame);
}
return NS_OK;
@ -375,7 +365,7 @@ NS_METHOD nsTableColGroupFrame::Reflow(nsPresContext* aPresContext,
if (eReflowReason_Incremental == aReflowState.reason) {
rv = IncrementalReflow(aPresContext, aDesiredSize, aReflowState, aStatus);
rv = IncrementalReflow(aDesiredSize, aReflowState, aStatus);
}
for (kidFrame = mFrames.FirstChild(); kidFrame;
@ -404,8 +394,7 @@ NS_METHOD nsTableColGroupFrame::Reflow(nsPresContext* aPresContext,
return rv;
}
NS_METHOD nsTableColGroupFrame::IncrementalReflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
NS_METHOD nsTableColGroupFrame::IncrementalReflow(nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
@ -413,19 +402,18 @@ NS_METHOD nsTableColGroupFrame::IncrementalReflow(nsPresContext* aPresC
// the col group is a target if its path has a reflow command
nsHTMLReflowCommand* command = aReflowState.path->mReflowCommand;
if (command)
IR_TargetIsMe(aPresContext, aDesiredSize, aReflowState, aStatus);
IR_TargetIsMe(aDesiredSize, aReflowState, aStatus);
// see if the chidren are targets as well
nsReflowPath::iterator iter = aReflowState.path->FirstChild();
nsReflowPath::iterator end = aReflowState.path->EndChildren();
for (; iter != end; ++iter)
IR_TargetIsChild(aPresContext, aDesiredSize, aReflowState, aStatus, *iter);
IR_TargetIsChild(aDesiredSize, aReflowState, aStatus, *iter);
return NS_OK;
}
NS_METHOD nsTableColGroupFrame::IR_TargetIsMe(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
NS_METHOD nsTableColGroupFrame::IR_TargetIsMe(nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
@ -438,7 +426,7 @@ NS_METHOD nsTableColGroupFrame::IR_TargetIsMe(nsPresContext* aPresConte
switch (type)
{
case eReflowType_StyleChanged :
rv = IR_StyleChanged(aPresContext, aDesiredSize, aReflowState, aStatus);
rv = IR_StyleChanged(aDesiredSize, aReflowState, aStatus);
break;
case eReflowType_ContentChanged :
@ -455,8 +443,7 @@ NS_METHOD nsTableColGroupFrame::IR_TargetIsMe(nsPresContext* aPresConte
return rv;
}
NS_METHOD nsTableColGroupFrame::IR_StyleChanged(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
NS_METHOD nsTableColGroupFrame::IR_StyleChanged(nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
@ -471,8 +458,7 @@ NS_METHOD nsTableColGroupFrame::IR_StyleChanged(nsPresContext* aPresCon
return rv;
}
NS_METHOD nsTableColGroupFrame::IR_TargetIsChild(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
NS_METHOD nsTableColGroupFrame::IR_TargetIsChild(nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus,
nsIFrame * aNextFrame)
@ -481,11 +467,12 @@ NS_METHOD nsTableColGroupFrame::IR_TargetIsChild(nsPresContext* aPresCo
// Pass along the reflow command
nsHTMLReflowMetrics desiredSize(nsnull);
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, aNextFrame,
nsPresContext* presContext = GetPresContext();
nsHTMLReflowState kidReflowState(presContext, aReflowState, aNextFrame,
nsSize(aReflowState.availableWidth,
aReflowState.availableHeight));
rv = ReflowChild(aNextFrame, aPresContext, desiredSize, kidReflowState, 0, 0, 0, aStatus);
aNextFrame->DidReflow(aPresContext, nsnull, NS_FRAME_REFLOW_FINISHED);
rv = ReflowChild(aNextFrame, presContext, desiredSize, kidReflowState, 0, 0, 0, aStatus);
aNextFrame->DidReflow(presContext, nsnull, NS_FRAME_REFLOW_FINISHED);
if (NS_FAILED(rv))
return rv;

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

@ -115,30 +115,22 @@ public:
/** @see nsIFrame::AppendFrames, InsertFrames, RemoveFrame
*/
NS_IMETHOD AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
/** remove the column aChild from the column group, if requested renumber
* the subsequent columns in this column group and all following column
* groups. see also ResetColIndices for this
* @param aPresContext - the presentation context
* @param aChild - the column frame that needs to be removed
* @param aResetSubsequentColIndices - if true the columns that follow
* after aChild will be reenumerated
*/
void RemoveChild(nsPresContext& aPresContext,
nsTableColFrame& aChild,
void RemoveChild(nsTableColFrame& aChild,
PRBool aResetSubsequentColIndices);
/** @see nsIFrame::Paint
@ -179,7 +171,6 @@ public:
/** Add column frames to the table storages: colframe cache and cellmap
* this doesn't change the mFrames of the colgroup frame.
* @param aPresContext - the presentation context
* @param aFirstColIndex - the index at which aFirstFrame should be inserted
* into the colframe cache.
* @param aResetSubsequentColIndices - the indices of the col frames
@ -193,8 +184,7 @@ public:
* @result - if there is no table frame or the table frame is not
* the first in flow it will return an error
*/
nsresult AddColsToTable(nsPresContext& aPresContext,
PRInt32 aFirstColIndex,
nsresult AddColsToTable(PRInt32 aFirstColIndex,
PRBool aResetSubsequentColIndices,
nsIFrame* aFirstFrame,
nsIFrame* aLastFrame = nsnull);
@ -263,33 +253,27 @@ public:
protected:
nsTableColGroupFrame();
void InsertColsReflow(nsPresContext& aPresContext,
nsIPresShell& aPresShell,
PRInt32 aColIndex,
void InsertColsReflow(PRInt32 aColIndex,
nsIFrame* aFirstFrame,
nsIFrame* aLastFrame = nsnull);
/** implement abstract method on nsHTMLContainerFrame */
virtual PRIntn GetSkipSides() const;
NS_IMETHOD IncrementalReflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
NS_IMETHOD IncrementalReflow(nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
NS_IMETHOD IR_TargetIsMe(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
NS_IMETHOD IR_TargetIsMe(nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
NS_IMETHOD IR_StyleChanged(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
NS_IMETHOD IR_StyleChanged(nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
NS_IMETHOD IR_TargetIsChild(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
NS_IMETHOD IR_TargetIsChild(nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus,
nsIFrame * aNextFrame);

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -203,8 +203,7 @@ public:
nsIFrame* aPrevInFlow);
static void* GetProperty(nsPresContext* aPresContext,
nsIFrame* aFrame,
static void* GetProperty(nsIFrame* aFrame,
nsIAtom* aPropertyName,
PRBool aCreateIfNecessary = PR_FALSE);
@ -231,8 +230,7 @@ public:
virtual PRBool IsContainingBlock() const;
static nsresult AppendDirtyReflowCommand(nsIPresShell* aPresShell,
nsIFrame* aFrame);
static nsresult AppendDirtyReflowCommand(nsIFrame* aFrame);
static void RePositionViews(nsIFrame* aFrame);
@ -243,26 +241,19 @@ public:
/*
* Notification that aAttribute has changed for content inside a table (cell, row, etc)
*/
void AttributeChangedFor(nsPresContext* aPresContext,
nsIFrame* aFrame,
void AttributeChangedFor(nsIFrame* aFrame,
nsIContent* aContent,
nsIAtom* aAttribute);
/** @see nsIFrame::Destroy */
NS_IMETHOD Destroy(nsPresContext* aPresContext);
NS_IMETHOD AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
// Get the offset from the border box to the area where the row groups fit
@ -323,7 +314,7 @@ public:
// get the area that the border leak out from the inner table frame into
// the surrounding margin space
nsMargin GetBCMargin(nsPresContext* aPresContext) const;
nsMargin GetBCMargin() const;
/** Get width of table + colgroup + col collapse: elements that
* continue along the length of the whole left side.
@ -333,11 +324,9 @@ public:
*/
nscoord GetContinuousLeftBCBorderWidth(float aPixelsToTwips) const;
void SetBCDamageArea(nsPresContext& aPresContext,
const nsRect& aValue);
void SetBCDamageArea(const nsRect& aValue);
void PaintBCBorders(nsPresContext* aPresContext,
nsIRenderingContext& aRenderingContext,
void PaintBCBorders(nsIRenderingContext& aRenderingContext,
const nsRect& aDirtyRect);
NS_IMETHOD GetFrameForPoint(const nsPoint& aPoint,
@ -373,8 +362,7 @@ public:
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
nsresult ReflowTable(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
nsresult ReflowTable(nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nscoord aAvailHeight,
nsReflowReason aReason,
@ -464,29 +452,23 @@ public:
nsTableColFrame* GetColFrame(PRInt32 aColIndex) const;
/** Insert a col frame reference into the colframe cache and adapt the cellmap
* @param aPresContext - the presentation context
* @param aColFrame - the column frame
* @param aColIndex - index where the column should be inserted into the
* colframe cache
*/
void InsertCol(nsPresContext& aPresContext,
nsTableColFrame& aColFrame,
void InsertCol(nsTableColFrame& aColFrame,
PRInt32 aColIndex);
nsTableColGroupFrame* CreateAnonymousColGroupFrame(nsPresContext& aPresContext,
nsTableColGroupType aType);
nsTableColGroupFrame* CreateAnonymousColGroupFrame(nsTableColGroupType aType);
PRInt32 DestroyAnonymousColFrames(nsPresContext& aPresContext,
PRInt32 aNumFrames);
PRInt32 DestroyAnonymousColFrames(PRInt32 aNumFrames);
void CreateAnonymousColFrames(nsPresContext& aPresContext,
PRInt32 aNumColsToAdd,
void CreateAnonymousColFrames(PRInt32 aNumColsToAdd,
nsTableColType aColType,
PRBool aDoAppend,
nsIFrame* aPrevCol = nsnull);
void CreateAnonymousColFrames(nsPresContext& aPresContext,
nsTableColGroupFrame* aColGroupFrame,
void CreateAnonymousColFrames(nsTableColGroupFrame* aColGroupFrame,
PRInt32 aNumColsToAdd,
nsTableColType aColType,
PRBool aAddToColGroupAndTable,
@ -496,55 +478,44 @@ public:
/** empty the column frame cache */
void ClearColCache();
virtual void AppendCell(nsPresContext& aPresContext,
nsTableCellFrame& aCellFrame,
virtual void AppendCell(nsTableCellFrame& aCellFrame,
PRInt32 aRowIndex);
virtual void InsertCells(nsPresContext& aPresContext,
nsVoidArray& aCellFrames,
virtual void InsertCells(nsVoidArray& aCellFrames,
PRInt32 aRowIndex,
PRInt32 aColIndexBefore);
virtual void RemoveCell(nsPresContext& aPresContext,
nsTableCellFrame* aCellFrame,
virtual void RemoveCell(nsTableCellFrame* aCellFrame,
PRInt32 aRowIndex);
void AppendRows(nsPresContext& aPresContext,
nsTableRowGroupFrame& aRowGroupFrame,
void AppendRows(nsTableRowGroupFrame& aRowGroupFrame,
PRInt32 aRowIndex,
nsVoidArray& aRowFrames);
PRInt32 InsertRow(nsPresContext& aPresContext,
nsTableRowGroupFrame& aRowGroupFrame,
PRInt32 InsertRow(nsTableRowGroupFrame& aRowGroupFrame,
nsIFrame& aFrame,
PRInt32 aRowIndex,
PRBool aConsiderSpans);
PRInt32 InsertRows(nsPresContext& aPresContext,
nsTableRowGroupFrame& aRowGroupFrame,
PRInt32 InsertRows(nsTableRowGroupFrame& aRowGroupFrame,
nsVoidArray& aFrames,
PRInt32 aRowIndex,
PRBool aConsiderSpans);
virtual void RemoveRows(nsPresContext& aPresContext,
nsTableRowFrame& aFirstRowFrame,
virtual void RemoveRows(nsTableRowFrame& aFirstRowFrame,
PRInt32 aNumRowsToRemove,
PRBool aConsiderSpans);
void AppendRowGroups(nsPresContext& aPresContext,
nsIFrame* aFirstRowGroupFrame);
void AppendRowGroups(nsIFrame* aFirstRowGroupFrame);
void InsertRowGroups(nsPresContext& aPresContext,
nsIFrame* aFirstRowGroupFrame,
void InsertRowGroups(nsIFrame* aFirstRowGroupFrame,
nsIFrame* aLastRowGroupFrame);
void InsertColGroups(nsPresContext& aPresContext,
PRInt32 aColIndex,
void InsertColGroups(PRInt32 aColIndex,
nsIFrame* aFirstFrame,
nsIFrame* aLastFrame = nsnull);
virtual void RemoveCol(nsPresContext& aPresContext,
nsTableColGroupFrame* aColGroupFrame,
virtual void RemoveCol(nsTableColGroupFrame* aColGroupFrame,
PRInt32 aColIndex,
PRBool aRemoveFromCache,
PRBool aRemoveFromCellMap);
@ -582,8 +553,7 @@ protected:
/** destructor, responsible for mColumnLayoutData */
virtual ~nsTableFrame();
void InitChildReflowState(nsPresContext& aPresContext,
nsHTMLReflowState& aReflowState);
void InitChildReflowState(nsHTMLReflowState& aReflowState);
/** implement abstract method on nsHTMLContainerFrame */
virtual PRIntn GetSkipSides() const;
@ -611,8 +581,7 @@ public:
protected:
NS_METHOD ReflowChildren(nsPresContext* aPresContext,
nsTableReflowState& aReflowState,
NS_METHOD ReflowChildren(nsTableReflowState& aReflowState,
PRBool aDoColGroups,
PRBool aDirtyOnly,
nsReflowStatus& aStatus,
@ -629,32 +598,28 @@ protected:
*
* @see Reflow
*/
NS_IMETHOD IncrementalReflow(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
NS_IMETHOD IncrementalReflow(const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
/** process an incremental reflow command targeted at a child of this frame.
* @param aNextFrame the next frame in the reflow target chain
* @see nsIFrameReflow::Reflow
*/
NS_IMETHOD IR_TargetIsChild(nsPresContext* aPresContext,
nsTableReflowState& aReflowStatet,
NS_IMETHOD IR_TargetIsChild(nsTableReflowState& aReflowStatet,
nsReflowStatus& aStatus,
nsIFrame* aNextFrame);
/** process an incremental reflow command targeted at this frame.
* @see nsIFrameReflow::Reflow
*/
NS_IMETHOD IR_TargetIsMe(nsPresContext* aPresContext,
nsTableReflowState& aReflowState,
NS_IMETHOD IR_TargetIsMe(nsTableReflowState& aReflowState,
nsReflowStatus& aStatus);
/** process a style changed notification.
* @see nsIFrameReflow::Reflow
* TODO: needs to be optimized for which attribute was actually changed.
*/
NS_IMETHOD IR_StyleChanged(nsPresContext* aPresContext,
nsTableReflowState& aReflowState,
NS_IMETHOD IR_StyleChanged(nsTableReflowState& aReflowState,
nsReflowStatus& aStatus);
NS_IMETHOD AdjustSiblingsAfterReflow(nsTableReflowState& aReflowState,
@ -664,16 +629,13 @@ protected:
nsresult RecoverState(nsTableReflowState& aReflowState,
nsIFrame* aKidFrame);
NS_METHOD CollapseRowGroupIfNecessary(nsPresContext* aPresContext,
nsIFrame* aRowGroupFrame,
NS_METHOD CollapseRowGroupIfNecessary(nsIFrame* aRowGroupFrame,
const nscoord& aYTotalOffset,
nscoord& aYGroupOffset, PRInt32& aRowX);
NS_METHOD AdjustForCollapsingRows(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize);
NS_METHOD AdjustForCollapsingRows(nsHTMLReflowMetrics& aDesiredSize);
NS_METHOD AdjustForCollapsingCols(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize);
NS_METHOD AdjustForCollapsingCols(nsHTMLReflowMetrics& aDesiredSize);
// end incremental reflow methods
@ -709,26 +671,22 @@ protected:
void DistributeHeightToRows(const nsHTMLReflowState& aReflowState,
nscoord aAmount);
void PlaceChild(nsPresContext* aPresContext,
nsTableReflowState& aReflowState,
void PlaceChild(nsTableReflowState& aReflowState,
nsIFrame* aKidFrame,
nsHTMLReflowMetrics& aKidDesiredSize);
/** assign widths for each column, taking into account the table content, the effective style,
* the layout constraints, and the compatibility mode.
* @param aPresContext the presentation context
* @param aTableStyle the resolved style for the table
* @param aMaxSize the height and width constraints
* @param aMaxElementSize the min size of the largest indivisible object
*/
virtual void BalanceColumnWidths(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState);
virtual void BalanceColumnWidths(const nsHTMLReflowState& aReflowState);
nsIFrame* GetFirstBodyRowGroupFrame();
PRBool MoveOverflowToChildList(nsPresContext* aPresContext);
void PushChildren(nsPresContext *aPresContext,
nsIFrame* aFromChild,
void PushChildren(nsIFrame* aFromChild,
nsIFrame* aPrevSibling);
public:
@ -818,7 +776,7 @@ protected:
void SetBorderCollapse(PRBool aValue);
void CalcBCBorders(nsPresContext& aPresContext);
void CalcBCBorders();
void ExpandBCDamageArea(nsRect& aRect) const;

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

@ -218,9 +218,7 @@ nsTableOuterFrame::SetInitialChildList(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsTableOuterFrame::AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsTableOuterFrame::AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList)
{
nsresult rv;
@ -242,7 +240,7 @@ nsTableOuterFrame::AppendFrames(nsPresContext* aPresContext,
rv = NS_NewHTMLReflowCommand(&reflowCmd, this, eReflowType_ReflowDirty);
if (NS_SUCCEEDED(rv))
aPresShell.AppendReflowCommand(reflowCmd);
GetPresContext()->PresShell()->AppendReflowCommand(reflowCmd);
}
}
else {
@ -254,20 +252,16 @@ nsTableOuterFrame::AppendFrames(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsTableOuterFrame::InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsTableOuterFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
{
NS_PRECONDITION(!aPrevFrame, "invalid previous frame");
return AppendFrames(aPresContext, aPresShell, aListName, aFrameList);
return AppendFrames(aListName, aFrameList);
}
NS_IMETHODIMP
nsTableOuterFrame::RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsTableOuterFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
nsresult rv;
@ -290,7 +284,7 @@ nsTableOuterFrame::RemoveFrame(nsPresContext* aPresContext,
// Remove the caption frame and destroy it
if (mCaptionFrame && (mCaptionFrame == aOldFrame)) {
mCaptionFrame->Destroy(aPresContext);
mCaptionFrame->Destroy(GetPresContext());
mCaptionFrame = nsnull;
mMinCaptionWidth = 0;
}
@ -300,7 +294,7 @@ nsTableOuterFrame::RemoveFrame(nsPresContext* aPresContext,
rv = NS_NewHTMLReflowCommand(&reflowCmd, this, eReflowType_ReflowDirty);
if (NS_SUCCEEDED(rv))
aPresShell.AppendReflowCommand(reflowCmd);
GetPresContext()->PresShell()->AppendReflowCommand(reflowCmd);
return NS_OK;
}
@ -449,7 +443,7 @@ nsTableOuterFrame::InitChildReflowState(nsPresContext& aPresContext,
nsMargin* pCollapsePadding = nsnull;
if ((aReflowState.frame == mInnerTableFrame) && (mInnerTableFrame->IsBorderCollapse())) {
if (mInnerTableFrame->NeedToCalcBCBorders()) {
mInnerTableFrame->CalcBCBorders(aPresContext);
mInnerTableFrame->CalcBCBorders();
}
collapseBorder = mInnerTableFrame->GetBCBorder();
pCollapseBorder = &collapseBorder;

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

@ -106,20 +106,14 @@ public:
virtual nsIAtom* GetAdditionalChildListName(PRInt32 aIndex) const;
NS_IMETHOD AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
virtual nsIFrame* GetContentInsertionFrame() {

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

@ -210,9 +210,7 @@ nsTableRowFrame::Init(nsPresContext* aPresContext,
NS_IMETHODIMP
nsTableRowFrame::AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsTableRowFrame::AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList)
{
// Append the frames
@ -225,7 +223,7 @@ nsTableRowFrame::AppendFrames(nsPresContext* aPresContext,
childFrame = childFrame->GetNextSibling()) {
if (IS_TABLE_CELL(childFrame->GetType())) {
// Add the cell to the cell map
tableFrame->AppendCell(*aPresContext, (nsTableCellFrame&)*childFrame, GetRowIndex());
tableFrame->AppendCell((nsTableCellFrame&)*childFrame, GetRowIndex());
// XXX this could be optimized with some effort
tableFrame->SetNeedStrategyInit(PR_TRUE);
}
@ -233,16 +231,14 @@ nsTableRowFrame::AppendFrames(nsPresContext* aPresContext,
// Reflow the new frames. They're already marked dirty, so generate a reflow
// command that tells us to reflow our dirty child frames
tableFrame->AppendDirtyReflowCommand(&aPresShell, this);
tableFrame->AppendDirtyReflowCommand(this);
return NS_OK;
}
NS_IMETHODIMP
nsTableRowFrame::InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsTableRowFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
{
@ -267,22 +263,20 @@ nsTableRowFrame::InsertFrames(nsPresContext* aPresContext,
if (prevCellFrame) {
prevCellFrame->GetColIndex(colIndex);
}
tableFrame->InsertCells(*aPresContext, cellChildren, GetRowIndex(), colIndex);
tableFrame->InsertCells(cellChildren, GetRowIndex(), colIndex);
// Insert the frames in the frame list
mFrames.InsertFrames(nsnull, aPrevFrame, aFrameList);
// Reflow the new frames. They're already marked dirty, so generate a reflow
// command that tells us to reflow our dirty child frames
tableFrame->AppendDirtyReflowCommand(&aPresShell, this);
tableFrame->AppendDirtyReflowCommand(this);
return NS_OK;
}
NS_IMETHODIMP
nsTableRowFrame::RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsTableRowFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
// Get the table frame
@ -294,19 +288,19 @@ nsTableRowFrame::RemoveFrame(nsPresContext* aPresContext,
PRInt32 colIndex;
cellFrame->GetColIndex(colIndex);
// remove the cell from the cell map
tableFrame->RemoveCell(*aPresContext, cellFrame, GetRowIndex());
tableFrame->RemoveCell(cellFrame, GetRowIndex());
// XXX this could be optimized with some effort
tableFrame->SetNeedStrategyInit(PR_TRUE);
// Remove the frame and destroy it
mFrames.DestroyFrame(aPresContext, aOldFrame);
mFrames.DestroyFrame(GetPresContext(), aOldFrame);
// XXX This could probably be optimized with much effort
tableFrame->SetNeedStrategyInit(PR_TRUE);
// Generate a reflow command so we reflow the table itself.
// Target the row so that it gets a dirty reflow before a resize reflow
// in case another cell gets added to the row during a reflow coallesce.
tableFrame->AppendDirtyReflowCommand(&aPresShell, this);
tableFrame->AppendDirtyReflowCommand(this);
}
}
@ -391,7 +385,7 @@ nsTableRowFrame::DidResize(nsPresContext* aPresContext,
//XXX nsReflowStatus status;
//ReflowChild(cellFrame, aPresContext, desiredSize, kidReflowState, status);
cellFrame->VerticallyAlignChild(aPresContext, aReflowState, mMaxCellAscent);
cellFrame->VerticallyAlignChild(aReflowState, mMaxCellAscent);
ConsiderChildOverflow(desiredSize.mOverflowArea, cellFrame);
}
}
@ -1316,7 +1310,7 @@ nsTableRowFrame::IR_TargetIsChild(nsPresContext* aPresContext,
aDesiredSize.width = aReflowState.availableWidth;
if (!aDesiredSize.mNothingChanged) {
if (aDesiredSize.height == mRect.height) { // our height didn't change
cellFrame->VerticallyAlignChild(aPresContext, aReflowState, mMaxCellAscent);
cellFrame->VerticallyAlignChild(aReflowState, mMaxCellAscent);
nsRect dirtyRect = cellFrame->GetRect();
dirtyRect.height = mRect.height;
ConsiderChildOverflow(aDesiredSize.mOverflowArea, cellFrame);
@ -1472,7 +1466,7 @@ nsTableRowFrame::ReflowCellFrame(nsPresContext* aPresContext,
// XXX What happens if this cell has 'vertical-align: baseline' ?
// XXX Why is it assumed that the cell's ascent hasn't changed ?
if (fullyComplete) {
aCellFrame->VerticallyAlignChild(aPresContext, aReflowState, mMaxCellAscent);
aCellFrame->VerticallyAlignChild(aReflowState, mMaxCellAscent);
}
aCellFrame->DidReflow(aPresContext, nsnull, NS_FRAME_REFLOW_FINISHED);
@ -1544,7 +1538,7 @@ nsTableRowFrame::SetUnpaginatedHeight(nsPresContext* aPresContext,
{
NS_ASSERTION(!mPrevInFlow, "program error");
// Get the property
nscoord* value = (nscoord*)nsTableFrame::GetProperty(aPresContext, this, nsLayoutAtoms::rowUnpaginatedHeightProperty, PR_TRUE);
nscoord* value = (nscoord*)nsTableFrame::GetProperty(this, nsLayoutAtoms::rowUnpaginatedHeightProperty, PR_TRUE);
if (value) {
*value = aValue;
}
@ -1554,7 +1548,7 @@ nscoord
nsTableRowFrame::GetUnpaginatedHeight(nsPresContext* aPresContext)
{
// See if the property is set
nscoord* value = (nscoord*)nsTableFrame::GetProperty(aPresContext, GetFirstInFlow(), nsLayoutAtoms::rowUnpaginatedHeightProperty);
nscoord* value = (nscoord*)nsTableFrame::GetProperty(GetFirstInFlow(), nsLayoutAtoms::rowUnpaginatedHeightProperty);
if (value)
return *value;
else

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

@ -75,18 +75,12 @@ public:
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);
NS_IMETHOD AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
/** instantiate a new instance of nsTableRowFrame.

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

@ -1327,9 +1327,7 @@ nsTableRowGroupFrame::IncrementalReflow(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsTableRowGroupFrame::AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsTableRowGroupFrame::AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList)
{
// collect the new row frames in an array
@ -1349,10 +1347,10 @@ nsTableRowGroupFrame::AppendFrames(nsPresContext* aPresContext,
nsTableFrame* tableFrame = nsnull;
nsTableFrame::GetTableFrame(this, tableFrame);
if (tableFrame) {
tableFrame->AppendRows(*aPresContext, *this, rowIndex, rows);
tableFrame->AppendRows(*this, rowIndex, rows);
// Reflow the new frames. They're already marked dirty, so generate a reflow
// command that tells us to reflow our dirty child frames
nsTableFrame::AppendDirtyReflowCommand(&aPresShell, this);
nsTableFrame::AppendDirtyReflowCommand(this);
if (tableFrame->RowIsSpannedInto(rowIndex)) {
tableFrame->SetNeedStrategyInit(PR_TRUE);
}
@ -1372,9 +1370,7 @@ nsTableRowGroupFrame::AppendFrames(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsTableRowGroupFrame::InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsTableRowGroupFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
{
@ -1407,11 +1403,11 @@ nsTableRowGroupFrame::InsertFrames(nsPresContext* aPresContext,
if (numRows > 0) {
nsTableRowFrame* prevRow = (nsTableRowFrame *)nsTableFrame::GetFrameAtOrBefore(this, aPrevFrame, nsLayoutAtoms::tableRowFrame);
PRInt32 rowIndex = (prevRow) ? prevRow->GetRowIndex() + 1 : startRowIndex;
tableFrame->InsertRows(*aPresContext, *this, rows, rowIndex, PR_TRUE);
tableFrame->InsertRows(*this, rows, rowIndex, PR_TRUE);
// Reflow the new frames. They're already marked dirty, so generate a reflow
// command that tells us to reflow our dirty child frames
nsTableFrame::AppendDirtyReflowCommand(&aPresShell, this);
nsTableFrame::AppendDirtyReflowCommand(this);
if (tableFrame->RowIsSpannedInto(rowIndex) ||
tableFrame->RowHasSpanningCells(rowIndex + numRows - 1)) {
tableFrame->SetNeedStrategyInit(PR_TRUE);
@ -1430,9 +1426,7 @@ nsTableRowGroupFrame::InsertFrames(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsTableRowGroupFrame::RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsTableRowGroupFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
nsTableFrame* tableFrame = nsnull;
@ -1440,16 +1434,16 @@ nsTableRowGroupFrame::RemoveFrame(nsPresContext* aPresContext,
if (tableFrame) {
if (nsLayoutAtoms::tableRowFrame == aOldFrame->GetType()) {
// remove the rows from the table (and flag a rebalance)
tableFrame->RemoveRows(*aPresContext, (nsTableRowFrame &)*aOldFrame, 1, PR_TRUE);
tableFrame->RemoveRows((nsTableRowFrame &)*aOldFrame, 1, PR_TRUE);
// XXX this could be optimized (see nsTableFrame::RemoveRows)
tableFrame->SetNeedStrategyInit(PR_TRUE);
// Because we haven't added any new frames we don't need to do a pass1
// reflow. Just generate a reflow command so we reflow the table
nsTableFrame::AppendDirtyReflowCommand(&aPresShell, this);
nsTableFrame::AppendDirtyReflowCommand(this);
}
}
mFrames.DestroyFrame(aPresContext, aOldFrame);
mFrames.DestroyFrame(GetPresContext(), aOldFrame);
return NS_OK;
}

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

@ -123,20 +123,14 @@ public:
nsStyleContext* aContext,
nsIFrame* aPrevInFlow);
NS_IMETHOD AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
/** @see nsIFrame::Paint */

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

@ -1155,12 +1155,11 @@ nsBoxFrame::NeedsRecalc()
}
NS_IMETHODIMP
nsBoxFrame::RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsBoxFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
nsBoxLayoutState state(aPresContext);
nsPresContext* presContext = GetPresContext();
nsBoxLayoutState state(presContext);
// remove the child frame
mFrames.RemoveFrame(aOldFrame);
@ -1170,7 +1169,7 @@ nsBoxFrame::RemoveFrame(nsPresContext* aPresContext,
mLayoutManager->ChildrenRemoved(this, state, aOldFrame);
// destroy the child frame
aOldFrame->Destroy(aPresContext);
aOldFrame->Destroy(presContext);
// mark us dirty and generate a reflow command
MarkDirtyChildren(state);
@ -1179,13 +1178,11 @@ nsBoxFrame::RemoveFrame(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsBoxFrame::InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsBoxFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
{
nsBoxLayoutState state(aPresContext);
nsBoxLayoutState state(GetPresContext());
// insert the child frames
mFrames.InsertFrames(this, aPrevFrame, aFrameList);
@ -1208,12 +1205,10 @@ nsBoxFrame::InsertFrames(nsPresContext* aPresContext,
NS_IMETHODIMP
nsBoxFrame::AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsBoxFrame::AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList)
{
nsBoxLayoutState state(aPresContext);
nsBoxLayoutState state(GetPresContext());
// append the new frames
mFrames.AppendFrames(this, aFrameList);

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

@ -151,20 +151,14 @@ public:
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
NS_IMETHOD AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
NS_IMETHOD SetInitialChildList(nsPresContext* aPresContext,

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

@ -1806,31 +1806,28 @@ nsMenuFrame::OnDestroyed()
}
NS_IMETHODIMP
nsMenuFrame::RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aOldFrame)
nsMenuFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
nsresult rv;
if (mPopupFrames.ContainsFrame(aOldFrame)) {
// Go ahead and remove this frame.
mPopupFrames.DestroyFrame(aPresContext, aOldFrame);
nsBoxLayoutState state(aPresContext);
nsPresContext* presContext = GetPresContext();
mPopupFrames.DestroyFrame(presContext, aOldFrame);
nsBoxLayoutState state(presContext);
rv = MarkDirtyChildren(state);
} else {
rv = nsBoxFrame::RemoveFrame(aPresContext, aPresShell, aListName, aOldFrame);
rv = nsBoxFrame::RemoveFrame(aListName, aOldFrame);
}
return rv;
}
NS_IMETHODIMP
nsMenuFrame::InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
nsMenuFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
{
nsresult rv;
@ -1839,23 +1836,21 @@ nsMenuFrame::InsertFrames(nsPresContext* aPresContext,
NS_ASSERTION(aFrameList->IsBoxFrame(),"Popup is not a box!!!");
mPopupFrames.InsertFrames(nsnull, nsnull, aFrameList);
nsBoxLayoutState state(aPresContext);
nsBoxLayoutState state(GetPresContext());
#ifdef DEBUG_LAYOUT
SetDebug(state, aFrameList, mState & NS_STATE_CURRENTLY_IN_DEBUG);
#endif
rv = MarkDirtyChildren(state);
} else {
rv = nsBoxFrame::InsertFrames(aPresContext, aPresShell, aListName, aPrevFrame, aFrameList);
rv = nsBoxFrame::InsertFrames(aListName, aPrevFrame, aFrameList);
}
return rv;
}
NS_IMETHODIMP
nsMenuFrame::AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aFrameList)
nsMenuFrame::AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList)
{
if (!aFrameList)
return NS_OK;
@ -1867,13 +1862,13 @@ nsMenuFrame::AppendFrames(nsPresContext* aPresContext,
NS_ASSERTION(aFrameList->IsBoxFrame(),"Popup is not a box!!!");
mPopupFrames.AppendFrames(nsnull, aFrameList);
nsBoxLayoutState state(aPresContext);
nsBoxLayoutState state(GetPresContext());
#ifdef DEBUG_LAYOUT
SetDebug(state, aFrameList, mState & NS_STATE_CURRENTLY_IN_DEBUG);
#endif
rv = MarkDirtyChildren(state);
} else {
rv = nsBoxFrame::AppendFrames(aPresContext, aPresShell, aListName, aFrameList);
rv = nsBoxFrame::AppendFrames(aListName, aFrameList);
}
return rv;

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

@ -116,20 +116,14 @@ public:
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus);
NS_IMETHOD AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
// nsIMenuFrame Interface

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

@ -81,18 +81,12 @@ public:
NS_IMETHOD AddTooltipSupport(nsIContent* aNode);
NS_IMETHOD RemoveTooltipSupport(nsIContent* aNode);
NS_IMETHOD AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
NS_IMETHOD Reflow(nsPresContext* aPresContext,
@ -152,10 +146,8 @@ nsRootBoxFrame::nsRootBoxFrame(nsIPresShell* aShell):nsBoxFrame(aShell, PR_TRUE)
}
NS_IMETHODIMP
nsRootBoxFrame::AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aFrameList)
nsRootBoxFrame::AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList)
{
nsresult rv;
@ -170,18 +162,16 @@ nsRootBoxFrame::AppendFrames(nsPresContext* aPresContext,
rv = NS_ERROR_FAILURE;
} else {
rv = nsBoxFrame::AppendFrames(aPresContext, aPresShell, aListName, aFrameList);
rv = nsBoxFrame::AppendFrames(aListName, aFrameList);
}
return rv;
}
NS_IMETHODIMP
nsRootBoxFrame::InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
nsRootBoxFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
{
nsresult rv;
@ -191,17 +181,15 @@ nsRootBoxFrame::InsertFrames(nsPresContext* aPresContext,
if (aPrevFrame) {
rv = NS_ERROR_UNEXPECTED;
} else {
rv = AppendFrames(aPresContext, aPresShell, aListName, aFrameList);
rv = AppendFrames(aListName, aFrameList);
}
return rv;
}
NS_IMETHODIMP
nsRootBoxFrame::RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aOldFrame)
nsRootBoxFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
nsresult rv;
@ -211,7 +199,7 @@ nsRootBoxFrame::RemoveFrame(nsPresContext* aPresContext,
rv = NS_ERROR_INVALID_ARG;
} else if (aOldFrame == mFrames.FirstChild()) {
rv = nsBoxFrame::RemoveFrame(aPresContext, aPresShell, aListName, aOldFrame);
rv = nsBoxFrame::RemoveFrame(aListName, aOldFrame);
} else {
rv = NS_ERROR_FAILURE;
}

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

@ -130,7 +130,7 @@ nsScrollBoxFrame::Init(nsPresContext* aPresContext,
aPrevInFlow);
// Create the scrolling view
CreateScrollingView(aPresContext);
CreateScrollingView();
return rv;
}
@ -142,13 +142,13 @@ nsScrollBoxFrame::SetInitialChildList(nsPresContext* aPresContext,
nsresult rv = nsBoxFrame::SetInitialChildList(aPresContext, aListName,
aChildList);
SetUpScrolledFrame(aPresContext);
SetUpScrolledFrame();
return rv;
}
void
nsScrollBoxFrame::SetUpScrolledFrame(nsPresContext* aPresContext)
nsScrollBoxFrame::SetUpScrolledFrame()
{
NS_ASSERTION(mFrames.GetLength() <= 1, "ScrollBoxes can only have 1 child!");
@ -163,47 +163,41 @@ nsScrollBoxFrame::SetUpScrolledFrame(nsPresContext* aPresContext)
}
NS_IMETHODIMP
nsScrollBoxFrame::AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aFrameList)
nsScrollBoxFrame::AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList)
{
nsresult rv = nsBoxFrame::AppendFrames(aPresContext, aPresShell, aListName, aFrameList);
nsresult rv = nsBoxFrame::AppendFrames(aListName, aFrameList);
// make sure we only have 1 child.
NS_ASSERTION(!mFrames.FirstChild()->GetNextSibling(), "Error ScrollBoxes can only have 1 child");
SetUpScrolledFrame(aPresContext);
SetUpScrolledFrame();
return rv;
}
NS_IMETHODIMP
nsScrollBoxFrame::InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
nsScrollBoxFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
{
nsresult rv = nsBoxFrame::InsertFrames(aPresContext, aPresShell, aListName, aPrevFrame, aFrameList);
nsresult rv = nsBoxFrame::InsertFrames(aListName, aPrevFrame, aFrameList);
// make sure we only have 1 child.
NS_ASSERTION(!mFrames.FirstChild()->GetNextSibling(), "Error ScrollBoxes can only have 1 child");
SetUpScrolledFrame(aPresContext);
SetUpScrolledFrame();
return rv;
}
NS_IMETHODIMP
nsScrollBoxFrame::RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aOldFrame)
nsScrollBoxFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
nsresult rv = nsBoxFrame::RemoveFrame(aPresContext, aPresShell, aListName, aOldFrame);
nsresult rv = nsBoxFrame::RemoveFrame(aListName, aOldFrame);
SetUpScrolledFrame(aPresContext);
SetUpScrolledFrame();
return rv;
}
@ -221,9 +215,8 @@ nsScrollBoxFrame::CreateScrollingViewWidget(nsIView* aView, const nsStyleDisplay
}
nsresult
nsScrollBoxFrame::GetScrollingParentView(nsPresContext* aPresContext,
nsIFrame* aParent,
nsIView** aParentView)
nsScrollBoxFrame::GetScrollingParentView(nsIFrame* aParent,
nsIView** aParentView)
{
*aParentView = aParent->GetView();
NS_ASSERTION(*aParentView, "GetParentWithView failed");
@ -243,7 +236,7 @@ nsScrollBoxFrame::GetMouseCapturer() const
}
nsresult
nsScrollBoxFrame::CreateScrollingView(nsPresContext* aPresContext)
nsScrollBoxFrame::CreateScrollingView()
{
//Get parent frame
nsIFrame* parent = GetAncestorWithView();
@ -251,7 +244,7 @@ nsScrollBoxFrame::CreateScrollingView(nsPresContext* aPresContext)
// Get parent view
nsIView* parentView = nsnull;
GetScrollingParentView(aPresContext, parent, &parentView);
GetScrollingParentView(parent, &parentView);
// Get the view manager
nsIViewManager* viewManager = parentView->GetViewManager();
@ -263,7 +256,7 @@ nsScrollBoxFrame::CreateScrollingView(nsPresContext* aPresContext)
// Initialize the scrolling view
nsIView* view = scrollingView->View();
SyncFrameViewProperties(aPresContext, this, mStyleContext, view);
SyncFrameViewProperties(GetPresContext(), this, mStyleContext, view);
// Insert the view into the view hierarchy
// XXX Put view last in document order until we know how to do better
@ -422,8 +415,6 @@ nsScrollBoxFrame::DoLayout(nsBoxLayoutState& aState)
horizChanged = PR_TRUE;
}
nsCOMPtr<nsIPresShell> shell = aState.PresShell();
// if either changed
if (vertChanged || horizChanged)
{
@ -432,23 +423,23 @@ nsScrollBoxFrame::DoLayout(nsBoxLayoutState& aState)
if (mVerticalOverflow == mHorizontalOverflow)
{
// both either overflowed or underflowed. 1 event
PostScrollPortEvent(shell, mVerticalOverflow, nsScrollPortEvent::both);
PostScrollPortEvent(mVerticalOverflow, nsScrollPortEvent::both);
} else {
// one overflowed and one underflowed
PostScrollPortEvent(shell, mVerticalOverflow, nsScrollPortEvent::vertical);
PostScrollPortEvent(shell, mHorizontalOverflow, nsScrollPortEvent::horizontal);
PostScrollPortEvent(mVerticalOverflow, nsScrollPortEvent::vertical);
PostScrollPortEvent(mHorizontalOverflow, nsScrollPortEvent::horizontal);
}
} else if (vertChanged) // only one changed either vert or horiz
PostScrollPortEvent(shell, mVerticalOverflow, nsScrollPortEvent::vertical);
PostScrollPortEvent(mVerticalOverflow, nsScrollPortEvent::vertical);
else
PostScrollPortEvent(shell, mHorizontalOverflow, nsScrollPortEvent::horizontal);
PostScrollPortEvent(mHorizontalOverflow, nsScrollPortEvent::horizontal);
}
return NS_OK;
}
void
nsScrollBoxFrame::PostScrollPortEvent(nsIPresShell* aShell, PRBool aOverflow, nsScrollPortEvent::orientType aType)
nsScrollBoxFrame::PostScrollPortEvent(PRBool aOverflow, nsScrollPortEvent::orientType aType)
{
if (!mContent)
return;
@ -457,7 +448,7 @@ nsScrollBoxFrame::PostScrollPortEvent(nsIPresShell* aShell, PRBool aOverflow, ns
NS_SCROLLPORT_OVERFLOW :
NS_SCROLLPORT_UNDERFLOW);
event->orient = aType;
aShell->PostDOMEvent(mContent, event);
GetPresContext()->PresShell()->PostDOMEvent(mContent, event);
}

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

@ -69,20 +69,14 @@ public:
// Because there can be only one child frame, these two function return
// NS_ERROR_FAILURE
NS_IMETHOD AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
// This function returns NS_ERROR_NOT_IMPLEMENTED
NS_IMETHOD RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
@ -131,19 +125,18 @@ protected:
// that sub-classes may control widget creation.
virtual nsresult CreateScrollingViewWidget(nsIView* aView, const nsStyleDisplay* aDisplay);
// Getting the view for scollframe may be overriden to provide a parent view for te scroll frame
virtual nsresult GetScrollingParentView(nsPresContext* aPresContext,
nsIFrame* aParent,
virtual nsresult GetScrollingParentView(nsIFrame* aParent,
nsIView** aParentView);
private:
nsresult CreateScrollingView(nsPresContext* aPresContext);
nsresult CreateScrollingView();
PRPackedBool mVerticalOverflow;
PRPackedBool mHorizontalOverflow;
protected:
virtual PRBool NeedsClipWidget();
virtual void PostScrollPortEvent(nsIPresShell* aShell, PRBool aOverflow, nsScrollPortEvent::orientType aType);
virtual void SetUpScrolledFrame(nsPresContext* aPresContext);
virtual void PostScrollPortEvent(PRBool aOverflow, nsScrollPortEvent::orientType aType);
virtual void SetUpScrolledFrame();
};
#endif /* nsScrollBoxFrame_h___ */

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

@ -144,12 +144,10 @@ nsSliderFrame::Init(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsSliderFrame::RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aOldFrame)
nsSliderFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
nsresult rv = nsBoxFrame::RemoveFrame(aPresContext, aPresShell, aListName, aOldFrame);
nsresult rv = nsBoxFrame::RemoveFrame(aListName, aOldFrame);
PRInt32 start = GetChildCount();
if (start == 0)
RemoveListener();
@ -158,14 +156,12 @@ nsSliderFrame::RemoveFrame(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsSliderFrame::InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
nsSliderFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList)
{
PRInt32 start = GetChildCount();
nsresult rv = nsBoxFrame::InsertFrames(aPresContext, aPresShell, aListName, aPrevFrame, aFrameList);
nsresult rv = nsBoxFrame::InsertFrames(aListName, aPrevFrame, aFrameList);
if (start == 0)
AddListener();
@ -173,15 +169,13 @@ nsSliderFrame::InsertFrames(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsSliderFrame::AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
nsIFrame* aFrameList)
nsSliderFrame::AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList)
{
// if we have no children and on was added then make sure we add the
// listener
PRInt32 start = GetChildCount();
nsresult rv = nsBoxFrame::AppendFrames(aPresContext, aPresShell, aListName, aFrameList);
nsresult rv = nsBoxFrame::AppendFrames(aListName, aFrameList);
if (start == 0)
AddListener();

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

@ -141,22 +141,14 @@ public:
NS_IMETHOD DoLayout(nsBoxLayoutState& aBoxLayoutState);
// nsIFrame overrides
/** nsIFrame **/
NS_IMETHOD AppendFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsIFrame* aFrameList);
NS_IMETHOD InsertFrames(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsIFrame* aFrameList);
NS_IMETHOD RemoveFrame(nsPresContext* aPresContext,
nsIPresShell& aPresShell,
nsIAtom* aListName,
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
NS_IMETHOD Destroy(nsPresContext* aPresContext);