<?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>8872</bug_id>
          
          <creation_ts>2006-05-12 08:07:25 -0700</creation_ts>
          <short_desc>WebFX ajax list manipulator broken</short_desc>
          <delta_ts>2020-10-23 13:31:17 -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>Evangelism</component>
          <version>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc>http://webfx.eae.net/dhtml/collist/demo.html</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="tim bates">timothy.c.bates</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ddkilzer</cc>
    
    <cc>eae</cc>
    
    <cc>gavin.sharp</cc>
    
    <cc>ian</cc>
    
    <cc>jensimmons</cc>
    
    <cc>mbritto</cc>
    
    <cc>mitz</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>42099</commentid>
    <comment_count>0</comment_count>
    <who name="tim bates">timothy.c.bates</who>
    <bug_when>2006-05-12 08:07:25 -0700</bug_when>
    <thetext>1. go to the url above
2. try and select a line in the table
EXPECT: clicking on a line selects it
OBTAINED: nothing

3. open the page in Firefox: runs as expected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42101</commentid>
    <comment_count>1</comment_count>
    <who name="">mitz</who>
    <bug_when>2006-05-12 08:29:51 -0700</bug_when>
    <thetext>I don&apos;t know if this is the only problem, but when I open the demo page in WebKit I get an error that can be traced back to the fact that the href property of the CSSStyleSheet corresponding to the &lt;style&gt; element is null, whereas in Firefox it is the URL of the HTML file.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42102</commentid>
    <comment_count>2</comment_count>
    <who name="">mitz</who>
    <bug_when>2006-05-12 09:12:11 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; the href property of the CSSStyleSheet corresponding to the &lt;style&gt; element is null,
&gt; whereas in Firefox it is the URL of the HTML file.

Changing this (in HTMLStyleElement::childrenChanged) fixes the bug (and breaks none of the tests), however, according to
http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html#StyleSheets-StyleSheet
&quot;For inline style sheets, the value of [the href] attribute is null&quot;, so current behavior is the correct one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8464</commentid>
    <comment_count>3</comment_count>
    <who name="Maxime BRITTO">mbritto</who>
    <bug_when>2007-06-04 06:40:09 -0700</bug_when>
    <thetext>(In reply to comment #0)
&gt; 1. go to the url above
&gt; 2. try and select a line in the table
&gt; EXPECT: clicking on a line selects it
&gt; OBTAINED: nothing
&gt; 
&gt; 3. open the page in Firefox: runs as expected.
&gt; 

The problem seems to come from the second stylesheet (stylesheet[1]) declared at line 7 :
&lt;style type=&quot;text/css&quot;&gt;
	body { background: threedface; }
&lt;/style&gt;

 Then, when it arrives to this line :
      if (document.styleSheets[1].href.indexOf(&apos;columnlist.css&apos;) == -1) { continue; } 
it can&apos;t find any .href.indexOf(&apos;columnlist.css&apos;) for this style and return an error which stop the script.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8465</commentid>
    <comment_count>4</comment_count>
    <who name="Maxime BRITTO">mbritto</who>
    <bug_when>2007-06-04 06:54:37 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; (In reply to comment #0)
&gt; &gt; 1. go to the url above
&gt; &gt; 2. try and select a line in the table
&gt; &gt; EXPECT: clicking on a line selects it
&gt; &gt; OBTAINED: nothing
&gt; &gt; 
&gt; &gt; 3. open the page in Firefox: runs as expected.
&gt; &gt; 
&gt; 
&gt; The problem seems to come from the second stylesheet (stylesheet[1]) declared
&gt; at line 7 :
&gt; &lt;style type=&quot;text/css&quot;&gt;
&gt;         body { background: threedface; }
&gt; &lt;/style&gt;
&gt; 
&gt;  Then, when it arrives to this line :
&gt;       if (document.styleSheets[1].href.indexOf(&apos;columnlist.css&apos;) == -1) {
&gt; continue; } 
&gt; it can&apos;t find any .href.indexOf(&apos;columnlist.css&apos;) for this style and return an
&gt; error which stop the script.
&gt; 

I replaced, in the script the lines 269 and 1190 by :
if (document.styleSheets[n].href != null &amp;&amp; document.styleSheets[n].href.indexOf(&apos;columnlist.css&apos;) == -1) { continue; }

Everything seems to work now.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8449</commentid>
    <comment_count>5</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-06-04 08:54:10 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; Changing this (in HTMLStyleElement::childrenChanged) fixes the bug (and breaks
&gt; none of the tests), however, according to
&gt; http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html#StyleSheets-StyleSheet
&gt; &quot;For inline style sheets, the value of [the href] attribute is null&quot;, so
&gt; current behavior is the correct one.

This is an evangelism issue.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8442</commentid>
    <comment_count>6</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-06-04 09:57:40 -0700</bug_when>
    <thetext>It would be interesting to know what MSIE 6/7 returns for &apos;document.styleSheets[n].href&apos; in this case as well.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8439</commentid>
    <comment_count>7</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-06-04 10:05:44 -0700</bug_when>
    <thetext>Sent a mail message to Emil &amp; Erik regarding this issue:  http://webfx.eae.net/contact.html

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8434</commentid>
    <comment_count>8</comment_count>
    <who name="Emil A Eklund">eae</who>
    <bug_when>2007-06-04 10:56:05 -0700</bug_when>
    <thetext>Thanks for bringing this to my attention.

This clearly seems to be a bug in the WebFX ColumnList code rather in WebKit.

I&apos;ll make the necessary changes to the script.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61337</commentid>
    <comment_count>9</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-11-15 14:01:09 -0800</bug_when>
    <thetext>(In reply to comment #8)
&gt; Thanks for bringing this to my attention.
&gt; 
&gt; This clearly seems to be a bug in the WebFX ColumnList code rather in WebKit.
&gt; 
&gt; I&apos;ll make the necessary changes to the script.

This example still seems to be broken.  I get a JavaScript error when loading the web page with a recent ToT WebKit build with Safari 3 Public Beta on Tiger:

TypeError: Null value
http://webfx.eae.net/dhtml/collist/includes/columnlist.js
Line: 269

</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>