diff --git a/mozilla/layout/generic/nsContainerFrame.cpp b/mozilla/layout/generic/nsContainerFrame.cpp index edb293baaed..6ed129eee59 100644 --- a/mozilla/layout/generic/nsContainerFrame.cpp +++ b/mozilla/layout/generic/nsContainerFrame.cpp @@ -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); diff --git a/mozilla/layout/generic/nsContainerFrame.h b/mozilla/layout/generic/nsContainerFrame.h index 622dd53eed0..b1227c46127 100644 --- a/mozilla/layout/generic/nsContainerFrame.h +++ b/mozilla/layout/generic/nsContainerFrame.h @@ -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, diff --git a/mozilla/layout/html/base/src/nsContainerFrame.cpp b/mozilla/layout/html/base/src/nsContainerFrame.cpp index edb293baaed..6ed129eee59 100644 --- a/mozilla/layout/html/base/src/nsContainerFrame.cpp +++ b/mozilla/layout/html/base/src/nsContainerFrame.cpp @@ -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); diff --git a/mozilla/layout/html/base/src/nsContainerFrame.h b/mozilla/layout/html/base/src/nsContainerFrame.h index 622dd53eed0..b1227c46127 100644 --- a/mozilla/layout/html/base/src/nsContainerFrame.h +++ b/mozilla/layout/html/base/src/nsContainerFrame.h @@ -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,