[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
pfeldman at chromium.org
pfeldman at chromium.org
Wed Dec 22 11:59:04 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit d6057452b04595b10d624c620d9f26c42a97d642
Author: pfeldman at chromium.org <pfeldman at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Aug 12 13:38:32 2010 +0000
2010-08-12 Pavel Feldman <pfeldman at chromium.org>
Not reviewed. Adding the file missing in r65241.
* inspector/front-end/RemoteObject.js: Added.
(WebInspector.RemoteObjectId):
(WebInspector.RemoteObject):
(WebInspector.RemoteObject.fromPrimitiveValue):
(WebInspector.RemoteObject.fromNode):
(WebInspector.RemoteObject.fromPayload):
(WebInspector.RemoteObject.type):
(WebInspector.RemoteObject.prototype.get objectId):
(WebInspector.RemoteObject.prototype.get type):
(WebInspector.RemoteObject.prototype.get description):
(WebInspector.RemoteObject.prototype.get hasChildren):
(WebInspector.RemoteObject.prototype.isError):
(WebInspector.RemoteObject.prototype.getPropertyValueDescriptions):
(WebInspector.RemoteObject.prototype.getOwnProperties):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65243 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 8c607e6..7bd1801 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,5 +1,26 @@
2010-08-12 Pavel Feldman <pfeldman at chromium.org>
+ Not reviewed. Adding the file missing in r65241.
+
+ * inspector/front-end/RemoteObject.js: Added.
+ (WebInspector.RemoteObjectId):
+ (WebInspector.RemoteObject):
+ (WebInspector.RemoteObject.fromPrimitiveValue):
+ (WebInspector.RemoteObject.fromNode):
+ (WebInspector.RemoteObject.fromPayload):
+ (WebInspector.RemoteObject.type):
+ (WebInspector.RemoteObject.prototype.get objectId):
+ (WebInspector.RemoteObject.prototype.get type):
+ (WebInspector.RemoteObject.prototype.get description):
+ (WebInspector.RemoteObject.prototype.get hasChildren):
+ (WebInspector.RemoteObject.prototype.isError):
+ (WebInspector.RemoteObject.prototype.getPropertyValueDescriptions):
+ (WebInspector.RemoteObject.prototype.getOwnProperties):
+ (WebInspector.RemoteObject.prototype.getProperties.remoteObjectBinder):
+ (WebInspector.RemoteObjectProperty):
+
+2010-08-12 Pavel Feldman <pfeldman at chromium.org>
+
Reviewed by Yury Semikhatsky.
Web Inspector: brush up object proxies, introduce remote object model.
diff --git a/WebCore/inspector/front-end/RemoteObject.js b/WebCore/inspector/front-end/RemoteObject.js
new file mode 100644
index 0000000..6b21677
--- /dev/null
+++ b/WebCore/inspector/front-end/RemoteObject.js
@@ -0,0 +1,156 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+WebInspector.RemoteObjectId = function(injectedScriptId, type, value, path)
+{
+ this.injectedScriptId = injectedScriptId;
+ this.type = type;
+ this.value = value;
+ this.path = path || [];
+}
+
+WebInspector.RemoteObject = function(objectId, type, description, hasChildren)
+{
+ this._objectId = objectId;
+ this._type = type;
+ this._description = description;
+ this._hasChildren = hasChildren;
+}
+
+WebInspector.RemoteObject.fromPrimitiveValue = function(value)
+{
+ return new WebInspector.RemoteObject(null, typeof value, value);
+}
+
+WebInspector.RemoteObject.fromNode = function(node, path)
+{
+ var objectId = new WebInspector.RemoteObjectId(-node.id, "node", node.id, path);
+ return new WebInspector.RemoteObject(objectId, "node", appropriateSelectorForNode(node), true);
+}
+
+WebInspector.RemoteObject.fromPayload = function(payload)
+{
+ if (typeof payload === "object")
+ return new WebInspector.RemoteObject(payload.objectId, payload.type, payload.description, payload.hasChildren);
+ // FIXME: make sure we only get here with real payloads in the new DebuggerAgent.js.
+ return payload;
+}
+
+WebInspector.RemoteObject.type = function(remoteObject)
+{
+ if (remoteObject === null)
+ return "null";
+
+ var type = typeof remoteObject;
+ if (type !== "object" && type !== "function")
+ return type;
+
+ return remoteObject.type;
+}
+
+WebInspector.RemoteObject.prototype = {
+ get objectId()
+ {
+ return this._objectId;
+ },
+
+ get type()
+ {
+ return this._type;
+ },
+
+ get description()
+ {
+ return this._description;
+ },
+
+ get hasChildren()
+ {
+ return this._hasChildren;
+ },
+
+ isError: function()
+ {
+ return this._type === "error";
+ },
+
+ getPropertyValueDescriptions: function(propertiesToQueryFor, callback)
+ {
+ function createPropertiesMapThenCallback(propertiesPayload)
+ {
+ if (!propertiesPayload) {
+ callback();
+ return;
+ }
+
+ var result = {};
+ for (var i = 0; i < propertiesPayload.length; ++i)
+ if (propertiesToQueryFor.indexOf(propertiesPayload[i].name) !== -1)
+ result[propertiesPayload[i].name] = propertiesPayload[i].value.description;
+ callback(result);
+ }
+ this.getProperties(true, false, createPropertiesMapThenCallback);
+ },
+
+ getOwnProperties: function(abbreviate, callback)
+ {
+ this.getProperties(false, abbreviate, callback);
+ },
+
+ getProperties: function(ignoreHasOwnProperty, abbreviate, callback)
+ {
+ if (!this._objectId) {
+ callback([]);
+ return;
+ }
+ function remoteObjectBinder(properties)
+ {
+ for (var i = 0; properties && i < properties.length; ++i)
+ properties[i].value = WebInspector.RemoteObject.fromPayload(properties[i].value);
+ callback(properties);
+ }
+ InjectedScriptAccess.get(this._objectId.injectedScriptId).getProperties(this._objectId, ignoreHasOwnProperty, abbreviate, remoteObjectBinder);
+ },
+
+ setPropertyValue: function(name, value, callback)
+ {
+ if (!this._objectId) {
+ callback(false);
+ return;
+ }
+ InjectedScriptAccess.get(this._objectId.injectedScriptId).setPropertyValue(this._objectId, name, value, callback);
+ }
+}
+
+WebInspector.RemoteObjectProperty = function(name, value)
+{
+ this.name = name;
+ this.value = value;
+}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list