Unreviewed, rolling out r100269.

http://trac.webkit.org/changeset/100269
https://bugs.webkit.org/show_bug.cgi?id=72383

"Broke dozens of tests due to exception in loadingFinished"
(Requested by tonyg-cr on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-11-15

Source/WebCore:

* 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:
* inspector/front-end/inspector.js:

Source/WebKit/chromium:

* src/js/DevTools.js:
():
(devtools.domContentLoaded):
(WebInspector.UIString):
(WebInspector.setToolbarColors):
(WebInspector.resetToolbarColors):
(.WebInspector.InspectorFrontendHostStub.prototype.inspectedURLChanged):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@100274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d9fbbe2c
2011-11-15 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r100269.
http://trac.webkit.org/changeset/100269
https://bugs.webkit.org/show_bug.cgi?id=72383
"Broke dozens of tests due to exception in loadingFinished"
(Requested by tonyg-cr on #webkit).
* 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:
* inspector/front-end/inspector.js:
2011-11-15 Alexander Pavlov <apavlov@chromium.org>
font property does not show up as "shorthand" in inspector
......
......@@ -110,7 +110,6 @@ WebInspector.InspectorFrontendHostStub.prototype = {
inspectedURLChanged: function(url)
{
document.title = WebInspector.UIString(Preferences.applicationTitle, url);
},
copyText: function()
......
......@@ -119,8 +119,6 @@ WebInspector.ProfilesPanel = function()
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);
......
......@@ -44,7 +44,6 @@ WebInspector.MIMETypes = {
"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},
......
......@@ -58,8 +58,7 @@ var Preferences = {
showNetworkPanelInitiatorColumn: false,
haveExtensions: false,
sharedWorkersDebugNote: undefined,
localizeUI: true,
applicationTitle: "Web Inspector - %s"
localizeUI: true
}
/**
......
......@@ -595,31 +595,6 @@ WebInspector.setCurrentFocusElement = function(x)
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()
......
......@@ -319,9 +319,6 @@ WebInspector.doLoadedDone = function()
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();
......
2011-11-15 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r100269.
http://trac.webkit.org/changeset/100269
https://bugs.webkit.org/show_bug.cgi?id=72383
"Broke dozens of tests due to exception in loadingFinished"
(Requested by tonyg-cr on #webkit).
* src/js/DevTools.js:
():
(devtools.domContentLoaded):
(WebInspector.UIString):
(WebInspector.setToolbarColors):
(WebInspector.resetToolbarColors):
(.WebInspector.InspectorFrontendHostStub.prototype.inspectedURLChanged):
2011-11-15 Pavel Feldman <pfeldman@google.com>
Web Inspector: move generic code from DevTools.js into the WebCore.
......
......@@ -29,10 +29,14 @@
*/
/**
* DevTools.js is responsible for configuring Web Inspector for the Chromium
* port as well as additional features specific to the Chromium port.
* 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.
*/
var context = {}; // Used by WebCore's inspector routines.
(function () {
Preferences.ignoreWhitespace = false;
Preferences.samplingCPUProfiler = true;
......@@ -55,9 +59,46 @@
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()
{
......@@ -96,6 +137,40 @@
};
})();
/////////////////////////////
// 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()
......@@ -123,3 +198,10 @@ WebInspector.setInspectedTabId = function(tabId)
{
WebInspector._inspectedTabId = tabId;
}
if (WebInspector.InspectorFrontendHostStub) {
WebInspector.InspectorFrontendHostStub.prototype.inspectedURLChanged = function(url)
{
document.title = "Developer Tools - " + url;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment