Bug 6619 - Affects delta.com: getting and setting cssText property not supported for rules (only style decls)
Summary: Affects delta.com: getting and setting cssText property not supported for rul...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL: http://www.delta.com/
Keywords: InRadar
Depends on: 6653
Blocks:
  Show dependency treegraph
 
Reported: 2006-01-17 14:55 PST by Geoffrey Garen
Modified: 2006-06-28 13:15 PDT (History)
1 user (show)

See Also:


Attachments
Reduction. (2.80 KB, text/html)
2006-01-17 14:55 PST, Geoffrey Garen
no flags Details
Better reduction (688 bytes, text/html)
2006-01-18 13:39 PST, Anders Carlsson
no flags Details
Yet another reduction (375 bytes, text/html)
2006-03-03 11:29 PST, Beth Dakin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Geoffrey Garen 2006-01-17 14:55:22 PST
This bug is also in Radar as <rdar://3486985>

Getting and setting cssText does not work with rules, even though I recently made it work for style 
declarations. I don't have a test case for this yet, but am filing the bug to remind myself.

-------------------------------------------

<GMT02-Aug-2005 00:15:03GMT> Beth Dakin:
<rdar://problem/4199876> indicates a problem with the rendering of http://www.delta.com

The problem appears to be that they try to set cssText. It is failing at the following line in one of the 
Javascript files:

if(document.styleSheets[i].cssRules[j].cssText.indexOf("img") != -1)

And consequently does not trim the repeated images. I have attached a reduction of delta.com....it can 
probably be reduced more, but this is clear enough to see the problem. I added two alert boxes 
too...only one will appear in Safari because it aborts the Javascript before the second. They will both 
appear -- twice, in fact -- in Firefox.
Comment 1 Geoffrey Garen 2006-01-17 14:55:40 PST
Created attachment 5743 [details]
Reduction.
Comment 2 Anders Carlsson 2006-01-18 13:38:05 PST
The cssText problem is not visible in ToT. However, sometimes getting CSS shorthand properties doesn't 
work. I've attached a fix for that in #6653

This does not fix the rendering issue though. I've come up with a reduction that fails to render correctly in 
Firefox and Safari but works in WinIE.
Comment 3 Anders Carlsson 2006-01-18 13:39:47 PST
Created attachment 5762 [details]
Better reduction
Comment 4 Beth Dakin 2006-03-03 11:29:53 PST
Created attachment 6829 [details]
Yet another reduction

Here is a slightly simpler reduction. WinIE ignores the 6 pixels on padding and pink div cuts off right at the bottom of the image. Safari and Firefox honor the padding. I am not sure why WinIE knows to ignore it. Also, if you make a simple adjustment, like remove the font-size style in the css, then WinIE honors the padding too, and the pink div sticks out the bottom. Crazay!
Comment 5 Maciej Stachowiak 2006-03-14 16:07:38 PST
Closing, since the site has changed to not longer have this bug, and we don't want to make a change to work with the old site, because that would require breaking the CSS box model.
Comment 6 Alice Liu 2006-06-28 12:59:05 PDT
removing hitlist keyword
Comment 7 Alice Liu 2006-06-28 13:15:43 PDT
whoops, putting it back for tracking purposes.