Changeset 96575 in webkit
- Timestamp:
- Oct 4, 2011 1:37:04 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r96571 r96575 1 2011-10-03 Pavel Feldman <pfeldman@google.com> 2 3 Web Inspector: add DebuggerPresentationModel and ConsoleView to compilation. 4 https://bugs.webkit.org/show_bug.cgi?id=69269 5 6 Reviewed by Yury Semikhatsky. 7 8 * inspector/compile-front-end.sh: 9 * inspector/front-end/BreakpointManager.js: 10 (WebInspector.BreakpointManager.prototype.uiSourceCodeAdded): 11 * inspector/front-end/ConsoleView.js: 12 (WebInspector.ConsoleView.prototype._consoleCleared): 13 (WebInspector.ConsoleView.prototype._completions.evaluated.getCompletions): 14 (WebInspector.ConsoleView.prototype._completions.evaluated): 15 (WebInspector.ConsoleView.prototype._messagesClicked): 16 * inspector/front-end/ContentProviders.js: 17 (WebInspector.StaticContentProvider.prototype.requestContent): 18 (WebInspector.StaticContentProvider.prototype.searchInContent): 19 * inspector/front-end/ContextMenu.js: 20 * inspector/front-end/DebuggerPresentationModel.js: 21 (WebInspector.DebuggerPresentationModel.prototype._addScript): 22 (WebInspector.DebuggerPresentationModel.prototype._consoleMessageAdded): 23 (WebInspector.DebuggerPresentationModel.prototype._debuggerPaused): 24 (WebInspector.DebuggerPresentationModel.prototype._rawSourceCodeForScriptWithURL): 25 (WebInspector.DebuggerPresentationModel.prototype._rawSourceCodeForScript): 26 (WebInspector.DebuggerPresentationModel.prototype._scriptForRawSourceCode): 27 (WebInspector.DebuggerPresentationModel.prototype._createRawSourceCodeId): 28 (WebInspector.DebuggerPresentationModelResourceBinding.prototype.canSetContent): 29 (WebInspector.DebuggerPresentationModelResourceBinding.prototype.setContent): 30 * inspector/front-end/HelpScreen.js: 31 * inspector/front-end/JavaScriptContextManager.js: 32 (WebInspector.FrameEvaluationContext.prototype.get displayName): 33 * inspector/front-end/KeyboardShortcut.js: 34 (WebInspector.KeyboardShortcut): 35 * inspector/front-end/Resource.js: 36 (WebInspector.Resource.displayName): 37 * inspector/front-end/ScriptFormatter.js: 38 (WebInspector.ScriptFormatter.prototype._didFormatContent): 39 * inspector/front-end/ShortcutsScreen.js: 40 * inspector/front-end/StatusBarButton.js: 41 * inspector/front-end/TextPrompt.js: 42 * inspector/front-end/externs.js: 43 (WebInspector.populateHrefContextMenu): 44 (WebInspector.useLowerCaseMenuTitles): 45 (WebInspector.ScriptsPanel.this.evaluateInSelectedCallFrame): 46 (WebInspector.ScriptsPanel.this.getSelectedCallFrameVariables): 47 (WebInspector.ScriptsPanel): 48 * inspector/front-end/inspector.js: 49 * inspector/front-end/utilities.js: 50 1 51 2011-10-03 Ryosuke Niwa <rniwa@webkit.org> 2 52 -
trunk/Source/WebCore/inspector/compile-front-end.sh
r96499 r96575 45 45 --js Source/WebCore/inspector/front-end/Settings.js \ 46 46 --js Source/WebCore/inspector/front-end/UserMetrics.js \ 47 --module jsmodule_sdk:9:jsmodule_common,jsmodule_host \ 47 --module jsmodule_sdk:16:jsmodule_common,jsmodule_host \ 48 --js Source/WebCore/inspector/front-end/ConsoleModel.js \ 49 --js Source/WebCore/inspector/front-end/ContentProviders.js \ 50 --js Source/WebCore/inspector/front-end/CookieParser.js \ 51 --js Source/WebCore/inspector/front-end/BreakpointManager.js \ 48 52 --js Source/WebCore/inspector/front-end/DOMAgent.js \ 49 53 --js Source/WebCore/inspector/front-end/DebuggerModel.js \ 54 --js Source/WebCore/inspector/front-end/DebuggerPresentationModel.js \ 50 55 --js Source/WebCore/inspector/front-end/Script.js \ 56 --js Source/WebCore/inspector/front-end/ScriptFormatter.js \ 57 --js Source/WebCore/inspector/front-end/RawSourceCode.js \ 51 58 --js Source/WebCore/inspector/front-end/RemoteObject.js \ 52 59 --js Source/WebCore/inspector/front-end/ResourceCategory.js \ 53 --js Source/WebCore/inspector/front-end/CookieParser.js \ 54 --js Source/WebCore/inspector/front-end/ConsoleModel.js \ 60 --js Source/WebCore/inspector/front-end/ResourceTreeModel.js \ 55 61 --js Source/WebCore/inspector/front-end/Resource.js \ 56 62 --js Source/WebCore/inspector/front-end/NetworkManager.js \ 57 --module jsmodule_misc:11:jsmodule_sdk \ 63 --js Source/WebCore/inspector/front-end/UISourceCode.js \ 64 --module jsmodule_misc:16:jsmodule_sdk \ 58 65 --js Source/WebCore/inspector/front-end/Checkbox.js \ 59 66 --js Source/WebCore/inspector/front-end/ContextMenu.js \ 60 67 --js Source/WebCore/inspector/front-end/ConsoleMessage.js \ 68 --js Source/WebCore/inspector/front-end/ConsoleView.js \ 69 --js Source/WebCore/inspector/front-end/HelpScreen.js \ 61 70 --js Source/WebCore/inspector/front-end/KeyboardShortcut.js \ 71 --js Source/WebCore/inspector/front-end/JavaScriptContextManager.js \ 62 72 --js Source/WebCore/inspector/front-end/View.js \ 63 73 --js Source/WebCore/inspector/front-end/Placard.js \ 64 74 --js Source/WebCore/inspector/front-end/Popover.js \ 65 75 --js Source/WebCore/inspector/front-end/SoftContextMenu.js \ 76 --js Source/WebCore/inspector/front-end/ShortcutsScreen.js \ 77 --js Source/WebCore/inspector/front-end/StatusBarButton.js \ 66 78 --js Source/WebCore/inspector/front-end/TabbedPane.js \ 67 79 --js Source/WebCore/inspector/front-end/TextPrompt.js \ -
trunk/Source/WebCore/inspector/front-end/BreakpointManager.js
r96097 r96575 60 60 this._materializeBreakpoint(breakpoint); 61 61 if (breakpoint._debuggerLocation) 62 this._breakpointDebuggerLocationChanged(breakpoint , breakpoint._debuggerLocation);62 this._breakpointDebuggerLocationChanged(breakpoint); 63 63 } 64 64 }, -
trunk/Source/WebCore/inspector/front-end/ConsoleView.js
r96519 r96575 33 33 * @extends {WebInspector.View} 34 34 * @constructor 35 * @param {boolean} hideContextSelector 35 36 */ 36 WebInspector.ConsoleView = function( )37 WebInspector.ConsoleView = function(hideContextSelector) 37 38 { 38 39 WebInspector.View.call(this); 40 39 41 this.element.id = "console-view"; 40 41 42 this.messages = []; 42 43 … … 48 49 this._contextSelectElement.className = "status-bar-item"; 49 50 50 if ( WebInspector.WorkerManager.isWorkerFrontend())51 if (hideContextSelector) 51 52 this._contextSelectElement.addStyleClass("hidden"); 52 53 … … 325 326 this.topGroup.messagesElement.removeChildren(); 326 327 327 delete this.commandSincePreviousMessage;328 delete this.previousMessage;329 330 328 this.dispatchEventToListeners(WebInspector.ConsoleView.Events.ConsoleCleared); 331 329 }, … … 355 353 } 356 354 357 if (parseInt(expressionString ) == expressionString) {355 if (parseInt(expressionString, 10) == expressionString) { 358 356 // User is entering float value, do not suggest anything. 359 357 completionsReadyCallback([]); … … 377 375 var object; 378 376 if (primitiveType === "string") 379 object = new String( );377 object = new String(""); 380 378 else if (primitiveType === "number") 381 object = new Number( );379 object = new Number(0); 382 380 else if (primitiveType === "boolean") 383 object = new Boolean( );381 object = new Boolean(false); 384 382 else 385 383 object = this; … … 500 498 _messagesClicked: function(event) 501 499 { 502 var link = event.target.enclosingNodeOrSelfWithNodeName("a"); 503 if (!link || !link.representedNode) { 504 if (!this.prompt.isCaretInsidePrompt() && window.getSelection().isCollapsed) 505 this.prompt.moveCaretToEndOfPrompt(); 506 return; 507 } 508 509 WebInspector.updateFocusedNode(link.representedNode.id); 510 event.stopPropagation(); 511 event.preventDefault(); 500 if (!this.prompt.isCaretInsidePrompt() && window.getSelection().isCollapsed) 501 this.prompt.moveCaretToEndOfPrompt(); 512 502 }, 513 503 … … 573 563 evalInInspectedWindow: function(expression, objectGroup, includeCommandLineAPI, doNotPauseOnExceptions, returnByValue, callback) 574 564 { 575 if (WebInspector.panels.scripts && WebInspector.panels.scripts.paused) {565 if (WebInspector.panels.scripts.paused) { 576 566 WebInspector.panels.scripts.evaluateInSelectedCallFrame(expression, objectGroup, includeCommandLineAPI, returnByValue, callback); 577 567 return; … … 643 633 WebInspector.ConsoleView.prototype.__proto__ = WebInspector.View.prototype; 644 634 635 /** 636 * @constructor 637 */ 645 638 WebInspector.ConsoleCommand = function(command) 646 639 { … … 698 691 } 699 692 693 /** 694 * @extends {WebInspector.ConsoleMessageImpl} 695 * @constructor 696 */ 700 697 WebInspector.ConsoleCommandResult = function(result, wasThrown, originatingCommand) 701 698 { … … 716 713 WebInspector.ConsoleCommandResult.prototype.__proto__ = WebInspector.ConsoleMessageImpl.prototype; 717 714 715 /** 716 * @constructor 717 */ 718 718 WebInspector.ConsoleGroup = function(parentGroup) 719 719 { -
trunk/Source/WebCore/inspector/front-end/ContentProviders.js
r96491 r96575 187 187 WebInspector.ResourceContentProvider.prototype.__proto__ = WebInspector.ContentProvider.prototype; 188 188 189 189 /** 190 * @constructor 191 * @implements {WebInspector.ContentProvider} 192 */ 190 193 WebInspector.StaticContentProvider = function(mimeType, content) 191 194 { … … 198 201 { 199 202 callback(this._mimeType, this._content); 203 }, 204 205 searchInContent: function(query, callback) 206 { 207 callback([]); 200 208 } 201 209 } -
trunk/Source/WebCore/inspector/front-end/ContextMenu.js
r93701 r96575 51 51 }, 52 52 53 /** 54 * @param {boolean=} disabled 55 */ 53 56 appendItem: function(label, handler, disabled) 54 57 { … … 58 61 }, 59 62 63 /** 64 * @param {boolean=} disabled 65 */ 60 66 appendCheckboxItem: function(label, handler, checked, disabled) 61 67 { -
trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js
r96519 r96575 31 31 /** 32 32 * @constructor 33 * @extends {WebInspector.Object} 33 34 */ 34 35 WebInspector.DebuggerPresentationModel = function() … … 105 106 _addScript: function(script) 106 107 { 107 var rawSourceCodeId = this._createRawSourceCodeId(script .sourceURL, script.scriptId);108 var rawSourceCodeId = this._createRawSourceCodeId(script); 108 109 var rawSourceCode = this._rawSourceCode[rawSourceCodeId]; 109 110 if (rawSourceCode) { … … 250 251 return; 251 252 252 var rawSourceCode = this._rawSourceCodeForScript (message.url);253 var rawSourceCode = this._rawSourceCodeForScriptWithURL(message.url); 253 254 if (!rawSourceCode) 254 255 return; … … 356 357 var script = WebInspector.debuggerModel.scriptForSourceID(callFrame.location.scriptId); 357 358 if (script) 358 rawSourceCode = this._rawSourceCodeForScript(script .sourceURL, script.scriptId);359 rawSourceCode = this._rawSourceCodeForScript(script); 359 360 this._presentationCallFrames.push(new WebInspector.PresentationCallFrame(callFrame, i, this, rawSourceCode)); 360 361 } … … 384 385 }, 385 386 386 _rawSourceCodeForScript: function(sourceURL, scriptId) 387 { 388 if (!sourceURL) { 389 var script = WebInspector.debuggerModel.scriptForSourceID(scriptId); 390 if (!script) 391 return; 392 sourceURL = script.sourceURL; 393 } 394 return this._rawSourceCode[this._createRawSourceCodeId(sourceURL, scriptId)]; 387 _rawSourceCodeForScriptWithURL: function(sourceURL) 388 { 389 return this._rawSourceCode[sourceURL]; 390 }, 391 392 _rawSourceCodeForScript: function(script) 393 { 394 return this._rawSourceCode[this._createRawSourceCodeId(script)]; 395 395 }, 396 396 … … 399 399 function filter(script) 400 400 { 401 return this._createRawSourceCodeId(script .sourceURL, script.scriptId) === rawSourceCode.id;401 return this._createRawSourceCodeId(script) === rawSourceCode.id; 402 402 } 403 403 return WebInspector.debuggerModel.queryScripts(filter.bind(this))[0]; 404 404 }, 405 405 406 _createRawSourceCodeId: function(s ourceURL, scriptId)407 { 408 return s ourceURL ||scriptId;406 _createRawSourceCodeId: function(script) 407 { 408 return script.sourceURL || script.scriptId; 409 409 }, 410 410 … … 519 519 /** 520 520 * @constructor 521 * @ extends {WebInspector.ResourceDomainModelBinding}521 * @implements {WebInspector.ResourceDomainModelBinding} 522 522 */ 523 523 WebInspector.DebuggerPresentationModelResourceBinding = function(model) … … 530 530 canSetContent: function(resource) 531 531 { 532 var rawSourceCode = this._presentationModel._rawSourceCodeForScript (resource.url)532 var rawSourceCode = this._presentationModel._rawSourceCodeForScriptWithURL(resource.url) 533 533 if (!rawSourceCode) 534 534 return false; … … 541 541 return; 542 542 543 var rawSourceCode = this._presentationModel._rawSourceCodeForScript (resource.url);543 var rawSourceCode = this._presentationModel._rawSourceCodeForScriptWithURL(resource.url); 544 544 if (!rawSourceCode) { 545 545 userCallback("Resource is not editable"); -
trunk/Source/WebCore/inspector/front-end/HelpScreen.js
r90387 r96575 29 29 */ 30 30 31 /** 32 * @constructor 33 */ 31 34 WebInspector.HelpScreen = function(title) 32 35 { -
trunk/Source/WebCore/inspector/front-end/JavaScriptContextManager.js
r92476 r96575 29 29 */ 30 30 31 /** 32 * @constructor 33 * @extends {WebInspector.Object} 34 */ 31 35 WebInspector.JavaScriptContextManager = function(resourceTreeModel, consoleView) 32 36 { … … 69 73 WebInspector.JavaScriptContextManager.prototype.__proto__ = WebInspector.Object.prototype; 70 74 75 /** 76 * @constructor 77 * @extends {WebInspector.Object} 78 */ 71 79 WebInspector.FrameEvaluationContext = function(frame) 72 80 { … … 101 109 return "<top frame>"; 102 110 var name = this._frame.name || ""; 103 var subtitle = new WebInspector.Resource(null, this._frame.url).displayName;111 var subtitle = WebInspector.Resource.displayName(this._frame.url); 104 112 if (subtitle) { 105 113 if (!name) -
trunk/Source/WebCore/inspector/front-end/KeyboardShortcut.js
r93701 r96575 33 33 WebInspector.KeyboardShortcut = function() 34 34 { 35 } ;35 } 36 36 37 37 /** … … 132 132 } 133 133 134 /** 135 * @param {number=} modifiers 136 */ 134 137 WebInspector.KeyboardShortcut.shortcutToString = function(key, modifiers) 135 138 { -
trunk/Source/WebCore/inspector/front-end/Resource.js
r96499 r96575 70 70 * @extends {WebInspector.Object} 71 71 * 72 * @param { NetworkAgent.RequestId} requestId72 * @param {?NetworkAgent.RequestId} requestId 73 73 * @param {string} url 74 74 * @param {?string} frameId … … 94 94 } 95 95 96 WebInspector.Resource.displayName = function(url) 97 { 98 return new WebInspector.Resource(null, url, null, null).displayName; 99 } 100 96 101 // Keep these in sync with WebCore::InspectorResource::Type 97 102 WebInspector.Resource.Type = { … … 165 170 WebInspector.Resource._domainModelBindings[type] = binding; 166 171 } 167 168 172 169 173 WebInspector.Resource._resourceRevisionRegistry = function() … … 837 841 }, 838 842 843 /** 844 * @param {string} newContent 845 * @param {Date=} timestamp 846 * @param {boolean=} restoringHistory 847 */ 839 848 addRevision: function(newContent, timestamp, restoringHistory) 840 849 { -
trunk/Source/WebCore/inspector/front-end/ScriptFormatter.js
r93706 r96575 68 68 var originalContent = task.data.content; 69 69 var formattedContent = event.data.content; 70 var mapping = event.data .mapping;70 var mapping = event.data["mapping"]; 71 71 var sourceMapping = new WebInspector.FormattedSourceMapping(originalContent.lineEndings(), formattedContent.lineEndings(), mapping); 72 72 task.callback(formattedContent, sourceMapping); -
trunk/Source/WebCore/inspector/front-end/ShortcutsScreen.js
r94754 r96575 29 29 */ 30 30 31 /** 32 * @constructor 33 */ 31 34 WebInspector.ShortcutsScreen = function() 32 35 { … … 91 94 parent.appendChild(table); 92 95 } 93 } ;96 } 94 97 95 98 WebInspector.shortcutsScreen = new WebInspector.ShortcutsScreen(); 96 99 100 /** 101 * @constructor 102 */ 97 103 WebInspector.ShortcutsSection = function(name) 98 104 { … … 163 169 return this._lines.length + 2; // add some space for header 164 170 } 165 } ;171 } -
trunk/Source/WebCore/inspector/front-end/StatusBarButton.js
r94754 r96575 29 29 */ 30 30 31 /** 32 * @extends {WebInspector.Object} 33 * @constructor 34 * @param {Array.<string>=} states 35 */ 31 36 WebInspector.StatusBarButton = function(title, className, states) 32 37 { -
trunk/Source/WebCore/inspector/front-end/TextPrompt.js
r93701 r96575 29 29 /** 30 30 * @constructor 31 * @param {boolean=} omitHistory 31 32 */ 32 33 WebInspector.TextPrompt = function(element, completions, stopCharacters, omitHistory) -
trunk/Source/WebCore/inspector/front-end/externs.js
r96499 r96575 112 112 { 113 113 } 114 115 /** 116 * @param {WebInspector.ContextMenu} contextMenu 117 * @param {Node} contextNode 118 * @param {Event} event 119 */ 120 WebInspector.populateHrefContextMenu = function(contextMenu, contextNode, event) 121 { 122 } 123 124 /** 125 * @return {boolean} 126 */ 127 WebInspector.useLowerCaseMenuTitles = function() 128 { 129 } 130 131 WebInspector.panels = {}; 132 133 /** 134 * @constructor 135 */ 136 WebInspector.ScriptsPanel = function() 137 { 138 /** @param {...*} var_args */ 139 this.evaluateInSelectedCallFrame = function(var_args) {} 140 /** @param {...*} var_args */ 141 this.getSelectedCallFrameVariables = function(var_args) {} 142 this.paused = false; 143 } 144 145 /** 146 * @type {?WebInspector.ScriptsPanel} 147 */ 148 WebInspector.panels.scripts = null; -
trunk/Source/WebCore/inspector/front-end/inspector.js
r96519 r96575 511 511 512 512 this.drawer = new WebInspector.Drawer(); 513 this.consoleView = new WebInspector.ConsoleView( );513 this.consoleView = new WebInspector.ConsoleView(WebInspector.WorkerManager.isWorkerFrontend()); 514 514 515 515 this.networkManager = new WebInspector.NetworkManager(); -
trunk/Source/WebCore/inspector/front-end/utilities.js
r96499 r96575 251 251 } 252 252 253 /** 254 * @param {string=} className 255 */ 253 256 Element.prototype.createChild = function(elementName, className) 254 257 {
Note: See TracChangeset
for help on using the changeset viewer.