Bug 8872

Summary: WebFX ajax list manipulator broken
Product: WebKit Reporter: tim bates <timothy.c.bates>
Component: EvangelismAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: ddkilzer, eae, gavin.sharp, ian, jensimmons, mbritto, mitz
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
URL: http://webfx.eae.net/dhtml/collist/demo.html

tim bates
Reported 2006-05-12 08:07:25 PDT
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.
Attachments
mitz
Comment 1 2006-05-12 08:29:51 PDT
I don'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 <style> element is null, whereas in Firefox it is the URL of the HTML file.
mitz
Comment 2 2006-05-12 09:12:11 PDT
(In reply to comment #1) > the href property of the CSSStyleSheet corresponding to the <style> element is null, > 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 "For inline style sheets, the value of [the href] attribute is null", so current behavior is the correct one.
Maxime BRITTO
Comment 3 2007-06-04 06:40:09 PDT
(In reply to comment #0) > 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. > The problem seems to come from the second stylesheet (stylesheet[1]) declared at line 7 : <style type="text/css"> body { background: threedface; } </style> Then, when it arrives to this line : if (document.styleSheets[1].href.indexOf('columnlist.css') == -1) { continue; } it can't find any .href.indexOf('columnlist.css') for this style and return an error which stop the script.
Maxime BRITTO
Comment 4 2007-06-04 06:54:37 PDT
(In reply to comment #3) > (In reply to comment #0) > > 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. > > > > The problem seems to come from the second stylesheet (stylesheet[1]) declared > at line 7 : > <style type="text/css"> > body { background: threedface; } > </style> > > Then, when it arrives to this line : > if (document.styleSheets[1].href.indexOf('columnlist.css') == -1) { > continue; } > it can't find any .href.indexOf('columnlist.css') for this style and return an > error which stop the script. > I replaced, in the script the lines 269 and 1190 by : if (document.styleSheets[n].href != null && document.styleSheets[n].href.indexOf('columnlist.css') == -1) { continue; } Everything seems to work now.
David Kilzer (:ddkilzer)
Comment 5 2007-06-04 08:54:10 PDT
(In reply to comment #2) > 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 > "For inline style sheets, the value of [the href] attribute is null", so > current behavior is the correct one. This is an evangelism issue.
David Kilzer (:ddkilzer)
Comment 6 2007-06-04 09:57:40 PDT
It would be interesting to know what MSIE 6/7 returns for 'document.styleSheets[n].href' in this case as well.
David Kilzer (:ddkilzer)
Comment 7 2007-06-04 10:05:44 PDT
Sent a mail message to Emil & Erik regarding this issue: http://webfx.eae.net/contact.html
Emil A Eklund
Comment 8 2007-06-04 10:56:05 PDT
Thanks for bringing this to my attention. This clearly seems to be a bug in the WebFX ColumnList code rather in WebKit. I'll make the necessary changes to the script.
David Kilzer (:ddkilzer)
Comment 9 2007-11-15 14:01:09 PST
(In reply to comment #8) > Thanks for bringing this to my attention. > > This clearly seems to be a bug in the WebFX ColumnList code rather in WebKit. > > I'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
Note You need to log in before you can comment on or make changes to this bug.