chore(bidi): use fractional coordinates for pointerAction (#34675)

This commit is contained in:
Yury Semikhatsky 2025-02-11 12:09:48 -08:00 committed by GitHub
parent 8ed2f4319e
commit 8e51be9069
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -79,9 +79,6 @@ export class RawMouseImpl implements input.RawMouse {
} }
async move(x: number, y: number, button: types.MouseButton | 'none', buttons: Set<types.MouseButton>, modifiers: Set<types.KeyboardModifier>, forClick: boolean): Promise<void> { async move(x: number, y: number, button: types.MouseButton | 'none', buttons: Set<types.MouseButton>, modifiers: Set<types.KeyboardModifier>, forClick: boolean): Promise<void> {
// Bidi throws when x/y are not integers.
x = Math.floor(x);
y = Math.floor(y);
await this._performActions([{ type: 'pointerMove', x, y }]); await this._performActions([{ type: 'pointerMove', x, y }]);
} }
@ -94,9 +91,6 @@ export class RawMouseImpl implements input.RawMouse {
} }
async wheel(x: number, y: number, buttons: Set<types.MouseButton>, modifiers: Set<types.KeyboardModifier>, deltaX: number, deltaY: number): Promise<void> { async wheel(x: number, y: number, buttons: Set<types.MouseButton>, modifiers: Set<types.KeyboardModifier>, deltaX: number, deltaY: number): Promise<void> {
// Bidi throws when x/y are not integers.
x = Math.round(x);
y = Math.round(y);
await this._session.send('input.performActions', { await this._session.send('input.performActions', {
context: this._session.sessionId, context: this._session.sessionId,
actions: [ actions: [