OLD | NEW |
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 28 matching lines...) Expand all Loading... |
39 this.element.textContent = pane.title(); | 39 this.element.textContent = pane.title(); |
40 this.element.tabIndex = 0; | 40 this.element.tabIndex = 0; |
41 this.element.addEventListener("click", this._toggleExpanded.bind(this), fals
e); | 41 this.element.addEventListener("click", this._toggleExpanded.bind(this), fals
e); |
42 this.element.addEventListener("keydown", this._onTitleKeyDown.bind(this), fa
lse); | 42 this.element.addEventListener("keydown", this._onTitleKeyDown.bind(this), fa
lse); |
43 } | 43 } |
44 | 44 |
45 WebInspector.SidebarPaneTitle.prototype = { | 45 WebInspector.SidebarPaneTitle.prototype = { |
46 _expand: function() | 46 _expand: function() |
47 { | 47 { |
48 this.element.classList.add("expanded"); | 48 this.element.classList.add("expanded"); |
49 this._pane.show(this.element.parentElement, /** @type {?Element} */ (thi
s.element.nextSibling)); | 49 this._pane.show(/** @type {!Element} */(this.element.parentElement), /**
@type {?Element} */ (this.element.nextSibling)); |
50 }, | 50 }, |
51 | 51 |
52 _collapse: function() | 52 _collapse: function() |
53 { | 53 { |
54 this.element.classList.remove("expanded"); | 54 this.element.classList.remove("expanded"); |
55 if (this._pane.element.parentNode === this.element.parentNode) | 55 if (this._pane.element.parentNode === this.element.parentNode) |
56 this._pane.detach(); | 56 this._pane.detach(); |
57 }, | 57 }, |
58 | 58 |
59 _toggleExpanded: function() | 59 _toggleExpanded: function() |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 if (!this.hasTab(title)) | 163 if (!this.hasTab(title)) |
164 this.appendTab(title, title, pane); | 164 this.appendTab(title, title, pane); |
165 } else { | 165 } else { |
166 if (this.hasTab(title)) | 166 if (this.hasTab(title)) |
167 this.closeTab(title); | 167 this.closeTab(title); |
168 } | 168 } |
169 }, | 169 }, |
170 | 170 |
171 __proto__: WebInspector.TabbedPane.prototype | 171 __proto__: WebInspector.TabbedPane.prototype |
172 } | 172 } |
OLD | NEW |