⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 245506 in webkit


Ignore:
Timestamp:
May 19, 2019, 2:37:44 PM (7 years ago)
Author:
graouts@webkit.org
Message:

[Pointer Events] The pointerup, pointerout and pointerleave events may be fired twice
https://bugs.webkit.org/show_bug.cgi?id=198028
<rdar://problem/50769425>

Reviewed by Dean Jackson.

Add a new test that checks that we're firing a "pointermove" event when the touch pressure
changes, even when the touch is stationary, and that a single "pointerup" event is fired
as the touch ends and the pressure changes. The relevant code change is done in WebKitAdditions.

  • pointerevents/ios/pressure-change-expected.txt: Added.
  • pointerevents/ios/pressure-change.html: Added.
  • pointerevents/utils.js:

(prototype._handlePointerEvent):
(prototype.stationary):
(prototype._action):

Location:
trunk/LayoutTests
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r245505 r245506  
     12019-05-19  Antoine Quint  <graouts@apple.com>
     2
     3        [Pointer Events] The pointerup, pointerout and pointerleave events may be fired twice
     4        https://bugs.webkit.org/show_bug.cgi?id=198028
     5        <rdar://problem/50769425>
     6
     7        Reviewed by Dean Jackson.
     8
     9        Add a new test that checks that we're firing a "pointermove" event when the touch pressure
     10        changes, even when the touch is stationary, and that a single "pointerup" event is fired
     11        as the touch ends and the pressure changes. The relevant code change is done in WebKitAdditions.
     12
     13        * pointerevents/ios/pressure-change-expected.txt: Added.
     14        * pointerevents/ios/pressure-change.html: Added.
     15        * pointerevents/utils.js:
     16        (prototype._handlePointerEvent):
     17        (prototype.stationary):
     18        (prototype._action):
     19
    1202019-05-19  Antoine Quint  <graouts@apple.com>
    221
  • trunk/LayoutTests/pointerevents/utils.js

    r244974 r245506  
    6868            x: event.clientX,
    6969            y: event.clientY,
     70            pressure: event.pressure,
    7071            isPrimary: event.isPrimary,
    7172            isTrusted: event.isTrusted
     
    238239    stationary(options)
    239240    {
    240         return this._action("stationary", options.x || 0, options.y || 0);
    241     }
    242 
    243     _action(phase, x, y)
     241        return this._action("stationary", options.x || this._lastX, options.y || this._lastY, options.pressure || 0);
     242    }
     243
     244    _action(phase, x, y, pressure = 0)
    244245    {
    245246        this._lastX = x;
    246247        this._lastY = y;
    247         return { inputType: "finger", id: this.id, phase, x, y };
     248        return { inputType: "finger", id: this.id, phase, x, y, pressure };
    248249    }
    249250
Note: See TracChangeset for help on using the changeset viewer.