Preserve absolute position of mouse events while taking into account page scaling.
Created attachment 106744 [details] Patch
Comment on attachment 106744 [details] Patch Make a static pageScaleFactor instead of modifying the static pageZoomFactor, please.
Comment on attachment 106744 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=106744&action=review > Source/WebCore/dom/MouseRelatedEvent.cpp:122 > - return frame->pageZoomFactor(); > + return frame->pageZoomFactor() * frame->pageScaleFactor(); It’s not good to change what this function does, but leave its name the same. The function is named pageZoomFactor but no longer returns the page zoom factor. We don’t want to use two different names for the same thing.
I'm going to mark this bug as invalid, because my fix to pageX and pageY coordinates (https://bugs.webkit.org/show_bug.cgi?id=67592 ) caused this problem of accidentally modifying the event's absolute location. I reverted that change, so this bug is no longer necessary. It would, however, be nice to have a layout test that ensured the absolute positioning was preserved under the presence of page scaling. Some ideas on how to do this would be to use an <input type="range"> element, since this element processes the absolute location of the mouse event. Another possibility would be to extend EventSender or LayoutTestController to allow the extraction of the absolute location of the mouse event. However, this might be a bad idea since implementation details of the mouse event would be exposed in a test, making it more fragile.