Bug 57946
| Summary: | getComputedStyle() doesn't support CSS3 multiple backgrounds | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | André Dion <andredion> |
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | Normal | CC: | eae |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Mac | ||
| OS: | OS X 10.6 | ||
André Dion
If a given element has multiple background applied, getComputedStyle() will only return the first value.
E.g.,
#test {
background-image: url('test1.png'), url('test2.png');
background-repeat: no-repeat, repeat-x;
background-position: 0 0, 100px 100px;
-webkit-background-size: 10px, 100px;
}
------
var cs = window.getComputedStyle(document.getElementById('test'));
cs.backgroundImage; // url('test1.png')
cs.backgroundRepeat; // no-repeat
cs.backgroundPosition; // 0px 0px
cs.WebkitBackgroundSize; // 10px
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Emil A Eklund
This appears to have been fixed in tip of tree,
cs.backgroundImage; // url(test1.png), url(test2.png)