Changeset 100269 in webkit
- Timestamp:
- Nov 15, 2011, 5:38:23 AM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r100266 r100269 1 2011-11-15 Pavel Feldman <pfeldman@google.com> 2 3 Web Inspector: move generic code from DevTools.js into the WebCore. 4 https://bugs.webkit.org/show_bug.cgi?id=72377 5 6 This includes support for themed toolbar, remote debugging routines, 7 removes a couple of obsolete overrides from the DevTools.js 8 9 Reviewed by Yury Semikhatsky. 10 11 * English.lproj/localizedStrings.js: 12 * inspector/front-end/InspectorFrontendHostStub.js: 13 (.WebInspector.InspectorFrontendHostStub.prototype.inspectedURLChanged): 14 * inspector/front-end/ProfilesPanel.js: 15 * inspector/front-end/Resource.js: 16 * inspector/front-end/Settings.js: 17 * inspector/front-end/UIUtils.js: 18 (WebInspector.setToolbarColors): 19 (WebInspector.resetToolbarColors): 20 * inspector/front-end/inspector.js: 21 1 22 2011-11-15 Simon Hausmann <simon.hausmann@nokia.com> 2 23 -
trunk/Source/WebCore/inspector/front-end/InspectorFrontendHostStub.js
r99823 r100269 111 111 inspectedURLChanged: function(url) 112 112 { 113 document.title = WebInspector.UIString(Preferences.applicationTitle, url); 113 114 }, 114 115 -
trunk/Source/WebCore/inspector/front-end/ProfilesPanel.js
r98840 r100269 120 120 this.enableToggleButton = new WebInspector.StatusBarButton("", "enable-toggle-status-bar-item"); 121 121 this.enableToggleButton.addEventListener("click", this._toggleProfiling.bind(this), false); 122 if (Preferences.profilerAlwaysEnabled) 123 this.enableToggleButton.element.addStyleClass("hidden"); 122 124 123 125 this.clearResultsButton = new WebInspector.StatusBarButton(WebInspector.UIString("Clear all profiles."), "clear-status-bar-item"); -
trunk/Source/WebCore/inspector/front-end/Resource.js
r98840 r100269 45 45 "image/svg+xml": {2: true}, 46 46 "image/vnd.microsoft.icon": {2: true}, 47 "image/webp": {2: true}, 47 48 "image/x-icon": {2: true}, 48 49 "image/x-xbitmap": {2: true}, -
trunk/Source/WebCore/inspector/front-end/Settings.js
r99417 r100269 59 59 haveExtensions: false, 60 60 sharedWorkersDebugNote: undefined, 61 localizeUI: true 61 localizeUI: true, 62 applicationTitle: "Web Inspector - %s" 62 63 } 63 64 -
trunk/Source/WebCore/inspector/front-end/UIUtils.js
r98855 r100269 596 596 } 597 597 598 WebInspector.setToolbarColors = function(backgroundColor, color) 599 { 600 if (!WebInspector._themeStyleElement) { 601 WebInspector._themeStyleElement = document.createElement("style"); 602 document.head.appendChild(WebInspector._themeStyleElement); 603 } 604 WebInspector._themeStyleElement.textContent = 605 "#toolbar {\ 606 background-image: none !important;\ 607 background-color: " + backgroundColor + " !important;\ 608 }\ 609 \ 610 .toolbar-label {\ 611 color: " + color + " !important;\ 612 text-shadow: none;\ 613 }"; 614 } 615 616 WebInspector.resetToolbarColors = function() 617 { 618 if (WebInspector._themeStyleElement) 619 WebInspector._themeStyleElement.textContent = ""; 620 621 } 622 598 623 ;(function() { 599 624 -
trunk/Source/WebCore/inspector/front-end/inspector.js
r100143 r100269 320 320 document.body.addStyleClass("remote"); 321 321 322 if (WebInspector.queryParamsObject.toolbarColor && WebInspector.queryParamsObject.textColor) 323 WebInspector.setToolbarColors(WebInspector.queryParamsObject.toolbarColor, WebInspector.queryParamsObject.textColor); 324 322 325 WebInspector.shortcutsScreen = new WebInspector.ShortcutsScreen(); 323 326 this._registerShortcuts(); -
trunk/Source/WebKit/chromium/ChangeLog
r100258 r100269 1 2011-11-15 Pavel Feldman <pfeldman@google.com> 2 3 Web Inspector: move generic code from DevTools.js into the WebCore. 4 https://bugs.webkit.org/show_bug.cgi?id=72377 5 6 This includes support for themed toolbar, remote debugging routines, 7 removes a couple of obsolete overrides from the DevTools.js 8 9 Reviewed by Yury Semikhatsky. 10 11 * src/js/DevTools.js: 12 (WebInspector.setInspectedTabId): 13 1 14 2011-11-15 Alpha Lam <hclam@chromium.org> 2 15 -
trunk/Source/WebKit/chromium/src/js/DevTools.js
r99417 r100269 30 30 31 31 /** 32 * FIXME: change field naming style to use trailing underscore. 33 * @fileoverview Tools is a main class that wires all components of the 34 * DevTools frontend together. It is also responsible for overriding existing 35 * WebInspector functionality while it is getting upstreamed into WebCore. 32 * DevTools.js is responsible for configuring Web Inspector for the Chromium 33 * port as well as additional features specific to the Chromium port. 36 34 */ 37 38 var context = {}; // Used by WebCore's inspector routines.39 35 40 36 (function () { … … 60 56 Preferences.sharedWorkersDebugNote = "Shared workers can be inspected in the Task Manager"; 61 57 Preferences.localizeUI = false; 58 Preferences.applicationTitle = "Developer Tools - %s"; 62 59 })(); 63 64 // Recognize WebP as a valid image mime type.65 WebInspector.MIMETypes["image/webp"] = {2: true};66 67 var devtools = devtools || {};68 69 devtools.domContentLoaded = function()70 {71 if (WebInspector.queryParamsObject.toolbarColor && WebInspector.queryParamsObject.textColor)72 WebInspector.setToolbarColors(WebInspector.queryParamsObject.toolbarColor, WebInspector.queryParamsObject.textColor);73 }74 document.addEventListener("DOMContentLoaded", devtools.domContentLoaded, false);75 76 77 // FIXME: This needs to be upstreamed.78 (function InterceptProfilesPanelEvents()79 {80 var oldShow = WebInspector.ProfilesPanel.prototype.show;81 WebInspector.ProfilesPanel.prototype.show = function()82 {83 this.enableToggleButton.visible = false;84 oldShow.call(this);85 // Show is called on every show event of a panel, so86 // we only need to intercept it once.87 WebInspector.ProfilesPanel.prototype.show = oldShow;88 };89 })();90 91 92 /*93 * @override94 * TODO(mnaganov): Restore l10n when it will be agreed that it is needed.95 */96 WebInspector.UIString = function(string)97 {98 return String.vsprintf(string, Array.prototype.slice.call(arguments, 1));99 };100 101 60 102 61 /** Pending WebKit upstream by apavlov). Fixes iframe vs drag problem. */ … … 138 97 })(); 139 98 140 141 /////////////////////////////142 // Chromium theme support. //143 /////////////////////////////144 145 WebInspector.setToolbarColors = function(backgroundColor, color)146 {147 if (!WebInspector._themeStyleElement) {148 WebInspector._themeStyleElement = document.createElement("style");149 document.head.appendChild(WebInspector._themeStyleElement);150 }151 WebInspector._themeStyleElement.textContent =152 "#toolbar {\153 background-image: none !important;\154 background-color: " + backgroundColor + " !important;\155 }\156 \157 .toolbar-label {\158 color: " + color + " !important;\159 text-shadow: none;\160 }";161 }162 163 WebInspector.resetToolbarColors = function()164 {165 if (WebInspector._themeStyleElement)166 WebInspector._themeStyleElement.textContent = "";167 168 }169 170 ////////////////////////////////////////////////////////171 // Platform-specific WebInspector extensions support. //172 ////////////////////////////////////////////////////////173 174 99 WebInspector.platformExtensionAPI = function(tabId) 175 100 { … … 199 124 WebInspector._inspectedTabId = tabId; 200 125 } 201 202 if (WebInspector.InspectorFrontendHostStub) {203 WebInspector.InspectorFrontendHostStub.prototype.inspectedURLChanged = function(url)204 {205 document.title = "Developer Tools - " + url;206 }207 }
Note:
See TracChangeset
for help on using the changeset viewer.