Diff
Modified: trunk/Source/WebCore/ChangeLog (143223 => 143224)
--- trunk/Source/WebCore/ChangeLog 2013-02-18 16:34:41 UTC (rev 143223)
+++ trunk/Source/WebCore/ChangeLog 2013-02-18 16:41:30 UTC (rev 143224)
@@ -1,3 +1,32 @@
+2013-02-18 Pavel Feldman <pfeld...@chromium.org>
+
+ Web Inspector: hide vertical-sidebar-split in dock-to-right mode behind single experimental flag.
+ https://bugs.webkit.org/show_bug.cgi?id=110119
+
+ Reviewed by Vsevolod Vlasov.
+
+ Removed context menus, made it toggle automatically upon dock orientation change.
+
+ * inspector/front-end/DockController.js:
+ (WebInspector.DockController.prototype._toggleDockState):
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel):
+ (WebInspector.ElementsPanel.prototype._sidebarContextMenuEventFired):
+ (WebInspector.ElementsPanel.prototype._dockSideChanged):
+ (WebInspector.ElementsPanel.prototype._setVerticalSplit):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel):
+ (WebInspector.ScriptsPanel.prototype._appendUISourceCodeItems):
+ (WebInspector.ScriptsPanel.prototype._dockSideChanged):
+ * inspector/front-end/Settings.js:
+ (WebInspector.ExperimentsSettings):
+ * inspector/front-end/inspector.css:
+ * inspector/front-end/scriptsPanel.css:
+ (#scripts-sidebar-stack-pane):
+ (div.sidebar-pane-stack#scripts-debug-sidebar-contents):
+ * inspector/front-end/tabbedPane.css:
+ (.tabbed-pane):
+
2013-02-18 ChangSeok Oh <shivami...@gmail.com>
[GTK] Fix nits for configuration
Modified: trunk/Source/WebCore/inspector/front-end/DockController.js (143223 => 143224)
--- trunk/Source/WebCore/inspector/front-end/DockController.js 2013-02-18 16:34:41 UTC (rev 143223)
+++ trunk/Source/WebCore/inspector/front-end/DockController.js 2013-02-18 16:41:30 UTC (rev 143224)
@@ -30,6 +30,7 @@
/**
* @constructor
+ * @extends {WebInspector.Object}
*/
WebInspector.DockController = function()
{
@@ -50,6 +51,10 @@
Undocked: "undocked"
}
+WebInspector.DockController.Events = {
+ DockSideChanged: "DockSideChanged"
+}
+
WebInspector.DockController.prototype = {
/**
* @return {Element}
@@ -84,6 +89,7 @@
else
WebInspector.userMetrics.WindowUndocked.record();
this._updateUI();
+ this.dispatchEventToListeners(WebInspector.DockController.Events.DockSideChanged, this._dockSide);
},
/**
@@ -182,7 +188,9 @@
case "undock": action = "" break;
}
InspectorFrontendHost.requestSetDockSide(action);
- }
+ },
+
+ __proto__: WebInspector.Object.prototype
}
/**
Modified: trunk/Source/WebCore/inspector/front-end/ElementsPanel.js (143223 => 143224)
--- trunk/Source/WebCore/inspector/front-end/ElementsPanel.js 2013-02-18 16:34:41 UTC (rev 143223)
+++ trunk/Source/WebCore/inspector/front-end/ElementsPanel.js 2013-02-18 16:41:30 UTC (rev 143224)
@@ -95,14 +95,9 @@
this.sidebarPanes.styles.addEventListener("style property toggled", this._stylesPaneEdited, this);
this.sidebarPanes.metrics.addEventListener("metrics edited", this._metricsPaneEdited, this);
- this._splitDirectionSetting = WebInspector.settings.createSetting(this.name + "PanelSplitHorizontally", false);
- this._splitDirectionSetting.addChangeListener(this._arrangeSidebarPanes.bind(this));
+ WebInspector.dockController.addEventListener(WebInspector.DockController.Events.DockSideChanged, this._dockSideChanged.bind(this));
+ this._dockSideChanged();
- this._splitSidebarSetting = WebInspector.settings.createSetting(this.name + "PanelSplitSidebar", false);
- this._splitSidebarSetting.addChangeListener(this._arrangeSidebarPanes.bind(this));
-
- this._arrangeSidebarPanes();
-
this._popoverHelper = new WebInspector.PopoverHelper(this.element, this._getPopoverAnchor.bind(this), this._showPopover.bind(this));
this._popoverHelper.setTimeout(0);
@@ -352,8 +347,6 @@
contextMenu.appendSeparator();
contextMenu.appendCheckboxItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Word wrap" : "Word Wrap"), toggleWordWrap.bind(this), WebInspector.settings.domWordWrap.get());
- this._populateContextMenuForSidebar(contextMenu);
-
contextMenu.show();
},
@@ -1097,41 +1090,32 @@
_sidebarContextMenuEventFired: function(event)
{
var contextMenu = new WebInspector.ContextMenu(event);
- this._populateContextMenuForSidebar(contextMenu);
contextMenu.show();
},
- _populateContextMenuForSidebar: function(contextMenu)
+ _dockSideChanged: function()
{
- if (!WebInspector.experimentsSettings.horizontalPanelSplit.isEnabled())
- return;
-
- function toggleSetting(setting)
- {
- setting.set(!setting.get());
- }
- contextMenu.appendCheckboxItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Split horizontally" : "Split Horizontally"), toggleSetting.bind(this, this._splitDirectionSetting), this._splitDirectionSetting.get());
-
- if (!this.splitView.isVertical())
- contextMenu.appendCheckboxItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Split sidebar" : "Split Sidebar"), toggleSetting.bind(this, this._splitSidebarSetting), this._splitSidebarSetting.get());
+ var dockSide = WebInspector.dockController.dockSide();
+ this._setVerticalSplit(dockSide !== WebInspector.DockController.State.DockedToRight);
},
- _arrangeSidebarPanes: function()
+ /**
+ * @param {boolean} vertical
+ */
+ _setVerticalSplit: function(vertical)
{
+ if (this.sidebarPaneView && vertical === this.splitView.isVertical())
+ return;
+
if (this.sidebarPaneView)
this.sidebarPaneView.detach();
- var vertical = !WebInspector.experimentsSettings.horizontalPanelSplit.isEnabled() || !this._splitDirectionSetting.get();
this.splitView.setVertical(vertical);
if (vertical) {
this.sidebarPaneView = new WebInspector.SidebarPaneStack();
for (var pane in this.sidebarPanes)
this.sidebarPaneView.addPane(this.sidebarPanes[pane]);
- } else if (!this._splitSidebarSetting.get()) {
- this.sidebarPaneView = new WebInspector.SidebarTabbedPane();
- for (var pane in this.sidebarPanes)
- this.sidebarPaneView.addPane(this.sidebarPanes[pane]);
} else {
this.sidebarPaneView = new WebInspector.SplitView(true, this.name + "PanelSplitSidebarRatio", 0.5);
Modified: trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js (143223 => 143224)
--- trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js 2013-02-18 16:34:41 UTC (rev 143223)
+++ trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js 2013-02-18 16:41:30 UTC (rev 143224)
@@ -74,8 +74,6 @@
this.splitView.setMinimumSidebarWidth(Preferences.minScriptsSidebarWidth);
this.splitView.setMinimumMainWidthPercent(minimumDebugSidebarWidthPercent);
- this.sidebarElement.appendChild(this.debugToolbar);
-
this.debugSidebarResizeWidgetElement = document.createElement("div");
this.debugSidebarResizeWidgetElement.id = "scripts-debug-sidebar-resizer-widget";
this.splitView.installResizer(this.debugSidebarResizeWidgetElement);
@@ -107,10 +105,7 @@
this._editorContainer.addEventListener(WebInspector.TabbedEditorContainer.Events.EditorClosed, this._editorClosed, this);
this.splitView.mainElement.appendChild(this.debugSidebarResizeWidgetElement);
- this.splitView.mainElement.addEventListener("contextmenu", this._contextMenuEventFired.bind(this), false);
- this.splitView.sidebarElement.addEventListener("contextmenu", this._sidebarContextMenuEventFired.bind(this), false);
-
this.sidebarPanes = {};
this.sidebarPanes.watchExpressions = new WebInspector.WatchExpressionsSidebarPane();
this.sidebarPanes.callstack = new WebInspector.CallStackSidebarPane();
@@ -125,14 +120,9 @@
this.sidebarPanes.workerList = new WebInspector.WorkersSidebarPane(WebInspector.workerManager);
}
- this._splitDirectionSetting = WebInspector.settings.createSetting(this.name + "PanelSplitHorizontally", false);
- this._splitDirectionSetting.addChangeListener(this._arrangeSidebarPanes.bind(this));
+ WebInspector.dockController.addEventListener(WebInspector.DockController.Events.DockSideChanged, this._dockSideChanged.bind(this));
+ this._dockSideChanged();
- this._splitSidebarSetting = WebInspector.settings.createSetting(this.name + "PanelSplitSidebar", false);
- this._splitSidebarSetting.addChangeListener(this._arrangeSidebarPanes.bind(this));
-
- this._arrangeSidebarPanes();
-
this.sidebarPanes.callstack.registerShortcuts(this.registerShortcuts.bind(this));
this.registerShortcuts(WebInspector.ScriptsPanelDescriptor.ShortcutKeys.EvaluateSelectionInConsole, this._evaluateSelectionInConsole.bind(this));
this.registerShortcuts(WebInspector.ScriptsPanelDescriptor.ShortcutKeys.GoToMember, this._showOutlineDialog.bind(this));
@@ -1120,9 +1110,6 @@
var resource = WebInspector.resourceForURL(uiSourceCode.url);
if (resource && resource.request)
contextMenu.appendApplicableItems(resource.request);
-
- if (WebInspector.inspectorView.currentPanel() === this)
- this._populateContextMenuForSidebar(contextMenu);
},
/**
@@ -1161,56 +1148,37 @@
WebInspector.OpenResourceDialog.show(this, this.editorView.mainElement);
},
- _contextMenuEventFired: function(event)
+ _dockSideChanged: function()
{
- var contextMenu = new WebInspector.ContextMenu(event);
- this._populateContextMenuForSidebar(contextMenu);
- contextMenu.show();
+ var dockSide = WebInspector.dockController.dockSide();
+ this._setVerticalSplit(dockSide !== WebInspector.DockController.State.DockedToRight);
},
- _sidebarContextMenuEventFired: function(event)
+ /**
+ * @param {boolean} vertical
+ */
+ _setVerticalSplit: function(vertical)
{
- var contextMenu = new WebInspector.ContextMenu(event);
- this._populateContextMenuForSidebar(contextMenu);
- contextMenu.show();
- },
-
- _populateContextMenuForSidebar: function(contextMenu)
- {
- if (!WebInspector.experimentsSettings.horizontalPanelSplit.isEnabled())
+ if (this.sidebarPaneView && vertical === this.splitView.isVertical())
return;
- function toggleSetting(setting)
- {
- setting.set(!setting.get());
- }
- contextMenu.appendCheckboxItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Split horizontally" : "Split Horizontally"), toggleSetting.bind(this, this._splitDirectionSetting), this._splitDirectionSetting.get());
-
- if (!this.splitView.isVertical())
- contextMenu.appendCheckboxItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Split sidebar" : "Split Sidebar"), toggleSetting.bind(this, this._splitSidebarSetting), this._splitSidebarSetting.get());
- },
-
- _arrangeSidebarPanes: function()
- {
if (this.sidebarPaneView)
this.sidebarPaneView.detach();
- var vertical = !WebInspector.experimentsSettings.horizontalPanelSplit.isEnabled() || !this._splitDirectionSetting.get();
this.splitView.setVertical(vertical);
if (vertical) {
this.sidebarPaneView = new WebInspector.SidebarPaneStack();
for (var pane in this.sidebarPanes)
this.sidebarPaneView.addPane(this.sidebarPanes[pane]);
- } else if (!this._splitSidebarSetting.get()) {
- this.sidebarPaneView = new WebInspector.SidebarTabbedPane();
- for (var pane in this.sidebarPanes)
- this.sidebarPaneView.addPane(this.sidebarPanes[pane]);
+
+ this.sidebarElement.appendChild(this.debugToolbar);
} else {
this.sidebarPaneView = new WebInspector.SplitView(true, this.name + "PanelSplitSidebarRatio", 0.5);
var group1 = new WebInspector.SidebarPaneStack();
group1.show(this.sidebarPaneView.firstElement());
+ group1.element.id = "scripts-sidebar-stack-pane";
group1.addPane(this.sidebarPanes.watchExpressions);
group1.addPane(this.sidebarPanes.callstack);
group1.addPane(this.sidebarPanes.scopechain);
@@ -1221,6 +1189,8 @@
group2.addPane(this.sidebarPanes.domBreakpoints);
group2.addPane(this.sidebarPanes.xhrBreakpoints);
group2.addPane(this.sidebarPanes.eventListenerBreakpoints);
+
+ this.sidebarPaneView.firstElement().appendChild(this.debugToolbar);
}
this.sidebarPaneView.element.id = "scripts-debug-sidebar-contents";
Modified: trunk/Source/WebCore/inspector/front-end/Settings.js (143223 => 143224)
--- trunk/Source/WebCore/inspector/front-end/Settings.js 2013-02-18 16:34:41 UTC (rev 143223)
+++ trunk/Source/WebCore/inspector/front-end/Settings.js 2013-02-18 16:41:30 UTC (rev 143224)
@@ -212,7 +212,6 @@
this.cssRegions = this._createExperiment("cssRegions", "CSS Regions Support");
this.showOverridesInDrawer = this._createExperiment("showOverridesInDrawer", "Show Overrides in drawer");
this.fileSystemProject = this._createExperiment("fileSystemProject", "File system folders in Sources Panel");
- this.horizontalPanelSplit = this._createExperiment("horizontalPanelSplit", "Allow horizontal split in Elements and Sources panels");
this.showWhitespaceInEditor = this._createExperiment("showWhitespaceInEditor", "Show whitespace characters in editor");
this.textEditorSmartBraces = this._createExperiment("textEditorSmartBraces", "Enable smart braces in text editor");
Modified: trunk/Source/WebCore/inspector/front-end/inspector.css (143223 => 143224)
--- trunk/Source/WebCore/inspector/front-end/inspector.css 2013-02-18 16:34:41 UTC (rev 143223)
+++ trunk/Source/WebCore/inspector/front-end/inspector.css 2013-02-18 16:41:30 UTC (rev 143224)
@@ -2016,13 +2016,6 @@
background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(194, 194, 194)), to(rgb(239, 239, 239)));
}
-body.inactive .panel-enabler-view button:not(.status-bar-item), .panel-enabler-view button:disabled:not(.status-bar-item), body.inactive .pane-title-button, .pane-title-button:disabled, body.inactive button.show-all-nodes {
- color: rgb(130, 130, 130);
- border-color: rgb(212, 212, 212);
- background-color: rgb(239, 239, 239);
- background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(250, 250, 250)), to(rgb(235, 235, 235)));
-}
-
button.enable-toggle-status-bar-item .glyph {
-webkit-mask-position: -192px 0;
}
Modified: trunk/Source/WebCore/inspector/front-end/scriptsPanel.css (143223 => 143224)
--- trunk/Source/WebCore/inspector/front-end/scriptsPanel.css 2013-02-18 16:34:41 UTC (rev 143223)
+++ trunk/Source/WebCore/inspector/front-end/scriptsPanel.css 2013-02-18 16:41:30 UTC (rev 143224)
@@ -62,15 +62,6 @@
border-bottom: 1px solid rgb(202, 202, 202);
}
-#scripts-debug-sidebar-contents {
- position: absolute;
- top: 22px;
- bottom: 0;
- left: 0;
- right: 0;
- overflow: auto;
-}
-
#scripts-editor-toolbar {
position: relative;
margin-top: -1px;
@@ -307,3 +298,12 @@
.status-bar-item.scripts-debugger-show-hide-button.toggled-hidden > .glyph {
-webkit-mask-position: -16px -16px;
}
+
+#scripts-sidebar-stack-pane {
+ overflow: auto;
+ top: 23px;
+}
+
+div.sidebar-pane-stack#scripts-debug-sidebar-contents {
+ top: 23px;
+}