Changeset 141520 in webkit


Ignore:
Timestamp:
Jan 31, 2013 6:41:27 PM (11 years ago)
Author:
hayato@chromium.org
Message:

Use TouchEvent.targetTouches rather than TouchEvent.touches since the order of Touches in TouchList is not guaranteed.
https://bugs.webkit.org/show_bug.cgi?id=108426

Reviewed by Dimitri Glazkov.

Neat fix for LayoutTest in http://trac.webkit.org/changeset/141054.

In this LayoutTest context, the length of touchEvent.touches is 2.
The Touch order in TouchList is not guaranteed. Therefore
touchEvent.touches[0] can be another touch. Rather, we should use
touchEvent.targetTouches here since its length is 1 in this context.

  • fast/dom/shadow/touch-event.html:
Location:
trunk/LayoutTests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r141519 r141520  
     12013-01-31  Hayato Ito  <hayato@chromium.org>
     2
     3        Use TouchEvent.targetTouches rather than TouchEvent.touches since the order of Touches in TouchList is not guaranteed.
     4        https://bugs.webkit.org/show_bug.cgi?id=108426
     5
     6        Reviewed by Dimitri Glazkov.
     7
     8        Neat fix for LayoutTest in http://trac.webkit.org/changeset/141054.
     9
     10        In this LayoutTest context, the length of touchEvent.touches is 2.
     11        The Touch order in TouchList is not guaranteed. Therefore
     12        touchEvent.touches[0] can be another touch.  Rather, we should use
     13        touchEvent.targetTouches here since its length is 1 in this context.
     14
     15        * fast/dom/shadow/touch-event.html:
     16
    1172013-01-31  Rouslan Solomakhin  <rouslan@chromium.org>
    218
  • trunk/LayoutTests/fast/dom/shadow/touch-event.html

    r141054 r141520  
    2424var touchTargetsForHost1;
    2525host1.addEventListener('touchstart', function(e) {
    26     touchTargetForHost1 = e.touches[0].target;
     26    touchTargetForHost1 = e.targetTouches[0].target;
    2727});
    2828
     
    3434var touchTargetForInput1;
    3535input1.addEventListener('touchstart', function(e) {
    36     touchTargetForInput1 = e.touches[1].target;
     36    touchTargetForInput1 = e.targetTouches[0].target;
    3737});
    3838
Note: See TracChangeset for help on using the changeset viewer.