Diff
Modified: trunk/LayoutTests/ChangeLog (113281 => 113282)
--- trunk/LayoutTests/ChangeLog 2012-04-05 03:08:10 UTC (rev 113281)
+++ trunk/LayoutTests/ChangeLog 2012-04-05 03:36:12 UTC (rev 113282)
@@ -1,3 +1,17 @@
+2012-04-04 Greg Billock <gbill...@google.com>
+
+ Switch web intents API to be vendor-prefixed
+ https://bugs.webkit.org/show_bug.cgi?id=83172
+
+ Reviewed by Adam Barth.
+
+ * webintents/resources/web-intents-reload-orig.html:
+ * webintents/resources/web-intents-testing.js:
+ (startIntentWithCallbacks):
+ * webintents/web-intents-api-expected.txt:
+ * webintents/web-intents-api.html:
+ * webintents/web-intents-invoke.html:
+
2012-04-04 Rafael Weinstein <rafa...@chromium.org>
[MutationObservers] implement takeRecords()
Modified: trunk/LayoutTests/platform/chromium/fast/dom/navigator-detached-no-crash-expected.txt (113281 => 113282)
--- trunk/LayoutTests/platform/chromium/fast/dom/navigator-detached-no-crash-expected.txt 2012-04-05 03:08:10 UTC (rev 113281)
+++ trunk/LayoutTests/platform/chromium/fast/dom/navigator-detached-no-crash-expected.txt 2012-04-05 03:36:12 UTC (rev 113282)
@@ -14,12 +14,12 @@
navigator.product is OK
navigator.productSub is OK
navigator.registerProtocolHandler() threw err TypeError: Not enough arguments
-navigator.startActivity() threw err TypeError: Not enough arguments
navigator.userAgent is OK
navigator.vendor is OK
navigator.vendorSub is OK
navigator.webkitGamepads is OK
navigator.webkitPointer is OK
+navigator.webkitStartActivity() threw err TypeError: Not enough arguments
navigator.appCodeName is OK
navigator.appName is OK
navigator.appVersion is OK
@@ -34,10 +34,10 @@
navigator.product is OK
navigator.productSub is OK
navigator.registerProtocolHandler() threw err TypeError: Not enough arguments
-navigator.startActivity() threw err TypeError: Not enough arguments
navigator.userAgent is OK
navigator.vendor is OK
navigator.vendorSub is OK
navigator.webkitGamepads is OK
navigator.webkitPointer is OK
+navigator.webkitStartActivity() threw err TypeError: Not enough arguments
Modified: trunk/LayoutTests/webintents/resources/web-intents-reload-orig.html (113281 => 113282)
--- trunk/LayoutTests/webintents/resources/web-intents-reload-orig.html 2012-04-05 03:08:10 UTC (rev 113281)
+++ trunk/LayoutTests/webintents/resources/web-intents-reload-orig.html 2012-04-05 03:36:12 UTC (rev 113282)
@@ -10,9 +10,9 @@
function startIntent() {
debug("* launching intent action/type");
- var intent = new Intent("action", "type");
+ var intent = new WebKitIntent("action", "type");
try {
- navigator.startActivity(intent, onSuccess, onFailure);
+ navigator.webkitStartActivity(intent, onSuccess, onFailure);
} catch (e) {
testFailed("startActivity should not throw exception");
}
Modified: trunk/LayoutTests/webintents/resources/web-intents-testing.js (113281 => 113282)
--- trunk/LayoutTests/webintents/resources/web-intents-testing.js 2012-04-05 03:08:10 UTC (rev 113281)
+++ trunk/LayoutTests/webintents/resources/web-intents-testing.js 2012-04-05 03:36:12 UTC (rev 113282)
@@ -18,7 +18,7 @@
// Launch a web intent call with callbacks.
function startIntentWithCallbacks() {
- navigator.startActivity(new Intent("action1", "mime/type1", "test"), onSuccess, onFailure);
+ navigator.webkitStartActivity(new WebKitIntent("action1", "mime/type1", "test"), onSuccess, onFailure);
debug("* sent intent");
if (window.layoutTestController) {
Modified: trunk/LayoutTests/webintents/web-intents-api-expected.txt (113281 => 113282)
--- trunk/LayoutTests/webintents/web-intents-api-expected.txt 2012-04-05 03:08:10 UTC (rev 113281)
+++ trunk/LayoutTests/webintents/web-intents-api-expected.txt 2012-04-05 03:36:12 UTC (rev 113282)
@@ -1,10 +1,10 @@
-PASS navigator.startActivity is defined.
-PASS var intent = new Intent() threw exception TypeError: Not enough arguments.
-PASS new Intent('a') threw exception TypeError: Not enough arguments.
-PASS new Intent('','','') threw exception Error: SYNTAX_ERR: DOM Exception 12.
-PASS new Intent('','b','c') threw exception Error: SYNTAX_ERR: DOM Exception 12.
-PASS new Intent('','','c') threw exception Error: SYNTAX_ERR: DOM Exception 12.
-PASS new Intent('a','','c') threw exception Error: SYNTAX_ERR: DOM Exception 12.
+PASS navigator.webkitStartActivity is defined.
+PASS var intent = new WebKitIntent() threw exception TypeError: Not enough arguments.
+PASS new WebKitIntent('a') threw exception TypeError: Not enough arguments.
+PASS new WebKitIntent('','','') threw exception Error: SYNTAX_ERR: DOM Exception 12.
+PASS new WebKitIntent('','b','c') threw exception Error: SYNTAX_ERR: DOM Exception 12.
+PASS new WebKitIntent('','','c') threw exception Error: SYNTAX_ERR: DOM Exception 12.
+PASS new WebKitIntent('a','','c') threw exception Error: SYNTAX_ERR: DOM Exception 12.
PASS intent1.action is "a"
PASS intent1.type is "b"
PASS intent1.data is undefined.
@@ -26,7 +26,7 @@
PASS intent7.data is true
PASS intent8.data is null
PASS intent9.data == '[object Object]' is true
-PASS navigator.startActivity(intent1) threw exception Error: INVALID_ACCESS_ERR: DOM Exception 15.
+PASS navigator.webkitStartActivity(intent1) threw exception Error: INVALID_ACCESS_ERR: DOM Exception 15.
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/webintents/web-intents-api.html (113281 => 113282)
--- trunk/LayoutTests/webintents/web-intents-api.html 2012-04-05 03:08:10 UTC (rev 113281)
+++ trunk/LayoutTests/webintents/web-intents-api.html 2012-04-05 03:36:12 UTC (rev 113282)
@@ -5,33 +5,33 @@
</head>
<body>
<script type="text/_javascript_">
- shouldBeDefined("navigator.startActivity");
+ shouldBeDefined("navigator.webkitStartActivity");
- shouldThrow("var intent = new Intent()", "'TypeError: Not enough arguments'");;
- shouldThrow("new Intent('a')", "'TypeError: Not enough arguments'");
- shouldThrow("new Intent('','','')", "'Error: SYNTAX_ERR: DOM Exception 12'");
- shouldThrow("new Intent('','b','c')", "'Error: SYNTAX_ERR: DOM Exception 12'");
- shouldThrow("new Intent('','','c')", "'Error: SYNTAX_ERR: DOM Exception 12'");
- shouldThrow("new Intent('a','','c')", "'Error: SYNTAX_ERR: DOM Exception 12'");
+ shouldThrow("var intent = new WebKitIntent()", "'TypeError: Not enough arguments'");;
+ shouldThrow("new WebKitIntent('a')", "'TypeError: Not enough arguments'");
+ shouldThrow("new WebKitIntent('','','')", "'Error: SYNTAX_ERR: DOM Exception 12'");
+ shouldThrow("new WebKitIntent('','b','c')", "'Error: SYNTAX_ERR: DOM Exception 12'");
+ shouldThrow("new WebKitIntent('','','c')", "'Error: SYNTAX_ERR: DOM Exception 12'");
+ shouldThrow("new WebKitIntent('a','','c')", "'Error: SYNTAX_ERR: DOM Exception 12'");
- var intent1 = new Intent('a', 'b');
+ var intent1 = new WebKitIntent('a', 'b');
shouldBeEqualToString("intent1.action", "a");
shouldBeEqualToString("intent1.type", "b");
shouldBeUndefined("intent1.data");
intent1.action = ""
shouldBeEqualToString("intent1.action", "a");
- var intent2 = new Intent("a", "b", "c");
+ var intent2 = new WebKitIntent("a", "b", "c");
shouldBeEqualToString('intent2.action', "a");
shouldBeEqualToString('intent2.type', "b");
shouldBeEqualToString('intent2.data', "c");
- var intent3 = new Intent("a", "b", {"c": "d"});
+ var intent3 = new WebKitIntent("a", "b", {"c": "d"});
shouldBeEqualToString('intent3.action', "a");
shouldBeEqualToString('intent3.type', "b");
shouldBeEqualToString('intent3.data.c', "d");
- var intent4 = new Intent("a", "b", ["c", "d"]);
+ var intent4 = new WebKitIntent("a", "b", ["c", "d"]);
shouldBeEqualToString('intent4.action', "a");
shouldBeEqualToString('intent4.type', "b");
shouldBeTrue('intent4.data instanceof Array');
@@ -39,18 +39,18 @@
shouldBeEqualToString('intent4.data[0]', "c");
shouldBeEqualToString('intent4.data[1]', "d");
- var intent5 = new Intent("a", "b", 4);
+ var intent5 = new WebKitIntent("a", "b", 4);
shouldEvaluateTo('intent5.data', 4);
- var intent6 = new Intent('a', 'b', 4.5);
+ var intent6 = new WebKitIntent('a', 'b', 4.5);
shouldEvaluateTo('intent6.data', 4.5);
- var intent7 = new Intent('a', 'b', true);
+ var intent7 = new WebKitIntent('a', 'b', true);
shouldBeTrue('intent7.data');
- var intent8 = new Intent('a', 'b', null);
+ var intent8 = new WebKitIntent('a', 'b', null);
shouldBeNull('intent8.data');
- var intent9 = new Intent('a', 'b', {});
+ var intent9 = new WebKitIntent('a', 'b', {});
shouldEvaluateTo('intent9.data', {});
- shouldThrow('navigator.startActivity(intent1)', "'Error: INVALID_ACCESS_ERR: DOM Exception 15'");
+ shouldThrow('navigator.webkitStartActivity(intent1)', "'Error: INVALID_ACCESS_ERR: DOM Exception 15'");
</script>
<script src=""
</body>
Modified: trunk/LayoutTests/webintents/web-intents-invoke.html (113281 => 113282)
--- trunk/LayoutTests/webintents/web-intents-invoke.html 2012-04-05 03:08:10 UTC (rev 113281)
+++ trunk/LayoutTests/webintents/web-intents-invoke.html 2012-04-05 03:36:12 UTC (rev 113282)
@@ -4,7 +4,7 @@
<script src=""
<script>
function buttonClicked() {
- navigator.startActivity(new Intent("action1", "mime/type1", "test"));
+ navigator.webkitStartActivity(new WebKitIntent("action1", "mime/type1", "test"));
debug("* sent intent");
}
</script>
Modified: trunk/Source/WebCore/ChangeLog (113281 => 113282)
--- trunk/Source/WebCore/ChangeLog 2012-04-05 03:08:10 UTC (rev 113281)
+++ trunk/Source/WebCore/ChangeLog 2012-04-05 03:36:12 UTC (rev 113282)
@@ -1,3 +1,17 @@
+2012-04-04 Greg Billock <gbill...@google.com>
+
+ Switch web intents API to be vendor-prefixed
+ https://bugs.webkit.org/show_bug.cgi?id=83172
+
+ Reviewed by Adam Barth.
+
+ * Modules/intents/DOMWindowIntents.idl:
+ * Modules/intents/NavigatorIntents.cpp:
+ (WebCore::NavigatorIntents::webkitStartActivity):
+ * Modules/intents/NavigatorIntents.h:
+ (NavigatorIntents):
+ * Modules/intents/NavigatorIntents.idl:
+
2012-04-04 Alexis Menard <alexis.men...@openbossa.org>
[Part 4] We should use CSSPropertyID rather than integers when manipulating CSS property ids.
Modified: trunk/Source/WebCore/Modules/intents/DOMWindowIntents.idl (113281 => 113282)
--- trunk/Source/WebCore/Modules/intents/DOMWindowIntents.idl 2012-04-05 03:08:10 UTC (rev 113281)
+++ trunk/Source/WebCore/Modules/intents/DOMWindowIntents.idl 2012-04-05 03:36:12 UTC (rev 113282)
@@ -30,7 +30,7 @@
Conditional=WEB_INTENTS,
Supplemental=DOMWindow
] DOMWindowIntents {
- attribute IntentConstructor Intent;
+ attribute IntentConstructor WebKitIntent;
};
}
Modified: trunk/Source/WebCore/Modules/intents/NavigatorIntents.cpp (113281 => 113282)
--- trunk/Source/WebCore/Modules/intents/NavigatorIntents.cpp 2012-04-05 03:08:10 UTC (rev 113281)
+++ trunk/Source/WebCore/Modules/intents/NavigatorIntents.cpp 2012-04-05 03:36:12 UTC (rev 113282)
@@ -49,11 +49,11 @@
{
}
-void NavigatorIntents::startActivity(Navigator* navigator,
- PassRefPtr<Intent> intent,
- PassRefPtr<IntentResultCallback> successCallback,
- PassRefPtr<IntentResultCallback> errorCallback,
- ExceptionCode& ec)
+void NavigatorIntents::webkitStartActivity(Navigator* navigator,
+ PassRefPtr<Intent> intent,
+ PassRefPtr<IntentResultCallback> successCallback,
+ PassRefPtr<IntentResultCallback> errorCallback,
+ ExceptionCode& ec)
{
if (!navigator->frame() || !intent) {
ec = INVALID_STATE_ERR;
Modified: trunk/Source/WebCore/Modules/intents/NavigatorIntents.h (113281 => 113282)
--- trunk/Source/WebCore/Modules/intents/NavigatorIntents.h 2012-04-05 03:08:10 UTC (rev 113281)
+++ trunk/Source/WebCore/Modules/intents/NavigatorIntents.h 2012-04-05 03:36:12 UTC (rev 113282)
@@ -40,7 +40,7 @@
class NavigatorIntents {
public:
- static void startActivity(Navigator*, PassRefPtr<Intent>, PassRefPtr<IntentResultCallback> successCallback, PassRefPtr<IntentResultCallback> errorCallback, ExceptionCode&);
+ static void webkitStartActivity(Navigator*, PassRefPtr<Intent>, PassRefPtr<IntentResultCallback> successCallback, PassRefPtr<IntentResultCallback> errorCallback, ExceptionCode&);
private:
NavigatorIntents();
Modified: trunk/Source/WebCore/Modules/intents/NavigatorIntents.idl (113281 => 113282)
--- trunk/Source/WebCore/Modules/intents/NavigatorIntents.idl 2012-04-05 03:08:10 UTC (rev 113281)
+++ trunk/Source/WebCore/Modules/intents/NavigatorIntents.idl 2012-04-05 03:36:12 UTC (rev 113282)
@@ -23,9 +23,9 @@
Conditional=WEB_INTENTS,
Supplemental=Navigator
] NavigatorIntents {
- void startActivity(in Intent intent,
- in [Callback, Optional] IntentResultCallback successCallback,
- in [Callback, Optional] IntentResultCallback failureCallback)
+ void webkitStartActivity(in Intent intent,
+ in [Callback, Optional] IntentResultCallback successCallback,
+ in [Callback, Optional] IntentResultCallback failureCallback)
raises(DOMException);
};