OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 * @extends {WebInspector.HBox} | 7 * @extends {WebInspector.HBox} |
8 */ | 8 */ |
9 WebInspector.ElementsBreadcrumbs = function() | 9 WebInspector.ElementsBreadcrumbs = function() |
10 { | 10 { |
11 WebInspector.HBox.call(this, true); | 11 WebInspector.HBox.call(this, true); |
12 this.contentElement.appendChild(WebInspector.View.createStyleElement("elemen
ts/breadcrumbs.css")); | 12 this.registerRequiredCSS("elements/breadcrumbs.css"); |
13 | 13 |
14 this.crumbsElement = this.contentElement.createChild("div", "crumbs"); | 14 this.crumbsElement = this.contentElement.createChild("div", "crumbs"); |
15 this.crumbsElement.addEventListener("mousemove", this._mouseMovedInCrumbs.bi
nd(this), false); | 15 this.crumbsElement.addEventListener("mousemove", this._mouseMovedInCrumbs.bi
nd(this), false); |
16 this.crumbsElement.addEventListener("mouseleave", this._mouseMovedOutOfCrumb
s.bind(this), false); | 16 this.crumbsElement.addEventListener("mouseleave", this._mouseMovedOutOfCrumb
s.bind(this), false); |
17 } | 17 } |
18 | 18 |
19 /** @enum {string} */ | 19 /** @enum {string} */ |
20 WebInspector.ElementsBreadcrumbs.Events = { | 20 WebInspector.ElementsBreadcrumbs.Events = { |
21 NodeSelected: "NodeSelected" | 21 NodeSelected: "NodeSelected" |
22 } | 22 } |
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 compact(selectedCrumb); | 425 compact(selectedCrumb); |
426 if (crumbsAreSmallerThanContainer()) | 426 if (crumbsAreSmallerThanContainer()) |
427 return; | 427 return; |
428 | 428 |
429 // Collapse the selected crumb as a last resort. Pass true to prevent co
alescing. | 429 // Collapse the selected crumb as a last resort. Pass true to prevent co
alescing. |
430 collapse(selectedCrumb, true); | 430 collapse(selectedCrumb, true); |
431 }, | 431 }, |
432 | 432 |
433 __proto__: WebInspector.HBox.prototype | 433 __proto__: WebInspector.HBox.prototype |
434 } | 434 } |
OLD | NEW |