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

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

Issue 2466123002: DevTools: reformat front-end code to match chromium style. (Closed)
Patch Set: Created 4 years, 1 month 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 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
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 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 get listItemElement() 620 get listItemElement()
621 { 621 {
622 return this._listItemNode; 622 return this._listItemNode;
623 }, 623 },
624 624
625 get childrenListElement() 625 get childrenListElement()
626 { 626 {
627 return this._childrenListNode; 627 return this._childrenListNode;
628 }, 628 },
629 629
630 /**
631 * @return {string|!Node}
632 */
630 get title() 633 get title()
631 { 634 {
632 return this._title; 635 return this._title;
633 }, 636 },
634 637
635 /** 638 /**
636 * @param {string|!Node} x 639 * @param {string|!Node} x
637 */ 640 */
638 set title(x) 641 set title(x)
639 { 642 {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 684
682 createIcon() 685 createIcon()
683 { 686 {
684 if (!this._iconElement) { 687 if (!this._iconElement) {
685 this._iconElement = createElementWithClass("div", "icon"); 688 this._iconElement = createElementWithClass("div", "icon");
686 this._listItemNode.insertBefore(this._iconElement, this._listItemNod e.firstChild); 689 this._listItemNode.insertBefore(this._iconElement, this._listItemNod e.firstChild);
687 this._ensureSelection(); 690 this._ensureSelection();
688 } 691 }
689 }, 692 },
690 693
694 /**
695 * @return {string}
696 */
691 get tooltip() 697 get tooltip()
692 { 698 {
693 return this._tooltip || ""; 699 return this._tooltip || "";
694 }, 700 },
695 701
696 /** 702 /**
697 * @param {string} x 703 * @param {string} x
698 */ 704 */
699 set tooltip(x) 705 set tooltip(x)
700 { 706 {
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 isEventWithinDisclosureTriangle: function(event) 1157 isEventWithinDisclosureTriangle: function(event)
1152 { 1158 {
1153 // FIXME: We should not use getComputedStyle(). For that we need to get rid of using ::before for disclosure triangle. (http://webk.it/74446) 1159 // FIXME: We should not use getComputedStyle(). For that we need to get rid of using ::before for disclosure triangle. (http://webk.it/74446)
1154 var paddingLeftValue = window.getComputedStyle(this._listItemNode).paddi ngLeft; 1160 var paddingLeftValue = window.getComputedStyle(this._listItemNode).paddi ngLeft;
1155 console.assert(paddingLeftValue.endsWith("px")); 1161 console.assert(paddingLeftValue.endsWith("px"));
1156 var computedLeftPadding = parseFloat(paddingLeftValue); 1162 var computedLeftPadding = parseFloat(paddingLeftValue);
1157 var left = this._listItemNode.totalOffsetLeft() + computedLeftPadding; 1163 var left = this._listItemNode.totalOffsetLeft() + computedLeftPadding;
1158 return event.pageX >= left && event.pageX <= left + TreeElement._ArrowTo ggleWidth && this._expandable; 1164 return event.pageX >= left && event.pageX <= left + TreeElement._ArrowTo ggleWidth && this._expandable;
1159 } 1165 }
1160 }; 1166 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698