Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui_lazy/PieChart.js

Issue 1907263002: DevTools: Fix all outstanding JavaScript style issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove yoda disable. fix throw parens Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/ui_lazy/DataGrid.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 var svg = this._createSVGChild(root, "svg"); 42 var svg = this._createSVGChild(root, "svg");
43 this._group = this._createSVGChild(svg, "g"); 43 this._group = this._createSVGChild(svg, "g");
44 var background = this._createSVGChild(this._group, "circle"); 44 var background = this._createSVGChild(this._group, "circle");
45 background.setAttribute("r", 1.01); 45 background.setAttribute("r", 1.01);
46 background.setAttribute("fill", "hsl(0, 0%, 90%)"); 46 background.setAttribute("fill", "hsl(0, 0%, 90%)");
47 this._foregroundElement = root.createChild("div", "pie-chart-foreground"); 47 this._foregroundElement = root.createChild("div", "pie-chart-foreground");
48 if (showTotal) 48 if (showTotal)
49 this._totalElement = this._foregroundElement.createChild("div", "pie-cha rt-total"); 49 this._totalElement = this._foregroundElement.createChild("div", "pie-cha rt-total");
50 this._formatter = formatter; 50 this._formatter = formatter;
51 this._slices = []; 51 this._slices = [];
52 this._lastAngle = -Math.PI/2; 52 this._lastAngle = -Math.PI / 2;
53 this._setSize(size); 53 this._setSize(size);
54 } 54 }
55 55
56 WebInspector.PieChart.prototype = { 56 WebInspector.PieChart.prototype = {
57 /** 57 /**
58 * @param {number} totalValue 58 * @param {number} totalValue
59 */ 59 */
60 setTotal: function(totalValue) 60 setTotal: function(totalValue)
61 { 61 {
62 for (var i = 0; i < this._slices.length; ++i) 62 for (var i = 0; i < this._slices.length; ++i)
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 * @param {string} childType 110 * @param {string} childType
111 * @return {!Element} 111 * @return {!Element}
112 */ 112 */
113 _createSVGChild: function(parent, childType) 113 _createSVGChild: function(parent, childType)
114 { 114 {
115 var child = parent.ownerDocument.createElementNS("http://www.w3.org/2000 /svg", childType); 115 var child = parent.ownerDocument.createElementNS("http://www.w3.org/2000 /svg", childType);
116 parent.appendChild(child); 116 parent.appendChild(child);
117 return child; 117 return child;
118 } 118 }
119 } 119 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/ui_lazy/DataGrid.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698