| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 } | 61 } |
| 62 var styleElement = document.createElement("style"); | 62 var styleElement = document.createElement("style"); |
| 63 styleElement.type = "text/css"; | 63 styleElement.type = "text/css"; |
| 64 styleElement.textContent = content; | 64 styleElement.textContent = content; |
| 65 return styleElement; | 65 return styleElement; |
| 66 } | 66 } |
| 67 | 67 |
| 68 WebInspector.View.prototype = { | 68 WebInspector.View.prototype = { |
| 69 markAsRoot: function() | 69 markAsRoot: function() |
| 70 { | 70 { |
| 71 this.element.classList.add("component-root"); |
| 71 WebInspector.View.__assert(!this.element.parentElement, "Attempt to mark
as root attached node"); | 72 WebInspector.View.__assert(!this.element.parentElement, "Attempt to mark
as root attached node"); |
| 72 this._isRoot = true; | 73 this._isRoot = true; |
| 73 }, | 74 }, |
| 74 | 75 |
| 75 /** | 76 /** |
| 76 * @return {?WebInspector.View} | 77 * @return {?WebInspector.View} |
| 77 */ | 78 */ |
| 78 parentView: function() | 79 parentView: function() |
| 79 { | 80 { |
| 80 return this._parentView; | 81 return this._parentView; |
| (...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 { | 644 { |
| 644 WebInspector.View.__assert(!child.__viewCounter && !child.__view, "Attempt t
o remove element containing view via regular DOM operation"); | 645 WebInspector.View.__assert(!child.__viewCounter && !child.__view, "Attempt t
o remove element containing view via regular DOM operation"); |
| 645 return WebInspector.View._originalRemoveChild.call(this, child); | 646 return WebInspector.View._originalRemoveChild.call(this, child); |
| 646 } | 647 } |
| 647 | 648 |
| 648 Element.prototype.removeChildren = function() | 649 Element.prototype.removeChildren = function() |
| 649 { | 650 { |
| 650 WebInspector.View.__assert(!this.__viewCounter, "Attempt to remove element c
ontaining view via regular DOM operation"); | 651 WebInspector.View.__assert(!this.__viewCounter, "Attempt to remove element c
ontaining view via regular DOM operation"); |
| 651 WebInspector.View._originalRemoveChildren.call(this); | 652 WebInspector.View._originalRemoveChildren.call(this); |
| 652 } | 653 } |
| OLD | NEW |