Changeset 164171 in webkit


Ignore:
Timestamp:
Feb 15, 2014 1:28:01 AM (10 years ago)
Author:
commit-queue@webkit.org
Message:

messages.py doesn't handle parameters with more than one level of scope.
https://bugs.webkit.org/show_bug.cgi?id=128573

Patch by Jeremy Jones <jeremyj@apple.com> on 2014-02-15
Reviewed by Simon Fraser.

Support .messages.in header include generation for parameter types with more than 1 level of scope.

Add a test case and update expected results.

  • Scripts/webkit2/LegacyMessageReceiver-expected.cpp:

(WebKit::WebPage::didReceiveWebPageMessage):

  • Scripts/webkit2/LegacyMessages-expected.h:

(Messages::WebPage::SetVideoLayerID::receiverName):
(Messages::WebPage::SetVideoLayerID::name):
(Messages::WebPage::SetVideoLayerID::SetVideoLayerID):
(Messages::WebPage::SetVideoLayerID::arguments):

  • Scripts/webkit2/MessageReceiver-expected.cpp:

(WebKit::WebPage::didReceiveMessage):

  • Scripts/webkit2/Messages-expected.h:

(Messages::WebPage::SetVideoLayerID::receiverName):
(Messages::WebPage::SetVideoLayerID::name):
(Messages::WebPage::SetVideoLayerID::SetVideoLayerID):
(Messages::WebPage::SetVideoLayerID::arguments):

  • Scripts/webkit2/messages.py:

(headers_for_type):

  • Scripts/webkit2/messages_unittest.py:
  • Scripts/webkit2/test-legacy-messages.in:
  • Scripts/webkit2/test-messages.in:
