Bug 69962 - [Chromium] Make it possible to create and dispatch a message event through chromium API
Summary: [Chromium] Make it possible to create and dispatch a message event through ch...
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2011-10-12 14:11 PDT by Dave Michael
Modified: 2011-10-27 15:40 PDT (History)
6 users (show)

See Also:

Patch (12.78 KB, patch)
2011-10-12 14:15 PDT, Dave Michael
no flags Details | Formatted Diff | Diff
Patch (12.26 KB, patch)
2011-10-13 09:22 PDT, Dave Michael
no flags Details | Formatted Diff | Diff
Patch (12.28 KB, patch)
2011-10-24 14:23 PDT, Dave Michael
no flags Details | Formatted Diff | Diff
Patch (12.32 KB, patch)
2011-10-25 08:55 PDT, Dave Michael
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Michael 2011-10-12 14:11:43 PDT
Make it possible to create and dispatch a message event through chromium API
Comment 1 Dave Michael 2011-10-12 14:15:27 PDT
Created attachment 110742 [details]
Comment 2 WebKit Review Bot 2011-10-12 14:18:17 PDT
Please wait for approval from fishd@chromium.org before submitting because this patch contains changes to the Chromium public API.
Comment 3 Dave Michael 2011-10-12 14:20:11 PDT
This is to support 'PostMessage' for the Pepper plugin API. We currently use a simple scripting approach, but it's very limited. This is a first step to allow me to create an Event in the Chromium renderer and dispatch it to JavaScript.

Here's the corresponding Chromium bug:
Comment 4 Darin Fisher (:fishd, Google) 2011-10-12 14:32:53 PDT
Comment on attachment 110742 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=110742&action=review

API changes LGTM modulo the nit.

> Source/WebKit/chromium/public/WebDOMMessageEvent.h:48
> +    WEBKIT_EXPORT void initMessageEvent(const WebString& type, bool canBubble, bool cancelable, const WebSerializedScriptValue& message_data, const WebString& origin, const WebFrame& sourceFrame, const WebString& lastEventId, const WebMessagePortChannelArray& webChannels);

nit: message_data -> messageData

> Source/WebKit/chromium/src/PlatformMessagePortChannel.cpp:239
> +    return m_localPort && m_localPort->hasPendingActivity();

I'm not super familiar with this code.  It would be good to get someone
like levin@chromium.org to look over this patch too.
Comment 5 Darin Fisher (:fishd, Google) 2011-10-12 14:33:28 PDT
+levin@chromium.org:  Dave, it'd be great to get your eyes on this one too.
Comment 6 Dave Michael 2011-10-13 09:22:24 PDT
Created attachment 110858 [details]
Comment 7 David Levin 2011-10-24 13:22:41 PDT
Comment on attachment 110858 [details]

Please fix the include sorting and then we can get this landed.
Comment 8 Dave Michael 2011-10-24 14:23:22 PDT
Created attachment 112246 [details]
Comment 9 David Levin 2011-10-24 14:25:38 PDT
Comment on attachment 112246 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=112246&action=review

> Source/WebKit/chromium/ChangeLog:5
> +        Removed messageChannels parameter, since it's hard to get right and I don't need it. Changed message_data->messageData. Reordered includes.

In general you don't need interpatch info here.
Comment 10 WebKit Review Bot 2011-10-24 15:52:25 PDT
Comment on attachment 112246 [details]

Rejecting attachment 112246 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2

Last 500 characters of output:
patching file Source/WebKit/chromium/src/WebDOMEvent.cpp
Hunk #1 succeeded at 69 (offset 3 lines).
patching file Source/WebKit/chromium/src/WebDOMMessageEvent.cpp
patching file Source/WebKit/chromium/src/WebDocument.cpp
Hunk #2 succeeded at 199 with fuzz 1 (offset 9 lines).
patching file Source/WebKit/chromium/src/WebNode.cpp

Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--reviewer', u'David Levin', u'--force']" exit_code: 1

Full output: http://queues.webkit.org/results/10210007
Comment 11 David Levin 2011-10-24 16:08:41 PDT
Your patch didn't apply. Please update your tree, resolve any conflicts and upload a new patch.
Comment 12 Dave Michael 2011-10-25 08:55:17 PDT
Created attachment 112342 [details]
Comment 13 WebKit Review Bot 2011-10-25 08:59:06 PDT
Comment on attachment 112342 [details]

Rejecting attachment 112342 [details] from commit-queue.

dmichael@chromium.org does not have committer permissions according to http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/committers.py.

- If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags.

- If you have committer rights please correct the error in Tools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed).  The commit-queue restarts itself every 2 hours.  After restart the commit-queue will correctly respect your committer rights.
Comment 14 WebKit Review Bot 2011-10-25 13:00:42 PDT
Comment on attachment 112342 [details]

Clearing flags on attachment: 112342

Committed r98381: <http://trac.webkit.org/changeset/98381>
Comment 15 WebKit Review Bot 2011-10-25 13:00:47 PDT
All reviewed patches have been landed.  Closing bug.