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

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

Issue 1774773003: DevTools: Remove vendor-prefixed css rule audit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: restore whitespace in test Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/audits/AuditCategories.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/audits/AuditRules.js
diff --git a/third_party/WebKit/Source/devtools/front_end/audits/AuditRules.js b/third_party/WebKit/Source/devtools/front_end/audits/AuditRules.js
index 6824758c24d01204b1472891c73d535d3ef4428d..4b9104dd2b36db1b7bc3001327f46e82d2b49f13 100644
--- a/third_party/WebKit/Source/devtools/front_end/audits/AuditRules.js
+++ b/third_party/WebKit/Source/devtools/front_end/audits/AuditRules.js
@@ -1353,76 +1353,6 @@ WebInspector.AuditRules.CSSRuleBase.prototype = {
/**
* @constructor
- * @extends {WebInspector.AuditRules.CSSRuleBase}
- */
-WebInspector.AuditRules.VendorPrefixedCSSProperties = function()
-{
- WebInspector.AuditRules.CSSRuleBase.call(this, "page-vendorprefixedcss", WebInspector.UIString("Use normal CSS property names instead of vendor-prefixed ones"));
- this._webkitPrefix = "-webkit-";
-}
-
-WebInspector.AuditRules.VendorPrefixedCSSProperties.supportedProperties = [
- "background-clip", "background-origin", "background-size",
- "border-radius", "border-bottom-left-radius", "border-bottom-right-radius", "border-top-left-radius", "border-top-right-radius",
- "box-shadow", "box-sizing", "opacity", "text-shadow"
-].keySet();
-
-WebInspector.AuditRules.VendorPrefixedCSSProperties.prototype = {
- /**
- * @override
- * @param {!WebInspector.AuditRules.ParsedStyleSheet} styleSheet
- */
- didVisitStyleSheet: function(styleSheet)
- {
- delete this._styleSheetResult;
- },
-
- /**
- * @override
- */
- visitRule: function()
- {
- this._mentionedProperties = {};
- },
-
- didVisitRule: function()
- {
- delete this._ruleResult;
- delete this._mentionedProperties;
- },
-
- /**
- * @override
- * @param {!WebInspector.AuditRules.ParsedStyleSheet} styleSheet
- * @param {!WebInspector.CSSParser.StyleRule} rule
- * @param {!WebInspector.CSSParser.Property} property
- * @param {!WebInspector.AuditRuleResult} result
- */
- visitProperty: function(styleSheet, rule, property, result)
- {
- if (!property.name.startsWith(this._webkitPrefix))
- return;
-
- var normalPropertyName = property.name.substring(this._webkitPrefix.length).toLowerCase(); // Start just after the "-webkit-" prefix.
- if (WebInspector.AuditRules.VendorPrefixedCSSProperties.supportedProperties[normalPropertyName] && !this._mentionedProperties[normalPropertyName]) {
- this._mentionedProperties[normalPropertyName] = true;
- if (!this._styleSheetResult)
- this._styleSheetResult = result.addChild(styleSheet.sourceURL ? WebInspector.linkifyResourceAsNode(styleSheet.sourceURL) : WebInspector.UIString("<unknown>"));
- if (!this._ruleResult) {
- var anchor = WebInspector.linkifyURLAsNode(styleSheet.sourceURL, rule.selectorText);
- anchor.lineNumber = rule.lineNumber;
- this._ruleResult = this._styleSheetResult.addChild(anchor);
- }
- ++result.violationCount;
- this._ruleResult.addSnippet(WebInspector.UIString("\"%s%s\" is used, but \"%s\" is supported.", this._webkitPrefix, normalPropertyName, normalPropertyName));
- }
- },
-
- __proto__: WebInspector.AuditRules.CSSRuleBase.prototype
-}
-
-/**
- * @constructor
* @extends {WebInspector.AuditRule}
*/
WebInspector.AuditRules.CookieRuleBase = function(id, name)
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/audits/AuditCategories.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698