Location:
trunk/Source/WebKit2
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r164167 r164171  
     12014-02-15  Jeremy Jones  <jeremyj@apple.com>
     2
     3        messages.py doesn't handle parameters with more than one level of scope.
     4        https://bugs.webkit.org/show_bug.cgi?id=128573
     5
     6        Reviewed by Simon Fraser.
     7
     8        Support .messages.in header include generation for parameter types with more than 1 level of scope.
     9
     10        Add a test case and update expected results.
     11
     12        * Scripts/webkit2/LegacyMessageReceiver-expected.cpp:
     13        (WebKit::WebPage::didReceiveWebPageMessage):
     14        * Scripts/webkit2/LegacyMessages-expected.h:
     15        (Messages::WebPage::SetVideoLayerID::receiverName):
     16        (Messages::WebPage::SetVideoLayerID::name):
     17        (Messages::WebPage::SetVideoLayerID::SetVideoLayerID):
     18        (Messages::WebPage::SetVideoLayerID::arguments):
     19        * Scripts/webkit2/MessageReceiver-expected.cpp:
     20        (WebKit::WebPage::didReceiveMessage):
     21        * Scripts/webkit2/Messages-expected.h:
     22        (Messages::WebPage::SetVideoLayerID::receiverName):
     23        (Messages::WebPage::SetVideoLayerID::name):
     24        (Messages::WebPage::SetVideoLayerID::SetVideoLayerID):
     25        (Messages::WebPage::SetVideoLayerID::arguments):
     26        * Scripts/webkit2/messages.py:
     27        (headers_for_type):
     28        * Scripts/webkit2/messages_unittest.py:
     29        * Scripts/webkit2/test-legacy-messages.in:
     30        * Scripts/webkit2/test-messages.in:
     31
    1322014-02-14  Carlos Garcia Campos  <cgarcia@igalia.com>
    233
  • trunk/Source/WebKit2/Scripts/webkit2/LegacyMessageReceiver-expected.cpp

    r161473 r164171  
    4646#include "WebPageMessages.h"
    4747#include "WebPreferencesStore.h"
     48#include <WebCore/GraphicsLayer.h>
    4849#if PLATFORM(MAC)
    4950#include <WebCore/KeyboardEvent.h>
     
    162163        return;
    163164    }
     165    if (decoder.messageName() == Messages::WebPage::SetVideoLayerID::name()) {
     166        IPC::handleMessage<Messages::WebPage::SetVideoLayerID>(decoder, this, &WebPage::setVideoLayerID);
     167        return;
     168    }
    164169#if PLATFORM(MAC)
    165170    if (decoder.messageName() == Messages::WebPage::DidCreateWebProcessConnection::name()) {
  • trunk/Source/WebKit2/Scripts/webkit2/LegacyMessages-expected.h

    r161473 r164171  
    3333#include "Plugin.h"
    3434#include "StringReference.h"
     35#include <WebCore/GraphicsLayer.h>
    3536#include <WebCore/KeyboardEvent.h>
    3637#include <WebCore/PluginData.h>
     
    463464};
    464465
     466class SetVideoLayerID {
     467public:
     468    typedef std::tuple<WebCore::GraphicsLayer::PlatformLayerID> DecodeType;
     469
     470    static IPC::StringReference receiverName() { return messageReceiverName(); }
     471    static IPC::StringReference name() { return IPC::StringReference("SetVideoLayerID"); }
     472    static const bool isSync = false;
     473
     474    explicit SetVideoLayerID(const WebCore::GraphicsLayer::PlatformLayerID& videoLayerID)
     475        : m_arguments(videoLayerID)
     476    {
     477    }
     478
     479    const std::tuple<const WebCore::GraphicsLayer::PlatformLayerID&> arguments() const
     480    {
     481        return m_arguments;
     482    }
     483
     484private:
     485    std::tuple<const WebCore::GraphicsLayer::PlatformLayerID&> m_arguments;
     486};
     487
    465488#if PLATFORM(MAC)
    466489class DidCreateWebProcessConnection {
  • trunk/Source/WebKit2/Scripts/webkit2/MessageReceiver-expected.cpp

    r161473 r164171  
    4646#include "WebPageMessages.h"
    4747#include "WebPreferencesStore.h"
     48#include <WebCore/GraphicsLayer.h>
    4849#if PLATFORM(MAC)
    4950#include <WebCore/KeyboardEvent.h>
     
    162163        return;
    163164    }
     165    if (decoder.messageName() == Messages::WebPage::SetVideoLayerID::name()) {
     166        IPC::handleMessage<Messages::WebPage::SetVideoLayerID>(decoder, this, &WebPage::setVideoLayerID);
     167        return;
     168    }
    164169#if PLATFORM(MAC)
    165170    if (decoder.messageName() == Messages::WebPage::DidCreateWebProcessConnection::name()) {
  • trunk/Source/WebKit2/Scripts/webkit2/Messages-expected.h

    r161472 r164171  
    3333#include "Plugin.h"
    3434#include "StringReference.h"
     35#include <WebCore/GraphicsLayer.h>
    3536#include <WebCore/KeyboardEvent.h>
    3637#include <WebCore/PluginData.h>
     
    463464};
    464465
     466class SetVideoLayerID {
     467public:
     468    typedef std::tuple<WebCore::GraphicsLayer::PlatformLayerID> DecodeType;
     469
     470    static IPC::StringReference receiverName() { return messageReceiverName(); }
     471    static IPC::StringReference name() { return IPC::StringReference("SetVideoLayerID"); }
     472    static const bool isSync = false;
     473
     474    explicit SetVideoLayerID(const WebCore::GraphicsLayer::PlatformLayerID& videoLayerID)
     475        : m_arguments(videoLayerID)
     476    {
     477    }
     478
     479    const std::tuple<const WebCore::GraphicsLayer::PlatformLayerID&> arguments() const
     480    {
     481        return m_arguments;
     482    }
     483
     484private:
     485    std::tuple<const WebCore::GraphicsLayer::PlatformLayerID&> m_arguments;
     486};
     487
    465488#if PLATFORM(MAC)
    466489class DidCreateWebProcessConnection {
  • trunk/Source/WebKit2/Scripts/webkit2/messages.py

    r162951 r164171  
    471471            headers.append('"%s.h"' % split[1])
    472472        else:
    473             headers.append('<%s/%s.h>' % tuple(split))
     473            headers.append('<%s/%s.h>' % tuple(split[0:2]))
    474474
    475475    return headers
  • trunk/Source/WebKit2/Scripts/webkit2/messages_unittest.py

    r161474 r164171  
    202202        },
    203203        {
     204            'name': 'SetVideoLayerID',
     205            'parameters': (
     206                ('WebCore::GraphicsLayer::PlatformLayerID', 'videoLayerID'),
     207            ),
     208            'conditions': (None),
     209        },
     210        {
    204211            'name': 'DidCreateWebProcessConnection',
    205212            'parameters': (
  • trunk/Source/WebKit2/Scripts/webkit2/test-legacy-messages.in

    r161473 r164171  
    5454    TemplateTest(HashMap<String, std::pair<String, uint64_t>> a)
    5555
     56    SetVideoLayerID(WebCore::GraphicsLayer::PlatformLayerID videoLayerID)
     57
    5658#if PLATFORM(MAC)
    5759    DidCreateWebProcessConnection(IPC::MachPort connectionIdentifier)
  • trunk/Source/WebKit2/Scripts/webkit2/test-messages.in

    r161473 r164171  
    5454    TemplateTest(HashMap<String, std::pair<String, uint64_t>> a)
    5555
     56    SetVideoLayerID(WebCore::GraphicsLayer::PlatformLayerID videoLayerID)
     57
    5658#if PLATFORM(MAC)
    5759    DidCreateWebProcessConnection(IPC::MachPort connectionIdentifier)
Note: See TracChangeset for help on using the changeset viewer.