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

Unified Diff: third_party/WebKit/Source/devtools/front_end/audits/AuditCategories.js

Issue 2466123002: DevTools: reformat front-end code to match chromium style. (Closed)
Patch Set: all done Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/audits/AuditCategories.js
diff --git a/third_party/WebKit/Source/devtools/front_end/audits/AuditCategories.js b/third_party/WebKit/Source/devtools/front_end/audits/AuditCategories.js
index 1b890ec4f1607792c8607dc7cf24792e81f37cb3..8f8681821fb91185b1174a2a7d92502390b9e590 100644
--- a/third_party/WebKit/Source/devtools/front_end/audits/AuditCategories.js
+++ b/third_party/WebKit/Source/devtools/front_end/audits/AuditCategories.js
@@ -27,51 +27,43 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
/**
- * @constructor
- * @extends {WebInspector.AuditCategoryImpl}
+ * @unrestricted
*/
-WebInspector.AuditCategories.PagePerformance = function() {
- WebInspector.AuditCategoryImpl.call(this, WebInspector.AuditCategories.PagePerformance.AuditCategoryName);
-};
-
-WebInspector.AuditCategories.PagePerformance.AuditCategoryName = WebInspector.UIString("Web Page Performance");
+WebInspector.AuditCategories.PagePerformance = class extends WebInspector.AuditCategoryImpl {
+ constructor() {
+ super(WebInspector.AuditCategories.PagePerformance.AuditCategoryName);
+ }
-WebInspector.AuditCategories.PagePerformance.prototype = {
- initialize: function()
- {
- this.addRule(new WebInspector.AuditRules.UnusedCssRule(), WebInspector.AuditRule.Severity.Warning);
- this.addRule(new WebInspector.AuditRules.CssInHeadRule(), WebInspector.AuditRule.Severity.Severe);
- this.addRule(new WebInspector.AuditRules.StylesScriptsOrderRule(), WebInspector.AuditRule.Severity.Severe);
- },
-
- __proto__: WebInspector.AuditCategoryImpl.prototype
+ initialize() {
+ this.addRule(new WebInspector.AuditRules.UnusedCssRule(), WebInspector.AuditRule.Severity.Warning);
+ this.addRule(new WebInspector.AuditRules.CssInHeadRule(), WebInspector.AuditRule.Severity.Severe);
+ this.addRule(new WebInspector.AuditRules.StylesScriptsOrderRule(), WebInspector.AuditRule.Severity.Severe);
+ }
};
+WebInspector.AuditCategories.PagePerformance.AuditCategoryName = WebInspector.UIString('Web Page Performance');
+
/**
- * @constructor
- * @extends {WebInspector.AuditCategoryImpl}
+ * @unrestricted
*/
-WebInspector.AuditCategories.NetworkUtilization = function() {
- WebInspector.AuditCategoryImpl.call(this, WebInspector.AuditCategories.NetworkUtilization.AuditCategoryName);
-};
-
-WebInspector.AuditCategories.NetworkUtilization.AuditCategoryName = WebInspector.UIString("Network Utilization");
+WebInspector.AuditCategories.NetworkUtilization = class extends WebInspector.AuditCategoryImpl {
+ constructor() {
+ super(WebInspector.AuditCategories.NetworkUtilization.AuditCategoryName);
+ }
-WebInspector.AuditCategories.NetworkUtilization.prototype = {
- initialize: function()
- {
- this.addRule(new WebInspector.AuditRules.GzipRule(), WebInspector.AuditRule.Severity.Severe);
- this.addRule(new WebInspector.AuditRules.ImageDimensionsRule(), WebInspector.AuditRule.Severity.Warning);
- this.addRule(new WebInspector.AuditRules.CookieSizeRule(400), WebInspector.AuditRule.Severity.Warning);
- this.addRule(new WebInspector.AuditRules.StaticCookielessRule(5), WebInspector.AuditRule.Severity.Warning);
- this.addRule(new WebInspector.AuditRules.CombineJsResourcesRule(2), WebInspector.AuditRule.Severity.Severe);
- this.addRule(new WebInspector.AuditRules.CombineCssResourcesRule(2), WebInspector.AuditRule.Severity.Severe);
- this.addRule(new WebInspector.AuditRules.MinimizeDnsLookupsRule(4), WebInspector.AuditRule.Severity.Warning);
- this.addRule(new WebInspector.AuditRules.ParallelizeDownloadRule(4, 10, 0.5), WebInspector.AuditRule.Severity.Warning);
- this.addRule(new WebInspector.AuditRules.BrowserCacheControlRule(), WebInspector.AuditRule.Severity.Severe);
- },
-
- __proto__: WebInspector.AuditCategoryImpl.prototype
+ initialize() {
+ this.addRule(new WebInspector.AuditRules.GzipRule(), WebInspector.AuditRule.Severity.Severe);
+ this.addRule(new WebInspector.AuditRules.ImageDimensionsRule(), WebInspector.AuditRule.Severity.Warning);
+ this.addRule(new WebInspector.AuditRules.CookieSizeRule(400), WebInspector.AuditRule.Severity.Warning);
+ this.addRule(new WebInspector.AuditRules.StaticCookielessRule(5), WebInspector.AuditRule.Severity.Warning);
+ this.addRule(new WebInspector.AuditRules.CombineJsResourcesRule(2), WebInspector.AuditRule.Severity.Severe);
+ this.addRule(new WebInspector.AuditRules.CombineCssResourcesRule(2), WebInspector.AuditRule.Severity.Severe);
+ this.addRule(new WebInspector.AuditRules.MinimizeDnsLookupsRule(4), WebInspector.AuditRule.Severity.Warning);
+ this.addRule(
+ new WebInspector.AuditRules.ParallelizeDownloadRule(4, 10, 0.5), WebInspector.AuditRule.Severity.Warning);
+ this.addRule(new WebInspector.AuditRules.BrowserCacheControlRule(), WebInspector.AuditRule.Severity.Severe);
+ }
};
+
+WebInspector.AuditCategories.NetworkUtilization.AuditCategoryName = WebInspector.UIString('Network Utilization');

Powered by Google App Engine
This is Rietveld 408576698