mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 773427 - Ensure that when moving click points, we don't allow it to get rounded incorrectly. r=wesj
This commit is contained in:
parent
1ca56b02ad
commit
221d163724
@ -3511,8 +3511,8 @@ var BrowserEventHandler = {
|
||||
if (isTouchClick) {
|
||||
let rect = rects[0];
|
||||
if (rect.width != 0 || rect.height != 0) {
|
||||
aX = Math.min(rect.left + rect.width, Math.max(rect.left, aX));
|
||||
aY = Math.min(rect.top + rect.height, Math.max(rect.top, aY));
|
||||
aX = Math.min(Math.floor(rect.left + rect.width), Math.max(Math.ceil(rect.left), aX));
|
||||
aY = Math.min(Math.floor(rect.top + rect.height), Math.max(Math.ceil(rect.top), aY));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3523,7 +3523,7 @@ var BrowserEventHandler = {
|
||||
let window = aElement.ownerDocument.defaultView;
|
||||
try {
|
||||
let cwu = window.top.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
|
||||
cwu.sendMouseEventToWindow(aName, Math.round(aX), Math.round(aY), 0, 1, 0, true);
|
||||
cwu.sendMouseEventToWindow(aName, aX, aY, 0, 1, 0, true);
|
||||
} catch(e) {
|
||||
Cu.reportError(e);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user