Source/WebCore/ChangeLog

 12012-04-10 Greg Billock <gbillock@google.com>
 2
 3 IDL and implementation for Web Intents delivery
 4 https://bugs.webkit.org/show_bug.cgi?id=83634
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 See http://dvcs.w3.org/hg/web-intents/raw-file/tip/spec/Overview.html
 9 Added test:
 10 LayoutTests/webintents/web-intents-delivery.html
 11
 12 * Modules/intents/DOMWindowIntents.cpp: Copied from Source/WebCore/Modules/intents/DOMWindowIntents.idl.
 13 (WebCore):
 14 (WebCore::DOMWindowIntents::DOMWindowIntents):
 15 (WebCore::DOMWindowIntents::~DOMWindowIntents):
 16 (WebCore::DOMWindowIntents::from):
 17 (WebCore::DOMWindowIntents::webkitIntent):
 18 (WebCore::DOMWindowIntents::deliver):
 19 * Modules/intents/DOMWindowIntents.h: Copied from Source/WebCore/Modules/intents/DOMWindowIntents.idl.
 20 (WebCore):
 21 (DOMWindowIntents):
 22 * Modules/intents/DOMWindowIntents.idl:
 23 * Modules/intents/DeliveredIntent.cpp: Copied from Source/WebCore/Modules/intents/Intent.h.
 24 (WebCore):
 25 (WebCore::DeliveredIntent::create):
 26 (WebCore::DeliveredIntent::DeliveredIntent):
 27 (WebCore::DeliveredIntent::ports):
 28 (WebCore::DeliveredIntent::getExtra):
 29 (WebCore::DeliveredIntent::postResult):
 30 (WebCore::DeliveredIntent::postFailure):
 31 * Modules/intents/DeliveredIntent.h: Copied from Source/WebCore/Modules/intents/Intent.h.
 32 (WebCore):
 33 (DeliveredIntent):
 34 (WebCore::DeliveredIntent::~DeliveredIntent):
 35 * Modules/intents/DeliveredIntent.idl: Copied from Source/WebCore/Modules/intents/Intent.h.
 36 * Modules/intents/Intent.h:
 37 (WebCore::Intent::~Intent):
 38 (Intent):
 39 * WebCore.gyp/WebCore.gyp:
 40 * WebCore.gypi:
 41 * bindings/v8/custom/V8DeliveredIntentCustom.cpp: Copied from Source/WebCore/Modules/intents/Intent.h.
 42 (WebCore):
 43 (WebCore::V8DeliveredIntent::portsAccessorGetter):
 44
1452012-04-23 Michał Pakuła vel Rutka <m.pakula@samsung.com>
246 [EFL][WK2] Fix build break when non-cross platform CONTEXT_MENUS are enabled.
347 https://bugs.webkit.org/show_bug.cgi?id=84136

Source/WebKit/chromium/ChangeLog

 12012-04-10 Greg Billock <gbillock@google.com>
 2
 3 IDL and implementation for Web Intents delivery
 4 https://bugs.webkit.org/show_bug.cgi?id=83634
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 * public/WebFrame.h:
 9 (WebKit):
 10 (WebFrame):
 11 * src/WebFrameImpl.cpp:
 12 (WebKit::WebFrameImpl::deliverIntent):
 13 (WebKit):
 14 * src/WebFrameImpl.h:
 15 (WebFrameImpl):
 16
1172012-04-23 Ian Vollick <vollick@chromium.org>
218
319 [chromium] When prepareToDraw fails due to animation checkerboard, we need to call setNeedsCommit

Source/WebCore/Modules/intents/DOMWindowIntents.cpp

 1/*
 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
 3 * Copyright (C) 2011 Google Inc. All rights reserved.
 4 *
 5 * Redistribution and use in source and binary forms, with or without
 6 * modification, are permitted provided that the following conditions
 7 * are met:
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer in the
 12 * documentation and/or other materials provided with the distribution.
 13 *
 14 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 18 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 19 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 20 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 25 */
 26
 27#include "config.h"
 28#include "DOMWindowIntents.h"
 29
 30#if ENABLE(WEB_INTENTS)
 31
 32#include "DOMWindow.h"
 33#include "DeliveredIntent.h"
 34
 35namespace WebCore {
 36
 37DOMWindowIntents::DOMWindowIntents(DOMWindow* window)
 38 : DOMWindowProperty(window->frame())
 39{
 40}
 41
 42DOMWindowIntents::~DOMWindowIntents()
 43{
 44}
 45
 46DOMWindowIntents* DOMWindowIntents::from(DOMWindow* window)
 47{
 48 ASSERT(window);
 49 DEFINE_STATIC_LOCAL(AtomicString, name, ("DOMWindowIntents"));
 50 DOMWindowIntents* supplement = static_cast<DOMWindowIntents*>(Supplement<DOMWindow>::from(window, name));
 51 if (!supplement) {
 52 supplement = new DOMWindowIntents(window);
 53 provideTo(window, name, adoptPtr(supplement));
 54 }
 55 return supplement;
 56}
 57
 58DeliveredIntent* DOMWindowIntents::webkitIntent(DOMWindow* window)
 59{
 60 return from(window)->webkitIntent();
 61}
 62
 63DeliveredIntent* DOMWindowIntents::webkitIntent()
 64{
 65 return m_intent.get();
 66}
 67
 68void DOMWindowIntents::deliver(PassRefPtr<DeliveredIntent> intent)
 69{
 70 if (!frame())
 71 return;
 72
 73 m_intent = intent;
 74}
 75
 76} // namespace WebCore
 77
 78#endif // ENABLE(WEB_INTENTS)

