Bug 8872
Summary: | WebFX ajax list manipulator broken | ||
---|---|---|---|
Product: | WebKit | Reporter: | tim bates <timothy.c.bates> |
Component: | Evangelism | Assignee: | 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
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
mitz
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
(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
(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
(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)
(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)
It would be interesting to know what MSIE 6/7 returns for 'document.styleSheets[n].href' in this case as well.
David Kilzer (:ddkilzer)
Sent a mail message to Emil & Erik regarding this issue: http://webfx.eae.net/contact.html
Emil A Eklund
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)
(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