Fix for 13815. Implement OnContentInserted. Approved by chofmann and reviewed by hyatt.
git-svn-id: svn://10.0.0.236/trunk@48921 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -5713,7 +5713,15 @@ nsCSSFrameConstructor::ContentInserted(nsIPresContext* aPresContext,
|
||||
// Convert to a tree row group frame.
|
||||
nsTreeRowGroupFrame* treeRowGroup = (nsTreeRowGroupFrame*)parentFrame;
|
||||
if (treeRowGroup && treeRowGroup->IsLazy()) {
|
||||
treeRowGroup->OnContentAdded(*aPresContext);
|
||||
nsIFrame* nextSibling = FindNextSibling(shell, aContainer, aIndexInContainer);
|
||||
if(!nextSibling)
|
||||
treeRowGroup->OnContentAdded(*aPresContext);
|
||||
else {
|
||||
nsIFrame* frame = GetFrameFor(shell, aPresContext, aContainer);
|
||||
nsTreeRowGroupFrame* frameTreeRowGroup = (nsTreeRowGroupFrame*)frame;
|
||||
if(frameTreeRowGroup)
|
||||
frameTreeRowGroup->OnContentInserted(*aPresContext, nextSibling);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5713,7 +5713,15 @@ nsCSSFrameConstructor::ContentInserted(nsIPresContext* aPresContext,
|
||||
// Convert to a tree row group frame.
|
||||
nsTreeRowGroupFrame* treeRowGroup = (nsTreeRowGroupFrame*)parentFrame;
|
||||
if (treeRowGroup && treeRowGroup->IsLazy()) {
|
||||
treeRowGroup->OnContentAdded(*aPresContext);
|
||||
nsIFrame* nextSibling = FindNextSibling(shell, aContainer, aIndexInContainer);
|
||||
if(!nextSibling)
|
||||
treeRowGroup->OnContentAdded(*aPresContext);
|
||||
else {
|
||||
nsIFrame* frame = GetFrameFor(shell, aPresContext, aContainer);
|
||||
nsTreeRowGroupFrame* frameTreeRowGroup = (nsTreeRowGroupFrame*)frame;
|
||||
if(frameTreeRowGroup)
|
||||
frameTreeRowGroup->OnContentInserted(*aPresContext, nextSibling);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1129,6 +1129,25 @@ void nsTreeRowGroupFrame::OnContentAdded(nsIPresContext& aPresContext)
|
||||
}
|
||||
}
|
||||
|
||||
void nsTreeRowGroupFrame::OnContentInserted(nsIPresContext& aPresContext, nsIFrame* aNextSibling)
|
||||
{
|
||||
nsIFrame* currFrame = aNextSibling;
|
||||
|
||||
if(aNextSibling == mTopFrame)
|
||||
mTopFrame = nsnull;
|
||||
|
||||
while (currFrame) {
|
||||
nsIFrame* nextFrame;
|
||||
currFrame->GetNextSibling(&nextFrame);
|
||||
mFrameConstructor->RemoveMappingsForFrameSubtree(&aPresContext, currFrame);
|
||||
mFrames.DestroyFrame(aPresContext, currFrame);
|
||||
currFrame = nextFrame;
|
||||
//printf("Nuked one off the end.\n");
|
||||
}
|
||||
OnContentAdded(aPresContext);
|
||||
|
||||
}
|
||||
|
||||
void nsTreeRowGroupFrame::OnContentRemoved(nsIPresContext& aPresContext,
|
||||
nsIFrame* aChildFrame)
|
||||
{
|
||||
|
||||
@@ -62,6 +62,7 @@ public:
|
||||
|
||||
// Responses to changes
|
||||
void OnContentAdded(nsIPresContext& aPresContext);
|
||||
void OnContentInserted(nsIPresContext& aPresContext, nsIFrame* aNextSibling);
|
||||
void OnContentRemoved(nsIPresContext& aPresContext, nsIFrame* aChildFrame);
|
||||
|
||||
virtual nsIFrame* GetFirstFrame();
|
||||
|
||||
Reference in New Issue
Block a user