| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 } | 155 } |
| 156 if (this._items[i].visible()) { | 156 if (this._items[i].visible()) { |
| 157 previousIsSeparator = false; | 157 previousIsSeparator = false; |
| 158 lastSeparator = null; | 158 lastSeparator = null; |
| 159 nonSeparatorVisible = true; | 159 nonSeparatorVisible = true; |
| 160 } | 160 } |
| 161 } | 161 } |
| 162 if (lastSeparator && lastSeparator !== this._items.peekLast()) | 162 if (lastSeparator && lastSeparator !== this._items.peekLast()) |
| 163 lastSeparator.setVisible(false); | 163 lastSeparator.setVisible(false); |
| 164 | 164 |
| 165 this.element.classList.toggle("hidden", lastSeparator && lastSeparator.v
isible() && !nonSeparatorVisible); | 165 this.element.classList.toggle("hidden", !!lastSeparator && lastSeparator
.visible() && !nonSeparatorVisible); |
| 166 } | 166 } |
| 167 } | 167 } |
| 168 | 168 |
| 169 /** | 169 /** |
| 170 * @constructor | 170 * @constructor |
| 171 * @extends {WebInspector.Object} | 171 * @extends {WebInspector.Object} |
| 172 * @param {!Element} element | 172 * @param {!Element} element |
| 173 */ | 173 */ |
| 174 WebInspector.ToolbarItem = function(element) | 174 WebInspector.ToolbarItem = function(element) |
| 175 { | 175 { |
| (...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 957 | 957 |
| 958 /** | 958 /** |
| 959 * @return {!Promise} | 959 * @return {!Promise} |
| 960 */ | 960 */ |
| 961 onLoad: function() | 961 onLoad: function() |
| 962 { | 962 { |
| 963 return this._promise; | 963 return this._promise; |
| 964 }, | 964 }, |
| 965 | 965 |
| 966 __proto__: WebInspector.Toolbar.prototype | 966 __proto__: WebInspector.Toolbar.prototype |
| 967 } | 967 } |
| OLD | NEW |