Source/WebCore/Modules/intents/DOMWindowIntents.h

 1/*
 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
 3 * Copyright (C) 2011 Google Inc. All rights reserved.
 4 *
 5 * Redistribution and use in source and binary forms, with or without
 6 * modification, are permitted provided that the following conditions
 7 * are met:
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer in the
 12 * documentation and/or other materials provided with the distribution.
 13 *
 14 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 18 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 19 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 20 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 25 */
 26
 27#ifndef DOMWindowIntents_h
 28#define DOMWindowIntents_h
 29
 30#if ENABLE(WEB_INTENTS)
 31
 32#include "DOMWindowProperty.h"
 33#include "Supplementable.h"
 34
 35namespace WebCore {
 36
 37class DOMWindow;
 38class DeliveredIntent;
 39
 40class DOMWindowIntents : public DOMWindowProperty, public Supplement<DOMWindow> {
 41public:
 42 virtual ~DOMWindowIntents();
 43 static DOMWindowIntents* from(DOMWindow*);
 44
 45 static DeliveredIntent* webkitIntent(DOMWindow*);
 46
 47 virtual void deliver(PassRefPtr<DeliveredIntent>);
 48
 49private:
 50 explicit DOMWindowIntents(DOMWindow*);
 51
 52 DeliveredIntent* webkitIntent();
 53
 54 RefPtr<DeliveredIntent> m_intent;
 55};
 56
 57} // namespace WebCore
 58
 59#endif // ENABLE(WEB_INTENTS)
 60
 61#endif // DOMWindowIntents_h

Source/WebCore/Modules/intents/DOMWindowIntents.idl

@@module window {
3131 Supplemental=DOMWindow
3232 ] DOMWindowIntents {
3333 attribute IntentConstructor WebKitIntent;
 34
 35 readonly attribute [Replaceable] DeliveredIntent webkitIntent;
3436 };
3537
3638}

Source/WebCore/Modules/intents/DeliveredIntent.cpp

 1/*
 2 * Copyright (C) 2012 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 *
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer in the
 12 * documentation and/or other materials provided with the distribution.
 13 * 3. Neither the name of Google, Inc. ("Google") nor the names of
 14 * its contributors may be used to endorse or promote products derived
 15 * from this software without specific prior written permission.
 16 *
 17 * THIS SOFTWARE IS PROVIDED BY GOOGLE AND ITS CONTRIBUTORS "AS IS" AND ANY
 18 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 19 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 20 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
 21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 27 */
 28
 29#include "config.h"
 30#include "DeliveredIntent.h"
 31
 32#if ENABLE(WEB_INTENTS)
 33
 34#include "Document.h"
 35#include "ExceptionCode.h"
 36#include "Frame.h"
 37#include "FrameLoaderClient.h"
 38#include "ScriptExecutionContext.h"
 39#include "SerializedScriptValue.h"
 40
 41namespace WebCore {
 42
 43PassRefPtr<DeliveredIntent> DeliveredIntent::create(ScriptExecutionContext* context,
 44 const String& action, const String& type,
 45 PassRefPtr<SerializedScriptValue> data, MessagePortArray* ports,
 46 const HashMap<String, String>& extras)
 47{
 48 return adoptRef(new DeliveredIntent(context, action, type, data, ports, extras));
 49}
 50
 51DeliveredIntent::DeliveredIntent(ScriptExecutionContext* context,
 52 const String& action, const String& type,
 53 PassRefPtr<SerializedScriptValue> data, MessagePortArray* ports,
 54 const HashMap<String, String>& extras)
 55 : Intent(action, type, data)
 56 , ContextDestructionObserver(context)
 57 , m_client(0)
 58 , m_ports(ports)
 59 , m_extras(extras)
 60{
 61}
 62
 63void DeliveredIntent::setClient(PassRefPtr<DeliveredIntentClient> client)
 64{
 65 m_client = client;
 66}
 67
 68MessagePortArray* DeliveredIntent::ports() const
 69{
 70 return 0;
 71}
 72
 73String DeliveredIntent::getExtra(const String& key)
 74{
 75 return String();
 76}
 77
 78void DeliveredIntent::postResult(PassRefPtr<SerializedScriptValue> data)
 79{
 80 if (!m_client)
 81 return;
 82
 83 m_client->postResult(data);
 84}
 85
 86void DeliveredIntent::postFailure(PassRefPtr<SerializedScriptValue> data)
 87{
 88 if (!m_client)
 89 return;
 90
 91 m_client->postFailure(data);
 92}
 93
 94} // namespace WebCore
 95
 96#endif // ENABLE(WEB_INTENTS)

