Diff
Modified: trunk/Source/WebCore/ChangeLog (114636 => 114637)
--- trunk/Source/WebCore/ChangeLog 2012-04-19 16:16:45 UTC (rev 114636)
+++ trunk/Source/WebCore/ChangeLog 2012-04-19 16:19:59 UTC (rev 114637)
@@ -1,3 +1,58 @@
+2012-04-19 Pavel Feldman <pfeld...@chromium.org>
+
+ Web Inspector: introduce styles panel as an experiment
+ https://bugs.webkit.org/show_bug.cgi?id=84331
+
+ Reviewed by Vsevolod Vlasov.
+
+ This change introduces new "Styles" panel that looks like the "Scripts" one,
+ but operates stylesheets. This is happening under the experimental flag.
+
+ * English.lproj/localizedStrings.js:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/compile-front-end.py:
+ * inspector/front-end/Panel.js:
+ (WebInspector.Panel.prototype.showAnchorLocation):
+ * inspector/front-end/ResourceView.js:
+ (WebInspector.EditableResourceSourceFrame.prototype.didEditContent):
+ * inspector/front-end/ScriptsNavigator.js:
+ (WebInspector.ScriptsNavigatorController.prototype._navigatorOverlayWasShown):
+ * inspector/front-end/ScriptsPanel.js:
+ * inspector/front-end/Settings.js:
+ (WebInspector.ExperimentsSettings):
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.SourceFrame.prototype._clearLineHighlight):
+ * inspector/front-end/StylesPanel.js: Added.
+ (WebInspector.StylesPanel):
+ (WebInspector.StylesPanel.prototype.wasShown):
+ (WebInspector.StylesPanel.prototype._initialize):
+ (WebInspector.StylesPanel.prototype._populateResourceTree.populateFrame):
+ (WebInspector.StylesPanel.prototype._populateResourceTree):
+ (WebInspector.StylesPanel.prototype._resourceAdded):
+ (WebInspector.StylesPanel.prototype._reset):
+ (WebInspector.StylesPanel.prototype._cachedResourcesLoaded):
+ (WebInspector.StylesPanel.prototype.get toolbarItemLabel):
+ (WebInspector.StylesPanel.prototype.viewForFile.get if):
+ (WebInspector.StylesPanel.prototype.viewForFile):
+ (WebInspector.StylesPanel.prototype._textEdited):
+ (WebInspector.StylesPanel.prototype._scriptSelected):
+ (WebInspector.StylesPanel.prototype._showFile):
+ (WebInspector.StylesPanel.prototype.canShowAnchorLocation):
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylePropertiesSection):
+ (WebInspector.StylePropertiesSection.prototype._createRuleOriginNode):
+ * inspector/front-end/TabbedEditorContainer.js:
+ (WebInspector.TabbedEditorContainer):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.html:
+ * inspector/front-end/inspector.js:
+ (WebInspector._createPanels):
+ (WebInspector._showAnchorLocationInPanel):
+ * inspector/front-end/scriptsPanel.css:
+ * inspector/front-end/splitView.css:
+ (.sidebar-overlay):
+
2012-04-19 Vsevolod Vlasov <vse...@chromium.org>
Follow up to r114632: build fix.
Modified: trunk/Source/WebCore/English.lproj/localizedStrings.js
(Binary files differ)
Modified: trunk/Source/WebCore/WebCore.gypi (114636 => 114637)
--- trunk/Source/WebCore/WebCore.gypi 2012-04-19 16:16:45 UTC (rev 114636)
+++ trunk/Source/WebCore/WebCore.gypi 2012-04-19 16:19:59 UTC (rev 114637)
@@ -6423,6 +6423,7 @@
'inspector/front-end/Spectrum.js',
'inspector/front-end/SplitView.js',
'inspector/front-end/StatusBarButton.js',
+ 'inspector/front-end/StylesPanel.js',
'inspector/front-end/StylesSidebarPane.js',
'inspector/front-end/TabbedEditorContainer.js',
'inspector/front-end/TabbedPane.js',
Modified: trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj (114636 => 114637)
--- trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj 2012-04-19 16:16:45 UTC (rev 114636)
+++ trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj 2012-04-19 16:19:59 UTC (rev 114637)
@@ -74445,6 +74445,10 @@
>
</File>
<File
+ RelativePath="..\inspector\front-end\StylesPanel.js"
+ >
+ </File>
+ <File
RelativePath="..\inspector\front-end\StylesSidebarPane.js"
>
</File>
Modified: trunk/Source/WebCore/inspector/compile-front-end.py (114636 => 114637)
--- trunk/Source/WebCore/inspector/compile-front-end.py 2012-04-19 16:16:45 UTC (rev 114636)
+++ trunk/Source/WebCore/inspector/compile-front-end.py 2012-04-19 16:19:59 UTC (rev 114637)
@@ -248,6 +248,13 @@
]
},
{
+ "target_name": "styles",
+ "dependencies": ["components"],
+ "sources": [
+ "StylesPanel.js",
+ ]
+ },
+ {
"target_name": "extensions",
"dependencies": ["components"],
"sources": [
Modified: trunk/Source/WebCore/inspector/front-end/Panel.js (114636 => 114637)
--- trunk/Source/WebCore/inspector/front-end/Panel.js 2012-04-19 16:16:45 UTC (rev 114636)
+++ trunk/Source/WebCore/inspector/front-end/Panel.js 2012-04-19 16:19:59 UTC (rev 114637)
@@ -184,14 +184,20 @@
{
},
+ /**
+ * @param {Element} anchor
+ * @return {boolean}
+ */
canShowAnchorLocation: function(anchor)
{
return false;
},
+ /**
+ * @param {Element} anchor
+ */
showAnchorLocation: function(anchor)
{
- return false;
},
elementsToRestoreScrollPositionsFor: function()
Modified: trunk/Source/WebCore/inspector/front-end/ResourceView.js (114636 => 114637)
--- trunk/Source/WebCore/inspector/front-end/ResourceView.js 2012-04-19 16:16:45 UTC (rev 114636)
+++ trunk/Source/WebCore/inspector/front-end/ResourceView.js 2012-04-19 16:19:59 UTC (rev 114637)
@@ -193,6 +193,12 @@
WebInspector.ResourceSourceFrame.prototype._contentChanged.call(this, event);
},
+ didEditContent: function(error, content)
+ {
+ WebInspector.SourceFrame.prototype.didEditContent.call(this, error, content);
+ this.dispatchEventToListeners(WebInspector.EditableResourceSourceFrame.Events.TextEdited, this);
+ },
+
isDirty: function()
{
return this._resource.content !== this.textModel.text;
Modified: trunk/Source/WebCore/inspector/front-end/ScriptsNavigator.js (114636 => 114637)
--- trunk/Source/WebCore/inspector/front-end/ScriptsNavigator.js 2012-04-19 16:16:45 UTC (rev 114636)
+++ trunk/Source/WebCore/inspector/front-end/ScriptsNavigator.js 2012-04-19 16:19:59 UTC (rev 114637)
@@ -170,7 +170,7 @@
titleText += "?" + uiSourceCode.parsedURL.queryParams;
} else if (uiSourceCode.parsedURL)
titleText = uiSourceCode.parsedURL.url;
- else
+ if (!titleText)
titleText = WebInspector.UIString("(program)");
scriptTreeElement.titleText = titleText;
},
@@ -794,12 +794,12 @@
this._editorView.installResizer(this._navigatorSidebarResizeWidgetElement);
this._navigator.view.element.appendChild(this._navigatorSidebarResizeWidgetElement);
- this._navigatorShowHideButton = this._createNavigatorControlButton(WebInspector.UIString("Show scripts navigator"), "scripts-navigator-show-hide-button", this._toggleNavigator.bind(this));
+ this._navigatorShowHideButton = this._createNavigatorControlButton(WebInspector.UIString("Show navigator"), "scripts-navigator-show-hide-button", this._toggleNavigator.bind(this));
this._navigatorShowHideButton.addStyleClass("toggled-on");
this._navigatorShowHideButton.title = WebInspector.UIString("Hide scripts navigator");
this._editorView.element.appendChild(this._navigatorShowHideButton);
- this._navigatorPinButton = this._createNavigatorControlButton(WebInspector.UIString("Pin scripts navigator"), "scripts-navigator-pin-button", this._pinNavigator.bind(this));
+ this._navigatorPinButton = this._createNavigatorControlButton(WebInspector.UIString("Pin navigator"), "scripts-navigator-pin-button", this._pinNavigator.bind(this));
this._navigatorPinButton.addStyleClass("hidden");
this._navigator.view.element.appendChild(this._navigatorPinButton);
@@ -910,7 +910,7 @@
{
this._navigator.view.element.appendChild(this._navigatorShowHideButton);
this._navigatorShowHideButton.addStyleClass("toggled-on");
- this._navigatorShowHideButton.title = WebInspector.UIString("Hide scripts navigator");
+ this._navigatorShowHideButton.title = WebInspector.UIString("Hide navigator");
this._navigator.focus();
this._panel.registerShortcut(WebInspector.KeyboardShortcut.Keys.Esc.code, this._escDownWhileNavigatorOverlayOpen.bind(this));
},
@@ -921,7 +921,7 @@
WebInspector.settings.navigatorWasOnceHidden.set(true);
this._editorView.element.appendChild(this._navigatorShowHideButton);
this._navigatorShowHideButton.removeStyleClass("toggled-on");
- this._navigatorShowHideButton.title = WebInspector.UIString("Show scripts navigator");
+ this._navigatorShowHideButton.title = WebInspector.UIString("Show navigator");
this._panel.unregisterShortcut(WebInspector.KeyboardShortcut.Keys.Esc.code);
}
}
Modified: trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js (114636 => 114637)
--- trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js 2012-04-19 16:16:45 UTC (rev 114636)
+++ trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js 2012-04-19 16:19:59 UTC (rev 114637)
@@ -65,7 +65,6 @@
const initialNavigatorWidth = 225;
const minimalViewsContainerWidthPercent = 50;
this.editorView = new WebInspector.SplitView(WebInspector.SplitView.SidebarPosition.Left, "scriptsPanelNavigatorSidebarWidth", initialNavigatorWidth);
- this.editorView.element.id = "scripts-editor-view";
this.editorView.element.tabIndex = 0;
this.editorView.minimalSidebarWidth = Preferences.minScriptsSidebarWidth;
@@ -75,7 +74,7 @@
this._navigator = new WebInspector.ScriptsNavigator();
this._navigator.show(this.editorView.sidebarElement);
- this._editorContainer = new WebInspector.TabbedEditorContainer(this);
+ this._editorContainer = new WebInspector.TabbedEditorContainer(this, "previouslyViewedFiles");
this._editorContainer.show(this.editorView.mainElement);
WebInspector.OpenResourceDialog.install(this, this._presentationModel, this.editorView.mainElement);
Modified: trunk/Source/WebCore/inspector/front-end/Settings.js (114636 => 114637)
--- trunk/Source/WebCore/inspector/front-end/Settings.js 2012-04-19 16:16:45 UTC (rev 114636)
+++ trunk/Source/WebCore/inspector/front-end/Settings.js 2012-04-19 16:19:59 UTC (rev 114637)
@@ -181,6 +181,7 @@
this.timelineVerticalOverview = this._createExperiment("timelineStartAtZero", "Enable vertical overview mode in the Timeline panel");
this.showShadowDOM = this._createExperiment("showShadowDOM", "Show shadow DOM");
this.snippetsSupport = this._createExperiment("snippetsSupport", "Snippets support");
+ this.showStylesPanel = this._createExperiment("stylesPanel", "Show styles panel");
this._cleanUpSetting();
}
Added: trunk/Source/WebCore/inspector/front-end/StylesPanel.js (0 => 114637)
--- trunk/Source/WebCore/inspector/front-end/StylesPanel.js (rev 0)
+++ trunk/Source/WebCore/inspector/front-end/StylesPanel.js 2012-04-19 16:19:59 UTC (rev 114637)
@@ -0,0 +1,186 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY GOOGLE INC. AND ITS CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GOOGLE INC.
+ * OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * @constructor
+ * @extends {WebInspector.Panel}
+ * @implements {WebInspector.TabbedEditorContainerDelegate}
+ */
+WebInspector.StylesPanel = function()
+{
+ WebInspector.Panel.call(this, "styles");
+ this.registerRequiredCSS("scriptsPanel.css");
+
+ const initialNavigatorWidth = 225;
+ const minimalViewsContainerWidthPercent = 50;
+
+ this._mainView = new WebInspector.SplitView(WebInspector.SplitView.SidebarPosition.Left, "stylesPanelNavigatorSidebarWidth", initialNavigatorWidth);
+ this._mainView.element.id = "styles-main-view";
+ this._mainView.element.tabIndex = 0;
+
+ this._mainView.minimalSidebarWidth = Preferences.minScriptsSidebarWidth;
+ this._mainView.minimalMainWidthPercent = minimalViewsContainerWidthPercent;
+ this._mainView.show(this.element);
+
+ this._navigator = new WebInspector.ScriptsNavigator();
+ this._navigatorView = this._navigator.view;
+ this._navigator.show(this._mainView.sidebarElement);
+ this._navigator.addEventListener(WebInspector.ScriptsNavigator.Events.ScriptSelected, this._scriptSelected, this);
+
+ this._editorContainer = new WebInspector.TabbedEditorContainer(this, "previouslyViewedCSSFiles");
+ this._editorContainer.show(this._mainView.mainElement);
+
+ this._navigatorController = new WebInspector.ScriptsNavigatorController(this, this._mainView, this._navigator, this._editorContainer);
+
+ this._sourceFramesForResource = new Map();
+ this._urlToResource = {};
+
+ WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.CachedResourcesLoaded, this._cachedResourcesLoaded, this);
+ WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.WillLoadCachedResources, this._reset, this);
+ WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.MainFrameNavigated, this._reset, this);
+}
+
+WebInspector.StylesPanel.prototype = {
+
+ wasShown: function()
+ {
+ WebInspector.Panel.prototype.wasShown.call(this);
+ this._navigatorController.wasShown();
+ this._initialize();
+ },
+
+ _initialize: function()
+ {
+ if (!this._initialized && this.isShowing() && this._cachedResourcesWereLoaded) {
+ this._populateResourceTree();
+ this._initialized = true;
+ }
+ },
+
+ _populateResourceTree: function()
+ {
+ WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.ResourceAdded, this._resourceAdded, this);
+
+ function populateFrame(frame)
+ {
+ for (var i = 0; i < frame.childFrames.length; ++i)
+ populateFrame.call(this, frame.childFrames[i]);
+
+ var resources = frame.resources();
+ for (var i = 0; i < resources.length; ++i)
+ this._resourceAdded({data:resources[i]});
+ }
+ populateFrame.call(this, WebInspector.resourceTreeModel.mainFrame);
+ },
+
+ _resourceAdded: function(event)
+ {
+ var resource = event.data;
+ if (resource.type !== WebInspector.resourceTypes.Stylesheet)
+ return;
+ this._urlToResource[resource.url] = resource;
+ this._navigator.addUISourceCode(resource);
+ this._editorContainer.uiSourceCodeAdded(resource);
+ },
+
+ _reset: function()
+ {
+ this._navigator.reset();
+ this._editorContainer.reset();
+ this._urlToResource = {};
+ this._sourceFramesForResource = new Map();
+ },
+
+ _cachedResourcesLoaded: function()
+ {
+ this._cachedResourcesWereLoaded = true;
+ this._initialize();
+ },
+
+ get toolbarItemLabel()
+ {
+ return WebInspector.UIString("Styles");
+ },
+
+ /**
+ * @param {WebInspector.UISourceCode} uiSourceCode
+ * @return {WebInspector.SourceFrame}
+ */
+ viewForFile: function(uiSourceCode)
+ {
+ var sourceFrame = this._sourceFramesForResource.get(uiSourceCode);
+ if (!sourceFrame) {
+ sourceFrame = new WebInspector.EditableResourceSourceFrame(uiSourceCode);
+ sourceFrame.addEventListener(WebInspector.EditableResourceSourceFrame.Events.TextEdited, this._textEdited, this);
+ this._sourceFramesForResource.put(uiSourceCode, sourceFrame);
+ }
+ return sourceFrame;
+ },
+
+ _textEdited: function(event)
+ {
+ var sourceFrame = /** @type {WebInspector.EditableResourceSourceFrame} */ event.data;
+ this._editorContainer.setFileIsDirty(sourceFrame.resource, sourceFrame.isDirty());
+ },
+
+ _scriptSelected: function(event)
+ {
+ var uiSourceCode = /** @type {WebInspector.UISourceCode} */ event.data.uiSourceCode;
+ var sourceFrame = this._showFile(uiSourceCode);
+ this._navigatorController.hideNavigatorOverlay();
+ if (sourceFrame && event.data.focusSource)
+ sourceFrame.focus();
+ },
+
+ _showFile: function(uiSourceCode)
+ {
+ this._navigator.revealUISourceCode(uiSourceCode);
+ this._editorContainer.showFile(uiSourceCode);
+ },
+
+ canShowAnchorLocation: function(anchor)
+ {
+ var resource = WebInspector.resourceForURL(anchor.href);
+ return !!resource && resource.type === WebInspector.resourceTypes.Stylesheet;
+ },
+
+ showAnchorLocation: function(anchor)
+ {
+ var resource = this._urlToResource[anchor.href];
+ if (!resource)
+ return;
+
+ this._showFile(resource);
+ var sourceFrame = this._sourceFramesForResource.get(resource);
+ if (typeof anchor.lineNumber === "number")
+ sourceFrame.highlightLine(anchor.lineNumber);
+ sourceFrame.focus();
+ }
+}
+
+WebInspector.StylesPanel.prototype.__proto__ = WebInspector.Panel.prototype;
Property changes on: trunk/Source/WebCore/inspector/front-end/StylesPanel.js
___________________________________________________________________
Added: svn:eol-style
Modified: trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js (114636 => 114637)
--- trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js 2012-04-19 16:16:45 UTC (rev 114636)
+++ trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js 2012-04-19 16:19:59 UTC (rev 114637)
@@ -959,6 +959,7 @@
var refElement = mediaDataElement.createChild("div", "subtitle");
var lineNumber = media.sourceLine < 0 ? undefined : media.sourceLine;
var anchor = WebInspector.linkifyResourceAsNode(media.sourceURL, lineNumber, "subtitle", media.sourceURL + (isNaN(lineNumber) ? "" : (":" + (lineNumber + 1))));
+ anchor.preferredPanel = "styles";
anchor.style.float = "right";
refElement.appendChild(anchor);
}
@@ -1212,6 +1213,7 @@
function linkifyUncopyable(url, line)
{
var link = WebInspector.linkifyResourceAsNode(url, line, "", url + ":" + (line + 1));
+ link.preferredPanel = "styles";
link.classList.add("webkit-html-resource-link");
link.setAttribute("data-uncopyable", link.textContent);
link.textContent = "";
Modified: trunk/Source/WebCore/inspector/front-end/TabbedEditorContainer.js (114636 => 114637)
--- trunk/Source/WebCore/inspector/front-end/TabbedEditorContainer.js 2012-04-19 16:16:45 UTC (rev 114636)
+++ trunk/Source/WebCore/inspector/front-end/TabbedEditorContainer.js 2012-04-19 16:19:59 UTC (rev 114637)
@@ -43,8 +43,9 @@
* @constructor
* @extends {WebInspector.Object}
* @param {WebInspector.TabbedEditorContainerDelegate} delegate
+ * @param {string} settingName
*/
-WebInspector.TabbedEditorContainer = function(delegate)
+WebInspector.TabbedEditorContainer = function(delegate, settingName)
{
this._delegate = delegate;
@@ -59,7 +60,7 @@
this._files = {};
this._loadedURLs = {};
- this._previouslyViewedFilesSetting = WebInspector.settings.createSetting("previouslyViewedFiles", []);
+ this._previouslyViewedFilesSetting = WebInspector.settings.createSetting(settingName, []);
this._history = new WebInspector.TabbedEditorContainer.History(this._previouslyViewedFilesSetting.get());
}
Modified: trunk/Source/WebCore/inspector/front-end/WebKit.qrc (114636 => 114637)
--- trunk/Source/WebCore/inspector/front-end/WebKit.qrc 2012-04-19 16:16:45 UTC (rev 114636)
+++ trunk/Source/WebCore/inspector/front-end/WebKit.qrc 2012-04-19 16:19:59 UTC (rev 114637)
@@ -145,6 +145,7 @@
<file>Spectrum.js</file>
<file>SplitView.js</file>
<file>StatusBarButton.js</file>
+ <file>StylesPanel.js</file>
<file>StylesSidebarPane.js</file>
<file>TabbedEditorContainer.js</file>
<file>TabbedPane.js</file>
Modified: trunk/Source/WebCore/inspector/front-end/inspector.html (114636 => 114637)
--- trunk/Source/WebCore/inspector/front-end/inspector.html 2012-04-19 16:16:45 UTC (rev 114636)
+++ trunk/Source/WebCore/inspector/front-end/inspector.html 2012-04-19 16:19:59 UTC (rev 114637)
@@ -126,6 +126,7 @@
<script type="text/_javascript_" src=""
<script type="text/_javascript_" src=""
<script type="text/_javascript_" src=""
+ <script type="text/_javascript_" src=""
<script type="text/_javascript_" src=""
<script type="text/_javascript_" src=""
<script type="text/_javascript_" src=""
Modified: trunk/Source/WebCore/inspector/front-end/inspector.js (114636 => 114637)
--- trunk/Source/WebCore/inspector/front-end/inspector.js 2012-04-19 16:16:45 UTC (rev 114636)
+++ trunk/Source/WebCore/inspector/front-end/inspector.js 2012-04-19 16:19:59 UTC (rev 114637)
@@ -53,6 +53,8 @@
this.panels.network = new WebInspector.NetworkPanel();
if (hiddenPanels.indexOf("scripts") === -1)
this.panels.scripts = new WebInspector.ScriptsPanel(this.debuggerPresentationModel);
+ if (hiddenPanels.indexOf("styles") === -1 && WebInspector.experimentsSettings.showStylesPanel.isEnabled())
+ this.panels.styles = new WebInspector.StylesPanel();
if (hiddenPanels.indexOf("timeline") === -1)
this.panels.timeline = new WebInspector.TimelinePanel();
if (hiddenPanels.indexOf("profiles") === -1)
@@ -972,7 +974,7 @@
WebInspector._showAnchorLocationInPanel = function(anchor, panel)
{
- if (!panel.canShowAnchorLocation(anchor))
+ if (!panel || !panel.canShowAnchorLocation(anchor))
return false;
// FIXME: support webkit-html-external-link links here.
Modified: trunk/Source/WebCore/inspector/front-end/scriptsPanel.css (114636 => 114637)
--- trunk/Source/WebCore/inspector/front-end/scriptsPanel.css 2012-04-19 16:16:45 UTC (rev 114636)
+++ trunk/Source/WebCore/inspector/front-end/scriptsPanel.css 2012-04-19 16:19:59 UTC (rev 114637)
@@ -283,15 +283,6 @@
margin-right: 28px;
}
-#scripts-editor-view .sidebar-overlay {
- display: -webkit-box;
- background-color: white;
- border-right: 1px solid gray;
- -webkit-box-shadow: rgb(90,90,90) 20px 0px 50px -25px;
- display: -webkit-box;
- -webkit-box-orient: vertical;
-}
-
#scripts-editor-container-tabbed-pane .tabbed-pane-header {
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#F5F5F5), to(#E5E5E5));
}
Modified: trunk/Source/WebCore/inspector/front-end/splitView.css (114636 => 114637)
--- trunk/Source/WebCore/inspector/front-end/splitView.css 2012-04-19 16:16:45 UTC (rev 114636)
+++ trunk/Source/WebCore/inspector/front-end/splitView.css 2012-04-19 16:19:59 UTC (rev 114637)
@@ -74,6 +74,11 @@
bottom: 0;
left: 0;
z-index: 10;
+ background-color: white;
+ border-right: 1px solid gray;
+ -webkit-box-shadow: rgb(90,90,90) 20px 0px 50px -25px;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
}
.sidebar-overlay-resizer {