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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui/Widget.js

Issue 2560043005: DevTools: Remove unused variables. Disallow unused variables with eslint (Closed)
Patch Set: A new unused variable was born Created 4 years 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
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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 this._hideWidget(true); 377 this._hideWidget(true);
378 378
379 // Update widget hierarchy. 379 // Update widget hierarchy.
380 if (this._parentWidget) { 380 if (this._parentWidget) {
381 var childIndex = this._parentWidget._children.indexOf(this); 381 var childIndex = this._parentWidget._children.indexOf(this);
382 UI.Widget.__assert(childIndex >= 0, 'Attempt to remove non-child widget'); 382 UI.Widget.__assert(childIndex >= 0, 'Attempt to remove non-child widget');
383 this._parentWidget._children.splice(childIndex, 1); 383 this._parentWidget._children.splice(childIndex, 1);
384 if (this._parentWidget._defaultFocusedChild === this) 384 if (this._parentWidget._defaultFocusedChild === this)
385 this._parentWidget._defaultFocusedChild = null; 385 this._parentWidget._defaultFocusedChild = null;
386 this._parentWidget.childWasDetached(this); 386 this._parentWidget.childWasDetached(this);
387 var parent = this._parentWidget;
388 this._parentWidget = null; 387 this._parentWidget = null;
389 this._processWasDetachedFromHierarchy(); 388 this._processWasDetachedFromHierarchy();
390 } else { 389 } else {
391 UI.Widget.__assert(this._isRoot, 'Removing non-root widget from DOM'); 390 UI.Widget.__assert(this._isRoot, 'Removing non-root widget from DOM');
392 } 391 }
393 392
394 this._attachedToParentElement = null; 393 this._attachedToParentElement = null;
395 this._attachedBeforeNode = null; 394 this._attachedBeforeNode = null;
396 } 395 }
397 396
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 UI.Widget.__assert( 756 UI.Widget.__assert(
758 !child.__widgetCounter && !child.__widget, 757 !child.__widgetCounter && !child.__widget,
759 'Attempt to remove element containing widget via regular DOM operation'); 758 'Attempt to remove element containing widget via regular DOM operation');
760 return UI.Widget._originalRemoveChild.call(this, child); 759 return UI.Widget._originalRemoveChild.call(this, child);
761 }; 760 };
762 761
763 Element.prototype.removeChildren = function() { 762 Element.prototype.removeChildren = function() {
764 UI.Widget.__assert(!this.__widgetCounter, 'Attempt to remove element containin g widget via regular DOM operation'); 763 UI.Widget.__assert(!this.__widgetCounter, 'Attempt to remove element containin g widget via regular DOM operation');
765 UI.Widget._originalRemoveChildren.call(this); 764 UI.Widget._originalRemoveChildren.call(this);
766 }; 765 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698