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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeOutline.js

Issue 1907263002: DevTools: Fix all outstanding JavaScript style issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove yoda disable. fix throw parens Created 4 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com>
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 660
661 if (!element || element.isEventWithinDisclosureTriangle(event)) 661 if (!element || element.isEventWithinDisclosureTriangle(event))
662 return; 662 return;
663 663
664 element.select(); 664 element.select();
665 }, 665 },
666 666
667 /** 667 /**
668 * @param {?TreeElement} treeElement 668 * @param {?TreeElement} treeElement
669 */ 669 */
670 setHoverEffect: function (treeElement) 670 setHoverEffect: function(treeElement)
671 { 671 {
672 if (this._previousHoveredElement === treeElement) 672 if (this._previousHoveredElement === treeElement)
673 return; 673 return;
674 674
675 if (this._previousHoveredElement) { 675 if (this._previousHoveredElement) {
676 this._previousHoveredElement.hovered = false; 676 this._previousHoveredElement.hovered = false;
677 delete this._previousHoveredElement; 677 delete this._previousHoveredElement;
678 } 678 }
679 679
680 if (treeElement) { 680 if (treeElement) {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 while (node) { 742 while (node) {
743 if (node === this._treeElementBeingDragged._node) 743 if (node === this._treeElementBeingDragged._node)
744 return false; 744 return false;
745 node = node.parentNode; 745 node = node.parentNode;
746 } 746 }
747 747
748 treeElement.updateSelection(); 748 treeElement.updateSelection();
749 treeElement.listItemElement.classList.add("elements-drag-over"); 749 treeElement.listItemElement.classList.add("elements-drag-over");
750 this._dragOverTreeElement = treeElement; 750 this._dragOverTreeElement = treeElement;
751 event.preventDefault(); 751 event.preventDefault();
752 event.dataTransfer.dropEffect = 'move'; 752 event.dataTransfer.dropEffect = "move";
753 return false; 753 return false;
754 }, 754 },
755 755
756 _ondragleave: function(event) 756 _ondragleave: function(event)
757 { 757 {
758 this._clearDragOverTreeElementMarker(); 758 this._clearDragOverTreeElementMarker();
759 event.preventDefault(); 759 event.preventDefault();
760 return false; 760 return false;
761 }, 761 },
762 762
(...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after
1784 if (node) { 1784 if (node) {
1785 this.treeOutline._selectedDOMNode = node; 1785 this.treeOutline._selectedDOMNode = node;
1786 this.treeOutline._selectedNodeChanged(); 1786 this.treeOutline._selectedNodeChanged();
1787 } 1787 }
1788 } 1788 }
1789 return true; 1789 return true;
1790 }, 1790 },
1791 1791
1792 __proto__: TreeElement.prototype 1792 __proto__: TreeElement.prototype
1793 } 1793 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698