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

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

Issue 2688623007: DevTools: preload treeoutline triangles image (Closed)
Patch Set: use window.devicePixelRatio Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1206 var paddingLeftValue = window.getComputedStyle(this._listItemNode).paddingLe ft; 1206 var paddingLeftValue = window.getComputedStyle(this._listItemNode).paddingLe ft;
1207 console.assert(paddingLeftValue.endsWith('px')); 1207 console.assert(paddingLeftValue.endsWith('px'));
1208 var computedLeftPadding = parseFloat(paddingLeftValue); 1208 var computedLeftPadding = parseFloat(paddingLeftValue);
1209 var left = this._listItemNode.totalOffsetLeft() + computedLeftPadding; 1209 var left = this._listItemNode.totalOffsetLeft() + computedLeftPadding;
1210 return event.pageX >= left && event.pageX <= left + UI.TreeElement._ArrowTog gleWidth && this._expandable; 1210 return event.pageX >= left && event.pageX <= left + UI.TreeElement._ArrowTog gleWidth && this._expandable;
1211 } 1211 }
1212 }; 1212 };
1213 1213
1214 /** @const */ 1214 /** @const */
1215 UI.TreeElement._ArrowToggleWidth = 10; 1215 UI.TreeElement._ArrowToggleWidth = 10;
1216
1217 (function() {
pfeldman 2017/02/13 18:18:12 Is this temporary? I wish all the generic images w
1218 var img = new Image();
1219 if (window.devicePixelRatio > 1)
1220 img.src = 'Images/treeoutlineTriangles_2x.png';
1221 else
1222 img.src = 'Images/treeoutlineTriangles.png';
1223 UI.TreeElement._imagePreload = img;
1224 })();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698