Bug 132083

Summary: Web Inspector: gradient editor does not appear for linear-gradient with no specified angle
Product: WebKit Reporter: Bear Travis <betravis>
Component: Web InspectorAssignee: Antoine Quint <graouts>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, graouts, joepeck, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Reduced testcase.
none
Patch none

Description Bear Travis 2014-04-23 15:20:58 PDT
Some gradients do not appear to trigger the new gradient editor.

I used styles.css:
.float {
    background: linear-gradient(green, blue);
}

and test.html:
<!doctype html>
<html>
<head>
<link href='styles.css' rel='stylesheet'>
<style>
.float {
    width: 200px;
    height: 200px;
    float: left;
}
</style>
</head>
<body>
<div class='float'></div>
</div>
</body>
</html>

Changing the gradient to linear-gradient(0deg, green, blue) did work.
Comment 1 Radar WebKit Bug Importer 2014-04-23 15:21:31 PDT
<rdar://problem/16705257>
Comment 2 Antoine Quint 2014-04-24 01:05:20 PDT
Created attachment 230062 [details]
Reduced testcase.
Comment 3 Antoine Quint 2014-04-24 01:43:48 PDT
WebInspector.LinearGradient.linearGradientWithComponents() is being called with components = [["green"], ["blue"]] and hits the following branch:

        // We don't support any of the legacy linear gradient formats.
        return null;

… which was added in http://trac.webkit.org/changeset/165017 to fix https://bugs.webkit.org/show_bug.cgi?id=129623.
Comment 4 Antoine Quint 2014-04-24 01:57:31 PDT
Created attachment 230065 [details]
Patch
Comment 5 WebKit Commit Bot 2014-04-24 07:37:46 PDT
Comment on attachment 230065 [details]
Patch

Clearing flags on attachment: 230065

Committed r167756: <http://trac.webkit.org/changeset/167756>
Comment 6 WebKit Commit Bot 2014-04-24 07:37:49 PDT
All reviewed patches have been landed.  Closing bug.