<?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>12721</bug_id>
          
          <creation_ts>2007-02-09 15:53:21 -0800</creation_ts>
          <short_desc>getter/setter does not follow the behavior of Firefox</short_desc>
          <delta_ts>2012-03-07 18:21:24 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore JavaScript</component>
          <version>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>49739</dup_id>
          
          <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="Feng Qian">ian.eng.webkit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>barraclough</cc>
    
    <cc>bedney</cc>
    
    <cc>feng</cc>
    
    <cc>joker806</cc>
    
    <cc>t.brain</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>24564</commentid>
    <comment_count>0</comment_count>
    <who name="Feng Qian">ian.eng.webkit</who>
    <bug_when>2007-02-09 15:53:21 -0800</bug_when>
    <thetext>Case:  window.screen.__defineGetter__(&quot;width&quot;, function(){return &quot;foo&quot;;});

Firefox allows defining a getter on a readonly property, WebKit ignores it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24489</commentid>
    <comment_count>1</comment_count>
      <attachid>13106</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-02-10 10:29:12 -0800</bug_when>
    <thetext>Created attachment 13106
test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124287</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2009-06-04 04:10:27 -0700</bug_when>
    <thetext>See also: bug 18737.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124289</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2009-06-04 04:10:37 -0700</bug_when>
    <thetext>*** Bug 26127 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124301</commentid>
    <comment_count>4</comment_count>
    <who name="T. Brains">t.brain</who>
    <bug_when>2009-06-04 06:52:35 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; *** Bug 26127 has been marked as a duplicate of this bug. ***

As I described under bug 26127, this isn&apos;t limited to &quot;read-only&quot; properties as described here, but rather getters and setters on any native DOM property.

And this contradicts the behavior of Firefox, IE8 and even Chrome.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>187560</commentid>
    <comment_count>5</comment_count>
    <who name="William J. Edney">bedney</who>
    <bug_when>2010-02-03 17:26:08 -0800</bug_when>
    <thetext>I&apos;ve confirmed this behavior as well.

Any fix to this would be most welcome! :-)

Cheers,

- Bill</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>573454</commentid>
    <comment_count>6</comment_count>
    <who name="Gavin Barraclough">barraclough</who>
    <bug_when>2012-03-07 18:21:24 -0800</bug_when>
    <thetext>The behaviour of __defineGetter__ is correct here, we should not be able to redefine non-configurable properties.  The problem is likely that these properties are directly on the instance of the object, rather than accessors on the prototype.  Per WebIDL, this is a bug in our implementation.

*** This bug has been marked as a duplicate of bug 49739 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>13106</attachid>
            <date>2007-02-10 10:29:12 -0800</date>
            <delta_ts>2007-02-10 10:29:12 -0800</delta_ts>
            <desc>test case</desc>
            <filename>getter.html</filename>
            <type>text/html</type>
            <size>521</size>
            <attacher name="Alexey Proskuryakov">ap</attacher>
            
              <data encoding="base64">PGJvZHk+CjxzY3JpcHQ+CnRyeSB7CiAgICBkb2N1bWVudC53cml0ZSgiYXJyYXk6PGJyPiIpOwog
ICAgYXJyID0gbmV3IEFycmF5OwogICAgYXJyLl9fZGVmaW5lR2V0dGVyX18oImxlbmd0aCIsIGZ1
bmN0aW9uKCl7cmV0dXJuICJmb28iO30pOwp9IGNhdGNoKGV4KSB7CiAgICBkb2N1bWVudC53cml0
ZShleCArICI8YnI+Iik7Cn0KCmRvY3VtZW50LndyaXRlKCI8YnI+Iik7Cgp0cnkgewogICAgZG9j
dW1lbnQud3JpdGUoIndpbmRvdy5zY3JlZW4uLi48YnI+Iik7CiAgICB3aW5kb3cuc2NyZWVuLl9f
ZGVmaW5lR2V0dGVyX18oIndpZHRoIiwgZnVuY3Rpb24oKXtyZXR1cm4gImZvbyI7fSk7CiAgICBp
ZiAod2luZG93LnNjcmVlbi53aWR0aCA9PSAiZm9vIikKICAgICAgICBkb2N1bWVudC53cml0ZSgi
U1VDQ0VTUyIpOwogICAgZWxzZQogICAgICAgIGRvY3VtZW50LndyaXRlKCJGQUlMVVJFIik7Cn0g
Y2F0Y2goZXgpIHsKICAgIGRvY3VtZW50LndyaXRlKGV4ICsgIjxicj4iKTsKfQo8L3NjcmlwdD4K
PC9ib2R5Pgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>