| 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 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 else | 548 else |
| 549 this.doLayout(); | 549 this.doLayout(); |
| 550 }, | 550 }, |
| 551 | 551 |
| 552 invalidateSize: function() | 552 invalidateSize: function() |
| 553 { | 553 { |
| 554 if (this._parentWidget) | 554 if (this._parentWidget) |
| 555 this._parentWidget.doLayout(); | 555 this._parentWidget.doLayout(); |
| 556 }, | 556 }, |
| 557 | 557 |
| 558 /** | |
| 559 * @return {boolean} | |
| 560 */ | |
| 561 revealWidget: function() | |
| 562 { | |
| 563 if (!this._parentWidget) | |
| 564 return this._isRoot; | |
| 565 if (!this._parentWidget.revealChild(this)) | |
| 566 return false; | |
| 567 return this._parentWidget.revealWidget(); | |
| 568 }, | |
| 569 | |
| 570 /** | |
| 571 * @param {!WebInspector.Widget} widget | |
| 572 * @return {boolean} | |
| 573 * @protected | |
| 574 */ | |
| 575 revealChild: function(widget) { return true; }, | |
| 576 | |
| 577 __proto__: WebInspector.Object.prototype | 558 __proto__: WebInspector.Object.prototype |
| 578 } | 559 } |
| 579 | 560 |
| 580 WebInspector.Widget._originalAppendChild = Element.prototype.appendChild; | 561 WebInspector.Widget._originalAppendChild = Element.prototype.appendChild; |
| 581 WebInspector.Widget._originalInsertBefore = Element.prototype.insertBefore; | 562 WebInspector.Widget._originalInsertBefore = Element.prototype.insertBefore; |
| 582 WebInspector.Widget._originalRemoveChild = Element.prototype.removeChild; | 563 WebInspector.Widget._originalRemoveChild = Element.prototype.removeChild; |
| 583 WebInspector.Widget._originalRemoveChildren = Element.prototype.removeChildren; | 564 WebInspector.Widget._originalRemoveChildren = Element.prototype.removeChildren; |
| 584 | 565 |
| 585 WebInspector.Widget._incrementWidgetCounter = function(parentElement, childEleme
nt) | 566 WebInspector.Widget._incrementWidgetCounter = function(parentElement, childEleme
nt) |
| 586 { | 567 { |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 745 { | 726 { |
| 746 WebInspector.Widget.__assert(!child.__widgetCounter && !child.__widget, "Att
empt to remove element containing widget via regular DOM operation"); | 727 WebInspector.Widget.__assert(!child.__widgetCounter && !child.__widget, "Att
empt to remove element containing widget via regular DOM operation"); |
| 747 return WebInspector.Widget._originalRemoveChild.call(this, child); | 728 return WebInspector.Widget._originalRemoveChild.call(this, child); |
| 748 } | 729 } |
| 749 | 730 |
| 750 Element.prototype.removeChildren = function() | 731 Element.prototype.removeChildren = function() |
| 751 { | 732 { |
| 752 WebInspector.Widget.__assert(!this.__widgetCounter, "Attempt to remove eleme
nt containing widget via regular DOM operation"); | 733 WebInspector.Widget.__assert(!this.__widgetCounter, "Attempt to remove eleme
nt containing widget via regular DOM operation"); |
| 753 WebInspector.Widget._originalRemoveChildren.call(this); | 734 WebInspector.Widget._originalRemoveChildren.call(this); |
| 754 } | 735 } |
| OLD | NEW |