https://bugs.webkit.org/show_bug.cgi?id=69253
Reviewed by Yury Semikhatsky.
* inspector/Inspector.json:
* inspector/compile-front-end.sh:
* inspector/front-end/ConsoleMessage.js:
(WebInspector.ConsoleMessage.create):
(WebInspector.ConsoleMessage.createTextMessage):
(WebInspector.ConsoleMessageImpl):
* inspector/front-end/ConsoleModel.js:
(WebInspector.ConsoleModel.prototype._messageRepeatCountUpdated):
(WebInspector.ConsoleMessage.create):
(WebInspector.ConsoleMessage.createTextMessage):
(WebInspector.ConsoleDispatcher.prototype.messageAdded):
* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleCommandResult):
(WebInspector.ConsoleCommandResult.prototype.toMessageElement):
* inspector/front-end/CookieParser.js:
(WebInspector.Cookie.prototype.get path):
(WebInspector.Cookie.prototype.get domain):
(WebInspector.Cookie.prototype.expires):
* inspector/front-end/DOMAgent.js:
* inspector/front-end/ExtensionServer.js:
(WebInspector.ExtensionServer.prototype._onAddConsoleMessage):
* inspector/front-end/NetworkManager.js:
(WebInspector.NetworkDispatcher.prototype._updateResourceWithResponse):
(WebInspector.NetworkDispatcher.prototype.requestWillBeSent):
(WebInspector.NetworkDispatcher.prototype.requestServedFromMemoryCache):
(WebInspector.NetworkDispatcher.prototype.webSocketCreated):
(WebInspector.NetworkDispatcher.prototype._createResource):
* inspector/front-end/Resource.js:
(WebInspector.Resource):
(WebInspector.Resource.prototype.setContent):
(WebInspector.Resource.prototype.searchInContent):
* inspector/front-end/ResourceTreeModel.js:
(WebInspector.ResourceTreeModel.prototype._createResource):
* inspector/front-end/externs.js:
(WebInspector.linkifyStringAsFragmentWithCustomLinkifier):
(WebInspector.extensionServer.notifyResourceContentCommitted):
(WebInspector.resourceForURL):
(WebInspector.debuggerPresentationModel.linkifyLocation):
(WebInspector.ObjectPropertiesSection):
(WebInspector.ElementsTreeOutline):
* inspector/front-end/inspector.html:
* inspector/front-end/inspector.js:
(WebInspector.log.logMessage):
(WebInspector.log):
* inspector/generate-protocol-externs:
Tools: Unreviewed. Add Zoltán Árvai as contributor.
Patch by Csaba Osztrogonác <ossy@webkit.org> on 2011-10-03
* Scripts/webkitpy/common/config/committers.py:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96499
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-10-03 Pavel Feldman <pfeldman@google.com>
+
+ Web Inspector: more compilation fixes including making ConsoleMessage a part of console model.
+ https://bugs.webkit.org/show_bug.cgi?id=69253
+
+ Reviewed by Yury Semikhatsky.
+
+ * inspector/Inspector.json:
+ * inspector/compile-front-end.sh:
+ * inspector/front-end/ConsoleMessage.js:
+ (WebInspector.ConsoleMessage.create):
+ (WebInspector.ConsoleMessage.createTextMessage):
+ (WebInspector.ConsoleMessageImpl):
+ * inspector/front-end/ConsoleModel.js:
+ (WebInspector.ConsoleModel.prototype._messageRepeatCountUpdated):
+ (WebInspector.ConsoleMessage.create):
+ (WebInspector.ConsoleMessage.createTextMessage):
+ (WebInspector.ConsoleDispatcher.prototype.messageAdded):
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleCommandResult):
+ (WebInspector.ConsoleCommandResult.prototype.toMessageElement):
+ * inspector/front-end/CookieParser.js:
+ (WebInspector.Cookie.prototype.get path):
+ (WebInspector.Cookie.prototype.get domain):
+ (WebInspector.Cookie.prototype.expires):
+ * inspector/front-end/DOMAgent.js:
+ * inspector/front-end/ExtensionServer.js:
+ (WebInspector.ExtensionServer.prototype._onAddConsoleMessage):
+ * inspector/front-end/NetworkManager.js:
+ (WebInspector.NetworkDispatcher.prototype._updateResourceWithResponse):
+ (WebInspector.NetworkDispatcher.prototype.requestWillBeSent):
+ (WebInspector.NetworkDispatcher.prototype.requestServedFromMemoryCache):
+ (WebInspector.NetworkDispatcher.prototype.webSocketCreated):
+ (WebInspector.NetworkDispatcher.prototype._createResource):
+ * inspector/front-end/Resource.js:
+ (WebInspector.Resource):
+ (WebInspector.Resource.prototype.setContent):
+ (WebInspector.Resource.prototype.searchInContent):
+ * inspector/front-end/ResourceTreeModel.js:
+ (WebInspector.ResourceTreeModel.prototype._createResource):
+ * inspector/front-end/externs.js:
+ (WebInspector.linkifyStringAsFragmentWithCustomLinkifier):
+ (WebInspector.extensionServer.notifyResourceContentCommitted):
+ (WebInspector.resourceForURL):
+ (WebInspector.debuggerPresentationModel.linkifyLocation):
+ (WebInspector.ObjectPropertiesSection):
+ (WebInspector.ElementsTreeOutline):
+ * inspector/front-end/inspector.html:
+ * inspector/front-end/inspector.js:
+ (WebInspector.log.logMessage):
+ (WebInspector.log):
+ * inspector/generate-protocol-externs:
+
+2011-10-03 Pavel Feldman <pfeldman@google.com>
+
+ Web Inspector: move console message formatting from ConsoleView.js into ConsoleMessage.js
+ https://bugs.webkit.org/show_bug.cgi?id=69244
+
+ Reviewed by Yury Semikhatsky.
+
+ * inspector/front-end/ConsoleMessage.js:
+ (WebInspector.ConsoleMessage):
+ (WebInspector.ConsoleMessage.prototype._formatMessage.else.else.linkifier):
+ (WebInspector.ConsoleMessage.prototype._formatMessage):
+ (WebInspector.ConsoleMessage.prototype._format):
+ (WebInspector.ConsoleMessage.prototype._formatParameter):
+ (WebInspector.ConsoleMessage.prototype._formatParameterAsValue):
+ (WebInspector.ConsoleMessage.prototype._formatParameterAsObject):
+ (WebInspector.ConsoleMessage.prototype._formatParameterAsNode):
+ (WebInspector.ConsoleMessage.prototype._formatParameterAsArray):
+ (WebInspector.ConsoleMessage.prototype._formatParameterAsString):
+ (WebInspector.ConsoleMessage.prototype._printArray):
+ (WebInspector.ConsoleMessage.prototype._formatAsArrayEntry):
+ (WebInspector.ConsoleMessage.prototype._formatWithSubstitutionString):
+ * inspector/front-end/ConsoleView.js:
+
2011-10-03 Dirk Schulze <krit@webkit.org>
feColorMatrix saturation is not limited to range 0..1 anymore
]
},
{
+ "id": "WebSocketRequest",
+ "type": "object",
+ "description": "WebSocket request data.",
+ "hidden": true,
+ "properties": [
+ { "name": "requestKey3", "type": "string", "description": "HTTP response status text." },
+ { "name": "headers", "$ref": "Headers", "description": "HTTP response headers." }
+ ]
+ },
+ {
+ "id": "WebSocketResponse",
+ "type": "object",
+ "description": "WebSocket response data.",
+ "hidden": true,
+ "properties": [
+ { "name": "status", "type": "number", "description": "HTTP response status code." },
+ { "name": "statusText", "type": "string", "description": "HTTP response status text." },
+ { "name": "headers", "$ref": "Headers", "description": "HTTP response headers." },
+ { "name": "challengeResponse", "type": "string", "description": "Challenge response." }
+ ]
+ },
+ {
"id": "CachedResource",
"type": "object",
"description": "Information about the cached resource.",
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
{ "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
- { "name": "request", "type": "object", "description": "WebSocket request data." }
+ { "name": "request", "$ref": "WebSocketRequest", "description": "WebSocket request data." }
],
"hidden": true
},
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
{ "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
- { "name": "response", "type": "object", "description": "WebSocket response data." }
+ { "name": "response", "$ref": "WebSocketResponse", "description": "WebSocket response data." }
],
"hidden": true
},
{ "name": "publicId", "type": "string", "optional": true, "description": "<code>DocumentType</code>'s publicId." },
{ "name": "systemId", "type": "string", "optional": true, "description": "<code>DocumentType</code>'s systemId." },
{ "name": "internalSubset", "type": "string", "optional": true, "description": "<code>DocumentType</code>'s internalSubset." },
+ { "name": "xmlVersion", "type": "string", "optional": true, "description": "<code>Document</code>'s XML version in case of XML documents." },
{ "name": "name", "type": "string", "optional": true, "description": "<code>Attr</code>'s name." },
{ "name": "value", "type": "string", "optional": true, "description": "<code>Attr</code>'s value." }
],
java -jar ~/closure/compiler.jar --compilation_level SIMPLE_OPTIMIZATIONS --warning_level VERBOSE --language_in ECMASCRIPT5 --accept_const_keyword \
--externs Source/WebCore/inspector/front-end/externs.js \
--externs Source/WebCore/inspector/front-end/protocol-externs.js \
- --module jsmodule_core:2 \
+ --module jsmodule_util:2 \
--js Source/WebCore/inspector/front-end/utilities.js \
--js Source/WebCore/inspector/front-end/treeoutline.js \
- --module jsmodule_env:3 \
- --js Source/WebCore/inspector/front-end/Settings.js \
- --js Source/WebCore/inspector/front-end/UserMetrics.js \
+ --module jsmodule_host:1 \
--js Source/WebCore/inspector/front-end/InspectorFrontendHostStub.js \
- --module jsmodule_sdk:7:jsmodule_core,jsmodule_env \
+ --module jsmodule_common:4:jsmodule_util,jsmodule_host \
--js Source/WebCore/inspector/front-end/BinarySearch.js \
+ --js Source/WebCore/inspector/front-end/Object.js \
+ --js Source/WebCore/inspector/front-end/Settings.js \
+ --js Source/WebCore/inspector/front-end/UserMetrics.js \
+ --module jsmodule_sdk:9:jsmodule_common,jsmodule_host \
--js Source/WebCore/inspector/front-end/DOMAgent.js \
--js Source/WebCore/inspector/front-end/DebuggerModel.js \
- --js Source/WebCore/inspector/front-end/Object.js \
--js Source/WebCore/inspector/front-end/Script.js \
--js Source/WebCore/inspector/front-end/RemoteObject.js \
--js Source/WebCore/inspector/front-end/ResourceCategory.js \
- --module jsmodule_misc:10:jsmodule_sdk \
+ --js Source/WebCore/inspector/front-end/CookieParser.js \
+ --js Source/WebCore/inspector/front-end/ConsoleModel.js \
+ --js Source/WebCore/inspector/front-end/Resource.js \
+ --js Source/WebCore/inspector/front-end/NetworkManager.js \
+ --module jsmodule_misc:11:jsmodule_sdk \
--js Source/WebCore/inspector/front-end/Checkbox.js \
--js Source/WebCore/inspector/front-end/ContextMenu.js \
+ --js Source/WebCore/inspector/front-end/ConsoleMessage.js \
--js Source/WebCore/inspector/front-end/KeyboardShortcut.js \
--js Source/WebCore/inspector/front-end/View.js \
--js Source/WebCore/inspector/front-end/Placard.js \
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/**
- * @constructor
- */
-WebInspector.ConsoleStackFrame = function()
+WebInspector.ConsoleMessage.create = function(source, type, level, line, url, repeatCount, message, parameters, stackTrace, request)
+{
+ return new WebInspector.ConsoleMessageImpl(source, type, level, line, url, repeatCount, message, parameters, stackTrace, request);
+}
+
+WebInspector.ConsoleMessage.createTextMessage = function(text, level)
{
- this.url = undefined;
- this.functionName = undefined;
- this.lineNumber = undefined;
- this.columnNumber = undefined;
+ level = level || WebInspector.ConsoleMessage.MessageLevel.Log;
+ return new WebInspector.ConsoleMessageImpl(WebInspector.ConsoleMessage.MessageSource.ConsoleAPI, WebInspector.ConsoleMessage.MessageType.Log, level, 0, null, 1, null, [text], null);
}
/**
* @constructor
+ * @extends {WebInspector.ConsoleMessage}
* @param {Array.<RuntimeAgent.RemoteObject>=} parameters
* @param {ConsoleAgent.StackTrace=} stackTrace
* @param {WebInspector.Resource=} request
*/
-WebInspector.ConsoleMessage = function(source, type, level, line, url, repeatCount, message, parameters, stackTrace, request)
+WebInspector.ConsoleMessageImpl = function(source, type, level, line, url, repeatCount, message, parameters, stackTrace, request)
{
+ WebInspector.ConsoleMessage.call();
+
this.source = source;
this.type = type;
this.level = level;
"node": this._formatParameterAsNode,
"string": this._formatParameterAsString
};
-
- this._formatMessage();
}
-WebInspector.ConsoleMessage.createTextMessage = function(text, level)
-{
- level = level || WebInspector.ConsoleMessage.MessageLevel.Log;
- return new WebInspector.ConsoleMessage(WebInspector.ConsoleMessage.MessageSource.ConsoleAPI, WebInspector.ConsoleMessage.MessageType.Log, level, 0, null, 1, null, [text], null);
-}
-
-WebInspector.ConsoleMessage.prototype = {
+WebInspector.ConsoleMessageImpl.prototype = {
_formatMessage: function()
{
this._formattedMessage = document.createElement("span");
this.message = (urlElement ? urlElement.textContent + " " : "") + messageText.textContent;
},
+ get formattedMessage()
+ {
+ if (!this._formattedMessage)
+ this._formatMessage();
+ return this._formattedMessage;
+ },
+
_linkifyLocation: function(url, lineNumber, columnNumber)
{
// FIXME(62725): stack trace line/column numbers are one-based.
clearHighlight: function()
{
+ if (!this._formattedMessage)
+ return;
+
var highlightedMessage = this._formattedMessage;
delete this._formattedMessage;
this._formatMessage();
highlightSearchResults: function(regexObject)
{
+ if (!this._formattedMessage)
+ return;
+
regexObject.lastIndex = 0;
var text = this.message;
var match = regexObject.exec(text);
if (this.type === WebInspector.ConsoleMessage.MessageType.StartGroup || this.type === WebInspector.ConsoleMessage.MessageType.StartGroupCollapsed)
element.addStyleClass("console-group-title");
- element.appendChild(this._formattedMessage);
+ element.appendChild(this.formattedMessage);
if (this.repeatCount > 1)
- this._updateRepeatCount();
+ this.updateRepeatCount();
return element;
},
}
},
- _updateRepeatCount: function() {
+ updateRepeatCount: function() {
if (!this.repeatCountElement) {
this.repeatCountElement = document.createElement("span");
this.repeatCountElement.className = "bubble";
break;
}
- return sourceString + " " + typeString + " " + levelString + ": " + this._formattedMessage.textContent + "\n" + this.url + " line " + this.line;
+ return sourceString + " " + typeString + " " + levelString + ": " + this.formattedMessage.textContent + "\n" + this.url + " line " + this.line;
},
get text()
}
}
-// Note: Keep these constants in sync with the ones in Console.h
-WebInspector.ConsoleMessage.MessageSource = {
- HTML: "html",
- XML: "xml",
- JS: "javascript",
- Network: "network",
- ConsoleAPI: "console-api",
- Other: "other"
-}
-
-WebInspector.ConsoleMessage.MessageType = {
- Log: "log",
- Dir: "dir",
- DirXML: "dirxml",
- Trace: "trace",
- StartGroup: "startGroup",
- StartGroupCollapsed: "startGroupCollapsed",
- EndGroup: "endGroup",
- Assert: "assert",
- Result: "result"
-}
-
-WebInspector.ConsoleMessage.MessageLevel = {
- Tip: "tip",
- Log: "log",
- Warning: "warning",
- Error: "error",
- Debug: "debug"
-}
+WebInspector.ConsoleMessageImpl.prototype.__proto__ = WebInspector.ConsoleMessage.prototype;
/**
* @constructor
+ * @extends {WebInspector.Object}
*/
WebInspector.ConsoleModel = function()
{
if (WebInspector.settings.monitoringXHREnabled.get())
ConsoleAgent.setMonitoringXHREnabled(true);
- // There is no console agent for workers yet.
- if (!WebInspector.WorkerManager.isWorkerFrontend())
- ConsoleAgent.enable(this._setConsoleMessageExpiredCount.bind(this));
+ ConsoleAgent.enable(this._setConsoleMessageExpiredCount.bind(this));
},
_setConsoleMessageExpiredCount: function(count)
msg.repeatDelta = count - prevRepeatCount;
msg.repeatCount = msg.repeatCount + msg.repeatDelta;
msg.totalRepeatCount = count;
- msg._updateRepeatCount();
+ msg.updateRepeatCount();
this._incrementErrorWarningCount(msg);
this.dispatchEventToListeners(WebInspector.ConsoleModel.Events.RepeatCountUpdated, msg);
} else {
- 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);
+ 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);
msgCopy.totalRepeatCount = count;
- msgCopy._formatMessage();
this.addMessage(msgCopy);
}
}
/**
* @constructor
+ */
+WebInspector.ConsoleMessage = function()
+{
+ this.repeatDelta = 0;
+ this.repeatCount = 0;
+ this._totalRepeatCount = 0;
+}
+
+WebInspector.ConsoleMessage.prototype = {
+ get totalRepeatCount()
+ {
+ return this._totalRepeatCount;
+ },
+
+ set totalRepeatCount(totalRepeatCount)
+ {
+ this._totalRepeatCount = totalRepeatCount;
+ },
+
+ updateRepeatCount: function()
+ {
+ // Implemented by concrete instances
+ }
+}
+
+/**
+ * @param {string} source
+ * @param {string} type
+ * @param {string} level
+ * @param {number} line
+ * @param {string} url
+ * @param {number} repeatCount
+ * @param {string} message
+ * @param {Array.<RuntimeAgent.RemoteObject>=} parameters
+ * @param {ConsoleAgent.StackTrace=} stackTrace
+ * @param {WebInspector.Resource=} request
+ *
+ * @return {WebInspector.ConsoleMessage}
+ */
+WebInspector.ConsoleMessage.create = function(source, type, level, line, url, repeatCount, message, parameters, stackTrace, request)
+{
+}
+
+/**
+ * @param {string} text
+ * @param {string} level
+ * @return {WebInspector.ConsoleMessage}
+ */
+WebInspector.ConsoleMessage.createTextMessage = function(text, level)
+{
+}
+
+// Note: Keep these constants in sync with the ones in Console.h
+WebInspector.ConsoleMessage.MessageSource = {
+ HTML: "html",
+ XML: "xml",
+ JS: "javascript",
+ Network: "network",
+ ConsoleAPI: "console-api",
+ Other: "other"
+}
+
+WebInspector.ConsoleMessage.MessageType = {
+ Log: "log",
+ Dir: "dir",
+ DirXML: "dirxml",
+ Trace: "trace",
+ StartGroup: "startGroup",
+ StartGroupCollapsed: "startGroupCollapsed",
+ EndGroup: "endGroup",
+ Assert: "assert",
+ Result: "result"
+}
+
+WebInspector.ConsoleMessage.MessageLevel = {
+ Tip: "tip",
+ Log: "log",
+ Warning: "warning",
+ Error: "error",
+ Debug: "debug"
+}
+
+
+/**
+ * @constructor
* @implements {ConsoleAgent.Dispatcher}
* @param {WebInspector.ConsoleModel} console
*/
WebInspector.ConsoleDispatcher.prototype = {
messageAdded: function(payload)
{
- var consoleMessage = new WebInspector.ConsoleMessage(
+ var consoleMessage = WebInspector.ConsoleMessage.create(
payload.source,
payload.type,
payload.level,
{
var level = (wasThrown ? WebInspector.ConsoleMessage.MessageLevel.Error : WebInspector.ConsoleMessage.MessageLevel.Log);
this.originatingCommand = originatingCommand;
- WebInspector.ConsoleMessage.call(this, WebInspector.ConsoleMessage.MessageSource.JS, WebInspector.ConsoleMessage.MessageType.Result, level, -1, null, 1, null, [result]);
+ WebInspector.ConsoleMessageImpl.call(this, WebInspector.ConsoleMessage.MessageSource.JS, WebInspector.ConsoleMessage.MessageType.Result, level, -1, null, 1, null, [result]);
}
WebInspector.ConsoleCommandResult.prototype = {
toMessageElement: function()
{
- var element = WebInspector.ConsoleMessage.prototype.toMessageElement.call(this);
+ var element = WebInspector.ConsoleMessageImpl.prototype.toMessageElement.call(this);
element.addStyleClass("console-user-command-result");
return element;
}
}
-WebInspector.ConsoleCommandResult.prototype.__proto__ = WebInspector.ConsoleMessage.prototype;
+WebInspector.ConsoleCommandResult.prototype.__proto__ = WebInspector.ConsoleMessageImpl.prototype;
WebInspector.ConsoleGroup = function(parentGroup)
{
get path()
{
- return this._attributes.path;
+ return this._attributes["path"];
},
get domain()
{
- return this._attributes.domain;
+ return this._attributes["domain"];
},
expires: function(requestDate)
{
- return this._attributes.expires ? new Date(this._attributes.expires) :
+ return this._attributes["expires"] ? new Date(this._attributes["expires"]) :
(this._attributes["max-age"] ? new Date(requestDate.getTime() + 1000 * this._attributes["max-age"]) : null);
},
/**
* @constructor
- * @param {DOMAgent.Node} payload.
+ * @param {DOMAgent.Node} payload
*/
WebInspector.DOMNode = function(doc, payload) {
this.ownerDocument = doc;
},
/**
- * @param {DOMAgent.Node} payload.
+ * @param {DOMAgent.Node} payload
*/
_insertChild: function(prev, payload)
{
/**
* @extends {WebInspector.DOMNode}
* @constructor
- * @param {DOMAgent.Node} payload.
+ * @param {DOMAgent.Node} payload
*/
WebInspector.DOMDocument = function(domAgent, payload)
{
},
/**
- * @param {DOMAgent.Node} payload.
+ * @param {DOMAgent.Node} payload
*/
_setDocument: function(payload)
{
},
/**
- * @param {DOMAgent.Node} payload.
+ * @param {DOMAgent.Node} payload
*/
_setDetachedRoot: function(payload)
{
if (!level)
return this._status.E_BADARG("message.severity", message.severity);
- var consoleMessage = new WebInspector.ConsoleMessage(
+ var consoleMessage = WebInspector.ConsoleMessage.create(
WebInspector.ConsoleMessage.MessageSource.JS,
WebInspector.ConsoleMessage.MessageType.Log,
level,
resource.timing = response.timing;
if (!this._mimeTypeIsConsistentWithType(resource)) {
- WebInspector.console.addMessage(new WebInspector.ConsoleMessage(WebInspector.ConsoleMessage.MessageSource.Other,
+ WebInspector.console.addMessage(WebInspector.ConsoleMessage.create(WebInspector.ConsoleMessage.MessageSource.Other,
WebInspector.ConsoleMessage.MessageType.Log,
WebInspector.ConsoleMessage.MessageLevel.Warning,
-1,
var resource = this._inflightResourcesById[requestId];
if (resource) {
// FIXME: move this check to the backend.
- if (this._isNull(redirectResponse))
+ if (!redirectResponse)
return;
this.responseReceived(requestId, time, "Other", redirectResponse);
resource = this._appendRedirect(requestId, time, request.url);
requestServedFromMemoryCache: function(requestId, frameId, loaderId, documentURL, time, initiator, cachedResource)
{
- var resource = this._createResource(requestId, frameId, loaderId, cachedResource.url, documentURL, initiator);
+ var resource = this._createResource(requestId, frameId, loaderId, cachedResource.url, documentURL, initiator, null);
this._updateResourceWithCachedResource(resource, cachedResource);
resource.cached = true;
resource.requestMethod = "GET";
webSocketCreated: function(requestId, requestURL)
{
- var resource = this._createResource(requestId, null, null, requestURL);
+ var resource = new WebInspector.Resource(requestId, requestURL, null, null);
resource.type = WebInspector.Resource.Type.WebSocket;
this._startResource(resource);
},
this._manager.dispatchEventToListeners(eventType, resource);
},
+ /**
+ * @param {NetworkAgent.RequestId} requestId
+ * @param {string} frameId
+ * @param {NetworkAgent.LoaderId} loaderId
+ * @param {string} url
+ * @param {string} documentURL
+ * @param {NetworkAgent.Initiator} initiator
+ * @param {ConsoleAgent.StackTrace=} stackTrace
+ */
_createResource: function(requestId, frameId, loaderId, url, documentURL, initiator, stackTrace)
{
- var resource = new WebInspector.Resource(requestId, url, loaderId);
+ var resource = new WebInspector.Resource(requestId, url, frameId, loaderId);
resource.documentURL = documentURL;
- resource.frameId = frameId;
resource.initiator = initiator;
resource.stackTrace = stackTrace;
return resource;
/**
* @constructor
* @extends {WebInspector.Object}
+ *
+ * @param {NetworkAgent.RequestId} requestId
+ * @param {string} url
+ * @param {?string} frameId
+ * @param {?NetworkAgent.LoaderId} loaderId
*/
-WebInspector.Resource = function(requestId, url, loaderId)
+WebInspector.Resource = function(requestId, url, frameId, loaderId)
{
this.requestId = requestId;
this.url = url;
+ this.frameId = frameId;
this.loaderId = loaderId;
this._startTime = -1;
this._endTime = -1;
this.history = [];
/** @type {number} */
this.statusCode = 0;
+ this.statusText = "";
this.requestMethod = "";
this.requestTime = 0;
this.receiveHeadersEnd = 0;
setContent: function(newContent, majorChange, callback)
{
- if (!this.isEditable(this)) {
+ if (!this.isEditable()) {
if (callback)
callback("Resource is not editable");
return;
callback(searchMatches || []);
}
- PageAgent.searchInResource(this.frameId, this.url, query, callbackWrapper);
+ if (this.frameId)
+ PageAgent.searchInResource(this.frameId, this.url, query, callbackWrapper);
+ else
+ callback([]);
},
populateImageSource: function(image)
}
},
+ /**
+ * @param {PageAgent.Frame} frame
+ * @param {string} url
+ */
_createResource: function(frame, url)
{
- var resource = new WebInspector.Resource(null, url, frame.loaderId);
- resource.frameId = frame.id;
+ var resource = new WebInspector.Resource(null, url, frame.id, frame.loaderId);
resource.documentURL = frame.url;
resource.mimeType = frame.mimeType;
return resource;
/** @param {string} url */
WebInspector.linkifyStringAsFragment = function(url) {}
+/** @param {string} url */
+WebInspector.linkifyStringAsFragmentWithCustomLinkifier = function(url, linkifier) {}
/**
* @param {string} url
Element.prototype.scrollIntoViewIfNeeded = function() {}
Array.prototype.remove = function(obj) {}
+
+WebInspector.extensionServer = {}
+WebInspector.extensionServer.notifyResourceContentCommitted = function(resource, content) {}
+
+/**
+ * @param {string} url
+ * @return {?WebInspector.Resource}
+ */
+WebInspector.resourceForURL = function(url) {}
+
+WebInspector.debuggerPresentationModel = {
+ linkifyLocation: function(url, lineNumber, columnNumber, className) {}
+}
+
+/**
+ * @constructor
+ */
+WebInspector.ObjectPropertiesSection = function(obj, title)
+{
+ this.element = null;
+}
+
+/**
+ * @constructor
+ * @extends {TreeOutline}
+ */
+WebInspector.ElementsTreeOutline = function()
+{
+ this.element = null;
+}
+
+/**
+ * @param {NetworkAgent.RequestId} requestId
+ * @return {?WebInspector.Resource}
+ */
+WebInspector.networkResourceById = function(requestId)
+{
+}
<script type="text/javascript" src="TabbedPane.js"></script>
<script type="text/javascript" src="IFrameView.js"></script>
<script type="text/javascript" src="Drawer.js"></script>
- <script type="text/javascript" src="ConsoleMessage.js"></script>
<script type="text/javascript" src="ConsoleModel.js"></script>
+ <script type="text/javascript" src="ConsoleMessage.js"></script>
<script type="text/javascript" src="ConsoleView.js"></script>
<script type="text/javascript" src="Panel.js"></script>
<script type="text/javascript" src="TimelineGrid.js"></script>
this.extensionServer.initExtensions();
- this.console.enableAgent();
+ // There is no console agent for workers yet.
+ if (!WebInspector.WorkerManager.isWorkerFrontend())
+ this.console.enableAgent();
DatabaseAgent.enable();
DOMStorageAgent.enable();
message = WebInspector.RemoteObject.fromPrimitiveValue(message);
// post the message
- var msg = new WebInspector.ConsoleMessage(
+ var msg = WebInspector.ConsoleMessage.create(
WebInspector.ConsoleMessage.MessageSource.Other,
WebInspector.ConsoleMessage.MessageType.Log,
messageLevel || WebInspector.ConsoleMessage.MessageLevel.Debug,
return Array.prototype.slice.call(list);
}
-String.sprintf = function(format)
+/**
+ * @param {string} format
+ * @param {...*} var_arg
+ */
+String.sprintf = function(format, var_arg)
{
return String.vsprintf(format, Array.prototype.slice.call(arguments, 1));
}
suffix = "|undefined"
output_file.write("/** @type {%s%s} */ this.%s;\n" % (param_type(domain_name, property), suffix, property["name"]))
output_file.write("}\n")
+ elif type["type"] == "array":
+ suffix = ""
+ if ("optional" in property):
+ suffix = "|undefined"
+ output_file.write("\n/** @typedef {Array.<%s>%s} */\n%sAgent.%s;\n" % (param_type(domain_name, type["items"]), suffix, domain_name, type["id"]))
else:
output_file.write("\n/** @typedef {%s} */\n%sAgent.%s;\n" % (type_traits[type["type"]], domain_name, type["id"]))
+2011-10-03 Csaba Osztrogonác <ossy@webkit.org>
+
+ Unreviewed. Add Zoltán Árvai as contributor.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
2011-10-03 Raphael Kubo da Costa <kubo@profusion.mobi>
[EFL] DRT: Add DumpHistoryItem.{cpp,h}