<?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>13368</bug_id>
          
          <creation_ts>2007-04-16 22:59:14 -0700</creation_ts>
          <short_desc>KeyboardEvent::initKeyboardEvent doesn&apos;t match the DOM Level 3 Events spec</short_desc>
          <delta_ts>2013-04-05 17:11:15 -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>DOM</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Adam Roben (:aroben)">aroben</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>aroben</cc>
    
    <cc>k.y.sergey</cc>
    
    <cc>syoichi</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>14500</commentid>
    <comment_count>0</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2007-04-16 22:59:14 -0700</bug_when>
    <thetext>Our implementation of KeyboardEvent::initKeyboardEvent doesn&apos;t match the DOM Level 3 Events spec.

See the spec here:
http://www.w3.org/TR/DOM-Level-3-Events/events.html#Events-KeyboardEvents-Interfaces

See current implementation of the method here:
http://trac.webkit.org/projects/webkit/browser/trunk/WebCore/dom/KeyboardEvent.cpp?rev=19579#L66

Our implementation takes 5 booleans representing the state of the 5 modifier keys, while the spec defines the last argument of the method to be DOMString containing a space-separated list of modifier keys.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14501</commentid>
    <comment_count>1</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2007-04-16 23:09:54 -0700</bug_when>
    <thetext>It looks like WebKit is implementing an old version of this method. http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/events.html#Events-KeyboardEvents-Interfaces contains a definition that matches WebKit&apos;s, and it looks like WebKit&apos;s method was checked in on 2003-10-20 (http://trac.webkit.org/projects/webkit/changeset/5226)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14410</commentid>
    <comment_count>2</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2007-04-17 12:08:54 -0700</bug_when>
    <thetext>We should consider implementing this in a custom way so that both versions work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66238</commentid>
    <comment_count>3</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2008-01-04 16:39:41 -0800</bug_when>
    <thetext>Also, bug 16375 points out that events crated with initKeyboardEvent aren&apos;t very good because they will always have a keyCode of 0 and charCode of 0. So any code that looks at keyCode or charCode, including code inside the engine that responds to keyboard events and older legacy JavaScript code, won&apos;t work with these events.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66239</commentid>
    <comment_count>4</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2008-01-04 16:40:03 -0800</bug_when>
    <thetext>Sorry, I meant bug 16735.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>