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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeElement.js

Issue 2604883002: DevTools: namespace globals (Closed)
Patch Set: address CL feedback Created 3 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com>
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 13 matching lines...) Expand all
24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 /** 31 /**
32 * @unrestricted 32 * @unrestricted
33 */ 33 */
34 Elements.ElementsTreeElement = class extends TreeElement { 34 Elements.ElementsTreeElement = class extends UI.TreeElement {
35 /** 35 /**
36 * @param {!SDK.DOMNode} node 36 * @param {!SDK.DOMNode} node
37 * @param {boolean=} elementCloseTag 37 * @param {boolean=} elementCloseTag
38 */ 38 */
39 constructor(node, elementCloseTag) { 39 constructor(node, elementCloseTag) {
40 // The title will be updated in onattach. 40 // The title will be updated in onattach.
41 super(); 41 super();
42 this._node = node; 42 this._node = node;
43 43
44 this._gutterContainer = this.listItemElement.createChild('div', 'gutter-cont ainer'); 44 this._gutterContainer = this.listItemElement.createChild('div', 'gutter-cont ainer');
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 */ 271 */
272 onpopulate() { 272 onpopulate() {
273 this.populated = true; 273 this.populated = true;
274 this.treeOutline.populateTreeElement(this); 274 this.treeOutline.populateTreeElement(this);
275 } 275 }
276 276
277 /** 277 /**
278 * @override 278 * @override
279 */ 279 */
280 expandRecursively() { 280 expandRecursively() {
281 this._node.getSubtree(-1, TreeElement.prototype.expandRecursively.bind(this, Number.MAX_VALUE)); 281 this._node.getSubtree(-1, UI.TreeElement.prototype.expandRecursively.bind(th is, Number.MAX_VALUE));
282 } 282 }
283 283
284 /** 284 /**
285 * @override 285 * @override
286 */ 286 */
287 onexpand() { 287 onexpand() {
288 if (this._elementCloseTag) 288 if (this._elementCloseTag)
289 return; 289 return;
290 290
291 this.updateTitle(); 291 this.updateTitle();
(...skipping 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after
1563 1563
1564 // A union of HTML4 and HTML5-Draft elements that explicitly 1564 // A union of HTML4 and HTML5-Draft elements that explicitly
1565 // or implicitly (for HTML5) forbid the closing tag. 1565 // or implicitly (for HTML5) forbid the closing tag.
1566 Elements.ElementsTreeElement.ForbiddenClosingTagElements = new Set([ 1566 Elements.ElementsTreeElement.ForbiddenClosingTagElements = new Set([
1567 'area', 'base', 'basefont', 'br', 'canvas', 'col', 'command', 'embed', 'frame', 'hr', 1567 'area', 'base', 'basefont', 'br', 'canvas', 'col', 'command', 'embed', 'frame', 'hr',
1568 'img', 'input', 'keygen', 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr' 1568 'img', 'input', 'keygen', 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr'
1569 ]); 1569 ]);
1570 1570
1571 // These tags we do not allow editing their tag name. 1571 // These tags we do not allow editing their tag name.
1572 Elements.ElementsTreeElement.EditTagBlacklist = new Set(['html', 'head', 'body'] ); 1572 Elements.ElementsTreeElement.EditTagBlacklist = new Set(['html', 'head', 'body'] );
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698