Diff
Modified: trunk/Source/WebCore/ChangeLog (100276 => 100277)
--- trunk/Source/WebCore/ChangeLog 2011-11-15 14:51:32 UTC (rev 100276)
+++ trunk/Source/WebCore/ChangeLog 2011-11-15 14:52:25 UTC (rev 100277)
@@ -1,3 +1,23 @@
+2011-11-15 Pavel Feldman <pfeld...@google.com>
+
+ Web Inspector: move generic code from DevTools.js into the WebCore.
+ https://bugs.webkit.org/show_bug.cgi?id=72377
+
+ re-landing r100269.
+
+ Reviewed by Yury Semikhatsky.
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/InspectorFrontendHostStub.js:
+ (.WebInspector.InspectorFrontendHostStub.prototype.inspectedURLChanged):
+ * inspector/front-end/ProfilesPanel.js:
+ * inspector/front-end/Resource.js:
+ * inspector/front-end/Settings.js:
+ * inspector/front-end/UIUtils.js:
+ (WebInspector.setToolbarColors):
+ (WebInspector.resetToolbarColors):
+ * inspector/front-end/inspector.js:
+
2011-11-15 Sheriff Bot <webkit.review....@gmail.com>
Unreviewed, rolling out r100269.
Modified: trunk/Source/WebCore/English.lproj/localizedStrings.js
(Binary files differ)
Modified: trunk/Source/WebCore/inspector/front-end/InspectorFrontendHostStub.js (100276 => 100277)
--- trunk/Source/WebCore/inspector/front-end/InspectorFrontendHostStub.js 2011-11-15 14:51:32 UTC (rev 100276)
+++ trunk/Source/WebCore/inspector/front-end/InspectorFrontendHostStub.js 2011-11-15 14:52:25 UTC (rev 100277)
@@ -110,6 +110,7 @@
inspectedURLChanged: function(url)
{
+ document.title = WebInspector.UIString(Preferences.applicationTitle, url);
},
copyText: function()
Modified: trunk/Source/WebCore/inspector/front-end/ProfilesPanel.js (100276 => 100277)
--- trunk/Source/WebCore/inspector/front-end/ProfilesPanel.js 2011-11-15 14:51:32 UTC (rev 100276)
+++ trunk/Source/WebCore/inspector/front-end/ProfilesPanel.js 2011-11-15 14:52:25 UTC (rev 100277)
@@ -119,6 +119,8 @@
this.enableToggleButton = new WebInspector.StatusBarButton("", "enable-toggle-status-bar-item");
this.enableToggleButton.addEventListener("click", this._toggleProfiling.bind(this), false);
+ if (Preferences.profilerAlwaysEnabled)
+ this.enableToggleButton.element.addStyleClass("hidden");
this.clearResultsButton = new WebInspector.StatusBarButton(WebInspector.UIString("Clear all profiles."), "clear-status-bar-item");
this.clearResultsButton.addEventListener("click", this._clearProfiles.bind(this), false);
Modified: trunk/Source/WebCore/inspector/front-end/Resource.js (100276 => 100277)
--- trunk/Source/WebCore/inspector/front-end/Resource.js 2011-11-15 14:51:32 UTC (rev 100276)
+++ trunk/Source/WebCore/inspector/front-end/Resource.js 2011-11-15 14:52:25 UTC (rev 100277)
@@ -44,6 +44,7 @@
"image/bmp": {2: true},
"image/svg+xml": {2: true},
"image/vnd.microsoft.icon": {2: true},
+ "image/webp": {2: true},
"image/x-icon": {2: true},
"image/x-xbitmap": {2: true},
"font/ttf": {3: true},
Modified: trunk/Source/WebCore/inspector/front-end/Settings.js (100276 => 100277)
--- trunk/Source/WebCore/inspector/front-end/Settings.js 2011-11-15 14:51:32 UTC (rev 100276)
+++ trunk/Source/WebCore/inspector/front-end/Settings.js 2011-11-15 14:52:25 UTC (rev 100277)
@@ -58,7 +58,8 @@
showNetworkPanelInitiatorColumn: false,
haveExtensions: false,
sharedWorkersDebugNote: undefined,
- localizeUI: true
+ localizeUI: true,
+ applicationTitle: "Web Inspector - %s"
}
/**
Modified: trunk/Source/WebCore/inspector/front-end/UIUtils.js (100276 => 100277)
--- trunk/Source/WebCore/inspector/front-end/UIUtils.js 2011-11-15 14:51:32 UTC (rev 100276)
+++ trunk/Source/WebCore/inspector/front-end/UIUtils.js 2011-11-15 14:52:25 UTC (rev 100277)
@@ -595,6 +595,31 @@
WebInspector._previousFocusElement.blur();
}
+WebInspector.setToolbarColors = function(backgroundColor, color)
+{
+ if (!WebInspector._themeStyleElement) {
+ WebInspector._themeStyleElement = document.createElement("style");
+ document.head.appendChild(WebInspector._themeStyleElement);
+ }
+ WebInspector._themeStyleElement.textContent =
+ "#toolbar {\
+ background-image: none !important;\
+ background-color: " + backgroundColor + " !important;\
+ }\
+ \
+ .toolbar-label {\
+ color: " + color + " !important;\
+ text-shadow: none;\
+ }";
+}
+
+WebInspector.resetToolbarColors = function()
+{
+ if (WebInspector._themeStyleElement)
+ WebInspector._themeStyleElement.textContent = "";
+
+}
+
;(function() {
function windowLoaded()
Modified: trunk/Source/WebCore/inspector/front-end/inspector.js (100276 => 100277)
--- trunk/Source/WebCore/inspector/front-end/inspector.js 2011-11-15 14:51:32 UTC (rev 100276)
+++ trunk/Source/WebCore/inspector/front-end/inspector.js 2011-11-15 14:52:25 UTC (rev 100277)
@@ -319,6 +319,9 @@
if (WebInspector.socket)
document.body.addStyleClass("remote");
+ if (WebInspector.queryParamsObject.toolbarColor && WebInspector.queryParamsObject.textColor)
+ WebInspector.setToolbarColors(WebInspector.queryParamsObject.toolbarColor, WebInspector.queryParamsObject.textColor);
+
WebInspector.shortcutsScreen = new WebInspector.ShortcutsScreen();
this._registerShortcuts();
Modified: trunk/Source/WebKit/chromium/ChangeLog (100276 => 100277)
--- trunk/Source/WebKit/chromium/ChangeLog 2011-11-15 14:51:32 UTC (rev 100276)
+++ trunk/Source/WebKit/chromium/ChangeLog 2011-11-15 14:52:25 UTC (rev 100277)
@@ -1,3 +1,15 @@
+2011-11-15 Pavel Feldman <pfeld...@google.com>
+
+ Web Inspector: move generic code from DevTools.js into the WebCore.
+ https://bugs.webkit.org/show_bug.cgi?id=72377
+
+ re-landing r100269.
+
+ Reviewed by Yury Semikhatsky.
+
+ * src/js/DevTools.js:
+ (WebInspector.setInspectedTabId):
+
2011-11-15 Sheriff Bot <webkit.review....@gmail.com>
Unreviewed, rolling out r100269.
Modified: trunk/Source/WebKit/chromium/src/js/DevTools.js (100276 => 100277)
--- trunk/Source/WebKit/chromium/src/js/DevTools.js 2011-11-15 14:51:32 UTC (rev 100276)
+++ trunk/Source/WebKit/chromium/src/js/DevTools.js 2011-11-15 14:52:25 UTC (rev 100277)
@@ -29,15 +29,11 @@
*/
/**
- * FIXME: change field naming style to use trailing underscore.
- * @fileoverview Tools is a main class that wires all components of the
- * DevTools frontend together. It is also responsible for overriding existing
- * WebInspector functionality while it is getting upstreamed into WebCore.
+ * DevTools.js is responsible for configuring Web Inspector for the Chromium
+ * port as well as additional features specific to the Chromium port.
*/
-var context = {}; // Used by WebCore's inspector routines.
-
-(function () {
+{(function () {
Preferences.ignoreWhitespace = false;
Preferences.samplingCPUProfiler = true;
Preferences.heapProfilerPresent = true;
@@ -59,46 +55,9 @@
Preferences.haveExtensions = true;
Preferences.sharedWorkersDebugNote = "Shared workers can be inspected in the Task Manager";
Preferences.localizeUI = false;
-})();
+ Preferences.applicationTitle = "Developer Tools - %s";
+})();}
-// Recognize WebP as a valid image mime type.
-WebInspector.MIMETypes["image/webp"] = {2: true};
-
-var devtools = devtools || {};
-
-devtools.domContentLoaded = function()
-{
- if (WebInspector.queryParamsObject.toolbarColor && WebInspector.queryParamsObject.textColor)
- WebInspector.setToolbarColors(WebInspector.queryParamsObject.toolbarColor, WebInspector.queryParamsObject.textColor);
-}
-document.addEventListener("DOMContentLoaded", devtools.domContentLoaded, false);
-
-
-// FIXME: This needs to be upstreamed.
-(function InterceptProfilesPanelEvents()
-{
- var oldShow = WebInspector.ProfilesPanel.prototype.show;
- WebInspector.ProfilesPanel.prototype.show = function()
- {
- this.enableToggleButton.visible = false;
- oldShow.call(this);
- // Show is called on every show event of a panel, so
- // we only need to intercept it once.
- WebInspector.ProfilesPanel.prototype.show = oldShow;
- };
-})();
-
-
-/*
- * @override
- * TODO(mnaganov): Restore l10n when it will be agreed that it is needed.
- */
-WebInspector.UIString = function(string)
-{
- return String.vsprintf(string, Array.prototype.slice.call(arguments, 1));
-};
-
-
/** Pending WebKit upstream by apavlov). Fixes iframe vs drag problem. */
(function()
{
@@ -137,40 +96,6 @@
};
})();
-
-/////////////////////////////
-// Chromium theme support. //
-/////////////////////////////
-
-WebInspector.setToolbarColors = function(backgroundColor, color)
-{
- if (!WebInspector._themeStyleElement) {
- WebInspector._themeStyleElement = document.createElement("style");
- document.head.appendChild(WebInspector._themeStyleElement);
- }
- WebInspector._themeStyleElement.textContent =
- "#toolbar {\
- background-image: none !important;\
- background-color: " + backgroundColor + " !important;\
- }\
- \
- .toolbar-label {\
- color: " + color + " !important;\
- text-shadow: none;\
- }";
-}
-
-WebInspector.resetToolbarColors = function()
-{
- if (WebInspector._themeStyleElement)
- WebInspector._themeStyleElement.textContent = "";
-
-}
-
-////////////////////////////////////////////////////////
-// Platform-specific WebInspector extensions support. //
-////////////////////////////////////////////////////////
-
WebInspector.platformExtensionAPI = function(tabId)
{
function getTabId()
@@ -198,10 +123,3 @@
{
WebInspector._inspectedTabId = tabId;
}
-
-if (WebInspector.InspectorFrontendHostStub) {
- WebInspector.InspectorFrontendHostStub.prototype.inspectedURLChanged = function(url)
- {
- document.title = "Developer Tools - " + url;
- }
-}