<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>147740</bug_id>
          
          <creation_ts>2015-08-06 12:14:55 -0700</creation_ts>
          <short_desc>TouchEvent and Touch should have constructors</short_desc>
          <delta_ts>2016-10-04 08:57:53 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>UI Events</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>158883</dependson>
    
    <dependson>162709</dependson>
    
    <dependson>162713</dependson>
    
    <dependson>162728</dependson>
    
    <dependson>162734</dependson>
    
    <dependson>162736</dependson>
    
    <dependson>162757</dependson>
    
    <dependson>162787</dependson>
    
    <dependson>162806</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Rick Byers">rbyers</reporter>
          <assigned_to name="Beth Dakin">bdakin</assigned_to>
          <cc>bdakin</cc>
    
    <cc>benjamin</cc>
    
    <cc>cdumez</cc>
    
    <cc>dino</cc>
    
    <cc>graouts</cc>
    
    <cc>philip</cc>
    
    <cc>sam</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1115408</commentid>
    <comment_count>0</comment_count>
    <who name="Rick Byers">rbyers</who>
    <bug_when>2015-08-06 12:14:55 -0700</bug_when>
    <thetext>Most UIEvents at this point have a DOM Event constructor.  TouchEvent is a notable exception.  It&apos;s not a big use case, but JS-generated events are sometimes useful and (IMHO) ideally all event types would be consistent in this regard.  Is there any interest in adding constructors to WebKit?  Should be trivial.

We (Touch Event Community Group) have recently added constructor definitions to the draft TouchEvents level 2 spec: http://w3c.github.io/touch-events/touchevents.html#touchevent-interface (bug: https://github.com/w3c/touch-events/issues/10).  Any feedback on the design?  I&apos;m happy to make changes before pages start depending on the API.

http://crbug.com/508675 tracks shipping these in blink.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1140684</commentid>
    <comment_count>1</comment_count>
    <who name="Rick Byers">rbyers</who>
    <bug_when>2015-11-09 22:16:13 -0800</bug_when>
    <thetext>Beth, is this little tweak something you hope to do at some point?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1140693</commentid>
    <comment_count>2</comment_count>
    <who name="Beth Dakin">bdakin</who>
    <bug_when>2015-11-09 23:07:11 -0800</bug_when>
    <thetext>(In reply to comment #1)
&gt; Beth, is this little tweak something you hope to do at some point?

Thanks for cc&apos;ing me! Could be interesting. :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1189737</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2016-05-03 08:04:55 -0700</bug_when>
    <thetext>&lt;rdar://problem/26063585&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1202306</commentid>
    <comment_count>4</comment_count>
    <who name="Rick Byers">rbyers</who>
    <bug_when>2016-06-14 14:03:30 -0700</bug_when>
    <thetext>/cc grouts who seems to be doing other TouchEvents works (yay!)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1203372</commentid>
    <comment_count>5</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2016-06-17 12:06:06 -0700</bug_when>
    <thetext>I am working on the TouchEvent constructor.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1203425</commentid>
    <comment_count>6</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2016-06-17 14:34:11 -0700</bug_when>
    <thetext>Added a TouchEvent constructor via Bug 158883. It looks like WebKit on iOS already has a constructor for Touch so closing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1233500</commentid>
    <comment_count>7</comment_count>
    <who name="Rick Byers">rbyers</who>
    <bug_when>2016-09-26 12:01:48 -0700</bug_when>
    <thetext>Chris, does the Touch constructor on iOS follow the spec (and normal DOM constructor pattern) in taking a dictionary?  foolip@ says he can only get it working by passing a list of parameters similar to createTouch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1233501</commentid>
    <comment_count>8</comment_count>
    <who name="Rick Byers">rbyers</who>
    <bug_when>2016-09-26 12:02:54 -0700</bug_when>
    <thetext>Reference: https://codereview.chromium.org/2352333002/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1233502</commentid>
    <comment_count>9</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2016-09-26 12:06:08 -0700</bug_when>
    <thetext>(In reply to comment #7)
&gt; Chris, does the Touch constructor on iOS follow the spec (and normal DOM
&gt; constructor pattern) in taking a dictionary?  foolip@ says he can only get
&gt; it working by passing a list of parameters similar to createTouch.

It does not look like we support passing a Dictionary at the moment, it takes in a list of parameters :/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1233514</commentid>
    <comment_count>10</comment_count>
    <who name="Rick Byers">rbyers</who>
    <bug_when>2016-09-26 12:24:33 -0700</bug_when>
    <thetext>&gt; It does not look like we support passing a Dictionary at the moment, it takes in a list of parameters :/

Ugh, yeah that&apos;s not going to be interoperable (the whole point of the constructors is to avoid having to keep extending a long argument list).

Ok if we reopen this to track getting WebKit passing this test?
https://github.com/w3c/web-platform-tests/blob/master/touch-events/touch-touchevent-constructor.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1234461</commentid>
    <comment_count>11</comment_count>
    <who name="Rick Byers">rbyers</who>
    <bug_when>2016-09-28 11:26:00 -0700</bug_when>
    <thetext>Note that if issue 157269 isn&apos;t going to be fixed, than the Safari-specific TouchEvent constructor should probably also have a way to set these non-standard properties on TouchEvent.

I have now come across one script that is relying on these properties on Safari: http://s0.2mdn.net/instream/video/client.js, and as a result other libraries cannot move from initTouchEvent to the TouchEvent constructor without breaking this script.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1234462</commentid>
    <comment_count>12</comment_count>
    <who name="Rick Byers">rbyers</who>
    <bug_when>2016-09-28 11:26:47 -0700</bug_when>
    <thetext>Darn sorry, used the wrong hotword.  See &quot;bug 15726&quot; for the clientX/clientY issue above.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1234463</commentid>
    <comment_count>13</comment_count>
    <who name="Rick Byers">rbyers</who>
    <bug_when>2016-09-28 11:27:24 -0700</bug_when>
    <thetext>Damn damn, not my day :-)

See &quot;bug 157269&quot; for the clientX/clientY issue above.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1236197</commentid>
    <comment_count>14</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2016-10-04 08:57:53 -0700</bug_when>
    <thetext>Resolved in sub-bugs.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>