| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
| 3 * Copyright (C) 2011 Google Inc. All Rights Reserved. | 3 * Copyright (C) 2011 Google Inc. All Rights Reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 isShowing: function() | 87 isShowing: function() |
| 88 { | 88 { |
| 89 return this._isShowing; | 89 return this._isShowing; |
| 90 }, | 90 }, |
| 91 | 91 |
| 92 /** | 92 /** |
| 93 * @return {boolean} | 93 * @return {boolean} |
| 94 */ | 94 */ |
| 95 shouldHideOnDetach: function() | 95 shouldHideOnDetach: function() |
| 96 { | 96 { |
| 97 if (!this.element.parentElement) |
| 98 return false; |
| 97 if (this._hideOnDetach) | 99 if (this._hideOnDetach) |
| 98 return true; | 100 return true; |
| 99 for (var child of this._children) { | 101 for (var child of this._children) { |
| 100 if (child.shouldHideOnDetach()) | 102 if (child.shouldHideOnDetach()) |
| 101 return true; | 103 return true; |
| 102 } | 104 } |
| 103 return false; | 105 return false; |
| 104 }, | 106 }, |
| 105 | 107 |
| 106 setHideOnDetach: function() | 108 setHideOnDetach: function() |
| (...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 | 689 |
| 688 /** | 690 /** |
| 689 * @constructor | 691 * @constructor |
| 690 * @extends {WebInspector.VBox} | 692 * @extends {WebInspector.VBox} |
| 691 * @param {string} title | 693 * @param {string} title |
| 692 * @param {boolean=} isWebComponent | 694 * @param {boolean=} isWebComponent |
| 693 */ | 695 */ |
| 694 WebInspector.View = function(title, isWebComponent) | 696 WebInspector.View = function(title, isWebComponent) |
| 695 { | 697 { |
| 696 WebInspector.VBox.call(this, isWebComponent); | 698 WebInspector.VBox.call(this, isWebComponent); |
| 699 this.element.classList.add("view"); |
| 697 this._title = title; | 700 this._title = title; |
| 698 /** @type {!Array<!WebInspector.ToolbarItem>} */ | 701 /** @type {!Array<!WebInspector.ToolbarItem>} */ |
| 699 this._toolbarItems = []; | 702 this._toolbarItems = []; |
| 700 } | 703 } |
| 701 | 704 |
| 702 WebInspector.View.prototype = { | 705 WebInspector.View.prototype = { |
| 703 /** | 706 /** |
| 704 * @return {string} | 707 * @return {string} |
| 705 */ | 708 */ |
| 706 title: function() | 709 title: function() |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 { | 808 { |
| 806 WebInspector.Widget.__assert(!child.__widgetCounter && !child.__widget, "Att
empt to remove element containing widget via regular DOM operation"); | 809 WebInspector.Widget.__assert(!child.__widgetCounter && !child.__widget, "Att
empt to remove element containing widget via regular DOM operation"); |
| 807 return WebInspector.Widget._originalRemoveChild.call(this, child); | 810 return WebInspector.Widget._originalRemoveChild.call(this, child); |
| 808 } | 811 } |
| 809 | 812 |
| 810 Element.prototype.removeChildren = function() | 813 Element.prototype.removeChildren = function() |
| 811 { | 814 { |
| 812 WebInspector.Widget.__assert(!this.__widgetCounter, "Attempt to remove eleme
nt containing widget via regular DOM operation"); | 815 WebInspector.Widget.__assert(!this.__widgetCounter, "Attempt to remove eleme
nt containing widget via regular DOM operation"); |
| 813 WebInspector.Widget._originalRemoveChildren.call(this); | 816 WebInspector.Widget._originalRemoveChildren.call(this); |
| 814 } | 817 } |
| OLD | NEW |