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

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

Issue 2261933002: DevTools: Use JS symbols instead of strings for eligible events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 * @return {?WebInspector.ElementsTreeOutline} 94 * @return {?WebInspector.ElementsTreeOutline}
95 */ 95 */
96 WebInspector.ElementsTreeOutline.forDOMModel = function(domModel) 96 WebInspector.ElementsTreeOutline.forDOMModel = function(domModel)
97 { 97 {
98 return domModel[WebInspector.ElementsTreeOutline._treeOutlineSymbol] || null ; 98 return domModel[WebInspector.ElementsTreeOutline._treeOutlineSymbol] || null ;
99 } 99 }
100 100
101 /** @typedef {{node: !WebInspector.DOMNode, isCut: boolean}} */ 101 /** @typedef {{node: !WebInspector.DOMNode, isCut: boolean}} */
102 WebInspector.ElementsTreeOutline.ClipboardData; 102 WebInspector.ElementsTreeOutline.ClipboardData;
103 103
104 /** 104 /** @enum {symbol} */
105 * @enum {string}
106 */
107 WebInspector.ElementsTreeOutline.Events = { 105 WebInspector.ElementsTreeOutline.Events = {
108 SelectedNodeChanged: "SelectedNodeChanged", 106 SelectedNodeChanged: Symbol("SelectedNodeChanged"),
109 ElementsTreeUpdated: "ElementsTreeUpdated" 107 ElementsTreeUpdated: Symbol("ElementsTreeUpdated")
110 } 108 }
111 109
112 /** 110 /**
113 * @const 111 * @const
114 * @type {!Object.<string, string>} 112 * @type {!Object.<string, string>}
115 */ 113 */
116 WebInspector.ElementsTreeOutline.MappedCharToEntity = { 114 WebInspector.ElementsTreeOutline.MappedCharToEntity = {
117 "\u00a0": "nbsp", 115 "\u00a0": "nbsp",
118 "\u0093": "#147", // <control> 116 "\u0093": "#147", // <control>
119 "\u00ad": "shy", 117 "\u00ad": "shy",
(...skipping 1679 matching lines...) Expand 10 before | Expand all | Expand 10 after
1799 if (node) { 1797 if (node) {
1800 this.treeOutline._selectedDOMNode = node; 1798 this.treeOutline._selectedDOMNode = node;
1801 this.treeOutline._selectedNodeChanged(); 1799 this.treeOutline._selectedNodeChanged();
1802 } 1800 }
1803 } 1801 }
1804 return true; 1802 return true;
1805 }, 1803 },
1806 1804
1807 __proto__: TreeElement.prototype 1805 __proto__: TreeElement.prototype
1808 } 1806 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698