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

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

Issue 2560043005: DevTools: Remove unused variables. Disallow unused variables with eslint (Closed)
Patch Set: A new unused variable was born Created 4 years 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 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 } 471 }
472 472
473 populateTextContextMenu(contextMenu, textNode) { 473 populateTextContextMenu(contextMenu, textNode) {
474 if (!this._editing) 474 if (!this._editing)
475 contextMenu.appendItem(Common.UIString.capitalize('Edit ^text'), this._sta rtEditingTextNode.bind(this, textNode)); 475 contextMenu.appendItem(Common.UIString.capitalize('Edit ^text'), this._sta rtEditingTextNode.bind(this, textNode));
476 this.populateNodeContextMenu(contextMenu); 476 this.populateNodeContextMenu(contextMenu);
477 } 477 }
478 478
479 populateNodeContextMenu(contextMenu) { 479 populateNodeContextMenu(contextMenu) {
480 // Add free-form node-related actions. 480 // Add free-form node-related actions.
481 var openTagElement = this._node[this.treeOutline.treeElementSymbol()] || thi s;
482 var isEditable = this.hasEditableNode(); 481 var isEditable = this.hasEditableNode();
483 if (isEditable && !this._editing) 482 if (isEditable && !this._editing)
484 contextMenu.appendItem(Common.UIString('Edit as HTML'), this._editAsHTML.b ind(this)); 483 contextMenu.appendItem(Common.UIString('Edit as HTML'), this._editAsHTML.b ind(this));
485 var isShadowRoot = this._node.isShadowRoot(); 484 var isShadowRoot = this._node.isShadowRoot();
486 485
487 // Place it here so that all "Copy"-ing items stick together. 486 // Place it here so that all "Copy"-ing items stick together.
488 var copyMenu = contextMenu.appendSubMenuItem(Common.UIString('Copy')); 487 var copyMenu = contextMenu.appendSubMenuItem(Common.UIString('Copy'));
489 var createShortcut = UI.KeyboardShortcut.shortcutToString; 488 var createShortcut = UI.KeyboardShortcut.shortcutToString;
490 var modifier = UI.KeyboardShortcut.Modifiers.CtrlOrMeta; 489 var modifier = UI.KeyboardShortcut.Modifiers.CtrlOrMeta;
491 var treeOutline = this.treeOutline; 490 var treeOutline = this.treeOutline;
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after
1564 1563
1565 // A union of HTML4 and HTML5-Draft elements that explicitly 1564 // A union of HTML4 and HTML5-Draft elements that explicitly
1566 // or implicitly (for HTML5) forbid the closing tag. 1565 // or implicitly (for HTML5) forbid the closing tag.
1567 Elements.ElementsTreeElement.ForbiddenClosingTagElements = new Set([ 1566 Elements.ElementsTreeElement.ForbiddenClosingTagElements = new Set([
1568 'area', 'base', 'basefont', 'br', 'canvas', 'col', 'command', 'embed', 'frame', 'hr', 1567 'area', 'base', 'basefont', 'br', 'canvas', 'col', 'command', 'embed', 'frame', 'hr',
1569 'img', 'input', 'keygen', 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr' 1568 'img', 'input', 'keygen', 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr'
1570 ]); 1569 ]);
1571 1570
1572 // These tags we do not allow editing their tag name. 1571 // These tags we do not allow editing their tag name.
1573 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