Source/WebCore/Modules/intents/DeliveredIntent.h

 1/*
 2 * Copyright (C) 2011 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 *
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer in the
 12 * documentation and/or other materials provided with the distribution.
 13 * 3. Neither the name of Google, Inc. ("Google") nor the names of
 14 * its contributors may be used to endorse or promote products derived
 15 * from this software without specific prior written permission.
 16 *
 17 * THIS SOFTWARE IS PROVIDED BY GOOGLE AND ITS CONTRIBUTORS "AS IS" AND ANY
 18 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 19 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 20 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
 21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 27 */
 28
 29#ifndef DeliveredIntent_h
 30#define DeliveredIntent_h
 31
 32#if ENABLE(WEB_INTENTS)
 33
 34#include "ContextDestructionObserver.h"
 35#include "Intent.h"
 36#include "MessagePort.h"
 37#include <wtf/Forward.h>
 38#include <wtf/HashMap.h>
 39#include <wtf/PassRefPtr.h>
 40#include <wtf/RefCounted.h>
 41#include <wtf/RefPtr.h>
 42#include <wtf/text/WTFString.h>
 43
 44namespace WebCore {
 45
 46class SerializedScriptValue;
 47
 48// The client will be forwarded JS calls to postResult/postFailure on
 49// DeliveredIntent.
 50class DeliveredIntentClient : public RefCounted<DeliveredIntentClient> {
 51public:
 52 virtual ~DeliveredIntentClient() { }
 53
 54 virtual void postResult(PassRefPtr<SerializedScriptValue> data) { }
 55 virtual void postFailure(PassRefPtr<SerializedScriptValue> data) { }
 56};
 57
 58class DeliveredIntent : public Intent, public ContextDestructionObserver {
 59public:
 60 static PassRefPtr<DeliveredIntent> create(ScriptExecutionContext*, const String& action, const String& type,
 61 PassRefPtr<SerializedScriptValue>, MessagePortArray*,
 62 const HashMap<String, String>&);
 63
 64 virtual ~DeliveredIntent() { }
 65
 66 MessagePortArray* ports() const;
 67 String getExtra(const String& key);
 68 void postResult(PassRefPtr<SerializedScriptValue> data);
 69 void postFailure(PassRefPtr<SerializedScriptValue> data);
 70
 71 void setClient(PassRefPtr<DeliveredIntentClient>);
 72
 73private:
 74 DeliveredIntent(ScriptExecutionContext*, const String& action, const String& type,
 75 PassRefPtr<SerializedScriptValue>, MessagePortArray*,
 76 const HashMap<String, String>&);
 77
 78 RefPtr<DeliveredIntentClient> m_client;
 79 MessagePortArray* m_ports;
 80 WTF::HashMap<String, String> m_extras;
 81};
 82
 83} // namespace WebCore
 84
 85#endif
 86
 87#endif // Intent_h

