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

Unified Diff: Source/devtools/front_end/elements/StylesSidebarPane.js

Issue 1349293005: DevTools: slightly cleanup WI.CSSRule interface (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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
Index: Source/devtools/front_end/elements/StylesSidebarPane.js
diff --git a/Source/devtools/front_end/elements/StylesSidebarPane.js b/Source/devtools/front_end/elements/StylesSidebarPane.js
index 11bc809f476877aad95dceecc5f10341a89e7f63..be874986a1b752ff22fee3c9f03ea2777bdc5654 100644
--- a/Source/devtools/front_end/elements/StylesSidebarPane.js
+++ b/Source/devtools/front_end/elements/StylesSidebarPane.js
@@ -542,7 +542,7 @@ WebInspector.StylesSidebarPane.prototype = {
var addedAttributesStyle;
for (var i = styles.matchedCSSRules.length - 1; i >= 0; --i) {
var rule = styles.matchedCSSRules[i];
- if ((rule.isInjected || rule.isUserAgent) && !addedAttributesStyle) {
+ if ((rule.isInjected() || rule.isUserAgent()) && !addedAttributesStyle) {
// Show element's Style Attributes after all author rules.
addedAttributesStyle = true;
addAttributesStyle();
@@ -1004,7 +1004,7 @@ WebInspector.StylePropertiesSection = function(parentPane, styleRule)
if (rule) {
// Prevent editing the user agent and user rules.
- if (rule.isUserAgent || rule.isInjected) {
+ if (rule.isUserAgent() || rule.isInjected()) {
this.editable = false;
} else {
// Check this is a real CSSRule, not a bogus object coming from WebInspector.BlankStylePropertiesSection.
@@ -1709,11 +1709,11 @@ WebInspector.StylePropertiesSection.createRuleOriginNode = function(cssModel, li
if (ruleLocation && rule.styleSheetId && header && header.resourceURL())
return WebInspector.StylePropertiesSection._linkifyRuleLocation(cssModel, linkifier, rule.styleSheetId, ruleLocation);
- if (rule.isUserAgent)
+ if (rule.isUserAgent())
return createTextNode(WebInspector.UIString("user agent stylesheet"));
- if (rule.isInjected)
+ if (rule.isInjected())
return createTextNode(WebInspector.UIString("injected stylesheet"));
- if (rule.isViaInspector)
+ if (rule.isViaInspector())
return createTextNode(WebInspector.UIString("via inspector"));
if (header && header.ownerNode) {
« no previous file with comments | « LayoutTests/http/tests/inspector/modify-cross-domain-rule.html ('k') | Source/devtools/front_end/sdk/CSSStyleModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698