Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Side by Side Diff: Source/devtools/front_end/ui/View.js

Issue 340513003: DevTools: Add JSDoc for static methods, fix JSDoc types and induced errors (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 onResize: function() 194 onResize: function()
195 { 195 {
196 }, 196 },
197 197
198 onLayout: function() 198 onLayout: function()
199 { 199 {
200 }, 200 },
201 201
202 /** 202 /**
203 * @param {?Element} parentElement 203 * @param {?Element} parentElement
204 * @param {!Element=} insertBefore 204 * @param {?Element=} insertBefore
205 */ 205 */
206 show: function(parentElement, insertBefore) 206 show: function(parentElement, insertBefore)
207 { 207 {
208 WebInspector.View._assert(parentElement, "Attempt to attach view with no parent element"); 208 WebInspector.View._assert(parentElement, "Attempt to attach view with no parent element");
209 209
210 // Update view hierarchy 210 // Update view hierarchy
211 if (this.element.parentElement !== parentElement) { 211 if (this.element.parentElement !== parentElement) {
212 if (this.element.parentElement) 212 if (this.element.parentElement)
213 this.detach(); 213 this.detach();
214 214
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 655
656 WebInspector.VBoxWithResizeCallback.prototype = { 656 WebInspector.VBoxWithResizeCallback.prototype = {
657 onResize: function() 657 onResize: function()
658 { 658 {
659 this._resizeCallback(); 659 this._resizeCallback();
660 }, 660 },
661 661
662 __proto__: WebInspector.VBox.prototype 662 __proto__: WebInspector.VBox.prototype
663 } 663 }
664 664
665 /**
666 * @param {?Node} child
667 * @return {?Node}
668 * @suppress {duplicate}
669 */
665 Element.prototype.appendChild = function(child) 670 Element.prototype.appendChild = function(child)
666 { 671 {
667 WebInspector.View._assert(!child.__view || child.parentElement === this, "At tempt to add view via regular DOM operation."); 672 WebInspector.View._assert(!child.__view || child.parentElement === this, "At tempt to add view via regular DOM operation.");
668 return WebInspector.View._originalAppendChild.call(this, child); 673 return WebInspector.View._originalAppendChild.call(this, child);
669 } 674 }
670 675
676 /**
677 * @param {?Node} child
678 * @param {?Node} anchor
679 * @return {?Node}
680 * @suppress {duplicate}
681 */
671 Element.prototype.insertBefore = function(child, anchor) 682 Element.prototype.insertBefore = function(child, anchor)
672 { 683 {
673 WebInspector.View._assert(!child.__view || child.parentElement === this, "At tempt to add view via regular DOM operation."); 684 WebInspector.View._assert(!child.__view || child.parentElement === this, "At tempt to add view via regular DOM operation.");
674 return WebInspector.View._originalInsertBefore.call(this, child, anchor); 685 return WebInspector.View._originalInsertBefore.call(this, child, anchor);
675 } 686 }
676 687
677 688 /**
689 * @param {?Node} child
690 * @return {?Node}
691 * @suppress {duplicate}
692 */
678 Element.prototype.removeChild = function(child) 693 Element.prototype.removeChild = function(child)
679 { 694 {
680 WebInspector.View._assert(!child.__viewCounter && !child.__view, "Attempt to remove element containing view via regular DOM operation"); 695 WebInspector.View._assert(!child.__viewCounter && !child.__view, "Attempt to remove element containing view via regular DOM operation");
681 return WebInspector.View._originalRemoveChild.call(this, child); 696 return WebInspector.View._originalRemoveChild.call(this, child);
682 } 697 }
683 698
684 Element.prototype.removeChildren = function() 699 Element.prototype.removeChildren = function()
685 { 700 {
686 WebInspector.View._assert(!this.__viewCounter, "Attempt to remove element co ntaining view via regular DOM operation"); 701 WebInspector.View._assert(!this.__viewCounter, "Attempt to remove element co ntaining view via regular DOM operation");
687 WebInspector.View._originalRemoveChildren.call(this); 702 WebInspector.View._originalRemoveChildren.call(this);
688 } 703 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698