<?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>7936</bug_id>
          
          <creation_ts>2006-03-23 11:13:15 -0800</creation_ts>
          <short_desc>Inconsistent toString behavior for document.styleSheets, cssRules, etc.</short_desc>
          <delta_ts>2006-04-15 02:30:24 -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>CSS</component>
          <version>417.x</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>8131</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Peter Flynn">ytpete</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>37426</commentid>
    <comment_count>0</comment_count>
    <who name="Peter Flynn">ytpete</who>
    <bug_when>2006-03-23 11:13:15 -0800</bug_when>
    <thetext>Certain CSS-related scripting objects display inconsistent behavior when attempting to convert them to strings.

See the attached testcase:
 alert(document.styleSheets) --&gt; works as expected
 alert(&quot;&quot;+document.styleSheets) --&gt; &quot;No default value&quot; exception
 alert(document.styleSheets.toString()) --&gt; &quot;Value undefined&quot; exception (there is no toString method).

Clearly, there is code to render the object as a string because the first case works. It is just not getting invoked properly in the other cases.

Some related CSS objects have the same bug:
 document.styleSheets[i] --&gt; correct
 document.styleSheets[i].cssRules --&gt; buggy
 document.styleSheets[i].cssRules[j] --&gt; buggy</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37427</commentid>
    <comment_count>1</comment_count>
      <attachid>7254</attachid>
    <who name="Peter Flynn">ytpete</who>
    <bug_when>2006-03-23 11:14:00 -0800</bug_when>
    <thetext>Created attachment 7254
Testcase for document.styleSheets</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39294</commentid>
    <comment_count>2</comment_count>
    <who name="Peter Flynn">ytpete</who>
    <bug_when>2006-04-14 17:12:14 -0700</bug_when>
    <thetext>This bug also happens for document.scripts</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39320</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2006-04-15 02:30:24 -0700</bug_when>
    <thetext>Although this bug has been filed earlier, bug 8131 shows more progress towards being fixed, so I&apos;m closing this one as a duplicate.

*** This bug has been marked as a duplicate of 8131 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>7254</attachid>
            <date>2006-03-23 11:14:00 -0800</date>
            <delta_ts>2006-03-23 11:14:00 -0800</delta_ts>
            <desc>Testcase for document.styleSheets</desc>
            <filename>toString bug.html</filename>
            <type>text/html</type>
            <size>535</size>
            <attacher name="Peter Flynn">ytpete</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMC8vRU4iPg0KPGh0bWw+
PGhlYWQ+DQo8c3R5bGU+ZGl2IHsgY29sb3I6IHJlZDsgfTwvc3R5bGU+DQo8L2hlYWQ+DQoNCjxi
b2R5Pg0KDQo8YnV0dG9uIG9uY2xpY2s9J2FsZXJ0KGRvY3VtZW50LnN0eWxlU2hlZXRzKTsnPmFs
ZXJ0KGRvY3VtZW50LnN0eWxlU2hlZXRzKTs8L2J1dHRvbj48YnI+DQo8YnV0dG9uIG9uY2xpY2s9
J2FsZXJ0KCIiK2RvY3VtZW50LnN0eWxlU2hlZXRzKTsnPmFsZXJ0KCIiK2RvY3VtZW50LnN0eWxl
U2hlZXRzKTs8L2J1dHRvbj48YnI+DQo8YnV0dG9uIG9uY2xpY2s9J2FsZXJ0KGRvY3VtZW50LnN0
eWxlU2hlZXRzLnRvU3RyaW5nKCkpOyc+YWxlcnQoZG9jdW1lbnQuc3R5bGVTaGVldHMudG9TdHJp
bmcoKSk7PC9idXR0b24+DQoNCjxicj48YnI+DQoNCkV4cGVjdGVkIGJlaGF2aW9yIGlzIGZvciBh
bGwgdGhyZWUgYWxlcnRzIHRvIHNheToNCjxwcmU+W29iamVjdCBTdHlsZVNoZWV0TGlzdF08L3By
ZT4NCg0KPC9ib2R5Pg0KPC9odG1sPg==
</data>

          </attachment>
      

    </bug>

</bugzilla>