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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/layer_viewer/LayerTreeOutline.js

Issue 2358253002: DevTools: extract a component for layer viewer (Closed)
Patch Set: Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 23 matching lines...) Expand all
34 * @extends {WebInspector.Object} 34 * @extends {WebInspector.Object}
35 * @implements {WebInspector.LayerView} 35 * @implements {WebInspector.LayerView}
36 */ 36 */
37 WebInspector.LayerTreeOutline = function(layerViewHost) 37 WebInspector.LayerTreeOutline = function(layerViewHost)
38 { 38 {
39 WebInspector.Object.call(this); 39 WebInspector.Object.call(this);
40 this._layerViewHost = layerViewHost; 40 this._layerViewHost = layerViewHost;
41 this._layerViewHost.registerView(this); 41 this._layerViewHost.registerView(this);
42 42
43 this._treeOutline = new TreeOutlineInShadow(); 43 this._treeOutline = new TreeOutlineInShadow();
44 this._treeOutline.element.classList.add("layer-tree"); 44 this._treeOutline.element.classList.add("layer-tree", "overflow-auto");
45 this._treeOutline.element.addEventListener("mousemove", this._onMouseMove.bi nd(this), false); 45 this._treeOutline.element.addEventListener("mousemove", this._onMouseMove.bi nd(this), false);
46 this._treeOutline.element.addEventListener("mouseout", this._onMouseMove.bin d(this), false); 46 this._treeOutline.element.addEventListener("mouseout", this._onMouseMove.bin d(this), false);
47 this._treeOutline.element.addEventListener("contextmenu", this._onContextMen u.bind(this), true); 47 this._treeOutline.element.addEventListener("contextmenu", this._onContextMen u.bind(this), true);
48 48
49 this._lastHoveredNode = null; 49 this._lastHoveredNode = null;
50 this.element = this._treeOutline.element; 50 this.element = this._treeOutline.element;
51 this._layerViewHost.showInternalLayersSetting().addChangeListener(this._upda te, this); 51 this._layerViewHost.showInternalLayersSetting().addChangeListener(this._upda te, this);
52 } 52 }
53 53
54 WebInspector.LayerTreeOutline.prototype = { 54 WebInspector.LayerTreeOutline.prototype = {
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 /** 254 /**
255 * @param {boolean} hovered 255 * @param {boolean} hovered
256 */ 256 */
257 setHovered: function(hovered) 257 setHovered: function(hovered)
258 { 258 {
259 this.listItemElement.classList.toggle("hovered", hovered); 259 this.listItemElement.classList.toggle("hovered", hovered);
260 }, 260 },
261 261
262 __proto__: TreeElement.prototype 262 __proto__: TreeElement.prototype
263 } 263 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698