Changeset 96499 in webkit
- Timestamp:
- Oct 3, 2011 7:56:25 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r96498 r96499 1 2011-10-03 Pavel Feldman <pfeldman@google.com> 2 3 Web Inspector: more compilation fixes including making ConsoleMessage a part of console model. 4 https://bugs.webkit.org/show_bug.cgi?id=69253 5 6 Reviewed by Yury Semikhatsky. 7 8 * inspector/Inspector.json: 9 * inspector/compile-front-end.sh: 10 * inspector/front-end/ConsoleMessage.js: 11 (WebInspector.ConsoleMessage.create): 12 (WebInspector.ConsoleMessage.createTextMessage): 13 (WebInspector.ConsoleMessageImpl): 14 * inspector/front-end/ConsoleModel.js: 15 (WebInspector.ConsoleModel.prototype._messageRepeatCountUpdated): 16 (WebInspector.ConsoleMessage.create): 17 (WebInspector.ConsoleMessage.createTextMessage): 18 (WebInspector.ConsoleDispatcher.prototype.messageAdded): 19 * inspector/front-end/ConsoleView.js: 20 (WebInspector.ConsoleCommandResult): 21 (WebInspector.ConsoleCommandResult.prototype.toMessageElement): 22 * inspector/front-end/CookieParser.js: 23 (WebInspector.Cookie.prototype.get path): 24 (WebInspector.Cookie.prototype.get domain): 25 (WebInspector.Cookie.prototype.expires): 26 * inspector/front-end/DOMAgent.js: 27 * inspector/front-end/ExtensionServer.js: 28 (WebInspector.ExtensionServer.prototype._onAddConsoleMessage): 29 * inspector/front-end/NetworkManager.js: 30 (WebInspector.NetworkDispatcher.prototype._updateResourceWithResponse): 31 (WebInspector.NetworkDispatcher.prototype.requestWillBeSent): 32 (WebInspector.NetworkDispatcher.prototype.requestServedFromMemoryCache): 33 (WebInspector.NetworkDispatcher.prototype.webSocketCreated): 34 (WebInspector.NetworkDispatcher.prototype._createResource): 35 * inspector/front-end/Resource.js: 36 (WebInspector.Resource): 37 (WebInspector.Resource.prototype.setContent): 38 (WebInspector.Resource.prototype.searchInContent): 39 * inspector/front-end/ResourceTreeModel.js: 40 (WebInspector.ResourceTreeModel.prototype._createResource): 41 * inspector/front-end/externs.js: 42 (WebInspector.linkifyStringAsFragmentWithCustomLinkifier): 43 (WebInspector.extensionServer.notifyResourceContentCommitted): 44 (WebInspector.resourceForURL): 45 (WebInspector.debuggerPresentationModel.linkifyLocation): 46 (WebInspector.ObjectPropertiesSection): 47 (WebInspector.ElementsTreeOutline): 48 * inspector/front-end/inspector.html: 49 * inspector/front-end/inspector.js: 50 (WebInspector.log.logMessage): 51 (WebInspector.log): 52 * inspector/generate-protocol-externs: 53 54 2011-10-03 Pavel Feldman <pfeldman@google.com> 55 56 Web Inspector: move console message formatting from ConsoleView.js into ConsoleMessage.js 57 https://bugs.webkit.org/show_bug.cgi?id=69244 58 59 Reviewed by Yury Semikhatsky. 60 61 * inspector/front-end/ConsoleMessage.js: 62 (WebInspector.ConsoleMessage): 63 (WebInspector.ConsoleMessage.prototype._formatMessage.else.else.linkifier): 64 (WebInspector.ConsoleMessage.prototype._formatMessage): 65 (WebInspector.ConsoleMessage.prototype._format): 66 (WebInspector.ConsoleMessage.prototype._formatParameter): 67 (WebInspector.ConsoleMessage.prototype._formatParameterAsValue): 68 (WebInspector.ConsoleMessage.prototype._formatParameterAsObject): 69 (WebInspector.ConsoleMessage.prototype._formatParameterAsNode): 70 (WebInspector.ConsoleMessage.prototype._formatParameterAsArray): 71 (WebInspector.ConsoleMessage.prototype._formatParameterAsString): 72 (WebInspector.ConsoleMessage.prototype._printArray): 73 (WebInspector.ConsoleMessage.prototype._formatAsArrayEntry): 74 (WebInspector.ConsoleMessage.prototype._formatWithSubstitutionString): 75 * inspector/front-end/ConsoleView.js: 76 1 77 2011-10-03 Dirk Schulze <krit@webkit.org> 2 78 -
trunk/Source/WebCore/inspector/Inspector.json
r96491 r96499 549 549 }, 550 550 { 551 "id": "WebSocketRequest", 552 "type": "object", 553 "description": "WebSocket request data.", 554 "hidden": true, 555 "properties": [ 556 { "name": "requestKey3", "type": "string", "description": "HTTP response status text." }, 557 { "name": "headers", "$ref": "Headers", "description": "HTTP response headers." } 558 ] 559 }, 560 { 561 "id": "WebSocketResponse", 562 "type": "object", 563 "description": "WebSocket response data.", 564 "hidden": true, 565 "properties": [ 566 { "name": "status", "type": "number", "description": "HTTP response status code." }, 567 { "name": "statusText", "type": "string", "description": "HTTP response status text." }, 568 { "name": "headers", "$ref": "Headers", "description": "HTTP response headers." }, 569 { "name": "challengeResponse", "type": "string", "description": "Challenge response." } 570 ] 571 }, 572 { 551 573 "id": "CachedResource", 552 574 "type": "object", … … 701 723 { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, 702 724 { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, 703 { "name": "request", " type": "object", "description": "WebSocket request data." }725 { "name": "request", "$ref": "WebSocketRequest", "description": "WebSocket request data." } 704 726 ], 705 727 "hidden": true … … 711 733 { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, 712 734 { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, 713 { "name": "response", " type": "object", "description": "WebSocket response data." }735 { "name": "response", "$ref": "WebSocketResponse", "description": "WebSocket response data." } 714 736 ], 715 737 "hidden": true … … 933 955 { "name": "systemId", "type": "string", "optional": true, "description": "<code>DocumentType</code>'s systemId." }, 934 956 { "name": "internalSubset", "type": "string", "optional": true, "description": "<code>DocumentType</code>'s internalSubset." }, 957 { "name": "xmlVersion", "type": "string", "optional": true, "description": "<code>Document</code>'s XML version in case of XML documents." }, 935 958 { "name": "name", "type": "string", "optional": true, "description": "<code>Attr</code>'s name." }, 936 959 { "name": "value", "type": "string", "optional": true, "description": "<code>Attr</code>'s value." } -
trunk/Source/WebCore/inspector/compile-front-end.sh
r96485 r96499 35 35 --externs Source/WebCore/inspector/front-end/externs.js \ 36 36 --externs Source/WebCore/inspector/front-end/protocol-externs.js \ 37 --module jsmodule_ core:2 \37 --module jsmodule_util:2 \ 38 38 --js Source/WebCore/inspector/front-end/utilities.js \ 39 39 --js Source/WebCore/inspector/front-end/treeoutline.js \ 40 --module jsmodule_env:3 \ 40 --module jsmodule_host:1 \ 41 --js Source/WebCore/inspector/front-end/InspectorFrontendHostStub.js \ 42 --module jsmodule_common:4:jsmodule_util,jsmodule_host \ 43 --js Source/WebCore/inspector/front-end/BinarySearch.js \ 44 --js Source/WebCore/inspector/front-end/Object.js \ 41 45 --js Source/WebCore/inspector/front-end/Settings.js \ 42 46 --js Source/WebCore/inspector/front-end/UserMetrics.js \ 43 --js Source/WebCore/inspector/front-end/InspectorFrontendHostStub.js \ 44 --module jsmodule_sdk:7:jsmodule_core,jsmodule_env \ 45 --js Source/WebCore/inspector/front-end/BinarySearch.js \ 47 --module jsmodule_sdk:9:jsmodule_common,jsmodule_host \ 46 48 --js Source/WebCore/inspector/front-end/DOMAgent.js \ 47 49 --js Source/WebCore/inspector/front-end/DebuggerModel.js \ 48 --js Source/WebCore/inspector/front-end/Object.js \49 50 --js Source/WebCore/inspector/front-end/Script.js \ 50 51 --js Source/WebCore/inspector/front-end/RemoteObject.js \ 51 52 --js Source/WebCore/inspector/front-end/ResourceCategory.js \ 52 --module jsmodule_misc:10:jsmodule_sdk \ 53 --js Source/WebCore/inspector/front-end/CookieParser.js \ 54 --js Source/WebCore/inspector/front-end/ConsoleModel.js \ 55 --js Source/WebCore/inspector/front-end/Resource.js \ 56 --js Source/WebCore/inspector/front-end/NetworkManager.js \ 57 --module jsmodule_misc:11:jsmodule_sdk \ 53 58 --js Source/WebCore/inspector/front-end/Checkbox.js \ 54 59 --js Source/WebCore/inspector/front-end/ContextMenu.js \ 60 --js Source/WebCore/inspector/front-end/ConsoleMessage.js \ 55 61 --js Source/WebCore/inspector/front-end/KeyboardShortcut.js \ 56 62 --js Source/WebCore/inspector/front-end/View.js \ -
trunk/Source/WebCore/inspector/front-end/ConsoleMessage.js
r96487 r96499 29 29 */ 30 30 31 WebInspector.ConsoleMessage.create = function(source, type, level, line, url, repeatCount, message, parameters, stackTrace, request) 32 { 33 return new WebInspector.ConsoleMessageImpl(source, type, level, line, url, repeatCount, message, parameters, stackTrace, request); 34 } 35 36 WebInspector.ConsoleMessage.createTextMessage = function(text, level) 37 { 38 level = level || WebInspector.ConsoleMessage.MessageLevel.Log; 39 return new WebInspector.ConsoleMessageImpl(WebInspector.ConsoleMessage.MessageSource.ConsoleAPI, WebInspector.ConsoleMessage.MessageType.Log, level, 0, null, 1, null, [text], null); 40 } 41 31 42 /** 32 43 * @constructor 33 */ 34 WebInspector.ConsoleStackFrame = function() 35 { 36 this.url = undefined; 37 this.functionName = undefined; 38 this.lineNumber = undefined; 39 this.columnNumber = undefined; 40 } 41 42 /** 43 * @constructor 44 * @extends {WebInspector.ConsoleMessage} 44 45 * @param {Array.<RuntimeAgent.RemoteObject>=} parameters 45 46 * @param {ConsoleAgent.StackTrace=} stackTrace 46 47 * @param {WebInspector.Resource=} request 47 48 */ 48 WebInspector.ConsoleMessage = function(source, type, level, line, url, repeatCount, message, parameters, stackTrace, request)49 WebInspector.ConsoleMessageImpl = function(source, type, level, line, url, repeatCount, message, parameters, stackTrace, request) 49 50 { 51 WebInspector.ConsoleMessage.call(); 52 50 53 this.source = source; 51 54 this.type = type; … … 75 78 "string": this._formatParameterAsString 76 79 }; 77 78 this._formatMessage();79 80 } 80 81 81 WebInspector.ConsoleMessage.createTextMessage = function(text, level) 82 { 83 level = level || WebInspector.ConsoleMessage.MessageLevel.Log; 84 return new WebInspector.ConsoleMessage(WebInspector.ConsoleMessage.MessageSource.ConsoleAPI, WebInspector.ConsoleMessage.MessageType.Log, level, 0, null, 1, null, [text], null); 85 } 86 87 WebInspector.ConsoleMessage.prototype = { 82 WebInspector.ConsoleMessageImpl.prototype = { 88 83 _formatMessage: function() 89 84 { … … 188 183 }, 189 184 185 get formattedMessage() 186 { 187 if (!this._formattedMessage) 188 this._formatMessage(); 189 return this._formattedMessage; 190 }, 191 190 192 _linkifyLocation: function(url, lineNumber, columnNumber) 191 193 { … … 396 398 clearHighlight: function() 397 399 { 400 if (!this._formattedMessage) 401 return; 402 398 403 var highlightedMessage = this._formattedMessage; 399 404 delete this._formattedMessage; … … 404 409 highlightSearchResults: function(regexObject) 405 410 { 411 if (!this._formattedMessage) 412 return; 413 406 414 regexObject.lastIndex = 0; 407 415 var text = this.message; … … 454 462 element.addStyleClass("console-group-title"); 455 463 456 element.appendChild(this. _formattedMessage);464 element.appendChild(this.formattedMessage); 457 465 458 466 if (this.repeatCount > 1) 459 this. _updateRepeatCount();467 this.updateRepeatCount(); 460 468 461 469 return element; … … 484 492 }, 485 493 486 _updateRepeatCount: function() {494 updateRepeatCount: function() { 487 495 if (!this.repeatCountElement) { 488 496 this.repeatCountElement = document.createElement("span"); … … 567 575 } 568 576 569 return sourceString + " " + typeString + " " + levelString + ": " + this. _formattedMessage.textContent + "\n" + this.url + " line " + this.line;577 return sourceString + " " + typeString + " " + levelString + ": " + this.formattedMessage.textContent + "\n" + this.url + " line " + this.line; 570 578 }, 571 579 … … 609 617 } 610 618 611 // Note: Keep these constants in sync with the ones in Console.h 612 WebInspector.ConsoleMessage.MessageSource = { 613 HTML: "html", 614 XML: "xml", 615 JS: "javascript", 616 Network: "network", 617 ConsoleAPI: "console-api", 618 Other: "other" 619 } 620 621 WebInspector.ConsoleMessage.MessageType = { 622 Log: "log", 623 Dir: "dir", 624 DirXML: "dirxml", 625 Trace: "trace", 626 StartGroup: "startGroup", 627 StartGroupCollapsed: "startGroupCollapsed", 628 EndGroup: "endGroup", 629 Assert: "assert", 630 Result: "result" 631 } 632 633 WebInspector.ConsoleMessage.MessageLevel = { 634 Tip: "tip", 635 Log: "log", 636 Warning: "warning", 637 Error: "error", 638 Debug: "debug" 639 } 619 WebInspector.ConsoleMessageImpl.prototype.__proto__ = WebInspector.ConsoleMessage.prototype; -
trunk/Source/WebCore/inspector/front-end/ConsoleModel.js
r95536 r96499 31 31 /** 32 32 * @constructor 33 * @extends {WebInspector.Object} 33 34 */ 34 35 WebInspector.ConsoleModel = function() … … 53 54 ConsoleAgent.setMonitoringXHREnabled(true); 54 55 55 // There is no console agent for workers yet. 56 if (!WebInspector.WorkerManager.isWorkerFrontend()) 57 ConsoleAgent.enable(this._setConsoleMessageExpiredCount.bind(this)); 56 ConsoleAgent.enable(this._setConsoleMessageExpiredCount.bind(this)); 58 57 }, 59 58 … … 120 119 msg.repeatCount = msg.repeatCount + msg.repeatDelta; 121 120 msg.totalRepeatCount = count; 122 msg. _updateRepeatCount();121 msg.updateRepeatCount(); 123 122 124 123 this._incrementErrorWarningCount(msg); 125 124 this.dispatchEventToListeners(WebInspector.ConsoleModel.Events.RepeatCountUpdated, msg); 126 125 } else { 127 var msgCopy = new WebInspector.ConsoleMessage(msg.source, msg.type, msg.level, msg.line, msg.url, count - prevRepeatCount, msg._messageText, msg._parameters, msg._stackTrace, msg._request);126 var msgCopy = WebInspector.ConsoleMessage.create(msg.source, msg.type, msg.level, msg.line, msg.url, count - prevRepeatCount, msg._messageText, msg._parameters, msg._stackTrace, msg._request); 128 127 msgCopy.totalRepeatCount = count; 129 msgCopy._formatMessage();130 128 this.addMessage(msgCopy); 131 129 } … … 137 135 /** 138 136 * @constructor 137 */ 138 WebInspector.ConsoleMessage = function() 139 { 140 this.repeatDelta = 0; 141 this.repeatCount = 0; 142 this._totalRepeatCount = 0; 143 } 144 145 WebInspector.ConsoleMessage.prototype = { 146 get totalRepeatCount() 147 { 148 return this._totalRepeatCount; 149 }, 150 151 set totalRepeatCount(totalRepeatCount) 152 { 153 this._totalRepeatCount = totalRepeatCount; 154 }, 155 156 updateRepeatCount: function() 157 { 158 // Implemented by concrete instances 159 } 160 } 161 162 /** 163 * @param {string} source 164 * @param {string} type 165 * @param {string} level 166 * @param {number} line 167 * @param {string} url 168 * @param {number} repeatCount 169 * @param {string} message 170 * @param {Array.<RuntimeAgent.RemoteObject>=} parameters 171 * @param {ConsoleAgent.StackTrace=} stackTrace 172 * @param {WebInspector.Resource=} request 173 * 174 * @return {WebInspector.ConsoleMessage} 175 */ 176 WebInspector.ConsoleMessage.create = function(source, type, level, line, url, repeatCount, message, parameters, stackTrace, request) 177 { 178 } 179 180 /** 181 * @param {string} text 182 * @param {string} level 183 * @return {WebInspector.ConsoleMessage} 184 */ 185 WebInspector.ConsoleMessage.createTextMessage = function(text, level) 186 { 187 } 188 189 // Note: Keep these constants in sync with the ones in Console.h 190 WebInspector.ConsoleMessage.MessageSource = { 191 HTML: "html", 192 XML: "xml", 193 JS: "javascript", 194 Network: "network", 195 ConsoleAPI: "console-api", 196 Other: "other" 197 } 198 199 WebInspector.ConsoleMessage.MessageType = { 200 Log: "log", 201 Dir: "dir", 202 DirXML: "dirxml", 203 Trace: "trace", 204 StartGroup: "startGroup", 205 StartGroupCollapsed: "startGroupCollapsed", 206 EndGroup: "endGroup", 207 Assert: "assert", 208 Result: "result" 209 } 210 211 WebInspector.ConsoleMessage.MessageLevel = { 212 Tip: "tip", 213 Log: "log", 214 Warning: "warning", 215 Error: "error", 216 Debug: "debug" 217 } 218 219 220 /** 221 * @constructor 139 222 * @implements {ConsoleAgent.Dispatcher} 140 223 * @param {WebInspector.ConsoleModel} console … … 148 231 messageAdded: function(payload) 149 232 { 150 var consoleMessage = new WebInspector.ConsoleMessage(233 var consoleMessage = WebInspector.ConsoleMessage.create( 151 234 payload.source, 152 235 payload.type, -
trunk/Source/WebCore/inspector/front-end/ConsoleView.js
r96487 r96499 702 702 var level = (wasThrown ? WebInspector.ConsoleMessage.MessageLevel.Error : WebInspector.ConsoleMessage.MessageLevel.Log); 703 703 this.originatingCommand = originatingCommand; 704 WebInspector.ConsoleMessage .call(this, WebInspector.ConsoleMessage.MessageSource.JS, WebInspector.ConsoleMessage.MessageType.Result, level, -1, null, 1, null, [result]);704 WebInspector.ConsoleMessageImpl.call(this, WebInspector.ConsoleMessage.MessageSource.JS, WebInspector.ConsoleMessage.MessageType.Result, level, -1, null, 1, null, [result]); 705 705 } 706 706 … … 708 708 toMessageElement: function() 709 709 { 710 var element = WebInspector.ConsoleMessage .prototype.toMessageElement.call(this);710 var element = WebInspector.ConsoleMessageImpl.prototype.toMessageElement.call(this); 711 711 element.addStyleClass("console-user-command-result"); 712 712 return element; … … 714 714 } 715 715 716 WebInspector.ConsoleCommandResult.prototype.__proto__ = WebInspector.ConsoleMessage .prototype;716 WebInspector.ConsoleCommandResult.prototype.__proto__ = WebInspector.ConsoleMessageImpl.prototype; 717 717 718 718 WebInspector.ConsoleGroup = function(parentGroup) -
trunk/Source/WebCore/inspector/front-end/CookieParser.js
r94754 r96499 186 186 get path() 187 187 { 188 return this._attributes .path;188 return this._attributes["path"]; 189 189 }, 190 190 191 191 get domain() 192 192 { 193 return this._attributes .domain;193 return this._attributes["domain"]; 194 194 }, 195 195 196 196 expires: function(requestDate) 197 197 { 198 return this._attributes .expires ? new Date(this._attributes.expires) :198 return this._attributes["expires"] ? new Date(this._attributes["expires"]) : 199 199 (this._attributes["max-age"] ? new Date(requestDate.getTime() + 1000 * this._attributes["max-age"]) : null); 200 200 }, -
trunk/Source/WebCore/inspector/front-end/DOMAgent.js
r96485 r96499 32 32 /** 33 33 * @constructor 34 * @param {DOMAgent.Node} payload .34 * @param {DOMAgent.Node} payload 35 35 */ 36 36 WebInspector.DOMNode = function(doc, payload) { … … 269 269 270 270 /** 271 * @param {DOMAgent.Node} payload .271 * @param {DOMAgent.Node} payload 272 272 */ 273 273 _insertChild: function(prev, payload) … … 371 371 * @extends {WebInspector.DOMNode} 372 372 * @constructor 373 * @param {DOMAgent.Node} payload .373 * @param {DOMAgent.Node} payload 374 374 */ 375 375 WebInspector.DOMDocument = function(domAgent, payload) … … 547 547 548 548 /** 549 * @param {DOMAgent.Node} payload .549 * @param {DOMAgent.Node} payload 550 550 */ 551 551 _setDocument: function(payload) … … 563 563 564 564 /** 565 * @param {DOMAgent.Node} payload .565 * @param {DOMAgent.Node} payload 566 566 */ 567 567 _setDetachedRoot: function(payload) -
trunk/Source/WebCore/inspector/front-end/ExtensionServer.js
r95942 r96499 331 331 return this._status.E_BADARG("message.severity", message.severity); 332 332 333 var consoleMessage = new WebInspector.ConsoleMessage(333 var consoleMessage = WebInspector.ConsoleMessage.create( 334 334 WebInspector.ConsoleMessage.MessageSource.JS, 335 335 WebInspector.ConsoleMessage.MessageType.Log, -
trunk/Source/WebCore/inspector/front-end/NetworkManager.js
r95613 r96499 128 128 129 129 if (!this._mimeTypeIsConsistentWithType(resource)) { 130 WebInspector.console.addMessage( new WebInspector.ConsoleMessage(WebInspector.ConsoleMessage.MessageSource.Other,130 WebInspector.console.addMessage(WebInspector.ConsoleMessage.create(WebInspector.ConsoleMessage.MessageSource.Other, 131 131 WebInspector.ConsoleMessage.MessageType.Log, 132 132 WebInspector.ConsoleMessage.MessageLevel.Warning, … … 181 181 if (resource) { 182 182 // FIXME: move this check to the backend. 183 if ( this._isNull(redirectResponse))183 if (!redirectResponse) 184 184 return; 185 185 this.responseReceived(requestId, time, "Other", redirectResponse); … … 259 259 requestServedFromMemoryCache: function(requestId, frameId, loaderId, documentURL, time, initiator, cachedResource) 260 260 { 261 var resource = this._createResource(requestId, frameId, loaderId, cachedResource.url, documentURL, initiator );261 var resource = this._createResource(requestId, frameId, loaderId, cachedResource.url, documentURL, initiator, null); 262 262 this._updateResourceWithCachedResource(resource, cachedResource); 263 263 resource.cached = true; … … 270 270 webSocketCreated: function(requestId, requestURL) 271 271 { 272 var resource = this._createResource(requestId, null, null, requestURL);272 var resource = new WebInspector.Resource(requestId, requestURL, null, null); 273 273 resource.type = WebInspector.Resource.Type.WebSocket; 274 274 this._startResource(resource); … … 353 353 }, 354 354 355 /** 356 * @param {NetworkAgent.RequestId} requestId 357 * @param {string} frameId 358 * @param {NetworkAgent.LoaderId} loaderId 359 * @param {string} url 360 * @param {string} documentURL 361 * @param {NetworkAgent.Initiator} initiator 362 * @param {ConsoleAgent.StackTrace=} stackTrace 363 */ 355 364 _createResource: function(requestId, frameId, loaderId, url, documentURL, initiator, stackTrace) 356 365 { 357 var resource = new WebInspector.Resource(requestId, url, loaderId);366 var resource = new WebInspector.Resource(requestId, url, frameId, loaderId); 358 367 resource.documentURL = documentURL; 359 resource.frameId = frameId;360 368 resource.initiator = initiator; 361 369 resource.stackTrace = stackTrace; -
trunk/Source/WebCore/inspector/front-end/Resource.js
r96323 r96499 69 69 * @constructor 70 70 * @extends {WebInspector.Object} 71 * 72 * @param {NetworkAgent.RequestId} requestId 73 * @param {string} url 74 * @param {?string} frameId 75 * @param {?NetworkAgent.LoaderId} loaderId 71 76 */ 72 WebInspector.Resource = function(requestId, url, loaderId)77 WebInspector.Resource = function(requestId, url, frameId, loaderId) 73 78 { 74 79 this.requestId = requestId; 75 80 this.url = url; 81 this.frameId = frameId; 76 82 this.loaderId = loaderId; 77 83 this._startTime = -1; … … 82 88 /** @type {number} */ 83 89 this.statusCode = 0; 90 this.statusText = ""; 84 91 this.requestMethod = ""; 85 92 this.requestTime = 0; … … 821 828 setContent: function(newContent, majorChange, callback) 822 829 { 823 if (!this.isEditable( this)) {830 if (!this.isEditable()) { 824 831 if (callback) 825 832 callback("Resource is not editable"); … … 875 882 } 876 883 877 PageAgent.searchInResource(this.frameId, this.url, query, callbackWrapper); 884 if (this.frameId) 885 PageAgent.searchInResource(this.frameId, this.url, query, callbackWrapper); 886 else 887 callback([]); 878 888 }, 879 889 -
trunk/Source/WebCore/inspector/front-end/ResourceTreeModel.js
r95636 r96499 388 388 }, 389 389 390 /** 391 * @param {PageAgent.Frame} frame 392 * @param {string} url 393 */ 390 394 _createResource: function(frame, url) 391 395 { 392 var resource = new WebInspector.Resource(null, url, frame.loaderId); 393 resource.frameId = frame.id; 396 var resource = new WebInspector.Resource(null, url, frame.id, frame.loaderId); 394 397 resource.documentURL = frame.url; 395 398 resource.mimeType = frame.mimeType; -
trunk/Source/WebCore/inspector/front-end/externs.js
r96485 r96499 47 47 /** @param {string} url */ 48 48 WebInspector.linkifyStringAsFragment = function(url) {} 49 /** @param {string} url */ 50 WebInspector.linkifyStringAsFragmentWithCustomLinkifier = function(url, linkifier) {} 49 51 50 52 /** … … 72 74 73 75 Array.prototype.remove = function(obj) {} 76 77 WebInspector.extensionServer = {} 78 WebInspector.extensionServer.notifyResourceContentCommitted = function(resource, content) {} 79 80 /** 81 * @param {string} url 82 * @return {?WebInspector.Resource} 83 */ 84 WebInspector.resourceForURL = function(url) {} 85 86 WebInspector.debuggerPresentationModel = { 87 linkifyLocation: function(url, lineNumber, columnNumber, className) {} 88 } 89 90 /** 91 * @constructor 92 */ 93 WebInspector.ObjectPropertiesSection = function(obj, title) 94 { 95 this.element = null; 96 } 97 98 /** 99 * @constructor 100 * @extends {TreeOutline} 101 */ 102 WebInspector.ElementsTreeOutline = function() 103 { 104 this.element = null; 105 } 106 107 /** 108 * @param {NetworkAgent.RequestId} requestId 109 * @return {?WebInspector.Resource} 110 */ 111 WebInspector.networkResourceById = function(requestId) 112 { 113 } -
trunk/Source/WebCore/inspector/front-end/inspector.html
r96313 r96499 61 61 <script type="text/javascript" src="IFrameView.js"></script> 62 62 <script type="text/javascript" src="Drawer.js"></script> 63 <script type="text/javascript" src="ConsoleModel.js"></script> 63 64 <script type="text/javascript" src="ConsoleMessage.js"></script> 64 <script type="text/javascript" src="ConsoleModel.js"></script>65 65 <script type="text/javascript" src="ConsoleView.js"></script> 66 66 <script type="text/javascript" src="Panel.js"></script> -
trunk/Source/WebCore/inspector/front-end/inspector.js
r95984 r96499 557 557 this.extensionServer.initExtensions(); 558 558 559 this.console.enableAgent(); 559 // There is no console agent for workers yet. 560 if (!WebInspector.WorkerManager.isWorkerFrontend()) 561 this.console.enableAgent(); 560 562 DatabaseAgent.enable(); 561 563 DOMStorageAgent.enable(); … … 1143 1145 1144 1146 // post the message 1145 var msg = new WebInspector.ConsoleMessage(1147 var msg = WebInspector.ConsoleMessage.create( 1146 1148 WebInspector.ConsoleMessage.MessageSource.Other, 1147 1149 WebInspector.ConsoleMessage.MessageType.Log, -
trunk/Source/WebCore/inspector/front-end/utilities.js
r96215 r96499 665 665 } 666 666 667 String.sprintf = function(format) 667 /** 668 * @param {string} format 669 * @param {...*} var_arg 670 */ 671 String.sprintf = function(format, var_arg) 668 672 { 669 673 return String.vsprintf(format, Array.prototype.slice.call(arguments, 1)); -
trunk/Source/WebCore/inspector/generate-protocol-externs
r96485 r96499 102 102 output_file.write("/** @type {%s%s} */ this.%s;\n" % (param_type(domain_name, property), suffix, property["name"])) 103 103 output_file.write("}\n") 104 elif type["type"] == "array": 105 suffix = "" 106 if ("optional" in property): 107 suffix = "|undefined" 108 output_file.write("\n/** @typedef {Array.<%s>%s} */\n%sAgent.%s;\n" % (param_type(domain_name, type["items"]), suffix, domain_name, type["id"])) 104 109 else: 105 110 output_file.write("\n/** @typedef {%s} */\n%sAgent.%s;\n" % (type_traits[type["type"]], domain_name, type["id"])) -
trunk/Tools/ChangeLog
r96497 r96499 1 2011-10-03 Csaba Osztrogonác <ossy@webkit.org> 2 3 Unreviewed. Add Zoltán Árvai as contributor. 4 5 * Scripts/webkitpy/common/config/committers.py: 6 1 7 2011-10-03 Raphael Kubo da Costa <kubo@profusion.mobi> 2 8
Note: See TracChangeset
for help on using the changeset viewer.