Title: [221102] trunk/Source/WebKit
Revision
221102
Author
[email protected]
Date
2017-08-23 14:08:28 -0700 (Wed, 23 Aug 2017)

Log Message

Clean up UIClients
https://bugs.webkit.org/show_bug.cgi?id=175906

Reviewed by Tim Horton.

There were some unnecessary checks to see if the client implements something,
when the default behavior is to do nothing if the client doesn't implement the callback.
Also, make some overrides finals and fix some spacing.

* UIProcess/API/APIUIClient.h:
(API::UIClient::didNotHandleKeyEvent):
(API::UIClient::implementsDidNotHandleKeyEvent const): Deleted.
(API::UIClient::implementsDidNotHandleWheelEvent const): Deleted.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveEvent):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (221101 => 221102)


--- trunk/Source/WebKit/ChangeLog	2017-08-23 21:04:46 UTC (rev 221101)
+++ trunk/Source/WebKit/ChangeLog	2017-08-23 21:08:28 UTC (rev 221102)
@@ -1,5 +1,26 @@
 2017-08-23  Alex Christensen  <[email protected]>
 
+        Clean up UIClients
+        https://bugs.webkit.org/show_bug.cgi?id=175906
+
+        Reviewed by Tim Horton.
+
+        There were some unnecessary checks to see if the client implements something,
+        when the default behavior is to do nothing if the client doesn't implement the callback.
+        Also, make some overrides finals and fix some spacing.
+
+        * UIProcess/API/APIUIClient.h:
+        (API::UIClient::didNotHandleKeyEvent):
+        (API::UIClient::implementsDidNotHandleKeyEvent const): Deleted.
+        (API::UIClient::implementsDidNotHandleWheelEvent const): Deleted.
+        * UIProcess/API/C/WKPage.cpp:
+        (WKPageSetPageUIClient):
+        * UIProcess/Cocoa/UIDelegate.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::didReceiveEvent):
+
+2017-08-23  Alex Christensen  <[email protected]>
+
         Add WKUIDelegatePrivate callbacks corresponding to WKPageUIClient's takeFocus, focus, and unfocus
         https://bugs.webkit.org/show_bug.cgi?id=175896
 

Modified: trunk/Source/WebKit/UIProcess/API/APIUIClient.h (221101 => 221102)


--- trunk/Source/WebKit/UIProcess/API/APIUIClient.h	2017-08-23 21:04:46 UTC (rev 221101)
+++ trunk/Source/WebKit/UIProcess/API/APIUIClient.h	2017-08-23 21:08:28 UTC (rev 221102)
@@ -96,10 +96,7 @@
     virtual void unavailablePluginButtonClicked(WebKit::WebPageProxy*, WKPluginUnavailabilityReason, Dictionary*) { }
 #endif // ENABLE(NETSCAPE_PLUGIN_API)
 
-    virtual bool implementsDidNotHandleKeyEvent() const { return false; }
     virtual void didNotHandleKeyEvent(WebKit::WebPageProxy*, const WebKit::NativeWebKeyboardEvent&) { }
-
-    virtual bool implementsDidNotHandleWheelEvent() const { return false; }
     virtual void didNotHandleWheelEvent(WebKit::WebPageProxy*, const WebKit::NativeWebWheelEvent&) { }
 
     virtual bool toolbarsAreVisible(WebKit::WebPageProxy*) { return true; }

Modified: trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp (221101 => 221102)


--- trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp	2017-08-23 21:04:46 UTC (rev 221101)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp	2017-08-23 21:08:28 UTC (rev 221102)
@@ -1612,7 +1612,7 @@
             return nullptr;
         }
 
-        void showPage(WebPageProxy* page) override
+        void showPage(WebPageProxy* page) final
         {
             if (!m_client.showPage)
                 return;
@@ -1620,7 +1620,7 @@
             m_client.showPage(toAPI(page), m_client.base.clientInfo);
         }
 
-        void fullscreenMayReturnToInline(WebPageProxy* page) override
+        void fullscreenMayReturnToInline(WebPageProxy* page) final
         {
             if (!m_client.fullscreenMayReturnToInline)
                 return;
@@ -1628,7 +1628,7 @@
             m_client.fullscreenMayReturnToInline(toAPI(page), m_client.base.clientInfo);
         }
         
