[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
caseq at chromium.org
caseq at chromium.org
Wed Dec 22 15:47:38 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit b21bdca940876471f7e43ed5f7ebb7782c9d1333
Author: caseq at chromium.org <caseq at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Nov 12 15:43:31 2010 +0000
2010-11-12 Andrey Kosyakov <caseq at chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: [Extensions API] [refactoring] generate public API interfaces automatically
Adjusting the order of properties in API interfaces dumps in the expectations.
https://bugs.webkit.org/show_bug.cgi?id=49441
* inspector/extensions-api-expected.txt:
* inspector/extensions-audits-api-expected.txt:
* inspector/extensions-expected.txt:
2010-11-12 Andrey Kosyakov <caseq at chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: [Extensions API] [refactoring] generate public API interfaces automatically
https://bugs.webkit.org/show_bug.cgi?id=49441
* inspector/front-end/ExtensionAPI.js:
(WebInspector.injectedExtensionAPI.PanelImpl):
(WebInspector.injectedExtensionAPI):
(WebInspector.injectedExtensionAPI.WatchExpressionSidebarPane):
(WebInspector.injectedExtensionAPI.AuditCategoryImpl):
(WebInspector.injectedExtensionAPI.AuditResultImpl):
(WebInspector.injectedExtensionAPI.AuditResultImpl.prototype.get Severity):
(WebInspector.injectedExtensionAPI.):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71911 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index cd46259..3fb1900 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-11-12 Andrey Kosyakov <caseq at chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: [Extensions API] [refactoring] generate public API interfaces automatically
+ Adjusting the order of properties in API interfaces dumps in the expectations.
+ https://bugs.webkit.org/show_bug.cgi?id=49441
+
+ * inspector/extensions-api-expected.txt:
+ * inspector/extensions-audits-api-expected.txt:
+ * inspector/extensions-expected.txt:
+
2010-11-12 Marcus Bulach <bulach at chromium.org>
Not reviewed, Chromium test expectation update.
diff --git a/LayoutTests/inspector/extensions-api-expected.txt b/LayoutTests/inspector/extensions-api-expected.txt
index d886313..5657eea 100644
--- a/LayoutTests/inspector/extensions-api-expected.txt
+++ b/LayoutTests/inspector/extensions-api-expected.txt
@@ -26,20 +26,20 @@ RUNNING TEST: extension_testAPI
}
panels : {
elements : {
- createSidebarPane : <function>
- createWatchExpressionSidebarPane : <function>
onSelectionChanged : {
addListener : <function>
removeListener : <function>
}
- }
- scripts : {
createSidebarPane : <function>
createWatchExpressionSidebarPane : <function>
+ }
+ scripts : {
onSelectionChanged : {
addListener : <function>
removeListener : <function>
}
+ createSidebarPane : <function>
+ createWatchExpressionSidebarPane : <function>
}
create : <function>
}
diff --git a/LayoutTests/inspector/extensions-audits-api-expected.txt b/LayoutTests/inspector/extensions-audits-api-expected.txt
index 920b3c3..f14b6bb 100644
--- a/LayoutTests/inspector/extensions-audits-api-expected.txt
+++ b/LayoutTests/inspector/extensions-audits-api-expected.txt
@@ -13,12 +13,12 @@ Added audit category, result dump follows:
}
category.onAuditStarted fired, results dump follows:
{
- addResult : <function>
- createResult : <function>
- done : <function>
url : <function>
snippet : <function>
text : <function>
+ addResult : <function>
+ createResult : <function>
+ done : <function>
Severity : {
Info : "info"
Warning : "warning"
diff --git a/LayoutTests/inspector/extensions-expected.txt b/LayoutTests/inspector/extensions-expected.txt
index 15c6653..87bb928 100644
--- a/LayoutTests/inspector/extensions-expected.txt
+++ b/LayoutTests/inspector/extensions-expected.txt
@@ -7,12 +7,12 @@ RUNNING TEST: extension_testCreatePanel
done createPanel
Panel created
{
- createSidebarPane : <function>
- createWatchExpressionSidebarPane : <function>
onSelectionChanged : {
addListener : <function>
removeListener : <function>
}
+ createSidebarPane : <function>
+ createWatchExpressionSidebarPane : <function>
onSearch : {
addListener : <function>
removeListener : <function>
@@ -30,14 +30,14 @@ RUNNING TEST: extension_testExtensionWatchSidebarObject
Watch sidebar created, callback arguments dump follows:
{
0 : {
- setHeight : <function>
- setExpanded : <function>
- setExpression : <function>
- setObject : <function>
onUpdated : {
addListener : <function>
removeListener : <function>
}
+ setExpression : <function>
+ setObject : <function>
+ setHeight : <function>
+ setExpanded : <function>
}
}
Sidebar content: f0: "object"f1: undefinedf2: nullf3: { }f4: [0]f5: [3]f6: {...}f7: 42
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 75168b5..dbf733e 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-11-12 Andrey Kosyakov <caseq at chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: [Extensions API] [refactoring] generate public API interfaces automatically
+ https://bugs.webkit.org/show_bug.cgi?id=49441
+
+ * inspector/front-end/ExtensionAPI.js:
+ (WebInspector.injectedExtensionAPI.PanelImpl):
+ (WebInspector.injectedExtensionAPI):
+ (WebInspector.injectedExtensionAPI.WatchExpressionSidebarPane):
+ (WebInspector.injectedExtensionAPI.AuditCategoryImpl):
+ (WebInspector.injectedExtensionAPI.AuditResultImpl):
+ (WebInspector.injectedExtensionAPI.AuditResultImpl.prototype.get Severity):
+ (WebInspector.injectedExtensionAPI.):
+
2010-11-12 Renata Hodovan <reni at webkit.org>
Reviewed by Nikolas Zimmermann.
diff --git a/WebCore/inspector/front-end/ExtensionAPI.js b/WebCore/inspector/front-end/ExtensionAPI.js
index 7d6d76c..e526cf5 100644
--- a/WebCore/inspector/front-end/ExtensionAPI.js
+++ b/WebCore/inspector/front-end/ExtensionAPI.js
@@ -85,13 +85,6 @@ EventSinkImpl.prototype = {
}
}
-function EventSink(type, customDispatch)
-{
- var impl = new EventSinkImpl(type, customDispatch);
- this.addListener = bind(impl.addListener, impl);
- this.removeListener = bind(impl.removeListener, impl);
-}
-
function InspectorExtensionAPI()
{
this.audits = new Audits();
@@ -183,6 +176,7 @@ Panels.prototype = {
function PanelImpl(id)
{
this._id = id;
+ this.onSelectionChanged = new EventSink("panel-objectSelected-" + id);
}
PanelImpl.prototype = {
@@ -213,25 +207,12 @@ PanelImpl.prototype = {
}
}
-function Panel(id)
-{
- var impl = new PanelImpl(id);
- this.createSidebarPane = bind(impl.createSidebarPane, impl);
- this.createWatchExpressionSidebarPane = bind(impl.createWatchExpressionSidebarPane, impl);
- this.onSelectionChanged = new EventSink("panel-objectSelected-" + id);
-}
-
function ExtensionPanel(id)
{
Panel.call(this, id);
this.onSearch = new EventSink("panel-search-" + id);
}
-ExtensionPanel.prototype = {
-}
-
-ExtensionPanel.prototype.__proto__ = Panel.prototype;
-
function ExtensionSidebarPaneImpl(id)
{
this._id = id;
@@ -249,17 +230,10 @@ ExtensionSidebarPaneImpl.prototype = {
}
}
-function ExtensionSidebarPane(id, impl)
-{
- if (!impl)
- impl = new ExtensionSidebarPaneImpl(id);
- this.setHeight = bind(impl.setHeight, impl);
- this.setExpanded = bind(impl.setExpanded, impl);
-}
-
function WatchExpressionSidebarPaneImpl(id)
{
ExtensionSidebarPaneImpl.call(this, id);
+ this.onUpdated = new EventSink("watch-sidebar-updated-" + id);
}
WatchExpressionSidebarPaneImpl.prototype = {
@@ -274,13 +248,12 @@ WatchExpressionSidebarPaneImpl.prototype = {
}
}
+WatchExpressionSidebarPaneImpl.prototype.__proto__ = ExtensionSidebarPaneImpl.prototype;
+
function WatchExpressionSidebarPane(id)
{
var impl = new WatchExpressionSidebarPaneImpl(id);
ExtensionSidebarPane.call(this, id, impl);
- this.setExpression = bind(impl.setExpression, impl);
- this.setObject = bind(impl.setObject, impl);
- this.onUpdated = new EventSink("watch-sidebar-updated-" + id);
}
function Audits()
@@ -296,7 +269,7 @@ Audits.prototype = {
}
}
-function AuditCategory(id)
+function AuditCategoryImpl(id)
{
function customDispatch(request)
{
@@ -308,22 +281,13 @@ function AuditCategory(id)
auditResult.done();
}
}
- var impl = new AuditCategoryImpl(id);
+ this._id = id;
this.onAuditStarted = new EventSink("audit-started-" + id, customDispatch);
}
-function AuditCategoryImpl(id)
+function AuditResultImpl(id)
{
this._id = id;
-}
-
-function AuditResult(id)
-{
- var impl = new AuditResultImpl(id);
-
- this.addResult = bind(impl.addResult, impl);
- this.createResult = bind(impl.createResult, impl);
- this.done = bind(impl.done, impl);
var formatterTypes = [
"url",
@@ -331,19 +295,7 @@ function AuditResult(id)
"text"
];
for (var i = 0; i < formatterTypes.length; ++i)
- this[formatterTypes[i]] = bind(impl._nodeFactory, null, formatterTypes[i]);
-}
-
-AuditResult.prototype = {
- get Severity()
- {
- return private.audits.Severity;
- }
-}
-
-function AuditResultImpl(id)
-{
- this._id = id;
+ this[formatterTypes[i]] = bind(this._nodeFactory, null, formatterTypes[i]);
}
AuditResultImpl.prototype = {
@@ -376,6 +328,11 @@ AuditResultImpl.prototype = {
extensionServer.sendRequest({ command: "stopAuditCategoryRun", resultId: this._id });
},
+ get Severity()
+ {
+ return private.audits.Severity;
+ },
+
_nodeFactory: function(type)
{
return {
@@ -503,6 +460,34 @@ function bind(func, thisObject)
return function() { return func.apply(thisObject, args.concat(Array.prototype.slice.call(arguments, 0))); };
}
+function populateInterfaceClass(interface, implementation)
+{
+ for (var member in implementation) {
+ if (member.charAt(0) === "_")
+ continue;
+ var value = implementation[member];
+ interface[member] = typeof value === "function" ? bind(value, implementation)
+ : interface[member] = implementation[member];
+ }
+}
+
+function declareInterfaceClass(implConstructor)
+{
+ return function()
+ {
+ var impl = { __proto__: implConstructor.prototype };
+ implConstructor.apply(impl, arguments);
+ populateInterfaceClass(this, impl);
+ }
+}
+
+var EventSink = declareInterfaceClass(EventSinkImpl);
+var Panel = declareInterfaceClass(PanelImpl);
+var ExtensionSidebarPane = declareInterfaceClass(ExtensionSidebarPaneImpl);
+var WatchExpressionSidebarPane = declareInterfaceClass(WatchExpressionSidebarPaneImpl);
+var AuditCategory = declareInterfaceClass(AuditCategoryImpl);
+var AuditResult = declareInterfaceClass(AuditResultImpl);
+
var extensionServer = new ExtensionServerClient();
webInspector = new InspectorExtensionAPI();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list