Changeset 191137 in webkit


Ignore:
Timestamp:
Oct 15, 2015, 2:27:15 PM (10 years ago)
Author:
andersca@apple.com
Message:

CTTE menu proxies
https://bugs.webkit.org/show_bug.cgi?id=150187

Reviewed by Tim Horton.

  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::showPopupMenu):
(WebKit::WebPageProxy::internalShowContextMenu):

  • UIProcess/WebPopupMenuProxy.h:

(WebKit::WebPopupMenuProxy::WebPopupMenuProxy):

  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::createPopupMenuProxy):
(WebKit::PageClientImpl::createContextMenuProxy): Deleted.

  • UIProcess/mac/PageClientImpl.h:
  • UIProcess/mac/PageClientImpl.mm:

(WebKit::PageClientImpl::createPopupMenuProxy):
(WebKit::PageClientImpl::createContextMenuProxy):

  • UIProcess/mac/WebContextMenuProxyMac.h:

(WebKit::WebContextMenuProxyMac::create):
(WebKit::WebContextMenuProxyMac::page):

  • UIProcess/mac/WebContextMenuProxyMac.mm:

(WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
(WebKit::WebContextMenuProxyMac::~WebContextMenuProxyMac):
(WebKit::WebContextMenuProxyMac::contextMenuItemSelected):

  • UIProcess/mac/WebPopupMenuProxyMac.h:

(WebKit::WebPopupMenuProxyMac::create):

  • UIProcess/mac/WebPopupMenuProxyMac.mm:

(WebKit::WebPopupMenuProxyMac::WebPopupMenuProxyMac):

Location:
trunk/Source/WebKit2
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r191136 r191137  
     12015-10-15  Anders Carlsson  <andersca@apple.com>
     2
     3        CTTE menu proxies
     4        https://bugs.webkit.org/show_bug.cgi?id=150187
     5
     6        Reviewed by Tim Horton.
     7
     8        * UIProcess/PageClient.h:
     9        * UIProcess/WebPageProxy.cpp:
     10        (WebKit::WebPageProxy::showPopupMenu):
     11        (WebKit::WebPageProxy::internalShowContextMenu):
     12        * UIProcess/WebPopupMenuProxy.h:
     13        (WebKit::WebPopupMenuProxy::WebPopupMenuProxy):
     14        * UIProcess/ios/PageClientImplIOS.h:
     15        * UIProcess/ios/PageClientImplIOS.mm:
     16        (WebKit::PageClientImpl::createPopupMenuProxy):
     17        (WebKit::PageClientImpl::createContextMenuProxy): Deleted.
     18        * UIProcess/mac/PageClientImpl.h:
     19        * UIProcess/mac/PageClientImpl.mm:
     20        (WebKit::PageClientImpl::createPopupMenuProxy):
     21        (WebKit::PageClientImpl::createContextMenuProxy):
     22        * UIProcess/mac/WebContextMenuProxyMac.h:
     23        (WebKit::WebContextMenuProxyMac::create):
     24        (WebKit::WebContextMenuProxyMac::page):
     25        * UIProcess/mac/WebContextMenuProxyMac.mm:
     26        (WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
     27        (WebKit::WebContextMenuProxyMac::~WebContextMenuProxyMac):
     28        (WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
     29        * UIProcess/mac/WebPopupMenuProxyMac.h:
     30        (WebKit::WebPopupMenuProxyMac::create):
     31        * UIProcess/mac/WebPopupMenuProxyMac.mm:
     32        (WebKit::WebPopupMenuProxyMac::WebPopupMenuProxyMac):
     33
    1342015-10-15  Anders Carlsson  <andersca@apple.com>
    235
  • trunk/Source/WebKit2/UIProcess/PageClient.h

    r190823 r191137  
    220220#endif
    221221
    222     virtual RefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy*) = 0;
    223     virtual RefPtr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy*) = 0;
     222    virtual RefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy&) = 0;
     223    virtual RefPtr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy&) = 0;
    224224
    225225#if ENABLE(INPUT_TYPE_COLOR)
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp

    r191131 r191137  
    41494149    }
    41504150
    4151     m_activePopupMenu = m_pageClient.createPopupMenuProxy(this);
     4151    m_activePopupMenu = m_pageClient.createPopupMenuProxy(*this);
    41524152
    41534153    if (!m_activePopupMenu)
     
    42034203    }
    42044204
    4205     m_activeContextMenu = m_pageClient.createContextMenuProxy(this);
     4205    m_activeContextMenu = m_pageClient.createContextMenuProxy(*this);
    42064206    if (!m_activeContextMenu)
    42074207        return;
  • trunk/Source/WebKit2/UIProcess/WebPopupMenuProxy.h

    r184962 r191137  
    7272
    7373protected:
    74     explicit WebPopupMenuProxy(Client* client)
    75         : m_client(client)
     74    explicit WebPopupMenuProxy(Client& client)
     75        : m_client(&client)
    7676    {
    7777    }
  • trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h

    r189274 r191137  
    9696    virtual void doneWithTouchEvent(const NativeWebTouchEvent&, bool wasEventHandled) override;
    9797#endif
    98     virtual RefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy*) override;
     98    virtual RefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy&) override;
    9999    virtual RefPtr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy*) override;
    100100    virtual void setTextIndicator(Ref<WebCore::TextIndicator>, WebCore::TextIndicatorWindowLifetime) override;
  • trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm

    r189274 r191137  
    431431#endif
    432432
    433 RefPtr<WebPopupMenuProxy> PageClientImpl::createPopupMenuProxy(WebPageProxy*)
    434 {
    435     notImplemented();
     433RefPtr<WebPopupMenuProxy> PageClientImpl::createPopupMenuProxy(WebPageProxy&)
     434{
    436435    return nullptr;
    437436}
     
    439438RefPtr<WebContextMenuProxy> PageClientImpl::createContextMenuProxy(WebPageProxy*)
    440439{
    441     notImplemented();
    442440    return nullptr;
    443441}
  • trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h

    r190823 r191137  
    121121    virtual void doneWithKeyEvent(const NativeWebKeyboardEvent&, bool wasEventHandled) override;
    122122
    123     virtual RefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy*) override;
    124     virtual RefPtr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy*) override;
     123    virtual RefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy&) override;
     124    virtual RefPtr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy&) override;
    125125
    126126#if ENABLE(INPUT_TYPE_COLOR)
  • trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm

    r190828 r191137  
    488488}
    489489
    490 RefPtr<WebPopupMenuProxy> PageClientImpl::createPopupMenuProxy(WebPageProxy* page)
     490RefPtr<WebPopupMenuProxy> PageClientImpl::createPopupMenuProxy(WebPageProxy& page)
    491491{
    492492    return WebPopupMenuProxyMac::create(m_wkView, page);
    493493}
    494494
    495 RefPtr<WebContextMenuProxy> PageClientImpl::createContextMenuProxy(WebPageProxy* page)
     495RefPtr<WebContextMenuProxy> PageClientImpl::createContextMenuProxy(WebPageProxy& page)
    496496{
    497497    return WebContextMenuProxyMac::create(m_wkView, page);
  • trunk/Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.h

    r185637 r191137  
    4444class WebContextMenuProxyMac : public WebContextMenuProxy {
    4545public:
    46     static Ref<WebContextMenuProxyMac> create(WKView* webView, WebPageProxy* page)
     46    static Ref<WebContextMenuProxyMac> create(WKView* webView, WebPageProxy& page)
    4747    {
    4848        return adoptRef(*new WebContextMenuProxyMac(webView, page));
     
    6161#endif
    6262
    63     WebPageProxy& page() const { return *m_page; }
     63    WebPageProxy& page() const { return m_page; }
    6464    NSWindow *window() const;
    6565
    6666private:
    67     WebContextMenuProxyMac(WKView*, WebPageProxy*);
     67    WebContextMenuProxyMac(WKView*, WebPageProxy&);
    6868
    6969    void populate(const Vector<RefPtr<WebContextMenuItem>>&, const ContextMenuContextData&);
     
    7878#endif
    7979    WKView* m_webView;
    80     WebPageProxy* m_page;
     80    WebPageProxy& m_page;
    8181};
    8282
  • trunk/Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.mm

    r185922 r191137  
    151151namespace WebKit {
    152152
    153 WebContextMenuProxyMac::WebContextMenuProxyMac(WKView* webView, WebPageProxy* page)
     153WebContextMenuProxyMac::WebContextMenuProxyMac(WKView* webView, WebPageProxy& page)
    154154    : m_webView(webView)
    155155    , m_page(page)
    156156{
    157     ASSERT(m_page);
    158157}
    159158
    160159WebContextMenuProxyMac::~WebContextMenuProxyMac()
    161160{
    162     if (m_popup)
    163         [m_popup setControlView:nil];
     161    [m_popup setControlView:nil];
    164162}
    165163
     
    170168#endif
    171169
    172     m_page->contextMenuItemSelected(item);
     170    m_page.contextMenuItemSelected(item);
    173171}
    174172
  • trunk/Source/WebKit2/UIProcess/mac/WebPopupMenuProxyMac.h

    r185637 r191137  
    4141class WebPopupMenuProxyMac : public WebPopupMenuProxy {
    4242public:
    43     static Ref<WebPopupMenuProxyMac> create(WKView *webView, WebPopupMenuProxy::Client* client)
     43    static Ref<WebPopupMenuProxyMac> create(WKView *webView, WebPopupMenuProxy::Client& client)
    4444    {
    4545        return adoptRef(*new WebPopupMenuProxyMac(webView, client));
     
    5252
    5353private:
    54     WebPopupMenuProxyMac(WKView *, WebPopupMenuProxy::Client*);
     54    WebPopupMenuProxyMac(WKView *, WebPopupMenuProxy::Client&);
    5555
    5656    void populate(const Vector<WebPopupItem>&, NSFont *, WebCore::TextDirection);
  • trunk/Source/WebKit2/UIProcess/mac/WebPopupMenuProxyMac.mm

    r181686 r191137  
    4141namespace WebKit {
    4242
    43 WebPopupMenuProxyMac::WebPopupMenuProxyMac(WKView *webView, WebPopupMenuProxy::Client* client)
     43WebPopupMenuProxyMac::WebPopupMenuProxyMac(WKView *webView, WebPopupMenuProxy::Client& client)
    4444    : WebPopupMenuProxy(client)
    4545    , m_webView(webView)
Note: See TracChangeset for help on using the changeset viewer.