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

Side by Side Diff: Source/devtools/front_end/DOMPresentationUtils.js

Issue 218703002: DevTools: [wip] move Elements panel off WebInspector.domModel and single tree outline. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review comment addressed (and much more) Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/DOMModel.js ('k') | Source/devtools/front_end/ElementsPanel.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
4 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> 4 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com>
5 * Copyright (C) 2009 Joseph Pecoraro 5 * Copyright (C) 2009 Joseph Pecoraro
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 10 *
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 if (match[3]) 89 if (match[3])
90 container.createChild("span", "webkit-html-attribute-name").textContent = match[3]; 90 container.createChild("span", "webkit-html-attribute-name").textContent = match[3];
91 } 91 }
92 92
93 WebInspector.DOMPresentationUtils.linkifyNodeReference = function(node) 93 WebInspector.DOMPresentationUtils.linkifyNodeReference = function(node)
94 { 94 {
95 var link = document.createElement("span"); 95 var link = document.createElement("span");
96 link.className = "node-link"; 96 link.className = "node-link";
97 WebInspector.DOMPresentationUtils.decorateNodeLabel(node, link); 97 WebInspector.DOMPresentationUtils.decorateNodeLabel(node, link);
98 98
99 link.addEventListener("click", WebInspector.domModel.inspectElement.bind(Web Inspector.domModel, node.id), false); 99 link.addEventListener("click", node.reveal.bind(node), false);
100 link.addEventListener("mouseover", WebInspector.domModel.highlightDOMNode.bi nd(WebInspector.domModel, node.id, "", undefined), false); 100 link.addEventListener("mouseover", node.highlight.bind(node.id), false);
101 link.addEventListener("mouseout", WebInspector.domModel.hideDOMNodeHighlight .bind(WebInspector.domModel), false); 101 link.addEventListener("mouseout", node.domModel().hideDOMNodeHighlight.bind( node.domModel()), false);
102 102
103 return link; 103 return link;
104 } 104 }
105 105
106 WebInspector.DOMPresentationUtils.linkifyNodeById = function(nodeId) 106 WebInspector.DOMPresentationUtils.linkifyNodeById = function(nodeId)
107 { 107 {
108 var node = WebInspector.domModel.nodeForId(nodeId); 108 var node = WebInspector.domModel.nodeForId(nodeId);
109 if (!node) 109 if (!node)
110 return document.createTextNode(WebInspector.UIString("<node>")); 110 return document.createTextNode(WebInspector.UIString("<node>"));
111 return WebInspector.DOMPresentationUtils.linkifyNodeReference(node); 111 return WebInspector.DOMPresentationUtils.linkifyNodeReference(node);
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 509
510 WebInspector.DOMNodePathStep.prototype = { 510 WebInspector.DOMNodePathStep.prototype = {
511 /** 511 /**
512 * @return {string} 512 * @return {string}
513 */ 513 */
514 toString: function() 514 toString: function()
515 { 515 {
516 return this.value; 516 return this.value;
517 } 517 }
518 } 518 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/DOMModel.js ('k') | Source/devtools/front_end/ElementsPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698