-        void hasVideoInPictureInPictureDidChange(WebPageProxy* page, bool hasVideoInPictureInPicture) override
+        void hasVideoInPictureInPictureDidChange(WebPageProxy* page, bool hasVideoInPictureInPicture) final
         {
             if (!m_client.hasVideoInPictureInPictureDidChange)
                 return;
@@ -1636,7 +1636,7 @@
             m_client.hasVideoInPictureInPictureDidChange(toAPI(page), hasVideoInPictureInPicture, m_client.base.clientInfo);
         }
 
-        void didExceedBackgroundResourceLimitWhileInForeground(WebPageProxy& page, WKResourceLimit limit) override
+        void didExceedBackgroundResourceLimitWhileInForeground(WebPageProxy& page, WKResourceLimit limit) final
         {
             if (!m_client.didExceedBackgroundResourceLimitWhileInForeground)
                 return;
@@ -1644,7 +1644,7 @@
             m_client.didExceedBackgroundResourceLimitWhileInForeground(toAPI(&page), limit, m_client.base.clientInfo);
         }
 
-        void close(WebPageProxy* page) override
+        void close(WebPageProxy* page) final
         {
             if (!m_client.close)
                 return;
@@ -1652,7 +1652,7 @@
             m_client.close(toAPI(page), m_client.base.clientInfo);
         }
 
-        void takeFocus(WebPageProxy* page, WKFocusDirection direction) override
+        void takeFocus(WebPageProxy* page, WKFocusDirection direction) final
         {
             if (!m_client.takeFocus)
                 return;
@@ -1660,7 +1660,7 @@
             m_client.takeFocus(toAPI(page), direction, m_client.base.clientInfo);
         }
 
-        void focus(WebPageProxy* page) override
+        void focus(WebPageProxy* page) final
         {
             if (!m_client.focus)
                 return;
@@ -1668,7 +1668,7 @@
             m_client.focus(toAPI(page), m_client.base.clientInfo);
         }
 
-        void unfocus(WebPageProxy* page) override
+        void unfocus(WebPageProxy* page) final
         {
             if (!m_client.unfocus)
                 return;
@@ -1676,7 +1676,7 @@
             m_client.unfocus(toAPI(page), m_client.base.clientInfo);
         }
 
