RESOLVED FIXED Bug 9605
REGRESSION: pageX and pageY are both 0 for events created with initMouseEvent
https://bugs.webkit.org/show_bug.cgi?id=9605
Summary REGRESSION: pageX and pageY are both 0 for events created with initMouseEvent
Darin Adler
Reported 2006-06-26 09:16:09 PDT
The fix for bug 8707 introduced this problem.
Attachments
First attempt (4.78 KB, patch)
2006-06-27 06:09 PDT, Rob Buis
darin: review-
Improved patch (4.74 KB, patch)
2006-06-27 13:34 PDT, Rob Buis
darin: review-
Now with expected results (5.31 KB, patch)
2006-06-27 14:04 PDT, Rob Buis
darin: review+
Improved testcase (2.44 KB, patch)
2006-06-28 00:08 PDT, Rob Buis
darin: review+
Darin Adler
Comment 1 2006-06-26 09:16:26 PDT
Rob Buis
Comment 2 2006-06-27 06:09:59 PDT
Created attachment 9060 [details] First attempt The patch inits pageX/pageY ok, and adds testing code to window-xy-properties.html to verify it. I am not sure whether the other FIXME are part of this bug, I guess they are simple to fix and either they should be protected or have setters. Cheers, Rob.
Darin Adler
Comment 3 2006-06-27 09:29:50 PDT
Comment on attachment 9060 [details] First attempt This looks wrong to me. The initMouseEvent function is passing clientX and clientY to a function that takes parameters named pageX and pageY. The parameters to initMouseEvent are not the page x and y, but rather the client x and y. You can check this with other browsers, but I'm pretty sure this is true.
Rob Buis
Comment 4 2006-06-27 13:34:59 PDT
Created attachment 9066 [details] Improved patch Hi Darin, You are right, this should fix it. Cheers, Rob.
Darin Adler
Comment 5 2006-06-27 13:43:13 PDT
Comment on attachment 9066 [details] Improved patch I think it's pretty ugly to have two different initCoordinates functions, but I think this will work right. Ultimately we could change this all so that pageX/Y is always computed from clientX/Y. The only reason it's not like that today is Macintosh-specific stuff: the "viewport" coordinates for the web view are actually window coordinates on OS X so they can't be used directly for clientX/Y. Otherwise, we'd go change all the callers to pass in clientX/Y and the code would all match. It would be great to straighten that out some day. Patch needs to include the patch to the test results too, though. r=me, but review- because we need a patch that includes fast/dom/window-xy-properties-expected.txt.
Rob Buis
Comment 6 2006-06-27 14:04:13 PDT
Created attachment 9067 [details] Now with expected results Yup, it was not properly generated, now it is included in the patch. Cheers, Rob.
Darin Adler
Comment 7 2006-06-27 14:58:50 PDT
Comment on attachment 9067 [details] Now with expected results The values here aren't right for offsetX/Y. The reason for that is that they can't be correct until you dispatch the event to an object. We really should be testing the values of these after dispatching too. r=me, we can deal with that later
Darin Adler
Comment 8 2006-06-27 20:47:01 PDT
Committed revision 15076.
Rob Buis
Comment 9 2006-06-28 00:08:03 PDT
Created attachment 9072 [details] Improved testcase The improved testcase now dispatches the event, so offsetX and offsetY are adjusted, the test verifies it. Please let me know whether I need to make Changelog entries for the new patch to land. Cheers, Rob.
David Kilzer (:ddkilzer)
Comment 10 2006-06-28 04:08:49 PDT
Reopening bug per Comment #9. Rob, please file a new bug, even for updated tests.  The best thing to do would be to set the blocks/depends on flag to reference the original bug. See Bug 8707, Comment #27.
Darin Adler
Comment 11 2006-06-28 07:30:42 PDT
Comment on attachment 9072 [details] Improved testcase better -- r=me
Darin Adler
Comment 12 2006-06-28 07:35:17 PDT
Committed revision 15078.
Darin Adler
Comment 13 2006-06-28 07:36:58 PDT
(In reply to comment #10) > Rob, please file a new bug, even for updated tests.  The best thing to do would > be to set the blocks/depends on flag to reference the original bug. Yes, Dave's right that we don't want to reuse a bug. The reason is that the bug should represent the original problem and be reopened if it wasn't fixed. We don't want to reopen a bug to refine a fix, but rather just if the fix didn't work for some reason. This helps us be clearer on the "verification" step and understanding what is working and what isn't.
Rob Buis
Comment 14 2006-06-28 12:34:18 PDT
Hi Darin, Dave, (In reply to comment #13) > (In reply to comment #10) > > Rob, please file a new bug, even for updated tests.  The best thing to do would > > be to set the blocks/depends on flag to reference the original bug. > > Yes, Dave's right that we don't want to reuse a bug. > > The reason is that the bug should represent the original problem and be > reopened if it wasn't fixed. We don't want to reopen a bug to refine a fix, but > rather just if the fix didn't work for some reason. This helps us be clearer on > the "verification" step and understanding what is working and what isn't. Ok, will try to remember with future bug reports :) Cheers, Rob.
Lucas Forschler
Comment 15 2019-02-06 09:03:15 PST
Mass moving XML DOM bugs to the "DOM" Component.
Note You need to log in before you can comment on or make changes to this bug.