OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @constructor | 6 * @constructor |
7 * @param {!Document} doc | 7 * @param {!Document} doc |
8 */ | 8 */ |
9 WebInspector.Tooltip = function(doc) | 9 WebInspector.Tooltip = function(doc) |
10 { | 10 { |
(...skipping 15 matching lines...) Loading... |
26 // Wait time before opening a tooltip. | 26 // Wait time before opening a tooltip. |
27 "OpeningDelay": 600 | 27 "OpeningDelay": 600 |
28 } | 28 } |
29 | 29 |
30 WebInspector.Tooltip.prototype = { | 30 WebInspector.Tooltip.prototype = { |
31 /** | 31 /** |
32 * @param {!Event} event | 32 * @param {!Event} event |
33 */ | 33 */ |
34 _mouseMove: function(event) | 34 _mouseMove: function(event) |
35 { | 35 { |
36 var path = event.deepPath ? event.deepPath : event.path; | 36 var path = event.path; |
37 if (!path || event.buttons !== 0) | 37 if (!path || event.buttons !== 0) |
38 return; | 38 return; |
39 | 39 |
40 if (this._anchorElement && path.indexOf(this._anchorElement) === -1) | 40 if (this._anchorElement && path.indexOf(this._anchorElement) === -1) |
41 this._hide(false); | 41 this._hide(false); |
42 | 42 |
43 for (var element of path) { | 43 for (var element of path) { |
44 if (element === this._anchorElement) { | 44 if (element === this._anchorElement) { |
45 return; | 45 return; |
46 } else if (element[WebInspector.Tooltip._symbol]) { | 46 } else if (element[WebInspector.Tooltip._symbol]) { |
(...skipping 149 matching lines...) Loading... |
196 | 196 |
197 /** | 197 /** |
198 * @param {!Element|string} x | 198 * @param {!Element|string} x |
199 * @this {!Element} | 199 * @this {!Element} |
200 */ | 200 */ |
201 set: function(x) | 201 set: function(x) |
202 { | 202 { |
203 WebInspector.Tooltip.install(this, x); | 203 WebInspector.Tooltip.install(this, x); |
204 } | 204 } |
205 }); | 205 }); |
OLD | NEW |