-        void runJavaScriptAlert(WebPageProxy* page, const String& message, WebFrameProxy* frame, const SecurityOriginData& securityOriginData, Function<void ()>&& completionHandler) override
+        void runJavaScriptAlert(WebPageProxy* page, const String& message, WebFrameProxy* frame, const SecurityOriginData& securityOriginData, Function<void()>&& completionHandler) final
         {
             if (m_client.runJavaScriptAlert) {
                 RefPtr<RunJavaScriptAlertResultListener> listener = RunJavaScriptAlertResultListener::create(WTFMove(completionHandler));
@@ -1702,7 +1702,7 @@
             completionHandler();
         }
 
-        void runJavaScriptConfirm(WebPageProxy* page, const String& message, WebFrameProxy* frame, const SecurityOriginData& securityOriginData, Function<void (bool)>&& completionHandler) override
+        void runJavaScriptConfirm(WebPageProxy* page, const String& message, WebFrameProxy* frame, const SecurityOriginData& securityOriginData, Function<void(bool)>&& completionHandler) final
         {
             if (m_client.runJavaScriptConfirm) {
                 RefPtr<RunJavaScriptConfirmResultListener> listener = RunJavaScriptConfirmResultListener::create(WTFMove(completionHandler));
@@ -1729,7 +1729,7 @@
             completionHandler(false);
         }
 
-        void runJavaScriptPrompt(WebPageProxy* page, const String& message, const String& defaultValue, WebFrameProxy* frame, const SecurityOriginData& securityOriginData, Function<void (const String&)>&& completionHandler) override
+        void runJavaScriptPrompt(WebPageProxy* page, const String& message, const String& defaultValue, WebFrameProxy* frame, const SecurityOriginData& securityOriginData, Function<void(const String&)>&& completionHandler) final
         {
             if (m_client.runJavaScriptPrompt) {
                 RefPtr<RunJavaScriptPromptResultListener> listener = RunJavaScriptPromptResultListener::create(WTFMove(completionHandler));
@@ -1762,7 +1762,7 @@
             completionHandler(String());
         }
 
-        void setStatusText(WebPageProxy* page, const String& text) override
+        void setStatusText(WebPageProxy* page, const String& text) final
         {
             if (!m_client.setStatusText)
                 return;
@@ -1770,7 +1770,7 @@
             m_client.setStatusText(toAPI(page), toAPI(text.impl()), m_client.base.clientInfo);
         }
 
-        void mouseDidMoveOverElement(WebPageProxy* page, const WebHitTestResultData& data, WebKit::WebEvent::Modifiers modifiers, API::Object* userData) override
+        void mouseDidMoveOverElement(WebPageProxy* page, const WebHitTestResultData& data, WebKit::WebEvent::Modifiers modifiers, API::Object* userData) final
         {
             if (!m_client.mouseDidMoveOverElement && !m_client.mouseDidMoveOverElement_deprecatedForUseWithV0)
                 return;
@@ -1788,7 +1788,7 @@
         }
 
 #if ENABLE(NETSCAPE_PLUGIN_API)
-        void unavailablePluginButtonClicked(WebPageProxy* page, WKPluginUnavailabilityReason pluginUnavailabilityReason, API::Dictionary* pluginInformation) override
+        void unavailablePluginButtonClicked(WebPageProxy* page, WKPluginUnavailabilityReason pluginUnavailabilityReason, API::Dictionary* pluginInformation) final
         {
             if (pluginUnavailabilityReason == kWKPluginUnavailabilityReasonPluginMissing) {
                 if (m_client.missingPluginButtonClicked_deprecatedForUseWithV0)
@@ -1818,31 +1818,21 @@
         }
 #endif // ENABLE(NETSCAPE_PLUGIN_API)
 
-        bool implementsDidNotHandleKeyEvent() const override
+        void didNotHandleKeyEvent(WebPageProxy* page, const NativeWebKeyboardEvent& event) final
         {
-            return m_client.didNotHandleKeyEvent;
-        }
-
-        void didNotHandleKeyEvent(WebPageProxy* page, const NativeWebKeyboardEvent& event) override
-        {
             if (!m_client.didNotHandleKeyEvent)
                 return;
             m_client.didNotHandleKeyEvent(toAPI(page), event.nativeEvent(), m_client.base.clientInfo);
         }
 
-        bool implementsDidNotHandleWheelEvent() const override
+        void didNotHandleWheelEvent(WebPageProxy* page, const NativeWebWheelEvent& event) final
         {
-            return m_client.didNotHandleWheelEvent;
-        }
-
-        void didNotHandleWheelEvent(WebPageProxy* page, const NativeWebWheelEvent& event) override
-        {
             if (!m_client.didNotHandleWheelEvent)
                 return;
             m_client.didNotHandleWheelEvent(toAPI(page), event.nativeEvent(), m_client.base.clientInfo);
         }
 
-        bool toolbarsAreVisible(WebPageProxy* page) override
+        bool toolbarsAreVisible(WebPageProxy* page) final
         {
             if (!m_client.toolbarsAreVisible)
                 return true;
@@ -1849,7 +1839,7 @@
             return m_client.toolbarsAreVisible(toAPI(page), m_client.base.clientInfo);
         }
 
-        void setToolbarsAreVisible(WebPageProxy* page, bool visible) override
+        void setToolbarsAreVisible(WebPageProxy* page, bool visible) final
         {
             if (!m_client.setToolbarsAreVisible)
                 return;
@@ -1856,7 +1846,7 @@
             m_client.setToolbarsAreVisible(toAPI(page), visible, m_client.base.clientInfo);
         }
 
-        bool menuBarIsVisible(WebPageProxy* page) override
+        bool menuBarIsVisible(WebPageProxy* page) final
         {
             if (!m_client.menuBarIsVisible)
                 return true;
@@ -1863,7 +1853,7 @@
             return m_client.menuBarIsVisible(toAPI(page), m_client.base.clientInfo);
         }
 
-        void setMenuBarIsVisible(WebPageProxy* page, bool visible) override
+        void setMenuBarIsVisible(WebPageProxy* page, bool visible) final
         {
             if (!m_client.setMenuBarIsVisible)
                 return;
@@ -1870,7 +1860,7 @@
             m_client.setMenuBarIsVisible(toAPI(page), visible, m_client.base.clientInfo);
         }
 
-        bool statusBarIsVisible(WebPageProxy* page) override
+        bool statusBarIsVisible(WebPageProxy* page) final
         {
             if (!m_client.statusBarIsVisible)
                 return true;
@@ -1877,7 +1867,7 @@
             return m_client.statusBarIsVisible(toAPI(page), m_client.base.clientInfo);
         }
 
-        void setStatusBarIsVisible(WebPageProxy* page, bool visible) override
+        void setStatusBarIsVisible(WebPageProxy* page, bool visible) final
         {
             if (!m_client.setStatusBarIsVisible)
                 return;
@@ -1884,7 +1874,7 @@
             m_client.setStatusBarIsVisible(toAPI(page), visible, m_client.base.clientInfo);
         }
 
-        bool isResizable(WebPageProxy* page) override
+        bool isResizable(WebPageProxy* page) final
         {
             if (!m_client.isResizable)
                 return true;
@@ -1891,7 +1881,7 @@
             return m_client.isResizable(toAPI(page), m_client.base.clientInfo);
         }
 
-        void setIsResizable(WebPageProxy* page, bool resizable) override
+        void setIsResizable(WebPageProxy* page, bool resizable) final
         {
             if (!m_client.setIsResizable)
                 return;
@@ -1898,7 +1888,7 @@
             m_client.setIsResizable(toAPI(page), resizable, m_client.base.clientInfo);
         }
 
-        void setWindowFrame(WebPageProxy* page, const FloatRect& frame) override
+        void setWindowFrame(WebPageProxy* page, const FloatRect& frame) final
         {
             if (!m_client.setWindowFrame)
                 return;
@@ -1906,7 +1896,7 @@
             m_client.setWindowFrame(toAPI(page), toAPI(frame), m_client.base.clientInfo);
         }
 
-        FloatRect windowFrame(WebPageProxy* page) override
+        FloatRect windowFrame(WebPageProxy* page) final
         {
             if (!m_client.getWindowFrame)
                 return FloatRect();
@@ -1914,12 +1904,12 @@
             return toFloatRect(m_client.getWindowFrame(toAPI(page), m_client.base.clientInfo));
         }
 
-        bool canRunBeforeUnloadConfirmPanel() const override
+        bool canRunBeforeUnloadConfirmPanel() const final
         {
             return m_client.runBeforeUnloadConfirmPanel_deprecatedForUseWithV6 || m_client.runBeforeUnloadConfirmPanel;
         }
 
-        void runBeforeUnloadConfirmPanel(WebKit::WebPageProxy* page, const WTF::String& message, WebKit::WebFrameProxy* frame, const SecurityOriginData&, Function<void (bool)>&& completionHandler) override
+        void runBeforeUnloadConfirmPanel(WebKit::WebPageProxy* page, const WTF::String& message, WebKit::WebFrameProxy* frame, const SecurityOriginData&, Function<void(bool)>&& completionHandler) final
         {
             if (m_client.runBeforeUnloadConfirmPanel) {
                 RefPtr<RunBeforeUnloadConfirmPanelResultListener> listener = RunBeforeUnloadConfirmPanelResultListener::create(WTFMove(completionHandler));
@@ -1936,7 +1926,7 @@
             completionHandler(true);
         }
 
-        void pageDidScroll(WebPageProxy* page) override
+        void pageDidScroll(WebPageProxy* page) final
         {
             if (!m_client.pageDidScroll)
                 return;
@@ -1944,7 +1934,7 @@
             m_client.pageDidScroll(toAPI(page), m_client.base.clientInfo);
         }
 
-        void exceededDatabaseQuota(WebPageProxy* page, WebFrameProxy* frame, API::SecurityOrigin* origin, const String& databaseName, const String& databaseDisplayName, unsigned long long currentQuota, unsigned long long currentOriginUsage, unsigned long long currentDatabaseUsage, unsigned long long expectedUsage, Function<void (unsigned long long)>&& completionHandler) override
+        void exceededDatabaseQuota(WebPageProxy* page, WebFrameProxy* frame, API::SecurityOrigin* origin, const String& databaseName, const String& databaseDisplayName, unsigned long long currentQuota, unsigned long long currentOriginUsage, unsigned long long currentDatabaseUsage, unsigned long long expectedUsage, Function<void(unsigned long long)>&& completionHandler) final
         {
             if (!m_client.exceededDatabaseQuota) {
                 completionHandler(currentQuota);
@@ -1954,7 +1944,7 @@
             completionHandler(m_client.exceededDatabaseQuota(toAPI(page), toAPI(frame), toAPI(origin), toAPI(databaseName.impl()), toAPI(databaseDisplayName.impl()), currentQuota, currentOriginUsage, currentDatabaseUsage, expectedUsage, m_client.base.clientInfo));
         }
 
-        bool runOpenPanel(WebPageProxy* page, WebFrameProxy* frame, const WebCore::SecurityOriginData&, API::OpenPanelParameters* parameters, WebOpenPanelResultListenerProxy* listener) override
+        bool runOpenPanel(WebPageProxy* page, WebFrameProxy* frame, const WebCore::SecurityOriginData&, API::OpenPanelParameters* parameters, WebOpenPanelResultListenerProxy* listener) final
         {
             if (!m_client.runOpenPanel)
                 return false;
@@ -1963,7 +1953,7 @@
             return true;
         }
 
-        bool decidePolicyForGeolocationPermissionRequest(WebPageProxy* page, WebFrameProxy* frame, API::SecurityOrigin* origin, GeolocationPermissionRequestProxy* permissionRequest) override
+        bool decidePolicyForGeolocationPermissionRequest(WebPageProxy* page, WebFrameProxy* frame, API::SecurityOrigin* origin, GeolocationPermissionRequestProxy* permissionRequest) final
         {
             if (!m_client.decidePolicyForGeolocationPermissionRequest)
                 return false;
@@ -1972,7 +1962,7 @@
             return true;
         }
 
-        bool decidePolicyForUserMediaPermissionRequest(WebPageProxy& page, WebFrameProxy& frame, API::SecurityOrigin& userMediaDocumentOrigin, API::SecurityOrigin& topLevelDocumentOrigin, UserMediaPermissionRequestProxy& permissionRequest) override
+        bool decidePolicyForUserMediaPermissionRequest(WebPageProxy& page, WebFrameProxy& frame, API::SecurityOrigin& userMediaDocumentOrigin, API::SecurityOrigin& topLevelDocumentOrigin, UserMediaPermissionRequestProxy& permissionRequest) final
         {
             if (!m_client.decidePolicyForUserMediaPermissionRequest)
                 return false;
@@ -1981,7 +1971,7 @@
             return true;
         }
 
-        bool checkUserMediaPermissionForOrigin(WebPageProxy& page, WebFrameProxy& frame, API::SecurityOrigin& userMediaDocumentOrigin, API::SecurityOrigin& topLevelDocumentOrigin, UserMediaPermissionCheckProxy& request) override
+        bool checkUserMediaPermissionForOrigin(WebPageProxy& page, WebFrameProxy& frame, API::SecurityOrigin& userMediaDocumentOrigin, API::SecurityOrigin& topLevelDocumentOrigin, UserMediaPermissionCheckProxy& request) final
         {
             if (!m_client.checkUserMediaPermissionForOrigin)
                 return false;
@@ -1990,7 +1980,7 @@
             return true;
         }
         
-        bool decidePolicyForNotificationPermissionRequest(WebPageProxy* page, API::SecurityOrigin* origin, NotificationPermissionRequest* permissionRequest) override
+        bool decidePolicyForNotificationPermissionRequest(WebPageProxy* page, API::SecurityOrigin* origin, NotificationPermissionRequest* permissionRequest) final
         {
             if (!m_client.decidePolicyForNotificationPermissionRequest)
                 return false;
@@ -2000,7 +1990,7 @@
         }
 
         // Printing.
-        float headerHeight(WebPageProxy* page, WebFrameProxy* frame) override
+        float headerHeight(WebPageProxy* page, WebFrameProxy* frame) final
         {
             if (!m_client.headerHeight)
                 return 0;
@@ -2008,7 +1998,7 @@
             return m_client.headerHeight(toAPI(page), toAPI(frame), m_client.base.clientInfo);
         }
 
-        float footerHeight(WebPageProxy* page, WebFrameProxy* frame) override
+        float footerHeight(WebPageProxy* page, WebFrameProxy* frame) final
         {
             if (!m_client.footerHeight)
                 return 0;
@@ -2016,7 +2006,7 @@
             return m_client.footerHeight(toAPI(page), toAPI(frame), m_client.base.clientInfo);
         }
 
-        void drawHeader(WebPageProxy* page, WebFrameProxy* frame, const WebCore::FloatRect& rect) override
+        void drawHeader(WebPageProxy* page, WebFrameProxy* frame, const WebCore::FloatRect& rect) final
         {
             if (!m_client.drawHeader)
                 return;
@@ -2024,7 +2014,7 @@
             m_client.drawHeader(toAPI(page), toAPI(frame), toAPI(rect), m_client.base.clientInfo);
         }
 
-        void drawFooter(WebPageProxy* page, WebFrameProxy* frame, const WebCore::FloatRect& rect) override
+        void drawFooter(WebPageProxy* page, WebFrameProxy* frame, const WebCore::FloatRect& rect) final
         {
             if (!m_client.drawFooter)
                 return;
@@ -2032,7 +2022,7 @@
             m_client.drawFooter(toAPI(page), toAPI(frame), toAPI(rect), m_client.base.clientInfo);
         }
 
-        void printFrame(WebPageProxy* page, WebFrameProxy* frame) override
+        void printFrame(WebPageProxy* page, WebFrameProxy* frame) final
         {
             if (!m_client.printFrame)
                 return;
@@ -2040,12 +2030,12 @@
             m_client.printFrame(toAPI(page), toAPI(frame), m_client.base.clientInfo);
         }
 
-        bool canRunModal() const override
+        bool canRunModal() const final
         {
             return m_client.runModal;
         }
 
-        void runModal(WebPageProxy* page) override
+        void runModal(WebPageProxy* page) final
         {
             if (!m_client.runModal)
                 return;
@@ -2053,7 +2043,7 @@
             m_client.runModal(toAPI(page), m_client.base.clientInfo);
         }
 
-        void saveDataToFileInDownloadsFolder(WebPageProxy* page, const String& suggestedFilename, const String& mimeType, const String& originatingURLString, API::Data* data) override
+        void saveDataToFileInDownloadsFolder(WebPageProxy* page, const String& suggestedFilename, const String& mimeType, const String& originatingURLString, API::Data* data) final
         {
             if (!m_client.saveDataToFileInDownloadsFolder)
                 return;
@@ -2061,7 +2051,7 @@
             m_client.saveDataToFileInDownloadsFolder(toAPI(page), toAPI(suggestedFilename.impl()), toAPI(mimeType.impl()), toURLRef(originatingURLString.impl()), toAPI(data), m_client.base.clientInfo);
         }
 
-        void pinnedStateDidChange(WebPageProxy& page) override
+        void pinnedStateDidChange(WebPageProxy& page) final
         {
             if (!m_client.pinnedStateDidChange)
                 return;
@@ -2069,7 +2059,7 @@
             m_client.pinnedStateDidChange(toAPI(&page), m_client.base.clientInfo);
         }
 
-        void isPlayingAudioDidChange(WebPageProxy& page) override
+        void isPlayingAudioDidChange(WebPageProxy& page) final
         {
             if (!m_client.isPlayingAudioDidChange)
                 return;
@@ -2077,7 +2067,7 @@
             m_client.isPlayingAudioDidChange(toAPI(&page), m_client.base.clientInfo);
         }
 
-        void didClickAutoFillButton(WebPageProxy& page, API::Object* userInfo) override
+        void didClickAutoFillButton(WebPageProxy& page, API::Object* userInfo) final
         {
             if (!m_client.didClickAutoFillButton)
                 return;
@@ -2086,7 +2076,7 @@
         }
 
 #if ENABLE(MEDIA_SESSION)
-        void mediaSessionMetadataDidChange(WebPageProxy& page, WebMediaSessionMetadata* metadata) override
+        void mediaSessionMetadataDidChange(WebPageProxy& page, WebMediaSessionMetadata* metadata) final
         {
             if (!m_client.mediaSessionMetadataDidChange)
                 return;
@@ -2095,7 +2085,7 @@
         }
 #endif
 #if ENABLE(POINTER_LOCK)
-        void requestPointerLock(WebPageProxy* page) override
+        void requestPointerLock(WebPageProxy* page) final
         {
             if (!m_client.requestPointerLock)
                 return;
@@ -2103,7 +2093,7 @@
             m_client.requestPointerLock(toAPI(page), m_client.base.clientInfo);
         }
 
-        void didLosePointerLock(WebPageProxy* page) override
+        void didLosePointerLock(WebPageProxy* page) final
         {
             if (!m_client.didLosePointerLock)
                 return;
@@ -2137,7 +2127,7 @@
             RELEASE_ASSERT_NOT_REACHED();
         }
 
-        void handleAutoplayEvent(WebPageProxy& page, WebCore::AutoplayEvent event, OptionSet<WebCore::AutoplayEventFlags> flags) override
+        void handleAutoplayEvent(WebPageProxy& page, WebCore::AutoplayEvent event, OptionSet<WebCore::AutoplayEventFlags> flags) final
         {
             if (!m_client.handleAutoplayEvent)
                 return;

Modified: trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.h (221101 => 221102)


--- trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.h	2017-08-23 21:04:46 UTC (rev 221101)
+++ trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.h	2017-08-23 21:08:28 UTC (rev 221102)
@@ -66,7 +66,7 @@
 
     private:
         // API::ContextMenuClient
-        RetainPtr<NSMenu> menuFromProposedMenu(WebKit::WebPageProxy&, NSMenu *, const WebKit::WebHitTestResultData&, API::Object*) override;
+        RetainPtr<NSMenu> menuFromProposedMenu(WebPageProxy&, NSMenu *, const WebHitTestResultData&, API::Object*) override;
 
         UIDelegate& m_uiDelegate;
     };
@@ -84,47 +84,47 @@
         bool canCreateNewPageAsync() final;
         RefPtr<WebPageProxy> createNewPageCommon(WebPageProxy*, API::FrameInfo&, WebCore::ResourceRequest&&, const WebCore::WindowFeatures&, NavigationActionData&&, WTF::Function<void(RefPtr<WebPageProxy>&&)>&& completionHandler);
 
-        void close(WebKit::WebPageProxy*) override;
-        void fullscreenMayReturnToInline(WebKit::WebPageProxy*) override;
-        void didEnterFullscreen(WebKit::WebPageProxy*) override;
-        void didExitFullscreen(WebKit::WebPageProxy*) override;
-        void runJavaScriptAlert(WebKit::WebPageProxy*, const WTF::String&, WebKit::WebFrameProxy*, const WebCore::SecurityOriginData&, Function<void ()>&& completionHandler) override;
-        void runJavaScriptConfirm(WebKit::WebPageProxy*, const WTF::String&, WebKit::WebFrameProxy*, const WebCore::SecurityOriginData&, Function<void (bool)>&& completionHandler) override;
-        void runJavaScriptPrompt(WebKit::WebPageProxy*, const WTF::String&, const WTF::String&, WebKit::WebFrameProxy*, const WebCore::SecurityOriginData&, Function<void (const WTF::String&)>&& completionHandler) override;
+        void close(WebPageProxy*) final;
+        void fullscreenMayReturnToInline(WebPageProxy*) final;
+        void didEnterFullscreen(WebPageProxy*) final;
+        void didExitFullscreen(WebPageProxy*) final;
+        void runJavaScriptAlert(WebPageProxy*, const WTF::String&, WebFrameProxy*, const WebCore::SecurityOriginData&, Function<void()>&& completionHandler) final;
+        void runJavaScriptConfirm(WebPageProxy*, const WTF::String&, WebFrameProxy*, const WebCore::SecurityOriginData&, Function<void(bool)>&& completionHandler) final;
+        void runJavaScriptPrompt(WebPageProxy*, const WTF::String&, const WTF::String&, WebFrameProxy*, const WebCore::SecurityOriginData&, Function<void(const WTF::String&)>&& completionHandler) final;
         bool canRunBeforeUnloadConfirmPanel() const final;
-        void runBeforeUnloadConfirmPanel(WebKit::WebPageProxy*, const WTF::String&, WebKit::WebFrameProxy*, const WebCore::SecurityOriginData&, Function<void (bool)>&& completionHandler) final;
-        void exceededDatabaseQuota(WebPageProxy*, WebFrameProxy*, API::SecurityOrigin*, const WTF::String& databaseName, const WTF::String& displayName, unsigned long long currentQuota, unsigned long long currentOriginUsage, unsigned long long currentUsage, unsigned long long expectedUsage, Function<void (unsigned long long)>&& completionHandler) override;
-        void reachedApplicationCacheOriginQuota(WebPageProxy*, const WebCore::SecurityOrigin&, uint64_t currentQuota, uint64_t totalBytesNeeded, Function<void (unsigned long long)>&& completionHandler) override;
+        void runBeforeUnloadConfirmPanel(WebPageProxy*, const WTF::String&, WebFrameProxy*, const WebCore::SecurityOriginData&, Function<void(bool)>&& completionHandler) final;
+        void exceededDatabaseQuota(WebPageProxy*, WebFrameProxy*, API::SecurityOrigin*, const WTF::String& databaseName, const WTF::String& displayName, unsigned long long currentQuota, unsigned long long currentOriginUsage, unsigned long long currentUsage, unsigned long long expectedUsage, Function<void(unsigned long long)>&& completionHandler) final;
+        void reachedApplicationCacheOriginQuota(WebPageProxy*, const WebCore::SecurityOrigin&, uint64_t currentQuota, uint64_t totalBytesNeeded, Function<void(unsigned long long)>&& completionHandler) final;
 #if PLATFORM(MAC)
         void showPage(WebPageProxy*) final;
-        void takeFocus(WebKit::WebPageProxy*, WKFocusDirection) final;
-        void focus(WebKit::WebPageProxy*) final;
-        void unfocus(WebKit::WebPageProxy*) final;
-        bool runOpenPanel(WebPageProxy*, WebFrameProxy*, const WebCore::SecurityOriginData&, API::OpenPanelParameters*, WebOpenPanelResultListenerProxy*) override;
+        void takeFocus(WebPageProxy*, WKFocusDirection) final;
+        void focus(WebPageProxy*) final;
+        void unfocus(WebPageProxy*) final;
+        bool runOpenPanel(WebPageProxy*, WebFrameProxy*, const WebCore::SecurityOriginData&, API::OpenPanelParameters*, WebOpenPanelResultListenerProxy*) final;
 #endif
-        bool decidePolicyForUserMediaPermissionRequest(WebKit::WebPageProxy&, WebKit::WebFrameProxy&, API::SecurityOrigin&, API::SecurityOrigin&, WebKit::UserMediaPermissionRequestProxy&) override;
-        bool checkUserMediaPermissionForOrigin(WebKit::WebPageProxy&, WebKit::WebFrameProxy&, API::SecurityOrigin&, API::SecurityOrigin&, WebKit::UserMediaPermissionCheckProxy&) override;
-        void mediaCaptureStateDidChange(WebCore::MediaProducer::MediaStateFlags) override;
-        void printFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*) override;
+        bool decidePolicyForUserMediaPermissionRequest(WebPageProxy&, WebFrameProxy&, API::SecurityOrigin&, API::SecurityOrigin&, UserMediaPermissionRequestProxy&) final;
+        bool checkUserMediaPermissionForOrigin(WebPageProxy&, WebFrameProxy&, API::SecurityOrigin&, API::SecurityOrigin&, UserMediaPermissionCheckProxy&) final;
+        void mediaCaptureStateDidChange(WebCore::MediaProducer::MediaStateFlags) final;
+        void printFrame(WebPageProxy*, WebFrameProxy*) final;
 #if PLATFORM(IOS)
 #if HAVE(APP_LINKS)
-        bool shouldIncludeAppLinkActionsForElement(_WKActivatedElementInfo *) override;
+        bool shouldIncludeAppLinkActionsForElement(_WKActivatedElementInfo *) final;
 #endif
-        RetainPtr<NSArray> actionsForElement(_WKActivatedElementInfo *, RetainPtr<NSArray> defaultActions) override;
-        void didNotHandleTapAsClick(const WebCore::IntPoint&) override;
-        UIViewController *presentingViewController() override;
+        RetainPtr<NSArray> actionsForElement(_WKActivatedElementInfo *, RetainPtr<NSArray> defaultActions) final;
+        void didNotHandleTapAsClick(const WebCore::IntPoint&) final;
+        UIViewController *presentingViewController() final;
 #endif // PLATFORM(IOS)
 
-        NSDictionary *dataDetectionContext() override;
+        NSDictionary *dataDetectionContext() final;
 
 #if ENABLE(POINTER_LOCK)
-        void requestPointerLock(WebKit::WebPageProxy*) override;
-        void didLosePointerLock(WebKit::WebPageProxy*) override;
+        void requestPointerLock(WebPageProxy*) final;
+        void didLosePointerLock(WebPageProxy*) final;
 #endif
         
-        void hasVideoInPictureInPictureDidChange(WebKit::WebPageProxy*, bool) override;
+        void hasVideoInPictureInPictureDidChange(WebPageProxy*, bool) final;
 
-        void imageOrMediaDocumentSizeChanged(const WebCore::IntSize&) override;
+        void imageOrMediaDocumentSizeChanged(const WebCore::IntSize&) final;
 
         UIDelegate& m_uiDelegate;
     };

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (221101 => 221102)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2017-08-23 21:04:46 UTC (rev 221101)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2017-08-23 21:08:28 UTC (rev 221102)
@@ -4989,8 +4989,7 @@
 
         // FIXME: Dispatch additional events to the didNotHandleWheelEvent client function.
         if (!handled) {
-            if (m_uiClient->implementsDidNotHandleWheelEvent())
-                m_uiClient->didNotHandleWheelEvent(this, oldestCoalescedEvent->last());
+            m_uiClient->didNotHandleWheelEvent(this, oldestCoalescedEvent->last());
             m_pageClient.wheelEventWasNotHandledByWebCore(oldestCoalescedEvent->last());
         }
 
@@ -5026,8 +5025,7 @@
         if (handled)
             break;
 
-        if (m_uiClient->implementsDidNotHandleKeyEvent())
-            m_uiClient->didNotHandleKeyEvent(this, event);
+        m_uiClient->didNotHandleKeyEvent(this, event);
         break;
     }
 #if ENABLE(MAC_GESTURE_EVENTS)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to