Bug 96489

Summary: Dynamically switching background-size doesn't work correctly
Product: WebKit Reporter: laurent.mary.44
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WORKSFORME    
Severity: Normal CC: mitz, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Unspecified   
URL: http://jsfiddle.net/B3dks/4/

laurent.mary.44
Reported 2012-09-12 02:56:55 PDT
The javascript implementation of the background-size property for the values "cover" and "contain" is inverted with the CSS rendering. - Css3 background-size:cover gives the same result that javascript document.getElementById("test").style.backgroundSize = "contain"; - Css3 background-size:contain gives the same result that javascript document.getElementById("test").style.backgroundSize = "cover";
Attachments
Simon Fraser (smfr)
Comment 1 2012-09-12 14:38:31 PDT
Your JS is wrong in the fiddle: document.getElementById(divJS).style.backgroundSize = "cover"; should be document.getElementById('divJS').style.backgroundSize = "cover";
Note You need to log in before you can comment on or make changes to this bug.