Changeset 86589 in webkit
- Timestamp:
- May 16, 2011 10:54:22 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r86587 r86589 1 2011-05-16 Pavel Podivilov <podivilov@chromium.org> 2 3 Reviewed by Yury Semikhatsky. 4 5 Web Inspector: merge ConsoleView into ConsolePanel. 6 https://bugs.webkit.org/show_bug.cgi?id=54670 7 8 * http/tests/inspector/inspector-test.js: 9 (initialize_InspectorTest.InspectorTest.evaluateInConsole): 10 (initialize_InspectorTest.InspectorTest.waitUntilConsoleMessageAdded): 11 * inspector/console/console-assert.html: 12 * inspector/console/console-trace-in-eval.html: 13 * inspector/console/console-trace.html: 14 * inspector/console/console-uncaught-exception.html: 15 * inspector/debugger/debugger-autocontinue-on-syntax-error.html: 16 * inspector/styles/styles-iframe.html: 17 * inspector/timeline/timeline-network-resource.html: 18 * inspector/timeline/timeline-script-tag-1.html: 19 * inspector/timeline/timeline-script-tag-2.html: 20 1 21 2011-05-16 Balazs Kelemen <kbalazs@webkit.org> 2 22 -
trunk/LayoutTests/http/tests/inspector/inspector-test.js
r85321 r86589 27 27 event.initKeyboardEvent("keydown", true, true, null, "Enter", ""); 28 28 WebInspector.console.promptElement.dispatchEvent(event); 29 InspectorTest. addSniffer(WebInspector.ConsoleView.prototype, "addMessage",29 InspectorTest.waitUntilConsoleMessageAdded( 30 30 function(commandResult) { 31 31 callback(commandResult.toMessageElement().textContent); … … 43 43 } 44 44 InspectorTest.evaluateInConsole(code, mycallback); 45 } 46 47 InspectorTest.waitUntilConsoleMessageAdded = function(callback, sticky) 48 { 49 InspectorTest.addSniffer(WebInspector.ConsolePanel.prototype, "addMessage", callback, sticky); 45 50 } 46 51 -
trunk/LayoutTests/inspector/console/console-assert.html
r82713 r86589 28 28 } 29 29 InspectorTest.evaluateInPage("setTimeout(a, 0)"); 30 InspectorTest. addSniffer(WebInspector.ConsoleView.prototype, "addMessage",callback, true);30 InspectorTest.waitUntilConsoleMessageAdded(callback, true); 31 31 } 32 32 -
trunk/LayoutTests/inspector/console/console-trace-in-eval.html
r82713 r86589 36 36 } 37 37 InspectorTest.evaluateInPage("doEvalSource()"); 38 InspectorTest. addSniffer(WebInspector.ConsoleView.prototype, "addMessage",callback);38 InspectorTest.waitUntilConsoleMessageAdded(callback); 39 39 } 40 40 -
trunk/LayoutTests/inspector/console/console-trace.html
r82713 r86589 23 23 } 24 24 InspectorTest.evaluateInPage("setTimeout(a, 0)"); 25 InspectorTest. addSniffer(WebInspector.ConsoleView.prototype, "addMessage",callback);25 InspectorTest.waitUntilConsoleMessageAdded(callback); 26 26 } 27 27 -
trunk/LayoutTests/inspector/console/console-uncaught-exception.html
r82713 r86589 7 7 function test() 8 8 { 9 InspectorTest. addSniffer(WebInspector.ConsoleView.prototype, "addMessage",addMessage, true);9 InspectorTest.waitUntilConsoleMessageAdded(addMessage, true); 10 10 InspectorTest.evaluateInPage("loadIframe()"); 11 11 function addMessage(message) -
trunk/LayoutTests/inspector/debugger/debugger-autocontinue-on-syntax-error.html
r82847 r86589 20 20 { 21 21 DebuggerAgent.setPauseOnExceptions(WebInspector.ScriptsPanel.PauseOnExceptionsState.PauseOnUncaughtExceptions); 22 InspectorTest. addSniffer(WebInspector.ConsoleView.prototype, "addMessage",step2);22 InspectorTest.waitUntilConsoleMessageAdded(step2); 23 23 InspectorTest.evaluateInPage("loadIframe()"); 24 24 } -
trunk/LayoutTests/inspector/styles/styles-iframe.html
r82713 r86589 20 20 { 21 21 InspectorTest.evaluateInPage("loadIframe()"); 22 InspectorTest. addSniffer(WebInspector.ConsoleView.prototype, "addMessage",step0);22 InspectorTest.waitUntilConsoleMessageAdded(step0); 23 23 24 24 function step0() -
trunk/LayoutTests/inspector/timeline/timeline-network-resource.html
r80416 r86589 24 24 { 25 25 InspectorTest.evaluateInPage("performActions()"); 26 InspectorTest. addSniffer(WebInspector.ConsoleView.prototype, "addMessage",step2);26 InspectorTest.waitUntilConsoleMessageAdded(step2); 27 27 } 28 28 -
trunk/LayoutTests/inspector/timeline/timeline-script-tag-1.html
r80416 r86589 17 17 function step1() 18 18 { 19 InspectorTest. addSniffer(WebInspector.ConsoleView.prototype, "addMessage",step2);19 InspectorTest.waitUntilConsoleMessageAdded(step2); 20 20 InspectorTest.evaluateInPage("performActions()"); 21 21 } -
trunk/LayoutTests/inspector/timeline/timeline-script-tag-2.html
r80416 r86589 17 17 function step1() 18 18 { 19 InspectorTest. addSniffer(WebInspector.ConsoleView.prototype, "addMessage",step2);19 InspectorTest.waitUntilConsoleMessageAdded(step2); 20 20 InspectorTest.evaluateInPage("performActions()"); 21 21 } -
trunk/Source/WebCore/ChangeLog
r86588 r86589 1 2011-05-16 Pavel Podivilov <podivilov@chromium.org> 2 3 Reviewed by Yury Semikhatsky. 4 5 Web Inspector: merge ConsoleView into ConsolePanel. 6 https://bugs.webkit.org/show_bug.cgi?id=54670 7 8 Console view in drawer looks exactly the same as console panel. Merging ConsoleView and ConsolePanel together 9 will allow us to reuse panel's functionality (e.g. resizable sidebar) even when console is docked. 10 11 * inspector/front-end/ConsoleView.js: 12 (WebInspector.ConsolePanel.prototype.get toolbarItemLabel): 13 (WebInspector.ConsolePanel.prototype.show): 14 (WebInspector.ConsolePanel.prototype.hide): 15 (WebInspector.ConsolePanel.prototype.showInDrawer): 16 (WebInspector.ConsolePanel.prototype.afterShowInDrawer): 17 (WebInspector.ConsolePanel.prototype.hideInDrawer): 18 (WebInspector.ConsolePanel.prototype.addMessage): 19 (WebInspector.ConsolePanel.prototype.clearMessages): 20 * inspector/front-end/DebuggerPresentationModel.js: 21 (WebInspector.DebuggerPresentationModel): 22 * inspector/front-end/Drawer.js: 23 (WebInspector.Drawer.prototype.set visibleView): 24 (WebInspector.Drawer.prototype.show.animationFinished): 25 (WebInspector.Drawer.prototype.show): 26 * inspector/front-end/Panel.js: 27 (WebInspector.Panel): 28 * inspector/front-end/ResourceTreeModel.js: 29 (WebInspector.ResourceTreeModel): 30 * inspector/front-end/inspector.html: 31 * inspector/front-end/inspector.js: 32 (WebInspector._createPanels): 33 1 34 2011-05-13 Jer Noble <jer.noble@apple.com> 2 35 -
trunk/Source/WebCore/inspector/front-end/ConsoleView.js
r86539 r86589 30 30 const ExpressionStopCharacters = " =:[({;,!+-*/&|^<>"; 31 31 32 WebInspector.Console View= function(drawer)32 WebInspector.ConsolePanel = function(drawer) 33 33 { 34 WebInspector. View.call(this, document.getElementById("console-view"));34 WebInspector.Panel.call(this, "console", document.getElementById("console-view")); 35 35 36 36 this.messages = []; … … 102 102 } 103 103 104 WebInspector.Console View.Events = {104 WebInspector.ConsolePanel.Events = { 105 105 ConsoleCleared: "console-cleared", 106 106 EntryAdded: "console-entry-added", … … 108 108 } 109 109 110 WebInspector.Console View.prototype = {110 WebInspector.ConsolePanel.prototype = { 111 111 _registerConsoleDomainDispatcher: function() { 112 112 var console = this; … … 243 243 }, 244 244 245 get toolbarItemLabel() 246 { 247 return WebInspector.UIString("Console"); 248 }, 249 245 250 show: function() 246 251 { 252 WebInspector.Panel.prototype.show.call(this); 253 254 this._previousConsoleState = WebInspector.drawer.state; 255 WebInspector.drawer.enterPanelMode(); 256 WebInspector.showConsole(); 257 258 // Move the scope bar to the top of the messages, like the resources filter. 259 var scopeBar = document.getElementById("console-filter"); 260 var consoleMessages = document.getElementById("console-messages"); 261 262 scopeBar.parentNode.removeChild(scopeBar); 263 document.getElementById("console-view").insertBefore(scopeBar, consoleMessages); 264 265 // Update styles, and give console-messages a top margin so it doesn't overwrite the scope bar. 266 scopeBar.addStyleClass("console-filter-top"); 267 scopeBar.removeStyleClass("status-bar-item"); 268 269 consoleMessages.addStyleClass("console-filter-top"); 270 }, 271 272 hide: function() 273 { 274 if (this._previousConsoleState === WebInspector.Drawer.State.Hidden) { 275 WebInspector.Panel.prototype.hide.call(this); 276 WebInspector.drawer.immediatelyExitPanelMode(); 277 } else { 278 if ("_toolbarItem" in this) 279 this._toolbarItem.removeStyleClass("toggled-on"); 280 WebInspector.drawer.exitPanelMode(); 281 } 282 delete this._previousConsoleState; 283 284 // Move the scope bar back to the bottom bar, next to Clear Console. 285 var scopeBar = document.getElementById("console-filter"); 286 287 scopeBar.parentNode.removeChild(scopeBar); 288 document.getElementById("other-drawer-status-bar-items").appendChild(scopeBar); 289 290 // Update styles, and remove the top margin on console-messages. 291 scopeBar.removeStyleClass("console-filter-top"); 292 scopeBar.addStyleClass("status-bar-item"); 293 294 document.getElementById("console-messages").removeStyleClass("console-filter-top"); 295 }, 296 297 showInDrawer: function() 298 { 299 WebInspector.View.prototype.show.call(this); 247 300 this.toggleConsoleButton.addStyleClass("toggled-on"); 248 301 this.toggleConsoleButton.title = WebInspector.UIString("Hide console."); … … 251 304 }, 252 305 253 afterShow : function()306 afterShowInDrawer: function() 254 307 { 255 308 WebInspector.currentFocusElement = this.promptElement; 256 309 }, 257 310 258 hide : function()311 hideInDrawer: function() 259 312 { 260 313 this.toggleConsoleButton.removeStyleClass("toggled-on"); … … 281 334 if (msg instanceof WebInspector.ConsoleMessage && !(msg instanceof WebInspector.ConsoleCommandResult)) { 282 335 this._incrementErrorWarningCount(msg); 283 this.dispatchEventToListeners(WebInspector.Console View.Events.MessageAdded, msg);336 this.dispatchEventToListeners(WebInspector.ConsolePanel.Events.MessageAdded, msg); 284 337 this.commandSincePreviousMessage = false; 285 338 this.previousMessage = msg; … … 310 363 this._scheduleScrollIntoView(); 311 364 312 this.dispatchEventToListeners(WebInspector.Console View.Events.EntryAdded, msg);365 this.dispatchEventToListeners(WebInspector.ConsolePanel.Events.EntryAdded, msg); 313 366 }, 314 367 … … 332 385 clearMessages: function() 333 386 { 334 this.dispatchEventToListeners(WebInspector.Console View.Events.ConsoleCleared);387 this.dispatchEventToListeners(WebInspector.ConsolePanel.Events.ConsoleCleared); 335 388 336 389 this.messages = []; … … 678 731 } 679 732 680 WebInspector.Console View.prototype.__proto__ = WebInspector.View.prototype;733 WebInspector.ConsolePanel.prototype.__proto__ = WebInspector.Panel.prototype; 681 734 682 735 WebInspector.ConsoleMessage = function(source, type, level, line, url, repeatCount, message, parameters, stackTrace, requestId) -
trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js
r86539 r86589 47 47 WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.Reset, this._debuggerReset, this); 48 48 49 WebInspector.console.addEventListener(WebInspector.Console View.Events.MessageAdded, this._consoleMessageAdded, this);50 WebInspector.console.addEventListener(WebInspector.Console View.Events.ConsoleCleared, this._consoleCleared, this);49 WebInspector.console.addEventListener(WebInspector.ConsolePanel.Events.MessageAdded, this._consoleMessageAdded, this); 50 WebInspector.console.addEventListener(WebInspector.ConsolePanel.Events.ConsoleCleared, this._consoleCleared, this); 51 51 52 52 new WebInspector.DebuggerPresentationModelResourceBinding(this); -
trunk/Source/WebCore/inspector/front-end/Drawer.js
r78343 r86589 62 62 var firstTime = !this._visibleView; 63 63 if (this._visibleView) 64 this._visibleView.hide ();64 this._visibleView.hideInDrawer(); 65 65 66 66 this._visibleView = x; … … 70 70 this._viewStatusBar.removeChildren(); // optimize this? call old.detach() 71 71 x.attach(this.element, this._viewStatusBar); 72 x.show ();72 x.showInDrawer(); 73 73 this.visible = true; 74 74 } … … 93 93 94 94 if (this.visibleView) 95 this.visibleView.show ();95 this.visibleView.showInDrawer(); 96 96 97 97 WebInspector.View.prototype.show.call(this); … … 125 125 if ("updateStatusBarItems" in WebInspector.currentPanel) 126 126 WebInspector.currentPanel.updateStatusBarItems(); 127 if (this.visibleView.afterShow )128 this.visibleView.afterShow ();127 if (this.visibleView.afterShowInDrawer) 128 this.visibleView.afterShowInDrawer(); 129 129 delete this._animating; 130 130 delete this._currentAnimation; … … 145 145 146 146 if (this.visibleView) 147 this.visibleView.hide ();147 this.visibleView.hideInDrawer(); 148 148 149 149 this._animating = true; -
trunk/Source/WebCore/inspector/front-end/Panel.js
r84484 r86589 27 27 */ 28 28 29 WebInspector.Panel = function(name )29 WebInspector.Panel = function(name, element) 30 30 { 31 WebInspector.View.call(this );31 WebInspector.View.call(this, element); 32 32 33 33 this.element.addStyleClass("panel"); -
trunk/Source/WebCore/inspector/front-end/ResourceTreeModel.js
r86539 r86589 36 36 WebInspector.networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.ResourceFinished, this._onResourceUpdated, this); 37 37 38 WebInspector.console.addEventListener(WebInspector.Console View.Events.MessageAdded, this._consoleMessageAdded, this);39 WebInspector.console.addEventListener(WebInspector.Console View.Events.ConsoleCleared, this._consoleCleared, this);38 WebInspector.console.addEventListener(WebInspector.ConsolePanel.Events.MessageAdded, this._consoleMessageAdded, this); 39 WebInspector.console.addEventListener(WebInspector.ConsolePanel.Events.ConsoleCleared, this._consoleCleared, this); 40 40 41 41 this.frontendReused(); -
trunk/Source/WebCore/inspector/front-end/inspector.html
r84780 r86589 58 58 <script type="text/javascript" src="View.js"></script> 59 59 <script type="text/javascript" src="Drawer.js"></script> 60 <script type="text/javascript" src="ConsoleView.js"></script>61 60 <script type="text/javascript" src="Panel.js"></script> 62 61 <script type="text/javascript" src="TimelineGrid.js"></script> … … 108 107 <script type="text/javascript" src="ResourcesPanel.js"></script> 109 108 <script type="text/javascript" src="ProfilesPanel.js"></script> 110 <script type="text/javascript" src="Console Panel.js"></script>109 <script type="text/javascript" src="ConsoleView.js"></script> 111 110 <script type="text/javascript" src="ExtensionAPI.js"></script> 112 111 <script type="text/javascript" src="ExtensionAuditCategory.js"></script> -
trunk/Source/WebCore/inspector/front-end/inspector.js
r85847 r86589 152 152 }, 153 153 154 _createPanels: function( )154 _createPanels: function(hiddenPanels) 155 155 { 156 156 if (WebInspector.WorkerManager.isWorkerFrontend()) { … … 159 159 return; 160 160 } 161 var hiddenPanels = (InspectorFrontendHost.hiddenPanels() || "").split(',');162 161 if (hiddenPanels.indexOf("elements") === -1) 163 162 this.panels.elements = new WebInspector.ElementsPanel(); … … 174 173 if (hiddenPanels.indexOf("audits") === -1) 175 174 this.panels.audits = new WebInspector.AuditsPanel(); 176 if (hiddenPanels.indexOf("console") === -1)177 this.panels.console = new WebInspector.ConsolePanel();178 175 }, 179 176 … … 418 415 419 416 this.drawer = new WebInspector.Drawer(); 420 this.console = new WebInspector.Console View(this.drawer);417 this.console = new WebInspector.ConsolePanel(this.drawer); 421 418 this.drawer.visibleView = this.console; 422 419 this.networkManager = new WebInspector.NetworkManager(); … … 443 440 this.domBreakpointsSidebarPane = new WebInspector.DOMBreakpointsSidebarPane(); 444 441 442 var hiddenPanels = (InspectorFrontendHost.hiddenPanels() || "").split(','); 445 443 this.panels = {}; 446 this._createPanels(); 444 this._createPanels(hiddenPanels); 445 if (hiddenPanels.indexOf("console") === -1) 446 this.panels.console = this.console; 447 447 448 this._panelHistory = new WebInspector.PanelHistory(); 448 449 this.toolbar = new WebInspector.Toolbar();
Note: See TracChangeset
for help on using the changeset viewer.