Bug 30689

Summary: caretRangeFromPoint() and elementFromPoint() returns wrong result in zoomed and scrolled page.
Product: WebKit Reporter: Xiaomei Ji <xji>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, jshin, sam, xji
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
test case
none
patch w/ layout test none

Description Xiaomei Ji 2009-10-22 13:47:24 PDT
Created attachment 41682 [details]
test case

Steps:
1. Open the attached HTML
2. click mouse somewhere to show the offset of mouse within the element
3. zoom the page *and* resize the window to make the page scroll
4. scroll the page horizontally and/or vertically, 
5. click mouse in the same place as step 2., observe the printed offset.

Results:
the printd offset is different when page is zoomed and scrolled.

Expected:
the printed offset should be the same.


Cause:
The real cause is the wrong calculation of event.clientX/Y when  page is zoomed and scrolled.
After Sam fixed the event.clientX/Y in r49551,  patch in r49490 ( for issue 30034) should be reverted.
Comment 1 Xiaomei Ji 2009-10-22 13:50:24 PDT
Created attachment 41684 [details]
patch w/ layout test
Comment 2 WebKit Commit Bot 2009-10-22 21:32:23 PDT
Comment on attachment 41684 [details]
patch w/ layout test

Rejecting patch 41684 from commit-queue.

Failed to run "['WebKitTools/Scripts/run-webkit-tests', '--no-launch-safari', '--quiet', '--exit-after-n-failures=1']" exit_code: 1
Running build-dumprendertree
Running tests from /Users/eseidel/Projects/CommitQueue/LayoutTests
Testing 11485 test cases.
fast/media/mq-transform-02.html -> failed

Exiting early after 1 failures. 7442 tests run.
136.02s total testing time

7441 test cases (99%) succeeded
1 test case (<1%) had incorrect layout
3 test cases (<1%) had stderr output
Comment 3 Eric Seidel (no email) 2009-10-23 12:05:11 PDT
Comment on attachment 41684 [details]
patch w/ layout test

Sorry about the commit-queue trouble.  Should work fine now.
Comment 4 Xiaomei Ji 2009-10-23 12:30:36 PDT
(In reply to comment #3)
> (From update of attachment 41684 [details])
> Sorry about the commit-queue trouble.  Should work fine now.

NP. Instead, I should thank you for taking care of this, as always!
Comment 5 WebKit Commit Bot 2009-10-23 12:48:16 PDT
Comment on attachment 41684 [details]
patch w/ layout test

Clearing flags on attachment: 41684

Committed r49990: <http://trac.webkit.org/changeset/49990>
Comment 6 WebKit Commit Bot 2009-10-23 12:48:24 PDT
All reviewed patches have been landed.  Closing bug.