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

Side by Side Diff: Source/devtools/front_end/ui/treeoutline.js

Issue 1262063003: Devtools UI: Remove redundant tooltips (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 /** @type {?TreeOutline} */ 305 /** @type {?TreeOutline} */
306 this.treeOutline = null; 306 this.treeOutline = null;
307 this.parent = null; 307 this.parent = null;
308 this.previousSibling = null; 308 this.previousSibling = null;
309 this.nextSibling = null; 309 this.nextSibling = null;
310 310
311 this._listItemNode = createElement("li"); 311 this._listItemNode = createElement("li");
312 this._listItemNode.treeElement = this; 312 this._listItemNode.treeElement = this;
313 if (title) 313 if (title)
314 this.title = title; 314 this.title = title;
315 if (typeof title === "string")
316 this.tooltip = title;
paulirish 2015/08/03 16:26:20 Appears to be useful for truncated strings like da
samli 2015/08/05 07:53:31 This is not that and still works. The only instanc
317 this._listItemNode.addEventListener("mousedown", this._handleMouseDown.bind( this), false); 315 this._listItemNode.addEventListener("mousedown", this._handleMouseDown.bind( this), false);
318 this._listItemNode.addEventListener("selectstart", this._treeElementSelectSt art.bind(this), false); 316 this._listItemNode.addEventListener("selectstart", this._treeElementSelectSt art.bind(this), false);
319 this._listItemNode.addEventListener("click", this._treeElementToggled.bind(t his), false); 317 this._listItemNode.addEventListener("click", this._treeElementToggled.bind(t his), false);
320 this._listItemNode.addEventListener("dblclick", this._handleDoubleClick.bind (this), false); 318 this._listItemNode.addEventListener("dblclick", this._handleDoubleClick.bind (this), false);
321 319
322 this._childrenListNode = createElement("ol"); 320 this._childrenListNode = createElement("ol");
323 this._childrenListNode.parentTreeElement = this; 321 this._childrenListNode.parentTreeElement = this;
324 this._childrenListNode.classList.add("children"); 322 this._childrenListNode.classList.add("children");
325 323
326 this._hidden = false; 324 this._hidden = false;
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 isEventWithinDisclosureTriangle: function(event) 1050 isEventWithinDisclosureTriangle: function(event)
1053 { 1051 {
1054 // FIXME: We should not use getComputedStyle(). For that we need to get rid of using ::before for disclosure triangle. (http://webk.it/74446) 1052 // FIXME: We should not use getComputedStyle(). For that we need to get rid of using ::before for disclosure triangle. (http://webk.it/74446)
1055 var paddingLeftValue = window.getComputedStyle(this._listItemNode).paddi ngLeft; 1053 var paddingLeftValue = window.getComputedStyle(this._listItemNode).paddi ngLeft;
1056 console.assert(paddingLeftValue.endsWith("px")); 1054 console.assert(paddingLeftValue.endsWith("px"));
1057 var computedLeftPadding = parseFloat(paddingLeftValue); 1055 var computedLeftPadding = parseFloat(paddingLeftValue);
1058 var left = this._listItemNode.totalOffsetLeft() + computedLeftPadding; 1056 var left = this._listItemNode.totalOffsetLeft() + computedLeftPadding;
1059 return event.pageX >= left && event.pageX <= left + TreeElement._ArrowTo ggleWidth && this._expandable; 1057 return event.pageX >= left && event.pageX <= left + TreeElement._ArrowTo ggleWidth && this._expandable;
1060 } 1058 }
1061 } 1059 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698