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

Unified Diff: Source/devtools/blink/chromeServerProfile/Default/Cache/f_000046

Issue 242263007: Add <label> to items in Event Listener Breakpoint of Chrome Dev Tools Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 6 years, 8 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: Source/devtools/blink/chromeServerProfile/Default/Cache/f_000046
diff --git a/Source/devtools/front_end/TabbedPane.js b/Source/devtools/blink/chromeServerProfile/Default/Cache/f_000046
similarity index 96%
copy from Source/devtools/front_end/TabbedPane.js
copy to Source/devtools/blink/chromeServerProfile/Default/Cache/f_000046
index 6b2ebf2c4ac63bd6531169ff235d4e1497f18720..5d344f106ad837495a909f1493aec62e04796378 100644
--- a/Source/devtools/front_end/TabbedPane.js
+++ b/Source/devtools/blink/chromeServerProfile/Default/Cache/f_000046
@@ -36,16 +36,12 @@ WebInspector.TabbedPane = function()
{
WebInspector.VBox.call(this);
this.element.classList.add("tabbed-pane");
- this.element.tabIndex = -1;
this._headerElement = this.element.createChild("div", "tabbed-pane-header");
this._headerContentsElement = this._headerElement.createChild("div", "tabbed-pane-header-contents");
this._tabsElement = this._headerContentsElement.createChild("div", "tabbed-pane-header-tabs");
this._contentElement = this.element.createChild("div", "tabbed-pane-content scroll-target");
- /** @type {!Array.<!WebInspector.TabbedPaneTab>} */
this._tabs = [];
- /** @type {!Array.<!WebInspector.TabbedPaneTab>} */
this._tabsHistory = [];
- /** @type {!Object.<string, !WebInspector.TabbedPaneTab>} */
this._tabsById = {};
this._dropDownButton = this._createDropDownButton();
@@ -66,22 +62,6 @@ WebInspector.TabbedPane.prototype = {
},
/**
- * @return {!Array.<!WebInspector.View>}
- */
- tabViews: function()
- {
- /**
- * @param {!WebInspector.TabbedPaneTab} tab
- * @return {!WebInspector.View}
- */
- function tabToView(tab)
- {
- return tab.view;
- }
- return this._tabs.map(tabToView);
- },
-
- /**
* @return {string}
*/
get selectedTabId()
@@ -137,7 +117,7 @@ WebInspector.TabbedPane.prototype = {
if (this.visibleView)
this.visibleView.focus();
else
- this.element.focus();
+ WebInspector.View.prototype.focus.call(this);
},
/**
@@ -217,21 +197,18 @@ WebInspector.TabbedPane.prototype = {
this.closeTabs([id], userGesture);
},
- /**
- * @param {!Array.<string>} ids
- * @param {boolean=} userGesture
- */
- closeTabs: function(ids, userGesture)
- {
- var focused = this.hasFocus();
- for (var i = 0; i < ids.length; ++i)
- this._innerCloseTab(ids[i], userGesture);
- this._updateTabElements();
- if (this._tabsHistory.length)
- this.selectTab(this._tabsHistory[0].id, false);
- if (focused)
- this.focus();
- },
+ /**
+ * @param {!Array.<string>} ids
+ * @param {boolean=} userGesture
+ */
+ closeTabs: function(ids, userGesture)
+ {
+ for (var i = 0; i < ids.length; ++i)
+ this._innerCloseTab(ids[i], userGesture);
+ this._updateTabElements();
+ if (this._tabsHistory.length)
+ this.selectTab(this._tabsHistory[0].id, false);
+ },
/**
* @param {string} id
@@ -301,7 +278,6 @@ WebInspector.TabbedPane.prototype = {
*/
selectTab: function(id, userGesture)
{
- var focused = this.hasFocus();
var tab = this._tabsById[id];
if (!tab)
return;
@@ -314,10 +290,8 @@ WebInspector.TabbedPane.prototype = {
this._tabsHistory.splice(this._tabsHistory.indexOf(tab), 1);
this._tabsHistory.splice(0, 0, tab);
-
+
this._updateTabElements();
- if (focused)
- this.focus();
var eventData = { tabId: id, view: tab.view, isUserGesture: userGesture };
this.dispatchEventToListeners(WebInspector.TabbedPane.EventTypes.TabSelected, eventData);

Powered by Google App Engine
This is Rietveld 408576698