Bug 65968
Summary: | Setting the content css property on img elements has unpredictable and unexpected results | ||
---|---|---|---|
Product: | WebKit | Reporter: | Jake Archibald <jaffathecake> |
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | benjamin, mathias, simon.fraser |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | http://jsfiddle.net/AAw9w/ |
Jake Archibald
The CSS3 spec allows the 'content' property on all elements (not just pseudo elements such as ::before), as far as I know this isn't supported in Webkit currently, but it appears to have some effect on img elements.
http://jsfiddle.net/AAw9w/
http://jsfiddle.net/AAw9w/show/
View those pages & hit refresh a few times. Sometimes an img is displayed, sometimes nothing. The img sometimes displayed is the one specified by the 'content' property in the css.
Setting 'content' to a string, which should be displayed instead of the image, results in no output.
Expected behaviour would be to display the img as specified in the content property of the css (ideally not downloading the original img), or ignore the rule if it's unsupported.
Tested in: Safari 5.1, Chrome 13, Chrome Canary all on OSX 10.6.8.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Uday Kiran
Seems like working fine with WebKit 537.17 (@140072) Chrome 24
Simon Fraser (smfr)
Seems to work OK now?