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

Unified Diff: Source/devtools/front_end/ElementsPanel.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/front_end/DOMPresentationUtils.js ('k') | Source/devtools/front_end/ElementsTreeOutline.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/ElementsPanel.js
diff --git a/Source/devtools/front_end/ElementsPanel.js b/Source/devtools/front_end/ElementsPanel.js
index c5ba41a1cb3ab377a36feebaafc70e02cf31fc20..6ea412127647b60253eb70ba9b3ec579e0ecf47f 100644
--- a/Source/devtools/front_end/ElementsPanel.js
+++ b/Source/devtools/front_end/ElementsPanel.js
@@ -111,7 +111,7 @@ WebInspector.ElementsPanel = function()
this._popoverHelper = new WebInspector.PopoverHelper(this.element, this._getPopoverAnchor.bind(this), this._showPopover.bind(this));
this._popoverHelper.setTimeout(0);
- WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events.DocumentUpdated, this._documentUpdatedEvent, this);
+ WebInspector.domModel.addEventListener(WebInspector.DOMModel.Events.DocumentUpdated, this._documentUpdatedEvent, this);
WebInspector.settings.showUAShadowDOM.addChangeListener(this._showUAShadowDOMChanged.bind(this));
WebInspector.cssModel.addEventListener(WebInspector.CSSStyleModel.Events.ModelWasEnabled, this._updateSidebars, this);
@@ -160,15 +160,15 @@ WebInspector.ElementsPanel.prototype = {
this.treeOutline.setVisible(true);
if (!this.treeOutline.rootDOMNode)
- if (WebInspector.domAgent.existingDocument())
- this._documentUpdated(WebInspector.domAgent.existingDocument());
+ if (WebInspector.domModel.existingDocument())
+ this._documentUpdated(WebInspector.domModel.existingDocument());
else
- WebInspector.domAgent.requestDocument();
+ WebInspector.domModel.requestDocument();
},
willHide: function()
{
- WebInspector.domAgent.hideDOMNodeHighlight();
+ WebInspector.domModel.hideDOMNodeHighlight();
this.treeOutline.setVisible(false);
this._popoverHelper.hidePopover();
@@ -200,7 +200,7 @@ WebInspector.ElementsPanel.prototype = {
*/
_setPseudoClassForNodeId: function(nodeId, pseudoClass, enable)
{
- var node = WebInspector.domAgent.nodeForId(nodeId);
+ var node = WebInspector.domModel.nodeForId(nodeId);
if (!node)
return;
@@ -280,7 +280,7 @@ WebInspector.ElementsPanel.prototype = {
if (!inspectedRootDocument) {
if (this.isShowing())
- WebInspector.domAgent.requestDocument();
+ WebInspector.domModel.requestDocument();
return;
}
@@ -313,7 +313,7 @@ WebInspector.ElementsPanel.prototype = {
// Focused node has been explicitly set while reaching out for the last selected node.
return;
}
- var node = nodeId ? WebInspector.domAgent.nodeForId(nodeId) : null;
+ var node = nodeId ? WebInspector.domModel.nodeForId(nodeId) : null;
selectNode.call(this, node);
}
@@ -321,7 +321,7 @@ WebInspector.ElementsPanel.prototype = {
return;
if (this._selectedPathOnReset)
- WebInspector.domAgent.pushNodeByPathToFrontend(this._selectedPathOnReset, selectLastSelectedNode.bind(this));
+ WebInspector.domModel.pushNodeByPathToFrontend(this._selectedPathOnReset, selectLastSelectedNode.bind(this));
else
selectNode.call(this, null);
delete this._selectedPathOnReset;
@@ -336,7 +336,7 @@ WebInspector.ElementsPanel.prototype = {
delete this._currentSearchResultIndex;
delete this._searchResults;
- WebInspector.domAgent.cancelSearch();
+ WebInspector.domModel.cancelSearch();
},
/**
@@ -369,7 +369,7 @@ WebInspector.ElementsPanel.prototype = {
if (shouldJump)
this.jumpToNextSearchResult();
}
- WebInspector.domAgent.performSearch(whitespaceTrimmedQuery, resultCountCallback.bind(this));
+ WebInspector.domModel.performSearch(whitespaceTrimmedQuery, resultCountCallback.bind(this));
},
_contextMenuEventFired: function(event)
@@ -537,7 +537,7 @@ WebInspector.ElementsPanel.prototype = {
if (typeof searchResult === "undefined") {
// No data for slot, request it.
- WebInspector.domAgent.searchResult(index, searchCallback.bind(this));
+ WebInspector.domModel.searchResult(index, searchCallback.bind(this));
return;
}
@@ -620,7 +620,7 @@ WebInspector.ElementsPanel.prototype = {
var nodeUnderMouse = document.elementFromPoint(event.pageX, event.pageY);
var crumbElement = nodeUnderMouse.enclosingNodeOrSelfWithClass("crumb");
- WebInspector.domAgent.highlightDOMNode(crumbElement ? crumbElement.representedObject.id : 0);
+ WebInspector.domModel.highlightDOMNode(crumbElement ? crumbElement.representedObject.id : 0);
if ("_mouseOutOfCrumbsTimeout" in this) {
clearTimeout(this._mouseOutOfCrumbsTimeout);
@@ -634,7 +634,7 @@ WebInspector.ElementsPanel.prototype = {
if (nodeUnderMouse && nodeUnderMouse.isDescendant(this.crumbsElement))
return;
- WebInspector.domAgent.hideDOMNodeHighlight();
+ WebInspector.domModel.hideDOMNodeHighlight();
this._mouseOutOfCrumbsTimeout = setTimeout(this.updateBreadcrumbSizes.bind(this), 1000);
},
@@ -1063,7 +1063,7 @@ WebInspector.ElementsPanel.prototype = {
function handleUndoRedo()
{
if (WebInspector.KeyboardShortcut.eventHasCtrlOrMeta(event) && !event.shiftKey && event.keyIdentifier === "U+005A") { // Z key
- WebInspector.domAgent.undo(this._updateSidebars.bind(this));
+ WebInspector.domModel.undo(this._updateSidebars.bind(this));
event.handled = true;
return;
}
@@ -1116,12 +1116,12 @@ WebInspector.ElementsPanel.prototype = {
{
WebInspector.inspectorView.setCurrentPanel(this);
- var node = WebInspector.domAgent.nodeForId(nodeId);
+ var node = WebInspector.domModel.nodeForId(nodeId);
if (!node)
return;
node = WebInspector.settings.showUAShadowDOM.get() ? node : this._leaveUserAgentShadowDOM(node);
- WebInspector.domAgent.highlightDOMNodeForTwoSeconds(nodeId);
+ WebInspector.domModel.highlightDOMNodeForTwoSeconds(nodeId);
this.selectDOMNode(node, true);
},
@@ -1137,7 +1137,7 @@ WebInspector.ElementsPanel.prototype = {
function selectNode(nodeId)
{
if (nodeId)
- WebInspector.domAgent.inspectElement(nodeId);
+ WebInspector.domModel.inspectElement(nodeId);
}
/**
@@ -1156,7 +1156,7 @@ WebInspector.ElementsPanel.prototype = {
} else if (target instanceof WebInspector.DOMNode) {
var domNode = /** @type {!WebInspector.DOMNode} */ (target);
if (domNode.id)
- commandCallback = WebInspector.domAgent.inspectElement.bind(WebInspector.domAgent, domNode.id);
+ commandCallback = WebInspector.domModel.inspectElement.bind(WebInspector.domModel, domNode.id);
}
if (!commandCallback)
return;
« no previous file with comments | « Source/devtools/front_end/DOMPresentationUtils.js ('k') | Source/devtools/front_end/ElementsTreeOutline.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698