Diff
Modified: trunk/LayoutTests/ChangeLog (151374 => 151375)
--- trunk/LayoutTests/ChangeLog 2013-06-10 10:03:44 UTC (rev 151374)
+++ trunk/LayoutTests/ChangeLog 2013-06-10 10:09:38 UTC (rev 151375)
@@ -1,3 +1,15 @@
+2013-06-10 Mátyás Mustoha <[email protected]>
+
+ Web Inspector: refactor statusBarItems getter in front-end.
+ https://bugs.webkit.org/show_bug.cgi?id=110114
+
+ Reviewed by Noam Rosenthal.
+
+ Fix layout test to correspond to refactoring.
+ Patch created by Andrey Lushnikov.
+
+ * inspector/extensions/extensions-panel.html:
+
2013-06-07 Roger Fong <[email protected]>
Layout info should never be cleared before delayed scroll information updates.
Modified: trunk/LayoutTests/inspector/extensions/extensions-panel.html (151374 => 151375)
--- trunk/LayoutTests/inspector/extensions/extensions-panel.html 2013-06-10 10:03:44 UTC (rev 151374)
+++ trunk/LayoutTests/inspector/extensions/extensions-panel.html 2013-06-10 10:09:38 UTC (rev 151375)
@@ -22,7 +22,7 @@
InspectorTest.dumpStatusBarButtons = function()
{
var panel = WebInspector.inspectorView.currentPanel();
- var items = panel.statusBarItems;
+ var items = panel.statusBarItems();
InspectorTest.addResult("Status bar buttons state:");
for (var i = 0; i < items.length; ++i) {
var item = items[i];
@@ -39,7 +39,7 @@
InspectorTest.clickButton = function(index)
{
var panel = WebInspector.inspectorView.currentPanel();
- panel.statusBarItems[index].click();
+ panel.statusBarItems()[index].click();
}
InspectorTest.clickOnURL = function()
Modified: trunk/Source/WebCore/ChangeLog (151374 => 151375)
--- trunk/Source/WebCore/ChangeLog 2013-06-10 10:03:44 UTC (rev 151374)
+++ trunk/Source/WebCore/ChangeLog 2013-06-10 10:09:38 UTC (rev 151375)
@@ -1,3 +1,68 @@
+2013-06-10 Mátyás Mustoha <[email protected]>
+
+ Web Inspector: refactor statusBarItems getter in front-end.
+ https://bugs.webkit.org/show_bug.cgi?id=110114
+
+ Reviewed by Noam Rosenthal.
+
+ Refactored "statusBarItems" methods from getters into functions and
+ moved default implementation from Panel.js to View.js.
+
+ Patch created by Andrey Lushnikov.
+
+ * inspector/front-end/AdvancedSearchController.js:
+ (WebInspector.SearchView.prototype.statusBarItems):
+ * inspector/front-end/ApplicationCacheItemsView.js:
+ (WebInspector.ApplicationCacheItemsView.prototype.statusBarItems):
+ * inspector/front-end/AuditsPanel.js:
+ (WebInspector.AuditsPanel.prototype.statusBarItems):
+ * inspector/front-end/CPUProfileView.js:
+ (WebInspector.CPUProfileView.prototype.statusBarItems):
+ * inspector/front-end/CSSSelectorProfileView.js:
+ (WebInspector.CSSSelectorProfileView.prototype.statusBarItems):
+ * inspector/front-end/CanvasProfileView.js:
+ (WebInspector.CanvasProfileView.prototype.statusBarItems):
+ (WebInspector.CanvasProfileType.prototype.statusBarItems):
+ * inspector/front-end/ConsolePanel.js:
+ (WebInspector.ConsolePanel.prototype.statusBarItems):
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype.statusBarItems):
+ * inspector/front-end/CookieItemsView.js:
+ (WebInspector.CookieItemsView.prototype.statusBarItems):
+ * inspector/front-end/DOMStorageItemsView.js:
+ (WebInspector.DOMStorageItemsView.prototype.statusBarItems):
+ * inspector/front-end/DatabaseTableView.js:
+ (WebInspector.DatabaseTableView.prototype.statusBarItems):
+ * inspector/front-end/Drawer.js:
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.prototype.statusBarItems):
+ * inspector/front-end/ExtensionPanel.js:
+ (WebInspector.ExtensionPanel.prototype.statusBarItems):
+ * inspector/front-end/FileSystemView.js:
+ (WebInspector.FileSystemView.prototype.statusBarItems):
+ * inspector/front-end/HeapSnapshotView.js:
+ * inspector/front-end/IndexedDBViews.js:
+ (WebInspector.IDBDataView.prototype.statusBarItems):
+ * inspector/front-end/NetworkPanel.js:
+ (WebInspector.NetworkLogView.prototype.statusBarItems):
+ (WebInspector.NetworkPanel.prototype.statusBarItems):
+ * inspector/front-end/Panel.js:
+ (WebInspector.Panel.prototype.wasShown):
+ * inspector/front-end/ProfilesPanel.js:
+ (WebInspector.ProfileType.prototype.statusBarItems):
+ (WebInspector.ProfilesPanel.prototype.statusBarItems):
+ (WebInspector.ProfilesPanel.prototype._updateProfileTypeSpecificUI):
+ (WebInspector.ProfilesPanel.prototype._showProfile):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel.prototype.statusBarItems):
+ (WebInspector.ResourcesPanel.prototype._innerShowView):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype.statusBarItems):
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel.prototype.statusBarItems):
+ * inspector/front-end/View.js:
+ (WebInspector.View.prototype.statusBarItems):
+
2013-06-10 Benjamin Poulain <[email protected]>
Add special tree walking for the single tag or class CSS query selectors
Modified: trunk/Source/WebCore/inspector/front-end/AdvancedSearchController.js (151374 => 151375)
--- trunk/Source/WebCore/inspector/front-end/AdvancedSearchController.js 2013-06-10 10:03:44 UTC (rev 151374)
+++ trunk/Source/WebCore/inspector/front-end/AdvancedSearchController.js 2013-06-10 10:09:38 UTC (rev 151375)
@@ -230,7 +230,7 @@
/**
* @return {Array.<Element>}
*/
- get statusBarItems()
+ statusBarItems: function()
{
return [this._searchStatusBarElement, this._searchResultsMessageElement];
},
Modified: trunk/Source/WebCore/inspector/front-end/ApplicationCacheItemsView.js (151374 => 151375)
--- trunk/Source/WebCore/inspector/front-end/ApplicationCacheItemsView.js 2013-06-10 10:03:44 UTC (rev 151374)
+++ trunk/Source/WebCore/inspector/front-end/ApplicationCacheItemsView.js 2013-06-10 10:09:38 UTC (rev 151375)
@@ -76,7 +76,7 @@
}
WebInspector.ApplicationCacheItemsView.prototype = {
- get statusBarItems()
+ statusBarItems: function()
{
return [
this.deleteButton.element,
Modified: trunk/Source/WebCore/inspector/front-end/AuditsPanel.js (151374 => 151375)
--- trunk/Source/WebCore/inspector/front-end/AuditsPanel.js 2013-06-10 10:03:44 UTC (rev 151374)
+++ trunk/Source/WebCore/inspector/front-end/AuditsPanel.js 2013-06-10 10:09:38 UTC (rev 151375)
@@ -64,7 +64,7 @@
}
WebInspector.AuditsPanel.prototype = {
- get statusBarItems()
+ statusBarItems: function()
{
return [this.clearResultsButton.element];
},
Modified: trunk/Source/WebCore/inspector/front-end/CPUProfileView.js (151374 => 151375)
--- trunk/Source/WebCore/inspector/front-end/CPUProfileView.js 2013-06-10 10:03:44 UTC (rev 151374)
+++ trunk/Source/WebCore/inspector/front-end/CPUProfileView.js 2013-06-10 10:09:38 UTC (rev 151375)
@@ -136,7 +136,7 @@
this.flameChart.update();
},
- get statusBarItems()
+ statusBarItems: function()
{
return [this.viewSelectComboBox.element, this.percentButton.element, this.focusButton.element, this.excludeButton.element, this.resetButton.element];
},
Modified: trunk/Source/WebCore/inspector/front-end/CSSSelectorProfileView.js (151374 => 151375)
--- trunk/Source/WebCore/inspector/front-end/CSSSelectorProfileView.js 2013-06-10 10:03:44 UTC (rev 151374)
+++ trunk/Source/WebCore/inspector/front-end/CSSSelectorProfileView.js 2013-06-10 10:09:38 UTC (rev 151375)
@@ -116,7 +116,7 @@
}
WebInspector.CSSSelectorProfileView.prototype = {
- get statusBarItems()
+ statusBarItems: function()
{
return [this.percentButton.element];
},
Modified: trunk/Source/WebCore/inspector/front-end/CanvasProfileView.js (151374 => 151375)
--- trunk/Source/WebCore/inspector/front-end/CanvasProfileView.js 2013-06-10 10:03:44 UTC (rev 151374)
+++ trunk/Source/WebCore/inspector/front-end/CanvasProfileView.js 2013-06-10 10:09:38 UTC (rev 151375)
@@ -97,7 +97,7 @@
this._linkifier.reset();
},
- get statusBarItems()
+ statusBarItems: function()
{
return [];
},
@@ -538,7 +538,7 @@
WebInspector.CanvasProfileType.TypeId = "CANVAS_PROFILE";
WebInspector.CanvasProfileType.prototype = {
- get statusBarItems()
+ statusBarItems: function()
{
return [this._capturingModeSelector.element, this._frameSelector.element];
},
Modified: trunk/Source/WebCore/inspector/front-end/ConsolePanel.js (151374 => 151375)
--- trunk/Source/WebCore/inspector/front-end/ConsolePanel.js 2013-06-10 10:03:44 UTC (rev 151374)
+++ trunk/Source/WebCore/inspector/front-end/ConsolePanel.js 2013-06-10 10:09:38 UTC (rev 151375)
@@ -40,9 +40,9 @@
}
WebInspector.ConsolePanel.prototype = {
- get statusBarItems()
+ statusBarItems: function()
{
- return this._view.statusBarItems;
+ return this._view.statusBarItems();
},
wasShown: function()
Modified: trunk/Source/WebCore/inspector/front-end/ConsoleView.js (151374 => 151375)
--- trunk/Source/WebCore/inspector/front-end/ConsoleView.js 2013-06-10 10:03:44 UTC (rev 151374)
+++ trunk/Source/WebCore/inspector/front-end/ConsoleView.js 2013-06-10 10:09:38 UTC (rev 151375)
@@ -134,7 +134,7 @@
}
WebInspector.ConsoleView.prototype = {
- get statusBarItems()
+ statusBarItems: function()
{
return [this._clearConsoleButton.element, this._frameSelector.element, this._contextSelector.element, this._filterBarElement];
},
Modified: trunk/Source/WebCore/inspector/front-end/CookieItemsView.js (151374 => 151375)
--- trunk/Source/WebCore/inspector/front-end/CookieItemsView.js 2013-06-10 10:03:44 UTC (rev 151374)
+++ trunk/Source/WebCore/inspector/front-end/CookieItemsView.js 2013-06-10 10:09:38 UTC (rev 151375)
@@ -58,7 +58,7 @@
}
WebInspector.CookieItemsView.prototype = {
- get statusBarItems()
+ statusBarItems: function()
{
return [this._refreshButton.element, this._clearButton.element, this._deleteButton.element];
},
Modified: trunk/Source/WebCore/inspector/front-end/DOMStorageItemsView.js (151374 => 151375)
--- trunk/Source/WebCore/inspector/front-end/DOMStorageItemsView.js 2013-06-10 10:03:44 UTC (rev 151374)
+++ trunk/Source/WebCore/inspector/front-end/DOMStorageItemsView.js 2013-06-10 10:09:38 UTC (rev 151375)
@@ -52,7 +52,7 @@
}
WebInspector.DOMStorageItemsView.prototype = {
- get statusBarItems()
+ statusBarItems: function()
{
return [this.refreshButton.element, this.deleteButton.element];
},
Modified: trunk/Source/WebCore/inspector/front-end/DatabaseTableView.js (151374 => 151375)
--- trunk/Source/WebCore/inspector/front-end/DatabaseTableView.js 2013-06-10 10:03:44 UTC (rev 151374)
+++ trunk/Source/WebCore/inspector/front-end/DatabaseTableView.js 2013-06-10 10:09:38 UTC (rev 151375)
@@ -47,7 +47,7 @@
this.update();
},
- get statusBarItems()
+ statusBarItems: function()
{
return [this.refreshButton.element];
},
Modified: trunk/Source/WebCore/inspector/front-end/Drawer.js (151374 => 151375)
--- trunk/Source/WebCore/inspector/front-end/Drawer.js 2013-06-10 10:03:44 UTC (rev 151374)
+++ trunk/Source/WebCore/inspector/front-end/Drawer.js 2013-06-10 10:09:38 UTC (rev 151375)
@@ -80,7 +80,7 @@
this._view = view;
- var statusBarItems = this._view.statusBarItems || [];
+ var statusBarItems = this._view.statusBarItems() || [];
this._viewStatusBar.removeChildren();
for (var i = 0; i < statusBarItems.length; ++i)
this._viewStatusBar.appendChild(statusBarItems[i]);
Modified: trunk/Source/WebCore/inspector/front-end/ElementsPanel.js (151374 => 151375)
--- trunk/Source/WebCore/inspector/front-end/ElementsPanel.js 2013-06-10 10:03:44 UTC (rev 151374)
+++ trunk/Source/WebCore/inspector/front-end/ElementsPanel.js 2013-06-10 10:09:38 UTC (rev 151375)
@@ -113,7 +113,7 @@
}
WebInspector.ElementsPanel.prototype = {
- get statusBarItems()
+ statusBarItems: function()
{
return [this.crumbsElement];
},
Modified: trunk/Source/WebCore/inspector/front-end/ExtensionPanel.js (151374 => 151375)
--- trunk/Source/WebCore/inspector/front-end/ExtensionPanel.js 2013-06-10 10:03:44 UTC (rev 151374)
+++ trunk/Source/WebCore/inspector/front-end/ExtensionPanel.js 2013-06-10 10:09:38 UTC (rev 151375)
@@ -50,7 +50,7 @@
return WebInspector.View.prototype.defaultFocusedElement.call(this);
},
- get statusBarItems()
+ statusBarItems: function()
{
return this._statusBarItems;
},
Modified: trunk/Source/WebCore/inspector/front-end/FileSystemView.js (151374 => 151375)
--- trunk/Source/WebCore/inspector/front-end/FileSystemView.js 2013-06-10 10:03:44 UTC (rev 151374)
+++ trunk/Source/WebCore/inspector/front-end/FileSystemView.js 2013-06-10 10:09:38 UTC (rev 151375)
@@ -61,9 +61,9 @@
WebInspector.FileSystemView.prototype = {
/**
- * @type {Array.<Element>}
+ * @return {Array.<Element>}
*/
- get statusBarItems()
+ statusBarItems: function()
{
return [this._refreshButton.element, this._deleteButton.element];
},
Modified: trunk/Source/WebCore/inspector/front-end/HeapSnapshotView.js (151374 => 151375)
--- trunk/Source/WebCore/inspector/front-end/HeapSnapshotView.js 2013-06-10 10:03:44 UTC (rev 151374)
+++ trunk/Source/WebCore/inspector/front-end/HeapSnapshotView.js 2013-06-10 10:09:38 UTC (rev 151375)
@@ -171,7 +171,7 @@
this.retainmentDataGrid.dispose();
},
- get statusBarItems()
+ statusBarItems: function()
{
/**
* @param {boolean=} hidden
Modified: trunk/Source/WebCore/inspector/front-end/IndexedDBViews.js (151374 => 151375)
--- trunk/Source/WebCore/inspector/front-end/IndexedDBViews.js 2013-06-10 10:03:44 UTC (rev 151374)
+++ trunk/Source/WebCore/inspector/front-end/IndexedDBViews.js 2013-06-10 10:09:38 UTC (rev 151375)
@@ -362,7 +362,7 @@
this._model.clearObjectStore(this._databaseId, this._objectStore.name, cleared.bind(this));
},
- get statusBarItems()
+ statusBarItems: function()
{
return [this._refreshButton.element, this._clearButton.element];
},
Modified: trunk/Source/WebCore/inspector/front-end/NetworkPanel.js (151374 => 151375)
--- trunk/Source/WebCore/inspector/front-end/NetworkPanel.js 2013-06-10 10:03:44 UTC (rev 151374)
+++ trunk/Source/WebCore/inspector/front-end/NetworkPanel.js 2013-06-10 10:09:38 UTC (rev 151375)
@@ -121,7 +121,7 @@
this.switchToDetailedView();
},
- get statusBarItems()
+ statusBarItems: function()
{
return [this._largerRequestsButton.element, this._preserveLogToggle.element, this._clearButton.element, this._filterBarElement, this._progressBarContainer];
},
@@ -1499,9 +1499,9 @@
}
WebInspector.NetworkPanel.prototype = {
- get statusBarItems()
+ statusBarItems: function()
{
- return this._networkLogView.statusBarItems;
+ return this._networkLogView.statusBarItems();
},
elementsToRestoreScrollPositionsFor: function()
Modified: trunk/Source/WebCore/inspector/front-end/Panel.js (151374 => 151375)
--- trunk/Source/WebCore/inspector/front-end/Panel.js 2013-06-10 10:03:44 UTC (rev 151374)
+++ trunk/Source/WebCore/inspector/front-end/Panel.js 2013-06-10 10:09:38 UTC (rev 151375)
@@ -62,7 +62,7 @@
{
var panelStatusBar = document.getElementById("panel-status-bar")
var drawerViewAnchor = document.getElementById("drawer-view-anchor");
- var statusBarItems = this.statusBarItems;
+ var statusBarItems = this.statusBarItems();
if (statusBarItems) {
this._statusBarItemContainer = document.createElement("div");
for (var i = 0; i < statusBarItems.length; ++i)
@@ -206,12 +206,6 @@
return this._panelName + "SidebarWidth";
},
- // Should be implemented by ancestors.
-
- get statusBarItems()
- {
- },
-
/**
* @param {WebInspector.Event} event
*/
Modified: trunk/Source/WebCore/inspector/front-end/ProfilesPanel.js (151374 => 151375)
--- trunk/Source/WebCore/inspector/front-end/ProfilesPanel.js 2013-06-10 10:03:44 UTC (rev 151374)
+++ trunk/Source/WebCore/inspector/front-end/ProfilesPanel.js 2013-06-10 10:09:38 UTC (rev 151375)
@@ -50,7 +50,7 @@
}
WebInspector.ProfileType.prototype = {
- get statusBarItems()
+ statusBarItems: function()
{
return [];
},
@@ -461,7 +461,7 @@
this._createFileSelectorElement();
},
- get statusBarItems()
+ statusBarItems: function()
{
return this._statusBarButtons.select("element").concat(this._profileTypeStatusBarItemsContainer, this._profileViewStatusBarItemsContainer);
},
@@ -522,7 +522,7 @@
this.recordButton.title = this._selectedProfileType.buttonTooltip;
this._profileTypeStatusBarItemsContainer.removeChildren();
- var statusBarItems = this._selectedProfileType.statusBarItems;
+ var statusBarItems = this._selectedProfileType.statusBarItems();
if (statusBarItems) {
for (var i = 0; i < statusBarItems.length; ++i)
this._profileTypeStatusBarItemsContainer.appendChild(statusBarItems[i]);
@@ -772,7 +772,7 @@
this._profileViewStatusBarItemsContainer.removeChildren();
- var statusBarItems = view.statusBarItems;
+ var statusBarItems = view.statusBarItems();
if (statusBarItems)
for (var i = 0; i < statusBarItems.length; ++i)
this._profileViewStatusBarItemsContainer.appendChild(statusBarItems[i]);
Modified: trunk/Source/WebCore/inspector/front-end/ResourcesPanel.js (151374 => 151375)
--- trunk/Source/WebCore/inspector/front-end/ResourcesPanel.js 2013-06-10 10:03:44 UTC (rev 151374)
+++ trunk/Source/WebCore/inspector/front-end/ResourcesPanel.js 2013-06-10 10:09:38 UTC (rev 151375)
@@ -118,7 +118,7 @@
}
WebInspector.ResourcesPanel.prototype = {
- get statusBarItems()
+ statusBarItems: function()
{
return [this.storageViewStatusBarItemsContainer];
},
@@ -557,7 +557,7 @@
this.visibleView = view;
this.storageViewStatusBarItemsContainer.removeChildren();
- var statusBarItems = view.statusBarItems || [];
+ var statusBarItems = view.statusBarItems() || [];
for (var i = 0; i < statusBarItems.length; ++i)
this.storageViewStatusBarItemsContainer.appendChild(statusBarItems[i]);
},
Modified: trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js (151374 => 151375)
--- trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js 2013-06-10 10:03:44 UTC (rev 151374)
+++ trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js 2013-06-10 10:09:38 UTC (rev 151375)
@@ -187,7 +187,7 @@
}
WebInspector.ScriptsPanel.prototype = {
- get statusBarItems()
+ statusBarItems: function()
{
return [this.enableToggleButton.element, this._pauseOnExceptionButton.element, this._toggleFormatSourceButton.element, this._scriptViewStatusBarItemsContainer];
},
Modified: trunk/Source/WebCore/inspector/front-end/TimelinePanel.js (151374 => 151375)
--- trunk/Source/WebCore/inspector/front-end/TimelinePanel.js 2013-06-10 10:03:44 UTC (rev 151374)
+++ trunk/Source/WebCore/inspector/front-end/TimelinePanel.js 2013-06-10 10:09:38 UTC (rev 151375)
@@ -221,7 +221,7 @@
return this._calculator;
},
- get statusBarItems()
+ statusBarItems: function()
{
return this._statusBarItems.select("element").concat([
this._miscStatusBarItems
Modified: trunk/Source/WebCore/inspector/front-end/View.js (151374 => 151375)
--- trunk/Source/WebCore/inspector/front-end/View.js 2013-06-10 10:03:44 UTC (rev 151374)
+++ trunk/Source/WebCore/inspector/front-end/View.js 2013-06-10 10:09:38 UTC (rev 151375)
@@ -45,7 +45,15 @@
WebInspector.View._cssFileToStyleElement = {};
WebInspector.View.prototype = {
- /**
+ /**
+ * @return {Array.<Element>}
+ */
+ statusBarItems: function()
+ {
+ return [];
+ },
+
+ /**
* @return {?Element}
*/
statusBarText: function()