зеркало из https://github.com/mozilla/gecko-dev.git
Fix for bug 6459.
This commit is contained in:
Родитель
030f73ed26
Коммит
2123f69cb9
|
@ -318,7 +318,8 @@ void nsTreeCellFrame::Hover(nsIPresContext& aPresContext, PRBool isHover, PRBool
|
|||
NS_IF_RELEASE(pParentContent);
|
||||
}
|
||||
|
||||
// XXX This method will go away.
|
||||
// XXX This method will go away. I think it can
|
||||
// actually go away now... ?
|
||||
NS_IMETHODIMP
|
||||
nsTreeCellFrame::AttributeChanged(nsIPresContext* aPresContext,
|
||||
nsIContent* aChild,
|
||||
|
@ -333,3 +334,10 @@ nsTreeCellFrame::AttributeChanged(nsIPresContext* aPresContext,
|
|||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsTreeCellFrame::DeleteFrame(nsIPresContext& aPresContext)
|
||||
{
|
||||
mTreeFrame->RemoveFromSelection(this);
|
||||
return nsTableCellFrame::DeleteFrame(aPresContext);
|
||||
}
|
||||
|
|
|
@ -44,6 +44,8 @@ public:
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus);
|
||||
|
||||
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext);
|
||||
|
||||
NS_IMETHOD
|
||||
AttributeChanged(nsIPresContext* aPresContext,
|
||||
nsIContent* aChild,
|
||||
|
|
|
@ -160,6 +160,21 @@ void nsTreeFrame::ClearSelection(nsIPresContext& aPresContext)
|
|||
mSelectedItems.Clear();
|
||||
}
|
||||
|
||||
void
|
||||
nsTreeFrame::RemoveFromSelection(nsTreeCellFrame* frame)
|
||||
{
|
||||
PRInt32 count = mSelectedItems.Count();
|
||||
for (PRInt32 i = 0; i < count; i++)
|
||||
{
|
||||
// Remove the tree cell from the selection.
|
||||
nsTreeCellFrame* theFrame = (nsTreeCellFrame*)mSelectedItems[i];
|
||||
if (theFrame == frame) {
|
||||
mSelectedItems.RemoveElementAt(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void nsTreeFrame::MoveUp(nsIPresContext& aPresContext, nsTreeCellFrame* pFrame)
|
||||
{
|
||||
PRInt32 rowIndex;
|
||||
|
|
|
@ -31,6 +31,7 @@ public:
|
|||
void ClearSelection(nsIPresContext& presContext);
|
||||
void ToggleSelection(nsIPresContext& presContext, nsTreeCellFrame* pFrame);
|
||||
void RangedSelection(nsIPresContext& aPresContext, nsTreeCellFrame* pEndFrame);
|
||||
void RemoveFromSelection(nsTreeCellFrame* frame);
|
||||
|
||||
void MoveUp(nsIPresContext& aPresContext, nsTreeCellFrame* pFrame);
|
||||
void MoveDown(nsIPresContext& aPresContext, nsTreeCellFrame* pFrame);
|
||||
|
@ -47,4 +48,4 @@ protected:
|
|||
|
||||
protected: // Data Members
|
||||
nsVoidArray mSelectedItems; // The selected cell frames.
|
||||
}; // class nsTableFrame
|
||||
}; // class nsTreeFrame
|
||||
|
|
Загрузка…
Ссылка в новой задаче