Title: [165017] trunk/Source/WebInspectorUI
- Revision
- 165017
- Author
- timo...@apple.com
- Date
- 2014-03-03 16:08:37 -0800 (Mon, 03 Mar 2014)
Log Message
Don't try to parse legacy CSS gradients -- we don't support them.
https://bugs.webkit.org/show_bug.cgi?id=129623
Reviewed by Joseph Pecoraro.
* UserInterface/Models/Gradient.js:
(WebInspector.Gradient.stopsWithComponents): Fix a possible exception on malformed stops.
(WebInspector.LinearGradient.linearGradientWithComponents): Return early for legacy gradients.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (165016 => 165017)
--- trunk/Source/WebInspectorUI/ChangeLog 2014-03-03 23:49:27 UTC (rev 165016)
+++ trunk/Source/WebInspectorUI/ChangeLog 2014-03-04 00:08:37 UTC (rev 165017)
@@ -1,5 +1,17 @@
2014-03-03 Timothy Hatcher <timo...@apple.com>
+ Don't try to parse legacy CSS gradients -- we don't support them.
+
+ https://bugs.webkit.org/show_bug.cgi?id=129623
+
+ Reviewed by Joseph Pecoraro.
+
+ * UserInterface/Models/Gradient.js:
+ (WebInspector.Gradient.stopsWithComponents): Fix a possible exception on malformed stops.
+ (WebInspector.LinearGradient.linearGradientWithComponents): Return early for legacy gradients.
+
+2014-03-03 Timothy Hatcher <timo...@apple.com>
+
Remove an innocuous error message and support default views for Resource and Debugger sidebars.
https://bugs.webkit.org/show_bug.cgi?id=129622
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/Gradient.js (165016 => 165017)
--- trunk/Source/WebInspectorUI/UserInterface/Models/Gradient.js 2014-03-03 23:49:27 UTC (rev 165016)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/Gradient.js 2014-03-04 00:08:37 UTC (rev 165017)
@@ -117,6 +117,12 @@
for (var i = 0, count = stops.length; i < count; ++i) {
var stop = stops[i];
+
+ // If one of the stops failed to parse, then this is not a valid
+ // set of components for a gradient. So the whole thing is invalid.
+ if (!stop)
+ return null;
+
if (!stop.offset)
stop.offset = i / (count - 1);
}
@@ -182,6 +188,9 @@
return null;
}
components.shift();
+ } else {
+ // We don't support any of the legacy linear gradient formats.
+ return null;
}
var stops = WebInspector.Gradient.stopsWithComponents(components);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes