| 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 12 matching lines...) Expand all Loading... |
| 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 /** | 27 /** |
| 28 * @constructor | 28 * @constructor |
| 29 * @extends {WebInspector.Object} | 29 * @extends {WebInspector.Object} |
| 30 */ | 30 */ |
| 31 WebInspector.View = function() | 31 WebInspector.View = function() |
| 32 { | 32 { |
| 33 this.element = document.createElement("div"); | 33 this.element = document.createElementWithClass("div", "view"); |
| 34 this.element.className = "view"; | |
| 35 this.element.__view = this; | 34 this.element.__view = this; |
| 36 this._visible = true; | 35 this._visible = true; |
| 37 this._isRoot = false; | 36 this._isRoot = false; |
| 38 this._isShowing = false; | 37 this._isShowing = false; |
| 39 this._children = []; | 38 this._children = []; |
| 40 this._hideOnDetach = false; | 39 this._hideOnDetach = false; |
| 41 this._cssFiles = []; | 40 this._cssFiles = []; |
| 42 this._notificationDepth = 0; | 41 this._notificationDepth = 0; |
| 43 } | 42 } |
| 44 | 43 |
| (...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 { | 693 { |
| 695 WebInspector.View.__assert(!child.__viewCounter && !child.__view, "Attempt t
o remove element containing view via regular DOM operation"); | 694 WebInspector.View.__assert(!child.__viewCounter && !child.__view, "Attempt t
o remove element containing view via regular DOM operation"); |
| 696 return WebInspector.View._originalRemoveChild.call(this, child); | 695 return WebInspector.View._originalRemoveChild.call(this, child); |
| 697 } | 696 } |
| 698 | 697 |
| 699 Element.prototype.removeChildren = function() | 698 Element.prototype.removeChildren = function() |
| 700 { | 699 { |
| 701 WebInspector.View.__assert(!this.__viewCounter, "Attempt to remove element c
ontaining view via regular DOM operation"); | 700 WebInspector.View.__assert(!this.__viewCounter, "Attempt to remove element c
ontaining view via regular DOM operation"); |
| 702 WebInspector.View._originalRemoveChildren.call(this); | 701 WebInspector.View._originalRemoveChildren.call(this); |
| 703 } | 702 } |
| OLD | NEW |