WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
29219
Document.elementFromPoint() should take page scroll into consideration
https://bugs.webkit.org/show_bug.cgi?id=29219
Summary
Document.elementFromPoint() should take page scroll into consideration
Xiaomei Ji
Reported
2009-09-11 18:30:37 PDT
I am not sure whether this is a bug or not. document.elementFromPoint() currently does not take page scroll into consideration. If the input parameter (x, y) is the point in viewport, it should be increased by (document.body.scrollLeft, document.body.scrollTop), then apply zoomFactor, in order to get the correct point in the document. Or it is expected user to pass in (x, y) with scoll offset, such as (event.clientX + document.body.scrollLeft, event.clientY + document.body.scrollTop)?
Attachments
patch
(8.35 KB, patch)
2009-09-12 01:59 PDT
,
Sam Weinig
andersca
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Sam Weinig
Comment 1
2009-09-11 19:00:12 PDT
Can you gather stats on what the other browsers do?
Sam Weinig
Comment 2
2009-09-12 01:16:00 PDT
My experiments show that Firefox behaves as the spec describes, and I don't believe IE implements this API. We should probably change.
Sam Weinig
Comment 3
2009-09-12 01:24:50 PDT
I take it back, IE implements it, but I don't have a windows machine to test on at the moment.
Sam Weinig
Comment 4
2009-09-12 01:59:28 PDT
Created
attachment 39511
[details]
patch
Anders Carlsson
Comment 5
2009-09-12 10:33:41 PDT
Comment on
attachment 39511
[details]
patch r=me
Sam Weinig
Comment 6
2009-09-12 12:12:38 PDT
Fixed in
r48334
.
Mark Rowe (bdash)
Comment 7
2009-09-15 21:49:48 PDT
This broke dragging files on to file inputs:
bug 29276
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug