Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Unified Diff: third_party/WebKit/Source/web/WebDOMMessageEvent.cpp

Issue 1367333002: Remove WebDocument::createEvent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/web/WebDOMCustomEvent.cpp ('k') | third_party/WebKit/Source/web/WebDocument.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebDOMMessageEvent.cpp
diff --git a/third_party/WebKit/Source/web/WebDOMMessageEvent.cpp b/third_party/WebKit/Source/web/WebDOMMessageEvent.cpp
index 7c35d4eb29559143e7ee304b7e0168370f1d0b5d..e45cafeff0066e0d1ef5bc9ba3880d5513615081 100644
--- a/third_party/WebKit/Source/web/WebDOMMessageEvent.cpp
+++ b/third_party/WebKit/Source/web/WebDOMMessageEvent.cpp
@@ -44,23 +44,23 @@
namespace blink {
-void WebDOMMessageEvent::initMessageEvent(const WebString& type, bool canBubble, bool cancelable, const WebSerializedScriptValue& messageData, const WebString& origin, const WebFrame* sourceFrame, const WebDocument& targetDocument, const WebString& lastEventId, const WebMessagePortChannelArray& webChannels)
+WebDOMMessageEvent::WebDOMMessageEvent(const WebSerializedScriptValue& messageData, const WebString& origin, const WebFrame* sourceFrame, const WebDocument& targetDocument, const WebMessagePortChannelArray& channels)
+ : WebDOMMessageEvent(MessageEvent::create())
{
- ASSERT(m_private.get());
- ASSERT(isMessageEvent());
DOMWindow* window = nullptr;
if (sourceFrame)
window = toCoreFrame(sourceFrame)->domWindow();
MessagePortArray* ports = nullptr;
if (!targetDocument.isNull()) {
RefPtrWillBeRawPtr<Document> coreDocument = PassRefPtrWillBeRawPtr<Document>(targetDocument);
- ports = MessagePort::toMessagePortArray(coreDocument.get(), webChannels);
+ ports = MessagePort::toMessagePortArray(coreDocument.get(), channels);
}
// Use an empty array for |ports| when it is null because this function
// is used to implement postMessage().
if (!ports)
ports = new MessagePortArray;
- unwrap<MessageEvent>()->initMessageEvent(type, canBubble, cancelable, messageData, origin, lastEventId, window, ports);
+ // TODO(esprehn): Chromium always passes empty string for lastEventId, is that right?
+ unwrap<MessageEvent>()->initMessageEvent("message", false, false, messageData, origin, ""/*lastEventId*/, window, ports);
}
WebSerializedScriptValue WebDOMMessageEvent::data() const
« no previous file with comments | « third_party/WebKit/Source/web/WebDOMCustomEvent.cpp ('k') | third_party/WebKit/Source/web/WebDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698