<?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>111476</bug_id>
          
          <creation_ts>2013-03-05 13:22:17 -0800</creation_ts>
          <short_desc>Getting the descriptor selectionDirection throws error</short_desc>
          <delta_ts>2016-04-12 03:30:55 -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>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></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>49739</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Erik Arvidsson">arv</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cdumez</cc>
    
    <cc>haraken</cc>
    
    <cc>oliver</cc>
    
    <cc>rniwa</cc>
    
    <cc>zcorpan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>847999</commentid>
    <comment_count>0</comment_count>
    <who name="Erik Arvidsson">arv</who>
    <bug_when>2013-03-05 13:22:17 -0800</bug_when>
    <thetext>var checkbox = document.createElement(&apos;input&apos;);
input.type = &apos;checkbox&apos;;
Object.getOwnPropertyDescriptor(input, &apos;selectionDirection&apos;);  // THROWS!

It is OK to throw when we try to get the value of the selectionDirection but is an ES5 spec violation to throw on getting the descriptor.

This is most likely because we report WebIDL attributes as data properties, and as such, we read the value of the property.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1181220</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Pieters (:zcorpan)">zcorpan</who>
    <bug_when>2016-04-06 03:33:55 -0700</bug_when>
    <thetext>Proposed spec change to not throw on getting: https://github.com/whatwg/html/pull/1006</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1182015</commentid>
    <comment_count>2</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2016-04-07 19:40:35 -0700</bug_when>
    <thetext>This is apparently fixed on WebKit trunk:
var input = document.createElement(&apos;input&apos;);
input.type = &apos;checkbox&apos;;
Object.getOwnPropertyDescriptor(input, &apos;selectionDirection&apos;);
-&gt; returns undefined
Object.getOwnPropertyDescriptor(input.__proto__, &apos;selectionDirection&apos;);
-&gt; returns {get: function, set: function, enumerable: true, configurable: true}

Feel free to reopen if I missed something.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1182016</commentid>
    <comment_count>3</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2016-04-07 19:42:45 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; Proposed spec change to not throw on getting:
&gt; https://github.com/whatwg/html/pull/1006

Oh, this does not seem strictly related to this bug. While WebKit no longer throws on getting the descriptor, accessing input.selectionDirection will throws.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1183031</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Pieters (:zcorpan)">zcorpan</who>
    <bug_when>2016-04-12 03:30:55 -0700</bug_when>
    <thetext>Right, filed https://bugs.webkit.org/show_bug.cgi?id=156500</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>