Changeset 100277 in webkit
- Timestamp:
- Nov 15, 2011, 6:52:25 AM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r100274 r100277 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 re-landing r100269. 7 8 Reviewed by Yury Semikhatsky. 9 10 * English.lproj/localizedStrings.js: 11 * inspector/front-end/InspectorFrontendHostStub.js: 12 (.WebInspector.InspectorFrontendHostStub.prototype.inspectedURLChanged): 13 * inspector/front-end/ProfilesPanel.js: 14 * inspector/front-end/Resource.js: 15 * inspector/front-end/Settings.js: 16 * inspector/front-end/UIUtils.js: 17 (WebInspector.setToolbarColors): 18 (WebInspector.resetToolbarColors): 19 * inspector/front-end/inspector.js: 20 1 21 2011-11-15 Sheriff Bot <webkit.review.bot@gmail.com> 2 22 -
trunk/Source/WebCore/inspector/front-end/InspectorFrontendHostStub.js
r100274 r100277 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
r100274 r100277 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
r100274 r100277 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
r100274 r100277 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
r100274 r100277 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
r100274 r100277 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
r100274 r100277 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 re-landing r100269. 7 8 Reviewed by Yury Semikhatsky. 9 10 * src/js/DevTools.js: 11 (WebInspector.setInspectedTabId): 12 1 13 2011-11-15 Sheriff Bot <webkit.review.bot@gmail.com> 2 14 -
trunk/Source/WebKit/chromium/src/js/DevTools.js
r100274 r100277 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 35 38 var context = {}; // Used by WebCore's inspector routines. 39 40 (function () { 36 {(function () { 41 37 Preferences.ignoreWhitespace = false; 42 38 Preferences.samplingCPUProfiler = true; … … 60 56 Preferences.sharedWorkersDebugNote = "Shared workers can be inspected in the Task Manager"; 61 57 Preferences.localizeUI = false; 62 })(); 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, so 86 // we only need to intercept it once. 87 WebInspector.ProfilesPanel.prototype.show = oldShow; 88 }; 89 })(); 90 91 92 /* 93 * @override 94 * 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 58 Preferences.applicationTitle = "Developer Tools - %s"; 59 })();} 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.