bug 508487. elementFromPoint returns null outside of viewport when aIgnoreRootScrollFrame is true

This commit is contained in:
Roy Frostig 2009-08-07 21:10:05 -07:00
parent 9679ebfcca
commit 789aea1016

View File

@ -2607,7 +2607,7 @@ nsDocument::ElementFromPointHelper(PRInt32 aX, PRInt32 aY,
NS_ENSURE_ARG_POINTER(aReturn);
*aReturn = nsnull;
// As per the the spec, we return null if either coord is negative
if (aX < 0 || aY < 0)
if (!aIgnoreRootScrollFrame && (aX < 0 || aY < 0))
return NS_OK;
nscoord x = nsPresContext::CSSPixelsToAppUnits(aX);