Bug 52259 - [CSS Gradients] One color stop should not paint anything for linear-gradient
Summary: [CSS Gradients] One color stop should not paint anything for linear-gradient
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows 7
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-11 15:56 PST by Rafał Chłodnicki
Modified: 2011-01-12 09:11 PST (History)
1 user (show)

See Also:


Attachments
Patch (271.30 KB, patch)
2011-01-11 21:55 PST, Simon Fraser (smfr)
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rafał Chłodnicki 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.
Comment 1 Rafał Chłodnicki 2011-01-11 15:57:16 PST
> I assume one shouldn't cause rule to be ignored

..should..
Comment 2 Simon Fraser (smfr) 2011-01-11 16:10:38 PST
Right you are.
Comment 3 Simon Fraser (smfr) 2011-01-11 21:55:19 PST
Created attachment 78652 [details]
Patch
Comment 4 Eric Seidel (no email) 2011-01-11 23:00:34 PST
Comment on attachment 78652 [details]
Patch

I guess this was a recent change to teh CSS spec?
Comment 5 Rafał Chłodnicki 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.
Comment 6 Simon Fraser (smfr) 2011-01-12 09:11:18 PST
http://trac.webkit.org/changeset/75615