Factored out FrameForPoint code into one that takes a particular list
git-svn-id: svn://10.0.0.236/trunk@14951 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -338,13 +338,21 @@ nsContainerFrame::PaintChild(nsIPresContext& aPresContext,
|
||||
NS_IMETHODIMP
|
||||
nsContainerFrame::GetFrameForPoint(const nsPoint& aPoint,
|
||||
nsIFrame** aFrame)
|
||||
{
|
||||
return GetFrameForPointUsing(aPoint, nsnull, aFrame);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsContainerFrame::GetFrameForPointUsing(const nsPoint& aPoint,
|
||||
nsIAtom* aList,
|
||||
nsIFrame** aFrame)
|
||||
{
|
||||
nsIFrame* kid;
|
||||
nsRect kidRect;
|
||||
nsPoint tmp;
|
||||
*aFrame = nsnull;
|
||||
|
||||
FirstChild(nsnull, kid);
|
||||
FirstChild(aList, kid);
|
||||
while (nsnull != kid) {
|
||||
kid->GetRect(kidRect);
|
||||
if (kidRect.Contains(aPoint)) {
|
||||
@@ -354,7 +362,7 @@ nsContainerFrame::GetFrameForPoint(const nsPoint& aPoint,
|
||||
kid->GetNextSibling(kid);
|
||||
}
|
||||
|
||||
FirstChild(nsnull, kid);
|
||||
FirstChild(aList, kid);
|
||||
while (nsnull != kid) {
|
||||
nsFrameState state;
|
||||
kid->GetFrameState(state);
|
||||
|
||||
@@ -94,6 +94,10 @@ protected:
|
||||
|
||||
void SizeOfWithoutThis(nsISizeOfHandler* aHandler) const;
|
||||
|
||||
nsresult GetFrameForPointUsing(const nsPoint& aPoint,
|
||||
nsIAtom* aList,
|
||||
nsIFrame** aFrame);
|
||||
|
||||
/**
|
||||
* Prepare a continuation frame of this frame for reflow. Appends
|
||||
* it to the flow, sets its content offsets, mLastContentIsComplete,
|
||||
|
||||
@@ -338,13 +338,21 @@ nsContainerFrame::PaintChild(nsIPresContext& aPresContext,
|
||||
NS_IMETHODIMP
|
||||
nsContainerFrame::GetFrameForPoint(const nsPoint& aPoint,
|
||||
nsIFrame** aFrame)
|
||||
{
|
||||
return GetFrameForPointUsing(aPoint, nsnull, aFrame);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsContainerFrame::GetFrameForPointUsing(const nsPoint& aPoint,
|
||||
nsIAtom* aList,
|
||||
nsIFrame** aFrame)
|
||||
{
|
||||
nsIFrame* kid;
|
||||
nsRect kidRect;
|
||||
nsPoint tmp;
|
||||
*aFrame = nsnull;
|
||||
|
||||
FirstChild(nsnull, kid);
|
||||
FirstChild(aList, kid);
|
||||
while (nsnull != kid) {
|
||||
kid->GetRect(kidRect);
|
||||
if (kidRect.Contains(aPoint)) {
|
||||
@@ -354,7 +362,7 @@ nsContainerFrame::GetFrameForPoint(const nsPoint& aPoint,
|
||||
kid->GetNextSibling(kid);
|
||||
}
|
||||
|
||||
FirstChild(nsnull, kid);
|
||||
FirstChild(aList, kid);
|
||||
while (nsnull != kid) {
|
||||
nsFrameState state;
|
||||
kid->GetFrameState(state);
|
||||
|
||||
@@ -94,6 +94,10 @@ protected:
|
||||
|
||||
void SizeOfWithoutThis(nsISizeOfHandler* aHandler) const;
|
||||
|
||||
nsresult GetFrameForPointUsing(const nsPoint& aPoint,
|
||||
nsIAtom* aList,
|
||||
nsIFrame** aFrame);
|
||||
|
||||
/**
|
||||
* Prepare a continuation frame of this frame for reflow. Appends
|
||||
* it to the flow, sets its content offsets, mLastContentIsComplete,
|
||||
|
||||
Reference in New Issue
Block a user