Bug 52259

Summary: [CSS Gradients] One color stop should not paint anything for linear-gradient
Product: WebKit Reporter: Rafał Chłodnicki <rchl2k>
Component: CSSAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows 7   
Attachments:
Description Flags
Patch eric: review+

Rafał Chłodnicki
Reported 2011-01-11 15:56:07 PST
Spec http://dev.w3.org/csswg/css3-images/#linear-gradients specifies syntax as: <linear-gradient> = linear-gradient( [ [ [top | bottom] || [left | right] ] || <angle> ,]? <color-stop>[, <color-stop>]+ ); which means there must be at least 2 color stops. I assume one shouldn't cause rule to be ignored. Currently it works in webkit.
Attachments
Patch (271.30 KB, patch)
2011-01-11 21:55 PST, Simon Fraser (smfr)
eric: review+
Rafał Chłodnicki
Comment 1 2011-01-11 15:57:16 PST
> I assume one shouldn't cause rule to be ignored ..should..
Simon Fraser (smfr)
Comment 2 2011-01-11 16:10:38 PST
Right you are.
Simon Fraser (smfr)
Comment 3 2011-01-11 21:55:19 PST
Eric Seidel (no email)
Comment 4 2011-01-11 23:00:34 PST
Comment on attachment 78652 [details] Patch I guess this was a recent change to teh CSS spec?
Rafał Chłodnicki
Comment 5 2011-01-12 01:44:24 PST
Not really. Previously color stops were specified like that (from memory): <color-stop>, <color-stop>[, <color-stop>]* Which meant pretty much the same.
Simon Fraser (smfr)
Comment 6 2011-01-12 09:11:18 PST
Note You need to log in before you can comment on or make changes to this bug.