<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[161474] trunk/Source/WebKit2</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/161474">161474</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2014-01-07 17:03:48 -0800 (Tue, 07 Jan 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Make it possible for MessageReceivers to pass messages to their superclass, and use it for RemoteLayerTreeDrawingAreaProxy
https://bugs.webkit.org/show_bug.cgi?id=126558
Reviewed by Anders Carlsson.
In a message.in file it's now possible to say:
messages -> Subclass : Superclass { ... } and the generated code will
call Superclass::didReceiveMessage().
Use this to have RemoteLayerTreeDrawingAreaProxy pass messages up to
DrawingAreaProxy.
* Scripts/webkit2/messages.py:
(generate_message_handler):
* Scripts/webkit2/model.py:
(MessageReceiver.__init__):
* Scripts/webkit2/parser.py:
(parse):
* UIProcess/DrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.messages.in:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2Scriptswebkit2messagespy">trunk/Source/WebKit2/Scripts/webkit2/messages.py</a></li>
<li><a href="#trunkSourceWebKit2Scriptswebkit2messages_unittestpy">trunk/Source/WebKit2/Scripts/webkit2/messages_unittest.py</a></li>
<li><a href="#trunkSourceWebKit2Scriptswebkit2modelpy">trunk/Source/WebKit2/Scripts/webkit2/model.py</a></li>
<li><a href="#trunkSourceWebKit2Scriptswebkit2parserpy">trunk/Source/WebKit2/Scripts/webkit2/parser.py</a></li>
<li><a href="#trunkSourceWebKit2UIProcessDrawingAreaProxyh">trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacRemoteLayerTreeDrawingAreaProxymessagesin">trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.messages.in</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2Scriptswebkit2MessageReceiverSuperclassexpectedcpp">trunk/Source/WebKit2/Scripts/webkit2/MessageReceiverSuperclass-expected.cpp</a></li>
<li><a href="#trunkSourceWebKit2Scriptswebkit2MessagesSuperclassexpectedh">trunk/Source/WebKit2/Scripts/webkit2/MessagesSuperclass-expected.h</a></li>
<li><a href="#trunkSourceWebKit2Scriptswebkit2testsuperclassmessagesin">trunk/Source/WebKit2/Scripts/webkit2/test-superclass-messages.in</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (161473 => 161474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-01-08 01:03:46 UTC (rev 161473)
+++ trunk/Source/WebKit2/ChangeLog        2014-01-08 01:03:48 UTC (rev 161474)
</span><span class="lines">@@ -1,5 +1,29 @@
</span><span class="cx"> 2014-01-07 Simon Fraser <simon.fraser@apple.com>
</span><span class="cx">
</span><ins>+ Make it possible for MessageReceivers to pass messages to their superclass, and use it for RemoteLayerTreeDrawingAreaProxy
+ https://bugs.webkit.org/show_bug.cgi?id=126558
+
+ Reviewed by Anders Carlsson.
+
+ In a message.in file it's now possible to say:
+
+ messages -> Subclass : Superclass { ... } and the generated code will
+ call Superclass::didReceiveMessage().
+
+ Use this to have RemoteLayerTreeDrawingAreaProxy pass messages up to
+ DrawingAreaProxy.
+
+ * Scripts/webkit2/messages.py:
+ (generate_message_handler):
+ * Scripts/webkit2/model.py:
+ (MessageReceiver.__init__):
+ * Scripts/webkit2/parser.py:
+ (parse):
+ * UIProcess/DrawingAreaProxy.h:
+ * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.messages.in:
+
+2014-01-07 Simon Fraser <simon.fraser@apple.com>
+
</ins><span class="cx"> Add message-generation test for non-legacy message receiver
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=126603
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2Scriptswebkit2MessageReceiverSuperclassexpectedcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/Scripts/webkit2/MessageReceiverSuperclass-expected.cpp (0 => 161474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Scripts/webkit2/MessageReceiverSuperclass-expected.cpp         (rev 0)
+++ trunk/Source/WebKit2/Scripts/webkit2/MessageReceiverSuperclass-expected.cpp        2014-01-08 01:03:48 UTC (rev 161474)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#include "WebPage.h"
+
+#include "ArgumentCoders.h"
+#include "HandleMessage.h"
+#include "MessageDecoder.h"
+#include "WebPageMessages.h"
+#include <wtf/text/WTFString.h>
+
+namespace WebKit {
+
+void WebPage::didReceiveMessage(IPC::Connection* connection, IPC::MessageDecoder& decoder)
+{
+ if (decoder.messageName() == Messages::WebPage::LoadURL::name()) {
+ IPC::handleMessage<Messages::WebPage::LoadURL>(decoder, this, &WebPage::loadURL);
+ return;
+ }
+ WebPageBase::didReceiveMessage(connection, decoder);
+}
+
+} // namespace WebKit
</ins><span class="cx">Property changes on: trunk/Source/WebKit2/Scripts/webkit2/MessageReceiverSuperclass-expected.cpp
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkSourceWebKit2Scriptswebkit2MessagesSuperclassexpectedh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/Scripts/webkit2/MessagesSuperclass-expected.h (0 => 161474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Scripts/webkit2/MessagesSuperclass-expected.h         (rev 0)
+++ trunk/Source/WebKit2/Scripts/webkit2/MessagesSuperclass-expected.h        2014-01-08 01:03:48 UTC (rev 161474)
</span><span class="lines">@@ -0,0 +1,69 @@
</span><ins>+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebPageMessages_h
+#define WebPageMessages_h
+
+#include "Arguments.h"
+#include "MessageEncoder.h"
+#include "StringReference.h"
+
+namespace WTF {
+ class String;
+}
+
+namespace Messages {
+namespace WebPage {
+
+static inline IPC::StringReference messageReceiverName()
+{
+ return IPC::StringReference("WebPage");
+}
+
+class LoadURL {
+public:
+ typedef std::tuple<String> DecodeType;
+
+ static IPC::StringReference receiverName() { return messageReceiverName(); }
+ static IPC::StringReference name() { return IPC::StringReference("LoadURL"); }
+ static const bool isSync = false;
+
+ explicit LoadURL(const String& url)
+ : m_arguments(url)
+ {
+ }
+
+ const std::tuple<const String&> arguments() const
+ {
+ return m_arguments;
+ }
+
+private:
+ std::tuple<const String&> m_arguments;
+};
+
+} // namespace WebPage
+} // namespace Messages
+
+#endif // WebPageMessages_h
</ins><span class="cx">Property changes on: trunk/Source/WebKit2/Scripts/webkit2/MessagesSuperclass-expected.h
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkSourceWebKit2Scriptswebkit2messagespy"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Scripts/webkit2/messages.py (161473 => 161474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Scripts/webkit2/messages.py        2014-01-08 01:03:46 UTC (rev 161473)
+++ trunk/Source/WebKit2/Scripts/webkit2/messages.py        2014-01-08 01:03:48 UTC (rev 161474)
</span><span class="lines">@@ -595,9 +595,12 @@
</span><span class="cx">
</span><span class="cx"> result.append('{\n')
</span><span class="cx"> result += [async_message_statement(receiver, message) for message in async_messages]
</span><del>- if not receiver.has_attribute(LEGACY_RECEIVER_ATTRIBUTE):
- result.append(' UNUSED_PARAM(connection);\n')
- result.append(' ASSERT_NOT_REACHED();\n')
</del><ins>+ if (receiver.superclass):
+ result.append(' %s::didReceiveMessage(connection, decoder);\n' % (receiver.superclass))
+ else:
+ if not receiver.has_attribute(LEGACY_RECEIVER_ATTRIBUTE):
+ result.append(' UNUSED_PARAM(connection);\n')
+ result.append(' ASSERT_NOT_REACHED();\n')
</ins><span class="cx"> result.append('}\n')
</span><span class="cx">
</span><span class="cx"> if sync_messages:
</span></span></pre></div>
<a id="trunkSourceWebKit2Scriptswebkit2messages_unittestpy"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Scripts/webkit2/messages_unittest.py (161473 => 161474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Scripts/webkit2/messages_unittest.py        2014-01-08 01:03:46 UTC (rev 161473)
+++ trunk/Source/WebKit2/Scripts/webkit2/messages_unittest.py        2014-01-08 01:03:48 UTC (rev 161474)
</span><span class="lines">@@ -31,24 +31,35 @@
</span><span class="cx">
</span><span class="cx"> script_directory = os.path.dirname(os.path.realpath(__file__))
</span><span class="cx">
</span><ins>+with open(os.path.join(script_directory, 'test-messages.in')) as file:
+ _messages_file_contents = file.read()
+
</ins><span class="cx"> with open(os.path.join(script_directory, 'test-legacy-messages.in')) as file:
</span><span class="cx"> _legacy_messages_file_contents = file.read()
</span><span class="cx">
</span><del>-with open(os.path.join(script_directory, 'test-messages.in')) as file:
- _messages_file_contents = file.read()
</del><ins>+with open(os.path.join(script_directory, 'test-superclass-messages.in')) as file:
+ _superclass_messages_file_contents = file.read()
</ins><span class="cx">
</span><del>-with open(os.path.join(script_directory, 'LegacyMessages-expected.h')) as file:
- _expected_legacy_receiver_header = file.read()
</del><span class="cx">
</span><span class="cx"> with open(os.path.join(script_directory, 'Messages-expected.h')) as file:
</span><span class="cx"> _expected_receiver_header = file.read()
</span><span class="cx">
</span><ins>+with open(os.path.join(script_directory, 'LegacyMessages-expected.h')) as file:
+ _expected_legacy_receiver_header = file.read()
+
+with open(os.path.join(script_directory, 'MessagesSuperclass-expected.h')) as file:
+ _expected_superclass_receiver_header = file.read()
+
+
</ins><span class="cx"> with open(os.path.join(script_directory, 'MessageReceiver-expected.cpp')) as file:
</span><span class="cx"> _expected_receiver_implementation = file.read()
</span><span class="cx">
</span><span class="cx"> with open(os.path.join(script_directory, 'LegacyMessageReceiver-expected.cpp')) as file:
</span><span class="cx"> _expected_legacy_receiver_implementation = file.read()
</span><span class="cx">
</span><ins>+with open(os.path.join(script_directory, 'MessageReceiverSuperclass-expected.cpp')) as file:
+ _expected_superclass_receiver_implementation = file.read()
+
</ins><span class="cx"> _expected_results = {
</span><span class="cx"> 'name': 'WebPage',
</span><span class="cx"> 'conditions': ('(ENABLE(WEBKIT2) && (NESTED_MASTER_CONDITION || MASTER_OR && MASTER_AND))'),
</span><span class="lines">@@ -223,11 +234,27 @@
</span><span class="cx"> ),
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+_expected_superclass_results = {
+ 'name': 'WebPage',
+ 'superclass' : 'WebPageBase',
+ 'conditions': None,
+ 'messages': (
+ {
+ 'name': 'LoadURL',
+ 'parameters': (
+ ('String', 'url'),
+ ),
+ 'conditions': (None),
+ },
+ ),
+}
</ins><span class="cx">
</span><ins>+
</ins><span class="cx"> class MessagesTest(unittest.TestCase):
</span><span class="cx"> def setUp(self):
</span><span class="cx"> self.receiver = parser.parse(StringIO(_messages_file_contents))
</span><span class="cx"> self.legacy_receiver = parser.parse(StringIO(_legacy_messages_file_contents))
</span><ins>+ self.superclass_receiver = parser.parse(StringIO(_superclass_messages_file_contents))
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> class ParsingTest(MessagesTest):
</span><span class="lines">@@ -266,8 +293,14 @@
</span><span class="cx"> for index, message in enumerate(self.legacy_receiver.messages):
</span><span class="cx"> self.check_message(message, _expected_results['messages'][index])
</span><span class="cx">
</span><ins>+ self.assertEquals(self.superclass_receiver.name, _expected_superclass_results['name'])
+ self.assertEquals(self.superclass_receiver.superclass, _expected_superclass_results['superclass'])
+ self.assertEquals(len(self.superclass_receiver.messages), len(_expected_superclass_results['messages']))
+ for index, message in enumerate(self.superclass_receiver.messages):
+ self.check_message(message, _expected_superclass_results['messages'][index])
</ins><span class="cx">
</span><span class="cx">
</span><ins>+
</ins><span class="cx"> class GeneratedFileContentsTest(unittest.TestCase):
</span><span class="cx"> def assertGeneratedFileContentsEqual(self, first, second):
</span><span class="cx"> first_list = first.split('\n')
</span><span class="lines">@@ -281,20 +314,26 @@
</span><span class="cx">
</span><span class="cx"> class HeaderTest(GeneratedFileContentsTest):
</span><span class="cx"> def test_header(self):
</span><ins>+ file_contents = messages.generate_messages_header(StringIO(_messages_file_contents))
+ self.assertGeneratedFileContentsEqual(file_contents, _expected_receiver_header)
+
</ins><span class="cx"> legacy_file_contents = messages.generate_messages_header(StringIO(_legacy_messages_file_contents))
</span><span class="cx"> self.assertGeneratedFileContentsEqual(legacy_file_contents, _expected_legacy_receiver_header)
</span><span class="cx">
</span><del>- file_contents = messages.generate_messages_header(StringIO(_messages_file_contents))
- self.assertGeneratedFileContentsEqual(file_contents, _expected_receiver_header)
</del><ins>+ superclass_file_contents = messages.generate_messages_header(StringIO(_superclass_messages_file_contents))
+ self.assertGeneratedFileContentsEqual(superclass_file_contents, _expected_superclass_receiver_header)
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> class ReceiverImplementationTest(GeneratedFileContentsTest):
</span><span class="cx"> def test_receiver_implementation(self):
</span><ins>+ file_contents = messages.generate_message_handler(StringIO(_messages_file_contents))
+ self.assertGeneratedFileContentsEqual(file_contents, _expected_receiver_implementation)
+
</ins><span class="cx"> legacy_file_contents = messages.generate_message_handler(StringIO(_legacy_messages_file_contents))
</span><span class="cx"> self.assertGeneratedFileContentsEqual(legacy_file_contents, _expected_legacy_receiver_implementation)
</span><span class="cx">
</span><del>- file_contents = messages.generate_message_handler(StringIO(_messages_file_contents))
- self.assertGeneratedFileContentsEqual(file_contents, _expected_receiver_implementation)
</del><ins>+ superclass_file_contents = messages.generate_message_handler(StringIO(_superclass_messages_file_contents))
+ self.assertGeneratedFileContentsEqual(superclass_file_contents, _expected_superclass_receiver_implementation)
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> class UnsupportedPrecompilerDirectiveTest(unittest.TestCase):
</span></span></pre></div>
<a id="trunkSourceWebKit2Scriptswebkit2modelpy"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Scripts/webkit2/model.py (161473 => 161474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Scripts/webkit2/model.py        2014-01-08 01:03:46 UTC (rev 161473)
+++ trunk/Source/WebKit2/Scripts/webkit2/model.py        2014-01-08 01:03:48 UTC (rev 161474)
</span><span class="lines">@@ -24,8 +24,9 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> class MessageReceiver(object):
</span><del>- def __init__(self, name, attributes, messages, condition):
</del><ins>+ def __init__(self, name, superclass, attributes, messages, condition):
</ins><span class="cx"> self.name = name
</span><ins>+ self.superclass = superclass
</ins><span class="cx"> self.attributes = frozenset(attributes or [])
</span><span class="cx"> self.messages = messages
</span><span class="cx"> self.condition = condition
</span></span></pre></div>
<a id="trunkSourceWebKit2Scriptswebkit2parserpy"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Scripts/webkit2/parser.py (161473 => 161474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Scripts/webkit2/parser.py        2014-01-08 01:03:46 UTC (rev 161473)
+++ trunk/Source/WebKit2/Scripts/webkit2/parser.py        2014-01-08 01:03:48 UTC (rev 161474)
</span><span class="lines">@@ -48,11 +48,13 @@
</span><span class="cx"> messages = []
</span><span class="cx"> conditions = []
</span><span class="cx"> master_condition = None
</span><ins>+ superclass = []
</ins><span class="cx"> for line in file:
</span><del>- match = re.search(r'messages -> (?P<destination>[A-Za-z_0-9]+) \s*(?:(?P<attributes>.*?)\s+)?{', line)
</del><ins>+ match = re.search(r'messages -> (?P<destination>[A-Za-z_0-9]+) \s*(?::\s*(?P<superclass>.*?) \s*)?(?:(?P<attributes>.*?)\s+)?{', line)
</ins><span class="cx"> if match:
</span><span class="cx"> receiver_attributes = parse_attributes_string(match.group('attributes'))
</span><del>-
</del><ins>+ if match.group('superclass'):
+ superclass = match.group('superclass')
</ins><span class="cx"> if conditions:
</span><span class="cx"> master_condition = conditions
</span><span class="cx"> conditions = []
</span><span class="lines">@@ -89,7 +91,7 @@
</span><span class="cx"> reply_parameters = None
</span><span class="cx">
</span><span class="cx"> messages.append(model.Message(name, parameters, reply_parameters, attributes, combine_condition(conditions)))
</span><del>- return model.MessageReceiver(destination, receiver_attributes, messages, combine_condition(master_condition))
</del><ins>+ return model.MessageReceiver(destination, superclass, receiver_attributes, messages, combine_condition(master_condition))
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> def parse_attributes_string(attributes_string):
</span></span></pre></div>
<a id="trunkSourceWebKit2Scriptswebkit2testsuperclassmessagesinfromrev161473trunkSourceWebKit2UIProcessmacRemoteLayerTreeDrawingAreaProxymessagesin"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/Scripts/webkit2/test-superclass-messages.in (from rev 161473, trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.messages.in) (0 => 161474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Scripts/webkit2/test-superclass-messages.in         (rev 0)
+++ trunk/Source/WebKit2/Scripts/webkit2/test-superclass-messages.in        2014-01-08 01:03:48 UTC (rev 161474)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+# Copyright (C) 2010 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+messages -> WebPage : WebPageBase {
+ LoadURL(String url)
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessDrawingAreaProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h (161473 => 161474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h        2014-01-08 01:03:46 UTC (rev 161473)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h        2014-01-08 01:03:48 UTC (rev 161474)
</span><span class="lines">@@ -82,12 +82,12 @@
</span><span class="cx"> WebCore::IntSize m_layerPosition;
</span><span class="cx"> WebCore::IntSize m_scrollOffset;
</span><span class="cx">
</span><ins>+ // IPC::MessageReceiver
+ virtual void didReceiveMessage(IPC::Connection*, IPC::MessageDecoder&) OVERRIDE;
+
</ins><span class="cx"> private:
</span><span class="cx"> virtual void sizeDidChange() = 0;
</span><span class="cx">
</span><del>- // IPC::MessageReceiver
- virtual void didReceiveMessage(IPC::Connection*, IPC::MessageDecoder&) OVERRIDE;
-
</del><span class="cx"> // Message handlers.
</span><span class="cx"> // FIXME: These should be pure virtual.
</span><span class="cx"> virtual void update(uint64_t /* backingStoreStateID */, const UpdateInfo&) { }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacRemoteLayerTreeDrawingAreaProxymessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.messages.in (161473 => 161474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.messages.in        2014-01-08 01:03:46 UTC (rev 161473)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.messages.in        2014-01-08 01:03:48 UTC (rev 161474)
</span><span class="lines">@@ -20,6 +20,6 @@
</span><span class="cx"> # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
</span><span class="cx"> # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">
</span><del>-messages -> RemoteLayerTreeDrawingAreaProxy {
</del><ins>+messages -> RemoteLayerTreeDrawingAreaProxy : DrawingAreaProxy {
</ins><span class="cx"> void CommitLayerTree(WebKit::RemoteLayerTreeTransaction layerTreeTransaction, WebKit::RemoteScrollingCoordinatorTransaction scrollingTreeTransaction)
</span><span class="cx"> }
</span></span></pre>
</div>
</div>
</body>
</html>