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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui_lazy/DataGrid.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, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/ui/ViewportControl.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/ui_lazy/DataGrid.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui_lazy/DataGrid.js b/third_party/WebKit/Source/devtools/front_end/ui_lazy/DataGrid.js
index a095a14484483b5a3a6cfaf4065a98ffdbdc9d14..1538fab3ebe2e1c237c3165d1d50a2bb542a4970 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui_lazy/DataGrid.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui_lazy/DataGrid.js
@@ -86,6 +86,9 @@ WebInspector.DataGrid = function(columnsArray, editCallback, deleteCallback, ref
this._bottomFillerRow = createElementWithClass("tr", "data-grid-filler-row revealed");
this.setVerticalPadding(0, 0);
+ /** @type {boolean} */
+ this._inline = false;
+
/** @type {!Array.<!WebInspector.DataGrid.ColumnDescriptor>} */
this._columnsArray = columnsArray;
/** @type {!Array.<!WebInspector.DataGrid.ColumnDescriptor>} */
@@ -314,6 +317,7 @@ WebInspector.DataGrid.prototype = {
{
this.element.classList.add("inline");
this._cornerWidth = 0;
+ this._inline = true;
this.updateWidths();
},
@@ -694,6 +698,15 @@ WebInspector.DataGrid.prototype = {
return this._scrollContainer;
},
+ /**
+ * @override
+ * @return {!Array.<!Element>}
+ */
+ elementsToRestoreScrollPositionsFor: function()
+ {
+ return this._inline ? [] : [this._scrollContainer];
+ },
+
_positionResizers: function()
{
var headerTableColumns = this._headerTableColumnGroup.children;
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/ui/ViewportControl.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698