https://bugs.webkit.org/show_bug.cgi?id=132083
Reviewed by Timothy Hatcher.
Only assume we're parsing a legacy-formatted gradient if the first parameter is not a color.
* UserInterface/Models/Gradient.js:
(WebInspector.LinearGradient.linearGradientWithComponents):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167756
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2014-04-24 Antoine Quint <graouts@webkit.org>
+
+ Web Inspector: gradient editor does not appear for linear-gradient with no specified angle
+ https://bugs.webkit.org/show_bug.cgi?id=132083
+
+ Reviewed by Timothy Hatcher.
+
+ Only assume we're parsing a legacy-formatted gradient if the first parameter is not a color.
+
+ * UserInterface/Models/Gradient.js:
+ (WebInspector.LinearGradient.linearGradientWithComponents):
+
2014-04-22 Brent Fulgham <bfulgham@apple.com>
[Win] Support Python 2.7 in Cygwin
return null;
}
components.shift();
- } else {
- // We don't support any of the legacy linear gradient formats.
+ } else if (components[0].length !== 1 && !WebInspector.Color.fromString(components[0][0])) {
+ // If the first component is not a color, then we're dealing with a
+ // legacy linear gradient format that we don't support.
return null;
}