Source/WebCore/Modules/intents/DeliveredIntent.idl

 1/*
 2 * Copyright (C) 2011 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 *
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer in the
 12 * documentation and/or other materials provided with the distribution.
 13 *
 14 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
 15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 16 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 17 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
 18 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 19 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 20 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26module window {
 27 interface [
 28 Conditional=WEB_INTENTS,
 29 ] DeliveredIntent : Intent {
 30 readonly attribute MessagePortArray ports;
 31
 32 [TreatReturnedNullStringAs=Null] DOMString getExtra(in DOMString key);
 33 void postResult(in SerializedScriptValue result);
 34 void postFailure(in SerializedScriptValue result);
 35 };
 36}

Source/WebCore/Modules/intents/Intent.h

@@public:
5050 static PassRefPtr<Intent> create(const String& action, const String& type, PassRefPtr<SerializedScriptValue> data, ExceptionCode&);
5151 static PassRefPtr<Intent> create(const String& action, const String& type, PassRefPtr<SerializedScriptValue> data, const MessagePortArray& ports, ExceptionCode&);
5252
 53 virtual ~Intent() { }
 54
5355 const String& action() const;
5456 const String& type() const;
5557 SerializedScriptValue* data() const;
5658
57  int identifier() const;
58  void setIdentifier(int);
59 
6059 MessagePortChannelArray* messagePorts() const;
6160
62 private:
 61protected:
6362 Intent(const String& action, const String& type, PassRefPtr<SerializedScriptValue> data);
6463 Intent(const String& action, const String& type, PassRefPtr<SerializedScriptValue> data, PassOwnPtr<MessagePortChannelArray> ports);
6564
 65private:
6666 String m_action;
6767 String m_type;
6868 RefPtr<SerializedScriptValue> m_data;

Source/WebCore/WebCore.gyp/WebCore.gyp

10011001 'generator_include_dirs': [
10021002 '--include', '../Modules/filesystem',
10031003 '--include', '../Modules/indexeddb',
 1004 '--include', '../Modules/intents',
10041005 '--include', '../Modules/mediastream',
10051006 '--include', '../Modules/webaudio',
10061007 '--include', '../Modules/webdatabase',

Source/WebCore/WebCore.gypi

808808 'Modules/indexeddb/IDBVersionChangeEvent.idl',
809809 'Modules/indexeddb/IDBVersionChangeRequest.idl',
810810 'Modules/indexeddb/WorkerContextIndexedDatabase.idl',
 811 'Modules/intents/DeliveredIntent.idl',
811812 'Modules/intents/DOMWindowIntents.idl',
812813 'Modules/intents/Intent.idl',
813814 'Modules/intents/IntentResultCallback.idl',

14941495 'Modules/indexeddb/PageGroupIndexedDatabase.h',
14951496 'Modules/indexeddb/WorkerContextIndexedDatabase.cpp',
14961497 'Modules/indexeddb/WorkerContextIndexedDatabase.h',
 1498 'Modules/intents/DeliveredIntent.cpp',
 1499 'Modules/intents/DeliveredIntent.h',
 1500 'Modules/intents/DOMWindowIntents.cpp',
 1501 'Modules/intents/DOMWindowIntents.h',
14971502 'Modules/intents/Intent.cpp',
14981503 'Modules/intents/Intent.h',
14991504 'Modules/intents/IntentRequest.cpp',

Source/WebCore/bindings/scripts/CodeGeneratorV8.pm

@@END
987987 push(@implContentDecls, " return toV8(WTF::getPtr(${tearOffType}::create($result)));\n");
988988 }
989989 } elsif ($attribute->signature->type eq "MessagePortArray") {
990  AddToImplIncludes("V8Array.h");
991990 AddToImplIncludes("MessagePort.h");
 991 AddToImplIncludes("V8MessagePort.h");
992992 my $getterFunc = $codeGenerator->WK_lcfirst($attribute->signature->name);
993993 push(@implContentDecls, <<END);
994994 MessagePortArray* ports = imp->${getterFunc}();

Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp

2727#include "MessagePort.h"
2828#include "RuntimeEnabledFeatures.h"
2929#include "SerializedScriptValue.h"
30 #include "V8Array.h"
3130#include "V8Binding.h"
3231#include "V8BindingMacros.h"
3332#include "V8BindingState.h"
3433#include "V8DOMWrapper.h"
3534#include "V8IsolatedContext.h"
 35#include "V8MessagePort.h"
3636#include "V8Proxy.h"
3737#include <wtf/ArrayBuffer.h>
3838#include <wtf/UnusedParam.h>

Source/WebKit/chromium/WebKit.gyp

128128 'public/WebDataSource.h',
129129 'public/WebDatabase.h',
130130 'public/WebDatabaseObserver.h',
 131 'public/WebDeliveredIntentClient.h',
131132 'public/WebDevToolsAgent.h',
132133 'public/WebDevToolsAgentClient.h',
133134 'public/WebDevToolsFrontend.h',

518519 'src/WebDatabase.cpp',
519520 'src/WebDataSourceImpl.cpp',
520521 'src/WebDataSourceImpl.h',
 522 'src/WebDeliveredIntentClient.cpp',
521523 'src/WebDevToolsAgentImpl.cpp',
522524 'src/WebDevToolsAgentImpl.h',
523525 'src/WebDevToolsFrontendImpl.cpp',

Source/WebKit/chromium/public/WebDeliveredIntentClient.h

 1/*
 2 * Copyright (C) 2011 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions are
 6 * met:
 7 *
 8 * * Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * * Redistributions in binary form must reproduce the above
 11 * copyright notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * * Neither the name of Google Inc. nor the names of its
 15 * contributors may be used to endorse or promote products derived from
 16 * this software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#ifndef WebDeliveredIntentClient_h
 32#define WebDeliveredIntentClient_h
 33
 34#include "platform/WebCommon.h"
 35#include "platform/WebPrivatePtr.h"
 36#include "platform/WebString.h"
 37
 38namespace WebCore {
 39class DeliveredIntent;
 40class DeliveredIntentClient;
 41}
 42
 43namespace WebKit {
 44
 45class DeliveredIntentClientImpl;
 46class WebSerializedScriptValue;
 47
 48// Holds data passed through a Web Intents invocation call from the Javascript
 49// Intent object.
 50// See spec at http://www.chromium.org/developers/design-documents/webintentsapi
 51class WebDeliveredIntentClient {
 52public:
 53 WebDeliveredIntentClient() { }
 54 WebDeliveredIntentClient(const WebDeliveredIntentClient& other) { assign(other); }
 55 WebDeliveredIntentClient(const WebString& action, const WebString& type, const WebString& serializedData);
 56 ~WebDeliveredIntentClient() { reset(); }
 57
 58 WebDeliveredIntentClient& operator=(const WebDeliveredIntentClient& other)
 59 {
 60 assign(other);
 61 return *this;
 62 }
 63 WEBKIT_EXPORT void reset();
 64 WEBKIT_EXPORT bool isNull() const;
 65 WEBKIT_EXPORT bool equals(const WebDeliveredIntentClient&) const;
 66 WEBKIT_EXPORT void assign(const WebDeliveredIntentClient&);
 67
 68 WEBKIT_EXPORT void setIntentData(const WebString& action, const WebString& type, const WebString& serializedData);
 69
 70 WEBKIT_EXPORT WebString action() const;
 71 WEBKIT_EXPORT WebString type() const;
 72 WEBKIT_EXPORT WebString data() const;
 73
 74 WEBKIT_EXPORT void postResult(const WebSerializedScriptValue& data);
 75 WEBKIT_EXPORT void postFailure(const WebSerializedScriptValue& data);
 76
 77#if WEBKIT_IMPLEMENTATION
 78 WEBKIT_EXPORT void setAsClient(WebCore::DeliveredIntent*) const;
 79#endif
 80
 81private:
 82 WebString m_action;
 83 WebString m_type;
 84 WebString m_data;
 85 WebPrivatePtr<DeliveredIntentClientImpl> m_intentClient;
 86};
 87
 88} // namespace WebKit
 89
 90#endif // WebDeliveredIntentClient_h

Source/WebKit/chromium/public/WebFrame.h

@@namespace WebKit {
5757class WebAnimationController;
5858class WebData;
5959class WebDataSource;
 60class WebDeliveredIntentClient;
6061class WebDocument;
6162class WebElement;
6263class WebFormElement;
6364class WebHistoryItem;
6465class WebInputElement;
 66class WebIntent;
6567class WebPerformance;
6668class WebRange;
6769class WebSecurityOrigin;

@@public:
575577
576578 // Web Intents ---------------------------------------------------------
577579
578  // Forwards a web intents reply from the invoked activity back to the
579  // appropriate registered Javascript callback. The |intentIdentifier| is
580  // the WebIntent parameter received from the dispatchIntent method.
581  virtual void handleIntentResult(int intentIdentifier, const WebString&) = 0;
582 
583  // Forwards a web intents failure notification from the invoked activity
584  // or intervening browser logic back to the appropriate registered
585  // Javascript callback. The |intentIdentifier| is the WebIntent parameter
586  // received from the dispatchIntent method.
587  virtual void handleIntentFailure(int intentIdentifier, const WebString&) = 0;
 580 // Called on a target service page to deliver an intent to the window.
 581 // Returns true on success (the intent was delivered).
 582 virtual void deliverIntent(const WebDeliveredIntentClient&) = 0;
588583
589584
590585 // Utility -------------------------------------------------------------

Source/WebKit/chromium/public/WebIntent.h

@@class WebIntent {
4848public:
4949 WebIntent() { }
5050 WebIntent(const WebIntent& other) { assign(other); }
 51 WebIntent(const WebString& action, const WebString& type, const WebString& serializedData);
5152 ~WebIntent() { reset(); }
5253
5354 WebIntent& operator=(const WebIntent& other)

Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp

@@bool FrameLoaderClientImpl::willCheckAndDispatchMessageEvent(
16161616#if ENABLE(WEB_INTENTS)
16171617void FrameLoaderClientImpl::dispatchIntent(PassRefPtr<WebCore::IntentRequest> intentRequest)
16181618{
1619  m_webFrame->client()->dispatchIntent(webFrame(), intentRequest);
 1619 m_webFrame->client()->dispatchIntent(m_webFrame, intentRequest);
16201620}
16211621#endif
16221622

Source/WebKit/chromium/src/WebDeliveredIntentClient.cpp

 1/*
 2 * Copyright (C) 2012 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions are
 6 * met:
 7 *
 8 * * Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * * Redistributions in binary form must reproduce the above
 11 * copyright notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * * Neither the name of Google Inc. nor the names of its
 15 * contributors may be used to endorse or promote products derived from
 16 * this software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#include "config.h"
 32#include "WebDeliveredIntentClient.h"
 33
 34#include "DeliveredIntent.h"
 35#include "SerializedScriptValue.h"
 36#include "platform/WebSerializedScriptValue.h"
 37
 38namespace WebKit {
 39
 40#if ENABLE(WEB_INTENTS)
 41class DeliveredIntentClientImpl : public WebCore::DeliveredIntentClient {
 42public:
 43 DeliveredIntentClientImpl(WebDeliveredIntentClient* owner) : m_owner(owner) { }
 44 virtual ~DeliveredIntentClientImpl() { }
 45
 46 virtual void postResult(PassRefPtr<WebCore::SerializedScriptValue> data)
 47 {
 48 m_owner->postResult(data);
 49 }
 50
 51 virtual void postFailure(PassRefPtr<WebCore::SerializedScriptValue> data)
 52 {
 53 m_owner->postFailure(data);
 54 }
 55
 56 void abandon()
 57 {
 58 m_owner = 0;
 59 }
 60
 61private:
 62 WebDeliveredIntentClient* m_owner;
 63};
 64#endif
 65
 66WebDeliveredIntentClient::WebDeliveredIntentClient(const WebString& action, const WebString& type, const WebString& serializedData)
 67{
 68 m_action = action;
 69 m_type = type;
 70 m_data = serializedData;
 71#if ENABLE(WEB_INTENTS)
 72 RefPtr<DeliveredIntentClientImpl> client(new DeliveredIntentClientImpl(this));
 73 m_intentClient = client;
 74#endif
 75}
 76
 77void WebDeliveredIntentClient::reset()
 78{
 79 m_action = "";
 80 m_type = "";
 81 m_data = "";
 82#if ENABLE(WEB_INTENTS)
 83 m_intentClient->abandon();
 84 m_intentClient.reset();
 85#endif
 86}
 87
 88bool WebDeliveredIntentClient::isNull() const
 89{
 90 return false;
 91}
 92
 93bool WebDeliveredIntentClient::equals(const WebDeliveredIntentClient& other) const
 94{
 95 if (m_action != other.m_action || m_type != other.m_type || m_data != other.m_data)
 96 return false;
 97
 98#if ENABLE(WEB_INTENTS)
 99 return (m_intentClient.get() == other.m_intentClient.get());
 100#else
 101 return true;
 102#endif
 103}
 104
 105void WebDeliveredIntentClient::assign(const WebDeliveredIntentClient& other)
 106{
 107 m_action = other.m_action;
 108 m_type = other.m_type;
 109 m_data = other.m_data;
 110#if ENABLE(WEB_INTENTS)
 111 m_intentClient = other.m_intentClient;
 112#endif
 113}
 114
 115void WebDeliveredIntentClient::setIntentData(const WebString& action, const WebString& type, const WebString& serializedData)
 116{
 117 m_action = action;
 118 m_type = type;
 119 m_data = serializedData;
 120}
 121
 122WebString WebDeliveredIntentClient::action() const
 123{
 124 return m_action;
 125}
 126
 127WebString WebDeliveredIntentClient::type() const
 128{
 129 return m_type;
 130}
 131
 132WebString WebDeliveredIntentClient::data() const
 133{
 134 return m_data;
 135}
 136
 137void WebDeliveredIntentClient::postResult(const WebSerializedScriptValue& data)
 138{
 139 // notify data.toString();
 140}
 141
 142void WebDeliveredIntentClient::postFailure(const WebSerializedScriptValue& data)
 143{
 144 // notify data.toString();
 145}
 146
 147void WebDeliveredIntentClient::setAsClient(WebCore::DeliveredIntent* intent) const
 148{
 149#if ENABLE(WEB_INTENTS)
 150 intent->setClient(m_intentClient.get());
 151#endif
 152}
 153
 154} // namespace WebKit

Source/WebKit/chromium/src/WebFrameImpl.cpp

7878#include "Console.h"
7979#include "DOMUtilitiesPrivate.h"
8080#include "DOMWindow.h"
 81#include "DOMWindowIntents.h"
 82#include "DeliveredIntent.h"
8183#include "Document.h"
8284#include "DocumentFragment.h" // Only needed for ReplaceSelectionCommand.h :(
8385#include "DocumentLoader.h"

141143#include "WebDOMEvent.h"
142144#include "WebDOMEventListener.h"
143145#include "WebDataSourceImpl.h"
 146#include "WebDeliveredIntentClient.h"
144147#include "WebDevToolsAgentPrivate.h"
145148#include "WebDocument.h"
146149#include "WebFindOptions.h"

149152#include "WebHistoryItem.h"
150153#include "WebIconURL.h"
151154#include "WebInputElement.h"
 155#include "WebIntent.h"
152156#include "WebNode.h"
153157#include "WebPerformance.h"
154158#include "WebPlugin.h"

162166#include "painting/GraphicsContextBuilder.h"
163167#include "platform/WebPoint.h"
164168#include "platform/WebRect.h"
 169#include "platform/WebSerializedScriptValue.h"
165170#include "platform/WebSize.h"
166171#include "platform/WebURLError.h"
167172#include "platform/WebVector.h"

169174#include <algorithm>
170175#include <public/Platform.h>
171176#include <wtf/CurrentTime.h>
 177#include <wtf/HashMap.h>
172178
173179#if USE(V8)
174180#include "AsyncFileSystem.h"

@@void WebFrameImpl::resetMatchCount()
18291835 m_framesScopingCount = 0;
18301836}
18311837
1832 void WebFrameImpl::handleIntentResult(int intentIdentifier, const WebString& reply)
1833 {
1834 }
1835 
1836 void WebFrameImpl::handleIntentFailure(int intentIdentifier, const WebString& reply)
1837 {
1838 }
1839 
18401838void WebFrameImpl::addEventListener(const WebString& eventType, WebDOMEventListener* listener, bool useCapture)
18411839{
18421840 DOMWindow* window = m_frame->domWindow();

@@bool WebFrameImpl::dispatchEvent(const WebDOMEvent& event)
18621860 return m_frame->domWindow()->dispatchEvent(event);
18631861}
18641862
 1863void WebFrameImpl::deliverIntent(const WebDeliveredIntentClient& intentClient)
 1864{
 1865 DOMWindow* window = m_frame->domWindow();
 1866
 1867 HashMap<String, String> extras;
 1868 WebSerializedScriptValue intentData = WebSerializedScriptValue::fromString(intentClient.data());
 1869 RefPtr<DeliveredIntent> deliveredIntent =
 1870 DeliveredIntent::create(m_frame->document(), intentClient.action(), intentClient.type(), intentData, 0, extras);
 1871 intentClient.setAsClient(deliveredIntent.get());
 1872 DOMWindowIntents::from(window)->deliver(deliveredIntent.release());
 1873}
 1874
18651875WebString WebFrameImpl::contentAsText(size_t maxChars) const
18661876{
18671877 if (!m_frame)

Source/WebKit/chromium/src/WebFrameImpl.h

@@struct WindowFeatures;
5555namespace WebKit {
5656class ChromePrintContext;
5757class WebDataSourceImpl;
 58class WebDeliveredIntentClient;
5859class WebInputElement;
5960class WebFrameClient;
6061class WebPerformance;

@@public:
199200 virtual void increaseMatchCount(int count, int identifier);
200201 virtual void resetMatchCount();
201202
202  virtual void handleIntentResult(int, const WebString&);
203  virtual void handleIntentFailure(int, const WebString&);
204 
205203 virtual void addEventListener(const WebString& eventType,
206204 WebDOMEventListener*, bool useCapture);
207205 virtual void removeEventListener(const WebString& eventType,
208206 WebDOMEventListener*, bool useCapture);
209207 virtual bool dispatchEvent(const WebDOMEvent&);
210208
 209 virtual void deliverIntent(const WebDeliveredIntentClient&);
 210
211211 virtual WebString contentAsText(size_t maxChars) const;
212212 virtual WebString contentAsMarkup() const;
213213 virtual WebString renderTreeAsText(RenderAsTextControls toShow = RenderAsTextNormal) const;

Source/WebKit/chromium/src/WebIntent.cpp

@@WebIntent::WebIntent(const PassRefPtr<WebCore::Intent>& intent)
4242 : m_private(intent)
4343{
4444}
 45
 46WebIntent::WebIntent(const WebString& action, const WebString& type, const WebString& serializedData)
 47{
 48 RefPtr<WebCore::SerializedScriptValue> data = WebCore::SerializedScriptValue::createFromWire(serializedData);
 49 WebCore::ExceptionCode ec;
 50 m_private = WebCore::Intent::create(action, type, data, ec);
 51}
4552#endif
4653
4754void WebIntent::reset()

Tools/DumpRenderTree/chromium/LayoutTestController.cpp

4949#include "WebGeolocationClientMock.h"
5050#include "WebIDBFactory.h"
5151#include "WebInputElement.h"
 52#include "WebIntent.h"
5253#include "WebIntentRequest.h"
5354#include "WebKit.h"
5455#include "WebNotificationPresenter.h"

@@LayoutTestController::LayoutTestController(TestShell* shell)
267268 bindProperty("interceptPostMessage", &m_interceptPostMessage);
268269 bindProperty("workerThreadCount", &LayoutTestController::workerThreadCount);
269270 bindMethod("sendWebIntentResponse", &LayoutTestController::sendWebIntentResponse);
 271 bindMethod("deliverWebIntent", &LayoutTestController::deliverWebIntent);
270272}
271273
272274LayoutTestController::~LayoutTestController()

@@void LayoutTestController::sendWebIntentResponse(const CppArgumentList& argument
21652167 result->setNull();
21662168}
21672169
 2170void LayoutTestController::deliverWebIntent(const CppArgumentList& arguments, CppVariant* result)
 2171{
 2172 if (arguments.size() < 3)
 2173 return;
 2174
 2175 v8::HandleScope scope;
 2176 v8::Local<v8::Context> ctx = m_shell->webView()->mainFrame()->mainWorldScriptContext();
 2177 result->set(m_shell->webView()->mainFrame()->selectionAsMarkup().utf8());
 2178 v8::Context::Scope cscope(ctx);
 2179
 2180 WebString action = cppVariantToWebString(arguments[0]);
 2181 WebString type = cppVariantToWebString(arguments[1]);
 2182 WebKit::WebCString data = cppVariantToWebString(arguments[2]).utf8();
 2183 WebSerializedScriptValue serializedData = WebSerializedScriptValue::serialize(
 2184 v8::String::New(data.data(), data.length()));
 2185
 2186 m_intentClient.setIntentData(action, type, serializedData.toString());
 2187 m_shell->webView()->mainFrame()->deliverIntent(m_intentClient);
 2188}
 2189
21682190void LayoutTestController::setPluginsEnabled(const CppArgumentList& arguments, CppVariant* result)
21692191{
21702192 if (arguments.size() > 0 && arguments[0].isBool()) {

Tools/DumpRenderTree/chromium/LayoutTestController.h

4343
4444#include "CppBoundClass.h"
4545#include "Task.h"
 46#include "WebDeliveredIntentClient.h"
4647#include "platform/WebArrayBufferView.h"
4748#include "platform/WebString.h"
4849#include "WebTextDirection.h"

@@public:
438439 void workerThreadCount(CppVariant*);
439440
440441 // Expects one string argument for sending successful result, zero
441  // for sending a failure result.
 442 // arguments for sending a failure result.
442443 void sendWebIntentResponse(const CppArgumentList&, CppVariant*);
443444
 445 // Cause the web intent to be delivered to this context.
 446 void deliverWebIntent(const CppArgumentList&, CppVariant*);
 447
444448public:
445449 // The following methods are not exposed to JavaScript.
446450 void setWorkQueueFrozen(bool frozen) { m_workQueue.setFrozen(frozen); }

@@private:
707711 // WAV audio data is stored here.
708712 WebKit::WebArrayBufferView m_audioData;
709713
 714 // Mock object for testing delivering web intents.
 715 WebKit::WebDeliveredIntentClient m_intentClient;
 716
710717 bool m_shouldStayOnPageAfterHandlingBeforeUnload;
711718
712719 // If true, calls to WebViewHost::enter/exitFullScreenNow will not result in

Tools/DumpRenderTree/chromium/WebViewHost.cpp

5656#include "WebRange.h"
5757#include "platform/WebRect.h"
5858#include "WebScreenInfo.h"
 59#include "platform/WebSerializedScriptValue.h"
5960#include "platform/WebSize.h"
6061#include "WebStorageNamespace.h"
6162#include "WebTextCheckingCompletion.h"

@@void WebViewHost::dispatchIntent(WebFrame* source, const WebIntentRequest& reque
13371338 }
13381339}
13391340
 1341void WebViewHost::deliveredIntentResult(WebFrame* frame, int id, const WebSerializedScriptValue& data)
 1342{
 1343 printf("Web intent success for id %d\n", id);
 1344}
 1345
 1346void WebViewHost::deliveredIntentFailure(WebFrame* frame, int id, const WebSerializedScriptValue& data)
 1347{
 1348 printf("Web intent failure for id %d\n", id);
 1349}
 1350
13401351// Public functions -----------------------------------------------------------
13411352
13421353WebViewHost::WebViewHost(TestShell* shell)

Tools/DumpRenderTree/chromium/WebViewHost.h

@@class WebDeviceOrientationClientMock;
5757class WebGeolocationClient;
5858class WebGeolocationClientMock;
5959class WebGeolocationServiceMock;
 60class WebSerializedScriptValue;
6061class WebSharedWorkerClient;
6162class WebSpeechInputController;
6263class WebSpeechInputListener;

@@class WebViewHost : public WebKit::WebSpellCheckClient, public WebKit::WebViewCl
240241 virtual void openFileSystem(WebKit::WebFrame*, WebKit::WebFileSystem::Type, long long size, bool create, WebKit::WebFileSystemCallbacks*);
241242 virtual bool willCheckAndDispatchMessageEvent(WebKit::WebFrame* source, WebKit::WebSecurityOrigin target, WebKit::WebDOMMessageEvent);
242243 virtual void dispatchIntent(WebKit::WebFrame* source, const WebKit::WebIntentRequest&);
 244 virtual void deliveredIntentResult(WebKit::WebFrame*, int, const WebKit::WebSerializedScriptValue&);
 245 virtual void deliveredIntentFailure(WebKit::WebFrame*, int, const WebKit::WebSerializedScriptValue&);
243246
244247 WebKit::WebDeviceOrientationClientMock* deviceOrientationClientMock();
245248

LayoutTests/webintents/web-intents-delivery-expected.txt

 1PASS window.webkitIntent is null
 2PASS window.webkitIntent is defined.
 3PASS window.webkitIntent.action is "aaa"
 4PASS window.webkitIntent.type is "ttt"
 5PASS window.webkitIntent.data is "data"
 6PASS successfullyParsed is true
 7
 8TEST COMPLETE
 9

LayoutTests/webintents/web-intents-delivery-reuse-expected.txt

 1PASS webkitIntent is "foo"
 2PASS window.webkitIntent is "foo"
 3PASS successfullyParsed is true
 4
 5TEST COMPLETE
 6

LayoutTests/webintents/web-intents-delivery-reuse.html

 1<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 2<html>
 3<head>
 4<script src="../fast/js/resources/js-test-pre.js"></script>
 5</head>
 6<body>
 7<script type="text/javascript">
 8 var webkitIntent = "foo";
 9 shouldBeEqualToString("webkitIntent", "foo");
 10 shouldBeEqualToString("window.webkitIntent", "foo");
 11</script>
 12<script src="../fast/js/resources/js-test-post.js"></script>
 13</body>
 14</html>

LayoutTests/webintents/web-intents-delivery.html

 1<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 2<html>
 3<head>
 4<script src="../fast/js/resources/js-test-pre.js"></script>
 5</head>
 6<body>
 7<script type="text/javascript">
 8 shouldBeNull("window.webkitIntent");
 9
 10 if (window.layoutTestController) {
 11 window.layoutTestController.deliverWebIntent("aaa", "ttt", "data");
 12 }
 13
 14 shouldBeDefined("window.webkitIntent");
 15 shouldBeEqualToString("window.webkitIntent.action", "aaa");
 16 shouldBeEqualToString("window.webkitIntent.type", "ttt");
 17 shouldBeEqualToString("window.webkitIntent.data", "data");
 18
 19</script>
 20<script src="../fast/js/resources/js-test-post.js"></script>
 21</body>
 22</html>