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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js

Issue 1760093003: [DevTools] Prepare UI module for closure compiler roll (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-array-from
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js b/third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js
index 66448f5d3e20fb0f91a635e719ee9d10a25f9891..1a342f310dcdc6a6aa3a15027ca482c090b4467f 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js
@@ -624,10 +624,8 @@ WebInspector.TabbedPane.prototype = {
var maxWidth = this._shrinkableTabs ? this._calculateMaxWidth(measuredWidths.slice(), this._totalWidth()) : Number.MAX_VALUE;
var i = 0;
- for (var tabId in this._tabs) {
- var tab = this._tabs[tabId];
+ for (var tab of this._tabs)
tab.setWidth(this._verticalTabLayout ? -1 : Math.min(maxWidth, measuredWidths[i++]));
- }
},
_measureWidths: function()
@@ -635,8 +633,7 @@ WebInspector.TabbedPane.prototype = {
// Add all elements to measure into this._tabsElement
this._tabsElement.style.setProperty("width", "2000px");
var measuringTabElements = [];
- for (var tabId in this._tabs) {
- var tab = this._tabs[tabId];
+ for (var tab of this._tabs) {
if (typeof tab._measuredWidth === "number")
continue;
var measuringTabElement = tab._createTabElement(true);
@@ -657,8 +654,8 @@ WebInspector.TabbedPane.prototype = {
// Combine the results.
var measuredWidths = [];
- for (var tabId in this._tabs)
- measuredWidths.push(this._tabs[tabId]._measuredWidth);
+ for (var tab of this._tabs)
+ measuredWidths.push(tab._measuredWidth);
this._tabsElement.style.removeProperty("width");
return measuredWidths;

Powered by Google App Engine
This is Rietveld 408576698