Unreviewed, rolling out r239071.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Dec 2018 14:33:36 +0000 (14:33 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Dec 2018 14:33:36 +0000 (14:33 +0000)
https://bugs.webkit.org/show_bug.cgi?id=192588

Broke WPE build due to undefined references to toAPI() and
toImpl() inside the C API (Requested by magomez on #webkit).

Reverted changeset:

"[meta][WebKit] Remove using namespace WebCore and WebKit in
the global scope for unified source builds"
https://bugs.webkit.org/show_bug.cgi?id=192449
https://trac.webkit.org/changeset/239071

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

58 files changed:
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/Cookies/mac/WebCookieManagerMac.mm
Source/WebKit/NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp
Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.cpp
Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp
Source/WebKit/NetworkProcess/ios/NetworkProcessIOS.mm
Source/WebKit/NetworkProcess/mac/NetworkProcessMac.mm
Source/WebKit/NetworkProcess/mac/RemoteNetworkingContext.mm
Source/WebKit/PluginProcess/PluginControllerProxy.cpp
Source/WebKit/PluginProcess/PluginProcess.cpp
Source/WebKit/PluginProcess/WebProcessConnection.cpp
Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb
Source/WebKit/Shared/API/c/cf/WKErrorCF.cpp
Source/WebKit/Shared/API/c/cg/WKImageCG.cpp
Source/WebKit/Shared/ChildProcess.cpp
Source/WebKit/Shared/ContextMenuContextData.cpp
Source/WebKit/Shared/EditorState.cpp
Source/WebKit/Shared/Plugins/NPIdentifierData.cpp
Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm
Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp
Source/WebKit/Shared/SessionState.cpp
Source/WebKit/Shared/SessionTracker.cpp
Source/WebKit/Shared/ShareableBitmap.cpp
Source/WebKit/Shared/ShareableResource.cpp
Source/WebKit/Shared/VisibleContentRectUpdateInfo.cpp
Source/WebKit/Shared/WebBackForwardListItem.cpp
Source/WebKit/Shared/WebContextMenuItemData.cpp
Source/WebKit/Shared/WebCoreArgumentCoders.cpp
Source/WebKit/Shared/WebHitTestResultData.cpp
Source/WebKit/Shared/WebImage.cpp
Source/WebKit/Shared/WebMediaSessionMetadata.cpp
Source/WebKit/Shared/WebMemorySampler.cpp
Source/WebKit/Shared/WebMouseEvent.cpp
Source/WebKit/Shared/WebRenderObject.cpp
Source/WebKit/Shared/WebSQLiteDatabaseTracker.cpp
Source/WebKit/Shared/WebWheelEvent.cpp
Source/WebKit/Shared/cf/ArgumentCodersCF.cpp
Source/WebKit/Shared/ios/WebPlatformTouchPointIOS.cpp
Source/WebKit/UIProcess/API/APIContentRuleListStore.cpp
Source/WebKit/UIProcess/API/APIHitTestResult.cpp
Source/WebKit/UIProcess/API/APINavigation.cpp
Source/WebKit/UIProcess/API/APIOpenPanelParameters.cpp
Source/WebKit/UIProcess/API/APIPageConfiguration.cpp
Source/WebKit/UIProcess/API/C/WKContext.cpp
Source/WebKit/UIProcess/API/C/WKPage.cpp
Source/WebKit/UIProcess/API/C/cg/WKIconDatabaseCG.cpp
Source/WebKit/UIProcess/Cocoa/WebViewImpl.h
Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm
Source/WebKit/UIProcess/WebStorage/LocalStorageDatabase.cpp
Source/WebKit/UIProcess/ios/WKContentView.mm
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm
Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm
Source/WebKit/UIProcess/mac/WebPageProxyMac.mm
Source/WebKit/WebProcess/Cache/WebCacheStorageConnection.cpp
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm
Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm

index f916765..a98d357 100644 (file)
@@ -1,3 +1,18 @@
+2018-12-11  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r239071.
+        https://bugs.webkit.org/show_bug.cgi?id=192588
+
+        Broke WPE build due to undefined references to toAPI() and
+        toImpl() inside the C API (Requested by magomez on #webkit).
+
+        Reverted changeset:
+
+        "[meta][WebKit] Remove using namespace WebCore and WebKit in
+        the global scope for unified source builds"
+        https://bugs.webkit.org/show_bug.cgi?id=192449
+        https://trac.webkit.org/changeset/239071
+
 2018-12-10  Chris Fleizach  <cfleizach@apple.com>
 
         [meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
index 0ca4260..980bac1 100644 (file)
 #import <pal/spi/cf/CFNetworkSPI.h>
 #import <wtf/ProcessPrivilege.h>
 
-namespace WebKit {
 using namespace WebCore;
 
+namespace WebKit {
+
 void WebCookieManager::platformSetHTTPCookieAcceptPolicy(HTTPCookieAcceptPolicy policy)
 {
     ASSERT(hasProcessPrivilege(ProcessPrivilege::CanAccessRawCookies));
index 1fe1189..1af259e 100644 (file)
 #include <WebCore/ThreadSafeDataBuffer.h>
 #include <WebCore/UniqueIDBDatabaseConnection.h>
 
-namespace WebKit {
 using namespace WebCore;
 
+namespace WebKit {
+
 Ref<WebIDBConnectionToClient> WebIDBConnectionToClient::create(NetworkConnectionToWebProcess& connection, uint64_t serverConnectionIdentifier, PAL::SessionID sessionID)
 {
     return adoptRef(*new WebIDBConnectionToClient(connection, serverConnectionIdentifier, sessionID));
index e6959f4..0c2802d 100644 (file)
 #include <WebCore/ServiceWorkerUpdateViaCache.h>
 #include <wtf/MainThread.h>
 
-namespace WebKit {
 using namespace PAL;
 using namespace WebCore;
 
+namespace WebKit {
+
 #define SWSERVERCONNECTION_RELEASE_LOG_IF_ALLOWED(fmt, ...) RELEASE_LOG_IF(m_sessionID.isAlwaysOnLoggingAllowed(), ServiceWorker, "%p - WebSWServerConnection::" fmt, this, ##__VA_ARGS__)
 #define SWSERVERCONNECTION_RELEASE_LOG_ERROR_IF_ALLOWED(fmt, ...) RELEASE_LOG_ERROR_IF(m_sessionID.isAlwaysOnLoggingAllowed(), ServiceWorker, "%p - WebSWServerConnection::" fmt, this, ##__VA_ARGS__)
 
index e3d7aac..c2e7f84 100644 (file)
 #include "WebSWContextManagerConnectionMessages.h"
 #include <WebCore/ServiceWorkerContextData.h>
 
-namespace WebKit {
 using namespace WebCore;
 
+namespace WebKit {
+
 WebSWServerToContextConnection::WebSWServerToContextConnection(const SecurityOriginData& securityOrigin, Ref<IPC::Connection>&& connection)
     : SWServerToContextConnection(securityOrigin)
     , m_ipcConnection(WTFMove(connection))
index 30e5b27..a653f91 100644 (file)
 
 #define ENABLE_MANUAL_NETWORK_SANDBOXING 0
 
-namespace WebKit {
 using namespace WebCore;
 
+namespace WebKit {
+
 void NetworkProcess::initializeProcess(const ChildProcessInitializationParameters&)
 {
     InitWebCoreThreadSystemInterface();
index 2ae235c..8b0e6fd 100644 (file)
 #import <wtf/MemoryPressureHandler.h>
 #import <wtf/text/WTFString.h>
 
-namespace WebKit {
 using namespace WebCore;
 
+namespace WebKit {
+
 void NetworkProcess::initializeProcess(const ChildProcessInitializationParameters&)
 {
     // Having a window server connection in this process would result in spin logs (<rdar://problem/13239119>).
index 8dac904..154678c 100644 (file)
 #import <pal/SessionID.h>
 #import <wtf/MainThread.h>
 
-namespace WebKit {
 using namespace WebCore;
 
+namespace WebKit {
+
 void RemoteNetworkingContext::ensureWebsiteDataStoreSession(WebsiteDataStoreParameters&& parameters)
 {
     auto sessionID = parameters.networkSessionParameters.sessionID;
index d72add2..84e3aa5 100644 (file)
 #include "LayerHostingContext.h"
 #endif
 
-namespace WebKit {
 using namespace WebCore;
 
+namespace WebKit {
+
 PluginControllerProxy::PluginControllerProxy(WebProcessConnection* connection, const PluginCreationParameters& creationParameters)
     : m_connection(connection)
     , m_pluginInstanceID(creationParameters.pluginInstanceID)
index 38329a0..9c4e7a1 100644 (file)
 #include <crt_externs.h>
 #endif
 
-namespace WebKit {
-
 using namespace WebCore;
 
+namespace WebKit {
+
 NO_RETURN static void callExit(IPC::Connection*)
 {
     _exit(EXIT_SUCCESS);
index 6d4a0ef..985238d 100644 (file)
 #include <unistd.h>
 #endif
 
-namespace WebKit {
 using namespace WebCore;
 
+namespace WebKit {
+
 static IPC::Connection* currentConnection;
 
 RefPtr<WebProcessConnection> WebProcessConnection::create(IPC::Connection::Identifier connectionIdentifier)
index a873ca1..0648fae 100644 (file)
 #include <WebCore/Settings.h>
 #include <WebCore/TextEncodingRegistry.h>
 
-namespace WebKit {
 using namespace WebCore;
 
+namespace WebKit {
+
 WebPreferencesStore::ValueMap& WebPreferencesStore::defaults()
 {
     static NeverDestroyed<ValueMap> defaults;
index f5335fa..39ad959 100644 (file)
 #include "APIError.h"
 #include "WKAPICast.h"
 
+using namespace WebCore;
+using namespace WebKit;
+
 WKErrorRef WKErrorCreateWithCFError(CFErrorRef cfError)
 {
-    return WebKit::toAPI(&API::Error::create(WebCore::ResourceError(cfError)).leakRef());
+    return toAPI(&API::Error::create(ResourceError(cfError)).leakRef());
 }
 
 CFErrorRef WKErrorCopyCFError(CFAllocatorRef alloc, WKErrorRef error)
 {
-    WTF::RetainPtr<CFErrorRef> cfError = WebKit::toImpl(error)->platformError().cfError();
+    RetainPtr<CFErrorRef> cfError = toImpl(error)->platformError().cfError();
     return cfError.leakRef();
 }
-
index 466fffd..1547e22 100644 (file)
 #include <WebCore/ColorSpace.h>
 #include <WebCore/GraphicsContext.h>
 
+using namespace WebKit;
+using namespace WebCore;
+
 CGImageRef WKImageCreateCGImage(WKImageRef imageRef)
 {
-    WebKit::WebImage* webImage = WebKit::toImpl(imageRef);
+    WebImage* webImage = toImpl(imageRef);
     if (!webImage)
         return nullptr;
 
@@ -46,13 +49,12 @@ WKImageRef WKImageCreateFromCGImage(CGImageRef imageRef, WKImageOptions options)
     if (!imageRef)
         return nullptr;
     
-    WebCore::IntSize imageSize(CGImageGetWidth(imageRef), CGImageGetHeight(imageRef));
-    auto webImage = WebKit::WebImage::create(imageSize, WebKit::toImageOptions(options));
+    IntSize imageSize(CGImageGetWidth(imageRef), CGImageGetHeight(imageRef));
+    auto webImage = WebImage::create(imageSize, toImageOptions(options));
 
     auto graphicsContext = webImage->bitmap().createGraphicsContext();
-    WebCore::FloatRect rect(WebCore::FloatPoint(0, 0), imageSize);
+    FloatRect rect(FloatPoint(0, 0), imageSize);
     graphicsContext->clearRect(rect);
     graphicsContext->drawNativeImage(imageRef, imageSize, rect, rect);
     return toAPI(webImage.leakRef());
 }
-
index 7184e58..f168e2e 100644 (file)
 #include <wtf/MemoryPressureHandler.h>
 #endif
 
-namespace WebKit {
 using namespace WebCore;
 
+namespace WebKit {
+
 ChildProcess::ChildProcess()
     : m_terminationCounter(0)
     , m_terminationTimer(RunLoop::main(), this, &ChildProcess::terminationTimerFired)
index dffb7a8..7922088 100644 (file)
 #include <WebCore/ContextMenuContext.h>
 #include <WebCore/GraphicsContext.h>
 
-namespace WebKit {
 using namespace WebCore;
 
+namespace WebKit {
+
 ContextMenuContextData::ContextMenuContextData()
     : m_type(Type::ContextMenu)
 #if ENABLE(SERVICE_CONTROLS)
index c8c8f89..0a2ba7f 100644 (file)
 #include "WebCoreArgumentCoders.h"
 #include <wtf/text/TextStream.h>
 
-namespace WebKit {
 using namespace WebCore;
 
+namespace WebKit {
+
 void EditorState::encode(IPC::Encoder& encoder) const
 {
     encoder << shouldIgnoreSelectionChanges;
index 925171e..75d6093 100644 (file)
 #include "WebCoreArgumentCoders.h"
 #include <WebCore/IdentifierRep.h>
 
-namespace WebKit {
 using namespace WebCore;
 
+namespace WebKit {
+
 NPIdentifierData::NPIdentifierData()
     : m_isString(false)
     , m_number(0)
index 8217371..6da1dd2 100644 (file)
 @end
 #endif
 
-namespace WebKit {
 using namespace WebCore;
 
+namespace WebKit {
+
 static CGColorRef cgColorFromColor(const Color& color)
 {
     if (!color.isValid())
index cad76bb..9af089d 100644 (file)
 #include <wtf/text/CString.h>
 #include <wtf/text/TextStream.h>
 
+using namespace WebCore;
+
 #if ENABLE(ASYNC_SCROLLING)
 
 namespace IPC {
-using namespace WebCore;
 
 template<> struct ArgumentCoder<ScrollingStateNode> {
     static void encode(Encoder&, const ScrollingStateNode&);
index c2c2a3a..ee21d65 100644 (file)
 #include "WebCoreArgumentCoders.h"
 #include <WebCore/BackForwardItemIdentifier.h>
 
-namespace WebKit {
 using namespace WebCore;
 
+namespace WebKit {
+
 bool isValidEnum(WebCore::ShouldOpenExternalURLsPolicy policy)
 {
     switch (policy) {
index b2abd4d..8813b70 100644 (file)
 #include <wtf/NeverDestroyed.h>
 #include <wtf/RunLoop.h>
 
-namespace WebKit {
 using namespace WebCore;
 
+namespace WebKit {
+
 static String& identifierBase()
 {
     ASSERT(RunLoop::isMain());
index 8fc5ad6..4fcf4d3 100644 (file)
 #include "WebCoreArgumentCoders.h"
 #include <WebCore/GraphicsContext.h>
 
-namespace WebKit {
 using namespace WebCore;
-    
+
+namespace WebKit {
+
 ShareableBitmap::Handle::Handle()
 {
 }
index 232f649..d147d80 100644 (file)
 #include "ArgumentCoders.h"
 #include <WebCore/SharedBuffer.h>
 
-namespace WebKit {
 using namespace WebCore;
 
+namespace WebKit {
+
 ShareableResource::Handle::Handle()
 {
 }
index 2ee8d96..04150c1 100644 (file)
 #include <WebCore/LengthBox.h>
 #include <wtf/text/TextStream.h>
 
-namespace WebKit {
 using namespace WebCore;
 
+namespace WebKit {
+
 void VisibleContentRectUpdateInfo::encode(IPC::Encoder& encoder) const
 {
     encoder << m_exposedContentRect;
index 644fffc..e18125f 100644 (file)
 #include <wtf/DebugUtilities.h>
 #include <wtf/URL.h>
 
-namespace WebKit {
 using namespace WebCore;
 
+namespace WebKit {
+
 Ref<WebBackForwardListItem> WebBackForwardListItem::create(BackForwardListItemState&& backForwardListItemState, uint64_t pageID)
 {
     return adoptRef(*new WebBackForwardListItem(WTFMove(backForwardListItemState), pageID));
index fdb4499..2a65ac4 100644 (file)
 #include <wtf/text/CString.h>
 #include <WebCore/ContextMenu.h>
 
-namespace WebKit {
 using namespace WebCore;
 
+namespace WebKit {
+
 WebContextMenuItemData::WebContextMenuItemData()
     : m_type(WebCore::ActionType)
     , m_action(WebCore::ContextMenuItemTagNoAction)
index ad227c2..2c63c6f 100644 (file)
 #include <WebCore/MediaConstraints.h>
 #endif
 
-namespace IPC {
 using namespace WebCore;
 using namespace WebKit;
 
+namespace IPC {
+
 static void encodeSharedBuffer(Encoder& encoder, const SharedBuffer* buffer)
 {
     SharedMemory::Handle handle;
index ada3f51..c1cfccf 100644 (file)
 #include <wtf/URL.h>
 #include <wtf/text/WTFString.h>
 
-namespace WebKit {
 using namespace WebCore;
 
+namespace WebKit {
+
 WebHitTestResultData::WebHitTestResultData()
 {
 }
index 99c953c..d943dbf 100644 (file)
 #include "config.h"
 #include "WebImage.h"
 
-namespace WebKit {
 using namespace WebCore;
 
+namespace WebKit {
+
 RefPtr<WebImage> WebImage::create(const IntSize& size, ImageOptions options)
 {
     return WebImage::create(size, options, { });
index 8fc1fde..c03d173 100644 (file)
 
 #if ENABLE(MEDIA_SESSION)
 
-namespace WebKit {
 using namespace WebCore;
 
+namespace WebKit {
+
 Ref<WebMediaSessionMetadata> WebMediaSessionMetadata::create(const MediaSessionMetadata& metadata)
 {
     return adoptRef(*new WebMediaSessionMetadata(metadata));
index 2b85200..f6c792c 100644 (file)
 #include <wtf/text/CString.h>
 #include <wtf/text/StringBuilder.h>
 
-namespace WebKit {
 using namespace WebCore;
 
+namespace WebKit {
+
 static const char separator = '\t';
 
 static void appendSpaces(StringBuilder& string, int count)
index 62ae732..17ba5c4 100644 (file)
 
 #include "WebCoreArgumentCoders.h"
 
-namespace WebKit {
 using namespace WebCore;
 
+namespace WebKit {
+
 WebMouseEvent::WebMouseEvent()
     : WebEvent()
     , m_button(static_cast<uint32_t>(NoButton))
index 1da4c69..1e2aab2 100644 (file)
 #include <WebCore/RenderView.h>
 #include <WebCore/RenderWidget.h>
 
-namespace WebKit {
 using namespace WebCore;
 
+namespace WebKit {
+
 RefPtr<WebRenderObject> WebRenderObject::create(WebPage* page)
 {
     Frame* mainFrame = page->mainFrame();
index 72387a2..fb691b1 100644 (file)
 #include <WebCore/SQLiteDatabaseTracker.h>
 #include <wtf/MainThread.h>
 
-namespace WebKit {
 using namespace WebCore;
 
+namespace WebKit {
+
 WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker(NetworkProcess& process)
     : m_process(process)
     , m_hysteresis([this](PAL::HysteresisState state) { hysteresisUpdated(state); })
index ba10e90..4e13e89 100644 (file)
 
 #include "WebCoreArgumentCoders.h"
 
-namespace WebKit {    
 using namespace WebCore;
 
+namespace WebKit {    
+
 WebWheelEvent::WebWheelEvent(Type type, const IntPoint& position, const IntPoint& globalPosition, const FloatSize& delta, const FloatSize& wheelTicks, Granularity granularity, Modifiers modifiers, WallTime timestamp)
     : WebEvent(type, modifiers, timestamp)
     , m_position(position)
index 00be161..f8f7296 100644 (file)
@@ -63,9 +63,10 @@ extern "C" SecAccessControlRef SecAccessControlCreateFromData(CFAllocatorRef all
 extern "C" CFDataRef SecAccessControlCopyData(SecAccessControlRef access_control);
 #endif
 
-namespace IPC {
 using namespace WebCore;
 
+namespace IPC {
+
 CFTypeRef tokenNullTypeRef()
 {
     static CFStringRef tokenNullType = CFSTR("WKNull");
index 47dd9a0..8b0b3fb 100644 (file)
 
 #include "WebCoreArgumentCoders.h"
 
-namespace WebKit {
 using namespace WebCore;
 
+namespace WebKit {
+
 void WebPlatformTouchPoint::encode(IPC::Encoder& encoder) const
 {
     encoder << m_identifier;
index 26f0c33..0778cd6 100644 (file)
 #include <wtf/persistence/PersistentDecoder.h>
 #include <wtf/persistence/PersistentEncoder.h>
 
-
-namespace API {
 using namespace WebKit::NetworkCache;
 using namespace WebCore::FileSystem;
 
+namespace API {
+    
 ContentRuleListStore& ContentRuleListStore::legacyDefaultStore()
 {
     const bool legacyFilename = true;
index 6d06a4b..8c8c7a0 100644 (file)
 #include "config.h"
 #include "APIHitTestResult.h"
 
-namespace API {
 using namespace WebCore;
 
+namespace API {
+
 Ref<HitTestResult> HitTestResult::create(const WebKit::WebHitTestResultData& hitTestResultData)
 {
     return adoptRef(*new HitTestResult(hitTestResultData));
index d8d82e4..2754e79 100644 (file)
 #include "WebNavigationState.h"
 #include <wtf/DebugUtilities.h>
 
-namespace API {
 using namespace WebCore;
 using namespace WebKit;
 
+namespace API {
+
 Navigation::Navigation(WebNavigationState& state)
     : m_navigationID(state.generateNavigationID())
 {
index 851ebf5..771990a 100644 (file)
 #include "APIString.h"
 #include <wtf/Vector.h>
 
-namespace API {
 using namespace WebCore;
 
+namespace API {
+
 Ref<OpenPanelParameters> OpenPanelParameters::create(const FileChooserSettings& settings)
 {
     return adoptRef(*new OpenPanelParameters(settings));
index 1f049c2..91270ee 100644 (file)
 #include "APIApplicationManifest.h"
 #endif
 
-namespace API {
 using namespace WebCore;
 using namespace WebKit;
 
+namespace API {
+
 Ref<PageConfiguration> PageConfiguration::create()
 {
     return adoptRef(*new PageConfiguration);
index 911e562..e3b468b 100644 (file)
@@ -60,6 +60,9 @@ template<> struct ClientTraits<WKContextHistoryClientBase> {
 };
 }
 
+using namespace WebCore;
+using namespace WebKit;
+
 WKTypeID WKContextGetTypeID()
 {
     return toAPI(WebProcessPool::APIType);
@@ -187,7 +190,7 @@ void WKContextSetDownloadClient(WKContextRef contextRef, const WKContextDownload
             m_client.didReceiveAuthenticationChallenge(toAPI(&processPool), toAPI(&downloadProxy), toAPI(&authenticationChallengeProxy), m_client.base.clientInfo);
         }
 
-        void didReceiveResponse(WebProcessPool& processPool, DownloadProxy& downloadProxy, const WebCore::ResourceResponse& response) final
+        void didReceiveResponse(WebProcessPool& processPool, DownloadProxy& downloadProxy, const ResourceResponse& response) final
         {
             if (!m_client.didReceiveResponse)
                 return;
@@ -229,7 +232,7 @@ void WKContextSetDownloadClient(WKContextRef contextRef, const WKContextDownload
             m_client.didFinish(toAPI(&processPool), toAPI(&downloadProxy), m_client.base.clientInfo);
         }
 
-        void didFail(WebProcessPool& processPool, DownloadProxy& downloadProxy, const WebCore::ResourceError& error) final
+        void didFail(WebProcessPool& processPool, DownloadProxy& downloadProxy, const ResourceError& error) final
         {
             if (!m_client.didFail)
                 return;
@@ -253,7 +256,7 @@ void WKContextSetDownloadClient(WKContextRef contextRef, const WKContextDownload
             m_client.processDidCrash(toAPI(&processPool), toAPI(&downloadProxy), m_client.base.clientInfo);
         }
 
-        void willSendRequest(WebProcessPool& processPool, DownloadProxy& downloadProxy, WebCore::ResourceRequest&& request, const WebCore::ResourceResponse&, CompletionHandler<void(WebCore::ResourceRequest&&)>&& completionHandler) final
+        void willSendRequest(WebProcessPool& processPool, DownloadProxy& downloadProxy, ResourceRequest&& request, const ResourceResponse&, CompletionHandler<void(ResourceRequest&&)>&& completionHandler) final
         {
             if (m_client.didReceiveServerRedirect)
                 m_client.didReceiveServerRedirect(toAPI(&processPool), toAPI(&downloadProxy), toURLRef(request.url().string().impl()), m_client.base.clientInfo);
@@ -307,7 +310,7 @@ void WKContextAddVisitedLink(WKContextRef contextRef, WKStringRef visitedURL)
     if (visitedURLString.isEmpty())
         return;
 
-    toImpl(contextRef)->visitedLinkStore().addVisitedLinkHash(WebCore::computeSharedStringHash(visitedURLString));
+    toImpl(contextRef)->visitedLinkStore().addVisitedLinkHash(computeSharedStringHash(visitedURLString));
 }
 
 void WKContextClearVisitedLinks(WKContextRef contextRef)
index 2ce38bb..2537439 100644 (file)
 #include "VersionChecks.h"
 #endif
 
-namespace API {
 using namespace WebCore;
 using namespace WebKit;
-    
+
+namespace API {
 template<> struct ClientTraits<WKPageLoaderClientBase> {
     typedef std::tuple<WKPageLoaderClientV0, WKPageLoaderClientV1, WKPageLoaderClientV2, WKPageLoaderClientV3, WKPageLoaderClientV4, WKPageLoaderClientV5, WKPageLoaderClientV6> Versions;
 };
@@ -130,8 +130,8 @@ template<> struct ClientTraits<WKPageFindClientBase> {
 template<> struct ClientTraits<WKPageFindMatchesClientBase> {
     typedef std::tuple<WKPageFindMatchesClientV0> Versions;
 };
-    
-} // namespace API
+
+}
 
 WKTypeID WKPageGetTypeID()
 {
@@ -160,13 +160,13 @@ void WKPageLoadURL(WKPageRef pageRef, WKURLRef URLRef)
 
 void WKPageLoadURLWithShouldOpenExternalURLsPolicy(WKPageRef pageRef, WKURLRef URLRef, bool shouldOpenExternalURLs)
 {
-    WebCore::ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy = shouldOpenExternalURLs ? WebCore::ShouldOpenExternalURLsPolicy::ShouldAllow : WebCore::ShouldOpenExternalURLsPolicy::ShouldNotAllow;
+    ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy = shouldOpenExternalURLs ? ShouldOpenExternalURLsPolicy::ShouldAllow : ShouldOpenExternalURLsPolicy::ShouldNotAllow;
     toImpl(pageRef)->loadRequest(URL(URL(), toWTFString(URLRef)), shouldOpenExternalURLsPolicy);
 }
 
 void WKPageLoadURLWithUserData(WKPageRef pageRef, WKURLRef URLRef, WKTypeRef userDataRef)
 {
-    toImpl(pageRef)->loadRequest(URL(URL(), toWTFString(URLRef)), WebCore::ShouldOpenExternalURLsPolicy::ShouldNotAllow, toImpl(userDataRef));
+    toImpl(pageRef)->loadRequest(URL(URL(), toWTFString(URLRef)), ShouldOpenExternalURLsPolicy::ShouldNotAllow, toImpl(userDataRef));
 }
 
 void WKPageLoadURLRequest(WKPageRef pageRef, WKURLRequestRef urlRequestRef)
@@ -178,7 +178,7 @@ void WKPageLoadURLRequest(WKPageRef pageRef, WKURLRequestRef urlRequestRef)
 void WKPageLoadURLRequestWithUserData(WKPageRef pageRef, WKURLRequestRef urlRequestRef, WKTypeRef userDataRef)
 {
     auto resourceRequest = toImpl(urlRequestRef)->resourceRequest();
-    toImpl(pageRef)->loadRequest(WTFMove(resourceRequest), WebCore::ShouldOpenExternalURLsPolicy::ShouldNotAllow, toImpl(userDataRef));
+    toImpl(pageRef)->loadRequest(WTFMove(resourceRequest), ShouldOpenExternalURLsPolicy::ShouldNotAllow, toImpl(userDataRef));
 }
 
 void WKPageLoadFile(WKPageRef pageRef, WKURLRef fileURL, WKURLRef resourceDirectoryURL)
@@ -691,22 +691,22 @@ bool WKPageBackgroundExtendsBeyondPage(WKPageRef pageRef)
 
 void WKPageSetPaginationMode(WKPageRef pageRef, WKPaginationMode paginationMode)
 {
-    WebCore::Pagination::Mode mode;
+    Pagination::Mode mode;
     switch (paginationMode) {
     case kWKPaginationModeUnpaginated:
-        mode = WebCore::Pagination::Unpaginated;
+        mode = Pagination::Unpaginated;
         break;
     case kWKPaginationModeLeftToRight:
-        mode = WebCore::Pagination::LeftToRightPaginated;
+        mode = Pagination::LeftToRightPaginated;
         break;
     case kWKPaginationModeRightToLeft:
-        mode = WebCore::Pagination::RightToLeftPaginated;
+        mode = Pagination::RightToLeftPaginated;
         break;
     case kWKPaginationModeTopToBottom:
-        mode = WebCore::Pagination::TopToBottomPaginated;
+        mode = Pagination::TopToBottomPaginated;
         break;
     case kWKPaginationModeBottomToTop:
-        mode = WebCore::Pagination::BottomToTopPaginated;
+        mode = Pagination::BottomToTopPaginated;
         break;
     default:
         return;
@@ -717,15 +717,15 @@ void WKPageSetPaginationMode(WKPageRef pageRef, WKPaginationMode paginationMode)
 WKPaginationMode WKPageGetPaginationMode(WKPageRef pageRef)
 {
     switch (toImpl(pageRef)->paginationMode()) {
-    case WebCore::Pagination::Unpaginated:
+    case Pagination::Unpaginated:
         return kWKPaginationModeUnpaginated;
-    case WebCore::Pagination::LeftToRightPaginated:
+    case Pagination::LeftToRightPaginated:
         return kWKPaginationModeLeftToRight;
-    case WebCore::Pagination::RightToLeftPaginated:
+    case Pagination::RightToLeftPaginated:
         return kWKPaginationModeRightToLeft;
-    case WebCore::Pagination::TopToBottomPaginated:
+    case Pagination::TopToBottomPaginated:
         return kWKPaginationModeTopToBottom;
-    case WebCore::Pagination::BottomToTopPaginated:
+    case Pagination::BottomToTopPaginated:
         return kWKPaginationModeBottomToTop;
     }
 
@@ -1107,7 +1107,7 @@ void WKPageSetPageLoaderClient(WKPageRef pageRef, const WKPageLoaderClientBase*
             m_client.didReceiveServerRedirectForProvisionalLoadForFrame(toAPI(&page), toAPI(&frame), toAPI(userData), m_client.base.clientInfo);
         }
 
-        void didFailProvisionalLoadWithErrorForFrame(WebPageProxy& page, WebFrameProxy& frame, API::Navigation*, const WebCore::ResourceError& error, API::Object* userData) override
+        void didFailProvisionalLoadWithErrorForFrame(WebPageProxy& page, WebFrameProxy& frame, API::Navigation*, const ResourceError& error, API::Object* userData) override
         {
             if (!m_client.didFailProvisionalLoadWithErrorForFrame)
                 return;
@@ -1123,7 +1123,7 @@ void WKPageSetPageLoaderClient(WKPageRef pageRef, const WKPageLoaderClientBase*
             m_client.didFinishLoadForFrame(toAPI(&page), toAPI(&frame), toAPI(userData), m_client.base.clientInfo);
         }
 
-        void didFailLoadWithErrorForFrame(WebPageProxy& page, WebFrameProxy& frame, API::Navigation*, const WebCore::ResourceError& error, API::Object* userData) override
+        void didFailLoadWithErrorForFrame(WebPageProxy& page, WebFrameProxy& frame, API::Navigation*, const ResourceError& error, API::Object* userData) override
         {
             if (!m_client.didFailLoadWithErrorForFrame)
                 return;
@@ -1230,7 +1230,7 @@ void WKPageSetPagePolicyClient(WKPageRef pageRef, const WKPagePolicyClientBase*
                 m_client.decidePolicyForNavigationAction(toAPI(&page), toAPI(frame), toAPI(navigationActionData.navigationType), toAPI(navigationActionData.modifiers), toAPI(navigationActionData.mouseButton), toAPI(originatingFrame), toAPI(originalRequest.ptr()), toAPI(request.ptr()), toAPI(listener.ptr()), toAPI(userData), m_client.base.clientInfo);
         }
 
-        void decidePolicyForNewWindowAction(WebPageProxy& page, WebFrameProxy& frame, const NavigationActionData& navigationActionData, const WebCore::ResourceRequest& resourceRequest, const String& frameName, Ref<WebFramePolicyListenerProxy>&& listener, API::Object* userData) override
+        void decidePolicyForNewWindowAction(WebPageProxy& page, WebFrameProxy& frame, const NavigationActionData& navigationActionData, const ResourceRequest& resourceRequest, const String& frameName, Ref<WebFramePolicyListenerProxy>&& listener, API::Object* userData) override
         {
             if (!m_client.decidePolicyForNewWindowAction) {
                 listener->use();
@@ -1242,7 +1242,7 @@ void WKPageSetPagePolicyClient(WKPageRef pageRef, const WKPagePolicyClientBase*
             m_client.decidePolicyForNewWindowAction(toAPI(&page), toAPI(&frame), toAPI(navigationActionData.navigationType), toAPI(navigationActionData.modifiers), toAPI(navigationActionData.mouseButton), toAPI(request.ptr()), toAPI(frameName.impl()), toAPI(listener.ptr()), toAPI(userData), m_client.base.clientInfo);
         }
 
-        void decidePolicyForResponse(WebPageProxy& page, WebFrameProxy& frame, const WebCore::ResourceResponse& resourceResponse, const WebCore::ResourceRequest& resourceRequest, bool canShowMIMEType, Ref<WebFramePolicyListenerProxy>&& listener, API::Object* userData) override
+        void decidePolicyForResponse(WebPageProxy& page, WebFrameProxy& frame, const ResourceResponse& resourceResponse, const ResourceRequest& resourceRequest, bool canShowMIMEType, Ref<WebFramePolicyListenerProxy>&& listener, API::Object* userData) override
         {
             if (!m_client.decidePolicyForResponse_deprecatedForUseWithV0 && !m_client.decidePolicyForResponse) {
                 listener->use();
@@ -1258,7 +1258,7 @@ void WKPageSetPagePolicyClient(WKPageRef pageRef, const WKPagePolicyClientBase*
                 m_client.decidePolicyForResponse(toAPI(&page), toAPI(&frame), toAPI(response.ptr()), toAPI(request.ptr()), canShowMIMEType, toAPI(listener.ptr()), toAPI(userData), m_client.base.clientInfo);
         }
 
-        void unableToImplementPolicy(WebPageProxy& page, WebFrameProxy& frame, const WebCore::ResourceError& error, API::Object* userData) override
+        void unableToImplementPolicy(WebPageProxy& page, WebFrameProxy& frame, const ResourceError& error, API::Object* userData) override
         {
             if (!m_client.unableToImplementPolicy)
                 return;
@@ -1271,8 +1271,7 @@ void WKPageSetPagePolicyClient(WKPageRef pageRef, const WKPagePolicyClientBase*
 }
 
 namespace WebKit {
-using namespace WebCore;
-    
+
 class RunBeforeUnloadConfirmPanelResultListener : public API::ObjectImpl<API::Object::Type::RunBeforeUnloadConfirmPanelResultListener> {
 public:
     static Ref<RunBeforeUnloadConfirmPanelResultListener> create(Function<void(bool)>&& completionHandler)
@@ -2700,4 +2699,3 @@ void WKPageGetApplicationManifest_b(WKPageRef page, WKPageGetApplicationManifest
 #endif // not ENABLE(APPLICATION_MANIFEST)
 }
 #endif
-
index 03171d5..4b040db 100644 (file)
@@ -31,6 +31,7 @@
 #include <WebCore/Image.h>
 
 using namespace WebKit;
+using namespace WebCore;
 
 CGImageRef WKIconDatabaseTryGetCGImageForURL(WKIconDatabaseRef, WKURLRef, WKSize)
 {
@@ -41,4 +42,3 @@ CFArrayRef WKIconDatabaseTryCopyCGImageArrayForURL(WKIconDatabaseRef, WKURLRef)
 {
     return nullptr;
 }
-
index 01a19fd..d80ef79 100644 (file)
@@ -134,7 +134,6 @@ namespace WebKit {
 class PageClient;
 class PageClientImpl;
 class DrawingAreaProxy;
-class SafeBrowsingWarning;
 class ViewGestureController;
 class ViewSnapshot;
 class WebBackForwardListItem;
index d74ddb3..f1ad363 100644 (file)
 #import "WKImmediateActionController.h"
 #import "WKPrintingView.h"
 #import "WKSafeBrowsingWarning.h"
-#import "WKShareSheet.h"
 #import "WKTextInputWindowController.h"
 #import "WKViewLayoutStrategy.h"
-#import "WKWebViewInternal.h"
 #import "WKWebViewPrivate.h"
 #import "WebBackForwardList.h"
 #import "WebEditCommandProxy.h"
index 3d58acf..efde315 100644 (file)
 #import <pal/spi/cocoa/QuartzCoreSPI.h>
 #import <wtf/SoftLinking.h>
 
-namespace WebKit {
 using namespace WebCore;
 
+namespace WebKit {
+
 static RetainPtr<UIView> createRemoteView(pid_t pid, uint32_t contextID)
 {
 #if USE(UIREMOTEVIEW_CONTEXT_HOSTING)
index 0c25d65..826158f 100644 (file)
 #include <wtf/text/StringHash.h>
 #include <wtf/text/WTFString.h>
 
+using namespace WebCore;
+
 static const auto databaseUpdateInterval = 1_s;
 
 static const int maximumItemsToUpdate = 100;
 
 namespace WebKit {
-using namespace WebCore;
 
 Ref<LocalStorageDatabase> LocalStorageDatabase::create(Ref<WorkQueue>&& queue, Ref<LocalStorageDatabaseTracker>&& tracker, const SecurityOriginData& securityOrigin)
 {
index 6afbcb8..3e7cccf 100644 (file)
 #import <wtf/RetainPtr.h>
 #import <wtf/text/TextStream.h>
 
-
-namespace WebKit {
 using namespace WebCore;
 using namespace WebKit;
 
+namespace WebKit {
 class HistoricalVelocityData {
 public:
     struct VelocityData {
@@ -172,7 +171,7 @@ private:
 @end
 
 @implementation WKContentView {
-    std::unique_ptr<WebKit::PageClientImpl> _pageClient;
+    std::unique_ptr<PageClientImpl> _pageClient;
     ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     RetainPtr<WKBrowsingContextController> _browsingContextController;
     ALLOW_DEPRECATED_DECLARATIONS_END
@@ -182,7 +181,7 @@ private:
     RetainPtr<WKInspectorIndicationView> _inspectorIndicationView;
     RetainPtr<WKInspectorHighlightView> _inspectorHighlightView;
 
-    WebKit::HistoricalVelocityData _historicalKinematicData;
+    HistoricalVelocityData _historicalKinematicData;
 
     RetainPtr<NSUndoManager> _undoManager;
 
@@ -196,7 +195,7 @@ private:
 
     _page = processPool.createWebPage(*_pageClient, WTFMove(configuration));
     _page->initializeWebPage();
-    _page->setIntrinsicDeviceScaleFactor(WebCore::screenScaleFactor([UIScreen mainScreen]));
+    _page->setIntrinsicDeviceScaleFactor(screenScaleFactor([UIScreen mainScreen]));
     _page->setUseFixedLayout(true);
     _page->setDelegatesScrolling(true);
 
@@ -204,7 +203,7 @@ private:
     _page->setFullscreenClient(std::make_unique<WebKit::FullscreenClient>(_webView));
 #endif
 
-    WebKit::WebProcessPool::statistics().wkViewCount++;
+    WebProcessPool::statistics().wkViewCount++;
 
     _rootContentView = adoptNS([[UIView alloc] init]);
     [_rootContentView layer].name = @"RootContent";
@@ -234,9 +233,9 @@ private:
     if (!(self = [super initWithFrame:frame webView:webView]))
         return nil;
 
-    WebKit::InitializeWebKit2();
+    InitializeWebKit2();
 
-    _pageClient = std::make_unique<WebKit::PageClientImpl>(self, webView);
+    _pageClient = std::make_unique<PageClientImpl>(self, webView);
     _webView = webView;
 
     return [self _commonInitializationWithProcessPool:processPool configuration:WTFMove(configuration)];
@@ -250,12 +249,12 @@ private:
 
     _page->close();
 
-    WebKit::WebProcessPool::statistics().wkViewCount--;
+    WebProcessPool::statistics().wkViewCount--;
 
     [super dealloc];
 }
 
-- (WebKit::WebPageProxy*)page
+- (WebPageProxy*)page
 {
     return _page.get();
 }
@@ -344,9 +343,9 @@ ALLOW_DEPRECATED_DECLARATIONS_END
     }
 }
 
-- (void)updateFixedClippingView:(WebCore::FloatRect)fixedPositionRectForUI
+- (void)updateFixedClippingView:(FloatRect)fixedPositionRectForUI
 {
-    WebCore::FloatRect clippingBounds = [self bounds];
+    FloatRect clippingBounds = [self bounds];
     clippingBounds.unite(fixedPositionRectForUI);
 
     [_fixedClippingView setCenter:clippingBounds.location()]; // Not really the center since we set an anchor point.
@@ -387,18 +386,18 @@ ALLOW_DEPRECATED_DECLARATIONS_END
         return;
 
     MonotonicTime timestamp = MonotonicTime::now();
-    WebKit::HistoricalVelocityData::VelocityData velocityData;
+    HistoricalVelocityData::VelocityData velocityData;
     if (!isStableState)
         velocityData = _historicalKinematicData.velocityForNewData(visibleContentRect.origin, zoomScale, timestamp);
     else
         _historicalKinematicData.clear();
 
-    WebKit::RemoteScrollingCoordinatorProxy* scrollingCoordinator = _page->scrollingCoordinatorProxy();
+    RemoteScrollingCoordinatorProxy* scrollingCoordinator = _page->scrollingCoordinatorProxy();
 
     CGRect unobscuredContentRectRespectingInputViewBounds = [self _computeUnobscuredContentRectRespectingInputViewBounds:unobscuredContentRect inputViewBounds:inputViewBounds];
-    WebCore::FloatRect fixedPositionRectForLayout = _page->computeCustomFixedPositionRect(unobscuredContentRect, unobscuredContentRectRespectingInputViewBounds, _page->customFixedPositionRect(), zoomScale, WebCore::FrameView::LayoutViewportConstraint::ConstrainedToDocumentRect, scrollingCoordinator->visualViewportEnabled());
+    FloatRect fixedPositionRectForLayout = _page->computeCustomFixedPositionRect(unobscuredContentRect, unobscuredContentRectRespectingInputViewBounds, _page->customFixedPositionRect(), zoomScale, FrameView::LayoutViewportConstraint::ConstrainedToDocumentRect, scrollingCoordinator->visualViewportEnabled());
 
-    WebKit::VisibleContentRectUpdateInfo visibleContentRectUpdateInfo(
+    VisibleContentRectUpdateInfo visibleContentRectUpdateInfo(
         visibleContentRect,
         unobscuredContentRect,
         unobscuredRectInScrollViewCoordinates,
@@ -416,7 +415,7 @@ ALLOW_DEPRECATED_DECLARATIONS_END
         velocityData.horizontalVelocity,
         velocityData.verticalVelocity,
         velocityData.scaleChangeRate,
-        downcast<WebKit::RemoteLayerTreeDrawingAreaProxy>(*drawingArea).lastCommittedLayerTreeTransactionID());
+        downcast<RemoteLayerTreeDrawingAreaProxy>(*drawingArea).lastCommittedLayerTreeTransactionID());
 
     LOG_WITH_STREAM(VisibleRects, stream << "-[WKContentView didUpdateVisibleRect]" << visibleContentRectUpdateInfo.dump());
 
@@ -425,7 +424,7 @@ ALLOW_DEPRECATED_DECLARATIONS_END
 
     _sizeChangedSinceLastVisibleContentRectUpdate = NO;
 
-    WebCore::FloatRect fixedPositionRect = _page->computeCustomFixedPositionRect(_page->unobscuredContentRect(), _page->unobscuredContentRectRespectingInputViewBounds(), _page->customFixedPositionRect(), zoomScale, WebCore::FrameView::LayoutViewportConstraint::Unconstrained, scrollingCoordinator->visualViewportEnabled());
+    FloatRect fixedPositionRect = _page->computeCustomFixedPositionRect(_page->unobscuredContentRect(), _page->unobscuredContentRectRespectingInputViewBounds(), _page->customFixedPositionRect(), zoomScale, FrameView::LayoutViewportConstraint::Unconstrained, scrollingCoordinator->visualViewportEnabled());
     scrollingCoordinator->viewportChangedViaDelegatedScrolling(scrollingCoordinator->rootScrollingNodeID(), fixedPositionRect, zoomScale);
 
     drawingArea->updateDebugIndicator();
@@ -477,7 +476,7 @@ ALLOW_DEPRECATED_DECLARATIONS_END
 - (void)_updateForScreen:(UIScreen *)screen
 {
     ASSERT(screen);
-    _page->setIntrinsicDeviceScaleFactor(WebCore::screenScaleFactor(screen));
+    _page->setIntrinsicDeviceScaleFactor(screenScaleFactor(screen));
     [self _accessibilityRegisterUIProcessTokens];
 }
 
@@ -498,10 +497,10 @@ static void storeAccessibilityRemoteConnectionInformation(id element, pid_t pid,
 - (void)_accessibilityRegisterUIProcessTokens
 {
     auto uuid = [NSUUID UUID];
-    NSData *remoteElementToken = WebKit::newAccessibilityRemoteToken(uuid);
+    NSData *remoteElementToken = newAccessibilityRemoteToken(uuid);
 
     // Store information about the WebProcess that can later be retrieved by the iOS Accessibility runtime.
-    if (_page->process().state() == WebKit::WebProcessProxy::State::Running) {
+    if (_page->process().state() == WebProcessProxy::State::Running) {
         IPC::Connection* connection = _page->process().connection();
         storeAccessibilityRemoteConnectionInformation(self, _page->process().processIdentifier(), connection->identifier().port, uuid);
 
@@ -517,9 +516,9 @@ static void storeAccessibilityRemoteConnectionInformation(id element, pid_t pid,
 
 #pragma mark PageClientImpl methods
 
-- (std::unique_ptr<WebKit::DrawingAreaProxy>)_createDrawingAreaProxy
+- (std::unique_ptr<DrawingAreaProxy>)_createDrawingAreaProxy
 {
-    return std::make_unique<WebKit::RemoteLayerTreeDrawingAreaProxy>(*_page);
+    return std::make_unique<RemoteLayerTreeDrawingAreaProxy>(*_page);
 }
 
 - (void)_processDidExit
@@ -555,7 +554,7 @@ static void storeAccessibilityRemoteConnectionInformation(id element, pid_t pid,
     CGPoint scrollOrigin = -layerTreeTransaction.scrollOrigin();
     CGRect contentBounds = { scrollOrigin, contentsSize };
 
-    LOG_WITH_STREAM(VisibleRects, stream << "-[WKContentView _didCommitLayerTree:] transactionID " <<  layerTreeTransaction.transactionID() << " contentBounds " << WebCore::FloatRect(contentBounds));
+    LOG_WITH_STREAM(VisibleRects, stream << "-[WKContentView _didCommitLayerTree:] transactionID " <<  layerTreeTransaction.transactionID() << " contentBounds " << FloatRect(contentBounds));
 
     BOOL boundsChanged = !CGRectEqualToRect([self bounds], contentBounds);
     if (boundsChanged)
@@ -564,7 +563,7 @@ static void storeAccessibilityRemoteConnectionInformation(id element, pid_t pid,
     [_webView _didCommitLayerTree:layerTreeTransaction];
 
     if (_interactionViewsContainerView) {
-        WebCore::FloatPoint scaledOrigin = layerTreeTransaction.scrollOrigin();
+        FloatPoint scaledOrigin = layerTreeTransaction.scrollOrigin();
         float scale = [[_webView scrollView] zoomScale];
         scaledOrigin.scale(scale);
         [_interactionViewsContainerView setFrame:CGRectMake(scaledOrigin.x(), scaledOrigin.y(), 0, 0)];
@@ -572,7 +571,7 @@ static void storeAccessibilityRemoteConnectionInformation(id element, pid_t pid,
     
     if (boundsChanged) {
         // FIXME: factor computeCustomFixedPositionRect() into something that gives us this rect.
-        WebCore::FloatRect fixedPositionRect = _page->computeCustomFixedPositionRect(_page->unobscuredContentRect(), _page->unobscuredContentRectRespectingInputViewBounds(), _page->customFixedPositionRect(), [[_webView scrollView] zoomScale]);
+        FloatRect fixedPositionRect = _page->computeCustomFixedPositionRect(_page->unobscuredContentRect(), _page->unobscuredContentRectRespectingInputViewBounds(), _page->customFixedPositionRect(), [[_webView scrollView] zoomScale]);
         [self updateFixedClippingView:fixedPositionRect];
 
         // We need to push the new content bounds to the webview to update fixed position rects.
@@ -673,7 +672,7 @@ static void storeAccessibilityRemoteConnectionInformation(id element, pid_t pid,
     if (CGRectIsEmpty(printingRect))
         return 0;
 
-    WebKit::PrintInfo printInfo;
+    PrintInfo printInfo;
     printInfo.pageSetupScaleFactor = 1;
     printInfo.snapshotFirstPage = printFormatter.snapshotFirstPage;
     if (printInfo.snapshotFirstPage) {
@@ -687,9 +686,9 @@ static void storeAccessibilityRemoteConnectionInformation(id element, pid_t pid,
 
     _isPrintingToPDF = YES;
     auto retainedSelf = retainPtr(self);
-    return _page->computePagesForPrintingAndDrawToPDF(frameID, printInfo, [retainedSelf](const IPC::DataReference& pdfData, WebKit::CallbackBase::Error error) {
+    return _page->computePagesForPrintingAndDrawToPDF(frameID, printInfo, [retainedSelf](const IPC::DataReference& pdfData, CallbackBase::Error error) {
         retainedSelf->_isPrintingToPDF = NO;
-        if (error != WebKit::CallbackBase::Error::None)
+        if (error != CallbackBase::Error::None)
             return;
 
         auto data = adoptCF(CFDataCreate(kCFAllocatorDefault, pdfData.data(), pdfData.size()));
index a3274e7..e39ea5e 100644 (file)
 
 #endif
 
-namespace WebKit {
 using namespace WebCore;
 using namespace WebKit;
 
+namespace WebKit {
+
 WKSelectionDrawingInfo::WKSelectionDrawingInfo()
     : type(SelectionType::None)
 {
@@ -281,7 +282,7 @@ const CGFloat minimumTapHighlightRadius = 2.0;
 @protocol UISelectionInteractionAssistant;
 
 @interface WKFocusedElementInfo : NSObject <_WKFocusedElementInfo>
-- (instancetype)initWithAssistedNodeInformation:(const WebKit::AssistedNodeInformation&)information isUserInitiated:(BOOL)isUserInitiated userObject:(NSObject <NSSecureCoding> *)userObject;
+- (instancetype)initWithAssistedNodeInformation:(const AssistedNodeInformation&)information isUserInitiated:(BOOL)isUserInitiated userObject:(NSObject <NSSecureCoding> *)userObject;
 @end
 
 @implementation WKFormInputSession {
@@ -441,7 +442,7 @@ const CGFloat minimumTapHighlightRadius = 2.0;
     RetainPtr<NSString> _label;
 }
 
-- (instancetype)initWithAssistedNodeInformation:(const WebKit::AssistedNodeInformation&)information isUserInitiated:(BOOL)isUserInitiated userObject:(NSObject <NSSecureCoding> *)userObject
+- (instancetype)initWithAssistedNodeInformation:(const AssistedNodeInformation&)information isUserInitiated:(BOOL)isUserInitiated userObject:(NSObject <NSSecureCoding> *)userObject
 {
     if (!(self = [super init]))
         return nil;
@@ -611,7 +612,7 @@ static WKDragSessionContext *ensureLocalDragSessionContext(id <UIDragSession> se
 
 static inline bool hasAssistedNode(WebKit::AssistedNodeInformation assistedNodeInformation)
 {
-    return (assistedNodeInformation.elementType != WebKit::InputType::None);
+    return (assistedNodeInformation.elementType != InputType::None);
 }
 
 - (WKFormInputSession *)_formInputSession
@@ -728,7 +729,7 @@ static inline bool hasAssistedNode(WebKit::AssistedNodeInformation assistedNodeI
     
     _actionSheetAssistant = adoptNS([[WKActionSheetAssistant alloc] initWithView:self]);
     [_actionSheetAssistant setDelegate:self];
-    _smartMagnificationController = std::make_unique<WebKit::SmartMagnificationController>(self);
+    _smartMagnificationController = std::make_unique<SmartMagnificationController>(self);
     _isExpectingFastSingleTapCommit = NO;
     _potentialTapInProgress = NO;
     _isDoubleTapPending = NO;
@@ -976,7 +977,7 @@ static inline bool hasAssistedNode(WebKit::AssistedNodeInformation assistedNodeI
     return [super hitTest:point withEvent:event];
 }
 
-- (const WebKit::InteractionInformationAtPosition&)positionInformation
+- (const InteractionInformationAtPosition&)positionInformation
 {
     return _positionInformation;
 }
@@ -1108,10 +1109,10 @@ static inline bool hasAssistedNode(WebKit::AssistedNodeInformation assistedNodeI
 
     _lastInteractionLocation = lastTouchEvent->locationInDocumentCoordinates;
     if (lastTouchEvent->type == UIWebTouchEventTouchBegin)
-        _layerTreeTransactionIdAtLastTouchStart = downcast<WebKit::RemoteLayerTreeDrawingAreaProxy>(*_page->drawingArea()).lastCommittedLayerTreeTransactionID();
+        _layerTreeTransactionIdAtLastTouchStart = downcast<RemoteLayerTreeDrawingAreaProxy>(*_page->drawingArea()).lastCommittedLayerTreeTransactionID();
 
 #if ENABLE(TOUCH_EVENTS)
-    WebKit::NativeWebTouchEvent nativeWebTouchEvent(lastTouchEvent);
+    NativeWebTouchEvent nativeWebTouchEvent(lastTouchEvent);
     nativeWebTouchEvent.setCanPreventNativeGestures(!_canSendTouchEventsAsynchronously || [gestureRecognizer isDefaultPrevented]);
 
     if (_canSendTouchEventsAsynchronously)
@@ -1144,7 +1145,7 @@ static inline bool hasAssistedNode(WebKit::AssistedNodeInformation assistedNodeI
     }
 }
 
-static WebCore::FloatQuad inflateQuad(const WebCore::FloatQuad& quad, float inflateSize)
+static FloatQuad inflateQuad(const FloatQuad& quad, float inflateSize)
 {
     // We sort the output points like this (as expected by the highlight view):
     //  p2------p3
@@ -1152,7 +1153,7 @@ static WebCore::FloatQuad inflateQuad(const WebCore::FloatQuad& quad, float infl
     //  p1------p4
 
     // 1) Sort the points horizontally.
-    WebCore::FloatPoint points[4] = { quad.p1(), quad.p4(), quad.p2(), quad.p3() };
+    FloatPoint points[4] = { quad.p1(), quad.p4(), quad.p2(), quad.p3() };
     if (points[0].x() > points[1].x())
         std::swap(points[0], points[1]);
     if (points[2].x() > points[3].x())
@@ -1178,7 +1179,7 @@ static WebCore::FloatQuad inflateQuad(const WebCore::FloatQuad& quad, float infl
     points[2].move(inflateSize, -inflateSize);
     points[3].move(inflateSize, inflateSize);
 
-    return WebCore::FloatQuad(points[1], points[0], points[2], points[3]);
+    return FloatQuad(points[1], points[0], points[2], points[3]);
 }
 
 #if ENABLE(TOUCH_EVENTS)
@@ -1215,9 +1216,9 @@ static NSValue *nsSizeForTapHighlightBorderRadius(WebCore::IntSize borderRadius,
     const size_t quadCount = highlightedQuads.size();
     RetainPtr<NSMutableArray> rects = adoptNS([[NSMutableArray alloc] initWithCapacity:static_cast<const NSUInteger>(quadCount)]);
     for (size_t i = 0; i < quadCount; ++i) {
-        const WebCore::FloatQuad& quad = highlightedQuads[i];
+        const FloatQuad& quad = highlightedQuads[i];
         if (quad.isRectilinear()) {
-            WebCore::FloatRect boundingBox = quad.boundingBox();
+            FloatRect boundingBox = quad.boundingBox();
             boundingBox.scale(selfScale);
             boundingBox.inflate(minimumTapHighlightRadius);
             CGRect pixelAlignedRect = static_cast<CGRect>(encloseRectToDevicePixels(boundingBox, deviceScaleFactor));
@@ -1234,9 +1235,9 @@ static NSValue *nsSizeForTapHighlightBorderRadius(WebCore::IntSize borderRadius,
     else {
         RetainPtr<NSMutableArray> quads = adoptNS([[NSMutableArray alloc] initWithCapacity:static_cast<const NSUInteger>(quadCount)]);
         for (size_t i = 0; i < quadCount; ++i) {
-            WebCore::FloatQuad quad = highlightedQuads[i];
+            FloatQuad quad = highlightedQuads[i];
             quad.scale(selfScale);
-            WebCore::FloatQuad extendedQuad = inflateQuad(quad, minimumTapHighlightRadius);
+            FloatQuad extendedQuad = inflateQuad(quad, minimumTapHighlightRadius);
             [quads addObject:[NSValue valueWithCGPoint:extendedQuad.p1()]];
             [quads addObject:[NSValue valueWithCGPoint:extendedQuad.p2()]];
             [quads addObject:[NSValue valueWithCGPoint:extendedQuad.p3()]];
@@ -1255,7 +1256,7 @@ static NSValue *nsSizeForTapHighlightBorderRadius(WebCore::IntSize borderRadius,
 
 - (void)_showTapHighlight
 {
-    auto shouldPaintTapHighlight = [&](const WebCore::FloatRect& rect) {
+    auto shouldPaintTapHighlight = [&](const FloatRect& rect) {
         static const float highlightPaintThreshold = 0.3; // 30%
         float highlightArea = 0;
         for (auto highlightQuad : _tapHighlightInformation.quads) {
@@ -1359,18 +1360,18 @@ static NSValue *nsSizeForTapHighlightBorderRadius(WebCore::IntSize borderRadius,
 {
     // FIXME: We should add the logic to handle keyboard visibility during focus redirects.
     switch (_assistedNodeInformation.elementType) {
-    case WebKit::InputType::None:
+    case InputType::None:
         return NO;
-    case WebKit::InputType::Select:
+    case InputType::Select:
 #if ENABLE(INPUT_TYPE_COLOR)
-    case WebKit::InputType::Color:
+    case InputType::Color:
 #endif
-    case WebKit::InputType::Date:
-    case WebKit::InputType::Month:
-    case WebKit::InputType::DateTimeLocal:
-    case WebKit::InputType::Time:
+    case InputType::Date:
+    case InputType::Month:
+    case InputType::DateTimeLocal:
+    case InputType::Time:
         return !currentUserInterfaceIdiomIsPad();
-    case WebKit::InputType::Drawing:
+    case InputType::Drawing:
         return YES;
     default:
         return !_assistedNodeInformation.isReadOnly;
@@ -1385,17 +1386,17 @@ static NSValue *nsSizeForTapHighlightBorderRadius(WebCore::IntSize borderRadius,
 
 - (void)_displayFormNodeInputView
 {
-    if (!_suppressSelectionAssistantReasons.contains(WebKit::FocusedElementIsTransparent)) {
+    if (!_suppressSelectionAssistantReasons.contains(FocusedElementIsTransparent)) {
         // In case user scaling is force enabled, do not use that scaling when zooming in with an input field.
         // Zooming above the page's default scale factor should only happen when the user performs it.
         [self _zoomToFocusRect:_assistedNodeInformation.elementRect
-            selectionRect:_didAccessoryTabInitiateFocus ? WebCore::IntRect() : _assistedNodeInformation.selectionRect
+            selectionRect:_didAccessoryTabInitiateFocus ? IntRect() : _assistedNodeInformation.selectionRect
             insideFixed:_assistedNodeInformation.insideFixedPosition
             fontSize:_assistedNodeInformation.nodeFontSize
             minimumScale:_assistedNodeInformation.minimumScaleFactor
             maximumScale:_assistedNodeInformation.maximumScaleFactorIgnoringAlwaysScalable
             allowScaling:_assistedNodeInformation.allowsUserScalingIgnoringAlwaysScalable && !currentUserInterfaceIdiomIsPad()
-            forceScroll:(_assistedNodeInformation.inputMode == WebCore::InputMode::None) ? !currentUserInterfaceIdiomIsPad() : [self requiresAccessoryView]];
+            forceScroll:(_assistedNodeInformation.inputMode == InputMode::None) ? !currentUserInterfaceIdiomIsPad() : [self requiresAccessoryView]];
     }
 
     _didAccessoryTabInitiateFocus = NO;
@@ -1408,20 +1409,20 @@ static NSValue *nsSizeForTapHighlightBorderRadius(WebCore::IntSize borderRadius,
     if (!hasAssistedNode(_assistedNodeInformation))
         return nil;
 
-    if (_assistedNodeInformation.inputMode == WebCore::InputMode::None)
+    if (_assistedNodeInformation.inputMode == InputMode::None)
         return [[UIView new] autorelease];
 
     if (!_inputPeripheral) {
         switch (_assistedNodeInformation.elementType) {
-        case WebKit::InputType::Select:
+        case InputType::Select:
             _inputPeripheral = adoptNS([[WKFormSelectControl alloc] initWithView:self]);
             break;
 #if ENABLE(INPUT_TYPE_COLOR)
-        case WebKit::InputType::Color:
+        case InputType::Color:
             _inputPeripheral = adoptNS([[WKFormColorControl alloc] initWithView:self]);
             break;
 #endif
-        case WebKit::InputType::Drawing:
+        case InputType::Drawing:
 #if HAVE(PENCILKIT)
             _inputPeripheral = adoptNS([[WKInkPickerControl alloc] initWithDrawingView:_page->editableImageController().editableImage(_assistedNodeInformation.embeddedViewID)->drawingView.get()]);
             break;
@@ -1559,7 +1560,7 @@ static inline bool isSamePair(UIGestureRecognizer *a, UIGestureRecognizer *b, UI
     [_actionSheetAssistant showDataDetectorsSheet];
 }
 
-- (SEL)_actionForLongPressFromPositionInformation:(const WebKit::InteractionInformationAtPosition&)positionInformation
+- (SEL)_actionForLongPressFromPositionInformation:(const InteractionInformationAtPosition&)positionInformation
 {
     if (!_webView.configuration._longPressActionsEnabled)
         return nil;
@@ -1572,7 +1573,7 @@ static inline bool isSamePair(UIGestureRecognizer *a, UIGestureRecognizer *b, UI
 
     if (positionInformation.isLink) {
 #if ENABLE(DATA_DETECTION)
-        if (WebCore::DataDetection::canBePresentedByDataDetectors(positionInformation.url))
+        if (DataDetection::canBePresentedByDataDetectors(positionInformation.url))
             return @selector(_showDataDetectorsSheet);
 #endif
         return @selector(_showLinkSheet);
@@ -1588,12 +1589,12 @@ static inline bool isSamePair(UIGestureRecognizer *a, UIGestureRecognizer *b, UI
     return [self _actionForLongPressFromPositionInformation:_positionInformation];
 }
 
-- (WebKit::InteractionInformationAtPosition)currentPositionInformation
+- (InteractionInformationAtPosition)currentPositionInformation
 {
     return _positionInformation;
 }
 
-- (void)doAfterPositionInformationUpdate:(void (^)(WebKit::InteractionInformationAtPosition))action forRequest:(WebKit::InteractionInformationRequest)request
+- (void)doAfterPositionInformationUpdate:(void (^)(InteractionInformationAtPosition))action forRequest:(InteractionInformationRequest)request
 {
     if ([self _currentPositionInformationIsValidForRequest:request]) {
         // If the most recent position information is already valid, invoke the given action block immediately.
@@ -1638,17 +1639,17 @@ static inline bool isSamePair(UIGestureRecognizer *a, UIGestureRecognizer *b, UI
     _page->requestPositionInformation(request);
 }
 
-- (BOOL)_currentPositionInformationIsValidForRequest:(const WebKit::InteractionInformationRequest&)request
+- (BOOL)_currentPositionInformationIsValidForRequest:(const InteractionInformationRequest&)request
 {
     return _hasValidPositionInformation && _positionInformation.request.isValidForRequest(request);
 }
 
-- (BOOL)_hasValidOutstandingPositionInformationRequest:(const WebKit::InteractionInformationRequest&)request
+- (BOOL)_hasValidOutstandingPositionInformationRequest:(const InteractionInformationRequest&)request
 {
     return _outstandingPositionInformationRequest && _outstandingPositionInformationRequest->isValidForRequest(request);
 }
 
-- (BOOL)_currentPositionInformationIsApproximatelyValidForRequest:(const WebKit::InteractionInformationRequest&)request
+- (BOOL)_currentPositionInformationIsApproximatelyValidForRequest:(const InteractionInformationRequest&)request
 {
     return _hasValidPositionInformation && _positionInformation.request.isApproximatelyValidForRequest(request);
 }
@@ -1714,7 +1715,7 @@ static inline bool isSamePair(UIGestureRecognizer *a, UIGestureRecognizer *b, UI
         if (hasAssistedNode(_assistedNodeInformation)) {
             // Request information about the position with sync message.
             // If the assisted node is the same, prevent the gesture.
-            if (![self ensurePositionInformationIsUpToDate:WebKit::InteractionInformationRequest(WebCore::roundedIntPoint(point))])
+            if (![self ensurePositionInformationIsUpToDate:InteractionInformationRequest(roundedIntPoint(point))])
                 return NO;
             if (_positionInformation.nodeAtPositionIsAssistedNode)
                 return NO;
@@ -1733,7 +1734,7 @@ static inline bool isSamePair(UIGestureRecognizer *a, UIGestureRecognizer *b, UI
         // We still have no idea about what is at the location.
         // Send an async message to find out.
         _hasValidPositionInformation = NO;
-        WebKit::InteractionInformationRequest request(WebCore::roundedIntPoint(point));
+        InteractionInformationRequest request(roundedIntPoint(point));
 
         // If 3D Touch is enabled, asynchronously collect snapshots in the hopes that
         // they'll arrive before we have to synchronously request them in
@@ -1752,7 +1753,7 @@ static inline bool isSamePair(UIGestureRecognizer *a, UIGestureRecognizer *b, UI
         // Use the information retrieved with one of the previous calls
         // to gestureRecognizerShouldBegin.
         // Force a sync call if not ready yet.
-        WebKit::InteractionInformationRequest request(WebCore::roundedIntPoint(point));
+        InteractionInformationRequest request(roundedIntPoint(point));
         if (![self ensurePositionInformationIsUpToDate:request])
             return NO;
 
@@ -1809,7 +1810,7 @@ static inline bool isSamePair(UIGestureRecognizer *a, UIGestureRecognizer *b, UI
     if (_inspectorNodeSearchEnabled)
         return NO;
 
-    WebKit::InteractionInformationRequest request(WebCore::roundedIntPoint(point));
+    InteractionInformationRequest request(roundedIntPoint(point));
     if (![self ensurePositionInformationIsUpToDate:request])
         return NO;
 
@@ -1832,7 +1833,7 @@ static inline bool isSamePair(UIGestureRecognizer *a, UIGestureRecognizer *b, UI
     if (_suppressSelectionAssistantReasons)
         return NO;
 
-    WebKit::InteractionInformationRequest request(WebCore::roundedIntPoint(point));
+    InteractionInformationRequest request(roundedIntPoint(point));
     if (![self ensurePositionInformationIsUpToDate:request])
         return NO;
     return _positionInformation.isNearMarkedText;
@@ -1846,7 +1847,7 @@ static inline bool isSamePair(UIGestureRecognizer *a, UIGestureRecognizer *b, UI
     if (_suppressSelectionAssistantReasons)
         return NO;
 
-    WebKit::InteractionInformationRequest request(WebCore::roundedIntPoint(point));
+    InteractionInformationRequest request(roundedIntPoint(point));
     if (![self ensurePositionInformationIsUpToDate:request])
         return NO;
 
@@ -1890,7 +1891,7 @@ static inline bool isSamePair(UIGestureRecognizer *a, UIGestureRecognizer *b, UI
         const WebCore::SelectionRect& coreRect = selectionRects[i];
         WebSelectionRect *webRect = [WebSelectionRect selectionRect];
         webRect.rect = coreRect.rect();
-        webRect.writingDirection = coreRect.direction() == WebCore::TextDirection::LTR ? WKWritingDirectionLeftToRight : WKWritingDirectionRightToLeft;
+        webRect.writingDirection = coreRect.direction() == TextDirection::LTR ? WKWritingDirectionLeftToRight : WKWritingDirectionRightToLeft;
         webRect.isLineBreak = coreRect.isLineBreak();
         webRect.isFirstOnLine = coreRect.isFirstOnLine();
         webRect.isLastOnLine = coreRect.isLastOnLine();
@@ -1947,7 +1948,7 @@ static inline bool isSamePair(UIGestureRecognizer *a, UIGestureRecognizer *b, UI
 {
     _isTapHighlightIDValid = YES;
     _isExpectingFastSingleTapCommit = YES;
-    _page->handleTwoFingerTapAtPoint(WebCore::roundedIntPoint(gestureRecognizer.centroid), ++_latestTapID);
+    _page->handleTwoFingerTapAtPoint(roundedIntPoint(gestureRecognizer.centroid), ++_latestTapID);
 }
 
 - (void)_stylusSingleTapRecognized:(UITapGestureRecognizer *)gestureRecognizer
@@ -1956,7 +1957,7 @@ static inline bool isSamePair(UIGestureRecognizer *a, UIGestureRecognizer *b, UI
         return;
 
     ASSERT(gestureRecognizer == _stylusSingleTapGestureRecognizer);
-    _page->handleStylusSingleTapAtPoint(WebCore::roundedIntPoint(gestureRecognizer.location), ++_latestTapID);
+    _page->handleStylusSingleTapAtPoint(roundedIntPoint(gestureRecognizer.location), ++_latestTapID);
 }
 
 - (void)_longPressRecognized:(UILongPressGestureRecognizer *)gestureRecognizer
@@ -2048,7 +2049,7 @@ static void cancelPotentialTapIfNecessary(WKContentView* contentView)
 
     if (![self isFirstResponder]) {
         if (!_inputViewUpdateDeferrer)
-            _inputViewUpdateDeferrer = std::make_unique<WebKit::InputViewUpdateDeferrer>();
+            _inputViewUpdateDeferrer = std::make_unique<InputViewUpdateDeferrer>();
         [self becomeFirstResponder];
     }
 
@@ -2107,7 +2108,7 @@ static void cancelPotentialTapIfNecessary(WKContentView* contentView)
 {
     if (![self isFirstResponder]) {
         if (!_inputViewUpdateDeferrer)
-            _inputViewUpdateDeferrer = std::make_unique<WebKit::InputViewUpdateDeferrer>();
+            _inputViewUpdateDeferrer = std::make_unique<InputViewUpdateDeferrer>();
         [self becomeFirstResponder];
     }
 
@@ -2131,11 +2132,11 @@ static void cancelPotentialTapIfNecessary(WKContentView* contentView)
     _page->clearSelection();
 }
 
-- (void)_positionInformationDidChange:(const WebKit::InteractionInformationAtPosition&)info
+- (void)_positionInformationDidChange:(const InteractionInformationAtPosition&)info
 {
     _outstandingPositionInformationRequest = std::nullopt;
 
-    WebKit::InteractionInformationAtPosition newInfo = info;
+    InteractionInformationAtPosition newInfo = info;
     newInfo.mergeCompatibleOptionalInformation(_positionInformation);
 
     _positionInformation = newInfo;
@@ -2184,34 +2185,34 @@ static void cancelPotentialTapIfNecessary(WKContentView* contentView)
     if ([_formInputSession customInputAccessoryView])
         return YES;
 
-    if (_assistedNodeInformation.inputMode == WebCore::InputMode::None)
+    if (_assistedNodeInformation.inputMode == InputMode::None)
         return NO;
 
     switch (_assistedNodeInformation.elementType) {
-    case WebKit::InputType::None:
+    case InputType::None:
         return NO;
-    case WebKit::InputType::Text:
-    case WebKit::InputType::Password:
-    case WebKit::InputType::Search:
-    case WebKit::InputType::Email:
-    case WebKit::InputType::URL:
-    case WebKit::InputType::Phone:
-    case WebKit::InputType::Number:
-    case WebKit::InputType::NumberPad:
-    case WebKit::InputType::ContentEditable:
-    case WebKit::InputType::TextArea:
-    case WebKit::InputType::Select:
-    case WebKit::InputType::Date:
-    case WebKit::InputType::DateTime:
-    case WebKit::InputType::DateTimeLocal:
-    case WebKit::InputType::Month:
-    case WebKit:: InputType::Week:
-    case WebKit::InputType::Time:
+    case InputType::Text:
+    case InputType::Password:
+    case InputType::Search:
+    case InputType::Email:
+    case InputType::URL:
+    case InputType::Phone:
+    case InputType::Number:
+    case InputType::NumberPad:
+    case InputType::ContentEditable:
+    case InputType::TextArea:
+    case InputType::Select:
+    case InputType::Date:
+    case InputType::DateTime:
+    case InputType::DateTimeLocal:
+    case InputType::Month:
+    case InputType::Week:
+    case InputType::Time:
 #if ENABLE(INPUT_TYPE_COLOR)
-    case WebKit::InputType::Color:
+    case InputType::Color:
 #endif
         return !currentUserInterfaceIdiomIsPad();
-    case WebKit::InputType::Drawing:
+    case InputType::Drawing:
         return YES;
     }
 }
@@ -2256,7 +2257,7 @@ static void cancelPotentialTapIfNecessary(WKContentView* contentView)
         [plainTextTypes addObjectsFromArray:UIPasteboardTypeListString];
 
         richTypes = [[NSMutableArray alloc] init];
-        [richTypes addObject:WebCore::WebArchivePboardType];
+        [richTypes addObject:WebArchivePboardType];
         [richTypes addObjectsFromArray:UIPasteboardTypeListImage];
         [richTypes addObjectsFromArray:plainTextTypes];
     }
@@ -2278,8 +2279,8 @@ FOR_EACH_PRIVATE_WKCONTENTVIEW_ACTION(FORWARD_ACTION_TO_WKWEBVIEW)
 - (void)_lookupForWebView:(id)sender
 {
     RetainPtr<WKContentView> view = self;
-    _page->getSelectionContext([view](const String& selectedText, const String& textBefore, const String& textAfter, WebKit::CallbackBase::Error error) {
-        if (error != WebKit::CallbackBase::Error::None)
+    _page->getSelectionContext([view](const String& selectedText, const String& textBefore, const String& textAfter, CallbackBase::Error error) {
+        if (error != CallbackBase::Error::None)
             return;
         if (!selectedText)
             return;
@@ -2303,8 +2304,8 @@ FOR_EACH_PRIVATE_WKCONTENTVIEW_ACTION(FORWARD_ACTION_TO_WKWEBVIEW)
 - (void)_shareForWebView:(id)sender
 {
     RetainPtr<WKContentView> view = self;
-    _page->getSelectionOrContentsAsString([view](const String& string, WebKit::CallbackBase::Error error) {
-        if (error != WebKit::CallbackBase::Error::None)
+    _page->getSelectionOrContentsAsString([view](const String& string, CallbackBase::Error error) {
+        if (error != CallbackBase::Error::None)
             return;
         if (!string)
             return;
@@ -2464,9 +2465,9 @@ WEBCORE_COMMAND_FOR_WEBVIEW(pasteAndMatchStyle);
 
     auto typingAttributes = _page->editorState().postLayoutData().typingAttributes;
     CTFontSymbolicTraits symbolicTraits = 0;
-    if (typingAttributes & WebKit::AttributeBold)
+    if (typingAttributes & AttributeBold)
         symbolicTraits |= kCTFontBoldTrait;
-    if (typingAttributes & WebKit::AttributeItalics)
+    if (typingAttributes & AttributeItalics)
         symbolicTraits |= kCTFontTraitItalic;
 
     // We chose a random font family and size.
@@ -2480,7 +2481,7 @@ WEBCORE_COMMAND_FOR_WEBVIEW(pasteAndMatchStyle);
     if (font)
         [result setObject:(id)font.get() forKey:NSFontAttributeName];
     
-    if (typingAttributes & WebKit::AttributeUnderline)
+    if (typingAttributes & AttributeUnderline)
         [result setObject:[NSNumber numberWithInt:NSUnderlineStyleSingle] forKey:NSUnderlineStyleAttributeName];
 
     return result;
@@ -2573,10 +2574,10 @@ WEBCORE_COMMAND_FOR_WEBVIEW(pasteAndMatchStyle);
         if (focusedDocumentOrigin.isEmpty())
             return NO;
 
-        NSArray *allCustomPasteboardData = [pasteboard dataForPasteboardType:@(WebCore::PasteboardCustomData::cocoaType()) inItemSet:indices];
+        NSArray *allCustomPasteboardData = [pasteboard dataForPasteboardType:@(PasteboardCustomData::cocoaType()) inItemSet:indices];
         for (NSData *data in allCustomPasteboardData) {
-            auto buffer = WebCore::SharedBuffer::create(data);
-            if (WebCore::PasteboardCustomData::fromSharedBuffer(buffer.get()).origin == focusedDocumentOrigin)
+            auto buffer = SharedBuffer::create(data);
+            if (PasteboardCustomData::fromSharedBuffer(buffer.get()).origin == focusedDocumentOrigin)
                 return YES;
         }
         return NO;
@@ -2712,7 +2713,7 @@ WEBCORE_COMMAND_FOR_WEBVIEW(pasteAndMatchStyle);
 {
     [_textSelectionAssistant selectWord];
     // We cannot use selectWord command, because we want to be able to select the word even when it is the last in the paragraph.
-    _page->extendSelection(WebCore::WordGranularity);
+    _page->extendSelection(WordGranularity);
 }
 
 - (void)selectAllForWebView:(id)sender
@@ -2792,7 +2793,7 @@ WEBCORE_COMMAND_FOR_WEBVIEW(pasteAndMatchStyle);
 - (void)_accessibilityRetrieveRectsEnclosingSelectionOffset:(NSInteger)offset withGranularity:(UITextGranularity)granularity
 {
     RetainPtr<WKContentView> view = self;
-    _page->requestRectsForGranularityWithSelectionOffset(toWKTextGranularity(granularity), offset , [view, offset, granularity](const Vector<WebCore::SelectionRect>& selectionRects, WebKit::CallbackBase::Error error) {
+    _page->requestRectsForGranularityWithSelectionOffset(toWKTextGranularity(granularity), offset , [view, offset, granularity](const Vector<WebCore::SelectionRect>& selectionRects, CallbackBase::Error error) {
         if (error != WebKit::CallbackBase::Error::None)
             return;
         if ([view respondsToSelector:@selector(_accessibilityDidGetSelectionRects:withGranularity:atOffset:)])
@@ -2805,10 +2806,10 @@ WEBCORE_COMMAND_FOR_WEBVIEW(pasteAndMatchStyle);
     [self _accessibilityRetrieveRectsAtSelectionOffset:offset withText:text completionHandler:nil];
 }
 
-- (void)_accessibilityRetrieveRectsAtSelectionOffset:(NSInteger)offset withText:(NSString *)text completionHandler:(void (^)(const Vector<WebCore::SelectionRect>& rects))completionHandler
+- (void)_accessibilityRetrieveRectsAtSelectionOffset:(NSInteger)offset withText:(NSString *)text completionHandler:(void (^)(const Vector<SelectionRect>& rects))completionHandler
 {
     RetainPtr<WKContentView> view = self;
-    _page->requestRectsAtSelectionOffsetWithText(offset, text, [view, offset, capturedCompletionHandler = makeBlockPtr(completionHandler)](const Vector<WebCore::SelectionRect>& selectionRects, WebKit::CallbackBase::Error error) {
+    _page->requestRectsAtSelectionOffsetWithText(offset, text, [view, offset, capturedCompletionHandler = makeBlockPtr(completionHandler)](const Vector<SelectionRect>& selectionRects, CallbackBase::Error error) {
         if (capturedCompletionHandler)
             capturedCompletionHandler(selectionRects);
 
@@ -2831,160 +2832,160 @@ WEBCORE_COMMAND_FOR_WEBVIEW(pasteAndMatchStyle);
 
 // UIWKInteractionViewProtocol
 
-static inline WebKit::GestureType toGestureType(UIWKGestureType gestureType)
+static inline GestureType toGestureType(UIWKGestureType gestureType)
 {
     switch (gestureType) {
     case UIWKGestureLoupe:
-        return WebKit::GestureType::Loupe;
+        return GestureType::Loupe;
     case UIWKGestureOneFingerTap:
-        return WebKit::GestureType::OneFingerTap;
+        return GestureType::OneFingerTap;
     case UIWKGestureTapAndAHalf:
-        return WebKit::GestureType::TapAndAHalf;
+        return GestureType::TapAndAHalf;
     case UIWKGestureDoubleTap:
-        return WebKit::GestureType::DoubleTap;
+        return GestureType::DoubleTap;
     case UIWKGestureTapAndHalf:
-        return WebKit::GestureType::TapAndHalf;
+        return GestureType::TapAndHalf;
     case UIWKGestureDoubleTapInUneditable:
-        return WebKit::GestureType::DoubleTapInUneditable;
+        return GestureType::DoubleTapInUneditable;
     case UIWKGestureOneFingerTapInUneditable:
-        return WebKit::GestureType::OneFingerTapInUneditable;
+        return GestureType::OneFingerTapInUneditable;
     case UIWKGestureOneFingerTapSelectsAll:
-        return WebKit::GestureType::OneFingerTapSelectsAll;
+        return GestureType::OneFingerTapSelectsAll;
     case UIWKGestureOneFingerDoubleTap:
-        return WebKit::GestureType::OneFingerDoubleTap;
+        return GestureType::OneFingerDoubleTap;
     case UIWKGestureOneFingerTripleTap:
-        return WebKit::GestureType::OneFingerTripleTap;
+        return GestureType::OneFingerTripleTap;
     case UIWKGestureTwoFingerSingleTap:
-        return WebKit::GestureType::TwoFingerSingleTap;
+        return GestureType::TwoFingerSingleTap;
     case UIWKGestureTwoFingerRangedSelectGesture:
-        return WebKit::GestureType::TwoFingerRangedSelectGesture;
+        return GestureType::TwoFingerRangedSelectGesture;
     case UIWKGestureTapOnLinkWithGesture:
-        return WebKit::GestureType::TapOnLinkWithGesture;
+        return GestureType::TapOnLinkWithGesture;
     case UIWKGestureMakeWebSelection:
-        return WebKit::GestureType::MakeWebSelection;
+        return GestureType::MakeWebSelection;
     case UIWKGesturePhraseBoundary:
-        return WebKit::GestureType::PhraseBoundary;
+        return GestureType::PhraseBoundary;
     }
     ASSERT_NOT_REACHED();
-    return WebKit::GestureType::Loupe;
+    return GestureType::Loupe;
 }
 
-static inline UIWKGestureType toUIWKGestureType(WebKit::GestureType gestureType)
+static inline UIWKGestureType toUIWKGestureType(GestureType gestureType)
 {
     switch (gestureType) {
-    case WebKit::GestureType::Loupe:
+    case GestureType::Loupe:
         return UIWKGestureLoupe;
-    case WebKit::GestureType::OneFingerTap:
+    case GestureType::OneFingerTap:
         return UIWKGestureOneFingerTap;
-    case WebKit::GestureType::TapAndAHalf:
+    case GestureType::TapAndAHalf:
         return UIWKGestureTapAndAHalf;
-    case WebKit::GestureType::DoubleTap:
+    case GestureType::DoubleTap:
         return UIWKGestureDoubleTap;
-    case WebKit::GestureType::TapAndHalf:
+    case GestureType::TapAndHalf:
         return UIWKGestureTapAndHalf;
-    case WebKit::GestureType::DoubleTapInUneditable:
+    case GestureType::DoubleTapInUneditable:
         return UIWKGestureDoubleTapInUneditable;
-    case WebKit::GestureType::OneFingerTapInUneditable:
+    case GestureType::OneFingerTapInUneditable:
         return UIWKGestureOneFingerTapInUneditable;
-    case WebKit::GestureType::OneFingerTapSelectsAll:
+    case GestureType::OneFingerTapSelectsAll:
         return UIWKGestureOneFingerTapSelectsAll;
-    case WebKit::GestureType::OneFingerDoubleTap:
+    case GestureType::OneFingerDoubleTap:
         return UIWKGestureOneFingerDoubleTap;
-    case WebKit::GestureType::OneFingerTripleTap:
+    case GestureType::OneFingerTripleTap:
         return UIWKGestureOneFingerTripleTap;
-    case WebKit::GestureType::TwoFingerSingleTap:
+    case GestureType::TwoFingerSingleTap:
         return UIWKGestureTwoFingerSingleTap;
-    case WebKit::GestureType::TwoFingerRangedSelectGesture:
+    case GestureType::TwoFingerRangedSelectGesture:
         return UIWKGestureTwoFingerRangedSelectGesture;
-    case WebKit::GestureType::TapOnLinkWithGesture:
+    case GestureType::TapOnLinkWithGesture:
         return UIWKGestureTapOnLinkWithGesture;
-    case WebKit::GestureType::MakeWebSelection:
+    case GestureType::MakeWebSelection:
         return UIWKGestureMakeWebSelection;
-    case WebKit::GestureType::PhraseBoundary:
+    case GestureType::PhraseBoundary:
         return UIWKGesturePhraseBoundary;
     }
 }
 
-static inline WebKit::SelectionTouch toSelectionTouch(UIWKSelectionTouch touch)
+static inline SelectionTouch toSelectionTouch(UIWKSelectionTouch touch)
 {
     switch (touch) {
     case UIWKSelectionTouchStarted:
-        return WebKit::SelectionTouch::Started;
+        return SelectionTouch::Started;
     case UIWKSelectionTouchMoved:
-        return WebKit::SelectionTouch::Moved;
+        return SelectionTouch::Moved;
     case UIWKSelectionTouchEnded:
-        return WebKit::SelectionTouch::Ended;
+        return SelectionTouch::Ended;
     case UIWKSelectionTouchEndedMovingForward:
-        return WebKit::SelectionTouch::EndedMovingForward;
+        return SelectionTouch::EndedMovingForward;
     case UIWKSelectionTouchEndedMovingBackward:
-        return WebKit::SelectionTouch::EndedMovingBackward;
+        return SelectionTouch::EndedMovingBackward;
     case UIWKSelectionTouchEndedNotMoving:
-        return WebKit::SelectionTouch::EndedNotMoving;
+        return SelectionTouch::EndedNotMoving;
     }
     ASSERT_NOT_REACHED();
-    return WebKit::SelectionTouch::Ended;
+    return SelectionTouch::Ended;
 }
 
-static inline UIWKSelectionTouch toUIWKSelectionTouch(WebKit::SelectionTouch touch)
+static inline UIWKSelectionTouch toUIWKSelectionTouch(SelectionTouch touch)
 {
     switch (touch) {
-    case WebKit::SelectionTouch::Started:
+    case SelectionTouch::Started:
         return UIWKSelectionTouchStarted;
-    case WebKit::SelectionTouch::Moved:
+    case SelectionTouch::Moved:
         return UIWKSelectionTouchMoved;
-    case WebKit::SelectionTouch::Ended:
+    case SelectionTouch::Ended:
         return UIWKSelectionTouchEnded;
-    case WebKit::SelectionTouch::EndedMovingForward:
+    case SelectionTouch::EndedMovingForward:
         return UIWKSelectionTouchEndedMovingForward;
-    case WebKit::SelectionTouch::EndedMovingBackward:
+    case SelectionTouch::EndedMovingBackward:
         return UIWKSelectionTouchEndedMovingBackward;
-    case WebKit::SelectionTouch::EndedNotMoving:
+    case SelectionTouch::EndedNotMoving:
         return UIWKSelectionTouchEndedNotMoving;
     }
 }
 
-static inline WebKit::GestureRecognizerState toGestureRecognizerState(UIGestureRecognizerState state)
+static inline GestureRecognizerState toGestureRecognizerState(UIGestureRecognizerState state)
 {
     switch (state) {
     case UIGestureRecognizerStatePossible:
-        return WebKit::GestureRecognizerState::Possible;
+        return GestureRecognizerState::Possible;
     case UIGestureRecognizerStateBegan:
-        return WebKit::GestureRecognizerState::Began;
+        return GestureRecognizerState::Began;
     case UIGestureRecognizerStateChanged:
-        return WebKit::GestureRecognizerState::Changed;
+        return GestureRecognizerState::Changed;
     case UIGestureRecognizerStateCancelled:
-        return WebKit::GestureRecognizerState::Cancelled;
+        return GestureRecognizerState::Cancelled;
     case UIGestureRecognizerStateEnded:
-        return WebKit::GestureRecognizerState::Ended;
+        return GestureRecognizerState::Ended;
     case UIGestureRecognizerStateFailed:
-        return WebKit::GestureRecognizerState::Failed;
+        return GestureRecognizerState::Failed;
     }
 }
 
-static inline UIGestureRecognizerState toUIGestureRecognizerState(WebKit::GestureRecognizerState state)
+static inline UIGestureRecognizerState toUIGestureRecognizerState(GestureRecognizerState state)
 {
     switch (state) {
-    case WebKit::GestureRecognizerState::Possible:
+    case GestureRecognizerState::Possible:
         return UIGestureRecognizerStatePossible;
-    case WebKit::GestureRecognizerState::Began:
+    case GestureRecognizerState::Began:
         return UIGestureRecognizerStateBegan;
-    case WebKit::GestureRecognizerState::Changed:
+    case GestureRecognizerState::Changed:
         return UIGestureRecognizerStateChanged;
-    case WebKit::GestureRecognizerState::Cancelled:
+    case GestureRecognizerState::Cancelled:
         return UIGestureRecognizerStateCancelled;
-    case WebKit::GestureRecognizerState::Ended:
+    case GestureRecognizerState::Ended:
         return UIGestureRecognizerStateEnded;
-    case WebKit::GestureRecognizerState::Failed:
+    case GestureRecognizerState::Failed:
         return UIGestureRecognizerStateFailed;
     }
 }
 
-static inline UIWKSelectionFlags toUIWKSelectionFlags(WebKit::SelectionFlags flags)
+static inline UIWKSelectionFlags toUIWKSelectionFlags(SelectionFlags flags)
 {
     NSInteger uiFlags = UIWKNone;
-    if (flags & WebKit::WordIsNearTap)
+    if (flags & WordIsNearTap)
         uiFlags |= UIWKWordIsNearTap;
-    if (flags & WebKit::PhraseBoundaryChanged)
+    if (flags & PhraseBoundaryChanged)
         uiFlags |= UIWKPhraseBoundaryChanged;
 
     return static_cast<UIWKSelectionFlags>(uiFlags);
@@ -2994,17 +2995,17 @@ static inline WebCore::TextGranularity toWKTextGranularity(UITextGranularity gra
 {
     switch (granularity) {
     case UITextGranularityCharacter:
-        return WebCore::CharacterGranularity;
+        return CharacterGranularity;
     case UITextGranularityWord:
-        return WebCore::WordGranularity;
+        return WordGranularity;
     case UITextGranularitySentence:
-        return WebCore::SentenceGranularity;
+        return SentenceGranularity;
     case UITextGranularityParagraph:
-        return WebCore::ParagraphGranularity;
+        return ParagraphGranularity;
     case UITextGranularityLine:
-        return WebCore::LineGranularity;
+        return LineGranularity;
     case UITextGranularityDocument:
-        return WebCore::DocumentGranularity;
+        return DocumentGranularity;
     }
 }
 
@@ -3013,14 +3014,14 @@ static inline WebCore::SelectionDirection toWKSelectionDirection(UITextDirection
     switch (direction) {
     case UITextLayoutDirectionDown:
     case UITextLayoutDirectionRight:
-        return WebCore::DirectionRight;
+        return DirectionRight;
     case UITextLayoutDirectionUp:
     case UITextLayoutDirectionLeft:
-        return WebCore::DirectionLeft;
+        return DirectionLeft;
     default:
         // UITextDirection is not an enum, but we only want to accept values from UITextLayoutDirection.
         ASSERT_NOT_REACHED();
-        return WebCore::DirectionRight;
+        return DirectionRight;
     }
 }
 
@@ -3030,7 +3031,7 @@ static void selectionChangedWithGesture(WKContentView *view, const WebCore::IntP
         ASSERT_NOT_REACHED();
         return;
     }
-    [(UIWKTextInteractionAssistant *)[view interactionAssistant] selectionChangedWithGestureAt:(CGPoint)point withGesture:toUIWKGestureType((WebKit::GestureType)gestureType) withState:toUIGestureRecognizerState(static_cast<WebKit::GestureRecognizerState>(gestureState)) withFlags:(toUIWKSelectionFlags((WebKit::SelectionFlags)flags))];
+    [(UIWKTextInteractionAssistant *)[view interactionAssistant] selectionChangedWithGestureAt:(CGPoint)point withGesture:toUIWKGestureType((GestureType)gestureType) withState:toUIGestureRecognizerState(static_cast<GestureRecognizerState>(gestureState)) withFlags:(toUIWKSelectionFlags((SelectionFlags)flags))];
 }
 
 static void selectionChangedWithTouch(WKContentView *view, const WebCore::IntPoint& point, uint32_t touch, uint32_t flags, WebKit::CallbackBase::Error error)
@@ -3039,7 +3040,7 @@ static void selectionChangedWithTouch(WKContentView *view, const WebCore::IntPoi
         ASSERT_NOT_REACHED();
         return;
     }
-    [(UIWKTextInteractionAssistant *)[view interactionAssistant] selectionChangedWithTouchAt:(CGPoint)point withSelectionTouch:toUIWKSelectionTouch((WebKit::SelectionTouch)touch) withFlags:static_cast<UIWKSelectionFlags>(flags)];
+    [(UIWKTextInteractionAssistant *)[view interactionAssistant] selectionChangedWithTouchAt:(CGPoint)point withSelectionTouch:toUIWKSelectionTouch((SelectionTouch)touch) withFlags:static_cast<UIWKSelectionFlags>(flags)];
 }
 
 - (BOOL)_isInteractingWithAssistedNode
@@ -3055,7 +3056,7 @@ static void selectionChangedWithTouch(WKContentView *view, const WebCore::IntPoi
 - (void)changeSelectionWithGestureAt:(CGPoint)point withGesture:(UIWKGestureType)gestureType withState:(UIGestureRecognizerState)state withFlags:(UIWKSelectionFlags)flags
 {
     _usingGestureForSelection = YES;
-    _page->selectWithGesture(WebCore::IntPoint(point), WebCore::CharacterGranularity, static_cast<uint32_t>(toGestureType(gestureType)), static_cast<uint32_t>(toGestureRecognizerState(state)), [self _isInteractingWithAssistedNode], [self, state, flags](const WebCore::IntPoint& point, uint32_t gestureType, uint32_t gestureState, uint32_t innerFlags, WebKit::CallbackBase::Error error) {
+    _page->selectWithGesture(WebCore::IntPoint(point), CharacterGranularity, static_cast<uint32_t>(toGestureType(gestureType)), static_cast<uint32_t>(toGestureRecognizerState(state)), [self _isInteractingWithAssistedNode], [self, state, flags](const WebCore::IntPoint& point, uint32_t gestureType, uint32_t gestureState, uint32_t innerFlags, WebKit::CallbackBase::Error error) {
         selectionChangedWithGesture(self, point, gestureType, gestureState, flags | innerFlags, error);
         if (state == UIGestureRecognizerStateEnded || state == UIGestureRecognizerStateCancelled)
             _usingGestureForSelection = NO;
@@ -3094,7 +3095,7 @@ static void selectionChangedWithTouch(WKContentView *view, const WebCore::IntPoi
     });
 }
 
-- (const WebKit::WKAutoCorrectionData&)autocorrectionData
+- (const WKAutoCorrectionData&)autocorrectionData
 {
     return _autocorrectionData;
 }
@@ -3109,7 +3110,7 @@ static void selectionChangedWithTouch(WKContentView *view, const WebCore::IntPoi
 
     RetainPtr<WKContentView> view = self;
     _autocorrectionData.autocorrectionHandler = [completionHandler copy];
-    _page->requestAutocorrectionData(input, [view](const Vector<WebCore::FloatRect>& rects, const String& fontName, double fontSize, uint64_t traits, WebKit::CallbackBase::Error) {
+    _page->requestAutocorrectionData(input, [view](const Vector<FloatRect>& rects, const String& fontName, double fontSize, uint64_t traits, WebKit::CallbackBase::Error) {
         CGRect firstRect = CGRectZero;
         CGRect lastRect = CGRectZero;
         if (rects.size()) {
@@ -3349,7 +3350,7 @@ static void selectionChangedWithTouch(WKContentView *view, const WebCore::IntPoi
     auto completionHandlerCopy = Block_copy(completionHandler);
     RetainPtr<WKContentView> view = self;
     _page->setInitialFocus(selectingForward, false, WebKit::WebKeyboardEvent(), [view, completionHandlerCopy](WebKit::CallbackBase::Error) {
-        BOOL didBecomeFirstResponder = view->_assistedNodeInformation.elementType != WebKit::InputType::None && [view becomeFirstResponder];
+        BOOL didBecomeFirstResponder = view->_assistedNodeInformation.elementType != InputType::None && [view becomeFirstResponder];
         completionHandlerCopy(didBecomeFirstResponder);
         Block_release(completionHandlerCopy);
     });
@@ -3400,10 +3401,10 @@ static void selectionChangedWithTouch(WKContentView *view, const WebCore::IntPoi
         [_formAccessoryView setClearVisible:NO];
     else {
         switch (_assistedNodeInformation.elementType) {
-        case WebKit::InputType::Date:
-        case WebKit::InputType::Month:
-        case WebKit::InputType::DateTimeLocal:
-        case WebKit::InputType::Time:
+        case InputType::Date:
+        case InputType::Month:
+        case InputType::DateTimeLocal:
+        case InputType::Time:
             [_formAccessoryView setClearVisible:YES];
             break;
         default:
@@ -3469,8 +3470,8 @@ static void selectionChangedWithTouch(WKContentView *view, const WebCore::IntPoi
         return nil;
     
     auto& postLayoutEditorStateData = _page->editorState().postLayoutData();
-    WebCore::FloatRect startRect = postLayoutEditorStateData.caretRectAtStart;
-    WebCore::FloatRect endRect = postLayoutEditorStateData.caretRectAtEnd;
+    FloatRect startRect = postLayoutEditorStateData.caretRectAtStart;
+    FloatRect endRect = postLayoutEditorStateData.caretRectAtEnd;
     double inverseScale = [self inverseScale];
     // We want to keep the original caret width, while the height scales with
     // the content taking orientation into account.
@@ -3549,7 +3550,7 @@ static void selectionChangedWithTouch(WKContentView *view, const WebCore::IntPoi
 - (void)setMarkedText:(NSString *)markedText selectedRange:(NSRange)selectedRange
 {
     _markedText = markedText;
-    _page->setCompositionAsync(markedText, Vector<WebCore::CompositionUnderline>(), selectedRange, WebKit::EditingRange());
+    _page->setCompositionAsync(markedText, Vector<WebCore::CompositionUnderline>(), selectedRange, EditingRange());
 }
 
 - (void)unmarkText
@@ -3613,18 +3614,18 @@ static void selectionChangedWithTouch(WKContentView *view, const WebCore::IntPoi
     return NSWritingDirectionLeftToRight;
 }
 
-static WebKit::WritingDirection coreWritingDirection(NSWritingDirection direction)
+static WritingDirection coreWritingDirection(NSWritingDirection direction)
 {
     switch (direction) {
     case NSWritingDirectionNatural:
-        return WebCore::WritingDirection::Natural;
+        return WritingDirection::Natural;
     case NSWritingDirectionLeftToRight:
-        return WebCore::WritingDirection::LeftToRight;
+        return WritingDirection::LeftToRight;
     case NSWritingDirectionRightToLeft:
-        return WebCore::WritingDirection::RightToLeft;
+        return WritingDirection::RightToLeft;
     default:
         ASSERT_NOT_REACHED();
-        return WebCore::WritingDirection::Natural;
+        return WritingDirection::Natural;
     }
 }
 
@@ -3646,7 +3647,7 @@ static WebKit::WritingDirection coreWritingDirection(NSWritingDirection directio
 - (UITextPosition *)closestPositionToPoint:(CGPoint)point
 {
 #if PLATFORM(IOSMAC)
-    WebKit::InteractionInformationRequest request(WebCore::roundedIntPoint(point));
+    InteractionInformationRequest request(roundedIntPoint(point));
     [self requestAsynchronousPositionInformationUpdate:request];
     if ([self _currentPositionInformationIsApproximatelyValidForRequest:request] && _positionInformation.isSelectable)
         return [WKTextPosition textPositionWithRect:_positionInformation.caretRect];
@@ -3672,7 +3673,7 @@ static WebKit::WritingDirection coreWritingDirection(NSWritingDirection directio
 // Inserts the given string, replacing any selected or marked text.
 - (void)insertText:(NSString *)aStringValue
 {
-    _page->insertTextAsync(aStringValue, WebKit::EditingRange());
+    _page->insertTextAsync(aStringValue, EditingRange());
 }
 
 - (BOOL)hasText
@@ -3792,13 +3793,13 @@ static NSString *contentTypeFromFieldName(WebCore::AutofillFieldName fieldName)
     if (!_traits)
         _traits = adoptNS([[UITextInputTraits alloc] init]);
 
-    [_traits setSecureTextEntry:_assistedNodeInformation.elementType == WebKit::InputType::Password || [_formInputSession forceSecureTextEntry]];
-    [_traits setShortcutConversionType:_assistedNodeInformation.elementType == WebKit::InputType::Password ? UITextShortcutConversionTypeNo : UITextShortcutConversionTypeDefault];
+    [_traits setSecureTextEntry:_assistedNodeInformation.elementType == InputType::Password || [_formInputSession forceSecureTextEntry]];
+    [_traits setShortcutConversionType:_assistedNodeInformation.elementType == InputType::Password ? UITextShortcutConversionTypeNo : UITextShortcutConversionTypeDefault];
 
     if (!_assistedNodeInformation.formAction.isEmpty())
-        [_traits setReturnKeyType:(_assistedNodeInformation.elementType == WebKit::InputType::Search) ? UIReturnKeySearch : UIReturnKeyGo];
+        [_traits setReturnKeyType:(_assistedNodeInformation.elementType == InputType::Search) ? UIReturnKeySearch : UIReturnKeyGo];
 
-    if (_assistedNodeInformation.elementType == WebKit::InputType::Password || _assistedNodeInformation.elementType == WebKit::InputType::Email || _assistedNodeInformation.elementType == WebKit::InputType::URL || _assistedNodeInformation.formAction.contains("login")) {
+    if (_assistedNodeInformation.elementType == InputType::Password || _assistedNodeInformation.elementType == InputType::Email || _assistedNodeInformation.elementType == InputType::URL || _assistedNodeInformation.formAction.contains("login")) {
         [_traits setAutocapitalizationType:UITextAutocapitalizationTypeNone];
         [_traits setAutocorrectionType:UITextAutocorrectionTypeNo];
     } else {
@@ -3807,64 +3808,64 @@ static NSString *contentTypeFromFieldName(WebCore::AutofillFieldName fieldName)
     }
 
     switch (_assistedNodeInformation.inputMode) {
-    case WebCore::InputMode::Unspecified:
+    case InputMode::Unspecified:
         switch (_assistedNodeInformation.elementType) {
-        case WebKit::InputType::Phone:
+        case InputType::Phone:
             [_traits setKeyboardType:UIKeyboardTypePhonePad];
             break;
-        case WebKit::InputType::URL:
+        case InputType::URL:
             [_traits setKeyboardType:UIKeyboardTypeURL];
             break;
-        case WebKit::InputType::Email:
+        case InputType::Email:
             [_traits setKeyboardType:UIKeyboardTypeEmailAddress];
             break;
-        case WebKit::InputType::Number:
+        case InputType::Number:
             [_traits setKeyboardType:UIKeyboardTypeNumbersAndPunctuation];
             break;
-        case WebKit::InputType::NumberPad:
+        case InputType::NumberPad:
             [_traits setKeyboardType:UIKeyboardTypeNumberPad];
             break;
-        case WebKit::InputType::None:
-        case WebKit::InputType::ContentEditable:
-        case WebKit::InputType::Text:
-        case WebKit::InputType::Password:
-        case WebKit::InputType::TextArea:
-        case WebKit::InputType::Search:
-        case WebKit::InputType::Date:
-        case WebKit::InputType::DateTime:
-        case WebKit::InputType::DateTimeLocal:
-        case WebKit::InputType::Month:
-        case WebKit::InputType::Week:
-        case WebKit::InputType::Time:
-        case WebKit::InputType::Select:
-        case WebKit::InputType::Drawing:
+        case InputType::None:
+        case InputType::ContentEditable:
+        case InputType::Text:
+        case InputType::Password:
+        case InputType::TextArea:
+        case InputType::Search:
+        case InputType::Date:
+        case InputType::DateTime:
+        case InputType::DateTimeLocal:
+        case InputType::Month:
+        case InputType::Week:
+        case InputType::Time:
+        case InputType::Select:
+        case InputType::Drawing:
 #if ENABLE(INPUT_TYPE_COLOR)
-        case WebKit::InputType::Color:
+        case InputType::Color:
 #endif
             [_traits setKeyboardType:UIKeyboardTypeDefault];
         }
         break;
-    case WebCore::InputMode::None:
+    case InputMode::None:
         break;
-    case WebCore::InputMode::Text:
+    case InputMode::Text:
         [_traits setKeyboardType:UIKeyboardTypeDefault];
         break;
-    case WebCore::InputMode::Telephone:
+    case InputMode::Telephone:
         [_traits setKeyboardType:UIKeyboardTypePhonePad];
         break;
-    case WebCore::InputMode::Url:
+    case InputMode::Url:
         [_traits setKeyboardType:UIKeyboardTypeURL];
         break;
-    case WebCore::InputMode::Email:
+    case InputMode::Email:
         [_traits setKeyboardType:UIKeyboardTypeEmailAddress];
         break;
-    case WebCore::InputMode::Numeric:
+    case InputMode::Numeric:
         [_traits setKeyboardType:UIKeyboardTypeNumbersAndPunctuation];
         break;
-    case WebCore::InputMode::Decimal:
+    case InputMode::Decimal:
         [_traits setKeyboardType:UIKeyboardTypeDecimalPad];
         break;
-    case WebCore::InputMode::Search:
+    case InputMode::Search:
         [_traits setKeyboardType:UIKeyboardTypeWebSearch];
         break;
     }
@@ -3958,13 +3959,13 @@ static NSString *contentTypeFromFieldName(WebCore::AutofillFieldName fieldName)
 
 - (void)handleKeyWebEvent:(::WebEvent *)theEvent
 {
-    _page->handleKeyboardEvent(WebKit::NativeWebKeyboardEvent(theEvent));
+    _page->handleKeyboardEvent(NativeWebKeyboardEvent(theEvent));
 }
 
 - (void)handleKeyWebEvent:(::WebEvent *)theEvent withCompletionHandler:(void (^)(::WebEvent *theEvent, BOOL wasHandled))completionHandler
 {
     _keyWebEventHandler = makeBlockPtr(completionHandler);
-    _page->handleKeyboardEvent(WebKit::NativeWebKeyboardEvent(theEvent));
+    _page->handleKeyboardEvent(NativeWebKeyboardEvent(theEvent));
 }
 
 - (void)_didHandleKeyEvent:(::WebEvent *)event eventWasHandled:(BOOL)eventWasHandled
@@ -4068,20 +4069,20 @@ static NSString *contentTypeFromFieldName(WebCore::AutofillFieldName fieldName)
     if (_page->editorState().isContentEditable)
         return NO;
 
-    if (_assistedNodeInformation.elementType == WebKit::InputType::Select)
+    if (_assistedNodeInformation.elementType == InputType::Select)
         return NO;
 
     return YES;
 }
 
-- (CGFloat)keyboardScrollViewAnimator:(WKKeyboardScrollViewAnimator *)animator distanceForIncrement:(WebKit::ScrollingIncrement)increment
+- (CGFloat)keyboardScrollViewAnimator:(WKKeyboardScrollViewAnimator *)animator distanceForIncrement:(ScrollingIncrement)increment
 {
     switch (increment) {
-    case WebKit::ScrollingIncrement::Document:
+    case ScrollingIncrement::Document:
         return [self convertRect:self.bounds toView:_webView].size.height;
-    case WebKit::ScrollingIncrement::Page:
+    case ScrollingIncrement::Page:
         return [self convertSize:CGSizeMake(0, WebCore::Scrollbar::pageStep(_page->unobscuredContentRect().height(), self.bounds.size.height)) toView:_webView].height;
-    case WebKit::ScrollingIncrement::Line:
+    case ScrollingIncrement::Line:
         return [self convertSize:CGSizeMake(0, WebCore::Scrollbar::pixelsPerLineStep()) toView:_webView].height;
     }
     ASSERT_NOT_REACHED();
@@ -4337,12 +4338,12 @@ static NSString *contentTypeFromFieldName(WebCore::AutofillFieldName fieldName)
     [_textSelectionAssistant deactivateSelection];
 }
 
-- (const WebKit::AssistedNodeInformation&)assistedNodeInformation
+- (const AssistedNodeInformation&)assistedNodeInformation
 {
     return _assistedNodeInformation;
 }
 
-- (Vector<WebKit::OptionItem>&)assistedNodeSelectOptions
+- (Vector<OptionItem>&)assistedNodeSelectOptions
 {
     return _assistedNodeInformation.selectOptions;
 }
@@ -4353,33 +4354,33 @@ static NSString *contentTypeFromFieldName(WebCore::AutofillFieldName fieldName)
     return _formAccessoryView.get();
 }
 
-static bool isAssistableInputType(WebKit::InputType type)
+static bool isAssistableInputType(InputType type)
 {
     switch (type) {
-    case WebKit::InputType::ContentEditable:
-    case WebKit::InputType::Text:
-    case WebKit::InputType::Password:
-    case WebKit::InputType::TextArea:
-    case WebKit::InputType::Search:
-    case WebKit::InputType::Email:
-    case WebKit::InputType::URL:
-    case WebKit::InputType::Phone:
-    case WebKit::InputType::Number:
-    case WebKit::InputType::NumberPad:
-    case WebKit::InputType::Date:
-    case WebKit::InputType::DateTime:
-    case WebKit::InputType::DateTimeLocal:
-    case WebKit::InputType::Month:
-    case WebKit::InputType::Week:
-    case WebKit::InputType::Time:
-    case WebKit::InputType::Select:
-    case WebKit::InputType::Drawing:
+    case InputType::ContentEditable:
+    case InputType::Text:
+    case InputType::Password:
+    case InputType::TextArea:
+    case InputType::Search:
+    case InputType::Email:
+    case InputType::URL:
+    case InputType::Phone:
+    case InputType::Number:
+    case InputType::NumberPad:
+    case InputType::Date:
+    case InputType::DateTime:
+    case InputType::DateTimeLocal:
+    case InputType::Month:
+    case InputType::Week:
+    case InputType::Time:
+    case InputType::Select:
+    case InputType::Drawing:
 #if ENABLE(INPUT_TYPE_COLOR)
-    case WebKit::InputType::Color:
+    case InputType::Color:
 #endif
         return true;
 
-    case WebKit::InputType::None:
+    case InputType::None:
         return false;
     }
 
@@ -4387,7 +4388,7 @@ static bool isAssistableInputType(WebKit::InputType type)
     return false;
 }
 
-- (void)_startAssistingNode:(const WebKit::AssistedNodeInformation&)information userIsInteracting:(BOOL)userIsInteracting blurPreviousNode:(BOOL)blurPreviousNode changingActivityState:(BOOL)changingActivityState userObject:(NSObject <NSSecureCoding> *)userObject
+- (void)_startAssistingNode:(const AssistedNodeInformation&)information userIsInteracting:(BOOL)userIsInteracting blurPreviousNode:(BOOL)blurPreviousNode changingActivityState:(BOOL)changingActivityState userObject:(NSObject <NSSecureCoding> *)userObject
 {
     SetForScope<BOOL> isChangingFocusForScope { _isChangingFocus, hasAssistedNode(_assistedNodeInformation) };
     _inputViewUpdateDeferrer = nullptr;
@@ -4409,9 +4410,9 @@ static bool isAssistableInputType(WebKit::InputType type)
         startInputSessionPolicy = [inputDelegate _webView:_webView decidePolicyForFocusedElement:focusedElementInfo.get()];
 
     if (information.elementIsTransparent)
-        [self _beginSuppressingSelectionAssistantForReason:WebKit::FocusedElementIsTransparent];
+        [self _beginSuppressingSelectionAssistantForReason:FocusedElementIsTransparent];
     else
-        [self _stopSuppressingSelectionAssistantForReason:WebKit::FocusedElementIsTransparent];
+        [self _stopSuppressingSelectionAssistantForReason:FocusedElementIsTransparent];
 
     switch (startInputSessionPolicy) {
     case _WKFocusStartsInputSessionPolicyAuto:
@@ -4487,13 +4488,13 @@ static bool isAssistableInputType(WebKit::InputType type)
 #endif
     
     switch (information.elementType) {
-    case WebKit::InputType::Select:
-    case WebKit::InputType::DateTimeLocal:
-    case WebKit::InputType::Time:
-    case WebKit::InputType::Month:
-    case WebKit::InputType::Date:
+    case InputType::Select:
+    case InputType::DateTimeLocal:
+    case InputType::Time:
+    case InputType::Month:
+    case InputType::Date:
 #if ENABLE(INPUT_TYPE_COLOR)
-    case WebKit::InputType::Color:
+    case InputType::Color:
 #endif
         break;
     default:
@@ -4535,7 +4536,7 @@ static bool isAssistableInputType(WebKit::InputType type)
 
     BOOL editableChanged = [self setIsEditable:NO];
 
-    _assistedNodeInformation.elementType = WebKit::InputType::None;
+    _assistedNodeInformation.elementType = InputType::None;
     _inputPeripheral = nil;
     _focusRequiresStrongPasswordAssistance = NO;
 
@@ -4556,7 +4557,7 @@ static bool isAssistableInputType(WebKit::InputType type)
 
     [_webView didEndFormControlInteraction];
 
-    [self _stopSuppressingSelectionAssistantForReason:WebKit::FocusedElementIsTransparent];
+    [self _stopSuppressingSelectionAssistantForReason:FocusedElementIsTransparent];
 }
 
 - (void)_didReceiveEditorStateUpdateAfterFocus
@@ -4581,7 +4582,7 @@ static bool isAssistableInputType(WebKit::InputType type)
     WeakObjCPtr<WKContentView> weakSelf { self };
     auto identifierBeforeUpdate = _assistedNodeInformation.assistedNodeIdentifier;
     _page->requestAssistedNodeInformation([callback = WTFMove(callback), identifierBeforeUpdate, weakSelf] (auto& info, auto error) {
-        if (!weakSelf || error != WebKit::CallbackBase::Error::None || info.assistedNodeIdentifier != identifierBeforeUpdate) {
+        if (!weakSelf || error != CallbackBase::Error::None || info.assistedNodeIdentifier != identifierBeforeUpdate) {
             // If the assisted node may have changed in the meantime, don't overwrite assisted node information.
             callback(false);
             return;
@@ -4640,19 +4641,19 @@ static bool isAssistableInputType(WebKit::InputType type)
     BOOL prefersModalPresentation = NO;
 
     switch (_assistedNodeInformation.elementType) {
-    case WebKit::InputType::Select:
+    case InputType::Select:
         _presentedFullScreenInputViewController = adoptNS([[WKSelectMenuListViewController alloc] initWithDelegate:self]);
         break;
-    case WebKit::InputType::Time:
+    case InputType::Time:
         // Time inputs are special, in that the only UI affordances for dismissal are push buttons rather than status bar chevrons.
         // As such, modal presentation and dismissal is preferred even if a navigation stack exists.
         prefersModalPresentation = YES;
         _presentedFullScreenInputViewController = adoptNS([[WKTimePickerViewController alloc] initWithDelegate:self]);
         break;
-    case WebKit::InputType::Date:
+    case InputType::Date:
         _presentedFullScreenInputViewController = adoptNS([[WKDatePickerViewController alloc] initWithDelegate:self]);
         break;
-    case WebKit::InputType::None:
+    case InputType::None:
         break;
     default:
         _presentedFullScreenInputViewController = adoptNS([[WKTextInputListViewController alloc] initWithDelegate:self]);
@@ -4771,14 +4772,14 @@ static bool isAssistableInputType(WebKit::InputType type)
         return nil;
 
     switch (_assistedNodeInformation.elementType) {
-    case WebKit::InputType::Select:
-    case WebKit::InputType::Time:
-    case WebKit::InputType::Date:
+    case InputType::Select:
+    case InputType::Time:
+    case InputType::Date:
 #if ENABLE(INPUT_TYPE_COLOR)
-    case WebKit::InputType::Color:
+    case InputType::Color:
 #endif
         return nil;
-    case WebKit::InputType::Search:
+    case InputType::Search:
         return WebCore::formControlSearchButtonTitle();
     default:
         return WebCore::formControlGoButtonTitle();
@@ -4896,7 +4897,7 @@ static bool isAssistableInputType(WebKit::InputType type)
 
 - (void)selectWordForReplacement
 {
-    _page->extendSelection(WebCore::WordGranularity);
+    _page->extendSelection(WordGranularity);
 }
 
 - (void)_updateChangedSelection
@@ -4913,12 +4914,12 @@ static bool isAssistableInputType(WebKit::InputType type)
     auto& postLayoutData = state.postLayoutData();
     if (hasAssistedNode(_assistedNodeInformation)) {
         if (postLayoutData.elementIsTransparent)
-            [self _beginSuppressingSelectionAssistantForReason:WebKit::FocusedElementIsTransparent];
+            [self _beginSuppressingSelectionAssistantForReason:FocusedElementIsTransparent];
         else
-            [self _stopSuppressingSelectionAssistantForReason:WebKit::FocusedElementIsTransparent];
+            [self _stopSuppressingSelectionAssistantForReason:FocusedElementIsTransparent];
     }
 
-    WebKit::WKSelectionDrawingInfo selectionDrawingInfo(_page->editorState());
+    WKSelectionDrawingInfo selectionDrawingInfo(_page->editorState());
     if (force || selectionDrawingInfo != _lastSelectionDrawingInfo) {
         LOG_WITH_STREAM(Selection, stream << "_updateChangedSelection " << selectionDrawingInfo);
 
@@ -4955,7 +4956,7 @@ static bool isAssistableInputType(WebKit::InputType type)
     return !!_suppressSelectionAssistantReasons;
 }
 
-- (void)_beginSuppressingSelectionAssistantForReason:(WebKit::SuppressSelectionAssistantReason)reason
+- (void)_beginSuppressingSelectionAssistantForReason:(SuppressSelectionAssistantReason)reason
 {
     bool wasSuppressingSelectionAssistant = !!_suppressSelectionAssistantReasons;
     _suppressSelectionAssistantReasons.add(reason);
@@ -4964,7 +4965,7 @@ static bool isAssistableInputType(WebKit::InputType type)
         [_textSelectionAssistant deactivateSelection];
 }
 
-- (void)_stopSuppressingSelectionAssistantForReason:(WebKit::SuppressSelectionAssistantReason)reason
+- (void)_stopSuppressingSelectionAssistantForReason:(SuppressSelectionAssistantReason)reason
 {
     bool wasSuppressingSelectionAssistant = !!_suppressSelectionAssistantReasons;
     _suppressSelectionAssistantReasons.remove(reason);
@@ -5029,7 +5030,7 @@ static bool isAssistableInputType(WebKit::InputType type)
     [inputDelegate setSuggestions:nil];
 }
 
-- (void)_showPlaybackTargetPicker:(BOOL)hasVideo fromRect:(const WebCore::IntRect&)elementRect routeSharingPolicy:(WebCore::RouteSharingPolicy)routeSharingPolicy routingContextUID:(NSString *)routingContextUID
+- (void)_showPlaybackTargetPicker:(BOOL)hasVideo fromRect:(const IntRect&)elementRect routeSharingPolicy:(WebCore::RouteSharingPolicy)routeSharingPolicy routingContextUID:(NSString *)routingContextUID
 {
 #if ENABLE(AIRPLAY_PICKER)
 #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000 && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
@@ -5044,7 +5045,7 @@ static bool isAssistableInputType(WebKit::InputType type)
 #endif
 }
 
-- (void)_showRunOpenPanel:(API::OpenPanelParameters*)parameters resultListener:(WebKit::WebOpenPanelResultListenerProxy*)listener
+- (void)_showRunOpenPanel:(API::OpenPanelParameters*)parameters resultListener:(WebOpenPanelResultListenerProxy*)listener
 {
     ASSERT(!_fileUploadPanel);
     if (_fileUploadPanel)
@@ -5070,7 +5071,7 @@ static bool isAssistableInputType(WebKit::InputType type)
     _fileUploadPanel = nil;
 }
 
-- (void)_showShareSheet:(const WebCore::ShareDataWithParsedURL&)data completionHandler:(CompletionHandler<void(bool)>&&)completionHandler
+- (void)_showShareSheet:(const ShareDataWithParsedURL&)data completionHandler:(CompletionHandler<void(bool)>&&)completionHandler
 {
 #if !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
     if (_shareSheet)
@@ -5149,7 +5150,7 @@ static bool isAssistableInputType(WebKit::InputType type)
 
 - (std::optional<WebKit::InteractionInformationAtPosition>)positionInformationForActionSheetAssistant:(WKActionSheetAssistant *)assistant
 {
-    WebKit::InteractionInformationRequest request(_positionInformation.request.point);
+    InteractionInformationRequest request(_positionInformation.request.point);
     request.includeSnapshot = true;
     request.includeLinkIndicator = assistant.needsLinkIndicator;
     if (![self ensurePositionInformationIsUpToDate:request])
@@ -5161,7 +5162,7 @@ static bool isAssistableInputType(WebKit::InputType type)
 - (void)updatePositionInformationForActionSheetAssistant:(WKActionSheetAssistant *)assistant
 {
     _hasValidPositionInformation = NO;
-    WebKit::InteractionInformationRequest request(_positionInformation.request.point);
+    InteractionInformationRequest request(_positionInformation.request.point);
     request.includeSnapshot = true;
     request.includeLinkIndicator = assistant.needsLinkIndicator;
 
@@ -5323,9 +5324,9 @@ static BOOL shouldEnableDragInteractionForPolicy(_WKDragInteractionPolicy policy
     [self cleanUpDragSourceSessionState];
 }
 
-- (void)_startDrag:(RetainPtr<CGImageRef>)image item:(const WebCore::DragItem&)item
+- (void)_startDrag:(RetainPtr<CGImageRef>)image item:(const DragItem&)item
 {
-    ASSERT(item.sourceAction != WebCore::DragSourceActionNone);
+    ASSERT(item.sourceAction != DragSourceActionNone);
 
     if (item.promisedAttachmentInfo)
         [self _prepareToDragPromisedAttachment:item.promisedAttachmentInfo];
@@ -5351,7 +5352,7 @@ static BOOL shouldEnableDragInteractionForPolicy(_WKDragInteractionPolicy policy
     NSArray *dragItemsToAdd = [self _itemsForBeginningOrAddingToSessionWithRegistrationList:registrationList stagedDragSource:stagedDragSource];
 
     RELEASE_LOG(DragAndDrop, "Drag session: %p adding %tu items", _dragDropInteractionState.dragSession(), dragItemsToAdd.count);
-    _dragDropInteractionState.clearStagedDragSource(dragItemsToAdd.count ? WebKit::DragDropInteractionState::DidBecomeActive::Yes : WebKit::DragDropInteractionState::DidBecomeActive::No);
+    _dragDropInteractionState.clearStagedDragSource(dragItemsToAdd.count ? DragDropInteractionState::DidBecomeActive::Yes : DragDropInteractionState::DidBecomeActive::No);
 
     completion(dragItemsToAdd);
 
@@ -5369,12 +5370,12 @@ static BOOL shouldEnableDragInteractionForPolicy(_WKDragInteractionPolicy policy
         savedCompletionBlock();
 
     if (!_dragDropInteractionState.dragSession().items.count) {
-        auto positionForDragEnd = WebCore::roundedIntPoint(_dragDropInteractionState.adjustedPositionForDragEnd());
+        auto positionForDragEnd = roundedIntPoint(_dragDropInteractionState.adjustedPositionForDragEnd());
         [self cleanUpDragSourceSessionState];
         if (started) {
             // A client of the Objective C SPI or UIKit might have prevented the drag from beginning entirely in the UI process, in which case
             // we need to balance the `dragstart` event with a `dragend`.
-            _page->dragEnded(positionForDragEnd, positionForDragEnd, WebCore::DragOperationNone);
+            _page->dragEnded(positionForDragEnd, positionForDragEnd, DragOperationNone);
         }
     }
 }
@@ -5392,25 +5393,25 @@ static BOOL shouldEnableDragInteractionForPolicy(_WKDragInteractionPolicy policy
         *outGlobalPoint = locationInContentView;
 }
 
-static UIDropOperation dropOperationForWebCoreDragOperation(WebCore::DragOperation operation)
+static UIDropOperation dropOperationForWebCoreDragOperation(DragOperation operation)
 {
-    if (operation & WebCore::DragOperationMove)
+    if (operation & DragOperationMove)
         return UIDropOperationMove;
 
-    if (operation & WebCore::DragOperationCopy)
+    if (operation & DragOperationCopy)
         return UIDropOperationCopy;
 
     return UIDropOperationCancel;
 }
 
-- (WebCore::DragData)dragDataForDropSession:(id <UIDropSession>)session dragDestinationAction:(WKDragDestinationAction)dragDestinationAction
+- (DragData)dragDataForDropSession:(id <UIDropSession>)session dragDestinationAction:(WKDragDestinationAction)dragDestinationAction
 {
     CGPoint global;
     CGPoint client;
     [self computeClientAndGlobalPointsForDropSession:session outClientPoint:&client outGlobalPoint:&global];
 
-    WebCore::DragOperation dragOperationMask = static_cast<WebCore::DragOperation>(session.allowsMoveOperation ? WebCore::DragOperationEvery : (WebCore::DragOperationEvery & ~WebCore::DragOperationMove));
-    return { session, WebCore::roundedIntPoint(client), WebCore::roundedIntPoint(global), dragOperationMask, WebCore::DragApplicationNone, static_cast<WebCore::DragDestinationAction>(dragDestinationAction) };
+    DragOperation dragOperationMask = static_cast<DragOperation>(session.allowsMoveOperation ? DragOperationEvery : (DragOperationEvery & ~DragOperationMove));
+    return { session, roundedIntPoint(client), roundedIntPoint(global), dragOperationMask, DragApplicationNone, static_cast<DragDestinationAction>(dragDestinationAction) };
 }
 
 - (void)cleanUpDragSourceSessionState
@@ -5453,7 +5454,7 @@ static NSArray<NSItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
     return extractItemProvidersFromDragItems(session.items);
 }
 
-- (void)_didConcludeEditDataInteraction:(std::optional<WebCore::TextIndicatorData>)data
+- (void)_didConcludeEditDataInteraction:(std::optional<TextIndicatorData>)data
 {
     if (!data)
         return;
@@ -5480,7 +5481,7 @@ static NSArray<NSItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
     } completion:^(BOOL completed) {
         [visibleContentViewSnapshot removeFromSuperview];
         [UIView animateWithDuration:0.25 animations:^() {
-            [protectedSelf _stopSuppressingSelectionAssistantForReason:WebKit::DropAnimationIsRunning];
+            [protectedSelf _stopSuppressingSelectionAssistantForReason:DropAnimationIsRunning];
             [unselectedContentSnapshot setAlpha:0];
         } completion:^(BOOL completed) {
             [unselectedContentSnapshot removeFromSuperview];
@@ -5497,13 +5498,13 @@ static NSArray<NSItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
         [self.webViewUIDelegate _webView:_webView dataInteractionOperationWasHandled:handled forSession:dropSession itemProviders:[WebItemProviderPasteboard sharedInstance].itemProviders];
 
     if (!_isAnimatingConcludeEditDrag)
-        [self _stopSuppressingSelectionAssistantForReason:WebKit::DropAnimationIsRunning];
+        [self _stopSuppressingSelectionAssistantForReason:DropAnimationIsRunning];
 
     CGPoint global;
     CGPoint client;
     [self computeClientAndGlobalPointsForDropSession:dropSession outClientPoint:&client outGlobalPoint:&global];
     [self cleanUpDragSourceSessionState];
-    _page->dragEnded(WebCore::roundedIntPoint(client), WebCore::roundedIntPoint(global), _page->currentDragOperation());
+    _page->dragEnded(roundedIntPoint(client), roundedIntPoint(global), _page->currentDragOperation());
 }
 
 - (void)_didChangeDataInteractionCaretRect:(CGRect)previousRect currentRect:(CGRect)rect
@@ -5528,7 +5529,7 @@ static NSArray<NSItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
     [_editDropCaretView updateToPosition:[WKTextPosition textPositionWithRect:rect]];
 }
 
-- (void)_prepareToDragPromisedAttachment:(const WebCore::PromisedAttachmentInfo&)info
+- (void)_prepareToDragPromisedAttachment:(const PromisedAttachmentInfo&)info
 {
     auto session = retainPtr(_dragDropInteractionState.dragSession());
     if (!session) {
@@ -5566,7 +5567,7 @@ static NSArray<NSItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
             return;
         }
 
-        NSString *temporaryBlobDirectory = WebCore::FileSystem::createTemporaryDirectory(@"blobs");
+        NSString *temporaryBlobDirectory = FileSystem::createTemporaryDirectory(@"blobs");
         NSURL *destinationURL = [NSURL fileURLWithPath:[temporaryBlobDirectory stringByAppendingPathComponent:[NSUUID UUID].UUIDString] isDirectory:NO];
 
         auto attachment = strongSelf->_page->attachmentForIdentifier(info.attachmentIdentifier);
@@ -5622,7 +5623,7 @@ static NSArray<NSItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
     _shouldRestoreCalloutBarAfterDrop = NO;
 }
 
-- (NSArray<UIDragItem *> *)_itemsForBeginningOrAddingToSessionWithRegistrationList:(WebItemProviderRegistrationInfoList *)registrationList stagedDragSource:(const WebKit::DragSourceState&)stagedDragSource
+- (NSArray<UIDragItem *> *)_itemsForBeginningOrAddingToSessionWithRegistrationList:(WebItemProviderRegistrationInfoList *)registrationList stagedDragSource:(const DragSourceState&)stagedDragSource
 {
     NSItemProvider *defaultItemProvider = registrationList.itemProvider;
     if (!defaultItemProvider)
@@ -5655,7 +5656,7 @@ static NSArray<NSItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
 
 - (NSDictionary *)_autofillContext
 {
-    BOOL provideStrongPasswordAssistance = _focusRequiresStrongPasswordAssistance && _assistedNodeInformation.elementType == WebKit::InputType::Password;
+    BOOL provideStrongPasswordAssistance = _focusRequiresStrongPasswordAssistance && _assistedNodeInformation.elementType == InputType::Password;
     if (!hasAssistedNode(_assistedNodeInformation) || (!_assistedNodeInformation.acceptsAutofilledLoginCredentials && !provideStrongPasswordAssistance))
         return nil;
 
@@ -5700,7 +5701,7 @@ static NSArray<NSItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
     }
 
     _dragDropInteractionState.dragSessionWillRequestAdditionalItem(completion);
-    _page->requestAdditionalItemsForDragSession(WebCore::roundedIntPoint(point), WebCore::roundedIntPoint(point));
+    _page->requestAdditionalItemsForDragSession(roundedIntPoint(point), roundedIntPoint(point));
 }
 
 - (void)_dragInteraction:(UIDragInteraction *)interaction prepareForSession:(id <UIDragSession>)session completion:(dispatch_block_t)completion
@@ -5719,8 +5720,8 @@ static NSArray<NSItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
 
     _dragDropInteractionState.prepareForDragSession(session, completion);
 
-    auto dragOrigin = WebCore::roundedIntPoint([session locationInView:self]);
-    _page->requestStartDataInteraction(dragOrigin, WebCore::roundedIntPoint([self convertPoint:dragOrigin toView:self.window]));
+    auto dragOrigin = roundedIntPoint([session locationInView:self]);
+    _page->requestStartDataInteraction(dragOrigin, roundedIntPoint([self convertPoint:dragOrigin toView:self.window]));
 
     RELEASE_LOG(DragAndDrop, "Drag session requested: %p at origin: {%d, %d}", session, dragOrigin.x(), dragOrigin.y());
 }
@@ -5746,7 +5747,7 @@ static NSArray<NSItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
         _page->dragCancelled();
 
     RELEASE_LOG(DragAndDrop, "Drag session: %p starting with %tu items", session, [dragItems count]);
-    _dragDropInteractionState.clearStagedDragSource([dragItems count] ? WebKit::DragDropInteractionState::DidBecomeActive::Yes : WebKit::DragDropInteractionState::DidBecomeActive::No);
+    _dragDropInteractionState.clearStagedDragSource([dragItems count] ? DragDropInteractionState::DidBecomeActive::Yes : DragDropInteractionState::DidBecomeActive::No);
 
     return dragItems;
 }
@@ -5764,13 +5765,13 @@ static NSArray<NSItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
 
 - (void)dragInteraction:(UIDragInteraction *)interaction willAnimateLiftWithAnimator:(id <UIDragAnimating>)animator session:(id <UIDragSession>)session
 {
-    if (!_shouldRestoreCalloutBarAfterDrop && _dragDropInteractionState.anyActiveDragSourceIs(WebCore::DragSourceActionSelection)) {
+    if (!_shouldRestoreCalloutBarAfterDrop && _dragDropInteractionState.anyActiveDragSourceIs(DragSourceActionSelection)) {
         // FIXME: This SPI should be renamed in UIKit to reflect a more general purpose of hiding interaction assistant controls.
         [_textSelectionAssistant willStartScrollingOverflow];
         _shouldRestoreCalloutBarAfterDrop = YES;
     }
 
-    auto positionForDragEnd = WebCore::roundedIntPoint(_dragDropInteractionState.adjustedPositionForDragEnd());
+    auto positionForDragEnd = roundedIntPoint(_dragDropInteractionState.adjustedPositionForDragEnd());
     RetainPtr<WKContentView> protectedSelf(self);
     [animator addCompletion:[session, positionForDragEnd, protectedSelf, page = _page] (UIViewAnimatingPosition finalPosition) {
 #if RELEASE_LOG_DISABLED
@@ -5780,7 +5781,7 @@ static NSArray<NSItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
             RELEASE_LOG(DragAndDrop, "Drag session ended at start: %p", session);
             // The lift was canceled, so -dropInteraction:sessionDidEnd: will never be invoked. This is the last chance to clean up.
             [protectedSelf cleanUpDragSourceSessionState];
-            page->dragEnded(positionForDragEnd, positionForDragEnd, WebCore::DragOperationNone);
+            page->dragEnded(positionForDragEnd, positionForDragEnd, DragOperationNone);
         }
     }];
 }
@@ -5811,7 +5812,7 @@ static NSArray<NSItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
         return;
 
     [self cleanUpDragSourceSessionState];
-    _page->dragEnded(WebCore::roundedIntPoint(_dragDropInteractionState.adjustedPositionForDragEnd()), WebCore::roundedIntPoint(_dragDropInteractionState.adjustedPositionForDragEnd()), operation);
+    _page->dragEnded(roundedIntPoint(_dragDropInteractionState.adjustedPositionForDragEnd()), roundedIntPoint(_dragDropInteractionState.adjustedPositionForDragEnd()), operation);
 }
 
 - (UITargetedDragPreview *)dragInteraction:(UIDragInteraction *)interaction previewForCancellingItem:(UIDragItem *)item withDefault:(UITargetedDragPreview *)defaultPreview
@@ -5836,7 +5837,7 @@ static NSArray<NSItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
     [animator addCompletion:[protectedSelf = retainPtr(self), page = _page] (UIViewAnimatingPosition finalPosition) {
         page->dragCancelled();
         if (auto completion = protectedSelf->_dragDropInteractionState.takeDragCancelSetDownBlock()) {
-            page->callAfterNextPresentationUpdate([completion] (WebKit::CallbackBase::Error) {
+            page->callAfterNextPresentationUpdate([completion] (CallbackBase::Error) {
                 completion();
             });
         }
@@ -5947,13 +5948,13 @@ static NSArray<NSItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
             filenames.append([fileURL path]);
         capturedDragData.setFileNames(filenames);
 
-        WebKit::SandboxExtension::Handle sandboxExtensionHandle;
-        WebKit::SandboxExtension::HandleArray sandboxExtensionForUpload;
+        SandboxExtension::Handle sandboxExtensionHandle;
+        SandboxExtension::HandleArray sandboxExtensionForUpload;
         retainedSelf->_page->createSandboxExtensionsIfNeeded(filenames, sandboxExtensionHandle, sandboxExtensionForUpload);
         retainedSelf->_page->performDragOperation(capturedDragData, "data interaction pasteboard", WTFMove(sandboxExtensionHandle), WTFMove(sandboxExtensionForUpload));
 
         retainedSelf->_visibleContentViewSnapshot = [retainedSelf snapshotViewAfterScreenUpdates:NO];
-        [retainedSelf _beginSuppressingSelectionAssistantForReason:WebKit::DropAnimationIsRunning];
+        [retainedSelf _beginSuppressingSelectionAssistantForReason:DropAnimationIsRunning];
         [UIView performWithoutAnimation:[retainedSelf] {
             [retainedSelf->_visibleContentViewSnapshot setFrame:[retainedSelf bounds]];
             [retainedSelf addSubview:retainedSelf->_visibleContentViewSnapshot.get()];
@@ -5993,7 +5994,7 @@ static NSArray<NSItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
     CGPoint client;
     [self computeClientAndGlobalPointsForDropSession:session outClientPoint:&client outGlobalPoint:&global];
     [self cleanUpDragSourceSessionState];
-    _page->dragEnded(WebCore::roundedIntPoint(client), WebCore::roundedIntPoint(global), WebCore::DragOperationNone);
+    _page->dragEnded(roundedIntPoint(client), roundedIntPoint(global), DragOperationNone);
 }
 
 #endif
@@ -6058,12 +6059,12 @@ static NSArray<NSItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
 - (BOOL)allowsLanguageSelectionMenuForListViewController:(PUICQuickboardViewController *)controller
 {
     switch (_assistedNodeInformation.elementType) {
-    case WebKit::InputType::ContentEditable:
-    case WebKit::InputType::Text:
-    case WebKit::InputType::TextArea:
-    case WebKit::InputType::Search:
-    case WebKit::InputType::Email:
-    case WebKit::InputType::URL:
+    case InputType::ContentEditable:
+    case InputType::Text:
+    case InputType::TextArea:
+    case InputType::Search:
+    case InputType::Email:
+    case InputType::URL:
         return YES;
     default:
         return NO;
@@ -6101,14 +6102,14 @@ static NSArray<NSItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
 - (BOOL)shouldDisplayInputContextViewForListViewController:(PUICQuickboardViewController *)controller
 {
     switch (_assistedNodeInformation.elementType) {
-    case WebKit::InputType::ContentEditable:
-    case WebKit::InputType::Text:
-    case WebKit::InputType::Password:
-    case WebKit::InputType::TextArea:
-    case WebKit::InputType::Search:
-    case WebKit::InputType::Email:
-    case WebKit::InputType::URL:
-    case WebKit::InputType::Phone:
+    case InputType::ContentEditable:
+    case InputType::Text:
+    case InputType::Password:
+    case InputType::TextArea:
+    case InputType::Search:
+    case InputType::Email:
+    case InputType::URL:
+    case InputType::Phone:
         return YES;
     default:
         return NO;
@@ -6120,11 +6121,11 @@ static NSArray<NSItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
 - (WKNumberPadInputMode)numericInputModeForListViewController:(WKTextInputListViewController *)controller
 {
     switch (_assistedNodeInformation.elementType) {
-    case WebKit::InputType::Phone:
+    case InputType::Phone:
         return WKNumberPadInputModeTelephone;
-    case WebKit::InputType::Number:
+    case InputType::Number:
         return WKNumberPadInputModeNumbersAndSymbols;
-    case WebKit::InputType::NumberPad:
+    case InputType::NumberPad:
         return WKNumberPadInputModeNumbersOnly;
     default:
         return WKNumberPadInputModeNone;
@@ -6134,13 +6135,13 @@ static NSArray<NSItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
 - (NSString *)textContentTypeForListViewController:(WKTextInputListViewController *)controller
 {
     switch (_assistedNodeInformation.elementType) {
-    case WebKit::InputType::Password:
+    case InputType::Password:
         return UITextContentTypePassword;
-    case WebKit::InputType::URL:
+    case InputType::URL:
         return UITextContentTypeURL;
-    case WebKit::InputType::Email:
+    case InputType::Email:
         return UITextContentTypeEmailAddress;
-    case WebKit::InputType::Phone:
+    case InputType::Phone:
         return UITextContentTypeTelephoneNumber;
     default:
         // The element type alone is insufficient to infer content type; fall back to autofill data.
@@ -6167,7 +6168,7 @@ static NSArray<NSItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
 
 - (BOOL)allowsDictationInputForListViewController:(PUICQuickboardViewController *)controller
 {
-    return _assistedNodeInformation.elementType != WebKit::InputType::Password;
+    return _assistedNodeInformation.elementType != InputType::Password;
 }
 
 #endif // PLATFORM(WATCHOS)
@@ -6229,10 +6230,10 @@ static NSArray<NSItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
 - (void)_simulateLongPressActionAtLocation:(CGPoint)location
 {
     RetainPtr<WKContentView> protectedSelf = self;
-    [self doAfterPositionInformationUpdate:[protectedSelf] (WebKit::InteractionInformationAtPosition) {
+    [self doAfterPositionInformationUpdate:[protectedSelf] (InteractionInformationAtPosition) {
         if (SEL action = [protectedSelf _actionForLongPress])
             [protectedSelf performSelector:action];
-    } forRequest:WebKit::InteractionInformationRequest(WebCore::roundedIntPoint(location))];
+    } forRequest:InteractionInformationRequest(roundedIntPoint(location))];
 }
 
 - (void)selectFormAccessoryPickerRow:(NSInteger)rowIndex
@@ -6326,7 +6327,7 @@ static NSArray<NSItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
     if (!_highlightLongPressCanClick)
         return NO;
 
-    WebKit::InteractionInformationRequest request(WebCore::roundedIntPoint(position));
+    InteractionInformationRequest request(roundedIntPoint(position));
     request.includeSnapshot = true;
     request.includeLinkIndicator = true;
     if (![self ensurePositionInformationIsUpToDate:request])
@@ -6346,7 +6347,7 @@ static NSArray<NSItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
         if (linkURL.protocolIsInHTTPFamily())
             return YES;
 #if ENABLE(DATA_DETECTION)
-        if (WebCore::DataDetection::canBePresentedByDataDetectors(linkURL))
+        if (DataDetection::canBePresentedByDataDetectors(linkURL))
             return YES;
 #endif
         return NO;
@@ -6617,8 +6618,8 @@ static NSString *previewIdentifierForElementAction(_WKElementAction *action)
     RetainPtr<NSMutableArray> rectArray = adoptNS([[NSMutableArray alloc] init]);
 
     if (_positionInformation.linkIndicator.contentImage) {
-        WebCore::FloatPoint origin = _positionInformation.linkIndicator.textBoundingRectInRootViewCoordinates.location();
-        for (WebCore::FloatRect& rect : _positionInformation.linkIndicator.textRectsInBoundingRectCoordinates) {
+        FloatPoint origin = _positionInformation.linkIndicator.textBoundingRectInRootViewCoordinates.location();
+        for (FloatRect& rect : _positionInformation.linkIndicator.textRectsInBoundingRectCoordinates) {
             CGRect cgRect = rect;
             cgRect.origin.x += origin.x();
             cgRect.origin.y += origin.y();
index c505b26..50c1f51 100644 (file)
@@ -40,6 +40,9 @@
 #import <pal/spi/cocoa/AVKitSPI.h>
 #import <wtf/RetainPtr.h>
 
+using namespace WebCore;
+using namespace WebKit;
+
 static const NSTimeInterval showHideAnimationDuration = 0.1;
 static const NSTimeInterval pipHideAnimationDuration = 0.2;
 static const NSTimeInterval autoHideDelay = 4.0;
@@ -53,7 +56,7 @@ static const double requiredScore = 0.1;
 - (void)failedToEnterPictureInPicture;
 @end
 
-class WKFullScreenViewControllerPlaybackSessionModelClient : WebCore::PlaybackSessionModelClient {
+class WKFullScreenViewControllerPlaybackSessionModelClient : PlaybackSessionModelClient {
 public:
     void setParent(WKFullScreenViewController *parent) { m_parent = parent; }
 
@@ -71,7 +74,7 @@ public:
         m_parent.pictureInPictureActive = active;
     }
 
-    void setInterface(WebCore::PlaybackSessionInterfaceAVKit* interface)
+    void setInterface(PlaybackSessionInterfaceAVKit* interface)
     {
         if (m_interface == interface)
             return;
@@ -85,14 +88,14 @@ public:
 
 private:
     WKFullScreenViewController *m_parent { nullptr };
-    RefPtr<WebCore::PlaybackSessionInterfaceAVKit> m_interface;
+    RefPtr<PlaybackSessionInterfaceAVKit> m_interface;
 };
 
-class WKFullScreenViewControllerVideoFullscreenModelClient : WebCore::VideoFullscreenModelClient {
+class WKFullScreenViewControllerVideoFullscreenModelClient : VideoFullscreenModelClient {
 public:
     void setParent(WKFullScreenViewController *parent) { m_parent = parent; }
 
-    void setInterface(WebCore::VideoFullscreenInterfaceAVKit* interface)
+    void setInterface(VideoFullscreenInterfaceAVKit* interface)
     {
         if (m_interface == interface)
             return;
@@ -104,7 +107,7 @@ public:
             m_interface->videoFullscreenModel()->addClient(*this);
     }
 
-    WebCore::VideoFullscreenInterfaceAVKit* interface() const { return m_interface.get(); }
+    VideoFullscreenInterfaceAVKit* interface() const { return m_interface.get(); }
 
     void willEnterPictureInPicture() final
     {
@@ -123,7 +126,7 @@ public:
 
 private:
     WKFullScreenViewController *m_parent { nullptr };
-    RefPtr<WebCore::VideoFullscreenInterfaceAVKit> m_interface;
+    RefPtr<VideoFullscreenInterfaceAVKit> m_interface;
 };
 
 #pragma mark - _WKExtrinsicButton
@@ -149,7 +152,7 @@ private:
 
 @interface WKFullScreenViewController () <UIGestureRecognizerDelegate, UIToolbarDelegate>
 @property (weak, nonatomic) WKWebView *_webView; // Cannot be retained, see <rdar://problem/14884666>.
-@property (readonly, nonatomic) WebKit::WebFullScreenManagerProxy* _manager;
+@property (readonly, nonatomic) WebFullScreenManagerProxy* _manager;
 @property (readonly, nonatomic) WebCore::FloatBoxExtent _effectiveFullscreenInsets;
 @end
 
@@ -257,7 +260,7 @@ private:
 
 - (void)videoControlsManagerDidChange
 {
-    WebKit::WebPageProxy* page = [self._webView _page];
+    WebPageProxy* page = [self._webView _page];
     auto* videoFullscreenManager = page ? page->videoFullscreenManager() : nullptr;
     auto* videoFullscreenInterface = videoFullscreenManager ? videoFullscreenManager->controlsManagerInterface() : nullptr;
     auto* playbackSessionInterface = videoFullscreenInterface ? &videoFullscreenInterface->playbackSessionInterface() : nullptr;
@@ -265,7 +268,7 @@ private:
     _playbackClient.setInterface(playbackSessionInterface);
     _videoFullscreenClient.setInterface(videoFullscreenInterface);
 
-    WebCore::PlaybackSessionModel* playbackSessionModel = playbackSessionInterface ? playbackSessionInterface->playbackSessionModel() : nullptr;
+    PlaybackSessionModel* playbackSessionModel = playbackSessionInterface ? playbackSessionInterface->playbackSessionModel() : nullptr;
     self.playing = playbackSessionModel ? playbackSessionModel->isPlaying() : NO;
     [_pipButton setHidden:!playbackSessionModel];
 }
@@ -478,7 +481,7 @@ private:
 #pragma mark - Internal Interface
 
 @dynamic _manager;
-- (WebKit::WebFullScreenManagerProxy*)_manager
+- (WebFullScreenManagerProxy*)_manager
 {
     if (auto* page = [self._webView _page])
         return page->fullScreenManager();
@@ -504,11 +507,11 @@ private:
 
 - (void)_togglePiPAction:(id)sender
 {
-    WebKit::WebPageProxy* page = [self._webView _page];
+    WebPageProxy* page = [self._webView _page];
     if (!page)
         return;
 
-    WebKit::PlaybackSessionManagerProxy* playbackSessionManager = page->playbackSessionManager();
+    PlaybackSessionManagerProxy* playbackSessionManager = page->playbackSessionManager();
     if (!playbackSessionManager)
         return;
 
@@ -516,7 +519,7 @@ private:
     if (!playbackSessionInterface)
         return;
 
-    WebCore::PlaybackSessionModel* playbackSessionModel = playbackSessionInterface->playbackSessionModel();
+    PlaybackSessionModel* playbackSessionModel = playbackSessionInterface->playbackSessionModel();
     if (!playbackSessionModel)
         return;
 
index 939b5d3..2bd1a8e 100644 (file)
 #import <wtf/cocoa/NSURLExtras.h>
 #import <wtf/spi/cocoa/SecuritySPI.h>
 
+using namespace WebKit;
+using namespace WebCore;
 
 #if !HAVE(URL_FORMATTING)
 SOFT_LINK_PRIVATE_FRAMEWORK_OPTIONAL(LinkPresentation)
 #endif
 
 namespace WebKit {
-using namespace WebKit;
-using namespace WebCore;
 
 static CGSize sizeExpandedToSize(CGSize initial, CGSize other)
 {
@@ -212,7 +212,7 @@ static const NSTimeInterval kAnimationDuration = 0.2;
     CGRect fullscreenFrame = _animatingIn ? _finalFrame : _initialFrame;
     _animatingView = _animatingIn ? toView : fromView;
 
-    CGRect boundsRect = WebCore::largestRectWithAspectRatioInsideRect(WebCore::FloatRect(inlineFrame).size().aspectRatio(), fullscreenFrame);
+    CGRect boundsRect = largestRectWithAspectRatioInsideRect(FloatRect(inlineFrame).size().aspectRatio(), fullscreenFrame);
     boundsRect.origin = CGPointZero;
 
     _initialMaskViewBounds = _animatingIn ? boundsRect : [_animatingView bounds];
@@ -220,7 +220,7 @@ static const NSTimeInterval kAnimationDuration = 0.2;
     _finalMaskViewBounds = _animatingIn ? [_animatingView bounds] : boundsRect;
     _finalMaskViewCenter = CGPointMake(CGRectGetMidX([_animatingView bounds]), CGRectGetMidY([_animatingView bounds]));
 
-    WebCore::FloatRect scaleRect = WebCore::smallestRectWithAspectRatioAroundRect(WebCore::FloatRect(fullscreenFrame).size().aspectRatio(), inlineFrame);
+    FloatRect scaleRect = smallestRectWithAspectRatioAroundRect(FloatRect(fullscreenFrame).size().aspectRatio(), inlineFrame);
     CGAffineTransform scaleTransform = CGAffineTransformMakeScale(scaleRect.width() / fullscreenFrame.size.width, scaleRect.height() / fullscreenFrame.size.height);
     CGAffineTransform translateTransform = CGAffineTransformMakeTranslation(CGRectGetMidX(inlineFrame) - CGRectGetMidX(fullscreenFrame), CGRectGetMidY(inlineFrame) - CGRectGetMidY(fullscreenFrame));
 
@@ -425,8 +425,8 @@ static const NSTimeInterval kAnimationDuration = 0.2;
 @implementation WKFullScreenWindowController {
     RetainPtr<WKFullScreenPlaceholderView> _webViewPlaceholder;
 
-    WebKit::FullScreenState _fullScreenState;
-    WebKit::WKWebViewState _viewState;
+    FullScreenState _fullScreenState;
+    WKWebViewState _viewState;
 
     RetainPtr<UIWindow> _window;
     RetainPtr<UIViewController> _rootViewController;
@@ -474,9 +474,9 @@ static const NSTimeInterval kAnimationDuration = 0.2;
 
 - (BOOL)isFullScreen
 {
-    return _fullScreenState == WebKit::WaitingToEnterFullScreen
-        || _fullScreenState == WebKit::EnteringFullScreen
-        || _fullScreenState == WebKit::InFullScreen;
+    return _fullScreenState == WaitingToEnterFullScreen
+        || _fullScreenState == EnteringFullScreen
+        || _fullScreenState == InFullScreen;
 }
 
 - (UIView *)webViewPlaceholder
@@ -500,7 +500,7 @@ static const NSTimeInterval kAnimationDuration = 0.2;
 
     [self _invalidateEVOrganizationName];
 
-    _fullScreenState = WebKit::WaitingToEnterFullScreen;
+    _fullScreenState = WaitingToEnterFullScreen;
 
     _window = adoptNS([[UIWindow alloc] init]);
     [_window setBackgroundColor:[UIColor clearColor]];
@@ -563,9 +563,9 @@ static const NSTimeInterval kAnimationDuration = 0.2;
         [CATransaction setDisableActions:YES];
         
         [[_webViewPlaceholder layer] setContents:(id)[snapshotImage CGImage]];
-        WebKit::replaceViewWithView(webView.get(), _webViewPlaceholder.get());
+        replaceViewWithView(webView.get(), _webViewPlaceholder.get());
 
-        WebKit::WKWebViewState().applyTo(webView.get());
+        WKWebViewState().applyTo(webView.get());
         
         [webView setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)];
         [webView setFrame:[_window bounds]];
@@ -577,14 +577,14 @@ static const NSTimeInterval kAnimationDuration = 0.2;
         if (auto* manager = self._manager)
             manager->setAnimatingFullScreen(true);
 
-        WebCore::ViewportArguments arguments { WebCore::ViewportArguments::CSSDeviceAdaptation };
+        ViewportArguments arguments { ViewportArguments::CSSDeviceAdaptation };
         arguments.zoom = 1;
         arguments.minZoom = 1;
         arguments.maxZoom = 1;
         arguments.userZoom = 1;
         page->setOverrideViewportArguments(arguments);
 
-        _repaintCallback = WebKit::VoidCallback::create([protectedSelf = retainPtr(self), self](WebKit::CallbackBase::Error) {
+        _repaintCallback = VoidCallback::create([protectedSelf = retainPtr(self), self](WebKit::CallbackBase::Error) {
             _repaintCallback = nullptr;
             if (auto* manager = [protectedSelf _manager]) {
                 manager->willEnterFullScreen();
@@ -602,16 +602,16 @@ static const NSTimeInterval kAnimationDuration = 0.2;
 
 - (void)beganEnterFullScreenWithInitialFrame:(CGRect)initialFrame finalFrame:(CGRect)finalFrame
 {
-    if (_fullScreenState != WebKit::WaitingToEnterFullScreen)
+    if (_fullScreenState != WaitingToEnterFullScreen)
         return;
-    _fullScreenState = WebKit::EnteringFullScreen;
+    _fullScreenState = EnteringFullScreen;
 
     _initialFrame = initialFrame;
     _finalFrame = finalFrame;
     
-    _initialFrame.size = WebKit::sizeExpandedToSize(_initialFrame.size, CGSizeMake(1, 1));
-    _finalFrame.size = WebKit::sizeExpandedToSize(_finalFrame.size, CGSizeMake(1, 1));
-    _initialFrame = WebKit::safeInlineRect(_initialFrame, [_rootViewController view].frame.size);
+    _initialFrame.size = sizeExpandedToSize(_initialFrame.size, CGSizeMake(1, 1));
+    _finalFrame.size = sizeExpandedToSize(_finalFrame.size, CGSizeMake(1, 1));
+    _initialFrame = safeInlineRect(_initialFrame, [_rootViewController view].frame.size);
 
     [CATransaction begin];
     [CATransaction setDisableActions:YES];
@@ -627,7 +627,7 @@ static const NSTimeInterval kAnimationDuration = 0.2;
     [CATransaction commit];
 
     [_rootViewController presentViewController:_fullscreenViewController.get() animated:YES completion:^{
-        _fullScreenState = WebKit::InFullScreen;
+        _fullScreenState = InFullScreen;
 
         auto* page = [self._webView _page];
         auto* manager = self._manager;
@@ -659,7 +659,7 @@ static const NSTimeInterval kAnimationDuration = 0.2;
 {
     if (!self.isFullScreen)
         return;
-    _fullScreenState = WebKit::WaitingToExitFullScreen;
+    _fullScreenState = WaitingToExitFullScreen;
 
     if (auto* manager = self._manager) {
         manager->setAnimatingFullScreen(true);
@@ -673,16 +673,16 @@ static const NSTimeInterval kAnimationDuration = 0.2;
 
 - (void)beganExitFullScreenWithInitialFrame:(CGRect)initialFrame finalFrame:(CGRect)finalFrame
 {
-    if (_fullScreenState != WebKit::WaitingToExitFullScreen)
+    if (_fullScreenState != WaitingToExitFullScreen)
         return;
-    _fullScreenState = WebKit::ExitingFullScreen;
+    _fullScreenState = ExitingFullScreen;
 
     _initialFrame = initialFrame;
     _finalFrame = finalFrame;
     
-    _initialFrame.size = WebKit::sizeExpandedToSize(_initialFrame.size, CGSizeMake(1, 1));
-    _finalFrame.size = WebKit::sizeExpandedToSize(_finalFrame.size, CGSizeMake(1, 1));
-    _finalFrame = WebKit::safeInlineRect(_finalFrame, [_rootViewController view].frame.size);
+    _initialFrame.size = sizeExpandedToSize(_initialFrame.size, CGSizeMake(1, 1));
+    _finalFrame.size = sizeExpandedToSize(_finalFrame.size, CGSizeMake(1, 1));
+    _finalFrame = safeInlineRect(_finalFrame, [_rootViewController view].frame.size);
 
     if (auto* page = [self._webView _page])
         page->setSuppressVisibilityUpdates(true);
@@ -700,9 +700,9 @@ static const NSTimeInterval kAnimationDuration = 0.2;
 
 - (void)_completedExitFullScreen
 {
-    if (_fullScreenState != WebKit::ExitingFullScreen)
+    if (_fullScreenState != ExitingFullScreen)
         return;
-    _fullScreenState = WebKit::NotInFullScreen;
+    _fullScreenState = NotInFullScreen;
 
     [CATransaction begin];
     [CATransaction setDisableActions:YES];
@@ -737,7 +737,7 @@ static const NSTimeInterval kAnimationDuration = 0.2;
         ASSERT(!_repaintCallback);
     }
 
-    _repaintCallback = WebKit::VoidCallback::create([protectedSelf = retainPtr(self), self](WebKit::CallbackBase::Error) {
+    _repaintCallback = VoidCallback::create([protectedSelf = retainPtr(self), self](WebKit::CallbackBase::Error) {
         _repaintCallback = nullptr;
         _webViewPlaceholder.get().parent = nil;
         [_webViewPlaceholder removeFromSuperview];
@@ -763,7 +763,7 @@ static const NSTimeInterval kAnimationDuration = 0.2;
 
 - (void)webViewDidRemoveFromSuperviewWhileInFullscreen
 {
-    if (_fullScreenState == WebKit::InFullScreen && self._webView.window != _window.get())
+    if (_fullScreenState == InFullScreen && self._webView.window != _window.get())
         [self _exitFullscreenImmediately];
 }
 
@@ -855,11 +855,11 @@ static const NSTimeInterval kAnimationDuration = 0.2;
     if (manager)
         manager->requestExitFullScreen();
     [self exitFullScreen];
-    _fullScreenState = WebKit::ExitingFullScreen;
+    _fullScreenState = ExitingFullScreen;
     [self _completedExitFullScreen];
     RetainPtr<WKWebView> webView = self._webView;
     _webViewPlaceholder.get().parent = nil;
-    WebKit::replaceViewWithView(_webViewPlaceholder.get(), webView.get());
+    replaceViewWithView(_webViewPlaceholder.get(), webView.get());
     if (auto* page = [webView _page])
         page->setSuppressVisibilityUpdates(false);
     if (manager) {
@@ -961,7 +961,7 @@ static const NSTimeInterval kAnimationDuration = 0.2;
     [_fullscreenViewController setLocation:text];
 }
 
-- (WebKit::WebFullScreenManagerProxy*)_manager
+- (WebFullScreenManagerProxy*)_manager
 {
     if (auto* page = [self._webView _page])
         return page->fullScreenManager();
@@ -1049,5 +1049,4 @@ static const NSTimeInterval kAnimationDuration = 0.2;
 
 @end
 
-
 #endif // PLATFORM(IOS_FAMILY) && ENABLE(FULLSCREEN_API)
index b049a05..e2ab29c 100644 (file)
@@ -67,6 +67,8 @@
 #define MESSAGE_CHECK(assertion) MESSAGE_CHECK_BASE(assertion, process().connection())
 #define MESSAGE_CHECK_URL(url) MESSAGE_CHECK_BASE(m_process->checkURLReceivedFromWebProcess(url), m_process->connection())
 
+using namespace WebCore;
+
 @interface NSApplication ()
 - (BOOL)isSpeaking;
 - (void)speakString:(NSString *)string;
 #endif
 
 namespace WebKit {
-using namespace WebCore;
-    
+
 static inline bool expectsLegacyImplicitRubberBandControl()
 {
     if (MacApplication::isSafari()) {
index 55865e4..7fe9334 100644 (file)
 #include "WebProcess.h"
 #include <wtf/MainThread.h>
 
-namespace WebKit {
 using namespace WebCore::DOMCacheEngine;
-using namespace CacheStorage;
+using namespace WebKit::CacheStorage;
+
+namespace WebKit {
 
 WebCacheStorageConnection::WebCacheStorageConnection(WebCacheStorageProvider& provider, PAL::SessionID sessionID)
     : m_provider(provider)
index d4b3d17..a54e2e8 100644 (file)
 #import <wtf/RetainPtr.h>
 #import <wtf/text/TextStream.h>
 
+using namespace WTF;
+using namespace WebCore;
+
 static MonotonicTime mediaTimeToCurrentTime(CFTimeInterval t)
 {
-    return WTF::MonotonicTime::now() + Seconds(t - CACurrentMediaTime());
+    return MonotonicTime::now() + Seconds(t - CACurrentMediaTime());
 }
 
 static NSString * const WKExplicitBeginTimeFlag = @"WKPlatformCAAnimationExplicitBeginTimeFlag";
@@ -52,7 +55,7 @@ static NSString * const WKExplicitBeginTimeFlag = @"WKPlatformCAAnimationExplici
 
 @implementation WKAnimationDelegate
 
-- (instancetype)initWithLayerID:(WebCore::GraphicsLayer::PlatformLayerID)layerID layerTreeHost:(WebKit::RemoteLayerTreeHost*)layerTreeHost
+- (instancetype)initWithLayerID:(GraphicsLayer::PlatformLayerID)layerID layerTreeHost:(WebKit::RemoteLayerTreeHost*)layerTreeHost
 {
     if ((self = [super init])) {
         _layerID = layerID;
@@ -95,7 +98,6 @@ static NSString * const WKExplicitBeginTimeFlag = @"WKPlatformCAAnimationExplici
 @end
 
 namespace WebKit {
-using namespace WebCore;
 
 void PlatformCAAnimationRemote::KeyframeValue::encode(IPC::Encoder& encoder) const
 {
index 5c41a39..f07d2e1 100644 (file)
@@ -48,6 +48,8 @@
 #import <pal/spi/mac/NSAccessibilitySPI.h>
 #import <wtf/ObjCRuntimeExtras.h>
 
+using namespace WebCore;
+using namespace WebKit;
 
 @implementation WKAccessibilityWebPageObject
 
@@ -216,7 +218,7 @@ ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     
     // Some plugins may be able to figure out the scroll position and inset on their own.
     bool applyContentOffset = true;
-    if (auto pluginView = WebKit::WebPage::pluginViewForFrame(m_page->mainFrame()))
+    if (auto pluginView = WebPage::pluginViewForFrame(m_page->mainFrame()))
         applyContentOffset = !pluginView->plugin()->pluginHandlesContentOffsetForAccessibilityHitTest();
 
     if (applyContentOffset) {