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

Unified Diff: Source/devtools/front_end/AuditRules.js

Issue 206313004: DevTools: Rename WebInspector.DOMAgent into WebInspector.DOMModel (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master Created 6 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 | « Source/devtools/devtools.gypi ('k') | Source/devtools/front_end/CSSStyleModel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/AuditRules.js
diff --git a/Source/devtools/front_end/AuditRules.js b/Source/devtools/front_end/AuditRules.js
index 3dcdf3e6d6b009e442167589e11cae046acfa273..64d629d7316e796a465a905788b0b9c7cd71d28d 100644
--- a/Source/devtools/front_end/AuditRules.js
+++ b/Source/devtools/front_end/AuditRules.js
@@ -458,11 +458,11 @@ WebInspector.AuditRules.UnusedCssRule.prototype = {
if (progress.isCanceled())
return;
var effectiveSelector = selectors[i].replace(pseudoSelectorRegexp, "");
- WebInspector.domAgent.querySelector(document.id, effectiveSelector, queryCallback.bind(null, i === selectors.length - 1 ? selectorsCallback.bind(null, styleSheets) : null, selectors[i]));
+ WebInspector.domModel.querySelector(document.id, effectiveSelector, queryCallback.bind(null, i === selectors.length - 1 ? selectorsCallback.bind(null, styleSheets) : null, selectors[i]));
}
}
- WebInspector.domAgent.requestDocument(documentLoaded.bind(null, selectors));
+ WebInspector.domModel.requestDocument(documentLoaded.bind(null, selectors));
}
var styleSheetInfos = WebInspector.cssModel.allStyleSheets();
@@ -885,7 +885,7 @@ WebInspector.AuditRules.ImageDimensionsRule.prototype = {
if (progress.isCanceled())
return;
- const node = WebInspector.domAgent.nodeForId(imageId);
+ const node = WebInspector.domModel.nodeForId(imageId);
var src = node.getAttribute("src");
if (!src.asParsedURL()) {
for (var frameOwnerCandidate = node; frameOwnerCandidate; frameOwnerCandidate = frameOwnerCandidate.parentNode) {
@@ -971,12 +971,12 @@ WebInspector.AuditRules.ImageDimensionsRule.prototype = {
{
if (progress.isCanceled())
return;
- WebInspector.domAgent.querySelectorAll(root.id, "img[src]", getStyles);
+ WebInspector.domModel.querySelectorAll(root.id, "img[src]", getStyles);
}
if (progress.isCanceled())
return;
- WebInspector.domAgent.requestDocument(onDocumentAvailable);
+ WebInspector.domModel.requestDocument(onDocumentAvailable);
},
__proto__: WebInspector.AuditRule.prototype
@@ -1041,7 +1041,7 @@ WebInspector.AuditRules.CssInHeadRule.prototype = {
var urlToViolationsArray = {};
var externalStylesheetHrefs = [];
for (var j = 0; j < externalStylesheetNodeIds.length; ++j) {
- var linkNode = WebInspector.domAgent.nodeForId(externalStylesheetNodeIds[j]);
+ var linkNode = WebInspector.domModel.nodeForId(externalStylesheetNodeIds[j]);
var completeHref = WebInspector.ParsedURL.completeURL(linkNode.ownerDocument.baseURL, linkNode.getAttribute("href"));
externalStylesheetHrefs.push(completeHref || "<empty>");
}
@@ -1061,7 +1061,7 @@ WebInspector.AuditRules.CssInHeadRule.prototype = {
if (!nodeIds)
return;
- WebInspector.domAgent.querySelectorAll(root.id, "body link[rel~='stylesheet'][href]", externalStylesheetsReceived.bind(null, root, nodeIds));
+ WebInspector.domModel.querySelectorAll(root.id, "body link[rel~='stylesheet'][href]", externalStylesheetsReceived.bind(null, root, nodeIds));
}
function onDocumentAvailable(root)
@@ -1069,10 +1069,10 @@ WebInspector.AuditRules.CssInHeadRule.prototype = {
if (progress.isCanceled())
return;
- WebInspector.domAgent.querySelectorAll(root.id, "body style", inlineStylesReceived.bind(null, root));
+ WebInspector.domModel.querySelectorAll(root.id, "body style", inlineStylesReceived.bind(null, root));
}
- WebInspector.domAgent.requestDocument(onDocumentAvailable);
+ WebInspector.domModel.requestDocument(onDocumentAvailable);
},
__proto__: WebInspector.AuditRule.prototype
@@ -1137,7 +1137,7 @@ WebInspector.AuditRules.StylesScriptsOrderRule.prototype = {
if (lateStyleIds.length || cssBeforeInlineCount) {
var lateStyleUrls = [];
for (var i = 0; i < lateStyleIds.length; ++i) {
- var lateStyleNode = WebInspector.domAgent.nodeForId(lateStyleIds[i]);
+ var lateStyleNode = WebInspector.domModel.nodeForId(lateStyleIds[i]);
var completeHref = WebInspector.ParsedURL.completeURL(lateStyleNode.ownerDocument.baseURL, lateStyleNode.getAttribute("href"));
lateStyleUrls.push(completeHref || "<empty>");
}
@@ -1159,7 +1159,7 @@ WebInspector.AuditRules.StylesScriptsOrderRule.prototype = {
if (!nodeIds)
return;
- WebInspector.domAgent.querySelectorAll(root.id, "head link[rel~='stylesheet'][href] ~ script:not([src])", cssBeforeInlineReceived.bind(null, nodeIds));
+ WebInspector.domModel.querySelectorAll(root.id, "head link[rel~='stylesheet'][href] ~ script:not([src])", cssBeforeInlineReceived.bind(null, nodeIds));
}
/**
@@ -1170,10 +1170,10 @@ WebInspector.AuditRules.StylesScriptsOrderRule.prototype = {
if (progress.isCanceled())
return;
- WebInspector.domAgent.querySelectorAll(root.id, "head script[src] ~ link[rel~='stylesheet'][href]", lateStylesReceived.bind(null, root));
+ WebInspector.domModel.querySelectorAll(root.id, "head script[src] ~ link[rel~='stylesheet'][href]", lateStylesReceived.bind(null, root));
}
- WebInspector.domAgent.requestDocument(onDocumentAvailable);
+ WebInspector.domModel.requestDocument(onDocumentAvailable);
},
__proto__: WebInspector.AuditRule.prototype
« no previous file with comments | « Source/devtools/devtools.gypi ('k') | Source/devtools/front_end/CSSStyleModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698