RESOLVED FIXED Bug 12305
REGRESSION: Images do not load in video sections on CNN.com homepage
https://bugs.webkit.org/show_bug.cgi?id=12305
Summary REGRESSION: Images do not load in video sections on CNN.com homepage
Julian Grybowski
Reported 2007-01-17 11:08:37 PST
Steps to reproduce this bug: 1. Navigate to http://www.cnn.com 2. Bring your attention to the "WATCH VIDEO" and "CNN Pipeline" spots (below the main articles, center and right when the page isn't consumed by some breaking news item). See the areas where one video article in particular is open so that a brief summary is displayed? There should be a (still) image to the right of it. You can see the outline of where the image is supposed to go in the "CNN Pipeline" box, but the image itself does not draw. These images load with no problems in Firefox. As CNN is fairly major as sites go, this should probably be taken care of as soon as possible...
Attachments
Screenshot of (proper) behavior in released Safari (2.0.4 / 419.3) (316.66 KB, image/jpeg)
2007-01-17 11:19 PST, Julian Grybowski
no flags
Screenshot of bad behavior in current Webkit nightly (r18901). Highlighted for clarity. (323.14 KB, image/jpeg)
2007-01-17 11:26 PST, Julian Grybowski
no flags
Patch v1 (5.44 KB, patch)
2007-01-17 22:42 PST, David Kilzer (:ddkilzer)
no flags
Patch v2 (4.56 KB, patch)
2007-01-18 06:11 PST, David Kilzer (:ddkilzer)
darin: review+
Julian Grybowski
Comment 1 2007-01-17 11:19:56 PST
Created attachment 12519 [details] Screenshot of (proper) behavior in released Safari (2.0.4 / 419.3) As you can see in this screenshot, the bug isn't an issue in released Safari, which makes this a regression.
Julian Grybowski
Comment 2 2007-01-17 11:26:06 PST
Created attachment 12520 [details] Screenshot of bad behavior in current Webkit nightly (r18901). Highlighted for clarity.
Julian Grybowski
Comment 3 2007-01-17 11:27:22 PST
Reflecting my discovery of the regression in the bug's title.
mitz
Comment 4 2007-01-17 11:53:57 PST
JavaScript excerpt from cnn.com: if (document.getElementById(realId).lowsrc){ document.getElementById(realId).src = document.getElementById(realId).lowsrc; } In shipping Safari any node attribute (in this case, 'lowsrc') is accessible as a JavaScript property. Not so in TOT.
mitz
Comment 5 2007-01-17 12:49:05 PST
(In reply to comment #4) > In shipping Safari any node attribute (in this case, 'lowsrc') is accessible as > a JavaScript property. Not so in TOT. > The above explains why the script works in shipping Safari and fails in TOT. In order to fix the bug it is enough to map the lowsrc attribute (even if it's not supported in WebKit).
David Kilzer (:ddkilzer)
Comment 6 2007-01-17 13:06:23 PST
Bug 11624 was filed to support the lowsrc attribute.
Mark Rowe (bdash)
Comment 7 2007-01-17 16:38:20 PST
David Kilzer (:ddkilzer)
Comment 8 2007-01-17 22:42:22 PST
Created attachment 12526 [details] Patch v1 Proposed patch.
mitz
Comment 9 2007-01-17 23:02:46 PST
Comment on attachment 12526 [details] Patch v1 + * fast/js/lowsrc-img-property.html: Added. The test should be in fast/dom/HTMLImageElement. It's a DOM test, not a JS test. The operators should go before the line breaks: + return attr->name() == srcAttr + || attr->name() == lowsrcAttr + || (attr->name() == usemapAttr && attr->value().domString()[0] != '#'); This attribute is not in the W3C spec. It should appear under "extensions".
mitz
Comment 10 2007-01-17 23:03:45 PST
(In reply to comment #9) > This attribute is not in the W3C spec. It should appear under "extensions". > This comment refers to the change to the .idl file.
David Kilzer (:ddkilzer)
Comment 11 2007-01-18 06:11:43 PST
Created attachment 12530 [details] Patch v2 Addresses issues in Comment #9.
Darin Adler
Comment 12 2007-01-18 07:44:40 PST
Comment on attachment 12530 [details] Patch v2 r=me I know this is not in our style guide, but I personally like to format continued expressions like this: return attr->name() == srcAttr || attr->name() == lowsrcAttr || (attr->name() == usemapAttr && attr->value().domString()[0] != '#'); Somehow it just looks more "orderly" to me.
Darin Adler
Comment 13 2007-01-18 07:49:12 PST
(In reply to comment #12) > I know this is not in our style guide, but I personally like to format > continued expressions like this: And it looks like Mitz mentioned this too, in comment #9.
mitz
Comment 14 2007-01-18 08:00:52 PST
(In reply to comment #13) > (In reply to comment #12) > > I know this is not in our style guide, but I personally like to format > > continued expressions like this: > > And it looks like Mitz mentioned this too, in comment #9. > Actually Dave had it "the right way" in the first patch and I suggested changing it based on what I've seen in recent patches. There should be a style guideline on this. Sorry, Dave!
Darin Adler
Comment 15 2007-01-18 08:51:43 PST
I'll land this (working on it now).
Darin Adler
Comment 16 2007-01-18 08:57:34 PST
Committed revision 18940.
David Kilzer (:ddkilzer)
Comment 17 2007-01-18 09:09:07 PST
(In reply to comment #12) > I know this is not in our style guide, but I personally like to format > continued expressions like this: > > return attr->name() == srcAttr > || attr->name() == lowsrcAttr > || (attr->name() == usemapAttr && attr->value().domString()[0] != '#'); > > Somehow it just looks more "orderly" to me. I was told that putting the operators on the left (instead of the right) makes them more visible as you're reading the code. It probably has to do with paying closer attention to the beginning of a line rather than the end of a line while reading code.
Note You need to log in before you can comment on or make changes to this bug.