More WebKit2 header cleanup
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 May 2017 09:04:27 +0000 (09:04 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 May 2017 09:04:27 +0000 (09:04 +0000)
https://bugs.webkit.org/show_bug.cgi?id=172214

Reviewed by Simon Fraser.

* Shared/WebFindOptions.h:
* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
* UIProcess/Cocoa/WebViewImpl.mm:
* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
* UIProcess/UserMediaPermissionRequestManagerProxy.h:
* UIProcess/UserMediaPermissionRequestProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setCompositionAsync):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/PageClientImpl.mm:
* UIProcess/mac/ViewGestureControllerMac.mm:
* WebProcess/ApplePay/WebPaymentCoordinator.cpp:
* WebProcess/Automation/WebAutomationSessionProxy.cpp:
* WebProcess/InjectedBundle/API/c/WKBundlePageEditorClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageFullScreenClient.h:
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
* WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.h:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
* WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h:
* WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.h:
* WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
* WebProcess/Notifications/WebNotificationManager.cpp:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
* WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
* WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
* WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
* WebProcess/WebCoreSupport/WebValidationMessageClient.cpp:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::setDeviceScaleFactor):
(WebKit::WebPage::centerSelectionInVisibleArea):
(WebKit::WebPage::findString):
(WebKit::WebPage::findStringMatches):
(WebKit::WebPage::getImageForFindMatch):
(WebKit::WebPage::selectFindMatch):
(WebKit::WebPage::hideFindUI):
(WebKit::WebPage::countStringMatches):
(WebKit::WebPage::didReceiveGeolocationPermissionDecision):
(WebKit::WebPage::mainFrameDidLayout):
(WebKit::WebPage::setCompositionAsync):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::findController):
(WebKit::WebPage::geolocationPermissionRequestManager):
* WebProcess/WebPage/WebURLSchemeTaskProxy.cpp:
Many small changes added up to a few percent. Removing UserMediaRequest
from UserMediaPermissionRequestProxy, which is included into WebPageProxy.h,
was worth another ~10% because it got VM.h out of WebPageProxy.h (like the
previous patch did with WebPage.h). In total, in my measurement (WebKit2
clean debug build) this is a ~15% speedup.

We really should figure out how to make DOMPromise.h not bring in all of
JavaScriptCore (or how to use promises without including DOMPromise.h in headers).

* Modules/mediastream/UserMediaController.cpp:
* Modules/mediastream/UserMediaController.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217041 268f45cc-cd09-0410-ab3c-d52691b4dbfc

42 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/UserMediaController.cpp
Source/WebCore/Modules/mediastream/UserMediaController.h
Source/WebCore/editing/VisibleSelection.h
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebFindOptions.h
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm
Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm
Source/WebKit2/UIProcess/UserMediaPermissionRequestManagerProxy.cpp
Source/WebKit2/UIProcess/UserMediaPermissionRequestManagerProxy.h
Source/WebKit2/UIProcess/UserMediaPermissionRequestProxy.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm
Source/WebKit2/UIProcess/ios/ViewGestureControllerIOS.mm
Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm
Source/WebKit2/UIProcess/ios/WKPDFView.mm
Source/WebKit2/UIProcess/mac/PageClientImpl.mm
Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm
Source/WebKit2/WebProcess/ApplePay/WebPaymentCoordinator.cpp
Source/WebKit2/WebProcess/Automation/WebAutomationSessionProxy.cpp
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageEditorClient.h
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageFullScreenClient.h
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.h
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.h
Source/WebKit2/WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp
Source/WebKit2/WebProcess/Notifications/WebNotificationManager.cpp
Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebGeolocationClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebValidationMessageClient.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h
Source/WebKit2/WebProcess/WebPage/WebURLSchemeTaskProxy.cpp

index 7c05577..1cadcf1 100644 (file)
@@ -1,3 +1,13 @@
+2017-05-18  Tim Horton  <timothy_horton@apple.com>
+
+        More WebKit2 header cleanup
+        https://bugs.webkit.org/show_bug.cgi?id=172214
+
+        Reviewed by Simon Fraser.
+
+        * Modules/mediastream/UserMediaController.cpp:
+        * Modules/mediastream/UserMediaController.h:
+
 2017-05-16  Yusuke Suzuki  <utatane.tea@gmail.com>
 
         [JSC][DFG][DOMJIT] Extend CheckDOM to CheckSubClass
index 1991e1f..8e1aba7 100644 (file)
@@ -27,6 +27,8 @@
 
 #if ENABLE(MEDIA_STREAM)
 
