Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / devtools / front_end / components / FlameChart.js
index 3425b77..1864e6a 100644 (file)
@@ -249,12 +249,14 @@ WebInspector.FlameChart.Events = {
  * @param {!{min: number, max: number, count: number}|number=} hueSpace
  * @param {!{min: number, max: number, count: number}|number=} satSpace
  * @param {!{min: number, max: number, count: number}|number=} lightnessSpace
+ * @param {!{min: number, max: number, count: number}|number=} alphaSpace
  */
-WebInspector.FlameChart.ColorGenerator = function(hueSpace, satSpace, lightnessSpace)
+WebInspector.FlameChart.ColorGenerator = function(hueSpace, satSpace, lightnessSpace, alphaSpace)
 {
     this._hueSpace = hueSpace || { min: 0, max: 360, count: 20 };
     this._satSpace = satSpace || 67;
     this._lightnessSpace = lightnessSpace || 80;
+    this._alphaSpace = alphaSpace || 1;
     this._colors = {};
 }
 
@@ -292,7 +294,8 @@ WebInspector.FlameChart.ColorGenerator.prototype = {
         var h = this._indexToValueInSpace(hash, this._hueSpace);
         var s = this._indexToValueInSpace(hash, this._satSpace);
         var l = this._indexToValueInSpace(hash, this._lightnessSpace);
-        return "hsl(" + h + ", " + s + "%, " + l + "%)";
+        var a = this._indexToValueInSpace(hash, this._alphaSpace);
+        return "hsla(" + h + ", " + s + "%, " + l + "%, " + a + ")";
     },
 
     /**
@@ -587,6 +590,8 @@ WebInspector.FlameChart.prototype = {
      */
     _onKeyDown: function(e)
     {
+        if (e.altKey || e.ctrlKey || e.metaKey)
+            return;
         var zoomMultiplier = e.shiftKey ? 0.8 : 0.3;
         var panMultiplier = e.shiftKey ? 320 : 80;
         if (e.keyCode === "A".charCodeAt(0)) {