Changeset 191137 in webkit
- Timestamp:
- Oct 15, 2015, 2:27:15 PM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r191136 r191137 1 2015-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 1 34 2015-10-15 Anders Carlsson <andersca@apple.com> 2 35 -
trunk/Source/WebKit2/UIProcess/PageClient.h
r190823 r191137 220 220 #endif 221 221 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; 224 224 225 225 #if ENABLE(INPUT_TYPE_COLOR) -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r191131 r191137 4149 4149 } 4150 4150 4151 m_activePopupMenu = m_pageClient.createPopupMenuProxy( this);4151 m_activePopupMenu = m_pageClient.createPopupMenuProxy(*this); 4152 4152 4153 4153 if (!m_activePopupMenu) … … 4203 4203 } 4204 4204 4205 m_activeContextMenu = m_pageClient.createContextMenuProxy( this);4205 m_activeContextMenu = m_pageClient.createContextMenuProxy(*this); 4206 4206 if (!m_activeContextMenu) 4207 4207 return; -
trunk/Source/WebKit2/UIProcess/WebPopupMenuProxy.h
r184962 r191137 72 72 73 73 protected: 74 explicit WebPopupMenuProxy(Client *client)75 : m_client( client)74 explicit WebPopupMenuProxy(Client& client) 75 : m_client(&client) 76 76 { 77 77 } -
trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h
r189274 r191137 96 96 virtual void doneWithTouchEvent(const NativeWebTouchEvent&, bool wasEventHandled) override; 97 97 #endif 98 virtual RefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy *) override;98 virtual RefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy&) override; 99 99 virtual RefPtr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy*) override; 100 100 virtual void setTextIndicator(Ref<WebCore::TextIndicator>, WebCore::TextIndicatorWindowLifetime) override; -
trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm
r189274 r191137 431 431 #endif 432 432 433 RefPtr<WebPopupMenuProxy> PageClientImpl::createPopupMenuProxy(WebPageProxy*) 434 { 435 notImplemented(); 433 RefPtr<WebPopupMenuProxy> PageClientImpl::createPopupMenuProxy(WebPageProxy&) 434 { 436 435 return nullptr; 437 436 } … … 439 438 RefPtr<WebContextMenuProxy> PageClientImpl::createContextMenuProxy(WebPageProxy*) 440 439 { 441 notImplemented();442 440 return nullptr; 443 441 } -
trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h
r190823 r191137 121 121 virtual void doneWithKeyEvent(const NativeWebKeyboardEvent&, bool wasEventHandled) override; 122 122 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; 125 125 126 126 #if ENABLE(INPUT_TYPE_COLOR) -
trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm
r190828 r191137 488 488 } 489 489 490 RefPtr<WebPopupMenuProxy> PageClientImpl::createPopupMenuProxy(WebPageProxy *page)490 RefPtr<WebPopupMenuProxy> PageClientImpl::createPopupMenuProxy(WebPageProxy& page) 491 491 { 492 492 return WebPopupMenuProxyMac::create(m_wkView, page); 493 493 } 494 494 495 RefPtr<WebContextMenuProxy> PageClientImpl::createContextMenuProxy(WebPageProxy *page)495 RefPtr<WebContextMenuProxy> PageClientImpl::createContextMenuProxy(WebPageProxy& page) 496 496 { 497 497 return WebContextMenuProxyMac::create(m_wkView, page); -
trunk/Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.h
r185637 r191137 44 44 class WebContextMenuProxyMac : public WebContextMenuProxy { 45 45 public: 46 static Ref<WebContextMenuProxyMac> create(WKView* webView, WebPageProxy *page)46 static Ref<WebContextMenuProxyMac> create(WKView* webView, WebPageProxy& page) 47 47 { 48 48 return adoptRef(*new WebContextMenuProxyMac(webView, page)); … … 61 61 #endif 62 62 63 WebPageProxy& page() const { return *m_page; }63 WebPageProxy& page() const { return m_page; } 64 64 NSWindow *window() const; 65 65 66 66 private: 67 WebContextMenuProxyMac(WKView*, WebPageProxy *);67 WebContextMenuProxyMac(WKView*, WebPageProxy&); 68 68 69 69 void populate(const Vector<RefPtr<WebContextMenuItem>>&, const ContextMenuContextData&); … … 78 78 #endif 79 79 WKView* m_webView; 80 WebPageProxy *m_page;80 WebPageProxy& m_page; 81 81 }; 82 82 -
trunk/Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.mm
r185922 r191137 151 151 namespace WebKit { 152 152 153 WebContextMenuProxyMac::WebContextMenuProxyMac(WKView* webView, WebPageProxy *page)153 WebContextMenuProxyMac::WebContextMenuProxyMac(WKView* webView, WebPageProxy& page) 154 154 : m_webView(webView) 155 155 , m_page(page) 156 156 { 157 ASSERT(m_page);158 157 } 159 158 160 159 WebContextMenuProxyMac::~WebContextMenuProxyMac() 161 160 { 162 if (m_popup) 163 [m_popup setControlView:nil]; 161 [m_popup setControlView:nil]; 164 162 } 165 163 … … 170 168 #endif 171 169 172 m_page ->contextMenuItemSelected(item);170 m_page.contextMenuItemSelected(item); 173 171 } 174 172 -
trunk/Source/WebKit2/UIProcess/mac/WebPopupMenuProxyMac.h
r185637 r191137 41 41 class WebPopupMenuProxyMac : public WebPopupMenuProxy { 42 42 public: 43 static Ref<WebPopupMenuProxyMac> create(WKView *webView, WebPopupMenuProxy::Client *client)43 static Ref<WebPopupMenuProxyMac> create(WKView *webView, WebPopupMenuProxy::Client& client) 44 44 { 45 45 return adoptRef(*new WebPopupMenuProxyMac(webView, client)); … … 52 52 53 53 private: 54 WebPopupMenuProxyMac(WKView *, WebPopupMenuProxy::Client *);54 WebPopupMenuProxyMac(WKView *, WebPopupMenuProxy::Client&); 55 55 56 56 void populate(const Vector<WebPopupItem>&, NSFont *, WebCore::TextDirection); -
trunk/Source/WebKit2/UIProcess/mac/WebPopupMenuProxyMac.mm
r181686 r191137 41 41 namespace WebKit { 42 42 43 WebPopupMenuProxyMac::WebPopupMenuProxyMac(WKView *webView, WebPopupMenuProxy::Client *client)43 WebPopupMenuProxyMac::WebPopupMenuProxyMac(WKView *webView, WebPopupMenuProxy::Client& client) 44 44 : WebPopupMenuProxy(client) 45 45 , m_webView(webView)
Note:
See TracChangeset
for help on using the changeset viewer.