+#include "UserMediaRequest.h"
+
 namespace WebCore {
 
 const char* UserMediaController::supplementName()
index 707fd8e..fd7c965 100644 (file)
 
 #include "Page.h"
 #include "UserMediaClient.h"
-#include "UserMediaRequest.h"
 
 namespace WebCore {
 
+class UserMediaRequest;
+
 class UserMediaController : public Supplement<Page> {
 public:
     explicit UserMediaController(UserMediaClient*);
index 045f572..c171091 100644 (file)
@@ -33,7 +33,7 @@ namespace WebCore {
 class Position;
 
 const EAffinity SEL_DEFAULT_AFFINITY = DOWNSTREAM;
-enum SelectionDirection { DirectionForward, DirectionBackward, DirectionRight, DirectionLeft };
+enum SelectionDirection : uint8_t { DirectionForward, DirectionBackward, DirectionRight, DirectionLeft };
 
 class VisibleSelection {
 public:
index e10f247..1359f4a 100644 (file)
@@ -1,3 +1,66 @@
+2017-05-18  Tim Horton  <timothy_horton@apple.com>
+
+        More WebKit2 header cleanup
+        https://bugs.webkit.org/show_bug.cgi?id=172214
+
+        Reviewed by Simon Fraser.
+
+        * Shared/WebFindOptions.h:
+        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
+        * UIProcess/Cocoa/WebViewImpl.mm:
+        * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
+        * UIProcess/UserMediaPermissionRequestManagerProxy.h:
+        * UIProcess/UserMediaPermissionRequestProxy.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::setCompositionAsync):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/mac/PageClientImpl.mm:
+        * UIProcess/mac/ViewGestureControllerMac.mm:
+        * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
+        * WebProcess/Automation/WebAutomationSessionProxy.cpp:
+        * WebProcess/InjectedBundle/API/c/WKBundlePageEditorClient.h:
+        * WebProcess/InjectedBundle/API/c/WKBundlePageFullScreenClient.h:
+        * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
+        * WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.h:
+        * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
+        * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h:
+        * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.h:
+        * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
+        * WebProcess/Notifications/WebNotificationManager.cpp:
+        * WebProcess/Plugins/PDF/PDFPlugin.mm:
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
+        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        * WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
+        * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
+        * WebProcess/WebCoreSupport/WebValidationMessageClient.cpp:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::WebPage):
+        (WebKit::WebPage::setDeviceScaleFactor):
+        (WebKit::WebPage::centerSelectionInVisibleArea):
+        (WebKit::WebPage::findString):
+        (WebKit::WebPage::findStringMatches):
+        (WebKit::WebPage::getImageForFindMatch):
+        (WebKit::WebPage::selectFindMatch):
+        (WebKit::WebPage::hideFindUI):
+        (WebKit::WebPage::countStringMatches):
+        (WebKit::WebPage::didReceiveGeolocationPermissionDecision):
+        (WebKit::WebPage::mainFrameDidLayout):
+        (WebKit::WebPage::setCompositionAsync):
+        * WebProcess/WebPage/WebPage.h:
+        (WebKit::WebPage::findController):
+        (WebKit::WebPage::geolocationPermissionRequestManager):
+        * WebProcess/WebPage/WebURLSchemeTaskProxy.cpp:
+        Many small changes added up to a few percent. Removing UserMediaRequest
+        from UserMediaPermissionRequestProxy, which is included into WebPageProxy.h,
+        was worth another ~10% because it got VM.h out of WebPageProxy.h (like the
+        previous patch did with WebPage.h). In total, in my measurement (WebKit2
+        clean debug build) this is a ~15% speedup.
+
+        We really should figure out how to make DOMPromise.h not bring in all of
+        JavaScriptCore (or how to use promises without including DOMPromise.h in headers).
+
 2017-05-17  Chris Dumez  <cdumez@apple.com>
 
         Fix unsafe lambda capture in ContentRuleListStore::lookupContentRuleList()
index bda7c33..b0bf643 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef WebFindOptions_h
-#define WebFindOptions_h
+#pragma once
 
 namespace WebKit {
 
-enum FindOptions {
+enum FindOptions : uint16_t {
     FindOptionsCaseInsensitive = 1 << 0,
     FindOptionsAtWordStarts = 1 << 1,
     FindOptionsTreatMedialCapitalAsWordStart = 1 << 2,
@@ -41,5 +40,3 @@ enum FindOptions {
 };
 
 } // namespace WebKit
-
-#endif // WebFindOptions_h
index 6b38f75..3fe7892 100644 (file)
 #import <WebCore/TextStream.h>
 #import <WebCore/URLParser.h>
 #import <WebCore/ValidationBubble.h>
+#import <WebCore/ViewportArguments.h>
 #import <WebCore/WritingMode.h>
 #import <wtf/BlockPtr.h>
 #import <wtf/HashMap.h>
index b97ed25..6129ad9 100644 (file)
@@ -29,6 +29,7 @@
 #if PLATFORM(IOS) && HAVE(AVKIT) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
 
 #import "APIUIClient.h"
+#import "DrawingAreaProxy.h"
 #import "WebPageProxy.h"
 #import "WebPlaybackSessionManagerProxy.h"
 #import "WebProcessProxy.h"
index c225164..05c4a52 100644 (file)
@@ -29,6 +29,7 @@
 #if PLATFORM(MAC)
 
 #import "APILegacyContextHistoryClient.h"
+#import "AttributedString.h"
 #import "ColorSpaceData.h"
 #import "FullscreenClient.h"
 #import "GenericCallback.h"
index e32f11d..c61ad1d 100644 (file)
@@ -30,6 +30,7 @@
 #include <WebCore/MockRealtimeMediaSourceCenter.h>
 #include <WebCore/RealtimeMediaSource.h>
 #include <WebCore/SecurityOriginData.h>
+#include <WebCore/UserMediaRequest.h>
 
 #if ENABLE(MEDIA_STREAM) && USE(AVFOUNDATION)
 #include <WebCore/RealtimeMediaSourceCenterMac.h>
index 0bb75df..35f597f 100644 (file)
@@ -23,7 +23,6 @@
 #include "UserMediaPermissionRequestProxy.h"
 #include <WebCore/SecurityOrigin.h>
 #include <WebCore/Timer.h>
-#include <WebCore/UserMediaRequest.h>
 #include <wtf/HashMap.h>
 #include <wtf/Seconds.h>
 
index 2ba1109..89f6101 100644 (file)
@@ -20,7 +20,6 @@
 #pragma once
 
 #include "APIObject.h"
-#include <WebCore/UserMediaRequest.h>
 #include <wtf/Vector.h>
 #include <wtf/text/WTFString.h>
 
index 8f687ec..a88a7a3 100644 (file)
@@ -6344,7 +6344,7 @@ void WebPageProxy::firstRectForCharacterRangeAsync(const EditingRange& range, st
     process().send(Messages::WebPage::FirstRectForCharacterRangeAsync(range, callbackID), m_pageID);
 }
 
-void WebPageProxy::setCompositionAsync(const String& text, Vector<CompositionUnderline> underlines, const EditingRange& selectionRange, const EditingRange& replacementRange)
+void WebPageProxy::setCompositionAsync(const String& text, const Vector<CompositionUnderline>& underlines, const EditingRange& selectionRange, const EditingRange& replacementRange)
 {
     if (!isValid()) {
         // If this fails, we should call -discardMarkedText on input context to notify the input method.
index 7aaa263..7aaff2e 100644 (file)
@@ -32,7 +32,6 @@
 #include "ContextMenuContextData.h"
 #include "DownloadID.h"
 #include "DragControllerAction.h"
-#include "DrawingAreaProxy.h"
 #include "EditingRange.h"
 #include "EditorState.h"
 #include "GeolocationPermissionRequestManagerProxy.h"
 #include <WebCore/DragActions.h>
 #include <WebCore/EventTrackingRegions.h>
 #include <WebCore/FrameLoaderTypes.h>
-#include <WebCore/FrameView.h>
-#include <WebCore/HitTestResult.h>
+#include <WebCore/FrameView.h> // FIXME: Move LayoutViewportConstraint to its own file and stop including this.
+#include <WebCore/LayoutPoint.h>
+#include <WebCore/LayoutSize.h>
 #include <WebCore/MediaProducer.h>
-#include <WebCore/Page.h>
 #include <WebCore/PlatformScreen.h>
 #include <WebCore/ScrollTypes.h>
 #include <WebCore/SearchPopupMenu.h>
 #include <WebCore/TextChecking.h>
 #include <WebCore/TextGranularity.h>
 #include <WebCore/UserInterfaceLayoutDirection.h>
-#include <WebCore/VisibleSelection.h>
 #include <memory>
 #include <wtf/HashMap.h>
 #include <wtf/HashSet.h>
@@ -104,14 +102,6 @@ OBJC_CLASS _WKRemoteObjectRegistry;
 #include "LayerRepresentation.h"
 #endif
 
-#if PLATFORM(MAC)
-#include "AttributedString.h"
-#endif
-
-#if PLATFORM(IOS)
-#include "ProcessThrottler.h"
-#endif
-
 #if PLATFORM(GTK)
 #include "ArgumentCodersGtk.h"
 #endif
@@ -171,6 +161,8 @@ struct TextCheckingResult;
 struct ViewportAttributes;
 struct WindowFeatures;
 
+enum SelectionDirection : uint8_t;
+
 enum class AutoplayEvent;
 enum class HasInsecureContent;
 enum class NotificationDirection;
@@ -186,6 +178,7 @@ typedef GtkWidget* PlatformWidget;
 
 namespace WebKit {
 class CertificateInfo;
+class DrawingAreaProxy;
 class NativeWebGestureEvent;
 class NativeWebKeyboardEvent;
 class NativeWebMouseEvent;
@@ -597,7 +590,7 @@ public:
     void getSelectedRangeAsync(std::function<void (EditingRange, CallbackBase::Error)>);
     void characterIndexForPointAsync(const WebCore::IntPoint&, std::function<void (uint64_t, CallbackBase::Error)>);
     void firstRectForCharacterRangeAsync(const EditingRange&, std::function<void (const WebCore::IntRect&, const EditingRange&, CallbackBase::Error)>);
-    void setCompositionAsync(const String& text, Vector<WebCore::CompositionUnderline> underlines, const EditingRange& selectionRange, const EditingRange& replacementRange);
+    void setCompositionAsync(const String& text, const Vector<WebCore::CompositionUnderline>& underlines, const EditingRange& selectionRange, const EditingRange& replacementRange);
     void confirmCompositionAsync();
 
     void setScrollPerformanceDataCollectionEnabled(bool);
index cd840c2..c005c63 100644 (file)
@@ -31,6 +31,7 @@
 #import "APIData.h"
 #import "DataReference.h"
 #import "DownloadProxy.h"
+#import "DrawingAreaProxy.h"
 #import "InteractionInformationAtPosition.h"
 #import "NativeWebKeyboardEvent.h"
 #import "NavigationState.h"
index 9350b6c..346bb54 100644 (file)
@@ -28,6 +28,7 @@
 
 #if PLATFORM(IOS)
 
+#import "DrawingAreaProxy.h"
 #import "UIKitSPI.h"
 #import "ViewGestureControllerMessages.h"
 #import "ViewGestureGeometryCollectorMessages.h"
index 528eab3..66f08f1 100644 (file)
@@ -79,6 +79,7 @@
 #import <WebCore/SoftLinking.h>
 #import <WebCore/TextIndicator.h>
 #import <WebCore/TextStream.h>
+#import <WebCore/VisibleSelection.h>
 #import <WebCore/WebCoreNSURLExtras.h>
 #import <WebCore/WebEvent.h>
 #import <WebKit/WebSelectionRect.h> // FIXME: WK2 should not include WebKit headers!
index 7f6455a..d556fae 100644 (file)
@@ -32,6 +32,7 @@
 #import "APIUIClient.h"
 #import "ApplicationStateTracker.h"
 #import "CorePDFSPI.h"
+#import "DrawingAreaProxy.h"
 #import "SessionState.h"
 #import "UIKitSPI.h"
 #import "WKPDFPageNumberIndicator.h"
index 0a5aab5..da8505e 100644 (file)
@@ -32,6 +32,7 @@
 #import "ColorSpaceData.h"
 #import "DataReference.h"
 #import "DownloadProxy.h"
+#import "DrawingAreaProxy.h"
 #import "NativeWebGestureEvent.h"
 #import "NativeWebKeyboardEvent.h"
 #import "NativeWebMouseEvent.h"
index 029900e..3cc305e 100644 (file)
@@ -28,6 +28,7 @@
 
 #if PLATFORM(MAC)
 
+#import "DrawingAreaProxy.h"
 #import "FrameLoadState.h"
 #import "Logging.h"
 #import "NativeWebWheelEvent.h"
index 9402aeb..0ca9c93 100644 (file)
@@ -29,6 +29,7 @@
 #if ENABLE(APPLE_PAY)
 
 #include "DataReference.h"
+#include "WebCoreArgumentCoders.h"
 #include "WebPage.h"
 #include "WebPaymentCoordinatorMessages.h"
 #include "WebPaymentCoordinatorProxyMessages.h"
index 43a74e4..f4ccca8 100644 (file)
@@ -30,6 +30,7 @@
 #include "WebAutomationSessionMessages.h"
 #include "WebAutomationSessionProxyMessages.h"
 #include "WebAutomationSessionProxyScriptSource.h"
+#include "WebCoreArgumentCoders.h"
 #include "WebFrame.h"
 #include "WebImage.h"
 #include "WebPage.h"
index 998e3e8..59c6e8d 100644 (file)
@@ -52,12 +52,6 @@ enum {
 };
 typedef uint32_t WKInputFieldActionType;
 
-enum {
-    WKFullScreenNoKeyboard,
-    WKFullScreenKeyboard,
-};
-typedef uint32_t WKFullScreenKeyboardRequestType;
-
 typedef bool (*WKBundlePageShouldBeginEditingCallback)(WKBundlePageRef page, WKBundleRangeHandleRef range, const void* clientInfo);
 typedef bool (*WKBundlePageShouldEndEditingCallback)(WKBundlePageRef page, WKBundleRangeHandleRef range, const void* clientInfo);
 typedef bool (*WKBundlePageShouldInsertNodeCallback)(WKBundlePageRef page, WKBundleNodeHandleRef node, WKBundleRangeHandleRef rangeToReplace, WKInsertActionType action, const void* clientInfo);
index 687fb12..6716d8b 100644 (file)
 #include <WebKit/WKBase.h>
 #include <WebKit/WKGeometry.h>
 
+enum {
+    WKFullScreenNoKeyboard,
+    WKFullScreenKeyboard,
+};
+typedef uint32_t WKFullScreenKeyboardRequestType;
+
 typedef bool (*WKBundlePageSupportsFullScreen)(WKBundlePageRef page, WKFullScreenKeyboardRequestType requestType);
 typedef void (*WKBundlePageEnterFullScreenForElement)(WKBundlePageRef page, WKBundleNodeHandleRef element);
 typedef void (*WKBundlePageExitFullScreenForElement)(WKBundlePageRef page, WKBundleNodeHandleRef element);
index 9a3263a..b8c3b59 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef InjectedBundlePageContextMenuClient_h
-#define InjectedBundlePageContextMenuClient_h
+#pragma once
 
 #if ENABLE(CONTEXT_MENUS)
 
 #include "APIClient.h"
 #include "APIInjectedBundlePageContextMenuClient.h"
-#include "WKBundlePage.h"
+#include "WKBundlePageContextMenuClient.h"
 
 namespace API {
 class Object;
@@ -61,4 +60,3 @@ private:
 } // namespace WebKit
 
 #endif // ENABLE(CONTEXT_MENUS)
-#endif // InjectedBundlePageEditorClient_h
index 8b62c4e..6563b6c 100644 (file)
@@ -29,8 +29,7 @@
 #if ENABLE(FULLSCREEN_API)
 
 #include "APIClient.h"
-#include "WKBundlePage.h"
-#include "WebEvent.h"
+#include "WKBundlePageFullScreenClient.h"
 #include <wtf/Forward.h>
 
 namespace API {
index 033f5ce..5d5f5e6 100644 (file)
 #define InjectedBundlePageLoaderClient_h
 
 #include "APIClient.h"
-#include "APIString.h"
-#include "APIURL.h"
 #include "SameDocumentNavigationType.h"
-#include "WKBundlePage.h"
-#include <JavaScriptCore/JSBase.h>
+#include "WKBundlePageLoaderClient.h"
 #include <WebCore/LayoutMilestones.h>
 #include <wtf/Forward.h>
 #include <wtf/Vector.h>
 
 namespace API {
 class Object;
+class String;
+class URL;
 
 template<> struct ClientTraits<WKBundlePageLoaderClientBase> {
     typedef std::tuple<WKBundlePageLoaderClientV0, WKBundlePageLoaderClientV1, WKBundlePageLoaderClientV2, WKBundlePageLoaderClientV3, WKBundlePageLoaderClientV4, WKBundlePageLoaderClientV5, WKBundlePageLoaderClientV6, WKBundlePageLoaderClientV7, WKBundlePageLoaderClientV8> Versions;
@@ -47,11 +46,11 @@ template<> struct ClientTraits<WKBundlePageLoaderClientBase> {
 namespace WebCore {
 class DOMWindowExtension;
 class DOMWrapperWorld;
-class URL;
 class ResourceError;
 class ResourceRequest;
 class ResourceResponse;
 class SharedBuffer;
+class URL;
 }
 
 namespace WebKit {
index 7ef2d14..dc15d49 100644 (file)
 #define InjectedBundlePagePolicyClient_h
 
 #include "APIClient.h"
-#include "APIObject.h"
-#include "WKBundlePage.h"
+#include "WKBundlePagePolicyClient.h"
 #include <wtf/Forward.h>
 
 namespace API {
+class Object;
+
 template<> struct ClientTraits<WKBundlePagePolicyClientBase> {
     typedef std::tuple<WKBundlePagePolicyClientV0> Versions;
 };
 }
 
 namespace WebCore {
-    class ResourceError;
-    class ResourceRequest;
-    class ResourceResponse;
+class ResourceError;
+class ResourceRequest;
+class ResourceResponse;
 }
 
 namespace WebKit {
index da0ce22..684c87b 100644 (file)
@@ -28,8 +28,7 @@
 
 #include "APIClient.h"
 #include "SameDocumentNavigationType.h"
-#include "WKBundlePage.h"
-#include <JavaScriptCore/JSBase.h>
+#include "WKBundlePageResourceLoadClient.h"
 #include <wtf/Forward.h>
 
 namespace API {
index efda64d..cbc4fa6 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "WebNotificationManager.h"
 
+#include "WebCoreArgumentCoders.h"
 #include "WebPage.h"
 #include "WebProcess.h"
 #include "WebProcessCreationParameters.h"
index 1acb22e..4d7ed05 100644 (file)
@@ -40,6 +40,7 @@
 #import "WebCoreArgumentCoders.h"
 #import "WebEvent.h"
 #import "WebEventConversion.h"
+#import "WebFindOptions.h"
 #import "WebPage.h"
 #import "WebPageProxyMessages.h"
 #import "WebPasteboardProxyMessages.h"
index 86f6013..1271824 100644 (file)
@@ -30,6 +30,7 @@
 #include "APIArray.h"
 #include "APISecurityOrigin.h"
 #include "DrawingArea.h"
+#include "FindController.h"
 #include "HangDetectionDisabler.h"
 #include "InjectedBundleNavigationAction.h"
 #include "InjectedBundleNodeHandle.h"
index a5f3440..61e357f 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "WebDiagnosticLoggingClient.h"
 
+#include "WebCoreArgumentCoders.h"
 #include "WebPage.h"
 #include "WebPageProxyMessages.h"
 #include <WebCore/Settings.h>
index 8e26d9c..4aab194 100644 (file)
@@ -27,6 +27,7 @@
 #include "WebEditorClient.h"
 
 #include "EditorState.h"
+#include "WKBundlePageEditorClient.h"
 #include "WebCoreArgumentCoders.h"
 #include "WebFrame.h"
 #include "WebPage.h"
index 5781c86..1c2ba47 100644 (file)
@@ -29,6 +29,7 @@
 #include "AuthenticationManager.h"
 #include "DataReference.h"
 #include "DrawingArea.h"
+#include "FindController.h"
 #include "InjectedBundle.h"
 #include "InjectedBundleBackForwardListItem.h"
 #include "InjectedBundleDOMWindowExtension.h"
index cf16bc6..8e5dab1 100644 (file)
@@ -28,6 +28,7 @@
 
 #if ENABLE(GEOLOCATION)
 
+#include "GeolocationPermissionRequestManager.h"
 #include "WebGeolocationManager.h"
 #include "WebPage.h"
 #include "WebProcess.h"
index 8e6df34..d145f64 100644 (file)
@@ -23,6 +23,7 @@
 #include "config.h"
 #include "WebSearchPopupMenu.h"
 
+#include "WebCoreArgumentCoders.h"
 #include "WebPage.h"
 #include "WebPageProxyMessages.h"
 #include "WebProcess.h"
index dcba2bb..87823b7 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "WebValidationMessageClient.h"
 
+#include "WebCoreArgumentCoders.h"
 #include "WebPage.h"
 #include "WebPageProxyMessages.h"
 #include <WebCore/Element.h>
index 73528d7..559fece 100644 (file)
@@ -38,6 +38,8 @@
 #include "DrawingAreaMessages.h"
 #include "EditorState.h"
 #include "EventDispatcher.h"
+#include "FindController.h"
+#include "GeolocationPermissionRequestManager.h"
 #include "InjectedBundle.h"
 #include "InjectedBundleBackForwardList.h"
 #include "InjectedBundleScriptWorld.h"
@@ -58,6 +60,7 @@
 #include "SessionTracker.h"
 #include "ShareableBitmap.h"
 #include "UserMediaPermissionRequestManager.h"
+#include "ViewGestureGeometryCollector.h"
 #include "VisitedLinkTableController.h"
 #include "WKBundleAPICast.h"
 #include "WKRetainPtr.h"
@@ -325,7 +328,7 @@ WebPage::WebPage(uint64_t pageID, WebPageCreationParameters&& parameters)
 #endif
     , m_layerHostingMode(parameters.layerHostingMode)
 #if PLATFORM(COCOA)
-    , m_viewGestureGeometryCollector(*this)
+    , m_viewGestureGeometryCollector(makeUniqueRef<ViewGestureGeometryCollector>(*this))
 #elif HAVE(ACCESSIBILITY) && PLATFORM(GTK)
     , m_accessibilityObject(nullptr)
 #endif
@@ -336,10 +339,10 @@ WebPage::WebPage(uint64_t pageID, WebPageCreationParameters&& parameters)
     , m_editorClient { std::make_unique<API::InjectedBundle::EditorClient>() }
     , m_formClient(std::make_unique<API::InjectedBundle::FormClient>())
     , m_uiClient(std::make_unique<API::InjectedBundle::PageUIClient>())
-    , m_findController(this)
+    , m_findController(makeUniqueRef<FindController>(this))
     , m_userContentController(WebUserContentController::getOrCreate(parameters.userContentControllerID))
 #if ENABLE(GEOLOCATION)
-    , m_geolocationPermissionRequestManager(this)
+    , m_geolocationPermissionRequestManager(makeUniqueRef<GeolocationPermissionRequestManager>(this))
 #endif
 #if ENABLE(MEDIA_STREAM)
     , m_userMediaPermissionRequestManager { std::make_unique<UserMediaPermissionRequestManager>(*this) }
@@ -1685,10 +1688,10 @@ void WebPage::setDeviceScaleFactor(float scaleFactor)
     updateHeaderAndFooterLayersForDeviceScaleChange(scaleFactor);
 #endif
 
-    if (m_findController.isShowingOverlay()) {
+    if (findController().isShowingOverlay()) {
         // We must have updated layout to get the selection rects right.
         layoutIfNeeded();
-        m_findController.deviceScaleFactorDidChange();
+        findController().deviceScaleFactorDidChange();
     }
 
 #if USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER)
@@ -2531,7 +2534,7 @@ void WebPage::centerSelectionInVisibleArea()
 {
     Frame& frame = m_page->focusController().focusedOrMainFrame();
     frame.selection().revealSelection(SelectionRevealMode::Reveal, ScrollAlignment::alignCenterAlways);
-    m_findController.showFindIndicatorInSelection();
+    findController().showFindIndicatorInSelection();
 }
 
 bool WebPage::isControlledByAutomation() const
@@ -3761,32 +3764,32 @@ bool WebPage::findStringFromInjectedBundle(const String& target, FindOptions opt
 
 void WebPage::findString(const String& string, uint32_t options, uint32_t maxMatchCount)
 {
-    m_findController.findString(string, static_cast<FindOptions>(options), maxMatchCount);
+    findController().findString(string, static_cast<FindOptions>(options), maxMatchCount);
 }
 
 void WebPage::findStringMatches(const String& string, uint32_t options, uint32_t maxMatchCount)
 {
-    m_findController.findStringMatches(string, static_cast<FindOptions>(options), maxMatchCount);
+    findController().findStringMatches(string, static_cast<FindOptions>(options), maxMatchCount);
 }
 
 void WebPage::getImageForFindMatch(uint32_t matchIndex)
 {
-    m_findController.getImageForFindMatch(matchIndex);
+    findController().getImageForFindMatch(matchIndex);
 }
 
 void WebPage::selectFindMatch(uint32_t matchIndex)
 {
-    m_findController.selectFindMatch(matchIndex);
+    findController().selectFindMatch(matchIndex);
 }
 
 void WebPage::hideFindUI()
 {
-    m_findController.hideFindUI();
+    findController().hideFindUI();
 }
 
 void WebPage::countStringMatches(const String& string, uint32_t options, uint32_t maxMatchCount)
 {
-    m_findController.countStringMatches(string, static_cast<FindOptions>(options), maxMatchCount);
+    findController().countStringMatches(string, static_cast<FindOptions>(options), maxMatchCount);
 }
 
 void WebPage::didChangeSelectedIndexForActivePopupMenu(int32_t newIndex)
@@ -3850,7 +3853,7 @@ void WebPage::extendSandboxForFileFromOpenPanel(const SandboxExtension::Handle&
 #if ENABLE(GEOLOCATION)
 void WebPage::didReceiveGeolocationPermissionDecision(uint64_t geolocationID, bool allowed)
 {
-    m_geolocationPermissionRequestManager.didReceiveGeolocationPermissionDecision(geolocationID, allowed);
+    geolocationPermissionRequestManager().didReceiveGeolocationPermissionDecision(geolocationID, allowed);
 }
 #endif
 
@@ -4044,7 +4047,7 @@ void WebPage::mainFrameDidLayout()
     }
 
 #if PLATFORM(MAC)
-    m_viewGestureGeometryCollector.mainFrameDidLayout();
+    m_viewGestureGeometryCollector->mainFrameDidLayout();
 #endif
 #if PLATFORM(IOS)
     if (FrameView* frameView = mainFrameView()) {
@@ -4052,7 +4055,7 @@ void WebPage::mainFrameDidLayout()
         if (m_viewportConfiguration.setContentsSize(newContentSize))
             viewportConfigurationChanged();
     }
-    m_findController.redraw();
+    findController().redraw();
 #endif
 }
 
@@ -4897,7 +4900,7 @@ void WebPage::firstRectForCharacterRangeAsync(const EditingRange& editingRange,
     send(Messages::WebPageProxy::RectForCharacterRangeCallback(result, editingRange, callbackID));
 }
 
-void WebPage::setCompositionAsync(const String& text, Vector<CompositionUnderline> underlines, const EditingRange& selection, const EditingRange& replacementEditingRange)
+void WebPage::setCompositionAsync(const String& text, const Vector<CompositionUnderline>& underlines, const EditingRange& selection, const EditingRange& replacementEditingRange)
 {
     Frame& frame = m_page->focusController().focusedOrMainFrame();
 
index f9e424f..b719c0f 100644 (file)
@@ -31,8 +31,7 @@
 #include "APIInjectedBundlePageUIClient.h"
 #include "APIObject.h"
 #include "EditingRange.h"
-#include "FindController.h"
-#include "GeolocationPermissionRequestManager.h"
+#include "InjectedBundlePageContextMenuClient.h"
 #include "InjectedBundlePageFullScreenClient.h"
 #include "InjectedBundlePageLoaderClient.h"
 #include "InjectedBundlePagePolicyClient.h"
 #include "MessageSender.h"
 #include "Plugin.h"
 #include "SandboxExtension.h"
+#include "SharedMemory.h"
 #include "UserData.h"
 #include "WebURLSchemeHandler.h"
 #include <WebCore/ActivityState.h>
+#include <WebCore/DictionaryPopupInfo.h>
 #include <WebCore/FrameLoaderTypes.h>
 #include <WebCore/HysteresisActivity.h>
 #include <WebCore/IntRect.h>
 #include <WebKitAdditions/PlatformGestureEventMac.h>
 #endif
 
-#if ENABLE(CONTEXT_MENUS)
-#include "InjectedBundlePageContextMenuClient.h"
-#endif
-
 #if PLATFORM(COCOA)
-#include "ViewGestureGeometryCollector.h"
 #include <wtf/RetainPtr.h>
 OBJC_CLASS CALayer;
 OBJC_CLASS NSArray;
@@ -115,7 +111,9 @@ class Connection;
 }
 
 namespace WebCore {
+class CaptureDevice;
 class DocumentLoader;
+class DragData;
 class GraphicsContext;
 class Frame;
 class FrameSelection;
@@ -130,13 +128,17 @@ class PrintContext;
 class Range;
 class ResourceResponse;
 class ResourceRequest;
+class SelectionRect;
 class SharedBuffer;
 class SubstituteData;
 class TextCheckingRequest;
 class URL;
+class VisiblePosition;
 class VisibleSelection;
 enum class TextIndicatorPresentationTransition : uint8_t;
 enum SyntheticClickType : int8_t;
+struct CompositionUnderline;
+struct DictationAlternative;
 struct Highlight;
 struct KeypressCommand;
 struct TextCheckingResult;
@@ -150,7 +152,9 @@ class MediaPlayerRequestInstallMissingPluginsCallback;
 namespace WebKit {
 class DrawingArea;
 class DownloadID;
+class FindController;
 class GamepadData;
+class GeolocationPermissionRequestManager;
 class InjectedBundleBackForwardList;
 class MediaDeviceSandboxExtensions;
 class NotificationPermissionRequestManager;
@@ -159,6 +163,7 @@ class PageBanner;
 class PluginView;
 class RemoteWebInspectorUI;
 class UserMediaPermissionRequestManager;
+class ViewGestureGeometryCollector;
 class VisibleContentRectUpdateInfo;
 class WebColorChooser;
 class WebContextMenu;
@@ -185,10 +190,10 @@ class WebUndoStep;
 class WebUserContentController;
 class WebVideoFullscreenManager;
 class WebWheelEvent;
+enum FindOptions : uint16_t;
 struct AssistedNodeInformation;
 struct AttributedString;
 struct BackForwardListItemState;
-struct EditingRange;
 struct EditorState;
 struct InteractionInformationAtPosition;
 struct InteractionInformationRequest;
@@ -200,6 +205,7 @@ struct WebPreferencesStore;
 struct WebSelectionData;
 
 typedef uint32_t SnapshotOptions;
+typedef uint32_t WKEventModifiers;
 
 #if PLATFORM(COCOA)
 class RemoteLayerTreeTransaction;
@@ -488,10 +494,10 @@ public:
 
     static const WebEvent* currentEvent();
 
-    FindController& findController() { return m_findController; }
+    FindController& findController() { return m_findController.get(); }
 
 #if ENABLE(GEOLOCATION)
-    GeolocationPermissionRequestManager& geolocationPermissionRequestManager() { return m_geolocationPermissionRequestManager; }
+    GeolocationPermissionRequestManager& geolocationPermissionRequestManager() { return m_geolocationPermissionRequestManager.get(); }
 #endif
 
 #if PLATFORM(IOS)
@@ -671,7 +677,7 @@ public:
     void getSelectedRangeAsync(uint64_t callbackID);
     void characterIndexForPointAsync(const WebCore::IntPoint&, uint64_t callbackID);
     void firstRectForCharacterRangeAsync(const EditingRange&, uint64_t callbackID);
-    void setCompositionAsync(const String& text, Vector<WebCore::CompositionUnderline> underlines, const EditingRange& selectionRange, const EditingRange& replacementRange);
+    void setCompositionAsync(const String& text, const Vector<WebCore::CompositionUnderline>& underlines, const EditingRange& selectionRange, const EditingRange& replacementRange);
     void confirmCompositionAsync();
 
 #if PLATFORM(MAC)
@@ -1344,7 +1350,7 @@ private:
     
     RetainPtr<WKAccessibilityWebPageObject> m_mockAccessibilityElement;
 
-    ViewGestureGeometryCollector m_viewGestureGeometryCollector;
+    UniqueRef<ViewGestureGeometryCollector> m_viewGestureGeometryCollector;
 
     RetainPtr<NSDictionary> m_dataDetectionContext;
 
@@ -1380,7 +1386,7 @@ private:
     InjectedBundlePageFullScreenClient m_fullScreenClient;
 #endif
 
-    FindController m_findController;
+    UniqueRef<FindController> m_findController;
 
     RefPtr<WebInspector> m_inspector;
     RefPtr<WebInspectorUI> m_inspectorUI;
@@ -1409,7 +1415,7 @@ private:
     Ref<WebUserContentController> m_userContentController;
 
 #if ENABLE(GEOLOCATION)
-    GeolocationPermissionRequestManager m_geolocationPermissionRequestManager;
+    UniqueRef<GeolocationPermissionRequestManager> m_geolocationPermissionRequestManager;
 #endif
 
 #if ENABLE(MEDIA_STREAM)
index f1767bc..01d74e5 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "WebURLSchemeTaskProxy.h"
 
+#include "WebCoreArgumentCoders.h"
 #include "WebPage.h"
 #include "WebPageProxyMessages.h"
 #include "WebURLSchemeHandlerProxy.h"