Bug 42987

Summary: [chromium] Absolute Mouse coordinates getting lost in translation
Product: WebKit Reporter: Gene Gutnik <gene>
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, fishd, japhet
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Attachments:
Description Flags
Added absolute (not multiplied by zoom level) mouse coordinates to WebMouseEvent
japhet: review-
Added bug URL and description to the ChangeLog
japhet: review+, fishd: commit-queue-
Fix mouse coordinate conversion. WindowX,Y is an absolute mouse coordinates within browser window, x,y - are coordinates relative to the origin of the widget. fishd: review+

Description Gene Gutnik 2010-07-26 11:52:41 PDT
In chromium absolute mouse coordinates getting lost and only adjusted (multiplied by zoom factor) saved. In caused controls and plugins on the zoomed in/out pages to respond incorrectly to mouse events.
Comment 1 Gene Gutnik 2010-07-26 13:49:33 PDT
Created attachment 62601 [details]
Added absolute (not multiplied by zoom level) mouse coordinates to WebMouseEvent

Added absolute (not multiplied by zoom level) mouse coordinates to WebMouseEvent
Comment 2 Nate Chapin 2010-07-26 13:56:12 PDT
Comment on attachment 62601 [details]
Added absolute (not multiplied by zoom level) mouse coordinates to WebMouseEvent

The code looks fine to me, but you need to update the auto-generated ChangeLog entry with a real bug URL and description (the first line with OOPS! will be auto-corrected by the commit-queue, but the second won't).
Comment 3 Gene Gutnik 2010-07-26 14:09:05 PDT
Created attachment 62605 [details]
Added bug URL and description to the ChangeLog

Thanks Nate,
I've added bug URL and description to the ChangeLog
Comment 4 Nate Chapin 2010-07-26 14:11:13 PDT
Comment on attachment 62605 [details]
Added bug URL and description to the ChangeLog

Excellent, thanks!

I'm going to wait to actually send this to commit-queue until Darin has had a chance to look at it.
Comment 5 Darin Fisher (:fishd, Google) 2010-07-26 14:44:26 PDT
Comment on attachment 62605 [details]
Added bug URL and description to the ChangeLog

WebKit/chromium/public/WebInputEvent.h:244
 +      int absoluteX;
I think this really deserves some comments to explain the meaning
of all of these coordinates.  It was possible to guess before, but
now it could be pretty confusing to developers.

Also, did you confirm that NPAPI plugins still require zoomed
coordinates?  I'm concerned that we are adding absoluteX,Y when
in fact we should just be changing the meaning of windowX,Y.
Comment 6 Gene Gutnik 2010-07-28 14:05:17 PDT
Created attachment 62875 [details]
Fix mouse coordinate conversion. WindowX,Y is an absolute mouse coordinates within browser window, x,y - are coordinates relative to the origin of the widget.

Fix mouse coordinate conversion. WindowX,Y is an absolute mouse coordinates within browser window, x,y - are coordinates relative to the origin of the widget.
Comment 7 Darin Fisher (:fishd, Google) 2010-07-28 16:32:33 PDT
Landed as http://trac.webkit.org/changeset/64243
Comment 8 nail000 2010-08-03 10:53:53 PDT
This fixes bug 26424. https://bugs.webkit.org/show_bug.cgi?id=26424