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

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

Issue 1413103004: [DevTools] Reduce relayouts in DataGrid and ViewportControl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed comment Created 5 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/ui_lazy/DataGrid.js » ('j') | 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 node: node, 265 node: node,
266 offset: offset 266 offset: offset
267 }; 267 };
268 }, 268 },
269 269
270 /** 270 /**
271 * @param {?Selection} selection 271 * @param {?Selection} selection
272 */ 272 */
273 _updateSelectionModel: function(selection) 273 _updateSelectionModel: function(selection)
274 { 274 {
275 if (!selection || !selection.rangeCount) { 275 if (!selection || !selection.rangeCount || selection.isCollapsed) {
276 this._headSelection = null; 276 this._headSelection = null;
277 this._anchorSelection = null; 277 this._anchorSelection = null;
278 return false; 278 return false;
279 } 279 }
280 280
281 var firstSelected = Number.MAX_VALUE; 281 var firstSelected = Number.MAX_VALUE;
282 var lastSelected = -1; 282 var lastSelected = -1;
283 283
284 var range = selection.getRangeAt(0); 284 var range = selection.getRangeAt(0);
285 var hasVisibleSelection = false; 285 var hasVisibleSelection = false;
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 612
613 /** 613 /**
614 * @return {number} 614 * @return {number}
615 */ 615 */
616 _visibleHeight: function() 616 _visibleHeight: function()
617 { 617 {
618 // Use offsetHeight instead of clientHeight to avoid being affected by h orizontal scroll. 618 // Use offsetHeight instead of clientHeight to avoid being affected by h orizontal scroll.
619 return this.element.offsetHeight; 619 return this.element.offsetHeight;
620 } 620 }
621 } 621 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/ui_lazy/DataGrid.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698