Bug 141059

Summary: When no background-size is specified on the 2nd background layer, it takes the first instead of the initial value
Product: WebKit Reporter: Lea Verou <lea>
Component: CSSAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, dino, kling, koivisto, sam, simon.fraser, zalan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
URL: http://result.dabblet.com/gist/850c60bf3fda1e5380f2
Attachments:
Description Flags
Patch none

Description Lea Verou 2015-01-29 16:30:25 PST
Check testcase.

Testcase works everywhere else, fails on WebKit nightlies (as well as Safari, Mobile Safari etc).
Comment 1 Chris Dumez 2015-01-29 19:30:08 PST
(In reply to comment #0)
> Check testcase.
> 
> Testcase works everywhere else, fails on WebKit nightlies (as well as
> Safari, Mobile Safari etc).

Thanks for the bug report and the test case. I am looking into it now.
Comment 2 Chris Dumez 2015-01-29 21:43:22 PST
Created attachment 245693 [details]
Patch
Comment 3 Antti Koivisto 2015-01-30 07:04:51 PST
Comment on attachment 245693 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=245693&action=review

> LayoutTests/fast/css/background-layers-initial-size.html:22
> +// The second layer should have "auto" as background size as it is its initial value.
> +shouldBeEqualToString("computedBackgroundSize", "25px 25px, auto");

Doesn't window.getComputedStyle generally try to resolve auto values and not return them as 'auto'?
Comment 4 Antti Koivisto 2015-01-30 07:05:46 PST
What does Firefox return here?
Comment 5 Chris Dumez 2015-01-30 09:34:58 PST
(In reply to comment #4)
> What does Firefox return here?

Firefox shows "25px 25px, auto auto". Chrome shows "25px 25px, auto".
Comment 6 Chris Dumez 2015-01-30 09:50:02 PST
(In reply to comment #5)
> (In reply to comment #4)
> > What does Firefox return here?
> 
> Firefox shows "25px 25px, auto auto". Chrome shows "25px 25px, auto".

Our previous output was "25px 25px, 25px 25px", which was obviously bad.
Comment 7 Antti Koivisto 2015-01-30 11:46:05 PST
Comment on attachment 245693 [details]
Patch

ok
Comment 8 Chris Dumez 2015-01-30 14:54:29 PST
Comment on attachment 245693 [details]
Patch

Clearing flags on attachment: 245693

Committed r179413: <http://trac.webkit.org/changeset/179413>
Comment 9 Chris Dumez 2015-01-30 14:54:35 PST
All reviewed patches have been landed.  Closing bug.
Comment 10 Lea Verou 2015-01-30 14:59:33 PST
Impressive. Reported and fixed in less than 24 hours!! Thanks everyone!