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

Side by Side Diff: Source/devtools/front_end/sdk/DOMModel.js

Issue 1309403002: Show closed/open shadow root in inspector (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: update test expectation for breadcrumb 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 WebInspector.DOMNode.PseudoElementNames = { 129 WebInspector.DOMNode.PseudoElementNames = {
130 Before: "before", 130 Before: "before",
131 After: "after" 131 After: "after"
132 } 132 }
133 133
134 /** 134 /**
135 * @enum {string} 135 * @enum {string}
136 */ 136 */
137 WebInspector.DOMNode.ShadowRootTypes = { 137 WebInspector.DOMNode.ShadowRootTypes = {
138 UserAgent: "user-agent", 138 UserAgent: "user-agent",
139 Author: "author" 139 Open: "open",
140 Closed: "closed"
140 } 141 }
141 142
142 WebInspector.DOMNode.prototype = { 143 WebInspector.DOMNode.prototype = {
143 /** 144 /**
144 * @return {!WebInspector.DOMModel} 145 * @return {!WebInspector.DOMModel}
145 */ 146 */
146 domModel: function() 147 domModel: function()
147 { 148 {
148 return this._domModel; 149 return this._domModel;
149 }, 150 },
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 return this._shadowRootType || null; 339 return this._shadowRootType || null;
339 }, 340 },
340 341
341 /** 342 /**
342 * @return {string} 343 * @return {string}
343 */ 344 */
344 nodeNameInCorrectCase: function() 345 nodeNameInCorrectCase: function()
345 { 346 {
346 var shadowRootType = this.shadowRootType(); 347 var shadowRootType = this.shadowRootType();
347 if (shadowRootType) 348 if (shadowRootType)
348 return "#shadow-root" + (shadowRootType === WebInspector.DOMNode.Sha dowRootTypes.UserAgent ? " (user-agent)" : ""); 349 return "#shadow-root (" + shadowRootType + ")";
349 return this.isXMLNode() ? this.nodeName() : this.nodeName().toLowerCase( ); 350 return this.isXMLNode() ? this.nodeName() : this.nodeName().toLowerCase( );
350 }, 351 },
351 352
352 /** 353 /**
353 * @param {string} name 354 * @param {string} name
354 * @param {function(?Protocol.Error, number)=} callback 355 * @param {function(?Protocol.Error, number)=} callback
355 */ 356 */
356 setNodeName: function(name, callback) 357 setNodeName: function(name, callback)
357 { 358 {
358 this._agent.setNodeName(this.id, name, this._domModel._markRevision(this , callback)); 359 this._agent.setNodeName(this.id, name, this._domModel._markRevision(this , callback));
(...skipping 1803 matching lines...) Expand 10 before | Expand all | Expand 10 after
2162 } 2163 }
2163 2164
2164 /** 2165 /**
2165 * @param {!WebInspector.Target} target 2166 * @param {!WebInspector.Target} target
2166 * @return {?WebInspector.DOMModel} 2167 * @return {?WebInspector.DOMModel}
2167 */ 2168 */
2168 WebInspector.DOMModel.fromTarget = function(target) 2169 WebInspector.DOMModel.fromTarget = function(target)
2169 { 2170 {
2170 return /** @type {?WebInspector.DOMModel} */ (target.model(WebInspector.DOMM odel)); 2171 return /** @type {?WebInspector.DOMModel} */ (target.model(WebInspector.DOMM odel));
2171 } 2172 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/elements/ElementsTreeElement.js ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698