Changeset 248713 in webkit
- Timestamp:
- Aug 15, 2019, 8:35:35 AM (7 years ago)
- Location:
- trunk/Source
- Files:
-
- 118 edited
- 1 copied
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/Headers.cmake (modified) (1 diff)
-
WebCore/WebCore.xcodeproj/project.pbxproj (modified) (4 diffs)
-
WebCore/loader/CookieJar.cpp (modified) (6 diffs)
-
WebCore/loader/CookieJar.h (modified) (2 diffs)
-
WebCore/loader/EmptyFrameLoaderClient.h (modified) (1 diff)
-
WebCore/loader/FrameLoaderClient.h (modified) (2 diffs)
-
WebCore/loader/NavigationAction.cpp (modified) (1 diff)
-
WebCore/loader/NavigationAction.h (modified) (3 diffs)
-
WebCore/page/ChromeClient.h (modified) (2 diffs)
-
WebCore/page/FrameIdentifier.h (copied) (copied from trunk/Source/WebKit/UIProcess/API/C/WKFrameHandleRef.cpp ) (2 diffs)
-
WebCore/page/GlobalFrameIdentifier.h (modified) (3 diffs)
-
WebCore/platform/network/CookieRequestHeaderFieldProxy.h (modified) (4 diffs)
-
WebCore/platform/network/NetworkStorageSession.cpp (modified) (5 diffs)
-
WebCore/platform/network/NetworkStorageSession.h (modified) (5 diffs)
-
WebCore/platform/network/SocketStreamHandle.cpp (modified) (1 diff)
-
WebCore/platform/network/cf/NetworkStorageSessionCFNetWin.cpp (modified) (4 diffs)
-
WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm (modified) (5 diffs)
-
WebCore/platform/network/curl/CookieJarCurl.cpp (modified) (4 diffs)
-
WebCore/platform/network/curl/CookieJarCurl.h (modified) (2 diffs)
-
WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp (modified) (4 diffs)
-
WebKit/ChangeLog (modified) (1 diff)
-
WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp (modified) (4 diffs)
-
WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h (modified) (2 diffs)
-
WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp (modified) (4 diffs)
-
WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h (modified) (2 diffs)
-
WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.h (modified) (3 diffs)
-
WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp (modified) (7 diffs)
-
WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h (modified) (5 diffs)
-
WebKit/NetworkProcess/NetworkCORSPreflightChecker.h (modified) (1 diff)
-
WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp (modified) (7 diffs)
-
WebKit/NetworkProcess/NetworkConnectionToWebProcess.h (modified) (4 diffs)
-
WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in (modified) (3 diffs)
-
WebKit/NetworkProcess/NetworkLoadChecker.cpp (modified) (1 diff)
-
WebKit/NetworkProcess/NetworkLoadChecker.h (modified) (3 diffs)
-
WebKit/NetworkProcess/NetworkLoadParameters.h (modified) (2 diffs)
-
WebKit/NetworkProcess/NetworkProcess.h (modified) (1 diff)
-
WebKit/NetworkProcess/NetworkResourceLoader.cpp (modified) (20 diffs)
-
WebKit/NetworkProcess/NetworkResourceLoader.h (modified) (2 diffs)
-
WebKit/NetworkProcess/cache/NetworkCache.h (modified) (2 diffs)
-
WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h (modified) (4 diffs)
-
WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm (modified) (3 diffs)
-
WebKit/Scripts/webkit/messages.py (modified) (1 diff)
-
WebKit/Shared/API/APIFrameHandle.cpp (modified) (2 diffs)
-
WebKit/Shared/API/APIFrameHandle.h (modified) (3 diffs)
-
WebKit/Shared/API/Cocoa/_WKFrameHandle.mm (modified) (4 diffs)
-
WebKit/Shared/Authentication/AuthenticationManager.cpp (modified) (1 diff)
-
WebKit/Shared/Authentication/AuthenticationManager.h (modified) (2 diffs)
-
WebKit/Shared/FrameInfoData.cpp (modified) (1 diff)
-
WebKit/Shared/FrameInfoData.h (modified) (2 diffs)
-
WebKit/UIProcess/API/APIFrameInfo.cpp (modified) (1 diff)
-
WebKit/UIProcess/API/C/WKFrameHandleRef.cpp (modified) (1 diff)
-
WebKit/UIProcess/API/Cocoa/WKWebView.mm (modified) (2 diffs)
-
WebKit/UIProcess/API/Cocoa/_WKInspector.mm (modified) (2 diffs)
-
WebKit/UIProcess/Automation/SimulatedInputDispatcher.cpp (modified) (1 diff)
-
WebKit/UIProcess/Automation/SimulatedInputDispatcher.h (modified) (4 diffs)
-
WebKit/UIProcess/Automation/WebAutomationSession.cpp (modified) (25 diffs)
-
WebKit/UIProcess/Automation/WebAutomationSession.h (modified) (5 diffs)
-
WebKit/UIProcess/Cocoa/UIDelegate.mm (modified) (1 diff)
-
WebKit/UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.mm (modified) (2 diffs)
-
WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm (modified) (1 diff)
-
WebKit/UIProcess/Network/NetworkProcessProxy.cpp (modified) (2 diffs)
-
WebKit/UIProcess/Network/NetworkProcessProxy.h (modified) (3 diffs)
-
WebKit/UIProcess/Network/NetworkProcessProxy.messages.in (modified) (2 diffs)
-
WebKit/UIProcess/ProvisionalPageProxy.cpp (modified) (14 diffs)
-
WebKit/UIProcess/ProvisionalPageProxy.h (modified) (2 diffs)
-
WebKit/UIProcess/ServiceWorkerProcessProxy.cpp (modified) (1 diff)
-
WebKit/UIProcess/ServiceWorkerProcessProxy.h (modified) (1 diff)
-
WebKit/UIProcess/SuspendedPageProxy.cpp (modified) (1 diff)
-
WebKit/UIProcess/SuspendedPageProxy.h (modified) (3 diffs)
-
WebKit/UIProcess/UserMediaPermissionCheckProxy.cpp (modified) (1 diff)
-
WebKit/UIProcess/UserMediaPermissionCheckProxy.h (modified) (3 diffs)
-
WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp (modified) (7 diffs)
-
WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.h (modified) (4 diffs)
-
WebKit/UIProcess/UserMediaPermissionRequestProxy.cpp (modified) (1 diff)
-
WebKit/UIProcess/UserMediaPermissionRequestProxy.h (modified) (4 diffs)
-
WebKit/UIProcess/WebFrameProxy.cpp (modified) (1 diff)
-
WebKit/UIProcess/WebFrameProxy.h (modified) (4 diffs)
-
WebKit/UIProcess/WebPageProxy.cpp (modified) (60 diffs)
-
WebKit/UIProcess/WebPageProxy.h (modified) (15 diffs)
-
WebKit/UIProcess/WebPageProxy.messages.in (modified) (11 diffs)
-
WebKit/UIProcess/WebProcessProxy.cpp (modified) (1 diff)
-
WebKit/UIProcess/WebProcessProxy.h (modified) (4 diffs)
-
WebKit/UIProcess/WebProcessProxy.messages.in (modified) (1 diff)
-
WebKit/UIProcess/ios/WKContentView.mm (modified) (1 diff)
-
WebKit/UIProcess/ios/WebPageProxyIOS.mm (modified) (1 diff)
-
WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp (modified) (37 diffs)
-
WebKit/WebProcess/Automation/WebAutomationSessionProxy.h (modified) (3 diffs)
-
WebKit/WebProcess/Automation/WebAutomationSessionProxy.messages.in (modified) (1 diff)
-
WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm (modified) (1 diff)
-
WebKit/WebProcess/InjectedBundle/API/glib/WebKitFrame.cpp (modified) (1 diff)
-
WebKit/WebProcess/Network/WebLoaderStrategy.cpp (modified) (14 diffs)
-
WebKit/WebProcess/Network/WebResourceLoader.cpp (modified) (11 diffs)
-
WebKit/WebProcess/Network/WebResourceLoader.h (modified) (2 diffs)
-
WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp (modified) (3 diffs)
-
WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp (modified) (3 diffs)
-
WebKit/WebProcess/WebCoreSupport/WebChromeClient.h (modified) (1 diff)
-
WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (modified) (3 diffs)
-
WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h (modified) (1 diff)
-
WebKit/WebProcess/WebPage/WebCookieJar.cpp (modified) (4 diffs)
-
WebKit/WebProcess/WebPage/WebCookieJar.h (modified) (1 diff)
-
WebKit/WebProcess/WebPage/WebFrame.cpp (modified) (2 diffs)
-
WebKit/WebProcess/WebPage/WebFrame.h (modified) (2 diffs)
-
WebKit/WebProcess/WebPage/WebInspector.cpp (modified) (1 diff)
-
WebKit/WebProcess/WebPage/WebInspector.h (modified) (2 diffs)
-
WebKit/WebProcess/WebPage/WebInspector.messages.in (modified) (1 diff)
-
WebKit/WebProcess/WebPage/WebPage.cpp (modified) (23 diffs)
-
WebKit/WebProcess/WebPage/WebPage.h (modified) (10 diffs)
-
WebKit/WebProcess/WebPage/WebPage.messages.in (modified) (8 diffs)
-
WebKit/WebProcess/WebPage/gtk/WebPageGtk.cpp (modified) (1 diff)
-
WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (modified) (2 diffs)
-
WebKit/WebProcess/WebPage/mac/WebPageMac.mm (modified) (1 diff)
-
WebKit/WebProcess/WebProcess.cpp (modified) (1 diff)
-
WebKit/WebProcess/WebProcess.h (modified) (3 diffs)
-
WebKitLegacy/mac/ChangeLog (modified) (1 diff)
-
WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.h (modified) (1 diff)
-
WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm (modified) (1 diff)
-
WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.cpp (modified) (1 diff)
-
WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r248712 r248713 1 2019-08-15 Simon Fraser <simon.fraser@apple.com> 2 3 Use ObjectIdentifier<FrameIdentifierType> for frameIDs 4 https://bugs.webkit.org/show_bug.cgi?id=199986 5 6 Reviewed by Ryosuke Niwa. 7 8 Use the strongly-typed FrameIdentifier instead of uint64_t as frame identifiers everywhere. 9 10 * WebCore.xcodeproj/project.pbxproj: 11 * loader/CookieJar.cpp: 12 (WebCore::CookieJar::cookies const): 13 (WebCore::CookieJar::setCookies): 14 (WebCore::CookieJar::cookieRequestHeaderFieldValue const): 15 (WebCore::CookieJar::getRawCookies const): 16 * loader/CookieJar.h: 17 * loader/EmptyFrameLoaderClient.h: 18 * loader/FrameLoaderClient.h: 19 * loader/NavigationAction.cpp: 20 * loader/NavigationAction.h: 21 (WebCore::NavigationAction::Requester::frameID const): 22 * page/ChromeClient.h: 23 * page/GlobalFrameIdentifier.h: 24 (WebCore::GlobalFrameIdentifier::decode): 25 * platform/network/CookieRequestHeaderFieldProxy.h: 26 * platform/network/NetworkStorageSession.cpp: 27 (WebCore::NetworkStorageSession::shouldBlockCookies const): 28 (WebCore::NetworkStorageSession::hasStorageAccess const): 29 (WebCore::NetworkStorageSession::grantStorageAccess): 30 (WebCore::NetworkStorageSession::removeStorageAccessForFrame): 31 * platform/network/NetworkStorageSession.h: 32 * platform/network/cocoa/NetworkStorageSessionCocoa.mm: 33 (WebCore::cookiesForURL): 34 (WebCore::cookiesForSession): 35 (WebCore::NetworkStorageSession::cookiesForDOM const): 36 (WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const): 37 (WebCore::NetworkStorageSession::setCookiesFromDOM const): 38 (WebCore::NetworkStorageSession::getRawCookies const): 39 1 40 2019-08-15 Thibault Saunier <tsaunier@igalia.com> 2 41 -
trunk/Source/WebCore/Headers.cmake
r248517 r248713 778 778 page/Frame.h 779 779 page/FrameDestructionObserver.h 780 page/FrameIdentifier.h 780 781 page/FrameSnapshotting.h 781 782 page/FrameTree.h -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r248657 r248713 281 281 0F03C0751884805500A5F8CA /* InspectorOverlay.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C522D4A15B478B2009B7C95 /* InspectorOverlay.h */; settings = {ATTRIBUTES = (Private, ); }; }; 282 282 0F099D0917B968A100FF84B9 /* WebCoreTypedArrayController.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F099D0717B968A100FF84B9 /* WebCoreTypedArrayController.h */; settings = {ATTRIBUTES = (Private, ); }; }; 283 0F11781822E3C47F008BD570 /* FrameIdentifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F11781622E3C47E008BD570 /* FrameIdentifier.h */; settings = {ATTRIBUTES = (Private, ); }; }; 283 284 0F11A54F0F39233100C37884 /* RenderSelectionInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F11A54E0F39233100C37884 /* RenderSelectionInfo.h */; settings = {ATTRIBUTES = (Private, ); }; }; 284 285 0F13163E16ED0CC80035CC04 /* PlatformCAFilters.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F13163D16ED0CC80035CC04 /* PlatformCAFilters.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 5579 5580 0F099D0617B968A100FF84B9 /* WebCoreTypedArrayController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebCoreTypedArrayController.cpp; sourceTree = "<group>"; }; 5580 5581 0F099D0717B968A100FF84B9 /* WebCoreTypedArrayController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreTypedArrayController.h; sourceTree = "<group>"; }; 5582 0F11781622E3C47E008BD570 /* FrameIdentifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FrameIdentifier.h; sourceTree = "<group>"; }; 5581 5583 0F11A54E0F39233100C37884 /* RenderSelectionInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSelectionInfo.h; sourceTree = "<group>"; }; 5582 5584 0F13163D16ED0CC80035CC04 /* PlatformCAFilters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformCAFilters.h; sourceTree = "<group>"; }; … … 20205 20207 974A862014B7ADBB003FDC76 /* FrameDestructionObserver.cpp */, 20206 20208 974A862114B7ADBB003FDC76 /* FrameDestructionObserver.h */, 20209 0F11781622E3C47E008BD570 /* FrameIdentifier.h */, 20207 20210 C4CD629818383766007EBAF1 /* FrameSnapshotting.cpp */, 20208 20211 C4CD629918383766007EBAF1 /* FrameSnapshotting.h */, … … 29256 29259 65BF022F0974816300C43196 /* Frame.h in Headers */, 29257 29260 974A862314B7ADBB003FDC76 /* FrameDestructionObserver.h in Headers */, 29261 0F11781822E3C47F008BD570 /* FrameIdentifier.h in Headers */, 29258 29262 656D373C0ADBA5DE00A4554D /* FrameLoader.h in Headers */, 29259 29263 656D373E0ADBA5DE00A4554D /* FrameLoaderClient.h in Headers */, -
trunk/Source/WebCore/loader/CookieJar.cpp
r248668 r248713 72 72 auto includeSecureCookies = shouldIncludeSecureCookies(document, url); 73 73 74 Optional< uint64_t> frameID;74 Optional<FrameIdentifier> frameID; 75 75 Optional<PageIdentifier> pageID; 76 76 if (auto* frame = document.frame()) { … … 95 95 TraceScope scope(FetchCookiesStart, FetchCookiesEnd); 96 96 97 Optional< uint64_t> frameID;97 Optional<FrameIdentifier> frameID; 98 98 Optional<PageIdentifier> pageID; 99 99 if (auto* frame = document.frame()) { … … 107 107 void CookieJar::setCookies(Document& document, const URL& url, const String& cookieString) 108 108 { 109 Optional< uint64_t> frameID;109 Optional<FrameIdentifier> frameID; 110 110 Optional<PageIdentifier> pageID; 111 111 if (auto* frame = document.frame()) { … … 129 129 } 130 130 131 std::pair<String, SecureCookiesAccessed> CookieJar::cookieRequestHeaderFieldValue(const PAL::SessionID&, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional< uint64_t> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies includeSecureCookies) const131 std::pair<String, SecureCookiesAccessed> CookieJar::cookieRequestHeaderFieldValue(const PAL::SessionID&, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<FrameIdentifier> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies includeSecureCookies) const 132 132 { 133 133 if (auto* session = m_storageSessionProvider->storageSession()) { … … 142 142 String CookieJar::cookieRequestHeaderFieldValue(Document& document, const URL& url) const 143 143 { 144 Optional< uint64_t> frameID;144 Optional<FrameIdentifier> frameID; 145 145 Optional<PageIdentifier> pageID; 146 146 if (auto* frame = document.frame()) { … … 157 157 bool CookieJar::getRawCookies(const Document& document, const URL& url, Vector<Cookie>& cookies) const 158 158 { 159 Optional< uint64_t> frameID;159 Optional<FrameIdentifier> frameID; 160 160 Optional<PageIdentifier> pageID; 161 161 if (auto* frame = document.frame()) { -
trunk/Source/WebCore/loader/CookieJar.h
r245796 r248713 26 26 #pragma once 27 27 28 #include "FrameIdentifier.h" 28 29 #include "PageIdentifier.h" 29 30 #include <wtf/Forward.h> … … 60 61 61 62 virtual bool cookiesEnabled(const Document&) const; 62 virtual std::pair<String, SecureCookiesAccessed> cookieRequestHeaderFieldValue(const PAL::SessionID&, const URL& firstParty, const SameSiteInfo&, const URL&, Optional< uint64_t> frameID, Optional<PageIdentifier>, IncludeSecureCookies) const;63 virtual std::pair<String, SecureCookiesAccessed> cookieRequestHeaderFieldValue(const PAL::SessionID&, const URL& firstParty, const SameSiteInfo&, const URL&, Optional<FrameIdentifier>, Optional<PageIdentifier>, IncludeSecureCookies) const; 63 64 virtual bool getRawCookies(const Document&, const URL&, Vector<Cookie>&) const; 64 65 virtual void deleteCookie(const Document&, const URL&, const String& cookieName); -
trunk/Source/WebCore/loader/EmptyFrameLoaderClient.h
r245796 r248713 33 33 void frameLoaderDestroyed() override { } 34 34 35 Optional< uint64_t> frameID() const override { return WTF::nullopt; }35 Optional<FrameIdentifier> frameID() const override { return WTF::nullopt; } 36 36 Optional<PageIdentifier> pageID() const override { return WTF::nullopt; } 37 37 PAL::SessionID sessionID() const override; -
trunk/Source/WebCore/loader/FrameLoaderClient.h
r245796 r248713 30 30 #pragma once 31 31 32 #include "FrameIdentifier.h" 32 33 #include "FrameLoaderTypes.h" 33 34 #include "LayoutMilestone.h" … … 129 130 130 131 virtual Optional<PageIdentifier> pageID() const = 0; 131 virtual Optional< uint64_t> frameID() const = 0;132 virtual Optional<FrameIdentifier> frameID() const = 0; 132 133 virtual PAL::SessionID sessionID() const = 0; 133 134 -
trunk/Source/WebCore/loader/NavigationAction.cpp
r246490 r248713 42 42 : m_url { URL { document.url() } } 43 43 , m_origin { makeRefPtr(document.securityOrigin()) } 44 , m_pageIDAndFrameIDPair { document.frame() ? std::make_pair(document.frame()->loader().client().pageID().valueOr(PageIdentifier { }), document.frame()->loader().client().frameID().valueOr( 0)) : std::make_pair<PageIdentifier, uint64_t>({ }, 0) }44 , m_pageIDAndFrameIDPair { document.frame() ? std::make_pair(document.frame()->loader().client().pageID().valueOr(PageIdentifier { }), document.frame()->loader().client().frameID().valueOr(FrameIdentifier { })) : std::make_pair<PageIdentifier, FrameIdentifier>({ }, { }) } 45 45 { 46 46 } -
trunk/Source/WebCore/loader/NavigationAction.h
r246490 r248713 31 31 #include "AdClickAttribution.h" 32 32 #include "BackForwardItemIdentifier.h" 33 #include "FrameIdentifier.h" 33 34 #include "FrameLoaderTypes.h" 34 35 #include "LayoutPoint.h" … … 65 66 NavigationAction& operator=(NavigationAction&&); 66 67 67 using PageIDAndFrameIDPair = std::pair<PageIdentifier, uint64_t /* frameID */>;68 using PageIDAndFrameIDPair = std::pair<PageIdentifier, FrameIdentifier>; // FIXME: Use GlobalFrameIdentifier. 68 69 class Requester { 69 70 public: … … 73 74 const SecurityOrigin& securityOrigin() const { return *m_origin; } 74 75 PageIdentifier pageID() const { return m_pageIDAndFrameIDPair.first; } 75 uint64_tframeID() const { return m_pageIDAndFrameIDPair.second; }76 FrameIdentifier frameID() const { return m_pageIDAndFrameIDPair.second; } 76 77 private: 77 78 URL m_url; -
trunk/Source/WebCore/page/ChromeClient.h
r248139 r248713 31 31 #include "DocumentStorageAccess.h" 32 32 #include "FocusDirection.h" 33 #include "FrameIdentifier.h" 33 34 #include "FrameLoader.h" 34 35 #include "GraphicsContext.h" … … 487 488 488 489 #if ENABLE(RESOURCE_LOAD_STATISTICS) 489 virtual void hasStorageAccess(RegistrableDomain&& /*subFrameDomain*/, RegistrableDomain&& /*topFrameDomain*/, uint64_t /*frameID*/, PageIdentifier, WTF::CompletionHandler<void(bool)>&& completionHandler) { completionHandler(false); }490 virtual void requestStorageAccess(RegistrableDomain&& /*subFrameDomain*/, RegistrableDomain&& /*topFrameDomain*/, uint64_t /*frameID*/, PageIdentifier, WTF::CompletionHandler<void(StorageAccessWasGranted, StorageAccessPromptWasShown)>&& completionHandler) { completionHandler(StorageAccessWasGranted::No, StorageAccessPromptWasShown::No); }490 virtual void hasStorageAccess(RegistrableDomain&& /*subFrameDomain*/, RegistrableDomain&& /*topFrameDomain*/, FrameIdentifier, PageIdentifier, WTF::CompletionHandler<void(bool)>&& completionHandler) { completionHandler(false); } 491 virtual void requestStorageAccess(RegistrableDomain&& /*subFrameDomain*/, RegistrableDomain&& /*topFrameDomain*/, FrameIdentifier, PageIdentifier, WTF::CompletionHandler<void(StorageAccessWasGranted, StorageAccessPromptWasShown)>&& completionHandler) { completionHandler(StorageAccessWasGranted::No, StorageAccessPromptWasShown::No); } 491 492 #endif 492 493 -
trunk/Source/WebCore/page/FrameIdentifier.h
r248712 r248713 1 1 /* 2 * Copyright (C) 201 6Apple Inc. All rights reserved.2 * Copyright (C) 2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #include "config.h" 27 #include "WKFrameHandleRef.h" 26 #pragma once 28 27 29 #include "APIFrameHandle.h" 30 #include "WKAPICast.h" 28 #include <wtf/ObjectIdentifier.h> 31 29 32 using namespace WebKit; 30 namespace WebCore { 33 31 34 WKTypeID WKFrameHandleGetTypeID() 32 enum FrameIdentifierType { }; 33 using FrameIdentifier = ObjectIdentifier<FrameIdentifierType>; 34 35 inline FrameIdentifier frameIdentifierFromID(uint64_t frameID) 35 36 { 36 return toAPI(API::FrameHandle::APIType);37 return makeObjectIdentifier<FrameIdentifierType>(frameID); 37 38 } 38 39 39 uint64_t WKFrameHandleGetFrameID(WKFrameHandleRef frameHandleRef)40 {41 return toImpl(frameHandleRef)->frameID();42 40 } -
trunk/Source/WebCore/page/GlobalFrameIdentifier.h
r245796 r248713 26 26 #pragma once 27 27 28 #include "FrameIdentifier.h" 28 29 #include "PageIdentifier.h" 29 30 #include <wtf/Optional.h> … … 34 35 struct GlobalFrameIdentifier { 35 36 PageIdentifier pageID; 36 uint64_tframeID;37 FrameIdentifier frameID; 37 38 38 39 template<class Encoder> void encode(Encoder&) const; … … 54 55 return WTF::nullopt; 55 56 56 Optional< uint64_t> frameID;57 Optional<FrameIdentifier> frameID; 57 58 decoder >> frameID; 58 59 if (!frameID) -
trunk/Source/WebCore/platform/network/CookieRequestHeaderFieldProxy.h
r248668 r248713 27 27 28 28 #include "CookieJar.h" 29 #include "FrameIdentifier.h" 29 30 #include "PageIdentifier.h" 30 31 #include "SameSiteInfo.h" … … 39 40 SameSiteInfo sameSiteInfo; 40 41 URL url; 41 Optional< uint64_t> frameID;42 Optional<FrameIdentifier> frameID; 42 43 Optional<PageIdentifier> pageID; 43 44 IncludeSecureCookies includeSecureCookies { IncludeSecureCookies::No }; … … 79 80 return WTF::nullopt; 80 81 81 Optional<uint64_t> frameID; 82 if (!decoder.decode(frameID)) 82 Optional<Optional<FrameIdentifier>> frameID; 83 decoder >> frameID; 84 if (!frameID) 83 85 return WTF::nullopt; 84 86 … … 92 94 return WTF::nullopt; 93 95 94 return CookieRequestHeaderFieldProxy { *sessionID, WTFMove(firstParty), WTFMove(sameSiteInfo), WTFMove(url), frameID, *pageID, includeSecureCookies };96 return CookieRequestHeaderFieldProxy { *sessionID, WTFMove(firstParty), WTFMove(sameSiteInfo), WTFMove(url), *frameID, *pageID, includeSecureCookies }; 95 97 } 96 98 -
trunk/Source/WebCore/platform/network/NetworkStorageSession.cpp
r248640 r248713 80 80 } 81 81 82 bool NetworkStorageSession::shouldBlockCookies(const ResourceRequest& request, Optional< uint64_t> frameID, Optional<PageIdentifier> pageID) const82 bool NetworkStorageSession::shouldBlockCookies(const ResourceRequest& request, Optional<FrameIdentifier> frameID, Optional<PageIdentifier> pageID) const 83 83 { 84 84 return shouldBlockCookies(request.firstPartyForCookies(), request.url(), frameID, pageID); 85 85 } 86 86 87 bool NetworkStorageSession::shouldBlockCookies(const URL& firstPartyForCookies, const URL& resource, Optional< uint64_t> frameID, Optional<PageIdentifier> pageID) const87 bool NetworkStorageSession::shouldBlockCookies(const URL& firstPartyForCookies, const URL& resource, Optional<FrameIdentifier> frameID, Optional<PageIdentifier> pageID) const 88 88 { 89 89 RegistrableDomain firstPartyDomain { firstPartyForCookies }; … … 137 137 } 138 138 139 bool NetworkStorageSession::hasStorageAccess(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, Optional< uint64_t> frameID, PageIdentifier pageID) const139 bool NetworkStorageSession::hasStorageAccess(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, Optional<FrameIdentifier> frameID, PageIdentifier pageID) const 140 140 { 141 141 if (frameID) { … … 170 170 } 171 171 172 void NetworkStorageSession::grantStorageAccess(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, Optional< uint64_t> frameID, PageIdentifier pageID)172 void NetworkStorageSession::grantStorageAccess(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, Optional<FrameIdentifier> frameID, PageIdentifier pageID) 173 173 { 174 174 if (!frameID) { … … 192 192 auto pagesGrantedIterator = m_framesGrantedStorageAccess.find(pageID); 193 193 if (pagesGrantedIterator == m_framesGrantedStorageAccess.end()) { 194 HashMap< uint64_t, RegistrableDomain, DefaultHash<uint64_t>::Hash, WTF::UnsignedWithZeroKeyHashTraits<uint64_t>> entry;194 HashMap<FrameIdentifier, RegistrableDomain> entry; 195 195 entry.add(frameID.value(), resourceDomain); 196 196 m_framesGrantedStorageAccess.add(pageID, entry); … … 204 204 } 205 205 206 void NetworkStorageSession::removeStorageAccessForFrame( uint64_tframeID, PageIdentifier pageID)206 void NetworkStorageSession::removeStorageAccessForFrame(FrameIdentifier frameID, PageIdentifier pageID) 207 207 { 208 208 auto iteration = m_framesGrantedStorageAccess.find(pageID); -
trunk/Source/WebCore/platform/network/NetworkStorageSession.h
r248640 r248713 27 27 28 28 #include "CredentialStorage.h" 29 #include "FrameIdentifier.h" 29 30 #include "PageIdentifier.h" 30 31 #include "RegistrableDomain.h" … … 124 125 WEBCORE_EXPORT void setCookie(const Cookie&); 125 126 WEBCORE_EXPORT void setCookies(const Vector<Cookie>&, const URL&, const URL& mainDocumentURL); 126 WEBCORE_EXPORT void setCookiesFromDOM(const URL& firstParty, const SameSiteInfo&, const URL&, Optional< uint64_t> frameID, Optional<PageIdentifier>, const String&) const;127 WEBCORE_EXPORT void setCookiesFromDOM(const URL& firstParty, const SameSiteInfo&, const URL&, Optional<FrameIdentifier>, Optional<PageIdentifier>, const String&) const; 127 128 WEBCORE_EXPORT void deleteCookie(const Cookie&); 128 129 WEBCORE_EXPORT void deleteCookie(const URL&, const String&) const; … … 133 134 WEBCORE_EXPORT Vector<Cookie> getAllCookies(); 134 135 WEBCORE_EXPORT Vector<Cookie> getCookies(const URL&); 135 WEBCORE_EXPORT bool getRawCookies(const URL& firstParty, const SameSiteInfo&, const URL&, Optional< uint64_t> frameID, Optional<PageIdentifier>, Vector<Cookie>&) const;136 WEBCORE_EXPORT bool getRawCookies(const URL& firstParty, const SameSiteInfo&, const URL&, Optional<FrameIdentifier>, Optional<PageIdentifier>, Vector<Cookie>&) const; 136 137 WEBCORE_EXPORT void flushCookieStore(); 137 138 WEBCORE_EXPORT void getHostnamesWithCookies(HashSet<String>& hostnames); 138 WEBCORE_EXPORT std::pair<String, bool> cookiesForDOM(const URL& firstParty, const SameSiteInfo&, const URL&, Optional< uint64_t> frameID, Optional<PageIdentifier>, IncludeSecureCookies) const;139 WEBCORE_EXPORT std::pair<String, bool> cookieRequestHeaderFieldValue(const URL& firstParty, const SameSiteInfo&, const URL&, Optional< uint64_t> frameID, Optional<PageIdentifier>, IncludeSecureCookies) const;139 WEBCORE_EXPORT std::pair<String, bool> cookiesForDOM(const URL& firstParty, const SameSiteInfo&, const URL&, Optional<FrameIdentifier>, Optional<PageIdentifier>, IncludeSecureCookies) const; 140 WEBCORE_EXPORT std::pair<String, bool> cookieRequestHeaderFieldValue(const URL& firstParty, const SameSiteInfo&, const URL&, Optional<FrameIdentifier>, Optional<PageIdentifier>, IncludeSecureCookies) const; 140 141 WEBCORE_EXPORT std::pair<String, bool> cookieRequestHeaderFieldValue(const CookieRequestHeaderFieldProxy&) const; 141 142 142 143 #if ENABLE(RESOURCE_LOAD_STATISTICS) 143 WEBCORE_EXPORT bool shouldBlockCookies(const ResourceRequest&, Optional< uint64_t> frameID, Optional<PageIdentifier>) const;144 WEBCORE_EXPORT bool shouldBlockCookies(const URL& firstPartyForCookies, const URL& resource, Optional< uint64_t> frameID, Optional<PageIdentifier>) const;144 WEBCORE_EXPORT bool shouldBlockCookies(const ResourceRequest&, Optional<FrameIdentifier>, Optional<PageIdentifier>) const; 145 WEBCORE_EXPORT bool shouldBlockCookies(const URL& firstPartyForCookies, const URL& resource, Optional<FrameIdentifier>, Optional<PageIdentifier>) const; 145 146 WEBCORE_EXPORT bool shouldBlockThirdPartyCookies(const RegistrableDomain&) const; 146 147 WEBCORE_EXPORT bool shouldBlockThirdPartyCookiesButKeepFirstPartyCookiesFor(const RegistrableDomain&) const; … … 149 150 WEBCORE_EXPORT void setAgeCapForClientSideCookies(Optional<Seconds>); 150 151 WEBCORE_EXPORT void removePrevalentDomains(const Vector<RegistrableDomain>& domains); 151 WEBCORE_EXPORT bool hasStorageAccess(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, Optional< uint64_t> frameID, PageIdentifier) const;152 WEBCORE_EXPORT bool hasStorageAccess(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, Optional<FrameIdentifier>, PageIdentifier) const; 152 153 WEBCORE_EXPORT Vector<String> getAllStorageAccessEntries() const; 153 WEBCORE_EXPORT void grantStorageAccess(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, Optional< uint64_t> frameID, PageIdentifier);154 WEBCORE_EXPORT void removeStorageAccessForFrame( uint64_t frameID, PageIdentifier);154 WEBCORE_EXPORT void grantStorageAccess(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, Optional<FrameIdentifier>, PageIdentifier); 155 WEBCORE_EXPORT void removeStorageAccessForFrame(FrameIdentifier, PageIdentifier); 155 156 WEBCORE_EXPORT void clearPageSpecificDataForResourceLoadStatistics(PageIdentifier); 156 157 WEBCORE_EXPORT void removeAllStorageAccess(); … … 186 187 HashSet<RegistrableDomain> m_registrableDomainsToBlockAndDeleteCookiesFor; 187 188 HashSet<RegistrableDomain> m_registrableDomainsToBlockButKeepCookiesFor; 188 HashMap<PageIdentifier, HashMap< uint64_t, RegistrableDomain, DefaultHash<uint64_t>::Hash, WTF::UnsignedWithZeroKeyHashTraits<uint64_t>>> m_framesGrantedStorageAccess;189 HashMap<PageIdentifier, HashMap<FrameIdentifier, RegistrableDomain>> m_framesGrantedStorageAccess; 189 190 HashMap<PageIdentifier, HashMap<RegistrableDomain, RegistrableDomain>> m_pagesGrantedStorageAccess; 190 191 Optional<Seconds> m_cacheMaxAgeCapForPrevalentResources { }; -
trunk/Source/WebCore/platform/network/SocketStreamHandle.cpp
r246405 r248713 62 62 if (m_state == Connecting || m_state == Closing) 63 63 return completionHandler(false, false); 64 platformSendHandshake(reinterpret_cast<const uint8_t*>(handshake.data()), handshake.length(), headerFieldProxy, WTFMove(completionHandler));64 platformSendHandshake(reinterpret_cast<const uint8_t*>(handshake.data()), handshake.length(), WTFMove(headerFieldProxy), WTFMove(completionHandler)); 65 65 } 66 66 -
trunk/Source/WebCore/platform/network/cf/NetworkStorageSessionCFNetWin.cpp
r245796 r248713 190 190 } 191 191 192 void NetworkStorageSession::setCookiesFromDOM(const URL& firstParty, const SameSiteInfo&, const URL& url, Optional< uint64_t> frameID, Optional<PageIdentifier> pageID, const String& value) const192 void NetworkStorageSession::setCookiesFromDOM(const URL& firstParty, const SameSiteInfo&, const URL& url, Optional<FrameIdentifier> frameID, Optional<PageIdentifier> pageID, const String& value) const 193 193 { 194 194 UNUSED_PARAM(frameID); … … 226 226 } 227 227 228 std::pair<String, bool> NetworkStorageSession::cookiesForDOM(const URL& firstParty, const SameSiteInfo&, const URL& url, Optional< uint64_t> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies includeSecureCookies) const228 std::pair<String, bool> NetworkStorageSession::cookiesForDOM(const URL& firstParty, const SameSiteInfo&, const URL& url, Optional<FrameIdentifier> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies includeSecureCookies) const 229 229 { 230 230 UNUSED_PARAM(frameID); … … 241 241 } 242 242 243 std::pair<String, bool> NetworkStorageSession::cookieRequestHeaderFieldValue(const URL& firstParty, const SameSiteInfo&, const URL& url, Optional< uint64_t> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies includeSecureCookies) const243 std::pair<String, bool> NetworkStorageSession::cookieRequestHeaderFieldValue(const URL& firstParty, const SameSiteInfo&, const URL& url, Optional<FrameIdentifier> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies includeSecureCookies) const 244 244 { 245 245 UNUSED_PARAM(frameID); … … 265 265 } 266 266 267 bool NetworkStorageSession::getRawCookies(const URL& firstParty, const SameSiteInfo&, const URL& url, Optional< uint64_t> frameID, Optional<PageIdentifier> pageID, Vector<Cookie>& rawCookies) const267 bool NetworkStorageSession::getRawCookies(const URL& firstParty, const SameSiteInfo&, const URL& url, Optional<FrameIdentifier> frameID, Optional<PageIdentifier> pageID, Vector<Cookie>& rawCookies) const 268 268 { 269 269 UNUSED_PARAM(frameID); -
trunk/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm
r246942 r248713 295 295 } 296 296 297 static NSArray *cookiesForURL(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional< uint64_t> frameID, Optional<PageIdentifier> pageID)297 static NSArray *cookiesForURL(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<FrameIdentifier> frameID, Optional<PageIdentifier> pageID) 298 298 { 299 299 #if ENABLE(RESOURCE_LOAD_STATISTICS) … … 308 308 309 309 enum IncludeHTTPOnlyOrNot { DoNotIncludeHTTPOnly, IncludeHTTPOnly }; 310 static std::pair<String, bool> cookiesForSession(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional< uint64_t> frameID, Optional<PageIdentifier> pageID, IncludeHTTPOnlyOrNot includeHTTPOnly, IncludeSecureCookies includeSecureCookies)310 static std::pair<String, bool> cookiesForSession(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<FrameIdentifier> frameID, Optional<PageIdentifier> pageID, IncludeHTTPOnlyOrNot includeHTTPOnly, IncludeSecureCookies includeSecureCookies) 311 311 { 312 312 ASSERT(hasProcessPrivilege(ProcessPrivilege::CanAccessRawCookies)); … … 364 364 } 365 365 366 std::pair<String, bool> NetworkStorageSession::cookiesForDOM(const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional< uint64_t> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies includeSecureCookies) const366 std::pair<String, bool> NetworkStorageSession::cookiesForDOM(const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<FrameIdentifier> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies includeSecureCookies) const 367 367 { 368 368 return cookiesForSession(*this, firstParty, sameSiteInfo, url, frameID, pageID, DoNotIncludeHTTPOnly, includeSecureCookies); 369 369 } 370 370 371 std::pair<String, bool> NetworkStorageSession::cookieRequestHeaderFieldValue(const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional< uint64_t> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies includeSecureCookies) const371 std::pair<String, bool> NetworkStorageSession::cookieRequestHeaderFieldValue(const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<FrameIdentifier> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies includeSecureCookies) const 372 372 { 373 373 return cookiesForSession(*this, firstParty, sameSiteInfo, url, frameID, pageID, IncludeHTTPOnly, includeSecureCookies); … … 379 379 } 380 380 381 void NetworkStorageSession::setCookiesFromDOM(const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional< uint64_t> frameID, Optional<PageIdentifier> pageID, const String& cookieStr) const381 void NetworkStorageSession::setCookiesFromDOM(const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<FrameIdentifier> frameID, Optional<PageIdentifier> pageID, const String& cookieStr) const 382 382 { 383 383 ASSERT(hasProcessPrivilege(ProcessPrivilege::CanAccessRawCookies)); … … 444 444 } 445 445 446 bool NetworkStorageSession::getRawCookies(const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional< uint64_t> frameID, Optional<PageIdentifier> pageID, Vector<Cookie>& rawCookies) const446 bool NetworkStorageSession::getRawCookies(const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<FrameIdentifier> frameID, Optional<PageIdentifier> pageID, Vector<Cookie>& rawCookies) const 447 447 { 448 448 rawCookies.clear(); -
trunk/Source/WebCore/platform/network/curl/CookieJarCurl.cpp
r247064 r248713 60 60 } 61 61 62 void CookieJarCurl::setCookiesFromDOM(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo&, const URL& url, Optional< uint64_t> frameID, Optional<PageIdentifier>, const String& value) const62 void CookieJarCurl::setCookiesFromDOM(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo&, const URL& url, Optional<FrameIdentifier> frameID, Optional<PageIdentifier>, const String& value) const 63 63 { 64 64 UNUSED_PARAM(frameID); … … 74 74 } 75 75 76 std::pair<String, bool> CookieJarCurl::cookiesForDOM(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo&, const URL& url, Optional< uint64_t> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies) const76 std::pair<String, bool> CookieJarCurl::cookiesForDOM(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo&, const URL& url, Optional<FrameIdentifier> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies) const 77 77 { 78 78 UNUSED_PARAM(frameID); … … 83 83 } 84 84 85 std::pair<String, bool> CookieJarCurl::cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo&, const URL& url, Optional< uint64_t> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies) const85 std::pair<String, bool> CookieJarCurl::cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo&, const URL& url, Optional<FrameIdentifier> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies) const 86 86 { 87 87 UNUSED_PARAM(frameID); … … 113 113 } 114 114 115 bool CookieJarCurl::getRawCookies(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo&, const URL& url, Optional< uint64_t> frameID, Optional<PageIdentifier> pageID, Vector<Cookie>& rawCookies) const115 bool CookieJarCurl::getRawCookies(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo&, const URL& url, Optional<FrameIdentifier> frameID, Optional<PageIdentifier> pageID, Vector<Cookie>& rawCookies) const 116 116 { 117 117 UNUSED_PARAM(frameID); -
trunk/Source/WebCore/platform/network/curl/CookieJarCurl.h
r245796 r248713 25 25 #pragma once 26 26 27 #include "FrameIdentifier.h" 27 28 #include "PageIdentifier.h" 28 29 #include <wtf/Forward.h> … … 43 44 class CookieJarCurl { 44 45 public: 45 std::pair<String, bool> cookiesForDOM(const NetworkStorageSession&, const URL& firstParty, const SameSiteInfo&, const URL&, Optional< uint64_t> frameID, Optional<PageIdentifier>, IncludeSecureCookies) const;46 void setCookiesFromDOM(const NetworkStorageSession&, const URL& firstParty, const SameSiteInfo&, const URL&, Optional< uint64_t> frameID, Optional<PageIdentifier>, const String&) const;46 std::pair<String, bool> cookiesForDOM(const NetworkStorageSession&, const URL& firstParty, const SameSiteInfo&, const URL&, Optional<FrameIdentifier> frameID, Optional<PageIdentifier>, IncludeSecureCookies) const; 47 void setCookiesFromDOM(const NetworkStorageSession&, const URL& firstParty, const SameSiteInfo&, const URL&, Optional<FrameIdentifier> frameID, Optional<PageIdentifier>, const String&) const; 47 48 void setCookiesFromHTTPResponse(const NetworkStorageSession&, const URL& firstParty, const URL&, const String&) const; 48 49 void setCookieAcceptPolicy(const NetworkStorageSession&, CookieAcceptPolicy) const; 49 50 CookieAcceptPolicy cookieAcceptPolicy(const NetworkStorageSession&) const; 50 51 bool cookiesEnabled(const NetworkStorageSession&) const; 51 std::pair<String, bool> cookieRequestHeaderFieldValue(const NetworkStorageSession&, const URL& firstParty, const SameSiteInfo&, const URL&, Optional< uint64_t> frameID, Optional<PageIdentifier>, IncludeSecureCookies) const;52 std::pair<String, bool> cookieRequestHeaderFieldValue(const NetworkStorageSession&, const URL& firstParty, const SameSiteInfo&, const URL&, Optional<FrameIdentifier> frameID, Optional<PageIdentifier>, IncludeSecureCookies) const; 52 53 std::pair<String, bool> cookieRequestHeaderFieldValue(const NetworkStorageSession&, const CookieRequestHeaderFieldProxy&) const; 53 bool getRawCookies(const NetworkStorageSession&, const URL& firstParty, const SameSiteInfo&, const URL&, Optional< uint64_t> frameID, Optional<PageIdentifier>, Vector<Cookie>&) const;54 bool getRawCookies(const NetworkStorageSession&, const URL& firstParty, const SameSiteInfo&, const URL&, Optional<FrameIdentifier> frameID, Optional<PageIdentifier>, Vector<Cookie>&) const; 54 55 void deleteCookie(const NetworkStorageSession&, const URL&, const String&) const; 55 56 void getHostnamesWithCookies(const NetworkStorageSession&, HashSet<String>& hostnames) const; -
trunk/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp
r248010 r248713 261 261 } 262 262 263 void NetworkStorageSession::setCookiesFromDOM(const URL& firstParty, const SameSiteInfo&, const URL& url, Optional< uint64_t> frameID, Optional<PageIdentifier> pageID, const String& value) const263 void NetworkStorageSession::setCookiesFromDOM(const URL& firstParty, const SameSiteInfo&, const URL& url, Optional<FrameIdentifier> frameID, Optional<PageIdentifier> pageID, const String& value) const 264 264 { 265 265 UNUSED_PARAM(frameID); … … 414 414 } 415 415 416 bool NetworkStorageSession::getRawCookies(const URL& firstParty, const SameSiteInfo&, const URL& url, Optional< uint64_t> frameID, Optional<PageIdentifier> pageID, Vector<Cookie>& rawCookies) const416 bool NetworkStorageSession::getRawCookies(const URL& firstParty, const SameSiteInfo&, const URL& url, Optional<FrameIdentifier> frameID, Optional<PageIdentifier> pageID, Vector<Cookie>& rawCookies) const 417 417 { 418 418 UNUSED_PARAM(firstParty); … … 484 484 } 485 485 486 std::pair<String, bool> NetworkStorageSession::cookiesForDOM(const URL& firstParty, const SameSiteInfo&, const URL& url, Optional< uint64_t> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies includeSecureCookies) const486 std::pair<String, bool> NetworkStorageSession::cookiesForDOM(const URL& firstParty, const SameSiteInfo&, const URL& url, Optional<FrameIdentifier> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies includeSecureCookies) const 487 487 { 488 488 UNUSED_PARAM(firstParty); … … 492 492 } 493 493 494 std::pair<String, bool> NetworkStorageSession::cookieRequestHeaderFieldValue(const URL& firstParty, const SameSiteInfo&, const URL& url, Optional< uint64_t> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies includeSecureCookies) const494 std::pair<String, bool> NetworkStorageSession::cookieRequestHeaderFieldValue(const URL& firstParty, const SameSiteInfo&, const URL& url, Optional<FrameIdentifier> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies includeSecureCookies) const 495 495 { 496 496 UNUSED_PARAM(firstParty); -
trunk/Source/WebKit/ChangeLog
r248700 r248713 1 2019-08-15 Simon Fraser <simon.fraser@apple.com> 2 3 Use ObjectIdentifier<FrameIdentifierType> for frameIDs 4 https://bugs.webkit.org/show_bug.cgi?id=199986 5 6 Reviewed by Ryosuke Niwa. 7 8 Use the strongly-typed FrameIdentifier instead of uint64_t as frame identifiers everywhere. 9 10 * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: 11 (WebKit::ResourceLoadStatisticsDatabaseStore::hasStorageAccess): 12 (WebKit::ResourceLoadStatisticsDatabaseStore::requestStorageAccess): 13 (WebKit::ResourceLoadStatisticsDatabaseStore::grantStorageAccess): 14 (WebKit::ResourceLoadStatisticsDatabaseStore::grantStorageAccessInternal): 15 * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h: 16 * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp: 17 (WebKit::ResourceLoadStatisticsMemoryStore::hasStorageAccess): 18 (WebKit::ResourceLoadStatisticsMemoryStore::requestStorageAccess): 19 (WebKit::ResourceLoadStatisticsMemoryStore::grantStorageAccess): 20 (WebKit::ResourceLoadStatisticsMemoryStore::grantStorageAccessInternal): 21 * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h: 22 * NetworkProcess/Classifier/ResourceLoadStatisticsStore.h: 23 * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: 24 (WebKit::WebResourceLoadStatisticsStore::hasStorageAccess): 25 (WebKit::WebResourceLoadStatisticsStore::hasStorageAccessForFrame): 26 (WebKit::WebResourceLoadStatisticsStore::callHasStorageAccessForFrameHandler): 27 (WebKit::WebResourceLoadStatisticsStore::requestStorageAccess): 28 (WebKit::WebResourceLoadStatisticsStore::grantStorageAccess): 29 (WebKit::WebResourceLoadStatisticsStore::callGrantStorageAccessHandler): 30 * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h: 31 * NetworkProcess/NetworkCORSPreflightChecker.h: 32 * NetworkProcess/NetworkConnectionToWebProcess.cpp: 33 (WebKit::NetworkConnectionToWebProcess::cookiesForDOM): 34 (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM): 35 (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue): 36 (WebKit::NetworkConnectionToWebProcess::getRawCookies): 37 (WebKit::NetworkConnectionToWebProcess::removeStorageAccessForFrame): 38 (WebKit::NetworkConnectionToWebProcess::hasStorageAccess): 39 (WebKit::NetworkConnectionToWebProcess::requestStorageAccess): 40 * NetworkProcess/NetworkConnectionToWebProcess.h: 41 * NetworkProcess/NetworkConnectionToWebProcess.messages.in: 42 * NetworkProcess/NetworkLoadChecker.cpp: 43 (WebKit::NetworkLoadChecker::NetworkLoadChecker): 44 * NetworkProcess/NetworkLoadChecker.h: 45 * NetworkProcess/NetworkLoadParameters.h: 46 * NetworkProcess/NetworkProcess.h: 47 * NetworkProcess/NetworkResourceLoader.cpp: 48 (WebKit::NetworkResourceLoader::start): 49 (WebKit::NetworkResourceLoader::retrieveCacheEntry): 50 (WebKit::NetworkResourceLoader::startNetworkLoad): 51 (WebKit::NetworkResourceLoader::convertToDownload): 52 (WebKit::NetworkResourceLoader::abort): 53 (WebKit::NetworkResourceLoader::didReceiveResponse): 54 (WebKit::NetworkResourceLoader::didReceiveBuffer): 55 (WebKit::NetworkResourceLoader::didFinishLoading): 56 (WebKit::NetworkResourceLoader::didFailLoading): 57 (WebKit::NetworkResourceLoader::continueWillSendRequest): 58 (WebKit::escapeIDForJSON): 59 (WebKit::logBlockedCookieInformation): 60 (WebKit::logCookieInformationInternal): 61 (WebKit::NetworkResourceLoader::logCookieInformation): 62 * NetworkProcess/NetworkResourceLoader.h: 63 * NetworkProcess/cache/NetworkCache.h: 64 * NetworkProcess/cocoa/NetworkDataTaskCocoa.h: 65 * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: 66 (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa): 67 (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection): 68 * Scripts/webkit/messages.py: 69 * Shared/API/APIFrameHandle.cpp: 70 (API::FrameHandle::create): 71 (API::FrameHandle::createAutoconverting): 72 (API::FrameHandle::FrameHandle): 73 (API::FrameHandle::decode): 74 * Shared/API/APIFrameHandle.h: 75 (API::FrameHandle::frameID const): 76 * Shared/API/Cocoa/_WKFrameHandle.mm: 77 (-[_WKFrameHandle hash]): 78 (-[_WKFrameHandle _frameID]): 79 (-[_WKFrameHandle initWithCoder:]): 80 (-[_WKFrameHandle encodeWithCoder:]): 81 * Shared/Authentication/AuthenticationManager.cpp: 82 (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge): 83 * Shared/Authentication/AuthenticationManager.h: 84 * Shared/FrameInfoData.h: 85 * UIProcess/API/C/WKFrameHandleRef.cpp: 86 (WKFrameHandleGetFrameID): 87 * UIProcess/API/Cocoa/WKWebView.mm: 88 (-[WKWebView _printOperationWithPrintInfo:forFrame:]): 89 (-[WKWebView _canChangeFrameLayout:]): 90 * UIProcess/API/Cocoa/_WKInspector.mm: 91 (-[_WKInspector showMainResourceForFrame:]): 92 * UIProcess/Automation/SimulatedInputDispatcher.cpp: 93 (WebKit::SimulatedInputDispatcher::run): 94 * UIProcess/Automation/SimulatedInputDispatcher.h: 95 * UIProcess/Automation/WebAutomationSession.cpp: 96 (WebKit::WebAutomationSession::webFrameIDForHandle): 97 (WebKit::WebAutomationSession::handleForWebFrameID): 98 (WebKit::WebAutomationSession::switchToBrowsingContext): 99 (WebKit::WebAutomationSession::waitForNavigationToComplete): 100 (WebKit::findPageForFrameID): 101 (WebKit::WebAutomationSession::respondToPendingFrameNavigationCallbacksWithTimeout): 102 (WebKit::WebAutomationSession::evaluateJavaScriptFunction): 103 (WebKit::WebAutomationSession::resolveChildFrameHandle): 104 (WebKit::WebAutomationSession::resolveParentFrameHandle): 105 (WebKit::WebAutomationSession::computeElementLayout): 106 (WebKit::WebAutomationSession::selectOptionElement): 107 (WebKit::WebAutomationSession::getAllCookies): 108 (WebKit::WebAutomationSession::deleteSingleCookie): 109 (WebKit::WebAutomationSession::viewportInViewCenterPointOfElement): 110 (WebKit::WebAutomationSession::takeScreenshot): 111 * UIProcess/Automation/WebAutomationSession.h: 112 * UIProcess/Cocoa/UIDelegate.mm: 113 (WebKit::UIDelegate::UIClient::checkUserMediaPermissionForOrigin): 114 * UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.mm: 115 (-[WKReloadFrameErrorRecoveryAttempter attemptRecovery]): 116 * UIProcess/Cocoa/WebPageProxyCocoa.mm: 117 (WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame): 118 (WebKit::WebPageProxy::contentFilterDidBlockLoadForFrameShared): 119 * UIProcess/Network/NetworkProcessProxy.cpp: 120 (WebKit::NetworkProcessProxy::didReceiveAuthenticationChallenge): 121 (WebKit::NetworkProcessProxy::requestStorageAccessConfirm): 122 * UIProcess/Network/NetworkProcessProxy.h: 123 * UIProcess/Network/NetworkProcessProxy.messages.in: 124 * UIProcess/ProvisionalPageProxy.cpp: 125 (WebKit::ProvisionalPageProxy::validateInput): 126 (WebKit::ProvisionalPageProxy::didCreateMainFrame): 127 (WebKit::ProvisionalPageProxy::didPerformClientRedirect): 128 (WebKit::ProvisionalPageProxy::didStartProvisionalLoadForFrame): 129 (WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame): 130 (WebKit::ProvisionalPageProxy::didCommitLoadForFrame): 131 (WebKit::ProvisionalPageProxy::didNavigateWithNavigationData): 132 (WebKit::ProvisionalPageProxy::didChangeProvisionalURLForFrame): 133 (WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionAsync): 134 (WebKit::ProvisionalPageProxy::decidePolicyForResponse): 135 (WebKit::ProvisionalPageProxy::didPerformServerRedirect): 136 (WebKit::ProvisionalPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame): 137 (WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionSync): 138 (WebKit::ProvisionalPageProxy::contentFilterDidBlockLoadForFrame): 139 * UIProcess/ProvisionalPageProxy.h: 140 * UIProcess/ServiceWorkerProcessProxy.cpp: 141 (WebKit::ServiceWorkerProcessProxy::didReceiveAuthenticationChallenge): 142 * UIProcess/ServiceWorkerProcessProxy.h: 143 * UIProcess/SuspendedPageProxy.cpp: 144 (WebKit::SuspendedPageProxy::SuspendedPageProxy): 145 * UIProcess/SuspendedPageProxy.h: 146 * UIProcess/UserMediaPermissionCheckProxy.cpp: 147 (WebKit::UserMediaPermissionCheckProxy::UserMediaPermissionCheckProxy): 148 * UIProcess/UserMediaPermissionCheckProxy.h: 149 (WebKit::UserMediaPermissionCheckProxy::create): 150 (WebKit::UserMediaPermissionCheckProxy::frameID const): 151 * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: 152 (WebKit::UserMediaPermissionRequestManagerProxy::resetAccess): 153 (WebKit::UserMediaPermissionRequestManagerProxy::searchForGrantedRequest const): 154 (WebKit::UserMediaPermissionRequestManagerProxy::wasRequestDenied): 155 (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): 156 (WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo): 157 (WebKit::UserMediaPermissionRequestManagerProxy::wasGrantedVideoOrAudioAccess): 158 (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): 159 * UIProcess/UserMediaPermissionRequestManagerProxy.h: 160 * UIProcess/UserMediaPermissionRequestProxy.cpp: 161 (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy): 162 * UIProcess/UserMediaPermissionRequestProxy.h: 163 (WebKit::UserMediaPermissionRequestProxy::create): 164 (WebKit::UserMediaPermissionRequestProxy::mainFrameID const): 165 (WebKit::UserMediaPermissionRequestProxy::frameID const): 166 * UIProcess/WebFrameProxy.cpp: 167 (WebKit::WebFrameProxy::WebFrameProxy): 168 * UIProcess/WebFrameProxy.h: 169 (WebKit::WebFrameProxy::create): 170 (WebKit::WebFrameProxy::frameID const): 171 * UIProcess/WebPageProxy.cpp: 172 (WebKit::WebPageProxy::suspendCurrentPageIfPossible): 173 (WebKit::WebPageProxy::commitProvisionalPage): 174 (WebKit::WebPageProxy::runJavaScriptInFrame): 175 (WebKit::WebPageProxy::didCreateMainFrame): 176 (WebKit::WebPageProxy::didCreateSubframe): 177 (WebKit::WebPageProxy::didCreateWindow): 178 (WebKit::WebPageProxy::didStartProvisionalLoadForFrame): 179 (WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared): 180 (WebKit::WebPageProxy::didExplicitOpenForFrame): 181 (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame): 182 (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared): 183 (WebKit::WebPageProxy::willPerformClientRedirectForFrame): 184 (WebKit::WebPageProxy::didCancelClientRedirectForFrame): 185 (WebKit::WebPageProxy::didChangeProvisionalURLForFrame): 186 (WebKit::WebPageProxy::didChangeProvisionalURLForFrameShared): 187 (WebKit::WebPageProxy::didFailProvisionalLoadForFrame): 188 (WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared): 189 (WebKit::WebPageProxy::didCommitLoadForFrame): 190 (WebKit::WebPageProxy::didFinishDocumentLoadForFrame): 191 (WebKit::WebPageProxy::didFinishLoadForFrame): 192 (WebKit::WebPageProxy::didFailLoadForFrame): 193 (WebKit::WebPageProxy::didSameDocumentNavigationForFrame): 194 (WebKit::WebPageProxy::didChangeMainDocument): 195 (WebKit::WebPageProxy::didReceiveTitleForFrame): 196 (WebKit::WebPageProxy::didFirstLayoutForFrame): 197 (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame): 198 (WebKit::WebPageProxy::didDisplayInsecureContentForFrame): 199 (WebKit::WebPageProxy::didRunInsecureContentForFrame): 200 (WebKit::WebPageProxy::didDetectXSSForFrame): 201 (WebKit::WebPageProxy::frameDidBecomeFrameSet): 202 (WebKit::WebPageProxy::decidePolicyForNavigationActionAsync): 203 (WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared): 204 (WebKit::WebPageProxy::decidePolicyForNavigationActionSync): 205 (WebKit::WebPageProxy::decidePolicyForNavigationActionSyncShared): 206 (WebKit::WebPageProxy::decidePolicyForNewWindowAction): 207 (WebKit::WebPageProxy::decidePolicyForResponse): 208 (WebKit::WebPageProxy::decidePolicyForResponseShared): 209 (WebKit::WebPageProxy::unableToImplementPolicy): 210 (WebKit::WebPageProxy::willSubmitForm): 211 (WebKit::WebPageProxy::didNavigateWithNavigationData): 212 (WebKit::WebPageProxy::didNavigateWithNavigationDataShared): 213 (WebKit::WebPageProxy::didPerformClientRedirect): 214 (WebKit::WebPageProxy::didPerformClientRedirectShared): 215 (WebKit::WebPageProxy::didPerformServerRedirect): 216 (WebKit::WebPageProxy::didPerformServerRedirectShared): 217 (WebKit::WebPageProxy::didUpdateHistoryTitle): 218 (WebKit::WebPageProxy::runJavaScriptAlert): 219 (WebKit::WebPageProxy::runJavaScriptConfirm): 220 (WebKit::WebPageProxy::runJavaScriptPrompt): 221 (WebKit::WebPageProxy::runBeforeUnloadConfirmPanel): 222 (WebKit::WebPageProxy::runOpenPanel): 223 (WebKit::WebPageProxy::printFrame): 224 (WebKit::WebPageProxy::focusedFrameChanged): 225 (WebKit::WebPageProxy::frameSetLargestFrameChanged): 226 (WebKit::WebPageProxy::didReceiveAuthenticationChallengeProxy): 227 (WebKit::WebPageProxy::exceededDatabaseQuota): 228 (WebKit::WebPageProxy::requestStorageSpace): 229 (WebKit::WebPageProxy::makeStorageSpaceRequest): 230 (WebKit::WebPageProxy::requestGeolocationPermissionForFrame): 231 (WebKit::WebPageProxy::requestUserMediaPermissionForFrame): 232 (WebKit::WebPageProxy::enumerateMediaDevicesForFrame): 233 (WebKit::WebPageProxy::shouldAllowDeviceOrientationAndMotionAccess): 234 (WebKit::WebPageProxy::requestStorageAccessConfirm): 235 * UIProcess/WebPageProxy.h: 236 * UIProcess/WebPageProxy.messages.in: 237 * UIProcess/WebProcessProxy.cpp: 238 (WebKit::WebProcessProxy::webFrame const): 239 (WebKit::WebProcessProxy::canCreateFrame const): 240 (WebKit::WebProcessProxy::frameCreated): 241 (WebKit::WebProcessProxy::didDestroyFrame): 242 * UIProcess/WebProcessProxy.h: 243 * UIProcess/WebProcessProxy.messages.in: 244 * UIProcess/ios/WKContentView.mm: 245 (-[WKContentView _wk_pageCountForPrintFormatter:]): 246 * UIProcess/ios/WebPageProxyIOS.mm: 247 (WebKit::WebPageProxy::computePagesForPrintingAndDrawToPDF): 248 * WebProcess/Automation/WebAutomationSessionProxy.cpp: 249 (WebKit::evaluateJavaScriptCallback): 250 (WebKit::WebAutomationSessionProxy::didClearWindowObjectForFrame): 251 (WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction): 252 (WebKit::WebAutomationSessionProxy::didEvaluateJavaScriptFunction): 253 (WebKit::WebAutomationSessionProxy::resolveChildFrameWithOrdinal): 254 (WebKit::WebAutomationSessionProxy::resolveChildFrameWithNodeHandle): 255 (WebKit::WebAutomationSessionProxy::resolveChildFrameWithName): 256 (WebKit::WebAutomationSessionProxy::resolveParentFrame): 257 (WebKit::WebAutomationSessionProxy::focusFrame): 258 (WebKit::WebAutomationSessionProxy::computeElementLayout): 259 (WebKit::WebAutomationSessionProxy::selectOptionElement): 260 (WebKit::WebAutomationSessionProxy::takeScreenshot): 261 (WebKit::WebAutomationSessionProxy::getCookiesForFrame): 262 (WebKit::WebAutomationSessionProxy::deleteCookie): 263 * WebProcess/Automation/WebAutomationSessionProxy.h: 264 * WebProcess/Automation/WebAutomationSessionProxy.messages.in: 265 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm: 266 (+[WKWebProcessPlugInFrame lookUpFrameFromHandle:]): 267 * WebProcess/Network/WebLoaderStrategy.cpp: 268 (WebKit::WebLoaderStrategy::scheduleLoad): 269 (WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess): 270 (WebKit::WebLoaderStrategy::loadResourceSynchronously): 271 * WebProcess/Network/WebResourceLoader.cpp: 272 (WebKit::WebResourceLoader::willSendRequest): 273 (WebKit::WebResourceLoader::didReceiveResponse): 274 (WebKit::WebResourceLoader::didReceiveData): 275 (WebKit::WebResourceLoader::didFinishResourceLoad): 276 (WebKit::WebResourceLoader::didFailResourceLoad): 277 (WebKit::WebResourceLoader::didBlockAuthenticationChallenge): 278 (WebKit::WebResourceLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied): 279 (WebKit::WebResourceLoader::didReceiveResource): 280 * WebProcess/Network/WebResourceLoader.h: 281 * WebProcess/Storage/WebSWContextManagerConnection.cpp: 282 (WebKit::WebSWContextManagerConnection::installServiceWorker): 283 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 284 (WebKit::WebChromeClient::focusedFrameChanged): 285 (WebKit::WebChromeClient::contentsSizeChanged const): 286 (WebKit::WebChromeClient::hasStorageAccess): 287 (WebKit::WebChromeClient::requestStorageAccess): 288 * WebProcess/WebCoreSupport/WebChromeClient.h: 289 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 290 (WebKit::WebFrameLoaderClient::frameID const): 291 (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad): 292 (WebKit::WebFrameLoaderClient::dispatchDidFailLoad): 293 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: 294 * WebProcess/WebPage/WebCookieJar.cpp: 295 (WebKit::WebCookieJar::cookies const): 296 (WebKit::WebCookieJar::setCookies): 297 (WebKit::WebCookieJar::cookieRequestHeaderFieldValue const): 298 (WebKit::WebCookieJar::getRawCookies const): 299 * WebProcess/WebPage/WebCookieJar.h: 300 * WebProcess/WebPage/WebFrame.cpp: 301 (WebKit::WebFrame::WebFrame): 302 (WebKit::generateFrameID): Deleted. 303 * WebProcess/WebPage/WebFrame.h: 304 (WebKit::WebFrame::frameID const): 305 * WebProcess/WebPage/WebInspector.cpp: 306 (WebKit::WebInspector::showMainResourceForFrame): 307 * WebProcess/WebPage/WebInspector.h: 308 * WebProcess/WebPage/WebInspector.messages.in: 309 * WebProcess/WebPage/WebPage.cpp: 310 (WebKit::WebPage::loadURLInFrame): 311 (WebKit::WebPage::loadDataInFrame): 312 (WebKit::WebPage::stopLoadingFrame): 313 (WebKit::WebPage::didReceivePolicyDecision): 314 (WebKit::WebPage::continueWillSubmitForm): 315 (WebKit::WebPage::runJavaScriptInFrame): 316 (WebKit::WebPage::getSourceForFrame): 317 (WebKit::WebPage::getMainResourceDataOfFrame): 318 (WebKit::WebPage::getResourceDataFromFrame): 319 (WebKit::WebPage::getWebArchiveOfFrame): 320 (WebKit::WebPage::addConsoleMessage): 321 (WebKit::WebPage::sendCSPViolationReport): 322 (WebKit::WebPage::enqueueSecurityPolicyViolationEvent): 323 (WebKit::WebPage::beginPrinting): 324 (WebKit::WebPage::computePagesForPrinting): 325 (WebKit::WebPage::computePagesForPrintingImpl): 326 (WebKit::WebPage::drawRectToImage): 327 (WebKit::WebPage::drawPagesToPDF): 328 (WebKit::WebPage::drawPagesToPDFImpl): 329 (WebKit::WebPage::drawPagesForPrinting): 330 (WebKit::WebPage::frameBecameRemote): 331 (WebKit::WebPage::hasStorageAccess): 332 (WebKit::WebPage::requestStorageAccess): 333 (WebKit::WebPage::shouldAllowDeviceOrientationAndMotionAccess): 334 * WebProcess/WebPage/WebPage.h: 335 * WebProcess/WebPage/WebPage.messages.in: 336 * WebProcess/WebPage/ios/WebPageIOS.mm: 337 (WebKit::WebPage::computePagesForPrintingPDFDocument): 338 (WebKit::WebPage::computePagesForPrintingAndDrawToPDF): 339 * WebProcess/WebPage/mac/WebPageMac.mm: 340 (WebKit::WebPage::computePagesForPrintingPDFDocument): 341 * WebProcess/WebProcess.cpp: 342 (WebKit::WebProcess::webFrame const): 343 (WebKit::WebProcess::addWebFrame): 344 (WebKit::WebProcess::removeWebFrame): 345 * WebProcess/WebProcess.h: 346 1 347 2019-08-14 Wenson Hsieh <wenson_hsieh@apple.com> 2 348 -
trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp
r248640 r248713 717 717 } 718 718 719 void ResourceLoadStatisticsDatabaseStore::hasStorageAccess(const SubFrameDomain& subFrameDomain, const TopFrameDomain& topFrameDomain, Optional<FrameI D> frameID, PageIdentifier pageID, CompletionHandler<void(bool)>&& completionHandler)719 void ResourceLoadStatisticsDatabaseStore::hasStorageAccess(const SubFrameDomain& subFrameDomain, const TopFrameDomain& topFrameDomain, Optional<FrameIdentifier> frameID, PageIdentifier pageID, CompletionHandler<void(bool)>&& completionHandler) 720 720 { 721 721 ASSERT(!RunLoop::isMain()); … … 744 744 } 745 745 746 void ResourceLoadStatisticsDatabaseStore::requestStorageAccess(SubFrameDomain&& subFrameDomain, TopFrameDomain&& topFrameDomain, FrameI DframeID, PageIdentifier pageID, CompletionHandler<void(StorageAccessStatus)>&& completionHandler)746 void ResourceLoadStatisticsDatabaseStore::requestStorageAccess(SubFrameDomain&& subFrameDomain, TopFrameDomain&& topFrameDomain, FrameIdentifier frameID, PageIdentifier pageID, CompletionHandler<void(StorageAccessStatus)>&& completionHandler) 747 747 { 748 748 ASSERT(!RunLoop::isMain()); … … 805 805 } 806 806 807 void ResourceLoadStatisticsDatabaseStore::grantStorageAccess(SubFrameDomain&& subFrameDomain, TopFrameDomain&& topFrameDomain, uint64_tframeID, PageIdentifier pageID, StorageAccessPromptWasShown promptWasShown, CompletionHandler<void(StorageAccessWasGranted)>&& completionHandler)807 void ResourceLoadStatisticsDatabaseStore::grantStorageAccess(SubFrameDomain&& subFrameDomain, TopFrameDomain&& topFrameDomain, FrameIdentifier frameID, PageIdentifier pageID, StorageAccessPromptWasShown promptWasShown, CompletionHandler<void(StorageAccessWasGranted)>&& completionHandler) 808 808 { 809 809 ASSERT(!RunLoop::isMain()); … … 819 819 } 820 820 821 void ResourceLoadStatisticsDatabaseStore::grantStorageAccessInternal(SubFrameDomain&& subFrameDomain, TopFrameDomain&& topFrameDomain, Optional<FrameI D> frameID, PageIdentifier pageID, StorageAccessPromptWasShown promptWasShownNowOrEarlier, CompletionHandler<void(StorageAccessWasGranted)>&& completionHandler)821 void ResourceLoadStatisticsDatabaseStore::grantStorageAccessInternal(SubFrameDomain&& subFrameDomain, TopFrameDomain&& topFrameDomain, Optional<FrameIdentifier> frameID, PageIdentifier pageID, StorageAccessPromptWasShown promptWasShownNowOrEarlier, CompletionHandler<void(StorageAccessWasGranted)>&& completionHandler) 822 822 { 823 823 ASSERT(!RunLoop::isMain()); -
trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h
r248640 r248713 92 92 void calculateAndSubmitTelemetry() const override; 93 93 94 void hasStorageAccess(const SubFrameDomain&, const TopFrameDomain&, Optional< FrameID>, WebCore::PageIdentifier, CompletionHandler<void(bool)>&&) override;95 void requestStorageAccess(SubFrameDomain&&, TopFrameDomain&&, FrameID, WebCore::PageIdentifier, CompletionHandler<void(StorageAccessStatus)>&&) override;96 void grantStorageAccess(SubFrameDomain&&, TopFrameDomain&&, FrameID, WebCore::PageIdentifier, WebCore::StorageAccessPromptWasShown, CompletionHandler<void(WebCore::StorageAccessWasGranted)>&&) override;94 void hasStorageAccess(const SubFrameDomain&, const TopFrameDomain&, Optional<WebCore::FrameIdentifier>, WebCore::PageIdentifier, CompletionHandler<void(bool)>&&) override; 95 void requestStorageAccess(SubFrameDomain&&, TopFrameDomain&&, WebCore::FrameIdentifier, WebCore::PageIdentifier, CompletionHandler<void(StorageAccessStatus)>&&) override; 96 void grantStorageAccess(SubFrameDomain&&, TopFrameDomain&&, WebCore::FrameIdentifier, WebCore::PageIdentifier, WebCore::StorageAccessPromptWasShown, CompletionHandler<void(WebCore::StorageAccessWasGranted)>&&) override; 97 97 98 98 void logFrameNavigation(const NavigatedToDomain&, const TopFrameDomain&, const NavigatedFromDomain&, bool isRedirect, bool isMainFrame) override; … … 154 154 unsigned recursivelyFindNonPrevalentDomainsThatRedirectedToThisDomain(unsigned primaryDomainID, StdSet<unsigned>& nonPrevalentRedirectionSources, unsigned numberOfRecursiveCalls); 155 155 void setDomainsAsPrevalent(StdSet<unsigned>&&); 156 void grantStorageAccessInternal(SubFrameDomain&&, TopFrameDomain&&, Optional< FrameID>, WebCore::PageIdentifier, WebCore::StorageAccessPromptWasShown, CompletionHandler<void(WebCore::StorageAccessWasGranted)>&&);156 void grantStorageAccessInternal(SubFrameDomain&&, TopFrameDomain&&, Optional<WebCore::FrameIdentifier>, WebCore::PageIdentifier, WebCore::StorageAccessPromptWasShown, CompletionHandler<void(WebCore::StorageAccessWasGranted)>&&); 157 157 void markAsPrevalentIfHasRedirectedToPrevalent(); 158 158 Vector<RegistrableDomain> ensurePrevalentResourcesForDebugMode() override; -
trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp
r248640 r248713 212 212 } 213 213 214 void ResourceLoadStatisticsMemoryStore::hasStorageAccess(const SubFrameDomain& subFrameDomain, const TopFrameDomain& topFrameDomain, Optional<FrameI D> frameID, PageIdentifier pageID, CompletionHandler<void(bool)>&& completionHandler)214 void ResourceLoadStatisticsMemoryStore::hasStorageAccess(const SubFrameDomain& subFrameDomain, const TopFrameDomain& topFrameDomain, Optional<FrameIdentifier> frameID, PageIdentifier pageID, CompletionHandler<void(bool)>&& completionHandler) 215 215 { 216 216 ASSERT(!RunLoop::isMain()); … … 236 236 } 237 237 238 void ResourceLoadStatisticsMemoryStore::requestStorageAccess(SubFrameDomain&& subFrameDomain, TopFrameDomain&& topFrameDomain, FrameI DframeID, PageIdentifier pageID, CompletionHandler<void(StorageAccessStatus)>&& completionHandler)238 void ResourceLoadStatisticsMemoryStore::requestStorageAccess(SubFrameDomain&& subFrameDomain, TopFrameDomain&& topFrameDomain, FrameIdentifier frameID, PageIdentifier pageID, CompletionHandler<void(StorageAccessStatus)>&& completionHandler) 239 239 { 240 240 ASSERT(!RunLoop::isMain()); … … 289 289 } 290 290 291 void ResourceLoadStatisticsMemoryStore::grantStorageAccess(SubFrameDomain&& subFrameDomain, TopFrameDomain&& topFrameDomain, uint64_tframeID, PageIdentifier pageID, StorageAccessPromptWasShown promptWasShown, CompletionHandler<void(StorageAccessWasGranted)>&& completionHandler)291 void ResourceLoadStatisticsMemoryStore::grantStorageAccess(SubFrameDomain&& subFrameDomain, TopFrameDomain&& topFrameDomain, FrameIdentifier frameID, PageIdentifier pageID, StorageAccessPromptWasShown promptWasShown, CompletionHandler<void(StorageAccessWasGranted)>&& completionHandler) 292 292 { 293 293 ASSERT(!RunLoop::isMain()); … … 301 301 } 302 302 303 void ResourceLoadStatisticsMemoryStore::grantStorageAccessInternal(SubFrameDomain&& subFrameDomain, TopFrameDomain&& topFrameDomain, Optional<FrameI D> frameID, PageIdentifier pageID, StorageAccessPromptWasShown promptWasShownNowOrEarlier, CompletionHandler<void(StorageAccessWasGranted)>&& completionHandler)303 void ResourceLoadStatisticsMemoryStore::grantStorageAccessInternal(SubFrameDomain&& subFrameDomain, TopFrameDomain&& topFrameDomain, Optional<FrameIdentifier> frameID, PageIdentifier pageID, StorageAccessPromptWasShown promptWasShownNowOrEarlier, CompletionHandler<void(StorageAccessWasGranted)>&& completionHandler) 304 304 { 305 305 ASSERT(!RunLoop::isMain()); -
trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h
r247119 r248713 98 98 void calculateAndSubmitTelemetry() const override; 99 99 100 void hasStorageAccess(const SubFrameDomain&, const TopFrameDomain&, Optional< FrameID>, WebCore::PageIdentifier, CompletionHandler<void(bool)>&&) override;101 void requestStorageAccess(SubFrameDomain&&, TopFrameDomain&&, FrameID, WebCore::PageIdentifier, CompletionHandler<void(StorageAccessStatus)>&&) override;102 void grantStorageAccess(SubFrameDomain&&, TopFrameDomain&&, FrameID, WebCore::PageIdentifier, WebCore::StorageAccessPromptWasShown, CompletionHandler<void(WebCore::StorageAccessWasGranted)>&&) override;100 void hasStorageAccess(const SubFrameDomain&, const TopFrameDomain&, Optional<WebCore::FrameIdentifier>, WebCore::PageIdentifier, CompletionHandler<void(bool)>&&) override; 101 void requestStorageAccess(SubFrameDomain&&, TopFrameDomain&&, WebCore::FrameIdentifier, WebCore::PageIdentifier, CompletionHandler<void(StorageAccessStatus)>&&) override; 102 void grantStorageAccess(SubFrameDomain&&, TopFrameDomain&&, WebCore::FrameIdentifier, WebCore::PageIdentifier, WebCore::StorageAccessPromptWasShown, CompletionHandler<void(WebCore::StorageAccessWasGranted)>&&) override; 103 103 104 104 void logFrameNavigation(const NavigatedToDomain&, const TopFrameDomain&, const NavigatedFromDomain&, bool isRedirect, bool isMainFrame) override; … … 124 124 void setPrevalentResource(ResourceLoadStatistics&, ResourceLoadPrevalence); 125 125 unsigned recursivelyGetAllDomainsThatHaveRedirectedToThisDomain(const ResourceLoadStatistics&, HashSet<RedirectedToDomain>&, unsigned numberOfRecursiveCalls) const; 126 void grantStorageAccessInternal(SubFrameDomain&&, TopFrameDomain&&, Optional< FrameID>, WebCore::PageIdentifier, WebCore::StorageAccessPromptWasShown, CompletionHandler<void(WebCore::StorageAccessWasGranted)>&&);126 void grantStorageAccessInternal(SubFrameDomain&&, TopFrameDomain&&, Optional<WebCore::FrameIdentifier>, WebCore::PageIdentifier, WebCore::StorageAccessPromptWasShown, CompletionHandler<void(WebCore::StorageAccessWasGranted)>&&); 127 127 void markAsPrevalentIfHasRedirectedToPrevalent(ResourceLoadStatistics&); 128 128 bool isPrevalentDueToDebugMode(ResourceLoadStatistics&); -
trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.h
r248640 r248713 30 30 #include "ResourceLoadStatisticsClassifier.h" 31 31 #include "WebResourceLoadStatisticsStore.h" 32 #include <WebCore/FrameIdentifier.h> 32 33 #include <wtf/CompletionHandler.h> 33 34 #include <wtf/Vector.h> … … 91 92 using DomainInNeedOfStorageAccess = WebCore::RegistrableDomain; 92 93 using OpenerDomain = WebCore::RegistrableDomain; 93 using FrameID = uint64_t;94 94 95 95 virtual ~ResourceLoadStatisticsStore(); … … 160 160 void setPrevalentResourceForDebugMode(const RegistrableDomain&); 161 161 162 virtual void hasStorageAccess(const SubFrameDomain&, const TopFrameDomain&, Optional< FrameID>, WebCore::PageIdentifier, CompletionHandler<void(bool)>&&) = 0;163 virtual void requestStorageAccess(SubFrameDomain&&, TopFrameDomain&&, FrameID, WebCore::PageIdentifier, CompletionHandler<void(StorageAccessStatus)>&&) = 0;164 virtual void grantStorageAccess(SubFrameDomain&&, TopFrameDomain&&, FrameID, WebCore::PageIdentifier, WebCore::StorageAccessPromptWasShown, CompletionHandler<void(WebCore::StorageAccessWasGranted)>&&) = 0;162 virtual void hasStorageAccess(const SubFrameDomain&, const TopFrameDomain&, Optional<WebCore::FrameIdentifier>, WebCore::PageIdentifier, CompletionHandler<void(bool)>&&) = 0; 163 virtual void requestStorageAccess(SubFrameDomain&&, TopFrameDomain&&, WebCore::FrameIdentifier, WebCore::PageIdentifier, CompletionHandler<void(StorageAccessStatus)>&&) = 0; 164 virtual void grantStorageAccess(SubFrameDomain&&, TopFrameDomain&&, WebCore::FrameIdentifier, WebCore::PageIdentifier, WebCore::StorageAccessPromptWasShown, CompletionHandler<void(WebCore::StorageAccessWasGranted)>&&) = 0; 165 165 166 166 virtual void logFrameNavigation(const NavigatedToDomain&, const TopFrameDomain&, const NavigatedFromDomain&, bool isRedirect, bool isMainFrame) = 0; -
trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp
r248640 r248713 281 281 } 282 282 283 void WebResourceLoadStatisticsStore::hasStorageAccess(const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, Optional< uint64_t> frameID, PageIdentifier pageID, CompletionHandler<void(bool)>&& completionHandler)283 void WebResourceLoadStatisticsStore::hasStorageAccess(const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, Optional<FrameIdentifier> frameID, PageIdentifier pageID, CompletionHandler<void(bool)>&& completionHandler) 284 284 { 285 285 ASSERT(subFrameDomain != topFrameDomain); … … 302 302 } 303 303 304 bool WebResourceLoadStatisticsStore::hasStorageAccessForFrame(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, uint64_tframeID, PageIdentifier pageID)304 bool WebResourceLoadStatisticsStore::hasStorageAccessForFrame(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, FrameIdentifier frameID, PageIdentifier pageID) 305 305 { 306 306 ASSERT(RunLoop::isMain()); … … 315 315 } 316 316 317 void WebResourceLoadStatisticsStore::callHasStorageAccessForFrameHandler(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, uint64_tframeID, PageIdentifier pageID, CompletionHandler<void(bool hasAccess)>&& callback)317 void WebResourceLoadStatisticsStore::callHasStorageAccessForFrameHandler(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, FrameIdentifier frameID, PageIdentifier pageID, CompletionHandler<void(bool hasAccess)>&& callback) 318 318 { 319 319 ASSERT(RunLoop::isMain()); … … 329 329 } 330 330 331 void WebResourceLoadStatisticsStore::requestStorageAccess(const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, uint64_tframeID, PageIdentifier pageID, CompletionHandler<void(StorageAccessWasGranted, StorageAccessPromptWasShown)>&& completionHandler)331 void WebResourceLoadStatisticsStore::requestStorageAccess(const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, FrameIdentifier frameID, PageIdentifier pageID, CompletionHandler<void(StorageAccessWasGranted, StorageAccessPromptWasShown)>&& completionHandler) 332 332 { 333 333 ASSERT(RunLoop::isMain()); … … 392 392 } 393 393 394 void WebResourceLoadStatisticsStore::grantStorageAccess(const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, uint64_tframeID, PageIdentifier pageID, StorageAccessPromptWasShown promptWasShown, CompletionHandler<void(StorageAccessWasGranted, StorageAccessPromptWasShown)>&& completionHandler)394 void WebResourceLoadStatisticsStore::grantStorageAccess(const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, FrameIdentifier frameID, PageIdentifier pageID, StorageAccessPromptWasShown promptWasShown, CompletionHandler<void(StorageAccessWasGranted, StorageAccessPromptWasShown)>&& completionHandler) 395 395 { 396 396 ASSERT(RunLoop::isMain()); … … 411 411 } 412 412 413 StorageAccessWasGranted WebResourceLoadStatisticsStore::grantStorageAccess(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, Optional< uint64_t> frameID, PageIdentifier pageID)413 StorageAccessWasGranted WebResourceLoadStatisticsStore::grantStorageAccess(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, Optional<FrameIdentifier> frameID, PageIdentifier pageID) 414 414 { 415 415 ASSERT(RunLoop::isMain()); … … 428 428 } 429 429 430 void WebResourceLoadStatisticsStore::callGrantStorageAccessHandler(const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, Optional< uint64_t> frameID, PageIdentifier pageID, CompletionHandler<void(StorageAccessWasGranted)>&& completionHandler)430 void WebResourceLoadStatisticsStore::callGrantStorageAccessHandler(const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, Optional<FrameIdentifier> frameID, PageIdentifier pageID, CompletionHandler<void(StorageAccessWasGranted)>&& completionHandler) 431 431 { 432 432 ASSERT(RunLoop::isMain()); -
trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h
r248640 r248713 31 31 #include "StorageAccessStatus.h" 32 32 #include "WebsiteDataType.h" 33 #include <WebCore/FrameIdentifier.h> 33 34 #include <WebCore/PageIdentifier.h> 34 35 #include <WebCore/RegistrableDomain.h> … … 90 91 using DomainInNeedOfStorageAccess = WebCore::RegistrableDomain; 91 92 using OpenerDomain = WebCore::RegistrableDomain; 92 using FrameID = uint64_t;93 93 using StorageAccessWasGranted = WebCore::StorageAccessWasGranted; 94 94 using StorageAccessPromptWasShown = WebCore::StorageAccessPromptWasShown; … … 112 112 void setShouldSubmitTelemetry(bool); 113 113 114 void grantStorageAccess(const SubFrameDomain&, const TopFrameDomain&, FrameID, WebCore::PageIdentifier, StorageAccessPromptWasShown, CompletionHandler<void(StorageAccessWasGranted, StorageAccessPromptWasShown)>&&);114 void grantStorageAccess(const SubFrameDomain&, const TopFrameDomain&, WebCore::FrameIdentifier, WebCore::PageIdentifier, StorageAccessPromptWasShown, CompletionHandler<void(StorageAccessWasGranted, StorageAccessPromptWasShown)>&&); 115 115 116 116 void applicationWillTerminate(); … … 126 126 void deleteWebsiteDataForRegistrableDomains(OptionSet<WebsiteDataType>, HashMap<RegistrableDomain, WebsiteDataToRemove>&&, bool shouldNotifyPage, CompletionHandler<void(const HashSet<RegistrableDomain>&)>&&); 127 127 void registrableDomainsWithWebsiteData(OptionSet<WebsiteDataType>, bool shouldNotifyPage, CompletionHandler<void(HashSet<RegistrableDomain>&&)>&&); 128 StorageAccessWasGranted grantStorageAccess(const SubFrameDomain&, const TopFrameDomain&, Optional< FrameID>, WebCore::PageIdentifier);128 StorageAccessWasGranted grantStorageAccess(const SubFrameDomain&, const TopFrameDomain&, Optional<WebCore::FrameIdentifier>, WebCore::PageIdentifier); 129 129 void hasHadUserInteraction(const RegistrableDomain&, CompletionHandler<void(bool)>&&); 130 void hasStorageAccess(const SubFrameDomain&, const TopFrameDomain&, Optional< FrameID>, WebCore::PageIdentifier, CompletionHandler<void(bool)>&&);131 bool hasStorageAccessForFrame(const SubFrameDomain&, const TopFrameDomain&, FrameID, WebCore::PageIdentifier);132 void requestStorageAccess(const SubFrameDomain&, const TopFrameDomain&, FrameID, WebCore::PageIdentifier, CompletionHandler<void(StorageAccessWasGranted, StorageAccessPromptWasShown)>&&);130 void hasStorageAccess(const SubFrameDomain&, const TopFrameDomain&, Optional<WebCore::FrameIdentifier>, WebCore::PageIdentifier, CompletionHandler<void(bool)>&&); 131 bool hasStorageAccessForFrame(const SubFrameDomain&, const TopFrameDomain&, WebCore::FrameIdentifier, WebCore::PageIdentifier); 132 void requestStorageAccess(const SubFrameDomain&, const TopFrameDomain&, WebCore::FrameIdentifier, WebCore::PageIdentifier, CompletionHandler<void(StorageAccessWasGranted, StorageAccessPromptWasShown)>&&); 133 133 void setLastSeen(const RegistrableDomain&, Seconds, CompletionHandler<void()>&&); 134 134 void setPrevalentResource(const RegistrableDomain&, CompletionHandler<void()>&&); … … 173 173 174 174 void logTestingEvent(const String&); 175 void callGrantStorageAccessHandler(const SubFrameDomain&, const TopFrameDomain&, Optional< FrameID>, WebCore::PageIdentifier, CompletionHandler<void(StorageAccessWasGranted)>&&);175 void callGrantStorageAccessHandler(const SubFrameDomain&, const TopFrameDomain&, Optional<WebCore::FrameIdentifier>, WebCore::PageIdentifier, CompletionHandler<void(StorageAccessWasGranted)>&&); 176 176 void removeAllStorageAccess(CompletionHandler<void()>&&); 177 177 void callUpdatePrevalentDomainsToBlockCookiesForHandler(const RegistrableDomainsToBlockCookiesFor&, CompletionHandler<void()>&&); 178 178 void callRemoveDomainsHandler(const Vector<RegistrableDomain>&); 179 void callHasStorageAccessForFrameHandler(const SubFrameDomain&, const TopFrameDomain&, FrameID, WebCore::PageIdentifier, CompletionHandler<void(bool)>&&);179 void callHasStorageAccessForFrameHandler(const SubFrameDomain&, const TopFrameDomain&, WebCore::FrameIdentifier, WebCore::PageIdentifier, CompletionHandler<void(bool)>&&); 180 180 181 181 void didCreateNetworkProcess(); -
trunk/Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.h
r247705 r248713 52 52 PAL::SessionID sessionID; 53 53 WebCore::PageIdentifier pageID; 54 uint64_tframeID;54 WebCore::FrameIdentifier frameID; 55 55 WebCore::StoredCredentialsPolicy storedCredentialsPolicy; 56 56 }; -
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
r248670 r248713 526 526 } 527 527 528 void NetworkConnectionToWebProcess::cookiesForDOM(PAL::SessionID sessionID, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional< uint64_t> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies includeSecureCookies, CompletionHandler<void(String cookieString, bool secureCookiesAccessed)>&& completionHandler)528 void NetworkConnectionToWebProcess::cookiesForDOM(PAL::SessionID sessionID, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<FrameIdentifier> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies includeSecureCookies, CompletionHandler<void(String cookieString, bool secureCookiesAccessed)>&& completionHandler) 529 529 { 530 530 auto& networkStorageSession = storageSession(networkProcess(), sessionID); … … 539 539 } 540 540 541 void NetworkConnectionToWebProcess::setCookiesFromDOM(PAL::SessionID sessionID, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional< uint64_t> frameID, Optional<PageIdentifier> pageID, const String& cookieString)541 void NetworkConnectionToWebProcess::setCookiesFromDOM(PAL::SessionID sessionID, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<WebCore::FrameIdentifier> frameID, Optional<PageIdentifier> pageID, const String& cookieString) 542 542 { 543 543 auto& networkStorageSession = storageSession(networkProcess(), sessionID); … … 556 556 } 557 557 558 void NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue(PAL::SessionID sessionID, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional< uint64_t> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies includeSecureCookies, CompletionHandler<void(String, bool)>&& completionHandler)558 void NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue(PAL::SessionID sessionID, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<FrameIdentifier> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies includeSecureCookies, CompletionHandler<void(String, bool)>&& completionHandler) 559 559 { 560 560 auto result = storageSession(networkProcess(), sessionID).cookieRequestHeaderFieldValue(firstParty, sameSiteInfo, url, frameID, pageID, includeSecureCookies); … … 562 562 } 563 563 564 void NetworkConnectionToWebProcess::getRawCookies(PAL::SessionID sessionID, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional< uint64_t> frameID, Optional<PageIdentifier> pageID, CompletionHandler<void(Vector<WebCore::Cookie>&&)>&& completionHandler)564 void NetworkConnectionToWebProcess::getRawCookies(PAL::SessionID sessionID, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<FrameIdentifier> frameID, Optional<PageIdentifier> pageID, CompletionHandler<void(Vector<WebCore::Cookie>&&)>&& completionHandler) 565 565 { 566 566 Vector<WebCore::Cookie> result; … … 671 671 672 672 #if ENABLE(RESOURCE_LOAD_STATISTICS) 673 void NetworkConnectionToWebProcess::removeStorageAccessForFrame(PAL::SessionID sessionID, uint64_tframeID, PageIdentifier pageID)673 void NetworkConnectionToWebProcess::removeStorageAccessForFrame(PAL::SessionID sessionID, FrameIdentifier frameID, PageIdentifier pageID) 674 674 { 675 675 if (auto* storageSession = networkProcess().storageSession(sessionID)) … … 729 729 } 730 730 731 void NetworkConnectionToWebProcess::hasStorageAccess(PAL::SessionID sessionID, const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, uint64_tframeID, PageIdentifier pageID, CompletionHandler<void(bool)>&& completionHandler)731 void NetworkConnectionToWebProcess::hasStorageAccess(PAL::SessionID sessionID, const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, FrameIdentifier frameID, PageIdentifier pageID, CompletionHandler<void(bool)>&& completionHandler) 732 732 { 733 733 if (auto* networkSession = networkProcess().networkSession(sessionID)) { … … 741 741 } 742 742 743 void NetworkConnectionToWebProcess::requestStorageAccess(PAL::SessionID sessionID, const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, uint64_tframeID, PageIdentifier pageID, CompletionHandler<void(WebCore::StorageAccessWasGranted wasGranted, WebCore::StorageAccessPromptWasShown promptWasShown)>&& completionHandler)743 void NetworkConnectionToWebProcess::requestStorageAccess(PAL::SessionID sessionID, const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, FrameIdentifier frameID, PageIdentifier pageID, CompletionHandler<void(WebCore::StorageAccessWasGranted wasGranted, WebCore::StorageAccessPromptWasShown promptWasShown)>&& completionHandler) 744 744 { 745 745 if (auto* networkSession = networkProcess().networkSession(sessionID)) { -
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
r248670 r248713 35 35 #include "NetworkResourceLoadMap.h" 36 36 #include "WebPaymentCoordinatorProxy.h" 37 #include <WebCore/FrameIdentifier.h> 37 38 #include <WebCore/NetworkLoadInformation.h> 38 39 #include <WebCore/PageIdentifier.h> … … 175 176 void convertMainResourceLoadToDownload(PAL::SessionID, uint64_t mainResourceLoadIdentifier, DownloadID, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&); 176 177 177 void cookiesForDOM(PAL::SessionID, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, Optional< uint64_t> frameID, Optional<WebCore::PageIdentifier>, WebCore::IncludeSecureCookies, CompletionHandler<void(String cookieString, bool secureCookiesAccessed)>&&);178 void setCookiesFromDOM(PAL::SessionID, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, Optional< uint64_t> frameID, Optional<WebCore::PageIdentifier>, const String&);178 void cookiesForDOM(PAL::SessionID, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, Optional<WebCore::FrameIdentifier>, Optional<WebCore::PageIdentifier>, WebCore::IncludeSecureCookies, CompletionHandler<void(String cookieString, bool secureCookiesAccessed)>&&); 179 void setCookiesFromDOM(PAL::SessionID, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, Optional<WebCore::FrameIdentifier>, Optional<WebCore::PageIdentifier>, const String&); 179 180 void cookiesEnabled(PAL::SessionID, CompletionHandler<void(bool)>&&); 180 void cookieRequestHeaderFieldValue(PAL::SessionID, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, Optional< uint64_t> frameID, Optional<WebCore::PageIdentifier>, WebCore::IncludeSecureCookies, CompletionHandler<void(String cookieString, bool secureCookiesAccessed)>&&);181 void getRawCookies(PAL::SessionID, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, Optional< uint64_t> frameID, Optional<WebCore::PageIdentifier>, CompletionHandler<void(Vector<WebCore::Cookie>&&)>&&);181 void cookieRequestHeaderFieldValue(PAL::SessionID, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, Optional<WebCore::FrameIdentifier>, Optional<WebCore::PageIdentifier>, WebCore::IncludeSecureCookies, CompletionHandler<void(String cookieString, bool secureCookiesAccessed)>&&); 182 void getRawCookies(PAL::SessionID, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, Optional<WebCore::FrameIdentifier>, Optional<WebCore::PageIdentifier>, CompletionHandler<void(Vector<WebCore::Cookie>&&)>&&); 182 183 void deleteCookie(PAL::SessionID, const URL&, const String& cookieName); 183 184 … … 219 220 220 221 #if ENABLE(RESOURCE_LOAD_STATISTICS) 221 void removeStorageAccessForFrame(PAL::SessionID, uint64_t frameID, WebCore::PageIdentifier);222 void removeStorageAccessForFrame(PAL::SessionID, WebCore::FrameIdentifier, WebCore::PageIdentifier); 222 223 void clearPageSpecificDataForResourceLoadStatistics(PAL::SessionID, WebCore::PageIdentifier); 223 224 … … 227 228 void logSubresourceRedirect(PAL::SessionID, const RegistrableDomain& sourceDomain, const RegistrableDomain& targetDomain); 228 229 void resourceLoadStatisticsUpdated(Vector<WebCore::ResourceLoadStatistics>&&); 229 void hasStorageAccess(PAL::SessionID, const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, uint64_t frameID, WebCore::PageIdentifier, CompletionHandler<void(bool)>&&);230 void requestStorageAccess(PAL::SessionID, const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, uint64_t frameID, WebCore::PageIdentifier, CompletionHandler<void(WebCore::StorageAccessWasGranted, WebCore::StorageAccessPromptWasShown)>&&);230 void hasStorageAccess(PAL::SessionID, const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, WebCore::FrameIdentifier, WebCore::PageIdentifier, CompletionHandler<void(bool)>&&); 231 void requestStorageAccess(PAL::SessionID, const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, WebCore::FrameIdentifier, WebCore::PageIdentifier, CompletionHandler<void(WebCore::StorageAccessWasGranted, WebCore::StorageAccessPromptWasShown)>&&); 231 232 void requestStorageAccessUnderOpener(PAL::SessionID, WebCore::RegistrableDomain&& domainInNeedOfStorageAccess, WebCore::PageIdentifier openerPageID, WebCore::RegistrableDomain&& openerDomain); 232 233 #endif -
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
r248670 r248713 35 35 ConvertMainResourceLoadToDownload(PAL::SessionID sessionID, uint64_t mainResourceLoadIdentifier, WebKit::DownloadID downloadID, WebCore::ResourceRequest request, WebCore::ResourceResponse response) 36 36 37 CookiesForDOM(PAL::SessionID sessionID, URL firstParty, struct WebCore::SameSiteInfo sameSiteInfo, URL url, Optional< uint64_t> frameID, Optional<WebCore::PageIdentifier> pageID, enum:bool WebCore::IncludeSecureCookies includeSecureCookies) -> (String cookieString, bool didAccessSecureCookies) Synchronous38 SetCookiesFromDOM(PAL::SessionID sessionID, URL firstParty, struct WebCore::SameSiteInfo sameSiteInfo, URL url, Optional< uint64_t> frameID, Optional<WebCore::PageIdentifier> pageID, String cookieString)37 CookiesForDOM(PAL::SessionID sessionID, URL firstParty, struct WebCore::SameSiteInfo sameSiteInfo, URL url, Optional<WebCore::FrameIdentifier> frameID, Optional<WebCore::PageIdentifier> pageID, enum:bool WebCore::IncludeSecureCookies includeSecureCookies) -> (String cookieString, bool didAccessSecureCookies) Synchronous 38 SetCookiesFromDOM(PAL::SessionID sessionID, URL firstParty, struct WebCore::SameSiteInfo sameSiteInfo, URL url, Optional<WebCore::FrameIdentifier> frameID, Optional<WebCore::PageIdentifier> pageID, String cookieString) 39 39 CookiesEnabled(PAL::SessionID sessionID) -> (bool enabled) Synchronous 40 CookieRequestHeaderFieldValue(PAL::SessionID sessionID, URL firstParty, struct WebCore::SameSiteInfo sameSiteInfo, URL url, Optional< uint64_t> frameID, Optional<WebCore::PageIdentifier> pageID, enum:bool WebCore::IncludeSecureCookies includeSecureCookies) -> (String cookieString, bool didAccessSecureCookies) Synchronous41 GetRawCookies(PAL::SessionID sessionID, URL firstParty, struct WebCore::SameSiteInfo sameSiteInfo, URL url, Optional< uint64_t> frameID, Optional<WebCore::PageIdentifier> pageID) -> (Vector<WebCore::Cookie> cookies) Synchronous40 CookieRequestHeaderFieldValue(PAL::SessionID sessionID, URL firstParty, struct WebCore::SameSiteInfo sameSiteInfo, URL url, Optional<WebCore::FrameIdentifier> frameID, Optional<WebCore::PageIdentifier> pageID, enum:bool WebCore::IncludeSecureCookies includeSecureCookies) -> (String cookieString, bool didAccessSecureCookies) Synchronous 41 GetRawCookies(PAL::SessionID sessionID, URL firstParty, struct WebCore::SameSiteInfo sameSiteInfo, URL url, Optional<WebCore::FrameIdentifier> frameID, Optional<WebCore::PageIdentifier> pageID) -> (Vector<WebCore::Cookie> cookies) Synchronous 42 42 DeleteCookie(PAL::SessionID sessionID, URL url, String cookieName) 43 43 … … 59 59 60 60 #if ENABLE(RESOURCE_LOAD_STATISTICS) 61 RemoveStorageAccessForFrame(PAL::SessionID sessionID, uint64_tframeID, WebCore::PageIdentifier pageID);61 RemoveStorageAccessForFrame(PAL::SessionID sessionID, WebCore::FrameIdentifier frameID, WebCore::PageIdentifier pageID); 62 62 ClearPageSpecificDataForResourceLoadStatistics(PAL::SessionID sessionID, WebCore::PageIdentifier pageID); 63 63 LogUserInteraction(PAL::SessionID sessionID, WebCore::RegistrableDomain domain) … … 66 66 LogSubresourceRedirect(PAL::SessionID sessionID, WebCore::RegistrableDomain sourceDomain, WebCore::RegistrableDomain targetDomain) 67 67 ResourceLoadStatisticsUpdated(Vector<WebCore::ResourceLoadStatistics> statistics) 68 HasStorageAccess(PAL::SessionID sessionID, WebCore::RegistrableDomain subFrameDomain, WebCore::RegistrableDomain topFrameDomain, uint64_tframeID, WebCore::PageIdentifier pageID) -> (bool hasStorageAccess) Async69 RequestStorageAccess(PAL::SessionID sessionID, WebCore::RegistrableDomain subFrameDomain, WebCore::RegistrableDomain topFrameDomain, uint64_tframeID, WebCore::PageIdentifier pageID) -> (enum:bool WebCore::StorageAccessWasGranted wasGranted, enum:bool WebCore::StorageAccessPromptWasShown promptWasShown) Async68 HasStorageAccess(PAL::SessionID sessionID, WebCore::RegistrableDomain subFrameDomain, WebCore::RegistrableDomain topFrameDomain, WebCore::FrameIdentifier frameID, WebCore::PageIdentifier pageID) -> (bool hasStorageAccess) Async 69 RequestStorageAccess(PAL::SessionID sessionID, WebCore::RegistrableDomain subFrameDomain, WebCore::RegistrableDomain topFrameDomain, WebCore::FrameIdentifier frameID, WebCore::PageIdentifier pageID) -> (enum:bool WebCore::StorageAccessWasGranted wasGranted, enum:bool WebCore::StorageAccessPromptWasShown promptWasShown) Async 70 70 RequestStorageAccessUnderOpener(PAL::SessionID sessionID, WebCore::RegistrableDomain domainInNeedOfStorageAccess, WebCore::PageIdentifier openerPageID, WebCore::RegistrableDomain openerDomain) 71 71 #endif -
trunk/Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp
r245796 r248713 49 49 } 50 50 51 NetworkLoadChecker::NetworkLoadChecker(NetworkProcess& networkProcess, FetchOptions&& options, PAL::SessionID sessionID, PageIdentifier pageID, uint64_tframeID, HTTPHeaderMap&& originalRequestHeaders, URL&& url, RefPtr<SecurityOrigin>&& sourceOrigin, PreflightPolicy preflightPolicy, String&& referrer, bool isHTTPSUpgradeEnabled, bool shouldCaptureExtraNetworkLoadMetrics, LoadType requestLoadType)51 NetworkLoadChecker::NetworkLoadChecker(NetworkProcess& networkProcess, FetchOptions&& options, PAL::SessionID sessionID, PageIdentifier pageID, FrameIdentifier frameID, HTTPHeaderMap&& originalRequestHeaders, URL&& url, RefPtr<SecurityOrigin>&& sourceOrigin, PreflightPolicy preflightPolicy, String&& referrer, bool isHTTPSUpgradeEnabled, bool shouldCaptureExtraNetworkLoadMetrics, LoadType requestLoadType) 52 52 : m_options(WTFMove(options)) 53 53 , m_sessionID(sessionID) -
trunk/Source/WebKit/NetworkProcess/NetworkLoadChecker.h
r247705 r248713 30 30 #include <WebCore/ContentSecurityPolicyResponseHeaders.h> 31 31 #include <WebCore/FetchOptions.h> 32 #include <WebCore/FrameIdentifier.h> 32 33 #include <WebCore/NetworkLoadInformation.h> 33 34 #include <WebCore/PageIdentifier.h> … … 56 57 enum class LoadType : bool { MainFrame, Other }; 57 58 58 NetworkLoadChecker(NetworkProcess&, WebCore::FetchOptions&&, PAL::SessionID, WebCore::PageIdentifier, uint64_t frameID, WebCore::HTTPHeaderMap&&, URL&&, RefPtr<WebCore::SecurityOrigin>&&, WebCore::PreflightPolicy, String&& referrer, bool isHTTPSUpgradeEnabled = false, bool shouldCaptureExtraNetworkLoadMetrics = false, LoadType requestLoadType = LoadType::Other);59 NetworkLoadChecker(NetworkProcess&, WebCore::FetchOptions&&, PAL::SessionID, WebCore::PageIdentifier, WebCore::FrameIdentifier, WebCore::HTTPHeaderMap&&, URL&&, RefPtr<WebCore::SecurityOrigin>&&, WebCore::PreflightPolicy, String&& referrer, bool isHTTPSUpgradeEnabled = false, bool shouldCaptureExtraNetworkLoadMetrics = false, LoadType requestLoadType = LoadType::Other); 59 60 ~NetworkLoadChecker(); 60 61 … … 128 129 Ref<NetworkProcess> m_networkProcess; 129 130 WebCore::PageIdentifier m_pageID; 130 uint64_tm_frameID;131 WebCore::FrameIdentifier m_frameID; 131 132 WebCore::HTTPHeaderMap m_originalRequestHeaders; // Needed for CORS checks. 132 133 WebCore::HTTPHeaderMap m_firstRequestHeaders; // Needed for CORS checks. -
trunk/Source/WebKit/NetworkProcess/NetworkLoadParameters.h
r248677 r248713 28 28 #include "NetworkActivityTracker.h" 29 29 #include <WebCore/BlobDataFileReference.h> 30 #include <WebCore/FrameIdentifier.h> 30 31 #include <WebCore/PageIdentifier.h> 31 32 #include <WebCore/ResourceLoaderOptions.h> … … 47 48 PAL::SessionID sessionID; 48 49 WebCore::PageIdentifier webPageID; 49 uint64_t webFrameID { 0 };50 WebCore::FrameIdentifier webFrameID; 50 51 WTF::ProcessID parentPID { 0 }; 51 52 WebCore::ResourceRequest request; -
trunk/Source/WebKit/NetworkProcess/NetworkProcess.h
r248699 r248713 138 138 using DomainInNeedOfStorageAccess = WebCore::RegistrableDomain; 139 139 using OpenerDomain = WebCore::RegistrableDomain; 140 using FrameID = uint64_t;141 140 142 141 NetworkProcess(AuxiliaryProcessInitializationParameters&&); -
trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp
r248593 r248713 181 181 WTF::switchOn(result, 182 182 [this] (ResourceError& error) { 183 RELEASE_LOG_IF_ALLOWED("start: error checking (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d, parentPID = %d, error.domain = %{public}s, error.code = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID , m_parameters.identifier, this->isMainResource(), this->isSynchronous(), m_parameters.parentPID, error.domain().utf8().data(), error.errorCode());183 RELEASE_LOG_IF_ALLOWED("start: error checking (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d, parentPID = %d, error.domain = %{public}s, error.code = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID.toUInt64(), m_parameters.identifier, this->isMainResource(), this->isSynchronous(), m_parameters.parentPID, error.domain().utf8().data(), error.errorCode()); 184 184 if (!error.isCancellation()) 185 185 this->didFailLoading(error); … … 188 188 this->m_isWaitingContinueWillSendRequestForCachedRedirect = true; 189 189 this->willSendRedirectedRequest(WTFMove(triplet.request), WTFMove(triplet.redirectRequest), WTFMove(triplet.redirectResponse)); 190 RELEASE_LOG_IF_ALLOWED("start: synthetic redirect sent because request URL was modified (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d, parentPID = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID , m_parameters.identifier, this->isMainResource(), this->isSynchronous(), m_parameters.parentPID);190 RELEASE_LOG_IF_ALLOWED("start: synthetic redirect sent because request URL was modified (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d, parentPID = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID.toUInt64(), m_parameters.identifier, this->isMainResource(), this->isSynchronous(), m_parameters.parentPID); 191 191 }, 192 192 [this] (ResourceRequest& request) { 193 193 if (this->canUseCache(request)) { 194 RELEASE_LOG_IF_ALLOWED("start: Checking cache for resource (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d, parentPID = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID , m_parameters.identifier, this->isMainResource(), this->isSynchronous(), m_parameters.parentPID);194 RELEASE_LOG_IF_ALLOWED("start: Checking cache for resource (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d, parentPID = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID.toUInt64(), m_parameters.identifier, this->isMainResource(), this->isSynchronous(), m_parameters.parentPID); 195 195 this->retrieveCacheEntry(request); 196 196 return; … … 205 205 // FIXME: Remove that code path once m_networkLoadChecker is used for all network loads. 206 206 if (canUseCache(originalRequest())) { 207 RELEASE_LOG_IF_ALLOWED("start: Checking cache for resource (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d, parentPID = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID , m_parameters.identifier, isMainResource(), isSynchronous(), m_parameters.parentPID);207 RELEASE_LOG_IF_ALLOWED("start: Checking cache for resource (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d, parentPID = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID.toUInt64(), m_parameters.identifier, isMainResource(), isSynchronous(), m_parameters.parentPID); 208 208 retrieveCacheEntry(originalRequest()); 209 209 return; … … 245 245 246 246 if (!entry) { 247 RELEASE_LOG_IF_ALLOWED("retrieveCacheEntry: Resource not in cache (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID , m_parameters.identifier, isMainResource(), isSynchronous());247 RELEASE_LOG_IF_ALLOWED("retrieveCacheEntry: Resource not in cache (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID.toUInt64(), m_parameters.identifier, isMainResource(), isSynchronous()); 248 248 startNetworkLoad(WTFMove(request), FirstLoad::Yes); 249 249 return; … … 257 257 #if ENABLE(RESOURCE_LOAD_STATISTICS) 258 258 if (entry->hasReachedPrevalentResourceAgeCap()) { 259 RELEASE_LOG_IF_ALLOWED("retrieveCacheEntry: Resource has reached prevalent resource age cap (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID , m_parameters.identifier, isMainResource(), isSynchronous());259 RELEASE_LOG_IF_ALLOWED("retrieveCacheEntry: Resource has reached prevalent resource age cap (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID.toUInt64(), m_parameters.identifier, isMainResource(), isSynchronous()); 260 260 m_cacheEntryForMaxAgeCapValidation = WTFMove(entry); 261 261 ResourceRequest revalidationRequest = originalRequest(); … … 265 265 #endif 266 266 if (entry->redirectRequest()) { 267 RELEASE_LOG_IF_ALLOWED("retrieveCacheEntry: Handling redirect (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID , m_parameters.identifier, isMainResource(), isSynchronous());267 RELEASE_LOG_IF_ALLOWED("retrieveCacheEntry: Handling redirect (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID.toUInt64(), m_parameters.identifier, isMainResource(), isSynchronous()); 268 268 dispatchWillSendRequestForCacheEntry(WTFMove(request), WTFMove(entry)); 269 269 return; 270 270 } 271 271 if (m_parameters.needsCertificateInfo && !entry->response().certificateInfo()) { 272 RELEASE_LOG_IF_ALLOWED("retrieveCacheEntry: Resource does not have required certificate (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID , m_parameters.identifier, isMainResource(), isSynchronous());272 RELEASE_LOG_IF_ALLOWED("retrieveCacheEntry: Resource does not have required certificate (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID.toUInt64(), m_parameters.identifier, isMainResource(), isSynchronous()); 273 273 startNetworkLoad(WTFMove(request), FirstLoad::Yes); 274 274 return; 275 275 } 276 276 if (entry->needsValidation() || request.cachePolicy() == WebCore::ResourceRequestCachePolicy::RefreshAnyCacheData) { 277 RELEASE_LOG_IF_ALLOWED("retrieveCacheEntry: Validating cache entry (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID , m_parameters.identifier, isMainResource(), isSynchronous());277 RELEASE_LOG_IF_ALLOWED("retrieveCacheEntry: Validating cache entry (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID.toUInt64(), m_parameters.identifier, isMainResource(), isSynchronous()); 278 278 validateCacheEntry(WTFMove(entry)); 279 279 return; 280 280 } 281 RELEASE_LOG_IF_ALLOWED("retrieveCacheEntry: Retrieved resource from cache (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID , m_parameters.identifier, isMainResource(), isSynchronous());281 RELEASE_LOG_IF_ALLOWED("retrieveCacheEntry: Retrieved resource from cache (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID.toUInt64(), m_parameters.identifier, isMainResource(), isSynchronous()); 282 282 didRetrieveCacheEntry(WTFMove(entry)); 283 283 } … … 286 286 { 287 287 if (load == FirstLoad::Yes) { 288 RELEASE_LOG_IF_ALLOWED("startNetworkLoad: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID , m_parameters.identifier, isMainResource(), isSynchronous());288 RELEASE_LOG_IF_ALLOWED("startNetworkLoad: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID.toUInt64(), m_parameters.identifier, isMainResource(), isSynchronous()); 289 289 290 290 consumeSandboxExtensions(); … … 309 309 if (!networkSession) { 310 310 WTFLogAlways("Attempted to create a NetworkLoad with a session (id=%" PRIu64 ") that does not exist.", parameters.sessionID.sessionID()); 311 RELEASE_LOG_ERROR_IF_ALLOWED("startNetworkLoad: Attempted to create a NetworkLoad with a session that does not exist (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", sessionID=%" PRIu64 ")", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID , m_parameters.identifier, parameters.sessionID.sessionID());311 RELEASE_LOG_ERROR_IF_ALLOWED("startNetworkLoad: Attempted to create a NetworkLoad with a session that does not exist (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", sessionID=%" PRIu64 ")", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID.toUInt64(), m_parameters.identifier, parameters.sessionID.sessionID()); 312 312 m_connection->networkProcess().logDiagnosticMessage(m_parameters.webPageID, WebCore::DiagnosticLoggingKeys::internalErrorKey(), WebCore::DiagnosticLoggingKeys::invalidSessionIDKey(), WebCore::ShouldSample::No); 313 313 didFailLoading(internalError(request.url())); … … 321 321 m_networkLoad = std::make_unique<NetworkLoad>(*this, &networkSession->blobRegistry(), WTFMove(parameters), *networkSession); 322 322 323 RELEASE_LOG_IF_ALLOWED("startNetworkLoad: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", description = %{public}s)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID , m_parameters.identifier, m_networkLoad->description().utf8().data());323 RELEASE_LOG_IF_ALLOWED("startNetworkLoad: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", description = %{public}s)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID.toUInt64(), m_parameters.identifier, m_networkLoad->description().utf8().data()); 324 324 } 325 325 … … 345 345 void NetworkResourceLoader::convertToDownload(DownloadID downloadID, const ResourceRequest& request, const ResourceResponse& response) 346 346 { 347 RELEASE_LOG(Loading, "Converting NetworkResourceLoader %p to download %" PRIu64 " (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", this, downloadID.downloadID(), m_parameters.webPageID.toUInt64(), m_parameters.webFrameID , m_parameters.identifier);347 RELEASE_LOG(Loading, "Converting NetworkResourceLoader %p to download %" PRIu64 " (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", this, downloadID.downloadID(), m_parameters.webPageID.toUInt64(), m_parameters.webFrameID.toUInt64(), m_parameters.identifier); 348 348 349 349 // This can happen if the resource came from the disk cache. … … 363 363 364 364 RELEASE_LOG_IF_ALLOWED("abort: Canceling resource load (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", 365 m_parameters.webPageID.toUInt64(), m_parameters.webFrameID , m_parameters.identifier);365 m_parameters.webPageID.toUInt64(), m_parameters.webFrameID.toUInt64(), m_parameters.identifier); 366 366 367 367 if (m_parameters.options.keepAlive && m_response.isNull() && !m_isKeptAlive) { … … 448 448 void NetworkResourceLoader::didReceiveResponse(ResourceResponse&& receivedResponse, ResponseCompletionHandler&& completionHandler) 449 449 { 450 RELEASE_LOG_IF_ALLOWED("didReceiveResponse: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", httpStatusCode = %d, length = %" PRId64 ")", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID , m_parameters.identifier, receivedResponse.httpStatusCode(), receivedResponse.expectedContentLength());450 RELEASE_LOG_IF_ALLOWED("didReceiveResponse: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", httpStatusCode = %d, length = %" PRId64 ")", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID.toUInt64(), m_parameters.identifier, receivedResponse.httpStatusCode(), receivedResponse.expectedContentLength()); 451 451 452 452 m_response = WTFMove(receivedResponse); … … 528 528 { 529 529 if (!m_numBytesReceived) 530 RELEASE_LOG_IF_ALLOWED("didReceiveBuffer: Started receiving data (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID , m_parameters.identifier);530 RELEASE_LOG_IF_ALLOWED("didReceiveBuffer: Started receiving data (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID.toUInt64(), m_parameters.identifier); 531 531 m_numBytesReceived += buffer->size(); 532 532 … … 557 557 void NetworkResourceLoader::didFinishLoading(const NetworkLoadMetrics& networkLoadMetrics) 558 558 { 559 RELEASE_LOG_IF_ALLOWED("didFinishLoading: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", length = %zd)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID , m_parameters.identifier, m_numBytesReceived);559 RELEASE_LOG_IF_ALLOWED("didFinishLoading: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", length = %zd)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID.toUInt64(), m_parameters.identifier, m_numBytesReceived); 560 560 561 561 if (shouldCaptureExtraNetworkLoadMetrics()) … … 592 592 void NetworkResourceLoader::didFailLoading(const ResourceError& error) 593 593 { 594 RELEASE_LOG_IF_ALLOWED("didFailLoading: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isTimeout = %d, isCancellation = %d, isAccessControl = %d, errCode = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID , m_parameters.identifier, error.isTimeout(), error.isCancellation(), error.isAccessControl(), error.errorCode());594 RELEASE_LOG_IF_ALLOWED("didFailLoading: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isTimeout = %d, isCancellation = %d, isAccessControl = %d, errCode = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID.toUInt64(), m_parameters.identifier, error.isTimeout(), error.isCancellation(), error.isAccessControl(), error.errorCode()); 595 595 596 596 if (shouldCaptureExtraNetworkLoadMetrics()) … … 757 757 } 758 758 759 RELEASE_LOG_IF_ALLOWED("continueWillSendRequest: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID , m_parameters.identifier);759 RELEASE_LOG_IF_ALLOWED("continueWillSendRequest: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID.toUInt64(), m_parameters.identifier); 760 760 761 761 m_isAllowedToAskUserForCredentials = isAllowedToAskUserForCredentials; … … 1012 1012 { 1013 1013 return value ? String::number(value.value()) : String("None"_s); 1014 }; 1014 } 1015 1016 static String escapeIDForJSON(const Optional<FrameIdentifier>& value) 1017 { 1018 return value ? String::number(value->toUInt64()) : String("None"_s); 1019 } 1015 1020 1016 1021 static String escapeIDForJSON(const Optional<PageIdentifier>& value) 1017 1022 { 1018 1023 return value ? String::number(value->toUInt64()) : String("None"_s); 1019 } ;1024 } 1020 1025 1021 1026 void NetworkResourceLoader::logCookieInformation() const … … 1029 1034 } 1030 1035 1031 static void logBlockedCookieInformation(NetworkConnectionToWebProcess& connection, const String& label, const void* loggedObject, const WebCore::NetworkStorageSession& networkStorageSession, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, const String& referrer, Optional< uint64_t> frameID, Optional<PageIdentifier> pageID, Optional<uint64_t> identifier)1036 static void logBlockedCookieInformation(NetworkConnectionToWebProcess& connection, const String& label, const void* loggedObject, const WebCore::NetworkStorageSession& networkStorageSession, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, const String& referrer, Optional<FrameIdentifier> frameID, Optional<PageIdentifier> pageID, Optional<uint64_t> identifier) 1032 1037 { 1033 1038 ASSERT(NetworkResourceLoader::shouldLogCookieInformation(connection, networkStorageSession.sessionID())); … … 1056 1061 } 1057 1062 1058 static void logCookieInformationInternal(NetworkConnectionToWebProcess& connection, const String& label, const void* loggedObject, const WebCore::NetworkStorageSession& networkStorageSession, const URL& firstParty, const WebCore::SameSiteInfo& sameSiteInfo, const URL& url, const String& referrer, Optional< uint64_t> frameID, Optional<PageIdentifier> pageID, Optional<uint64_t> identifier)1063 static void logCookieInformationInternal(NetworkConnectionToWebProcess& connection, const String& label, const void* loggedObject, const WebCore::NetworkStorageSession& networkStorageSession, const URL& firstParty, const WebCore::SameSiteInfo& sameSiteInfo, const URL& url, const String& referrer, Optional<FrameIdentifier> frameID, Optional<PageIdentifier> pageID, Optional<uint64_t> identifier) 1059 1064 { 1060 1065 ASSERT(NetworkResourceLoader::shouldLogCookieInformation(connection, networkStorageSession.sessionID())); … … 1117 1122 } 1118 1123 1119 void NetworkResourceLoader::logCookieInformation(NetworkConnectionToWebProcess& connection, const String& label, const void* loggedObject, const NetworkStorageSession& networkStorageSession, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, const String& referrer, Optional< uint64_t> frameID, Optional<PageIdentifier> pageID, Optional<uint64_t> identifier)1124 void NetworkResourceLoader::logCookieInformation(NetworkConnectionToWebProcess& connection, const String& label, const void* loggedObject, const NetworkStorageSession& networkStorageSession, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, const String& referrer, Optional<FrameIdentifier> frameID, Optional<PageIdentifier> pageID, Optional<uint64_t> identifier) 1120 1125 { 1121 1126 ASSERT(shouldLogCookieInformation(connection, networkStorageSession.sessionID())); -
trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.h
r248540 r248713 86 86 PAL::SessionID sessionID() const { return m_parameters.sessionID; } 87 87 ResourceLoadIdentifier identifier() const { return m_parameters.identifier; } 88 uint64_tframeID() const { return m_parameters.webFrameID; }88 WebCore::FrameIdentifier frameID() const { return m_parameters.webFrameID; } 89 89 WebCore::PageIdentifier pageID() const { return m_parameters.webPageID; } 90 90 … … 113 113 #if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED 114 114 static bool shouldLogCookieInformation(NetworkConnectionToWebProcess&, const PAL::SessionID&); 115 static void logCookieInformation(NetworkConnectionToWebProcess&, const String& label, const void* loggedObject, const WebCore::NetworkStorageSession&, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, const String& referrer, Optional< uint64_t> frameID, Optional<WebCore::PageIdentifier>, Optional<uint64_t> identifier);115 static void logCookieInformation(NetworkConnectionToWebProcess&, const String& label, const void* loggedObject, const WebCore::NetworkStorageSession&, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, const String& referrer, Optional<WebCore::FrameIdentifier>, Optional<WebCore::PageIdentifier>, Optional<uint64_t> identifier); 116 116 #endif 117 117 -
trunk/Source/WebKit/NetworkProcess/cache/NetworkCache.h
r247567 r248713 29 29 #include "NetworkCacheStorage.h" 30 30 #include "ShareableResource.h" 31 #include <WebCore/FrameIdentifier.h> 31 32 #include <WebCore/PageIdentifier.h> 32 33 #include <WebCore/ResourceResponse.h> … … 86 87 }; 87 88 88 using GlobalFrameID = std::pair<WebCore::PageIdentifier, uint64_t /*webFrameID*/>;89 using GlobalFrameID = std::pair<WebCore::PageIdentifier, WebCore::FrameIdentifier>; // FIXME: Use GlobalFrameIdentifier. 89 90 90 91 enum class CacheOption : uint8_t { -
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h
r248273 r248713 43 43 friend class NetworkSessionCocoa; 44 44 public: 45 static Ref<NetworkDataTask> create(NetworkSession& session, NetworkDataTaskClient& client, const WebCore::ResourceRequest& request, uint64_tframeID, WebCore::PageIdentifier pageID, WebCore::StoredCredentialsPolicy storedCredentialsPolicy, WebCore::ContentSniffingPolicy shouldContentSniff, WebCore::ContentEncodingSniffingPolicy shouldContentEncodingSniff, bool shouldClearReferrerOnHTTPSToHTTPRedirect, PreconnectOnly shouldPreconnectOnly, bool dataTaskIsForMainFrameNavigation, bool dataTaskIsForMainResourceNavigationForAnyFrame, Optional<NetworkActivityTracker> networkActivityTracker)45 static Ref<NetworkDataTask> create(NetworkSession& session, NetworkDataTaskClient& client, const WebCore::ResourceRequest& request, WebCore::FrameIdentifier frameID, WebCore::PageIdentifier pageID, WebCore::StoredCredentialsPolicy storedCredentialsPolicy, WebCore::ContentSniffingPolicy shouldContentSniff, WebCore::ContentEncodingSniffingPolicy shouldContentEncodingSniff, bool shouldClearReferrerOnHTTPSToHTTPRedirect, PreconnectOnly shouldPreconnectOnly, bool dataTaskIsForMainFrameNavigation, bool dataTaskIsForMainResourceNavigationForAnyFrame, Optional<NetworkActivityTracker> networkActivityTracker) 46 46 { 47 47 return adoptRef(*new NetworkDataTaskCocoa(session, client, request, frameID, pageID, storedCredentialsPolicy, shouldContentSniff, shouldContentEncodingSniff, shouldClearReferrerOnHTTPSToHTTPRedirect, shouldPreconnectOnly, dataTaskIsForMainFrameNavigation, dataTaskIsForMainResourceNavigationForAnyFrame, networkActivityTracker)); … … 70 70 WebCore::NetworkLoadMetrics& networkLoadMetrics() { return m_networkLoadMetrics; } 71 71 72 uint64_tframeID() const { return m_frameID; };72 WebCore::FrameIdentifier frameID() const { return m_frameID; }; 73 73 WebCore::PageIdentifier pageID() const { return m_pageID; }; 74 74 … … 76 76 77 77 private: 78 NetworkDataTaskCocoa(NetworkSession&, NetworkDataTaskClient&, const WebCore::ResourceRequest&, uint64_t frameID, WebCore::PageIdentifier, WebCore::StoredCredentialsPolicy, WebCore::ContentSniffingPolicy, WebCore::ContentEncodingSniffingPolicy, bool shouldClearReferrerOnHTTPSToHTTPRedirect, PreconnectOnly, bool dataTaskIsForMainFrameNavigation, bool dataTaskIsForMainResourceNavigationForAnyFrame, Optional<NetworkActivityTracker>);78 NetworkDataTaskCocoa(NetworkSession&, NetworkDataTaskClient&, const WebCore::ResourceRequest&, WebCore::FrameIdentifier, WebCore::PageIdentifier, WebCore::StoredCredentialsPolicy, WebCore::ContentSniffingPolicy, WebCore::ContentEncodingSniffingPolicy, bool shouldClearReferrerOnHTTPSToHTTPRedirect, PreconnectOnly, bool dataTaskIsForMainFrameNavigation, bool dataTaskIsForMainResourceNavigationForAnyFrame, Optional<NetworkActivityTracker>); 79 79 80 80 bool tryPasswordBasedAuthentication(const WebCore::AuthenticationChallenge&, ChallengeCompletionHandler&); … … 93 93 RetainPtr<NSURLSessionDataTask> m_task; 94 94 WebCore::NetworkLoadMetrics m_networkLoadMetrics; 95 uint64_tm_frameID;95 WebCore::FrameIdentifier m_frameID; 96 96 WebCore::PageIdentifier m_pageID; 97 97 -
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm
r248640 r248713 171 171 } 172 172 173 NetworkDataTaskCocoa::NetworkDataTaskCocoa(NetworkSession& session, NetworkDataTaskClient& client, const WebCore::ResourceRequest& requestWithCredentials, uint64_tframeID, WebCore::PageIdentifier pageID, WebCore::StoredCredentialsPolicy storedCredentialsPolicy, WebCore::ContentSniffingPolicy shouldContentSniff, WebCore::ContentEncodingSniffingPolicy shouldContentEncodingSniff, bool shouldClearReferrerOnHTTPSToHTTPRedirect, PreconnectOnly shouldPreconnectOnly, bool dataTaskIsForMainFrameNavigation, bool dataTaskIsForMainResourceNavigationForAnyFrame, Optional<NetworkActivityTracker> networkActivityTracker)173 NetworkDataTaskCocoa::NetworkDataTaskCocoa(NetworkSession& session, NetworkDataTaskClient& client, const WebCore::ResourceRequest& requestWithCredentials, WebCore::FrameIdentifier frameID, WebCore::PageIdentifier pageID, WebCore::StoredCredentialsPolicy storedCredentialsPolicy, WebCore::ContentSniffingPolicy shouldContentSniff, WebCore::ContentEncodingSniffingPolicy shouldContentEncodingSniff, bool shouldClearReferrerOnHTTPSToHTTPRedirect, PreconnectOnly shouldPreconnectOnly, bool dataTaskIsForMainFrameNavigation, bool dataTaskIsForMainResourceNavigationForAnyFrame, Optional<NetworkActivityTracker> networkActivityTracker) 174 174 : NetworkDataTask(session, client, requestWithCredentials, storedCredentialsPolicy, shouldClearReferrerOnHTTPSToHTTPRedirect, dataTaskIsForMainFrameNavigation) 175 175 , m_frameID(frameID) … … 257 257 #if !RELEASE_LOG_DISABLED 258 258 if (m_session->shouldLogCookieInformation()) 259 RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, "%p - NetworkDataTaskCocoa::logCookieInformation: pageID = %llu, frameID = %llu, taskID = %lu: Blocking cookies for URL %s", this, pageID.toUInt64(), frameID , (unsigned long)[m_task taskIdentifier], nsRequest.URL.absoluteString.UTF8String);259 RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, "%p - NetworkDataTaskCocoa::logCookieInformation: pageID = %llu, frameID = %llu, taskID = %lu: Blocking cookies for URL %s", this, pageID.toUInt64(), frameID.toUInt64(), (unsigned long)[m_task taskIdentifier], nsRequest.URL.absoluteString.UTF8String); 260 260 #else 261 261 LOG(NetworkSession, "%llu Blocking cookies for URL %s", [m_task taskIdentifier], nsRequest.URL.absoluteString.UTF8String); … … 391 391 #if !RELEASE_LOG_DISABLED 392 392 if (m_session->shouldLogCookieInformation()) 393 RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, "%p - NetworkDataTaskCocoa::willPerformHTTPRedirection::logCookieInformation: pageID = %llu, frameID = %llu, taskID = %lu: %s cookies for redirect URL %s", this, m_pageID.toUInt64(), m_frameID , (unsigned long)[m_task taskIdentifier], (m_hasBeenSetToUseStatelessCookieStorage ? "Blocking" : "Not blocking"), request.url().string().utf8().data());393 RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, "%p - NetworkDataTaskCocoa::willPerformHTTPRedirection::logCookieInformation: pageID = %llu, frameID = %llu, taskID = %lu: %s cookies for redirect URL %s", this, m_pageID.toUInt64(), m_frameID.toUInt64(), (unsigned long)[m_task taskIdentifier], (m_hasBeenSetToUseStatelessCookieStorage ? "Blocking" : "Not blocking"), request.url().string().utf8().data()); 394 394 #else 395 395 LOG(NetworkSession, "%llu %s cookies for redirect URL %s", [m_task taskIdentifier], (m_hasBeenSetToUseStatelessCookieStorage ? "Blocking" : "Not blocking"), request.url().string().utf8().data()); -
trunk/Source/WebKit/Scripts/webkit/messages.py
r245796 r248713 206 206 'WebCore::DocumentIdentifier', 207 207 'WebCore::FetchIdentifier', 208 'WebCore::FrameIdentifier', 208 209 'WebCore::PageIdentifier', 209 210 'WebCore::PointerID', -
trunk/Source/WebKit/Shared/API/APIFrameHandle.cpp
r204668 r248713 32 32 namespace API { 33 33 34 Ref<FrameHandle> FrameHandle::create( uint64_tframeID)34 Ref<FrameHandle> FrameHandle::create(WebCore::FrameIdentifier frameID) 35 35 { 36 36 return adoptRef(*new FrameHandle(frameID, false)); 37 37 } 38 38 39 Ref<FrameHandle> FrameHandle::createAutoconverting( uint64_tframeID)39 Ref<FrameHandle> FrameHandle::createAutoconverting(WebCore::FrameIdentifier frameID) 40 40 { 41 41 return adoptRef(*new FrameHandle(frameID, true)); 42 42 } 43 43 44 FrameHandle::FrameHandle( uint64_tframeID, bool isAutoconverting)44 FrameHandle::FrameHandle(WebCore::FrameIdentifier frameID, bool isAutoconverting) 45 45 : m_frameID(frameID) 46 46 , m_isAutoconverting(isAutoconverting) … … 60 60 bool FrameHandle::decode(IPC::Decoder& decoder, RefPtr<Object>& result) 61 61 { 62 uint64_tframeID;62 WebCore::FrameIdentifier frameID; 63 63 if (!decoder.decode(frameID)) 64 64 return false; -
trunk/Source/WebKit/Shared/API/APIFrameHandle.h
r204668 r248713 28 28 29 29 #include "APIObject.h" 30 #include <WebCore/FrameIdentifier.h> 30 31 #include <wtf/Ref.h> 31 32 … … 39 40 class FrameHandle : public ObjectImpl<Object::Type::FrameHandle> { 40 41 public: 41 static Ref<FrameHandle> create( uint64_t frameID);42 static Ref<FrameHandle> createAutoconverting( uint64_t frameID);42 static Ref<FrameHandle> create(WebCore::FrameIdentifier); 43 static Ref<FrameHandle> createAutoconverting(WebCore::FrameIdentifier); 43 44 44 explicit FrameHandle( uint64_t frameID, bool isAutoconverting);45 explicit FrameHandle(WebCore::FrameIdentifier, bool isAutoconverting); 45 46 virtual ~FrameHandle(); 46 47 47 uint64_tframeID() const { return m_frameID; }48 WebCore::FrameIdentifier frameID() const { return m_frameID; } 48 49 bool isAutoconverting() const { return m_isAutoconverting; } 49 50 … … 52 53 53 54 private: 54 const uint64_tm_frameID;55 const WebCore::FrameIdentifier m_frameID; 55 56 const bool m_isAutoconverting; 56 57 }; -
trunk/Source/WebKit/Shared/API/Cocoa/_WKFrameHandle.mm
r242339 r248713 27 27 #import "_WKFrameHandleInternal.h" 28 28 29 #import <WebCore/FrameIdentifier.h> 30 29 31 @implementation _WKFrameHandle { 30 32 API::ObjectStorage<API::FrameHandle> _frameHandle; … … 51 53 - (NSUInteger)hash 52 54 { 53 return _frameHandle->frameID() ;55 return _frameHandle->frameID().toUInt64(); 54 56 } 55 57 56 58 - (uint64_t)_frameID 57 59 { 58 return _frameHandle->frameID() ;60 return _frameHandle->frameID().toUInt64(); 59 61 } 60 62 … … 84 86 } 85 87 86 API::Object::constructInWrapper<API::FrameHandle>(self, frameID.unsignedLongLongValue, false);88 API::Object::constructInWrapper<API::FrameHandle>(self, WebCore::frameIdentifierFromID(frameID.unsignedLongLongValue), false); 87 89 88 90 return self; … … 91 93 - (void)encodeWithCoder:(NSCoder *)coder 92 94 { 93 [coder encodeObject:@( _frameHandle->frameID()) forKey:@"frameID"];95 [coder encodeObject:@([self _frameID]) forKey:@"frameID"]; 94 96 } 95 97 -
trunk/Source/WebKit/Shared/Authentication/AuthenticationManager.cpp
r245796 r248713 109 109 } 110 110 111 void AuthenticationManager::didReceiveAuthenticationChallenge(PageIdentifier pageID, uint64_tframeID, const AuthenticationChallenge& authenticationChallenge, ChallengeCompletionHandler&& completionHandler)111 void AuthenticationManager::didReceiveAuthenticationChallenge(PageIdentifier pageID, FrameIdentifier frameID, const AuthenticationChallenge& authenticationChallenge, ChallengeCompletionHandler&& completionHandler) 112 112 { 113 113 ASSERT(pageID); -
trunk/Source/WebKit/Shared/Authentication/AuthenticationManager.h
r245796 r248713 30 30 #include "WebProcessSupplement.h" 31 31 #include <WebCore/AuthenticationChallenge.h> 32 #include <WebCore/FrameIdentifier.h> 32 33 #include <WebCore/PageIdentifier.h> 33 34 #include <wtf/CompletionHandler.h> … … 62 63 static const char* supplementName(); 63 64 64 void didReceiveAuthenticationChallenge(WebCore::PageIdentifier, uint64_t frameID, const WebCore::AuthenticationChallenge&, ChallengeCompletionHandler&&);65 void didReceiveAuthenticationChallenge(WebCore::PageIdentifier, WebCore::FrameIdentifier, const WebCore::AuthenticationChallenge&, ChallengeCompletionHandler&&); 65 66 void didReceiveAuthenticationChallenge(IPC::MessageSender& download, const WebCore::AuthenticationChallenge&, ChallengeCompletionHandler&&); 66 67 -
trunk/Source/WebKit/Shared/FrameInfoData.cpp
r239427 r248713 50 50 return false; 51 51 result.securityOrigin = WTFMove(*securityOrigin); 52 if (!decoder.decode(result.frameID)) 52 53 Optional<Optional<FrameIdentifier>> frameID; 54 decoder >> frameID; 55 if (!frameID) 53 56 return false; 57 result.frameID = WTFMove(*frameID); 54 58 55 59 return true; -
trunk/Source/WebKit/Shared/FrameInfoData.h
r205150 r248713 26 26 #pragma once 27 27 28 #include <WebCore/FrameIdentifier.h> 28 29 #include <WebCore/ResourceRequest.h> 29 30 #include <WebCore/SecurityOriginData.h> … … 43 44 WebCore::ResourceRequest request; 44 45 WebCore::SecurityOriginData securityOrigin; 45 uint64_t frameID { 0 };46 Optional<WebCore::FrameIdentifier> frameID; 46 47 }; 47 48 -
trunk/Source/WebKit/UIProcess/API/APIFrameInfo.cpp
r229979 r248713 56 56 , m_request { frameInfoData.request } 57 57 , m_securityOrigin { SecurityOrigin::create(frameInfoData.securityOrigin.securityOrigin()) } 58 , m_handle { API::FrameHandle::create(frameInfoData.frameID ) }58 , m_handle { API::FrameHandle::create(frameInfoData.frameID ? *frameInfoData.frameID : WebCore::FrameIdentifier{ }) } 59 59 , m_page { makeRefPtr(page) } 60 60 { -
trunk/Source/WebKit/UIProcess/API/C/WKFrameHandleRef.cpp
r197114 r248713 39 39 uint64_t WKFrameHandleGetFrameID(WKFrameHandleRef frameHandleRef) 40 40 { 41 return toImpl(frameHandleRef)->frameID() ;41 return toImpl(frameHandleRef)->frameID().toUInt64(); 42 42 } -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
r248522 r248713 6622 6622 - (NSPrintOperation *)_printOperationWithPrintInfo:(NSPrintInfo *)printInfo forFrame:(_WKFrameHandle *)frameHandle 6623 6623 { 6624 if (auto* webFrameProxy = _page->process().webFrame( frameHandle._frameID))6624 if (auto* webFrameProxy = _page->process().webFrame(WebCore::frameIdentifierFromID(frameHandle._frameID))) 6625 6625 return _impl->printOperationWithPrintInfo(printInfo, *webFrameProxy); 6626 6626 return nil; … … 7115 7115 - (BOOL)_canChangeFrameLayout:(_WKFrameHandle *)frameHandle 7116 7116 { 7117 if (auto* webFrameProxy = _page->process().webFrame( frameHandle._frameID))7117 if (auto* webFrameProxy = _page->process().webFrame(WebCore::frameIdentifierFromID(frameHandle._frameID))) 7118 7118 return _impl->canChangeFrameLayout(*webFrameProxy); 7119 7119 return false; -
trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm
r248177 r248713 31 31 #import "_WKFrameHandleInternal.h" 32 32 #import "_WKInspectorInternal.h" 33 #import <WebCore/FrameIdentifier.h> 33 34 #import <wtf/RetainPtr.h> 34 35 … … 100 101 { 101 102 if (auto* page = _inspector->inspectedPage()) 102 _inspector->showMainResourceForFrame(page->process().webFrame( frame._frameID));103 _inspector->showMainResourceForFrame(page->process().webFrame(WebCore::frameIdentifierFromID(frame._frameID))); 103 104 } 104 105 -
trunk/Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.cpp
r245320 r248713 383 383 } 384 384 385 void SimulatedInputDispatcher::run( uint64_tframeID, Vector<SimulatedInputKeyFrame>&& keyFrames, HashSet<Ref<SimulatedInputSource>>& inputSources, AutomationCompletionHandler&& completionHandler)385 void SimulatedInputDispatcher::run(WebCore::FrameIdentifier frameID, Vector<SimulatedInputKeyFrame>&& keyFrames, HashSet<Ref<SimulatedInputSource>>& inputSources, AutomationCompletionHandler&& completionHandler) 386 386 { 387 387 ASSERT(!isActive()); -
trunk/Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.h
r240554 r248713 29 29 30 30 #include "WebEvent.h" 31 #include <WebCore/FrameIdentifier.h> 31 32 #include <wtf/CompletionHandler.h> 32 33 #include <wtf/HashSet.h> … … 133 134 virtual void simulateKeyboardInteraction(WebPageProxy&, KeyboardInteraction, WTF::Variant<VirtualKey, CharKey>&&, AutomationCompletionHandler&&) = 0; 134 135 #endif 135 virtual void viewportInViewCenterPointOfElement(WebPageProxy&, uint64_t frameID, const String& nodeHandle, Function<void (Optional<WebCore::IntPoint>, Optional<AutomationCommandError>)>&&) = 0;136 virtual void viewportInViewCenterPointOfElement(WebPageProxy&, WebCore::FrameIdentifier, const String& nodeHandle, Function<void (Optional<WebCore::IntPoint>, Optional<AutomationCommandError>)>&&) = 0; 136 137 }; 137 138 … … 143 144 ~SimulatedInputDispatcher(); 144 145 145 void run( uint64_t frameID, Vector<SimulatedInputKeyFrame>&& keyFrames, HashSet<Ref<SimulatedInputSource>>& inputSources, AutomationCompletionHandler&&);146 void run(WebCore::FrameIdentifier, Vector<SimulatedInputKeyFrame>&& keyFrames, HashSet<Ref<SimulatedInputSource>>& inputSources, AutomationCompletionHandler&&); 146 147 void cancel(); 147 148 … … 166 167 SimulatedInputDispatcher::Client& m_client; 167 168 168 Optional< uint64_t> m_frameID;169 Optional<WebCore::FrameIdentifier> m_frameID; 169 170 AutomationCompletionHandler m_runCompletionHandler; 170 171 AutomationCompletionHandler m_keyFrameTransitionCompletionHandler; -
trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp
r248696 r248713 203 203 } 204 204 205 Optional< uint64_t> WebAutomationSession::webFrameIDForHandle(const String& handle)205 Optional<FrameIdentifier> WebAutomationSession::webFrameIDForHandle(const String& handle, bool& frameNotFound) 206 206 { 207 207 if (handle.isEmpty()) 208 return 0;208 return WTF::nullopt; 209 209 210 210 auto iter = m_handleWebFrameMap.find(handle); 211 if (iter == m_handleWebFrameMap.end()) 211 if (iter == m_handleWebFrameMap.end()) { 212 frameNotFound = true; 212 213 return WTF::nullopt; 214 } 213 215 214 216 return iter->value; 215 217 } 216 218 217 String WebAutomationSession::handleForWebFrameID( uint64_tframeID)218 { 219 if (!frameID )219 String WebAutomationSession::handleForWebFrameID(Optional<FrameIdentifier> frameID) 220 { 221 if (!frameID || !*frameID) 220 222 return emptyString(); 221 223 222 224 for (auto& process : m_processPool->processes()) { 223 if (WebFrameProxy* frame = process->webFrame( frameID)) {225 if (WebFrameProxy* frame = process->webFrame(*frameID)) { 224 226 if (frame->isMainFrame()) 225 227 return emptyString(); … … 228 230 } 229 231 230 auto iter = m_webFrameHandleMap.find( frameID);232 auto iter = m_webFrameHandleMap.find(*frameID); 231 233 if (iter != m_webFrameHandleMap.end()) 232 234 return iter->value; … … 234 236 String handle = "frame-" + createCanonicalUUIDString().convertToASCIIUppercase(); 235 237 236 auto firstAddResult = m_webFrameHandleMap.add( frameID, handle);238 auto firstAddResult = m_webFrameHandleMap.add(*frameID, handle); 237 239 RELEASE_ASSERT(firstAddResult.isNewEntry); 238 240 239 auto secondAddResult = m_handleWebFrameMap.add(handle, frameID);241 auto secondAddResult = m_handleWebFrameMap.add(handle, *frameID); 240 242 RELEASE_ASSERT(secondAddResult.isNewEntry); 241 243 … … 363 365 ASYNC_FAIL_WITH_PREDEFINED_ERROR(WindowNotFound); 364 366 365 Optional<uint64_t> frameID = webFrameIDForHandle(optionalFrameHandle ? *optionalFrameHandle : emptyString()); 366 if (!frameID) 367 bool frameNotFound = false; 368 auto frameID = webFrameIDForHandle(optionalFrameHandle ? *optionalFrameHandle : emptyString(), frameNotFound); 369 if (frameNotFound) 367 370 ASYNC_FAIL_WITH_PREDEFINED_ERROR(FrameNotFound); 368 371 … … 370 373 m_client->requestSwitchToPage(*this, *page, [frameID, page = makeRef(*page), callback = WTFMove(callback)]() { 371 374 page->setFocus(true); 372 page->process().send(Messages::WebAutomationSessionProxy::FocusFrame(page->pageID(), frameID .value()), 0);375 page->process().send(Messages::WebAutomationSessionProxy::FocusFrame(page->pageID(), frameID), 0); 373 376 374 377 callback->sendSuccess(); … … 460 463 461 464 if (optionalFrameHandle && !optionalFrameHandle->isEmpty()) { 462 Optional<uint64_t> frameID = webFrameIDForHandle(*optionalFrameHandle); 463 if (!frameID) 465 bool frameNotFound = false; 466 auto frameID = webFrameIDForHandle(*optionalFrameHandle, frameNotFound); 467 if (frameNotFound) 464 468 ASYNC_FAIL_WITH_PREDEFINED_ERROR(FrameNotFound); 465 469 WebFrameProxy* frame = page->process().webFrame(frameID.value()); … … 538 542 } 539 543 540 static WebPageProxy* findPageForFrameID(const WebProcessPool& processPool, uint64_tframeID)544 static WebPageProxy* findPageForFrameID(const WebProcessPool& processPool, FrameIdentifier frameID) 541 545 { 542 546 for (auto& process : processPool.processes()) { … … 547 551 } 548 552 549 void WebAutomationSession::respondToPendingFrameNavigationCallbacksWithTimeout(HashMap< uint64_t, RefPtr<Inspector::BackendDispatcher::CallbackBase>>& map)553 void WebAutomationSession::respondToPendingFrameNavigationCallbacksWithTimeout(HashMap<FrameIdentifier, RefPtr<Inspector::BackendDispatcher::CallbackBase>>& map) 550 554 { 551 555 Inspector::ErrorString timeoutError = STRING_FOR_PREDEFINED_ERROR_NAME(Timeout); … … 925 929 ASYNC_FAIL_WITH_PREDEFINED_ERROR(WindowNotFound); 926 930 927 Optional<uint64_t> frameID = webFrameIDForHandle(optionalFrameHandle ? *optionalFrameHandle : emptyString()); 928 if (!frameID) 931 bool frameNotFound = false; 932 auto frameID = webFrameIDForHandle(optionalFrameHandle ? *optionalFrameHandle : emptyString(), frameNotFound); 933 if (frameNotFound) 929 934 ASYNC_FAIL_WITH_PREDEFINED_ERROR(FrameNotFound); 930 935 … … 944 949 m_evaluateJavaScriptFunctionCallbacks.set(callbackID, WTFMove(callback)); 945 950 946 page->process().send(Messages::WebAutomationSessionProxy::EvaluateJavaScriptFunction(page->pageID(), frameID .value(), function, argumentsVector, expectsImplicitCallbackArgument, callbackTimeout, callbackID), 0);951 page->process().send(Messages::WebAutomationSessionProxy::EvaluateJavaScriptFunction(page->pageID(), frameID, function, argumentsVector, expectsImplicitCallbackArgument, callbackTimeout, callbackID), 0); 947 952 } 948 953 … … 968 973 ASYNC_FAIL_WITH_PREDEFINED_ERROR(WindowNotFound); 969 974 970 Optional<uint64_t> frameID = webFrameIDForHandle(optionalFrameHandle ? *optionalFrameHandle : emptyString()); 971 if (!frameID) 975 bool frameNotFound = false; 976 auto frameID = webFrameIDForHandle(optionalFrameHandle ? *optionalFrameHandle : emptyString(), frameNotFound); 977 if (frameNotFound) 972 978 ASYNC_FAIL_WITH_PREDEFINED_ERROR(FrameNotFound); 973 979 974 WTF::CompletionHandler<void(Optional<String>, uint64_t)> completionHandler = [this, protectedThis = makeRef(*this), callback = callback.copyRef()](Optional<String> errorType, uint64_tframeID) mutable {980 WTF::CompletionHandler<void(Optional<String>, Optional<FrameIdentifier>)> completionHandler = [this, protectedThis = makeRef(*this), callback = callback.copyRef()](Optional<String> errorType, Optional<FrameIdentifier> frameID) mutable { 975 981 if (errorType) { 976 982 callback->sendFailure(STRING_FOR_PREDEFINED_ERROR_MESSAGE(*errorType)); … … 982 988 983 989 if (optionalNodeHandle) { 984 page->process().sendWithAsyncReply(Messages::WebAutomationSessionProxy::ResolveChildFrameWithNodeHandle(page->pageID(), frameID .value(), *optionalNodeHandle), WTFMove(completionHandler));990 page->process().sendWithAsyncReply(Messages::WebAutomationSessionProxy::ResolveChildFrameWithNodeHandle(page->pageID(), frameID, *optionalNodeHandle), WTFMove(completionHandler)); 985 991 return; 986 992 } 987 993 988 994 if (optionalName) { 989 page->process().sendWithAsyncReply(Messages::WebAutomationSessionProxy::ResolveChildFrameWithName(page->pageID(), frameID .value(), *optionalName), WTFMove(completionHandler));995 page->process().sendWithAsyncReply(Messages::WebAutomationSessionProxy::ResolveChildFrameWithName(page->pageID(), frameID, *optionalName), WTFMove(completionHandler)); 990 996 return; 991 997 } 992 998 993 999 if (optionalOrdinal) { 994 page->process().sendWithAsyncReply(Messages::WebAutomationSessionProxy::ResolveChildFrameWithOrdinal(page->pageID(), frameID .value(), *optionalOrdinal), WTFMove(completionHandler));1000 page->process().sendWithAsyncReply(Messages::WebAutomationSessionProxy::ResolveChildFrameWithOrdinal(page->pageID(), frameID, *optionalOrdinal), WTFMove(completionHandler)); 995 1001 return; 996 1002 } … … 1005 1011 ASYNC_FAIL_WITH_PREDEFINED_ERROR(WindowNotFound); 1006 1012 1007 Optional<uint64_t> frameID = webFrameIDForHandle(frameHandle); 1008 if (!frameID) 1013 bool frameNotFound = false; 1014 auto frameID = webFrameIDForHandle(frameHandle, frameNotFound); 1015 if (frameNotFound) 1009 1016 ASYNC_FAIL_WITH_PREDEFINED_ERROR(FrameNotFound); 1010 1017 1011 WTF::CompletionHandler<void(Optional<String>, uint64_t)> completionHandler = [this, protectedThis = makeRef(*this), callback = callback.copyRef()](Optional<String> errorType, uint64_tframeID) mutable {1018 WTF::CompletionHandler<void(Optional<String>, Optional<FrameIdentifier>)> completionHandler = [this, protectedThis = makeRef(*this), callback = callback.copyRef()](Optional<String> errorType, Optional<FrameIdentifier> frameID) mutable { 1012 1019 if (errorType) { 1013 1020 callback->sendFailure(STRING_FOR_PREDEFINED_ERROR_MESSAGE(*errorType)); … … 1018 1025 }; 1019 1026 1020 page->process().sendWithAsyncReply(Messages::WebAutomationSessionProxy::ResolveParentFrame(page->pageID(), frameID .value()), WTFMove(completionHandler));1027 page->process().sendWithAsyncReply(Messages::WebAutomationSessionProxy::ResolveParentFrame(page->pageID(), frameID), WTFMove(completionHandler)); 1021 1028 } 1022 1029 … … 1036 1043 ASYNC_FAIL_WITH_PREDEFINED_ERROR(WindowNotFound); 1037 1044 1038 Optional<uint64_t> frameID = webFrameIDForHandle(frameHandle); 1039 if (!frameID) 1045 bool frameNotFound = false; 1046 auto frameID = webFrameIDForHandle(frameHandle, frameNotFound); 1047 if (frameNotFound) 1040 1048 ASYNC_FAIL_WITH_PREDEFINED_ERROR(FrameNotFound); 1041 1049 … … 1079 1087 1080 1088 bool scrollIntoViewIfNeeded = optionalScrollIntoViewIfNeeded ? *optionalScrollIntoViewIfNeeded : false; 1081 page->process().sendWithAsyncReply(Messages::WebAutomationSessionProxy::ComputeElementLayout(page->pageID(), frameID .value(), nodeHandle, scrollIntoViewIfNeeded, coordinateSystem.value()), WTFMove(completionHandler));1089 page->process().sendWithAsyncReply(Messages::WebAutomationSessionProxy::ComputeElementLayout(page->pageID(), frameID, nodeHandle, scrollIntoViewIfNeeded, coordinateSystem.value()), WTFMove(completionHandler)); 1082 1090 } 1083 1091 … … 1088 1096 ASYNC_FAIL_WITH_PREDEFINED_ERROR(WindowNotFound); 1089 1097 1090 Optional<uint64_t> frameID = webFrameIDForHandle(frameHandle); 1091 if (!frameID) 1098 bool frameNotFound = false; 1099 auto frameID = webFrameIDForHandle(frameHandle, frameNotFound); 1100 if (frameNotFound) 1092 1101 ASYNC_FAIL_WITH_PREDEFINED_ERROR(FrameNotFound); 1093 1102 … … 1101 1110 }; 1102 1111 1103 page->process().sendWithAsyncReply(Messages::WebAutomationSessionProxy::SelectOptionElement(page->pageID(), frameID .value(), nodeHandle), WTFMove(completionHandler));1112 page->process().sendWithAsyncReply(Messages::WebAutomationSessionProxy::SelectOptionElement(page->pageID(), frameID, nodeHandle), WTFMove(completionHandler)); 1104 1113 } 1105 1114 … … 1271 1280 }; 1272 1281 1273 // Always send the main frame ID as 0 so it is resolved on the WebProcess side. This avoids a race when page->mainFrame() is null still. 1274 const uint64_t mainFrameID = 0; 1275 page->process().sendWithAsyncReply(Messages::WebAutomationSessionProxy::GetCookiesForFrame(page->pageID(), mainFrameID), WTFMove(completionHandler)); 1282 page->process().sendWithAsyncReply(Messages::WebAutomationSessionProxy::GetCookiesForFrame(page->pageID(), WTF::nullopt), WTFMove(completionHandler)); 1276 1283 } 1277 1284 … … 1291 1298 }; 1292 1299 1293 // Always send the main frame ID as 0 so it is resolved on the WebProcess side. This avoids a race when page->mainFrame() is null still. 1294 const uint64_t mainFrameID = 0; 1295 page->process().sendWithAsyncReply(Messages::WebAutomationSessionProxy::DeleteCookie(page->pageID(), mainFrameID, cookieName), WTFMove(completionHandler)); 1300 page->process().sendWithAsyncReply(Messages::WebAutomationSessionProxy::DeleteCookie(page->pageID(), WTF::nullopt, cookieName), WTFMove(completionHandler)); 1296 1301 } 1297 1302 … … 1458 1463 1459 1464 // MARK: SimulatedInputDispatcher::Client API 1460 void WebAutomationSession::viewportInViewCenterPointOfElement(WebPageProxy& page, uint64_tframeID, const String& nodeHandle, Function<void (Optional<WebCore::IntPoint>, Optional<AutomationCommandError>)>&& completionHandler)1465 void WebAutomationSession::viewportInViewCenterPointOfElement(WebPageProxy& page, FrameIdentifier frameID, const String& nodeHandle, Function<void (Optional<WebCore::IntPoint>, Optional<AutomationCommandError>)>&& completionHandler) 1461 1466 { 1462 1467 WTF::CompletionHandler<void(Optional<String>, WebCore::IntRect, Optional<WebCore::IntPoint>, bool)> didComputeElementLayoutHandler = [completionHandler = WTFMove(completionHandler)](Optional<String> errorType, WebCore::IntRect, Optional<WebCore::IntPoint> inViewCenterPoint, bool) mutable { … … 1779 1784 ASYNC_FAIL_WITH_PREDEFINED_ERROR(WindowNotFound); 1780 1785 1781 auto frameID = webFrameIDForHandle(optionalFrameHandle ? *optionalFrameHandle : emptyString()); 1782 if (!frameID) 1786 bool frameNotFound = false; 1787 auto frameID = webFrameIDForHandle(optionalFrameHandle ? *optionalFrameHandle : emptyString(), frameNotFound); 1788 if (frameNotFound) 1783 1789 ASYNC_FAIL_WITH_PREDEFINED_ERROR(FrameNotFound); 1784 1790 … … 1954 1960 ASYNC_FAIL_WITH_PREDEFINED_ERROR(WindowNotFound); 1955 1961 1956 auto frameID = webFrameIDForHandle(optionalFrameHandle ? *optionalFrameHandle : emptyString()); 1957 if (!frameID) 1962 bool frameNotFound = false; 1963 auto frameID = webFrameIDForHandle(optionalFrameHandle ? *optionalFrameHandle : emptyString(), frameNotFound); 1964 if (frameNotFound) 1958 1965 ASYNC_FAIL_WITH_PREDEFINED_ERROR(FrameNotFound); 1959 1966 … … 1977 1984 ASYNC_FAIL_WITH_PREDEFINED_ERROR(WindowNotFound); 1978 1985 1979 Optional<uint64_t> frameID = webFrameIDForHandle(optionalFrameHandle ? *optionalFrameHandle : emptyString()); 1980 if (!frameID) 1986 bool frameNotFound = false; 1987 auto frameID = webFrameIDForHandle(optionalFrameHandle ? *optionalFrameHandle : emptyString(), frameNotFound); 1988 if (frameNotFound) 1981 1989 ASYNC_FAIL_WITH_PREDEFINED_ERROR(FrameNotFound); 1982 1990 … … 1988 1996 m_screenshotCallbacks.set(callbackID, WTFMove(callback)); 1989 1997 1990 page->process().send(Messages::WebAutomationSessionProxy::TakeScreenshot(page->pageID(), frameID .value(), nodeHandle, scrollIntoViewIfNeeded, clipToViewport, callbackID), 0);1998 page->process().send(Messages::WebAutomationSessionProxy::TakeScreenshot(page->pageID(), frameID, nodeHandle, scrollIntoViewIfNeeded, clipToViewport, callbackID), 0); 1991 1999 } 1992 2000 -
trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.h
r248696 r248713 35 35 #include "SimulatedInputDispatcher.h" 36 36 #include "WebEvent.h" 37 #include <WebCore/FrameIdentifier.h> 37 38 #include <WebCore/PageIdentifier.h> 38 39 #include <wtf/CompletionHandler.h> … … 153 154 void simulateKeyboardInteraction(WebPageProxy&, KeyboardInteraction, WTF::Variant<VirtualKey, CharKey>&&, AutomationCompletionHandler&&) final; 154 155 #endif 155 void viewportInViewCenterPointOfElement(WebPageProxy&, uint64_t frameID, const String& nodeHandle, Function<void (Optional<WebCore::IntPoint>, Optional<AutomationCommandError>)>&&) final;156 void viewportInViewCenterPointOfElement(WebPageProxy&, WebCore::FrameIdentifier, const String& nodeHandle, Function<void (Optional<WebCore::IntPoint>, Optional<AutomationCommandError>)>&&) final; 156 157 157 158 #endif // ENABLE(WEBDRIVER_ACTIONS_API) … … 221 222 void getNextContext(Ref<WebAutomationSession>&&, Vector<Ref<WebPageProxy>>&&, Ref<JSON::ArrayOf<Inspector::Protocol::Automation::BrowsingContext>>, Ref<WebAutomationSession::GetBrowsingContextsCallback>&&); 222 223 223 Optional< uint64_t> webFrameIDForHandle(const String&);224 String handleForWebFrameID( uint64_t frameID);224 Optional<WebCore::FrameIdentifier> webFrameIDForHandle(const String&, bool& frameNotFound); 225 String handleForWebFrameID(Optional<WebCore::FrameIdentifier>); 225 226 String handleForWebFrameProxy(const WebFrameProxy&); 226 227 … … 228 229 void waitForNavigationToCompleteOnFrame(WebFrameProxy&, Inspector::Protocol::Automation::PageLoadStrategy, Seconds, Ref<Inspector::BackendDispatcher::CallbackBase>&&); 229 230 void respondToPendingPageNavigationCallbacksWithTimeout(HashMap<WebCore::PageIdentifier, RefPtr<Inspector::BackendDispatcher::CallbackBase>>&); 230 void respondToPendingFrameNavigationCallbacksWithTimeout(HashMap< uint64_t, RefPtr<Inspector::BackendDispatcher::CallbackBase>>&);231 void respondToPendingFrameNavigationCallbacksWithTimeout(HashMap<WebCore::FrameIdentifier, RefPtr<Inspector::BackendDispatcher::CallbackBase>>&); 231 232 void loadTimerFired(); 232 233 … … 285 286 HashMap<String, WebCore::PageIdentifier> m_handleWebPageMap; 286 287 287 HashMap< uint64_t, String> m_webFrameHandleMap;288 HashMap<String, uint64_t> m_handleWebFrameMap;288 HashMap<WebCore::FrameIdentifier, String> m_webFrameHandleMap; 289 HashMap<String, WebCore::FrameIdentifier> m_handleWebFrameMap; 289 290 290 291 HashMap<WebCore::PageIdentifier, RefPtr<Inspector::BackendDispatcher::CallbackBase>> m_pendingNormalNavigationInBrowsingContextCallbacksPerPage; 291 292 HashMap<WebCore::PageIdentifier, RefPtr<Inspector::BackendDispatcher::CallbackBase>> m_pendingEagerNavigationInBrowsingContextCallbacksPerPage; 292 HashMap< uint64_t, RefPtr<Inspector::BackendDispatcher::CallbackBase>> m_pendingNormalNavigationInBrowsingContextCallbacksPerFrame;293 HashMap< uint64_t, RefPtr<Inspector::BackendDispatcher::CallbackBase>> m_pendingEagerNavigationInBrowsingContextCallbacksPerFrame;293 HashMap<WebCore::FrameIdentifier, RefPtr<Inspector::BackendDispatcher::CallbackBase>> m_pendingNormalNavigationInBrowsingContextCallbacksPerFrame; 294 HashMap<WebCore::FrameIdentifier, RefPtr<Inspector::BackendDispatcher::CallbackBase>> m_pendingEagerNavigationInBrowsingContextCallbacksPerFrame; 294 295 HashMap<WebCore::PageIdentifier, RefPtr<Inspector::BackendDispatcher::CallbackBase>> m_pendingInspectorCallbacksPerPage; 295 296 #if ENABLE(WEBDRIVER_KEYBOARD_INTERACTIONS) -
trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
r244704 r248713 1033 1033 URL mainFrameURL { URL(), mainFrame->url() }; 1034 1034 1035 [(id <WKUIDelegatePrivate>)delegate _webView:m_uiDelegate.m_webView checkUserMediaPermissionForURL:requestFrameURL mainFrameURL:mainFrameURL frameIdentifier:frame.frameID() decisionHandler:decisionHandler.get()];1035 [(id <WKUIDelegatePrivate>)delegate _webView:m_uiDelegate.m_webView checkUserMediaPermissionForURL:requestFrameURL mainFrameURL:mainFrameURL frameIdentifier:frame.frameID().toUInt64() decisionHandler:decisionHandler.get()]; 1036 1036 } 1037 1037 -
trunk/Source/WebKit/UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.mm
r242339 r248713 33 33 #import "WebPageProxy.h" 34 34 #import "WebProcessProxy.h" 35 #import <WebCore/FrameIdentifier.h> 35 36 #import <wtf/RetainPtr.h> 36 37 #import <wtf/WeakObjCPtr.h> … … 63 64 return NO; 64 65 65 uint64_t frameID = [_frameHandle _frameID]; 66 WebKit::WebFrameProxy* webFrameProxy = webView->_page->process().webFrame(frameID); 66 WebKit::WebFrameProxy* webFrameProxy = webView->_page->process().webFrame(WebCore::frameIdentifierFromID([_frameHandle _frameID])); 67 67 if (!webFrameProxy) 68 68 return NO; -
trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
r247755 r248713 102 102 103 103 #if ENABLE(CONTENT_FILTERING) 104 void WebPageProxy::contentFilterDidBlockLoadForFrame(const WebCore::ContentFilterUnblockHandler& unblockHandler, uint64_tframeID)104 void WebPageProxy::contentFilterDidBlockLoadForFrame(const WebCore::ContentFilterUnblockHandler& unblockHandler, FrameIdentifier frameID) 105 105 { 106 106 contentFilterDidBlockLoadForFrameShared(m_process.copyRef(), unblockHandler, frameID); 107 107 } 108 108 109 void WebPageProxy::contentFilterDidBlockLoadForFrameShared(Ref<WebProcessProxy>&& process, const WebCore::ContentFilterUnblockHandler& unblockHandler, uint64_tframeID)109 void WebPageProxy::contentFilterDidBlockLoadForFrameShared(Ref<WebProcessProxy>&& process, const WebCore::ContentFilterUnblockHandler& unblockHandler, FrameIdentifier frameID) 110 110 { 111 111 if (WebFrameProxy* frame = process->webFrame(frameID)) -
trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp
r248640 r248713 313 313 } 314 314 315 void NetworkProcessProxy::didReceiveAuthenticationChallenge(PageIdentifier pageID, uint64_tframeID, WebCore::AuthenticationChallenge&& coreChallenge, uint64_t challengeID)315 void NetworkProcessProxy::didReceiveAuthenticationChallenge(PageIdentifier pageID, FrameIdentifier frameID, WebCore::AuthenticationChallenge&& coreChallenge, uint64_t challengeID) 316 316 { 317 317 #if ENABLE(SERVICE_WORKER) … … 738 738 } 739 739 740 void NetworkProcessProxy::requestStorageAccessConfirm(PageIdentifier pageID, uint64_tframeID, const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, CompletionHandler<void(bool)>&& completionHandler)740 void NetworkProcessProxy::requestStorageAccessConfirm(PageIdentifier pageID, FrameIdentifier frameID, const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, CompletionHandler<void(bool)>&& completionHandler) 741 741 { 742 742 WebPageProxy* page = WebProcessProxy::webPage(pageID); -
trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h
r248640 r248713 83 83 using DomainInNeedOfStorageAccess = WebCore::RegistrableDomain; 84 84 using OpenerDomain = WebCore::RegistrableDomain; 85 using FrameID = uint64_t;86 85 87 86 explicit NetworkProcessProxy(WebProcessPool&); … … 131 130 void setVeryPrevalentResource(PAL::SessionID, const RegistrableDomain&, CompletionHandler<void()>&&); 132 131 void getAllStorageAccessEntries(PAL::SessionID, CompletionHandler<void(Vector<String> domains)>&&); 133 void requestStorageAccessConfirm(WebCore::PageIdentifier, FrameID, const SubFrameDomain&, const TopFrameDomain&, CompletionHandler<void(bool)>&&);132 void requestStorageAccessConfirm(WebCore::PageIdentifier, WebCore::FrameIdentifier, const SubFrameDomain&, const TopFrameDomain&, CompletionHandler<void(bool)>&&); 134 133 void resetParametersToDefaultValues(PAL::SessionID, CompletionHandler<void()>&&); 135 134 void scheduleClearInMemoryAndPersistent(PAL::SessionID, ShouldGrandfatherStatistics, CompletionHandler<void()>&&); … … 214 213 void didReceiveNetworkProcessProxyMessage(IPC::Connection&, IPC::Decoder&); 215 214 void didCreateNetworkConnectionToWebProcess(const IPC::Attachment&); 216 void didReceiveAuthenticationChallenge(WebCore::PageIdentifier, uint64_t frameID, WebCore::AuthenticationChallenge&&, uint64_t challengeID);215 void didReceiveAuthenticationChallenge(WebCore::PageIdentifier, WebCore::FrameIdentifier, WebCore::AuthenticationChallenge&&, uint64_t challengeID); 217 216 void didFetchWebsiteData(uint64_t callbackID, const WebsiteData&); 218 217 void didDeleteWebsiteData(uint64_t callbackID); -
trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in
r247822 r248713 24 24 DidCreateNetworkConnectionToWebProcess(IPC::Attachment connectionIdentifier) 25 25 26 DidReceiveAuthenticationChallenge(WebCore::PageIdentifier pageID, uint64_tframeID, WebCore::AuthenticationChallenge challenge, uint64_t challengeID)26 DidReceiveAuthenticationChallenge(WebCore::PageIdentifier pageID, WebCore::FrameIdentifier frameID, WebCore::AuthenticationChallenge challenge, uint64_t challengeID) 27 27 28 28 DidFetchWebsiteData(uint64_t callbackID, struct WebKit::WebsiteData websiteData) … … 49 49 NotifyWebsiteDataScanForRegistrableDomainsFinished() 50 50 NotifyResourceLoadStatisticsTelemetryFinished(unsigned totalPrevalentResources, unsigned totalPrevalentResourcesWithUserInteraction, unsigned top3SubframeUnderTopFrameOrigins) 51 RequestStorageAccessConfirm(WebCore::PageIdentifier pageID, uint64_tframeID, WebCore::RegistrableDomain subFrameDomain, WebCore::RegistrableDomain topFrameDomain) -> (bool userDidGrantAccess) Async51 RequestStorageAccessConfirm(WebCore::PageIdentifier pageID, WebCore::FrameIdentifier frameID, WebCore::RegistrableDomain subFrameDomain, WebCore::RegistrableDomain topFrameDomain) -> (bool userDidGrantAccess) Async 52 52 DeleteWebsiteDataInUIProcessForRegistrableDomains(PAL::SessionID sessionID, OptionSet<WebKit::WebsiteDataType> dataTypes, OptionSet<WebKit::WebsiteDataFetchOption> fetchOptions, Vector<WebCore::RegistrableDomain> domains) -> (HashSet<WebCore::RegistrableDomain> domainsWithMatchingDataRecords) Async 53 53 DidCommitCrossSiteLoadWithDataTransferFromPrevalentResource(WebCore::PageIdentifier pageID) -
trunk/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
r248598 r248713 177 177 } 178 178 179 inline bool ProvisionalPageProxy::validateInput( uint64_tframeID, const Optional<uint64_t>& navigationID)179 inline bool ProvisionalPageProxy::validateInput(FrameIdentifier frameID, const Optional<uint64_t>& navigationID) 180 180 { 181 181 // If the previous provisional load used an existing process, we may receive leftover IPC for a previous navigation, which we need to ignore. … … 186 186 } 187 187 188 void ProvisionalPageProxy::didCreateMainFrame( uint64_tframeID)189 { 190 RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "didCreateMainFrame: pageID = %" PRIu64 ", frameID = %" PRIu64, m_page.pageID().toUInt64(), frameID );188 void ProvisionalPageProxy::didCreateMainFrame(FrameIdentifier frameID) 189 { 190 RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "didCreateMainFrame: pageID = %" PRIu64 ", frameID = %" PRIu64, m_page.pageID().toUInt64(), frameID.toUInt64()); 191 191 ASSERT(!m_mainFrame); 192 192 … … 213 213 } 214 214 215 void ProvisionalPageProxy::didPerformClientRedirect(const String& sourceURLString, const String& destinationURLString, uint64_tframeID)215 void ProvisionalPageProxy::didPerformClientRedirect(const String& sourceURLString, const String& destinationURLString, FrameIdentifier frameID) 216 216 { 217 217 if (!validateInput(frameID)) … … 221 221 } 222 222 223 void ProvisionalPageProxy::didStartProvisionalLoadForFrame( uint64_tframeID, uint64_t navigationID, URL&& url, URL&& unreachableURL, const UserData& userData)224 { 225 if (!validateInput(frameID, navigationID)) 226 return; 227 228 RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "didStartProvisionalLoadForFrame: pageID = %" PRIu64 ", frameID = %" PRIu64 ", navigationID = %" PRIu64, m_page.pageID().toUInt64(), frameID , navigationID);223 void ProvisionalPageProxy::didStartProvisionalLoadForFrame(FrameIdentifier frameID, uint64_t navigationID, URL&& url, URL&& unreachableURL, const UserData& userData) 224 { 225 if (!validateInput(frameID, navigationID)) 226 return; 227 228 RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "didStartProvisionalLoadForFrame: pageID = %" PRIu64 ", frameID = %" PRIu64 ", navigationID = %" PRIu64, m_page.pageID().toUInt64(), frameID.toUInt64(), navigationID); 229 229 ASSERT(m_provisionalLoadURL.isNull()); 230 230 m_provisionalLoadURL = url; … … 241 241 } 242 242 243 void ProvisionalPageProxy::didFailProvisionalLoadForFrame( uint64_tframeID, const WebCore::SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const String& provisionalURL, const WebCore::ResourceError& error, WebCore::WillContinueLoading willContinueLoading, const UserData& userData)244 { 245 if (!validateInput(frameID, navigationID)) 246 return; 247 248 RELEASE_LOG_ERROR_IF_ALLOWED(ProcessSwapping, "didFailProvisionalLoadForFrame: pageID = %" PRIu64 ", frameID = %" PRIu64 ", navigationID = %" PRIu64, m_page.pageID().toUInt64(), frameID , navigationID);243 void ProvisionalPageProxy::didFailProvisionalLoadForFrame(FrameIdentifier frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const String& provisionalURL, const WebCore::ResourceError& error, WebCore::WillContinueLoading willContinueLoading, const UserData& userData) 244 { 245 if (!validateInput(frameID, navigationID)) 246 return; 247 248 RELEASE_LOG_ERROR_IF_ALLOWED(ProcessSwapping, "didFailProvisionalLoadForFrame: pageID = %" PRIu64 ", frameID = %" PRIu64 ", navigationID = %" PRIu64, m_page.pageID().toUInt64(), frameID.toUInt64(), navigationID); 249 249 ASSERT(!m_provisionalLoadURL.isNull()); 250 250 m_provisionalLoadURL = { }; … … 257 257 } 258 258 259 void ProvisionalPageProxy::didCommitLoadForFrame( uint64_tframeID, uint64_t navigationID, const String& mimeType, bool frameHasCustomContentProvider, uint32_t frameLoadType, const WebCore::CertificateInfo& certificateInfo, bool containsPluginDocument, Optional<WebCore::HasInsecureContent> forcedHasInsecureContent, const UserData& userData)260 { 261 if (!validateInput(frameID, navigationID)) 262 return; 263 264 RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "didCommitLoadForFrame: pageID = %" PRIu64 ", frameID = %" PRIu64 ", navigationID = %" PRIu64, m_page.pageID().toUInt64(), frameID , navigationID);259 void ProvisionalPageProxy::didCommitLoadForFrame(FrameIdentifier frameID, uint64_t navigationID, const String& mimeType, bool frameHasCustomContentProvider, uint32_t frameLoadType, const WebCore::CertificateInfo& certificateInfo, bool containsPluginDocument, Optional<WebCore::HasInsecureContent> forcedHasInsecureContent, const UserData& userData) 260 { 261 if (!validateInput(frameID, navigationID)) 262 return; 263 264 RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "didCommitLoadForFrame: pageID = %" PRIu64 ", frameID = %" PRIu64 ", navigationID = %" PRIu64, m_page.pageID().toUInt64(), frameID.toUInt64(), navigationID); 265 265 m_provisionalLoadURL = { }; 266 266 m_process->removeMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_page.pageID()); … … 270 270 } 271 271 272 void ProvisionalPageProxy::didNavigateWithNavigationData(const WebNavigationDataStore& store, uint64_tframeID)272 void ProvisionalPageProxy::didNavigateWithNavigationData(const WebNavigationDataStore& store, FrameIdentifier frameID) 273 273 { 274 274 if (!validateInput(frameID)) … … 278 278 } 279 279 280 void ProvisionalPageProxy::didChangeProvisionalURLForFrame( uint64_tframeID, uint64_t navigationID, URL&& url)280 void ProvisionalPageProxy::didChangeProvisionalURLForFrame(FrameIdentifier frameID, uint64_t navigationID, URL&& url) 281 281 { 282 282 if (!validateInput(frameID, navigationID)) … … 286 286 } 287 287 288 void ProvisionalPageProxy::decidePolicyForNavigationActionAsync( uint64_tframeID, WebCore::SecurityOriginData&& frameSecurityOrigin, WebCore::PolicyCheckIdentifier identifier,288 void ProvisionalPageProxy::decidePolicyForNavigationActionAsync(FrameIdentifier frameID, WebCore::SecurityOriginData&& frameSecurityOrigin, WebCore::PolicyCheckIdentifier identifier, 289 289 uint64_t navigationID, NavigationActionData&& navigationActionData, FrameInfoData&& frameInfoData, Optional<PageIdentifier> originatingPageID, const WebCore::ResourceRequest& originalRequest, 290 290 WebCore::ResourceRequest&& request, IPC::FormDataReference&& requestBody, WebCore::ResourceResponse&& redirectResponse, const UserData& userData, uint64_t listenerID) … … 297 297 } 298 298 299 void ProvisionalPageProxy::decidePolicyForResponse( uint64_tframeID, const WebCore::SecurityOriginData& frameSecurityOrigin, WebCore::PolicyCheckIdentifier identifier,299 void ProvisionalPageProxy::decidePolicyForResponse(FrameIdentifier frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, WebCore::PolicyCheckIdentifier identifier, 300 300 uint64_t navigationID, const WebCore::ResourceResponse& response, const WebCore::ResourceRequest& request, bool canShowMIMEType, const String& downloadAttribute, uint64_t listenerID, const UserData& userData) 301 301 { … … 306 306 } 307 307 308 void ProvisionalPageProxy::didPerformServerRedirect(const String& sourceURLString, const String& destinationURLString, uint64_tframeID)308 void ProvisionalPageProxy::didPerformServerRedirect(const String& sourceURLString, const String& destinationURLString, FrameIdentifier frameID) 309 309 { 310 310 if (!validateInput(frameID)) … … 314 314 } 315 315 316 void ProvisionalPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame( uint64_tframeID, uint64_t navigationID, WebCore::ResourceRequest&& request, const UserData& userData)316 void ProvisionalPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame(FrameIdentifier frameID, uint64_t navigationID, WebCore::ResourceRequest&& request, const UserData& userData) 317 317 { 318 318 if (!validateInput(frameID, navigationID)) … … 332 332 } 333 333 334 void ProvisionalPageProxy::decidePolicyForNavigationActionSync( uint64_tframeID, bool isMainFrame, WebCore::SecurityOriginData&& frameSecurityOrigin, WebCore::PolicyCheckIdentifier identifier,334 void ProvisionalPageProxy::decidePolicyForNavigationActionSync(FrameIdentifier frameID, bool isMainFrame, WebCore::SecurityOriginData&& frameSecurityOrigin, WebCore::PolicyCheckIdentifier identifier, 335 335 uint64_t navigationID, NavigationActionData&& navigationActionData, FrameInfoData&& frameInfoData, Optional<PageIdentifier> originatingPageID, 336 336 const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&& request, IPC::FormDataReference&& requestBody, WebCore::ResourceResponse&& redirectResponse, … … 367 367 368 368 #if ENABLE(CONTENT_FILTERING) 369 void ProvisionalPageProxy::contentFilterDidBlockLoadForFrame(const WebCore::ContentFilterUnblockHandler& unblockHandler, uint64_tframeID)369 void ProvisionalPageProxy::contentFilterDidBlockLoadForFrame(const WebCore::ContentFilterUnblockHandler& unblockHandler, FrameIdentifier frameID) 370 370 { 371 371 m_page.contentFilterDidBlockLoadForFrameShared(m_process.copyRef(), unblockHandler, frameID); -
trunk/Source/WebKit/UIProcess/ProvisionalPageProxy.h
r247146 r248713 93 93 void didReceiveSyncMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&) final; 94 94 95 void decidePolicyForNavigationActionAsync( uint64_t frameID, WebCore::SecurityOriginData&&, WebCore::PolicyCheckIdentifier, uint64_t navigationID, NavigationActionData&&, FrameInfoData&&,95 void decidePolicyForNavigationActionAsync(WebCore::FrameIdentifier, WebCore::SecurityOriginData&&, WebCore::PolicyCheckIdentifier, uint64_t navigationID, NavigationActionData&&, FrameInfoData&&, 96 96 Optional<WebCore::PageIdentifier> originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, IPC::FormDataReference&& requestBody, 97 97 WebCore::ResourceResponse&& redirectResponse, const UserData&, uint64_t listenerID); 98 void decidePolicyForResponse( uint64_t frameID, const WebCore::SecurityOriginData&, WebCore::PolicyCheckIdentifier, uint64_t navigationID, const WebCore::ResourceResponse&,98 void decidePolicyForResponse(WebCore::FrameIdentifier, const WebCore::SecurityOriginData&, WebCore::PolicyCheckIdentifier, uint64_t navigationID, const WebCore::ResourceResponse&, 99 99 const WebCore::ResourceRequest&, bool canShowMIMEType, const String& downloadAttribute, uint64_t listenerID, const UserData&); 100 void didChangeProvisionalURLForFrame( uint64_t frameID, uint64_t navigationID, URL&&);101 void didPerformServerRedirect(const String& sourceURLString, const String& destinationURLString, uint64_t frameID);102 void didReceiveServerRedirectForProvisionalLoadForFrame( uint64_t frameID, uint64_t navigationID, WebCore::ResourceRequest&&, const UserData&);103 void didNavigateWithNavigationData(const WebNavigationDataStore&, uint64_t frameID);104 void didPerformClientRedirect(const String& sourceURLString, const String& destinationURLString, uint64_t frameID);105 void didCreateMainFrame( uint64_t frameID);106 void didStartProvisionalLoadForFrame( uint64_t frameID, uint64_t navigationID, URL&&, URL&& unreachableURL, const UserData&);107 void didCommitLoadForFrame( uint64_t frameID, uint64_t navigationID, const String& mimeType, bool frameHasCustomContentProvider, uint32_t frameLoadType, const WebCore::CertificateInfo&, bool containsPluginDocument, Optional<WebCore::HasInsecureContent> forcedHasInsecureContent, const UserData&);108 void didFailProvisionalLoadForFrame( uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const String& provisionalURL, const WebCore::ResourceError&, WebCore::WillContinueLoading, const UserData&);100 void didChangeProvisionalURLForFrame(WebCore::FrameIdentifier, uint64_t navigationID, URL&&); 101 void didPerformServerRedirect(const String& sourceURLString, const String& destinationURLString, WebCore::FrameIdentifier); 102 void didReceiveServerRedirectForProvisionalLoadForFrame(WebCore::FrameIdentifier, uint64_t navigationID, WebCore::ResourceRequest&&, const UserData&); 103 void didNavigateWithNavigationData(const WebNavigationDataStore&, WebCore::FrameIdentifier); 104 void didPerformClientRedirect(const String& sourceURLString, const String& destinationURLString, WebCore::FrameIdentifier); 105 void didCreateMainFrame(WebCore::FrameIdentifier); 106 void didStartProvisionalLoadForFrame(WebCore::FrameIdentifier, uint64_t navigationID, URL&&, URL&& unreachableURL, const UserData&); 107 void didCommitLoadForFrame(WebCore::FrameIdentifier, uint64_t navigationID, const String& mimeType, bool frameHasCustomContentProvider, uint32_t frameLoadType, const WebCore::CertificateInfo&, bool containsPluginDocument, Optional<WebCore::HasInsecureContent> forcedHasInsecureContent, const UserData&); 108 void didFailProvisionalLoadForFrame(WebCore::FrameIdentifier, const WebCore::SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const String& provisionalURL, const WebCore::ResourceError&, WebCore::WillContinueLoading, const UserData&); 109 109 void startURLSchemeTask(URLSchemeTaskParameters&&); 110 110 void backForwardGoToItem(const WebCore::BackForwardItemIdentifier&, CompletionHandler<void(SandboxExtension::Handle&&)>&&); 111 void decidePolicyForNavigationActionSync( uint64_t frameID, bool isMainFrame, WebCore::SecurityOriginData&&, WebCore::PolicyCheckIdentifier, uint64_t navigationID, NavigationActionData&&,111 void decidePolicyForNavigationActionSync(WebCore::FrameIdentifier, bool isMainFrame, WebCore::SecurityOriginData&&, WebCore::PolicyCheckIdentifier, uint64_t navigationID, NavigationActionData&&, 112 112 FrameInfoData&&, Optional<WebCore::PageIdentifier> originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, IPC::FormDataReference&& requestBody, 113 113 WebCore::ResourceResponse&& redirectResponse, const UserData&, Messages::WebPageProxy::DecidePolicyForNavigationActionSync::DelayedReply&&); … … 119 119 #endif 120 120 #if ENABLE(CONTENT_FILTERING) 121 void contentFilterDidBlockLoadForFrame(const WebCore::ContentFilterUnblockHandler&, uint64_t frameID);121 void contentFilterDidBlockLoadForFrame(const WebCore::ContentFilterUnblockHandler&, WebCore::FrameIdentifier); 122 122 #endif 123 123 124 124 void initializeWebPage(); 125 bool validateInput( uint64_t frameID, const Optional<uint64_t>& navigationID = WTF::nullopt);125 bool validateInput(WebCore::FrameIdentifier, const Optional<uint64_t>& navigationID = WTF::nullopt); 126 126 127 127 WebPageProxy& m_page; -
trunk/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp
r245796 r248713 91 91 } 92 92 93 void ServiceWorkerProcessProxy::didReceiveAuthenticationChallenge(PageIdentifier pageID, uint64_tframeID, Ref<AuthenticationChallengeProxy>&& challenge)93 void ServiceWorkerProcessProxy::didReceiveAuthenticationChallenge(PageIdentifier pageID, FrameIdentifier frameID, Ref<AuthenticationChallengeProxy>&& challenge) 94 94 { 95 95 UNUSED_PARAM(pageID); -
trunk/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.h
r245796 r248713 42 42 static bool hasRegisteredServiceWorkers(const String& serviceWorkerDirectory); 43 43 44 void didReceiveAuthenticationChallenge(WebCore::PageIdentifier, uint64_t frameID, Ref<AuthenticationChallengeProxy>&&);44 void didReceiveAuthenticationChallenge(WebCore::PageIdentifier, WebCore::FrameIdentifier, Ref<AuthenticationChallengeProxy>&&); 45 45 46 46 void start(const WebPreferencesStore&, Optional<PAL::SessionID> initialSessionID); -
trunk/Source/WebKit/UIProcess/SuspendedPageProxy.cpp
r245796 r248713 79 79 #endif 80 80 81 SuspendedPageProxy::SuspendedPageProxy(WebPageProxy& page, Ref<WebProcessProxy>&& process, uint64_tmainFrameID, ShouldDelayClosingUntilEnteringAcceleratedCompositingMode shouldDelayClosingUntilEnteringAcceleratedCompositingMode)81 SuspendedPageProxy::SuspendedPageProxy(WebPageProxy& page, Ref<WebProcessProxy>&& process, FrameIdentifier mainFrameID, ShouldDelayClosingUntilEnteringAcceleratedCompositingMode shouldDelayClosingUntilEnteringAcceleratedCompositingMode) 82 82 : m_page(page) 83 83 , m_process(WTFMove(process)) -
trunk/Source/WebKit/UIProcess/SuspendedPageProxy.h
r245601 r248713 30 30 #include "WebBackForwardListItem.h" 31 31 #include "WebPageProxyMessages.h" 32 #include <WebCore/FrameIdentifier.h> 32 33 #include <wtf/RefCounted.h> 33 34 #include <wtf/WeakPtr.h> … … 43 44 WTF_MAKE_FAST_ALLOCATED; 44 45 public: 45 SuspendedPageProxy(WebPageProxy&, Ref<WebProcessProxy>&&, uint64_tmainFrameID, ShouldDelayClosingUntilEnteringAcceleratedCompositingMode);46 SuspendedPageProxy(WebPageProxy&, Ref<WebProcessProxy>&&, WebCore::FrameIdentifier mainFrameID, ShouldDelayClosingUntilEnteringAcceleratedCompositingMode); 46 47 ~SuspendedPageProxy(); 47 48 48 49 WebPageProxy& page() const { return m_page; } 49 50 WebProcessProxy& process() { return m_process.get(); } 50 uint64_tmainFrameID() const { return m_mainFrameID; }51 WebCore::FrameIdentifier mainFrameID() const { return m_mainFrameID; } 51 52 52 53 bool pageIsClosedOrClosing() const; … … 75 76 WebPageProxy& m_page; 76 77 Ref<WebProcessProxy> m_process; 77 uint64_tm_mainFrameID;78 WebCore::FrameIdentifier m_mainFrameID; 78 79 bool m_isClosed { false }; 79 80 ShouldDelayClosingUntilEnteringAcceleratedCompositingMode m_shouldDelayClosingUntilEnteringAcceleratedCompositingMode { ShouldDelayClosingUntilEnteringAcceleratedCompositingMode::No }; -
trunk/Source/WebKit/UIProcess/UserMediaPermissionCheckProxy.cpp
r246185 r248713 34 34 using namespace WebCore; 35 35 36 UserMediaPermissionCheckProxy::UserMediaPermissionCheckProxy( uint64_tframeID, CompletionHandler&& handler, Ref<WebCore::SecurityOrigin>&& userMediaDocumentOrigin, Ref<WebCore::SecurityOrigin>&& topLevelDocumentOrigin)36 UserMediaPermissionCheckProxy::UserMediaPermissionCheckProxy(FrameIdentifier frameID, CompletionHandler&& handler, Ref<WebCore::SecurityOrigin>&& userMediaDocumentOrigin, Ref<WebCore::SecurityOrigin>&& topLevelDocumentOrigin) 37 37 : m_frameID(frameID) 38 38 , m_completionHandler(WTFMove(handler)) -
trunk/Source/WebKit/UIProcess/UserMediaPermissionCheckProxy.h
r246185 r248713 27 27 28 28 #include "APIObject.h" 29 #include <WebCore/FrameIdentifier.h> 29 30 #include <WebCore/MediaConstraints.h> 30 31 #include <wtf/CompletionHandler.h> … … 42 43 using CompletionHandler = WTF::CompletionHandler<void(PermissionInfo)>; 43 44 44 static Ref<UserMediaPermissionCheckProxy> create( uint64_tframeID, CompletionHandler&& handler, Ref<WebCore::SecurityOrigin>&& userMediaDocumentOrigin, Ref<WebCore::SecurityOrigin>&& topLevelDocumentOrigin)45 static Ref<UserMediaPermissionCheckProxy> create(WebCore::FrameIdentifier frameID, CompletionHandler&& handler, Ref<WebCore::SecurityOrigin>&& userMediaDocumentOrigin, Ref<WebCore::SecurityOrigin>&& topLevelDocumentOrigin) 45 46 { 46 47 return adoptRef(*new UserMediaPermissionCheckProxy(frameID, WTFMove(handler), WTFMove(userMediaDocumentOrigin), WTFMove(topLevelDocumentOrigin))); … … 51 52 void invalidate() { complete(PermissionInfo::Error); } 52 53 53 uint64_tframeID() const { return m_frameID; }54 WebCore::FrameIdentifier frameID() const { return m_frameID; } 54 55 WebCore::SecurityOrigin& userMediaDocumentSecurityOrigin() { return m_userMediaDocumentSecurityOrigin.get(); } 55 56 WebCore::SecurityOrigin& topLevelDocumentSecurityOrigin() { return m_topLevelDocumentSecurityOrigin.get(); } 56 57 57 58 private: 58 UserMediaPermissionCheckProxy( uint64_t frameID, CompletionHandler&&, Ref<WebCore::SecurityOrigin>&& userMediaDocumentOrigin, Ref<WebCore::SecurityOrigin>&& topLevelDocumentOrigin);59 UserMediaPermissionCheckProxy(WebCore::FrameIdentifier, CompletionHandler&&, Ref<WebCore::SecurityOrigin>&& userMediaDocumentOrigin, Ref<WebCore::SecurityOrigin>&& topLevelDocumentOrigin); 59 60 ~UserMediaPermissionCheckProxy(); 60 61 61 62 void complete(PermissionInfo); 62 63 63 uint64_tm_frameID;64 WebCore::FrameIdentifier m_frameID; 64 65 CompletionHandler m_completionHandler; 65 66 Ref<WebCore::SecurityOrigin> m_userMediaDocumentSecurityOrigin; -
trunk/Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp
r248104 r248713 241 241 } 242 242 243 void UserMediaPermissionRequestManagerProxy::resetAccess( uint64_tframeID)244 { 245 ALWAYS_LOG(LOGIDENTIFIER, frameID );243 void UserMediaPermissionRequestManagerProxy::resetAccess(FrameIdentifier frameID) 244 { 245 ALWAYS_LOG(LOGIDENTIFIER, frameID.loggingString()); 246 246 m_grantedRequests.removeAllMatching([frameID](const auto& grantedRequest) { 247 247 return grantedRequest->mainFrameID() == frameID; … … 252 252 } 253 253 254 const UserMediaPermissionRequestProxy* UserMediaPermissionRequestManagerProxy::searchForGrantedRequest( uint64_tframeID, const SecurityOrigin& userMediaDocumentOrigin, const SecurityOrigin& topLevelDocumentOrigin, bool needsAudio, bool needsVideo) const254 const UserMediaPermissionRequestProxy* UserMediaPermissionRequestManagerProxy::searchForGrantedRequest(FrameIdentifier frameID, const SecurityOrigin& userMediaDocumentOrigin, const SecurityOrigin& topLevelDocumentOrigin, bool needsAudio, bool needsVideo) const 255 255 { 256 256 if (m_page.isMediaStreamCaptureMuted()) … … 283 283 } 284 284 285 bool UserMediaPermissionRequestManagerProxy::wasRequestDenied( uint64_tmainFrameID, const SecurityOrigin& userMediaDocumentOrigin, const SecurityOrigin& topLevelDocumentOrigin, bool needsAudio, bool needsVideo, bool needsScreenCapture)285 bool UserMediaPermissionRequestManagerProxy::wasRequestDenied(FrameIdentifier mainFrameID, const SecurityOrigin& userMediaDocumentOrigin, const SecurityOrigin& topLevelDocumentOrigin, bool needsAudio, bool needsVideo, bool needsScreenCapture) 286 286 { 287 287 for (const auto& deniedRequest : m_deniedRequests) { … … 347 347 #endif 348 348 349 void UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame(uint64_t userMediaID, uint64_tframeID, Ref<SecurityOrigin>&& userMediaDocumentOrigin, Ref<SecurityOrigin>&& topLevelDocumentOrigin, MediaStreamRequest&& userRequest)349 void UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame(uint64_t userMediaID, FrameIdentifier frameID, Ref<SecurityOrigin>&& userMediaDocumentOrigin, Ref<SecurityOrigin>&& topLevelDocumentOrigin, MediaStreamRequest&& userRequest) 350 350 { 351 351 #if ENABLE(MEDIA_STREAM) … … 522 522 } 523 523 524 void UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo( uint64_tframeID, Ref<SecurityOrigin>&& userMediaDocumentOrigin, Ref<SecurityOrigin>&& topLevelDocumentOrigin, CompletionHandler<void(PermissionInfo)>&& handler)524 void UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo(FrameIdentifier frameID, Ref<SecurityOrigin>&& userMediaDocumentOrigin, Ref<SecurityOrigin>&& topLevelDocumentOrigin, CompletionHandler<void(PermissionInfo)>&& handler) 525 525 { 526 526 auto* webFrame = m_page.process().webFrame(frameID); … … 546 546 } 547 547 548 bool UserMediaPermissionRequestManagerProxy::wasGrantedVideoOrAudioAccess( uint64_tframeID, const SecurityOrigin& userMediaDocumentOrigin, const SecurityOrigin& topLevelDocumentOrigin)548 bool UserMediaPermissionRequestManagerProxy::wasGrantedVideoOrAudioAccess(FrameIdentifier frameID, const SecurityOrigin& userMediaDocumentOrigin, const SecurityOrigin& topLevelDocumentOrigin) 549 549 { 550 550 for (const auto& grantedRequest : m_grantedRequests) { … … 605 605 #endif 606 606 607 void UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame(uint64_t userMediaID, uint64_tframeID, Ref<SecurityOrigin>&& userMediaDocumentOrigin, Ref<SecurityOrigin>&& topLevelDocumentOrigin)607 void UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame(uint64_t userMediaID, FrameIdentifier frameID, Ref<SecurityOrigin>&& userMediaDocumentOrigin, Ref<SecurityOrigin>&& topLevelDocumentOrigin) 608 608 { 609 609 #if ENABLE(MEDIA_STREAM) -
trunk/Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.h
r247662 r248713 61 61 void invalidatePendingRequests(); 62 62 63 void requestUserMediaPermissionForFrame(uint64_t userMediaID, uint64_t frameID, Ref<WebCore::SecurityOrigin>&& userMediaDocumentOrigin, Ref<WebCore::SecurityOrigin>&& topLevelDocumentOrigin, WebCore::MediaStreamRequest&&);63 void requestUserMediaPermissionForFrame(uint64_t userMediaID, WebCore::FrameIdentifier, Ref<WebCore::SecurityOrigin>&& userMediaDocumentOrigin, Ref<WebCore::SecurityOrigin>&& topLevelDocumentOrigin, WebCore::MediaStreamRequest&&); 64 64 65 void resetAccess( uint64_tmainFrameID);65 void resetAccess(WebCore::FrameIdentifier mainFrameID); 66 66 void viewIsBecomingVisible(); 67 67 … … 69 69 void denyRequest(UserMediaPermissionRequestProxy&, UserMediaPermissionRequestProxy::UserMediaAccessDenialReason, const String& invalidConstraint = { }); 70 70 71 void enumerateMediaDevicesForFrame(uint64_t userMediaID, uint64_t frameID, Ref<WebCore::SecurityOrigin>&& userMediaDocumentOrigin, Ref<WebCore::SecurityOrigin>&& topLevelDocumentOrigin);71 void enumerateMediaDevicesForFrame(uint64_t userMediaID, WebCore::FrameIdentifier, Ref<WebCore::SecurityOrigin>&& userMediaDocumentOrigin, Ref<WebCore::SecurityOrigin>&& topLevelDocumentOrigin); 72 72 73 73 void stopCapture(); … … 96 96 #endif 97 97 98 Ref<UserMediaPermissionRequestProxy> createPermissionRequest(uint64_t userMediaID, uint64_t mainFrameID, uint64_t frameID, Ref<WebCore::SecurityOrigin>&& userMediaDocumentOrigin, Ref<WebCore::SecurityOrigin>&& topLevelDocumentOrigin, Vector<WebCore::CaptureDevice>&& audioDevices, Vector<WebCore::CaptureDevice>&& videoDevices, WebCore::MediaStreamRequest&&);98 Ref<UserMediaPermissionRequestProxy> createPermissionRequest(uint64_t userMediaID, WebCore::FrameIdentifier mainFrameID, WebCore::FrameIdentifier, Ref<WebCore::SecurityOrigin>&& userMediaDocumentOrigin, Ref<WebCore::SecurityOrigin>&& topLevelDocumentOrigin, Vector<WebCore::CaptureDevice>&& audioDevices, Vector<WebCore::CaptureDevice>&& videoDevices, WebCore::MediaStreamRequest&&); 99 99 #if ENABLE(MEDIA_STREAM) 100 100 void finishGrantingRequest(UserMediaPermissionRequestProxy&); 101 101 102 const UserMediaPermissionRequestProxy* searchForGrantedRequest( uint64_t frameID, const WebCore::SecurityOrigin& userMediaDocumentOrigin, const WebCore::SecurityOrigin& topLevelDocumentOrigin, bool needsAudio, bool needsVideo) const;103 bool wasRequestDenied( uint64_tmainFrameID, const WebCore::SecurityOrigin& userMediaDocumentOrigin, const WebCore::SecurityOrigin& topLevelDocumentOrigin, bool needsAudio, bool needsVideo, bool needsScreenCapture);102 const UserMediaPermissionRequestProxy* searchForGrantedRequest(WebCore::FrameIdentifier, const WebCore::SecurityOrigin& userMediaDocumentOrigin, const WebCore::SecurityOrigin& topLevelDocumentOrigin, bool needsAudio, bool needsVideo) const; 103 bool wasRequestDenied(WebCore::FrameIdentifier mainFrameID, const WebCore::SecurityOrigin& userMediaDocumentOrigin, const WebCore::SecurityOrigin& topLevelDocumentOrigin, bool needsAudio, bool needsVideo, bool needsScreenCapture); 104 104 105 105 using PermissionInfo = UserMediaPermissionCheckProxy::PermissionInfo; 106 void getUserMediaPermissionInfo( uint64_t frameID, Ref<WebCore::SecurityOrigin>&& userMediaDocumentOrigin, Ref<WebCore::SecurityOrigin>&& topLevelDocumentOrigin, CompletionHandler<void(PermissionInfo)>&&);106 void getUserMediaPermissionInfo(WebCore::FrameIdentifier, Ref<WebCore::SecurityOrigin>&& userMediaDocumentOrigin, Ref<WebCore::SecurityOrigin>&& topLevelDocumentOrigin, CompletionHandler<void(PermissionInfo)>&&); 107 107 108 108 RequestAction getRequestAction(const UserMediaPermissionRequestProxy&); 109 109 110 bool wasGrantedVideoOrAudioAccess( uint64_t, const WebCore::SecurityOrigin& userMediaDocumentOrigin, const WebCore::SecurityOrigin& topLevelDocumentOrigin);110 bool wasGrantedVideoOrAudioAccess(WebCore::FrameIdentifier, const WebCore::SecurityOrigin& userMediaDocumentOrigin, const WebCore::SecurityOrigin& topLevelDocumentOrigin); 111 111 112 112 Vector<WebCore::CaptureDevice> computeFilteredDeviceList(bool revealIdsAndLabels, const String& deviceIDHashSalt); … … 135 135 136 136 struct DeniedRequest { 137 uint64_tmainFrameID;137 WebCore::FrameIdentifier mainFrameID; 138 138 Ref<WebCore::SecurityOrigin> userMediaDocumentOrigin; 139 139 Ref<WebCore::SecurityOrigin> topLevelDocumentOrigin; -
trunk/Source/WebKit/UIProcess/UserMediaPermissionRequestProxy.cpp
r246093 r248713 31 31 using namespace WebCore; 32 32 33 UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy(UserMediaPermissionRequestManagerProxy& manager, uint64_t userMediaID, uint64_t mainFrameID, uint64_tframeID, Ref<WebCore::SecurityOrigin>&& userMediaDocumentOrigin, Ref<WebCore::SecurityOrigin>&& topLevelDocumentOrigin, Vector<WebCore::CaptureDevice>&& audioDevices, Vector<WebCore::CaptureDevice>&& videoDevices, WebCore::MediaStreamRequest&& request)33 UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy(UserMediaPermissionRequestManagerProxy& manager, uint64_t userMediaID, FrameIdentifier mainFrameID, FrameIdentifier frameID, Ref<WebCore::SecurityOrigin>&& userMediaDocumentOrigin, Ref<WebCore::SecurityOrigin>&& topLevelDocumentOrigin, Vector<WebCore::CaptureDevice>&& audioDevices, Vector<WebCore::CaptureDevice>&& videoDevices, WebCore::MediaStreamRequest&& request) 34 34 : m_manager(&manager) 35 35 , m_userMediaID(userMediaID) -
trunk/Source/WebKit/UIProcess/UserMediaPermissionRequestProxy.h
r246093 r248713 22 22 #include "APIObject.h" 23 23 #include <WebCore/CaptureDevice.h> 24 #include <WebCore/FrameIdentifier.h> 24 25 #include <WebCore/MediaStreamRequest.h> 25 26 #include <wtf/Vector.h> … … 36 37 class UserMediaPermissionRequestProxy : public API::ObjectImpl<API::Object::Type::UserMediaPermissionRequest> { 37 38 public: 38 static Ref<UserMediaPermissionRequestProxy> create(UserMediaPermissionRequestManagerProxy& manager, uint64_t userMediaID, uint64_t mainFrameID, uint64_tframeID, Ref<WebCore::SecurityOrigin>&& userMediaDocumentOrigin, Ref<WebCore::SecurityOrigin>&& topLevelDocumentOrigin, Vector<WebCore::CaptureDevice>&& audioDevices, Vector<WebCore::CaptureDevice>&& videoDevices, WebCore::MediaStreamRequest&& request)39 static Ref<UserMediaPermissionRequestProxy> create(UserMediaPermissionRequestManagerProxy& manager, uint64_t userMediaID, WebCore::FrameIdentifier mainFrameID, WebCore::FrameIdentifier frameID, Ref<WebCore::SecurityOrigin>&& userMediaDocumentOrigin, Ref<WebCore::SecurityOrigin>&& topLevelDocumentOrigin, Vector<WebCore::CaptureDevice>&& audioDevices, Vector<WebCore::CaptureDevice>&& videoDevices, WebCore::MediaStreamRequest&& request) 39 40 { 40 41 return adoptRef(*new UserMediaPermissionRequestProxy(manager, userMediaID, mainFrameID, frameID, WTFMove(userMediaDocumentOrigin), WTFMove(topLevelDocumentOrigin), WTFMove(audioDevices), WTFMove(videoDevices), WTFMove(request))); … … 66 67 67 68 uint64_t userMediaID() const { return m_userMediaID; } 68 uint64_tmainFrameID() const { return m_mainFrameID; }69 uint64_tframeID() const { return m_frameID; }69 WebCore::FrameIdentifier mainFrameID() const { return m_mainFrameID; } 70 WebCore::FrameIdentifier frameID() const { return m_frameID; } 70 71 71 72 WebCore::SecurityOrigin& topLevelDocumentSecurityOrigin() { return m_topLevelDocumentSecurityOrigin.get(); } … … 85 86 86 87 private: 87 UserMediaPermissionRequestProxy(UserMediaPermissionRequestManagerProxy&, uint64_t userMediaID, uint64_t mainFrameID, uint64_t frameID, Ref<WebCore::SecurityOrigin>&& userMediaDocumentOrigin, Ref<WebCore::SecurityOrigin>&& topLevelDocumentOrigin, Vector<WebCore::CaptureDevice>&& audioDevices, Vector<WebCore::CaptureDevice>&& videoDevices, WebCore::MediaStreamRequest&&);88 UserMediaPermissionRequestProxy(UserMediaPermissionRequestManagerProxy&, uint64_t userMediaID, WebCore::FrameIdentifier mainFrameID, WebCore::FrameIdentifier, Ref<WebCore::SecurityOrigin>&& userMediaDocumentOrigin, Ref<WebCore::SecurityOrigin>&& topLevelDocumentOrigin, Vector<WebCore::CaptureDevice>&& audioDevices, Vector<WebCore::CaptureDevice>&& videoDevices, WebCore::MediaStreamRequest&&); 88 89 89 90 UserMediaPermissionRequestManagerProxy* m_manager; 90 91 uint64_t m_userMediaID; 91 uint64_tm_mainFrameID;92 uint64_tm_frameID;92 WebCore::FrameIdentifier m_mainFrameID; 93 WebCore::FrameIdentifier m_frameID; 93 94 Ref<WebCore::SecurityOrigin> m_userMediaDocumentSecurityOrigin; 94 95 Ref<WebCore::SecurityOrigin> m_topLevelDocumentSecurityOrigin; -
trunk/Source/WebKit/UIProcess/WebFrameProxy.cpp
r246872 r248713 46 46 class WebPageProxy; 47 47 48 WebFrameProxy::WebFrameProxy(WebPageProxy& page, uint64_tframeID)48 WebFrameProxy::WebFrameProxy(WebPageProxy& page, FrameIdentifier frameID) 49 49 : m_page(makeWeakPtr(page)) 50 , m_isFrameSet(false)51 50 , m_frameID(frameID) 52 51 { -
trunk/Source/WebKit/UIProcess/WebFrameProxy.h
r246872 r248713 60 60 class WebFrameProxy : public API::ObjectImpl<API::Object::Type::Frame> { 61 61 public: 62 static Ref<WebFrameProxy> create(WebPageProxy& page, uint64_tframeID)62 static Ref<WebFrameProxy> create(WebPageProxy& page, WebCore::FrameIdentifier frameID) 63 63 { 64 64 return adoptRef(*new WebFrameProxy(page, frameID)); … … 67 67 virtual ~WebFrameProxy(); 68 68 69 uint64_tframeID() const { return m_frameID; }69 WebCore::FrameIdentifier frameID() const { return m_frameID; } 70 70 WebPageProxy* page() const { return m_page.get(); } 71 71 … … 131 131 132 132 private: 133 WebFrameProxy(WebPageProxy&, uint64_t frameID);133 WebFrameProxy(WebPageProxy&, WebCore::FrameIdentifier); 134 134 135 135 WeakPtr<WebPageProxy> m_page; … … 139 139 String m_MIMEType; 140 140 String m_title; 141 bool m_isFrameSet ;141 bool m_isFrameSet { false }; 142 142 bool m_containsPluginDocument { false }; 143 143 RefPtr<WebCertificateInfo> m_certificateInfo; 144 144 RefPtr<WebFramePolicyListenerProxy> m_activeListener; 145 uint64_tm_frameID;145 WebCore::FrameIdentifier m_frameID; 146 146 #if ENABLE(CONTENT_FILTERING) 147 147 WebCore::ContentFilterUnblockHandler m_contentFilterUnblockHandler; -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r248675 r248713 744 744 } 745 745 746 bool WebPageProxy::suspendCurrentPageIfPossible(API::Navigation& navigation, Optional< uint64_t> mainFrameID, ProcessSwapRequestedByClient processSwapRequestedByClient, ShouldDelayClosingUntilEnteringAcceleratedCompositingMode shouldDelayClosingUntilEnteringAcceleratedCompositingMode)746 bool WebPageProxy::suspendCurrentPageIfPossible(API::Navigation& navigation, Optional<FrameIdentifier> mainFrameID, ProcessSwapRequestedByClient processSwapRequestedByClient, ShouldDelayClosingUntilEnteringAcceleratedCompositingMode shouldDelayClosingUntilEnteringAcceleratedCompositingMode) 747 747 { 748 748 m_lastSuspendedPage = nullptr; … … 2932 2932 } 2933 2933 2934 void WebPageProxy::commitProvisionalPage( uint64_tframeID, uint64_t navigationID, const String& mimeType, bool frameHasCustomContentProvider, uint32_t frameLoadType, const WebCore::CertificateInfo& certificateInfo, bool containsPluginDocument, Optional<WebCore::HasInsecureContent> forcedHasInsecureContent, const UserData& userData)2934 void WebPageProxy::commitProvisionalPage(FrameIdentifier frameID, uint64_t navigationID, const String& mimeType, bool frameHasCustomContentProvider, uint32_t frameLoadType, const WebCore::CertificateInfo& certificateInfo, bool containsPluginDocument, Optional<WebCore::HasInsecureContent> forcedHasInsecureContent, const UserData& userData) 2935 2935 { 2936 2936 ASSERT(m_provisionalPage); 2937 2937 RELEASE_LOG_IF_ALLOWED(Loading, "commitProvisionalPage: previousPID = %i, newPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_provisionalPage->process().processIdentifier(), m_pageID.toUInt64()); 2938 2938 2939 Optional< uint64_t> mainFrameIDInPreviousProcess = m_mainFrame ? makeOptional(m_mainFrame->frameID()) : WTF::nullopt;2939 Optional<FrameIdentifier> mainFrameIDInPreviousProcess = m_mainFrame ? makeOptional(m_mainFrame->frameID()) : WTF::nullopt; 2940 2940 2941 2941 ASSERT(m_process.ptr() != &m_provisionalPage->process()); … … 3673 3673 } 3674 3674 3675 void WebPageProxy::runJavaScriptInFrame( uint64_tframeID, const String& script, bool forceUserGesture, WTF::Function<void(API::SerializedScriptValue*, bool hadException, const ExceptionDetails&, CallbackBase::Error)>&& callbackFunction)3675 void WebPageProxy::runJavaScriptInFrame(FrameIdentifier frameID, const String& script, bool forceUserGesture, WTF::Function<void(API::SerializedScriptValue*, bool hadException, const ExceptionDetails&, CallbackBase::Error)>&& callbackFunction) 3676 3676 { 3677 3677 ASSERT(mainFrame()->frameID() != frameID); … … 3879 3879 } 3880 3880 3881 void WebPageProxy::didCreateMainFrame( uint64_tframeID)3881 void WebPageProxy::didCreateMainFrame(FrameIdentifier frameID) 3882 3882 { 3883 3883 // The DecidePolicyForNavigationActionSync IPC is synchronous and may therefore get processed before the DidCreateMainFrame one. … … 3898 3898 } 3899 3899 3900 void WebPageProxy::didCreateSubframe( uint64_tframeID)3900 void WebPageProxy::didCreateSubframe(FrameIdentifier frameID) 3901 3901 { 3902 3902 PageClientProtector protector(pageClient()); … … 3918 3918 } 3919 3919 3920 void WebPageProxy::didCreateWindow( uint64_tframeID, GlobalWindowIdentifier&& windowIdentifier)3920 void WebPageProxy::didCreateWindow(FrameIdentifier frameID, GlobalWindowIdentifier&& windowIdentifier) 3921 3921 { 3922 3922 } … … 3982 3982 } 3983 3983 3984 void WebPageProxy::didStartProvisionalLoadForFrame( uint64_tframeID, uint64_t navigationID, URL&& url, URL&& unreachableURL, const UserData& userData)3984 void WebPageProxy::didStartProvisionalLoadForFrame(FrameIdentifier frameID, uint64_t navigationID, URL&& url, URL&& unreachableURL, const UserData& userData) 3985 3985 { 3986 3986 didStartProvisionalLoadForFrameShared(m_process.copyRef(), frameID, navigationID, WTFMove(url), WTFMove(unreachableURL), userData); 3987 3987 } 3988 3988 3989 void WebPageProxy::didStartProvisionalLoadForFrameShared(Ref<WebProcessProxy>&& process, uint64_tframeID, uint64_t navigationID, URL&& url, URL&& unreachableURL, const UserData& userData)3989 void WebPageProxy::didStartProvisionalLoadForFrameShared(Ref<WebProcessProxy>&& process, FrameIdentifier frameID, uint64_t navigationID, URL&& url, URL&& unreachableURL, const UserData& userData) 3990 3990 { 3991 3991 PageClientProtector protector(pageClient()); … … 4006 4006 navigation = navigationState().navigation(navigationID); 4007 4007 4008 LOG(Loading, "WebPageProxy %" PRIu64 " in process pid %i didStartProvisionalLoadForFrame to frameID %" PRIu64 ", navigationID %" PRIu64 ", url %s", m_pageID.toUInt64(), process->processIdentifier(), frameID , navigationID, url.string().utf8().data());4009 RELEASE_LOG_IF_ALLOWED(Loading, "didStartProvisionalLoadForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, process->processIdentifier(), m_pageID.toUInt64(), frameID );4008 LOG(Loading, "WebPageProxy %" PRIu64 " in process pid %i didStartProvisionalLoadForFrame to frameID %" PRIu64 ", navigationID %" PRIu64 ", url %s", m_pageID.toUInt64(), process->processIdentifier(), frameID.toUInt64(), navigationID, url.string().utf8().data()); 4009 RELEASE_LOG_IF_ALLOWED(Loading, "didStartProvisionalLoadForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, process->processIdentifier(), m_pageID.toUInt64(), frameID.toUInt64()); 4010 4010 4011 4011 auto transaction = m_pageLoadState.transaction(); … … 4032 4032 } 4033 4033 4034 void WebPageProxy::didExplicitOpenForFrame( uint64_tframeID, URL&& url)4034 void WebPageProxy::didExplicitOpenForFrame(FrameIdentifier frameID, URL&& url) 4035 4035 { 4036 4036 auto* frame = m_process->webFrame(frameID); … … 4051 4051 } 4052 4052 4053 void WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame( uint64_tframeID, uint64_t navigationID, ResourceRequest&& request, const UserData& userData)4053 void WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame(FrameIdentifier frameID, uint64_t navigationID, ResourceRequest&& request, const UserData& userData) 4054 4054 { 4055 4055 didReceiveServerRedirectForProvisionalLoadForFrameShared(m_process.copyRef(), frameID, navigationID, WTFMove(request), userData); 4056 4056 } 4057 4057 4058 void WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared(Ref<WebProcessProxy>&& process, uint64_tframeID, uint64_t navigationID, ResourceRequest&& request, const UserData& userData)4059 { 4060 LOG(Loading, "WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame to frameID %" PRIu64 ", navigationID %" PRIu64 ", url %s", frameID , navigationID, request.url().string().utf8().data());4061 RELEASE_LOG_IF_ALLOWED(Loading, "didReceiveServerRedirectForProvisionalLoadForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, process->processIdentifier(), m_pageID.toUInt64(), frameID );4058 void WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared(Ref<WebProcessProxy>&& process, FrameIdentifier frameID, uint64_t navigationID, ResourceRequest&& request, const UserData& userData) 4059 { 4060 LOG(Loading, "WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame to frameID %" PRIu64 ", navigationID %" PRIu64 ", url %s", frameID.toUInt64(), navigationID, request.url().string().utf8().data()); 4061 RELEASE_LOG_IF_ALLOWED(Loading, "didReceiveServerRedirectForProvisionalLoadForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, process->processIdentifier(), m_pageID.toUInt64(), frameID.toUInt64()); 4062 4062 4063 4063 PageClientProtector protector(pageClient()); … … 4086 4086 } 4087 4087 4088 void WebPageProxy::willPerformClientRedirectForFrame( uint64_tframeID, const String& url, double delay, WebCore::LockBackForwardList)4089 { 4090 RELEASE_LOG_IF_ALLOWED(Loading, "willPerformClientRedirectForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64(), frameID );4088 void WebPageProxy::willPerformClientRedirectForFrame(FrameIdentifier frameID, const String& url, double delay, WebCore::LockBackForwardList) 4089 { 4090 RELEASE_LOG_IF_ALLOWED(Loading, "willPerformClientRedirectForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64(), frameID.toUInt64()); 4091 4091 4092 4092 PageClientProtector protector(pageClient()); … … 4099 4099 } 4100 4100 4101 void WebPageProxy::didCancelClientRedirectForFrame( uint64_tframeID)4102 { 4103 RELEASE_LOG_IF_ALLOWED(Loading, "didCancelClientRedirectForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64(), frameID );4101 void WebPageProxy::didCancelClientRedirectForFrame(FrameIdentifier frameID) 4102 { 4103 RELEASE_LOG_IF_ALLOWED(Loading, "didCancelClientRedirectForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64(), frameID.toUInt64()); 4104 4104 4105 4105 PageClientProtector protector(pageClient()); … … 4112 4112 } 4113 4113 4114 void WebPageProxy::didChangeProvisionalURLForFrame( uint64_tframeID, uint64_t navigationID, URL&& url)4114 void WebPageProxy::didChangeProvisionalURLForFrame(FrameIdentifier frameID, uint64_t navigationID, URL&& url) 4115 4115 { 4116 4116 didChangeProvisionalURLForFrameShared(m_process.copyRef(), frameID, navigationID, WTFMove(url)); 4117 4117 } 4118 4118 4119 void WebPageProxy::didChangeProvisionalURLForFrameShared(Ref<WebProcessProxy>&& process, uint64_tframeID, uint64_t, URL&& url)4119 void WebPageProxy::didChangeProvisionalURLForFrameShared(Ref<WebProcessProxy>&& process, FrameIdentifier frameID, uint64_t, URL&& url) 4120 4120 { 4121 4121 PageClientProtector protector(pageClient()); … … 4136 4136 } 4137 4137 4138 void WebPageProxy::didFailProvisionalLoadForFrame( uint64_tframeID, const SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const String& provisionalURL, const ResourceError& error, WillContinueLoading willContinueLoading, const UserData& userData)4138 void WebPageProxy::didFailProvisionalLoadForFrame(FrameIdentifier frameID, const SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const String& provisionalURL, const ResourceError& error, WillContinueLoading willContinueLoading, const UserData& userData) 4139 4139 { 4140 4140 if (m_provisionalPage && m_provisionalPage->navigationID() == navigationID) { … … 4146 4146 } 4147 4147 4148 void WebPageProxy::didFailProvisionalLoadForFrameShared(Ref<WebProcessProxy>&& process, uint64_tframeID, const SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const String& provisionalURL, const ResourceError& error, WillContinueLoading willContinueLoading, const UserData& userData)4148 void WebPageProxy::didFailProvisionalLoadForFrameShared(Ref<WebProcessProxy>&& process, FrameIdentifier frameID, const SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const String& provisionalURL, const ResourceError& error, WillContinueLoading willContinueLoading, const UserData& userData) 4149 4149 { 4150 4150 LOG(Loading, "(Loading) WebPageProxy %" PRIu64 " in web process pid %i didFailProvisionalLoadForFrame to provisionalURL %s", m_pageID.toUInt64(), process->processIdentifier(), provisionalURL.utf8().data()); 4151 RELEASE_LOG_IF_ALLOWED(Process, "didFailProvisionalLoadForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64 ", domain = %s, code = %d", process->processIdentifier(), m_pageID.toUInt64(), frameID , error.domain().utf8().data(), error.errorCode());4151 RELEASE_LOG_IF_ALLOWED(Process, "didFailProvisionalLoadForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64 ", domain = %s, code = %d", process->processIdentifier(), m_pageID.toUInt64(), frameID.toUInt64(), error.domain().utf8().data(), error.errorCode()); 4152 4152 4153 4153 PageClientProtector protector(pageClient()); … … 4225 4225 #endif 4226 4226 4227 void WebPageProxy::didCommitLoadForFrame( uint64_tframeID, uint64_t navigationID, const String& mimeType, bool frameHasCustomContentProvider, uint32_t opaqueFrameLoadType, const WebCore::CertificateInfo& certificateInfo, bool containsPluginDocument, Optional<HasInsecureContent> hasInsecureContent, const UserData& userData)4227 void WebPageProxy::didCommitLoadForFrame(FrameIdentifier frameID, uint64_t navigationID, const String& mimeType, bool frameHasCustomContentProvider, uint32_t opaqueFrameLoadType, const WebCore::CertificateInfo& certificateInfo, bool containsPluginDocument, Optional<HasInsecureContent> hasInsecureContent, const UserData& userData) 4228 4228 { 4229 4229 LOG(Loading, "(Loading) WebPageProxy %" PRIu64 " didCommitLoadForFrame in navigation %" PRIu64, m_pageID.toUInt64(), navigationID); 4230 4230 LOG(BackForward, "(Back/Forward) After load commit, back/forward list is now:%s", m_backForwardList->loggingString()); 4231 RELEASE_LOG_IF_ALLOWED(Loading, "didCommitLoadForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64(), frameID );4231 RELEASE_LOG_IF_ALLOWED(Loading, "didCommitLoadForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64(), frameID.toUInt64()); 4232 4232 4233 4233 PageClientProtector protector(pageClient()); … … 4339 4339 } 4340 4340 4341 void WebPageProxy::didFinishDocumentLoadForFrame( uint64_tframeID, uint64_t navigationID, const UserData& userData)4342 { 4343 RELEASE_LOG_IF_ALLOWED(Loading, "didFinishDocumentLoadForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64(), frameID );4341 void WebPageProxy::didFinishDocumentLoadForFrame(FrameIdentifier frameID, uint64_t navigationID, const UserData& userData) 4342 { 4343 RELEASE_LOG_IF_ALLOWED(Loading, "didFinishDocumentLoadForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64(), frameID.toUInt64()); 4344 4344 4345 4345 PageClientProtector protector(pageClient()); … … 4362 4362 } 4363 4363 4364 void WebPageProxy::didFinishLoadForFrame( uint64_tframeID, uint64_t navigationID, const UserData& userData)4364 void WebPageProxy::didFinishLoadForFrame(FrameIdentifier frameID, uint64_t navigationID, const UserData& userData) 4365 4365 { 4366 4366 LOG(Loading, "WebPageProxy::didFinishLoadForFrame - WebPageProxy %p with navigationID %" PRIu64 " didFinishLoad", this, navigationID); 4367 RELEASE_LOG_IF_ALLOWED(Loading, "didFinishLoadForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64(), frameID );4367 RELEASE_LOG_IF_ALLOWED(Loading, "didFinishLoadForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64(), frameID.toUInt64()); 4368 4368 4369 4369 PageClientProtector protector(pageClient()); … … 4408 4408 } 4409 4409 4410 void WebPageProxy::didFailLoadForFrame( uint64_tframeID, uint64_t navigationID, const ResourceError& error, const UserData& userData)4411 { 4412 RELEASE_LOG_IF_ALLOWED(Loading, "didFailLoadForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64 ", domain = %s, code = %d", m_process->processIdentifier(), m_pageID.toUInt64(), frameID , error.domain().utf8().data(), error.errorCode());4410 void WebPageProxy::didFailLoadForFrame(FrameIdentifier frameID, uint64_t navigationID, const ResourceError& error, const UserData& userData) 4411 { 4412 RELEASE_LOG_IF_ALLOWED(Loading, "didFailLoadForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64 ", domain = %s, code = %d", m_process->processIdentifier(), m_pageID.toUInt64(), frameID.toUInt64(), error.domain().utf8().data(), error.errorCode()); 4413 4413 4414 4414 PageClientProtector protector(pageClient()); … … 4450 4450 } 4451 4451 4452 void WebPageProxy::didSameDocumentNavigationForFrame( uint64_tframeID, uint64_t navigationID, uint32_t opaqueSameDocumentNavigationType, URL&& url, const UserData& userData)4453 { 4454 RELEASE_LOG_IF_ALLOWED(Loading, "didSameDocumentNavigationForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64(), frameID );4452 void WebPageProxy::didSameDocumentNavigationForFrame(FrameIdentifier frameID, uint64_t navigationID, uint32_t opaqueSameDocumentNavigationType, URL&& url, const UserData& userData) 4453 { 4454 RELEASE_LOG_IF_ALLOWED(Loading, "didSameDocumentNavigationForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64(), frameID.toUInt64()); 4455 4455 4456 4456 PageClientProtector protector(pageClient()); … … 4489 4489 } 4490 4490 4491 void WebPageProxy::didChangeMainDocument( uint64_tframeID)4491 void WebPageProxy::didChangeMainDocument(FrameIdentifier frameID) 4492 4492 { 4493 4493 #if ENABLE(MEDIA_STREAM) … … 4508 4508 } 4509 4509 4510 void WebPageProxy::didReceiveTitleForFrame( uint64_tframeID, const String& title, const UserData& userData)4510 void WebPageProxy::didReceiveTitleForFrame(FrameIdentifier frameID, const String& title, const UserData& userData) 4511 4511 { 4512 4512 PageClientProtector protector(pageClient()); … … 4530 4530 } 4531 4531 4532 void WebPageProxy::didFirstLayoutForFrame( uint64_t, const UserData& userData)4533 { 4534 } 4535 4536 void WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame( uint64_tframeID, const UserData& userData)4532 void WebPageProxy::didFirstLayoutForFrame(FrameIdentifier, const UserData& userData) 4533 { 4534 } 4535 4536 void WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame(FrameIdentifier frameID, const UserData& userData) 4537 4537 { 4538 4538 PageClientProtector protector(pageClient()); … … 4565 4565 } 4566 4566 4567 void WebPageProxy::didDisplayInsecureContentForFrame( uint64_tframeID, const UserData& userData)4567 void WebPageProxy::didDisplayInsecureContentForFrame(FrameIdentifier frameID, const UserData& userData) 4568 4568 { 4569 4569 PageClientProtector protector(pageClient()); … … 4579 4579 } 4580 4580 4581 void WebPageProxy::didRunInsecureContentForFrame( uint64_tframeID, const UserData& userData)4581 void WebPageProxy::didRunInsecureContentForFrame(FrameIdentifier frameID, const UserData& userData) 4582 4582 { 4583 4583 PageClientProtector protector(pageClient()); … … 4593 4593 } 4594 4594 4595 void WebPageProxy::didDetectXSSForFrame( uint64_t, const UserData&)4595 void WebPageProxy::didDetectXSSForFrame(FrameIdentifier, const UserData&) 4596 4596 { 4597 4597 } … … 4602 4602 } 4603 4603 4604 void WebPageProxy::frameDidBecomeFrameSet( uint64_tframeID, bool value)4604 void WebPageProxy::frameDidBecomeFrameSet(FrameIdentifier frameID, bool value) 4605 4605 { 4606 4606 PageClientProtector protector(pageClient()); … … 4621 4621 #endif 4622 4622 4623 void WebPageProxy::decidePolicyForNavigationActionAsync( uint64_tframeID, WebCore::SecurityOriginData&& frameSecurityOrigin, PolicyCheckIdentifier identifier, uint64_t navigationID,4623 void WebPageProxy::decidePolicyForNavigationActionAsync(FrameIdentifier frameID, WebCore::SecurityOriginData&& frameSecurityOrigin, PolicyCheckIdentifier identifier, uint64_t navigationID, 4624 4624 NavigationActionData&& navigationActionData, FrameInfoData&& frameInfoData, Optional<WebCore::PageIdentifier> originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&& request, 4625 4625 IPC::FormDataReference&& requestBody, WebCore::ResourceResponse&& redirectResponse, const UserData& userData, uint64_t listenerID) … … 4629 4629 } 4630 4630 4631 void WebPageProxy::decidePolicyForNavigationActionAsyncShared(Ref<WebProcessProxy>&& process, uint64_tframeID, WebCore::SecurityOriginData&& frameSecurityOrigin,4631 void WebPageProxy::decidePolicyForNavigationActionAsyncShared(Ref<WebProcessProxy>&& process, FrameIdentifier frameID, WebCore::SecurityOriginData&& frameSecurityOrigin, 4632 4632 WebCore::PolicyCheckIdentifier identifier, uint64_t navigationID, NavigationActionData&& navigationActionData, FrameInfoData&& frameInfoData, Optional<WebCore::PageIdentifier> originatingPageID, 4633 4633 const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&& request, IPC::FormDataReference&& requestBody, WebCore::ResourceResponse&& redirectResponse, … … 4770 4770 4771 4771 API::Navigation* mainFrameNavigation = frame.isMainFrame() ? navigation.get() : nullptr; 4772 WebFrameProxy* originatingFrame = process->webFrame(originatingFrameInfoData.frameID);4772 WebFrameProxy* originatingFrame = originatingFrameInfoData.frameID ? process->webFrame(*originatingFrameInfoData.frameID) : nullptr; 4773 4773 4774 4774 #if ENABLE(RESOURCE_LOAD_STATISTICS) … … 4859 4859 #endif 4860 4860 4861 void WebPageProxy::decidePolicyForNavigationActionSync( uint64_tframeID, bool isMainFrame, WebCore::SecurityOriginData&& frameSecurityOrigin, PolicyCheckIdentifier identifier,4861 void WebPageProxy::decidePolicyForNavigationActionSync(FrameIdentifier frameID, bool isMainFrame, WebCore::SecurityOriginData&& frameSecurityOrigin, PolicyCheckIdentifier identifier, 4862 4862 uint64_t navigationID, NavigationActionData&& navigationActionData, FrameInfoData&& frameInfoData, Optional<PageIdentifier> originatingPageID, 4863 4863 const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&& request, IPC::FormDataReference&& requestBody, WebCore::ResourceResponse&& redirectResponse, … … 4877 4877 } 4878 4878 4879 void WebPageProxy::decidePolicyForNavigationActionSyncShared(Ref<WebProcessProxy>&& process, uint64_tframeID, bool isMainFrame, WebCore::SecurityOriginData&& frameSecurityOrigin, PolicyCheckIdentifier identifier,4879 void WebPageProxy::decidePolicyForNavigationActionSyncShared(Ref<WebProcessProxy>&& process, FrameIdentifier frameID, bool isMainFrame, WebCore::SecurityOriginData&& frameSecurityOrigin, PolicyCheckIdentifier identifier, 4880 4880 uint64_t navigationID, NavigationActionData&& navigationActionData, FrameInfoData&& frameInfoData, Optional<PageIdentifier> originatingPageID, 4881 4881 const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&& request, IPC::FormDataReference&& requestBody, WebCore::ResourceResponse&& redirectResponse, … … 4894 4894 } 4895 4895 4896 void WebPageProxy::decidePolicyForNewWindowAction( uint64_tframeID, const SecurityOriginData& frameSecurityOrigin, PolicyCheckIdentifier identifier,4896 void WebPageProxy::decidePolicyForNewWindowAction(FrameIdentifier frameID, const SecurityOriginData& frameSecurityOrigin, PolicyCheckIdentifier identifier, 4897 4897 NavigationActionData&& navigationActionData, ResourceRequest&& request, const String& frameName, uint64_t listenerID, const UserData& userData) 4898 4898 { … … 4932 4932 } 4933 4933 4934 void WebPageProxy::decidePolicyForResponse( uint64_tframeID, const SecurityOriginData& frameSecurityOrigin, PolicyCheckIdentifier identifier,4934 void WebPageProxy::decidePolicyForResponse(FrameIdentifier frameID, const SecurityOriginData& frameSecurityOrigin, PolicyCheckIdentifier identifier, 4935 4935 uint64_t navigationID, const ResourceResponse& response, const ResourceRequest& request, bool canShowMIMEType, const String& downloadAttribute, uint64_t listenerID, const UserData& userData) 4936 4936 { … … 4938 4938 } 4939 4939 4940 void WebPageProxy::decidePolicyForResponseShared(Ref<WebProcessProxy>&& process, uint64_tframeID, const SecurityOriginData& frameSecurityOrigin, PolicyCheckIdentifier identifier,4940 void WebPageProxy::decidePolicyForResponseShared(Ref<WebProcessProxy>&& process, FrameIdentifier frameID, const SecurityOriginData& frameSecurityOrigin, PolicyCheckIdentifier identifier, 4941 4941 uint64_t navigationID, const ResourceResponse& response, const ResourceRequest& request, bool canShowMIMEType, const String& downloadAttribute, uint64_t listenerID, const UserData& userData) 4942 4942 { … … 4972 4972 } 4973 4973 4974 void WebPageProxy::unableToImplementPolicy( uint64_tframeID, const ResourceError& error, const UserData& userData)4974 void WebPageProxy::unableToImplementPolicy(FrameIdentifier frameID, const ResourceError& error, const UserData& userData) 4975 4975 { 4976 4976 PageClientProtector protector(pageClient()); … … 4986 4986 // FormClient 4987 4987 4988 void WebPageProxy::willSubmitForm( uint64_t frameID, uint64_tsourceFrameID, const Vector<std::pair<String, String>>& textFieldValues, uint64_t listenerID, const UserData& userData)4988 void WebPageProxy::willSubmitForm(FrameIdentifier frameID, FrameIdentifier sourceFrameID, const Vector<std::pair<String, String>>& textFieldValues, uint64_t listenerID, const UserData& userData) 4989 4989 { 4990 4990 WebFrameProxy* frame = m_process->webFrame(frameID); … … 5004 5004 } 5005 5005 5006 void WebPageProxy::didNavigateWithNavigationData(const WebNavigationDataStore& store, uint64_t frameID)5006 void WebPageProxy::didNavigateWithNavigationData(const WebNavigationDataStore& store, FrameIdentifier frameID) 5007 5007 { 5008 5008 didNavigateWithNavigationDataShared(m_process.copyRef(), store, frameID); 5009 5009 } 5010 5010 5011 void WebPageProxy::didNavigateWithNavigationDataShared(Ref<WebProcessProxy>&& process, const WebNavigationDataStore& store, uint64_tframeID)5011 void WebPageProxy::didNavigateWithNavigationDataShared(Ref<WebProcessProxy>&& process, const WebNavigationDataStore& store, FrameIdentifier frameID) 5012 5012 { 5013 5013 RELEASE_LOG_IF_ALLOWED(Loading, "didNavigateWithNavigationDataShared: webPID = %i, pageID = %" PRIu64, process->processIdentifier(), m_pageID.toUInt64()); … … 5024 5024 } 5025 5025 5026 void WebPageProxy::didPerformClientRedirect(const String& sourceURLString, const String& destinationURLString, uint64_tframeID)5026 void WebPageProxy::didPerformClientRedirect(const String& sourceURLString, const String& destinationURLString, FrameIdentifier frameID) 5027 5027 { 5028 5028 didPerformClientRedirectShared(m_process.copyRef(), sourceURLString, destinationURLString, frameID); 5029 5029 } 5030 5030 5031 void WebPageProxy::didPerformClientRedirectShared(Ref<WebProcessProxy>&& process, const String& sourceURLString, const String& destinationURLString, uint64_tframeID)5032 { 5033 RELEASE_LOG_IF_ALLOWED(Loading, "didPerformClientRedirectShared: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, process->processIdentifier(), m_pageID.toUInt64(), frameID );5031 void WebPageProxy::didPerformClientRedirectShared(Ref<WebProcessProxy>&& process, const String& sourceURLString, const String& destinationURLString, FrameIdentifier frameID) 5032 { 5033 RELEASE_LOG_IF_ALLOWED(Loading, "didPerformClientRedirectShared: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, process->processIdentifier(), m_pageID.toUInt64(), frameID.toUInt64()); 5034 5034 5035 5035 PageClientProtector protector(pageClient()); … … 5051 5051 } 5052 5052 5053 void WebPageProxy::didPerformServerRedirect(const String& sourceURLString, const String& destinationURLString, uint64_tframeID)5053 void WebPageProxy::didPerformServerRedirect(const String& sourceURLString, const String& destinationURLString, FrameIdentifier frameID) 5054 5054 { 5055 5055 didPerformServerRedirectShared(m_process.copyRef(), sourceURLString, destinationURLString, frameID); 5056 5056 } 5057 5057 5058 void WebPageProxy::didPerformServerRedirectShared(Ref<WebProcessProxy>&& process, const String& sourceURLString, const String& destinationURLString, uint64_tframeID)5058 void WebPageProxy::didPerformServerRedirectShared(Ref<WebProcessProxy>&& process, const String& sourceURLString, const String& destinationURLString, FrameIdentifier frameID) 5059 5059 { 5060 5060 RELEASE_LOG_IF_ALLOWED(Loading, "didPerformServerRedirect: webPID = %i, pageID = %" PRIu64, process->processIdentifier(), m_pageID.toUInt64()); … … 5077 5077 } 5078 5078 5079 void WebPageProxy::didUpdateHistoryTitle(const String& title, const String& url, uint64_tframeID)5079 void WebPageProxy::didUpdateHistoryTitle(const String& title, const String& url, FrameIdentifier frameID) 5080 5080 { 5081 5081 PageClientProtector protector(pageClient()); … … 5108 5108 void WebPageProxy::createNewPage(const FrameInfoData& originatingFrameInfoData, Optional<PageIdentifier> originatingPageID, ResourceRequest&& request, WindowFeatures&& windowFeatures, NavigationActionData&& navigationActionData, Messages::WebPageProxy::CreateNewPage::DelayedReply&& reply) 5109 5109 { 5110 MESSAGE_CHECK(m_process, m_process->webFrame(originatingFrameInfoData.frameID)); 5111 auto originatingFrameInfo = API::FrameInfo::create(originatingFrameInfoData, originatingPageID ? m_process->webPage(*originatingPageID) : nullptr); 5110 MESSAGE_CHECK(m_process, originatingFrameInfoData.frameID); 5111 MESSAGE_CHECK(m_process, m_process->webFrame(*originatingFrameInfoData.frameID)); 5112 5113 auto originatingFrameInfo = API::FrameInfo::create(originatingFrameInfoData, m_process->webPage(*originatingPageID)); 5112 5114 auto mainFrameURL = m_mainFrame ? m_mainFrame->url() : URL(); 5113 5115 auto completionHandler = [this, protectedThis = makeRef(*this), mainFrameURL, request, reply = WTFMove(reply)] (RefPtr<WebPageProxy> newPage) mutable { … … 5179 5181 } 5180 5182 5181 void WebPageProxy::runJavaScriptAlert( uint64_tframeID, const SecurityOriginData& securityOrigin, const String& message, Messages::WebPageProxy::RunJavaScriptAlert::DelayedReply&& reply)5183 void WebPageProxy::runJavaScriptAlert(FrameIdentifier frameID, const SecurityOriginData& securityOrigin, const String& message, Messages::WebPageProxy::RunJavaScriptAlert::DelayedReply&& reply) 5182 5184 { 5183 5185 WebFrameProxy* frame = m_process->webFrame(frameID); … … 5198 5200 } 5199 5201 5200 void WebPageProxy::runJavaScriptConfirm( uint64_tframeID, const SecurityOriginData& securityOrigin, const String& message, Messages::WebPageProxy::RunJavaScriptConfirm::DelayedReply&& reply)5202 void WebPageProxy::runJavaScriptConfirm(FrameIdentifier frameID, const SecurityOriginData& securityOrigin, const String& message, Messages::WebPageProxy::RunJavaScriptConfirm::DelayedReply&& reply) 5201 5203 { 5202 5204 WebFrameProxy* frame = m_process->webFrame(frameID); … … 5218 5220 } 5219 5221 5220 void WebPageProxy::runJavaScriptPrompt( uint64_tframeID, const SecurityOriginData& securityOrigin, const String& message, const String& defaultValue, Messages::WebPageProxy::RunJavaScriptPrompt::DelayedReply&& reply)5222 void WebPageProxy::runJavaScriptPrompt(FrameIdentifier frameID, const SecurityOriginData& securityOrigin, const String& message, const String& defaultValue, Messages::WebPageProxy::RunJavaScriptPrompt::DelayedReply&& reply) 5221 5223 { 5222 5224 WebFrameProxy* frame = m_process->webFrame(frameID); … … 5377 5379 } 5378 5380 5379 void WebPageProxy::runBeforeUnloadConfirmPanel( uint64_tframeID, const SecurityOriginData& securityOrigin, const String& message, Messages::WebPageProxy::RunBeforeUnloadConfirmPanel::DelayedReply&& reply)5381 void WebPageProxy::runBeforeUnloadConfirmPanel(FrameIdentifier frameID, const SecurityOriginData& securityOrigin, const String& message, Messages::WebPageProxy::RunBeforeUnloadConfirmPanel::DelayedReply&& reply) 5380 5382 { 5381 5383 WebFrameProxy* frame = m_process->webFrame(frameID); … … 5417 5419 } 5418 5420 5419 void WebPageProxy::runOpenPanel( uint64_tframeID, const SecurityOriginData& frameSecurityOrigin, const FileChooserSettings& settings)5421 void WebPageProxy::runOpenPanel(FrameIdentifier frameID, const SecurityOriginData& frameSecurityOrigin, const FileChooserSettings& settings) 5420 5422 { 5421 5423 if (m_openPanelResultListener) { … … 5456 5458 } 5457 5459 5458 void WebPageProxy::printFrame( uint64_tframeID, CompletionHandler<void()>&& completionHandler)5460 void WebPageProxy::printFrame(FrameIdentifier frameID, CompletionHandler<void()>&& completionHandler) 5459 5461 { 5460 5462 ASSERT(!m_isPerformingDOMPrintOperation); … … 6770 6772 #endif 6771 6773 6772 void WebPageProxy::focusedFrameChanged( uint64_tframeID)6774 void WebPageProxy::focusedFrameChanged(const Optional<FrameIdentifier>& frameID) 6773 6775 { 6774 6776 if (!frameID) { … … 6777 6779 } 6778 6780 6779 WebFrameProxy* frame = m_process->webFrame( frameID);6781 WebFrameProxy* frame = m_process->webFrame(*frameID); 6780 6782 MESSAGE_CHECK(m_process, frame); 6781 6783 … … 6783 6785 } 6784 6786 6785 void WebPageProxy::frameSetLargestFrameChanged( uint64_tframeID)6787 void WebPageProxy::frameSetLargestFrameChanged(const Optional<FrameIdentifier>& frameID) 6786 6788 { 6787 6789 if (!frameID) { … … 6790 6792 } 6791 6793 6792 WebFrameProxy* frame = m_process->webFrame( frameID);6794 WebFrameProxy* frame = m_process->webFrame(*frameID); 6793 6795 MESSAGE_CHECK(m_process, frame); 6794 6796 … … 7346 7348 } 7347 7349 7348 void WebPageProxy::didReceiveAuthenticationChallengeProxy( uint64_t, Ref<AuthenticationChallengeProxy>&& authenticationChallenge)7350 void WebPageProxy::didReceiveAuthenticationChallengeProxy(FrameIdentifier, Ref<AuthenticationChallengeProxy>&& authenticationChallenge) 7349 7351 { 7350 7352 m_navigationClient->didReceiveAuthenticationChallenge(*this, authenticationChallenge.get()); 7351 7353 } 7352 7354 7353 void WebPageProxy::exceededDatabaseQuota( uint64_tframeID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply&& reply)7355 void WebPageProxy::exceededDatabaseQuota(FrameIdentifier frameID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply&& reply) 7354 7356 { 7355 7357 requestStorageSpace(frameID, originIdentifier, databaseName, displayName, currentQuota, currentOriginUsage, currentDatabaseUsage, expectedUsage, [reply = WTFMove(reply)](auto quota) mutable { … … 7358 7360 } 7359 7361 7360 void WebPageProxy::requestStorageSpace( uint64_tframeID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, CompletionHandler<void(uint64_t)>&& completionHandler)7361 { 7362 RELEASE_LOG_IF_ALLOWED(Storage, "requestStorageSpace for frame %" PRIu64 ", current quota %" PRIu64 " current usage %" PRIu64 " expected usage %" PRIu64, frameID , currentQuota, currentDatabaseUsage, expectedUsage);7362 void WebPageProxy::requestStorageSpace(FrameIdentifier frameID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, CompletionHandler<void(uint64_t)>&& completionHandler) 7363 { 7364 RELEASE_LOG_IF_ALLOWED(Storage, "requestStorageSpace for frame %" PRIu64 ", current quota %" PRIu64 " current usage %" PRIu64 " expected usage %" PRIu64, frameID.toUInt64(), currentQuota, currentDatabaseUsage, expectedUsage); 7363 7365 7364 7366 StorageRequests::singleton().processOrAppend([this, protectedThis = makeRef(*this), pageURL = currentURL(), frameID, originIdentifier, databaseName, displayName, currentQuota, currentOriginUsage, currentDatabaseUsage, expectedUsage, completionHandler = WTFMove(completionHandler)]() mutable { 7365 7367 this->makeStorageSpaceRequest(frameID, originIdentifier, databaseName, displayName, currentQuota, currentOriginUsage, currentDatabaseUsage, expectedUsage, [this, protectedThis = WTFMove(protectedThis), frameID, pageURL = WTFMove(pageURL), completionHandler = WTFMove(completionHandler), currentQuota](auto quota) mutable { 7366 7368 7367 RELEASE_LOG_IF_ALLOWED(Storage, "requestStorageSpace response for frame %" PRIu64 ", quota %" PRIu64, frameID , quota);7369 RELEASE_LOG_IF_ALLOWED(Storage, "requestStorageSpace response for frame %" PRIu64 ", quota %" PRIu64, frameID.toUInt64(), quota); 7368 7370 7369 7371 if (quota <= currentQuota && this->currentURL() == pageURL) { … … 7377 7379 } 7378 7380 7379 void WebPageProxy::makeStorageSpaceRequest( uint64_tframeID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, CompletionHandler<void(uint64_t)>&& completionHandler)7381 void WebPageProxy::makeStorageSpaceRequest(FrameIdentifier frameID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, CompletionHandler<void(uint64_t)>&& completionHandler) 7380 7382 { 7381 7383 if (m_isQuotaIncreaseDenied) { … … 7403 7405 } 7404 7406 7405 void WebPageProxy::requestGeolocationPermissionForFrame(uint64_t geolocationID, uint64_tframeID, String originIdentifier)7407 void WebPageProxy::requestGeolocationPermissionForFrame(uint64_t geolocationID, FrameIdentifier frameID, String originIdentifier) 7406 7408 { 7407 7409 WebFrameProxy* frame = m_process->webFrame(frameID); … … 7447 7449 #endif 7448 7450 7449 void WebPageProxy::requestUserMediaPermissionForFrame(uint64_t userMediaID, uint64_tframeID, const WebCore::SecurityOriginData& userMediaDocumentOriginData, const WebCore::SecurityOriginData& topLevelDocumentOriginData, WebCore::MediaStreamRequest&& request)7451 void WebPageProxy::requestUserMediaPermissionForFrame(uint64_t userMediaID, FrameIdentifier frameID, const WebCore::SecurityOriginData& userMediaDocumentOriginData, const WebCore::SecurityOriginData& topLevelDocumentOriginData, WebCore::MediaStreamRequest&& request) 7450 7452 { 7451 7453 #if ENABLE(MEDIA_STREAM) … … 7462 7464 } 7463 7465 7464 void WebPageProxy::enumerateMediaDevicesForFrame(uint64_t userMediaID, uint64_tframeID, const WebCore::SecurityOriginData& userMediaDocumentOriginData, const WebCore::SecurityOriginData& topLevelDocumentOriginData)7466 void WebPageProxy::enumerateMediaDevicesForFrame(uint64_t userMediaID, FrameIdentifier frameID, const WebCore::SecurityOriginData& userMediaDocumentOriginData, const WebCore::SecurityOriginData& topLevelDocumentOriginData) 7465 7467 { 7466 7468 #if ENABLE(MEDIA_STREAM) … … 7494 7496 7495 7497 #if ENABLE(DEVICE_ORIENTATION) 7496 void WebPageProxy::shouldAllowDeviceOrientationAndMotionAccess( uint64_tframeID, WebCore::SecurityOriginData&& originData, bool mayPrompt, CompletionHandler<void(DeviceOrientationOrMotionPermissionState)>&& completionHandler)7498 void WebPageProxy::shouldAllowDeviceOrientationAndMotionAccess(FrameIdentifier frameID, WebCore::SecurityOriginData&& originData, bool mayPrompt, CompletionHandler<void(DeviceOrientationOrMotionPermissionState)>&& completionHandler) 7497 7499 { 7498 7500 WebFrameProxy* frame = m_process->webFrame(frameID); … … 8737 8739 8738 8740 #if ENABLE(RESOURCE_LOAD_STATISTICS) 8739 void WebPageProxy::requestStorageAccessConfirm(const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, uint64_tframeID, CompletionHandler<void(bool)>&& completionHandler)8741 void WebPageProxy::requestStorageAccessConfirm(const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, FrameIdentifier frameID, CompletionHandler<void(bool)>&& completionHandler) 8740 8742 { 8741 8743 m_uiClient->requestStorageAccessConfirm(*this, m_process->webFrame(frameID), subFrameDomain, topFrameDomain, WTFMove(completionHandler)); -
trunk/Source/WebKit/UIProcess/WebPageProxy.h
r248522 r248713 1019 1019 void runJavaScriptInMainFrameScriptWorld(const String&, bool, const Optional<String>& worldName, WTF::Function<void(API::SerializedScriptValue*, bool hadException, const WebCore::ExceptionDetails&, CallbackBase::Error)>&& callbackFunction); 1020 1020 // For sub frames. 1021 void runJavaScriptInFrame( uint64_t frameID, const String& script, bool forceUserGesture, WTF::Function<void(API::SerializedScriptValue*, bool hadException, const WebCore::ExceptionDetails&, CallbackBase::Error)>&& callbackFunction);1021 void runJavaScriptInFrame(WebCore::FrameIdentifier, const String& script, bool forceUserGesture, WTF::Function<void(API::SerializedScriptValue*, bool hadException, const WebCore::ExceptionDetails&, CallbackBase::Error)>&& callbackFunction); 1022 1022 void forceRepaint(RefPtr<VoidCallback>&&); 1023 1023 … … 1162 1162 void drawPagesToPDF(WebFrameProxy*, const PrintInfo&, uint32_t first, uint32_t count, Ref<DataCallback>&&); 1163 1163 #if PLATFORM(IOS_FAMILY) 1164 uint32_t computePagesForPrintingAndDrawToPDF( uint64_t frameID, const PrintInfo&, DrawToPDFCallback::CallbackFunction&&);1164 uint32_t computePagesForPrintingAndDrawToPDF(WebCore::FrameIdentifier, const PrintInfo&, DrawToPDFCallback::CallbackFunction&&); 1165 1165 void drawToPDFCallback(const IPC::DataReference& pdfData, WebKit::CallbackID); 1166 1166 #endif … … 1253 1253 WebCore::IntSize viewportSizeForCSSViewportUnits() const { return m_viewportSizeForCSSViewportUnits.valueOr(WebCore::IntSize()); } 1254 1254 1255 void didReceiveAuthenticationChallengeProxy( uint64_t frameID, Ref<AuthenticationChallengeProxy>&&);1255 void didReceiveAuthenticationChallengeProxy(WebCore::FrameIdentifier, Ref<AuthenticationChallengeProxy>&&); 1256 1256 1257 1257 SpellDocumentTag spellDocumentTag(); … … 1453 1453 1454 1454 #if ENABLE(RESOURCE_LOAD_STATISTICS) 1455 void requestStorageAccessConfirm(const WebCore::RegistrableDomain& subFrameDomain, const WebCore::RegistrableDomain& topFrameDomain, uint64_t frameID, CompletionHandler<void(bool)>&&);1455 void requestStorageAccessConfirm(const WebCore::RegistrableDomain& subFrameDomain, const WebCore::RegistrableDomain& topFrameDomain, WebCore::FrameIdentifier, CompletionHandler<void(bool)>&&); 1456 1456 void didCommitCrossSiteLoadWithDataTransferFromPrevalentResource(); 1457 1457 #endif 1458 1458 1459 1459 #if ENABLE(DEVICE_ORIENTATION) 1460 void shouldAllowDeviceOrientationAndMotionAccess( uint64_t frameID, WebCore::SecurityOriginData&&, bool mayPrompt, CompletionHandler<void(WebCore::DeviceOrientationOrMotionPermissionState)>&&);1460 void shouldAllowDeviceOrientationAndMotionAccess(WebCore::FrameIdentifier, WebCore::SecurityOriginData&&, bool mayPrompt, CompletionHandler<void(WebCore::DeviceOrientationOrMotionPermissionState)>&&); 1461 1461 #endif 1462 1462 … … 1499 1499 1500 1500 ProvisionalPageProxy* provisionalPageProxy() const { return m_provisionalPage.get(); } 1501 void commitProvisionalPage( uint64_t frameID, uint64_t navigationID, const String& mimeType, bool frameHasCustomContentProvider, uint32_t frameLoadType, const WebCore::CertificateInfo&, bool containsPluginDocument, Optional<WebCore::HasInsecureContent> forcedHasInsecureContent, const UserData&);1501 void commitProvisionalPage(WebCore::FrameIdentifier, uint64_t navigationID, const String& mimeType, bool frameHasCustomContentProvider, uint32_t frameLoadType, const WebCore::CertificateInfo&, bool containsPluginDocument, Optional<WebCore::HasInsecureContent> forcedHasInsecureContent, const UserData&); 1502 1502 1503 1503 // Logic shared between the WebPageProxy and the ProvisionalPageProxy. 1504 void didStartProvisionalLoadForFrameShared(Ref<WebProcessProxy>&&, uint64_t frameID, uint64_t navigationID, URL&&, URL&& unreachableURL, const UserData&);1505 void didFailProvisionalLoadForFrameShared(Ref<WebProcessProxy>&&, uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const String& provisionalURL, const WebCore::ResourceError&, WebCore::WillContinueLoading, const UserData&);1506 void didReceiveServerRedirectForProvisionalLoadForFrameShared(Ref<WebProcessProxy>&&, uint64_t frameID, uint64_t navigationID, WebCore::ResourceRequest&&, const UserData&);1507 void didPerformServerRedirectShared(Ref<WebProcessProxy>&&, const String& sourceURLString, const String& destinationURLString, uint64_t frameID);1508 void didPerformClientRedirectShared(Ref<WebProcessProxy>&&, const String& sourceURLString, const String& destinationURLString, uint64_t frameID);1509 void didNavigateWithNavigationDataShared(Ref<WebProcessProxy>&&, const WebNavigationDataStore&, uint64_t frameID);1510 void didChangeProvisionalURLForFrameShared(Ref<WebProcessProxy>&&, uint64_t frameID, uint64_t navigationID, URL&&);1511 void decidePolicyForNavigationActionAsyncShared(Ref<WebProcessProxy>&&, uint64_t frameID, WebCore::SecurityOriginData&& frameSecurityOrigin, WebCore::PolicyCheckIdentifier,1504 void didStartProvisionalLoadForFrameShared(Ref<WebProcessProxy>&&, WebCore::FrameIdentifier, uint64_t navigationID, URL&&, URL&& unreachableURL, const UserData&); 1505 void didFailProvisionalLoadForFrameShared(Ref<WebProcessProxy>&&, WebCore::FrameIdentifier, const WebCore::SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const String& provisionalURL, const WebCore::ResourceError&, WebCore::WillContinueLoading, const UserData&); 1506 void didReceiveServerRedirectForProvisionalLoadForFrameShared(Ref<WebProcessProxy>&&, WebCore::FrameIdentifier, uint64_t navigationID, WebCore::ResourceRequest&&, const UserData&); 1507 void didPerformServerRedirectShared(Ref<WebProcessProxy>&&, const String& sourceURLString, const String& destinationURLString, WebCore::FrameIdentifier); 1508 void didPerformClientRedirectShared(Ref<WebProcessProxy>&&, const String& sourceURLString, const String& destinationURLString, WebCore::FrameIdentifier); 1509 void didNavigateWithNavigationDataShared(Ref<WebProcessProxy>&&, const WebNavigationDataStore&, WebCore::FrameIdentifier); 1510 void didChangeProvisionalURLForFrameShared(Ref<WebProcessProxy>&&, WebCore::FrameIdentifier, uint64_t navigationID, URL&&); 1511 void decidePolicyForNavigationActionAsyncShared(Ref<WebProcessProxy>&&, WebCore::FrameIdentifier, WebCore::SecurityOriginData&& frameSecurityOrigin, WebCore::PolicyCheckIdentifier, 1512 1512 uint64_t navigationID, NavigationActionData&&, FrameInfoData&&, Optional<WebCore::PageIdentifier> originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, 1513 1513 IPC::FormDataReference&& requestBody, WebCore::ResourceResponse&& redirectResponse, const UserData&, uint64_t listenerID); 1514 void decidePolicyForResponseShared(Ref<WebProcessProxy>&&, uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, WebCore::PolicyCheckIdentifier,1514 void decidePolicyForResponseShared(Ref<WebProcessProxy>&&, WebCore::FrameIdentifier, const WebCore::SecurityOriginData& frameSecurityOrigin, WebCore::PolicyCheckIdentifier, 1515 1515 uint64_t navigationID, const WebCore::ResourceResponse&, const WebCore::ResourceRequest&, bool canShowMIMEType, const String& downloadAttribute, uint64_t listenerID, const UserData&); 1516 1516 void startURLSchemeTaskShared(Ref<WebProcessProxy>&&, URLSchemeTaskParameters&&); … … 1518 1518 void loadRequestWithNavigationShared(Ref<WebProcessProxy>&&, API::Navigation&, WebCore::ResourceRequest&&, WebCore::ShouldOpenExternalURLsPolicy, API::Object* userData, WebCore::ShouldTreatAsContinuingLoad, Optional<WebsitePoliciesData>&& = WTF::nullopt); 1519 1519 void backForwardGoToItemShared(Ref<WebProcessProxy>&&, const WebCore::BackForwardItemIdentifier&, CompletionHandler<void(SandboxExtension::Handle&&)>&&); 1520 void decidePolicyForNavigationActionSyncShared(Ref<WebProcessProxy>&&, uint64_t frameID, bool isMainFrame, WebCore::SecurityOriginData&&, WebCore::PolicyCheckIdentifier, uint64_t navigationID, NavigationActionData&&,1520 void decidePolicyForNavigationActionSyncShared(Ref<WebProcessProxy>&&, WebCore::FrameIdentifier, bool isMainFrame, WebCore::SecurityOriginData&&, WebCore::PolicyCheckIdentifier, uint64_t navigationID, NavigationActionData&&, 1521 1521 FrameInfoData&&, Optional<WebCore::PageIdentifier> originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, IPC::FormDataReference&& requestBody, 1522 1522 WebCore::ResourceResponse&& redirectResponse, const UserData&, Messages::WebPageProxy::DecidePolicyForNavigationActionSync::DelayedReply&&); … … 1525 1525 #endif 1526 1526 #if ENABLE(CONTENT_FILTERING) 1527 void contentFilterDidBlockLoadForFrameShared(Ref<WebProcessProxy>&&, const WebCore::ContentFilterUnblockHandler&, uint64_t frameID);1527 void contentFilterDidBlockLoadForFrameShared(Ref<WebProcessProxy>&&, const WebCore::ContentFilterUnblockHandler&, WebCore::FrameIdentifier); 1528 1528 #endif 1529 1529 … … 1562 1562 void didReceiveSyncMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&) override; 1563 1563 1564 void requestStorageSpace( uint64_t frameID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, WTF::CompletionHandler<void(uint64_t)>&&);1564 void requestStorageSpace(WebCore::FrameIdentifier, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, WTF::CompletionHandler<void(uint64_t)>&&); 1565 1565 1566 1566 URL currentResourceDirectoryURL() const; … … 1582 1582 void updateHiddenPageThrottlingAutoIncreases(); 1583 1583 1584 bool suspendCurrentPageIfPossible(API::Navigation&, Optional< uint64_t> mainFrameID, ProcessSwapRequestedByClient, ShouldDelayClosingUntilEnteringAcceleratedCompositingMode);1584 bool suspendCurrentPageIfPossible(API::Navigation&, Optional<WebCore::FrameIdentifier> mainFrameID, ProcessSwapRequestedByClient, ShouldDelayClosingUntilEnteringAcceleratedCompositingMode); 1585 1585 1586 1586 enum class ResetStateReason { … … 1611 1611 #endif 1612 1612 1613 void didCreateMainFrame( uint64_t frameID);1614 void didCreateSubframe( uint64_t frameID);1615 void didCreateWindow( uint64_t frameID, WebCore::GlobalWindowIdentifier&&);1616 1617 void didStartProvisionalLoadForFrame( uint64_t frameID, uint64_t navigationID, URL&&, URL&& unreachableURL, const UserData&);1618 void didReceiveServerRedirectForProvisionalLoadForFrame( uint64_t frameID, uint64_t navigationID, WebCore::ResourceRequest&&, const UserData&);1619 void willPerformClientRedirectForFrame( uint64_t frameID, const String& url, double delay, WebCore::LockBackForwardList);1620 void didCancelClientRedirectForFrame( uint64_t frameID);1621 void didChangeProvisionalURLForFrame( uint64_t frameID, uint64_t navigationID, URL&&);1622 void didFailProvisionalLoadForFrame( uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const String& provisionalURL, const WebCore::ResourceError&, WebCore::WillContinueLoading, const UserData&);1623 void didCommitLoadForFrame( uint64_t frameID, uint64_t navigationID, const String& mimeType, bool frameHasCustomContentProvider, uint32_t frameLoadType, const WebCore::CertificateInfo&, bool containsPluginDocument, Optional<WebCore::HasInsecureContent> forcedHasInsecureContent, const UserData&);1624 void didFinishDocumentLoadForFrame( uint64_t frameID, uint64_t navigationID, const UserData&);1625 void didFinishLoadForFrame( uint64_t frameID, uint64_t navigationID, const UserData&);1626 void didFailLoadForFrame( uint64_t frameID, uint64_t navigationID, const WebCore::ResourceError&, const UserData&);1627 void didSameDocumentNavigationForFrame( uint64_t frameID, uint64_t navigationID, uint32_t sameDocumentNavigationType, URL&&, const UserData&);1628 void didChangeMainDocument( uint64_t frameID);1629 void didExplicitOpenForFrame( uint64_t frameID, URL&&);1630 1631 void didReceiveTitleForFrame( uint64_t frameID, const String&, const UserData&);1632 void didFirstLayoutForFrame( uint64_t frameID, const UserData&);1633 void didFirstVisuallyNonEmptyLayoutForFrame( uint64_t frameID, const UserData&);1634 void didDisplayInsecureContentForFrame( uint64_t frameID, const UserData&);1635 void didRunInsecureContentForFrame( uint64_t frameID, const UserData&);1636 void didDetectXSSForFrame( uint64_t frameID, const UserData&);1613 void didCreateMainFrame(WebCore::FrameIdentifier); 1614 void didCreateSubframe(WebCore::FrameIdentifier); 1615 void didCreateWindow(WebCore::FrameIdentifier, WebCore::GlobalWindowIdentifier&&); 1616 1617 void didStartProvisionalLoadForFrame(WebCore::FrameIdentifier, uint64_t navigationID, URL&&, URL&& unreachableURL, const UserData&); 1618 void didReceiveServerRedirectForProvisionalLoadForFrame(WebCore::FrameIdentifier, uint64_t navigationID, WebCore::ResourceRequest&&, const UserData&); 1619 void willPerformClientRedirectForFrame(WebCore::FrameIdentifier, const String& url, double delay, WebCore::LockBackForwardList); 1620 void didCancelClientRedirectForFrame(WebCore::FrameIdentifier); 1621 void didChangeProvisionalURLForFrame(WebCore::FrameIdentifier, uint64_t navigationID, URL&&); 1622 void didFailProvisionalLoadForFrame(WebCore::FrameIdentifier, const WebCore::SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const String& provisionalURL, const WebCore::ResourceError&, WebCore::WillContinueLoading, const UserData&); 1623 void didCommitLoadForFrame(WebCore::FrameIdentifier, uint64_t navigationID, const String& mimeType, bool frameHasCustomContentProvider, uint32_t frameLoadType, const WebCore::CertificateInfo&, bool containsPluginDocument, Optional<WebCore::HasInsecureContent> forcedHasInsecureContent, const UserData&); 1624 void didFinishDocumentLoadForFrame(WebCore::FrameIdentifier, uint64_t navigationID, const UserData&); 1625 void didFinishLoadForFrame(WebCore::FrameIdentifier, uint64_t navigationID, const UserData&); 1626 void didFailLoadForFrame(WebCore::FrameIdentifier, uint64_t navigationID, const WebCore::ResourceError&, const UserData&); 1627 void didSameDocumentNavigationForFrame(WebCore::FrameIdentifier, uint64_t navigationID, uint32_t sameDocumentNavigationType, URL&&, const UserData&); 1628 void didChangeMainDocument(WebCore::FrameIdentifier); 1629 void didExplicitOpenForFrame(WebCore::FrameIdentifier, URL&&); 1630 1631 void didReceiveTitleForFrame(WebCore::FrameIdentifier, const String&, const UserData&); 1632 void didFirstLayoutForFrame(WebCore::FrameIdentifier, const UserData&); 1633 void didFirstVisuallyNonEmptyLayoutForFrame(WebCore::FrameIdentifier, const UserData&); 1634 void didDisplayInsecureContentForFrame(WebCore::FrameIdentifier, const UserData&); 1635 void didRunInsecureContentForFrame(WebCore::FrameIdentifier, const UserData&); 1636 void didDetectXSSForFrame(WebCore::FrameIdentifier, const UserData&); 1637 1637 void mainFramePluginHandlesPageScaleGestureDidChange(bool); 1638 void frameDidBecomeFrameSet( uint64_t frameID, bool);1638 void frameDidBecomeFrameSet(WebCore::FrameIdentifier, bool); 1639 1639 void didStartProgress(); 1640 1640 void didChangeProgress(double); … … 1649 1649 FrameInfoData&&, Optional<WebCore::PageIdentifier> originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, IPC::FormDataReference&& requestBody, 1650 1650 WebCore::ResourceResponse&& redirectResponse, const UserData&, Ref<PolicyDecisionSender>&&); 1651 void decidePolicyForNavigationActionAsync( uint64_t frameID, WebCore::SecurityOriginData&&, WebCore::PolicyCheckIdentifier, uint64_t navigationID, NavigationActionData&&,1651 void decidePolicyForNavigationActionAsync(WebCore::FrameIdentifier, WebCore::SecurityOriginData&&, WebCore::PolicyCheckIdentifier, uint64_t navigationID, NavigationActionData&&, 1652 1652 FrameInfoData&&, Optional<WebCore::PageIdentifier> originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, IPC::FormDataReference&& requestBody, 1653 1653 WebCore::ResourceResponse&& redirectResponse, const UserData&, uint64_t listenerID); 1654 void decidePolicyForNavigationActionSync( uint64_t frameID, bool isMainFrame, WebCore::SecurityOriginData&&, WebCore::PolicyCheckIdentifier, uint64_t navigationID, NavigationActionData&&,1654 void decidePolicyForNavigationActionSync(WebCore::FrameIdentifier, bool isMainFrame, WebCore::SecurityOriginData&&, WebCore::PolicyCheckIdentifier, uint64_t navigationID, NavigationActionData&&, 1655 1655 FrameInfoData&&, Optional<WebCore::PageIdentifier> originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, IPC::FormDataReference&& requestBody, 1656 1656 WebCore::ResourceResponse&& redirectResponse, const UserData&, Messages::WebPageProxy::DecidePolicyForNavigationActionSync::DelayedReply&&); 1657 void decidePolicyForNewWindowAction( uint64_t frameID, const WebCore::SecurityOriginData&, WebCore::PolicyCheckIdentifier, NavigationActionData&&,1657 void decidePolicyForNewWindowAction(WebCore::FrameIdentifier, const WebCore::SecurityOriginData&, WebCore::PolicyCheckIdentifier, NavigationActionData&&, 1658 1658 WebCore::ResourceRequest&&, const String& frameName, uint64_t listenerID, const UserData&); 1659 void decidePolicyForResponse( uint64_t frameID, const WebCore::SecurityOriginData&, WebCore::PolicyCheckIdentifier, uint64_t navigationID,1659 void decidePolicyForResponse(WebCore::FrameIdentifier, const WebCore::SecurityOriginData&, WebCore::PolicyCheckIdentifier, uint64_t navigationID, 1660 1660 const WebCore::ResourceResponse&, const WebCore::ResourceRequest&, bool canShowMIMEType, const String& downloadAttribute, uint64_t listenerID, const UserData&); 1661 void unableToImplementPolicy( uint64_t frameID, const WebCore::ResourceError&, const UserData&);1661 void unableToImplementPolicy(WebCore::FrameIdentifier, const WebCore::ResourceError&, const UserData&); 1662 1662 void beginSafeBrowsingCheck(const URL&, bool, WebFramePolicyListenerProxy&); 1663 1663 1664 1664 WebContentMode effectiveContentModeAfterAdjustingPolicies(API::WebsitePolicies&, const WebCore::ResourceRequest&); 1665 1665 1666 void willSubmitForm( uint64_t frameID, uint64_tsourceFrameID, const Vector<std::pair<String, String>>& textFieldValues, uint64_t listenerID, const UserData&);1666 void willSubmitForm(WebCore::FrameIdentifier, WebCore::FrameIdentifier sourceFrameID, const Vector<std::pair<String, String>>& textFieldValues, uint64_t listenerID, const UserData&); 1667 1667 1668 1668 void contentRuleListNotification(URL&&, WebCore::ContentRuleListResults&&); 1669 1669 1670 1670 // History client 1671 void didNavigateWithNavigationData(const WebNavigationDataStore&, uint64_t frameID);1672 void didPerformClientRedirect(const String& sourceURLString, const String& destinationURLString, uint64_t frameID);1673 void didPerformServerRedirect(const String& sourceURLString, const String& destinationURLString, uint64_t frameID);1674 void didUpdateHistoryTitle(const String& title, const String& url, uint64_t frameID);1671 void didNavigateWithNavigationData(const WebNavigationDataStore&, WebCore::FrameIdentifier); 1672 void didPerformClientRedirect(const String& sourceURLString, const String& destinationURLString, WebCore::FrameIdentifier); 1673 void didPerformServerRedirect(const String& sourceURLString, const String& destinationURLString, WebCore::FrameIdentifier); 1674 void didUpdateHistoryTitle(const String& title, const String& url, WebCore::FrameIdentifier); 1675 1675 1676 1676 // UI client 1677 1677 void createNewPage(const FrameInfoData&, Optional<WebCore::PageIdentifier> originatingPageID, WebCore::ResourceRequest&&, WebCore::WindowFeatures&&, NavigationActionData&&, Messages::WebPageProxy::CreateNewPage::DelayedReply&&); 1678 1678 void showPage(); 1679 void runJavaScriptAlert( uint64_t frameID, const WebCore::SecurityOriginData&, const String&, Messages::WebPageProxy::RunJavaScriptAlert::DelayedReply&&);1680 void runJavaScriptConfirm( uint64_t frameID, const WebCore::SecurityOriginData&, const String&, Messages::WebPageProxy::RunJavaScriptConfirm::DelayedReply&&);1681 void runJavaScriptPrompt( uint64_t frameID, const WebCore::SecurityOriginData&, const String&, const String&, Messages::WebPageProxy::RunJavaScriptPrompt::DelayedReply&&);1679 void runJavaScriptAlert(WebCore::FrameIdentifier, const WebCore::SecurityOriginData&, const String&, Messages::WebPageProxy::RunJavaScriptAlert::DelayedReply&&); 1680 void runJavaScriptConfirm(WebCore::FrameIdentifier, const WebCore::SecurityOriginData&, const String&, Messages::WebPageProxy::RunJavaScriptConfirm::DelayedReply&&); 1681 void runJavaScriptPrompt(WebCore::FrameIdentifier, const WebCore::SecurityOriginData&, const String&, const String&, Messages::WebPageProxy::RunJavaScriptPrompt::DelayedReply&&); 1682 1682 void setStatusText(const String&); 1683 1683 void mouseDidMoveOverElement(WebHitTestResultData&&, uint32_t modifiers, UserData&&); … … 1702 1702 void accessibilityScreenToRootView(const WebCore::IntPoint& screenPoint, CompletionHandler<void(WebCore::IntPoint)>&&); 1703 1703 void rootViewToAccessibilityScreen(const WebCore::IntRect& viewRect, CompletionHandler<void(WebCore::IntRect)>&&); 1704 void runBeforeUnloadConfirmPanel( uint64_t frameID, const WebCore::SecurityOriginData&, const String& message, Messages::WebPageProxy::RunBeforeUnloadConfirmPanel::DelayedReply&&);1704 void runBeforeUnloadConfirmPanel(WebCore::FrameIdentifier, const WebCore::SecurityOriginData&, const String& message, Messages::WebPageProxy::RunBeforeUnloadConfirmPanel::DelayedReply&&); 1705 1705 void didChangeViewportProperties(const WebCore::ViewportAttributes&); 1706 1706 void pageDidScroll(); 1707 void runOpenPanel( uint64_t frameID, const WebCore::SecurityOriginData&, const WebCore::FileChooserSettings&);1707 void runOpenPanel(WebCore::FrameIdentifier, const WebCore::SecurityOriginData&, const WebCore::FileChooserSettings&); 1708 1708 void showShareSheet(const WebCore::ShareDataWithParsedURL&, ShareSheetCallbackID); 1709 void printFrame( uint64_t frameID, CompletionHandler<void()>&&);1710 void exceededDatabaseQuota( uint64_t frameID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply&&);1709 void printFrame(WebCore::FrameIdentifier, CompletionHandler<void()>&&); 1710 void exceededDatabaseQuota(WebCore::FrameIdentifier, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply&&); 1711 1711 void reachedApplicationCacheOriginQuota(const String& originIdentifier, uint64_t currentQuota, uint64_t totalBytesNeeded, Messages::WebPageProxy::ReachedApplicationCacheOriginQuota::DelayedReply&&); 1712 void requestGeolocationPermissionForFrame(uint64_t geolocationID, uint64_t frameID, String originIdentifier);1712 void requestGeolocationPermissionForFrame(uint64_t geolocationID, WebCore::FrameIdentifier, String originIdentifier); 1713 1713 1714 1714 #if ENABLE(MEDIA_STREAM) 1715 1715 UserMediaPermissionRequestManagerProxy& userMediaPermissionRequestManager(); 1716 1716 #endif 1717 void requestUserMediaPermissionForFrame(uint64_t userMediaID, uint64_t frameID, const WebCore::SecurityOriginData& userMediaDocumentOriginIdentifier, const WebCore::SecurityOriginData& topLevelDocumentOriginIdentifier, WebCore::MediaStreamRequest&&);1718 void enumerateMediaDevicesForFrame(uint64_t userMediaID, uint64_t frameID, const WebCore::SecurityOriginData& userMediaDocumentOriginData, const WebCore::SecurityOriginData& topLevelDocumentOriginData);1717 void requestUserMediaPermissionForFrame(uint64_t userMediaID, WebCore::FrameIdentifier, const WebCore::SecurityOriginData& userMediaDocumentOriginIdentifier, const WebCore::SecurityOriginData& topLevelDocumentOriginIdentifier, WebCore::MediaStreamRequest&&); 1718 void enumerateMediaDevicesForFrame(uint64_t userMediaID, WebCore::FrameIdentifier, const WebCore::SecurityOriginData& userMediaDocumentOriginData, const WebCore::SecurityOriginData& topLevelDocumentOriginData); 1719 1719 void beginMonitoringCaptureDevices(); 1720 1720 … … 1896 1896 #endif 1897 1897 1898 void focusedFrameChanged( uint64_t frameID);1899 void frameSetLargestFrameChanged( uint64_t frameID);1898 void focusedFrameChanged(const Optional<WebCore::FrameIdentifier>&); 1899 void frameSetLargestFrameChanged(const Optional<WebCore::FrameIdentifier>&); 1900 1900 1901 1901 void didFinishLoadingDataForCustomContentProvider(const String& suggestedFilename, const IPC::DataReference&); … … 1998 1998 1999 1999 #if ENABLE(CONTENT_FILTERING) 2000 void contentFilterDidBlockLoadForFrame(const WebCore::ContentFilterUnblockHandler&, uint64_t frameID);2000 void contentFilterDidBlockLoadForFrame(const WebCore::ContentFilterUnblockHandler&, WebCore::FrameIdentifier); 2001 2001 #endif 2002 2002 … … 2111 2111 #endif 2112 2112 2113 void makeStorageSpaceRequest( uint64_t frameID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, CompletionHandler<void(uint64_t)>&&);2113 void makeStorageSpaceRequest(WebCore::FrameIdentifier, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, CompletionHandler<void(uint64_t)>&&); 2114 2114 2115 2115 WeakPtr<PageClient> m_pageClient; -
trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in
r247755 r248713 26 26 ShowPage() 27 27 ClosePage(bool stopResponsivenessTimer) 28 RunJavaScriptAlert( uint64_tframeID, struct WebCore::SecurityOriginData frameSecurityOrigin, String message) -> () Synchronous29 RunJavaScriptConfirm( uint64_tframeID, struct WebCore::SecurityOriginData frameSecurityOrigin, String message) -> (bool result) Synchronous30 RunJavaScriptPrompt( uint64_tframeID, struct WebCore::SecurityOriginData frameSecurityOrigin, String message, String defaultValue) -> (String result) Synchronous28 RunJavaScriptAlert(WebCore::FrameIdentifier frameID, struct WebCore::SecurityOriginData frameSecurityOrigin, String message) -> () Synchronous 29 RunJavaScriptConfirm(WebCore::FrameIdentifier frameID, struct WebCore::SecurityOriginData frameSecurityOrigin, String message) -> (bool result) Synchronous 30 RunJavaScriptPrompt(WebCore::FrameIdentifier frameID, struct WebCore::SecurityOriginData frameSecurityOrigin, String message, String defaultValue) -> (String result) Synchronous 31 31 MouseDidMoveOverElement(struct WebKit::WebHitTestResultData hitTestResultData, uint32_t modifiers, WebKit::UserData userData) 32 32 … … 48 48 SetFocus(bool focused) 49 49 TakeFocus(uint32_t direction) 50 FocusedFrameChanged( uint64_tframeID)51 FrameSetLargestFrameChanged( uint64_tframeID)50 FocusedFrameChanged(Optional<WebCore::FrameIdentifier> frameID) 51 FrameSetLargestFrameChanged(Optional<WebCore::FrameIdentifier> frameID) 52 52 SetRenderTreeSize(uint64_t treeSize) 53 53 SetToolbarsAreVisible(bool toolbarsAreVisible) … … 70 70 #endif 71 71 72 RunBeforeUnloadConfirmPanel( uint64_tframeID, struct WebCore::SecurityOriginData frameSecurityOrigin, String message) -> (bool shouldClose) Synchronous72 RunBeforeUnloadConfirmPanel(WebCore::FrameIdentifier frameID, struct WebCore::SecurityOriginData frameSecurityOrigin, String message) -> (bool shouldClose) Synchronous 73 73 PageDidScroll() 74 RunOpenPanel( uint64_tframeID, struct WebCore::SecurityOriginData frameSecurityOrigin, struct WebCore::FileChooserSettings parameters)74 RunOpenPanel(WebCore::FrameIdentifier frameID, struct WebCore::SecurityOriginData frameSecurityOrigin, struct WebCore::FileChooserSettings parameters) 75 75 ShowShareSheet(struct WebCore::ShareDataWithParsedURL shareData, uint64_t callbackID) 76 PrintFrame( uint64_tframeID) -> () Synchronous76 PrintFrame(WebCore::FrameIdentifier frameID) -> () Synchronous 77 77 RunModal() 78 78 NotifyScrollerThumbIsVisibleInRect(WebCore::IntRect scrollerThumb) … … 104 104 105 105 # Policy messages 106 DecidePolicyForResponse( uint64_tframeID, struct WebCore::SecurityOriginData frameSecurityOrigin, WebCore::PolicyCheckIdentifier policyCheckIdentifier, uint64_t navigationID, WebCore::ResourceResponse response, WebCore::ResourceRequest request, bool canShowMIMEType, String downloadAttribute, uint64_t listenerID, WebKit::UserData userData)107 DecidePolicyForNavigationActionAsync( uint64_tframeID, struct WebCore::SecurityOriginData frameSecurityOrigin, WebCore::PolicyCheckIdentifier policyCheckIdentifier, uint64_t navigationID, struct WebKit::NavigationActionData navigationActionData, struct WebKit::FrameInfoData originatingFrameInfoData, Optional<WebCore::PageIdentifier> originatingPageID, WebCore::ResourceRequest originalRequest, WebCore::ResourceRequest request, IPC::FormDataReference requestBody, WebCore::ResourceResponse redirectResponse, WebKit::UserData userData, uint64_t listenerID)108 DecidePolicyForNavigationActionSync( uint64_tframeID, bool isMainFrame, struct WebCore::SecurityOriginData frameSecurityOrigin, WebCore::PolicyCheckIdentifier policyCheckIdentifier, uint64_t navigationID, struct WebKit::NavigationActionData navigationActionData, struct WebKit::FrameInfoData originatingFrameInfoData, Optional<WebCore::PageIdentifier> originatingPageID, WebCore::ResourceRequest originalRequest, WebCore::ResourceRequest request, IPC::FormDataReference requestBody, WebCore::ResourceResponse redirectResponse, WebKit::UserData userData) -> (WebCore::PolicyCheckIdentifier policyCheckIdentifier, enum:uint8_t WebCore::PolicyAction policyAction, uint64_t newNavigationID, WebKit::DownloadID downloadID, Optional<WebKit::WebsitePoliciesData> websitePolicies) Synchronous109 DecidePolicyForNewWindowAction( uint64_tframeID, struct WebCore::SecurityOriginData frameSecurityOrigin, WebCore::PolicyCheckIdentifier policyCheckIdentifier, struct WebKit::NavigationActionData navigationActionData, WebCore::ResourceRequest request, String frameName, uint64_t listenerID, WebKit::UserData userData)110 UnableToImplementPolicy( uint64_tframeID, WebCore::ResourceError error, WebKit::UserData userData)106 DecidePolicyForResponse(WebCore::FrameIdentifier frameID, struct WebCore::SecurityOriginData frameSecurityOrigin, WebCore::PolicyCheckIdentifier policyCheckIdentifier, uint64_t navigationID, WebCore::ResourceResponse response, WebCore::ResourceRequest request, bool canShowMIMEType, String downloadAttribute, uint64_t listenerID, WebKit::UserData userData) 107 DecidePolicyForNavigationActionAsync(WebCore::FrameIdentifier frameID, struct WebCore::SecurityOriginData frameSecurityOrigin, WebCore::PolicyCheckIdentifier policyCheckIdentifier, uint64_t navigationID, struct WebKit::NavigationActionData navigationActionData, struct WebKit::FrameInfoData originatingFrameInfoData, Optional<WebCore::PageIdentifier> originatingPageID, WebCore::ResourceRequest originalRequest, WebCore::ResourceRequest request, IPC::FormDataReference requestBody, WebCore::ResourceResponse redirectResponse, WebKit::UserData userData, uint64_t listenerID) 108 DecidePolicyForNavigationActionSync(WebCore::FrameIdentifier frameID, bool isMainFrame, struct WebCore::SecurityOriginData frameSecurityOrigin, WebCore::PolicyCheckIdentifier policyCheckIdentifier, uint64_t navigationID, struct WebKit::NavigationActionData navigationActionData, struct WebKit::FrameInfoData originatingFrameInfoData, Optional<WebCore::PageIdentifier> originatingPageID, WebCore::ResourceRequest originalRequest, WebCore::ResourceRequest request, IPC::FormDataReference requestBody, WebCore::ResourceResponse redirectResponse, WebKit::UserData userData) -> (WebCore::PolicyCheckIdentifier policyCheckIdentifier, enum:uint8_t WebCore::PolicyAction policyAction, uint64_t newNavigationID, WebKit::DownloadID downloadID, Optional<WebKit::WebsitePoliciesData> websitePolicies) Synchronous 109 DecidePolicyForNewWindowAction(WebCore::FrameIdentifier frameID, struct WebCore::SecurityOriginData frameSecurityOrigin, WebCore::PolicyCheckIdentifier policyCheckIdentifier, struct WebKit::NavigationActionData navigationActionData, WebCore::ResourceRequest request, String frameName, uint64_t listenerID, WebKit::UserData userData) 110 UnableToImplementPolicy(WebCore::FrameIdentifier frameID, WebCore::ResourceError error, WebKit::UserData userData) 111 111 112 112 # Progress messages … … 118 118 119 119 # Frame lifetime messages 120 DidCreateMainFrame( uint64_tframeID)121 DidCreateSubframe( uint64_tframeID)122 123 DidCreateWindow( uint64_tframeID, struct WebCore::GlobalWindowIdentifier windowIdentifier)120 DidCreateMainFrame(WebCore::FrameIdentifier frameID) 121 DidCreateSubframe(WebCore::FrameIdentifier frameID) 122 123 DidCreateWindow(WebCore::FrameIdentifier frameID, struct WebCore::GlobalWindowIdentifier windowIdentifier) 124 124 125 125 # Frame load messages 126 DidStartProvisionalLoadForFrame( uint64_tframeID, uint64_t navigationID, URL url, URL unreachableURL, WebKit::UserData userData)127 DidReceiveServerRedirectForProvisionalLoadForFrame( uint64_tframeID, uint64_t navigationID, WebCore::ResourceRequest request, WebKit::UserData userData)128 WillPerformClientRedirectForFrame( uint64_tframeID, String url, double delay, enum:bool WebCore::LockBackForwardList lockBackForwardList)129 DidCancelClientRedirectForFrame( uint64_tframeID)130 DidChangeProvisionalURLForFrame( uint64_tframeID, uint64_t navigationID, URL url)131 DidFailProvisionalLoadForFrame( uint64_tframeID, struct WebCore::SecurityOriginData frameSecurityOrigin, uint64_t navigationID, String provisionalURL, WebCore::ResourceError error, enum:bool WebCore::WillContinueLoading willContinueLoading, WebKit::UserData userData)132 DidCommitLoadForFrame( uint64_tframeID, uint64_t navigationID, String mimeType, bool hasCustomContentProvider, uint32_t loadType, WebCore::CertificateInfo certificateInfo, bool containsPluginDocument, Optional<WebCore::HasInsecureContent> forcedHasInsecureContent, WebKit::UserData userData)133 DidFailLoadForFrame( uint64_tframeID, uint64_t navigationID, WebCore::ResourceError error, WebKit::UserData userData)134 DidFinishDocumentLoadForFrame( uint64_tframeID, uint64_t navigationID, WebKit::UserData userData)135 DidFinishLoadForFrame( uint64_tframeID, uint64_t navigationID, WebKit::UserData userData)136 DidFirstLayoutForFrame( uint64_tframeID, WebKit::UserData userData)137 DidFirstVisuallyNonEmptyLayoutForFrame( uint64_tframeID, WebKit::UserData userData)126 DidStartProvisionalLoadForFrame(WebCore::FrameIdentifier frameID, uint64_t navigationID, URL url, URL unreachableURL, WebKit::UserData userData) 127 DidReceiveServerRedirectForProvisionalLoadForFrame(WebCore::FrameIdentifier frameID, uint64_t navigationID, WebCore::ResourceRequest request, WebKit::UserData userData) 128 WillPerformClientRedirectForFrame(WebCore::FrameIdentifier frameID, String url, double delay, enum:bool WebCore::LockBackForwardList lockBackForwardList) 129 DidCancelClientRedirectForFrame(WebCore::FrameIdentifier frameID) 130 DidChangeProvisionalURLForFrame(WebCore::FrameIdentifier frameID, uint64_t navigationID, URL url) 131 DidFailProvisionalLoadForFrame(WebCore::FrameIdentifier frameID, struct WebCore::SecurityOriginData frameSecurityOrigin, uint64_t navigationID, String provisionalURL, WebCore::ResourceError error, enum:bool WebCore::WillContinueLoading willContinueLoading, WebKit::UserData userData) 132 DidCommitLoadForFrame(WebCore::FrameIdentifier frameID, uint64_t navigationID, String mimeType, bool hasCustomContentProvider, uint32_t loadType, WebCore::CertificateInfo certificateInfo, bool containsPluginDocument, Optional<WebCore::HasInsecureContent> forcedHasInsecureContent, WebKit::UserData userData) 133 DidFailLoadForFrame(WebCore::FrameIdentifier frameID, uint64_t navigationID, WebCore::ResourceError error, WebKit::UserData userData) 134 DidFinishDocumentLoadForFrame(WebCore::FrameIdentifier frameID, uint64_t navigationID, WebKit::UserData userData) 135 DidFinishLoadForFrame(WebCore::FrameIdentifier frameID, uint64_t navigationID, WebKit::UserData userData) 136 DidFirstLayoutForFrame(WebCore::FrameIdentifier frameID, WebKit::UserData userData) 137 DidFirstVisuallyNonEmptyLayoutForFrame(WebCore::FrameIdentifier frameID, WebKit::UserData userData) 138 138 DidReachLayoutMilestone(OptionSet<WebCore::LayoutMilestone> layoutMilestones) 139 DidReceiveTitleForFrame( uint64_tframeID, String title, WebKit::UserData userData)140 DidDisplayInsecureContentForFrame( uint64_tframeID, WebKit::UserData userData)141 DidRunInsecureContentForFrame( uint64_tframeID, WebKit::UserData userData)142 DidDetectXSSForFrame( uint64_tframeID, WebKit::UserData userData)143 DidSameDocumentNavigationForFrame( uint64_tframeID, uint64_t navigationID, uint32_t type, URL url, WebKit::UserData userData)144 DidChangeMainDocument( uint64_tframeID)145 DidExplicitOpenForFrame( uint64_tframeID, URL url)139 DidReceiveTitleForFrame(WebCore::FrameIdentifier frameID, String title, WebKit::UserData userData) 140 DidDisplayInsecureContentForFrame(WebCore::FrameIdentifier frameID, WebKit::UserData userData) 141 DidRunInsecureContentForFrame(WebCore::FrameIdentifier frameID, WebKit::UserData userData) 142 DidDetectXSSForFrame(WebCore::FrameIdentifier frameID, WebKit::UserData userData) 143 DidSameDocumentNavigationForFrame(WebCore::FrameIdentifier frameID, uint64_t navigationID, uint32_t type, URL url, WebKit::UserData userData) 144 DidChangeMainDocument(WebCore::FrameIdentifier frameID) 145 DidExplicitOpenForFrame(WebCore::FrameIdentifier frameID, URL url) 146 146 DidDestroyNavigation(uint64_t navigationID) 147 147 … … 150 150 MainFramePluginHandlesPageScaleGestureDidChange(bool mainFramePluginHandlesPageScaleGesture) 151 151 152 FrameDidBecomeFrameSet( uint64_tframeID, bool value)152 FrameDidBecomeFrameSet(WebCore::FrameIdentifier frameID, bool value) 153 153 154 154 # History client messages. 155 DidNavigateWithNavigationData(struct WebKit::WebNavigationDataStore store, uint64_tframeID)156 DidPerformClientRedirect(String sourceURLString, String destinationURLString, uint64_tframeID)157 DidPerformServerRedirect(String sourceURLString, String destinationURLString, uint64_tframeID)158 DidUpdateHistoryTitle(String title, String url, uint64_tframeID)155 DidNavigateWithNavigationData(struct WebKit::WebNavigationDataStore store, WebCore::FrameIdentifier frameID) 156 DidPerformClientRedirect(String sourceURLString, String destinationURLString, WebCore::FrameIdentifier frameID) 157 DidPerformServerRedirect(String sourceURLString, String destinationURLString, WebCore::FrameIdentifier frameID) 158 DidUpdateHistoryTitle(String title, String url, WebCore::FrameIdentifier frameID) 159 159 160 160 # Custom representations … … 162 162 163 163 # Forms messages 164 WillSubmitForm( uint64_t frameID, uint64_tsourceFrameID, Vector<std::pair<String, String>> textFieldValues, uint64_t listenerID, WebKit::UserData userData)164 WillSubmitForm(WebCore::FrameIdentifier frameID, WebCore::FrameIdentifier sourceFrameID, Vector<std::pair<String, String>> textFieldValues, uint64_t listenerID, WebKit::UserData userData) 165 165 166 166 # Callback messages … … 276 276 277 277 # Database messages 278 ExceededDatabaseQuota( uint64_tframeID, String originIdentifier, String databaseName, String databaseDisplayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage) -> (uint64_t newQuota) Synchronous278 ExceededDatabaseQuota(WebCore::FrameIdentifier frameID, String originIdentifier, String databaseName, String databaseDisplayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage) -> (uint64_t newQuota) Synchronous 279 279 280 280 # Application cache messages … … 282 282 283 283 # Geolocation messages 284 RequestGeolocationPermissionForFrame(uint64_t geolocationID, uint64_tframeID, String originIdentifier)284 RequestGeolocationPermissionForFrame(uint64_t geolocationID, WebCore::FrameIdentifier frameID, String originIdentifier) 285 285 286 286 #if ENABLE(MEDIA_STREAM) 287 287 # MediaSteam messages 288 RequestUserMediaPermissionForFrame(uint64_t userMediaID, uint64_tframeID, struct WebCore::SecurityOriginData userMediaDocumentOriginIdentifier, struct WebCore::SecurityOriginData topLevelDocumentOriginIdentifier, struct WebCore::MediaStreamRequest request)289 EnumerateMediaDevicesForFrame(uint64_t userMediaID, uint64_tframeID, struct WebCore::SecurityOriginData userMediaDocumentOriginIdentifier, struct WebCore::SecurityOriginData topLevelDocumentOriginIdentifier)288 RequestUserMediaPermissionForFrame(uint64_t userMediaID, WebCore::FrameIdentifier frameID, struct WebCore::SecurityOriginData userMediaDocumentOriginIdentifier, struct WebCore::SecurityOriginData topLevelDocumentOriginIdentifier, struct WebCore::MediaStreamRequest request) 289 EnumerateMediaDevicesForFrame(uint64_t userMediaID, WebCore::FrameIdentifier frameID, struct WebCore::SecurityOriginData userMediaDocumentOriginIdentifier, struct WebCore::SecurityOriginData topLevelDocumentOriginIdentifier) 290 290 BeginMonitoringCaptureDevices() 291 291 #endif … … 474 474 475 475 #if ENABLE(CONTENT_FILTERING) 476 ContentFilterDidBlockLoadForFrame(WebCore::ContentFilterUnblockHandler unblockHandler, uint64_tframeID)476 ContentFilterDidBlockLoadForFrame(WebCore::ContentFilterUnblockHandler unblockHandler, WebCore::FrameIdentifier frameID) 477 477 #endif 478 478 … … 540 540 541 541 #if ENABLE(DEVICE_ORIENTATION) 542 ShouldAllowDeviceOrientationAndMotionAccess( uint64_tframeID, struct WebCore::SecurityOriginData origin, bool mayPrompt) -> (enum:uint8_t WebCore::DeviceOrientationOrMotionPermissionState permissionState) Async542 ShouldAllowDeviceOrientationAndMotionAccess(WebCore::FrameIdentifier frameID, struct WebCore::SecurityOriginData origin, bool mayPrompt) -> (enum:uint8_t WebCore::DeviceOrientationOrMotionPermissionState permissionState) Async 543 543 #endif 544 544 -
trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp
r248598 r248713 828 828 } 829 829 830 WebFrameProxy* WebProcessProxy::webFrame( uint64_tframeID) const830 WebFrameProxy* WebProcessProxy::webFrame(FrameIdentifier frameID) const 831 831 { 832 832 if (!WebFrameProxyMap::isValidKey(frameID)) 833 return 0;833 return nullptr; 834 834 835 835 return m_frameMap.get(frameID); 836 836 } 837 837 838 bool WebProcessProxy::canCreateFrame( uint64_tframeID) const838 bool WebProcessProxy::canCreateFrame(FrameIdentifier frameID) const 839 839 { 840 840 return WebFrameProxyMap::isValidKey(frameID) && !m_frameMap.contains(frameID); 841 841 } 842 842 843 void WebProcessProxy::frameCreated( uint64_tframeID, WebFrameProxy& frameProxy)843 void WebProcessProxy::frameCreated(FrameIdentifier frameID, WebFrameProxy& frameProxy) 844 844 { 845 845 m_frameMap.set(frameID, &frameProxy); 846 846 } 847 847 848 void WebProcessProxy::didDestroyFrame( uint64_tframeID)848 void WebProcessProxy::didDestroyFrame(FrameIdentifier frameID) 849 849 { 850 850 // If the page is closed before it has had the chance to send the DidCreateMainFrame message -
trunk/Source/WebKit/UIProcess/WebProcessProxy.h
r248121 r248713 39 39 #include "WebConnectionToWebProcess.h" 40 40 #include "WebProcessProxyMessages.h" 41 #include <WebCore/FrameIdentifier.h> 41 42 #include <WebCore/MessagePortChannelProvider.h> 42 43 #include <WebCore/MessagePortIdentifier.h> … … 98 99 class WebProcessProxy : public AuxiliaryProcessProxy, public ResponsivenessTimer::Client, public ThreadSafeRefCounted<WebProcessProxy>, public CanMakeWeakPtr<WebProcessProxy>, private ProcessThrottlerClient { 99 100 public: 100 typedef HashMap< uint64_t, RefPtr<WebFrameProxy>> WebFrameProxyMap;101 typedef HashMap<WebCore::FrameIdentifier, RefPtr<WebFrameProxy>> WebFrameProxyMap; 101 102 typedef HashMap<WebCore::PageIdentifier, WebPageProxy*> WebPageProxyMap; 102 103 typedef HashMap<uint64_t, RefPtr<API::UserInitiatedAction>> UserInitiatedActionMap; … … 165 166 bool isResponsive() const; 166 167 167 WebFrameProxy* webFrame( uint64_t) const;168 bool canCreateFrame( uint64_t frameID) const;169 void frameCreated( uint64_t, WebFrameProxy&);168 WebFrameProxy* webFrame(WebCore::FrameIdentifier) const; 169 bool canCreateFrame(WebCore::FrameIdentifier) const; 170 void frameCreated(WebCore::FrameIdentifier, WebFrameProxy&); 170 171 void disconnectFramesFromPage(WebPageProxy*); // Including main frame. 171 172 size_t frameCountInPage(WebPageProxy*) const; // Including main frame. … … 336 337 // IPC message handlers. 337 338 void updateBackForwardItem(const BackForwardListItemState&); 338 void didDestroyFrame( uint64_t);339 void didDestroyFrame(WebCore::FrameIdentifier); 339 340 void didDestroyUserGestureToken(uint64_t); 340 341 -
trunk/Source/WebKit/UIProcess/WebProcessProxy.messages.in
r246413 r248713 23 23 messages -> WebProcessProxy LegacyReceiver { 24 24 UpdateBackForwardItem(struct WebKit::BackForwardListItemState backForwardListItemState) 25 DidDestroyFrame( uint64_tframeID)25 DidDestroyFrame(WebCore::FrameIdentifier frameID) 26 26 27 27 DidDestroyUserGestureToken(uint64_t userGestureTokenID) -
trunk/Source/WebKit/UIProcess/ios/WKContentView.mm
r247687 r248713 702 702 return 0; 703 703 704 uint64_tframeID;704 WebCore::FrameIdentifier frameID; 705 705 if (_WKFrameHandle *handle = printFormatter.frameToPrint) 706 frameID = handle._frameID;706 frameID = WebCore::frameIdentifierFromID(handle._frameID); 707 707 else if (auto mainFrame = _page->mainFrame()) 708 708 frameID = mainFrame->frameID(); -
trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
r248541 r248713 1067 1067 } 1068 1068 1069 uint32_t WebPageProxy::computePagesForPrintingAndDrawToPDF( uint64_tframeID, const PrintInfo& printInfo, DrawToPDFCallback::CallbackFunction&& callback)1069 uint32_t WebPageProxy::computePagesForPrintingAndDrawToPDF(FrameIdentifier frameID, const PrintInfo& printInfo, DrawToPDFCallback::CallbackFunction&& callback) 1070 1070 { 1071 1071 if (!hasRunningProcess()) { -
trunk/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp
r247529 r248713 144 144 return JSValueMakeUndefined(context); 145 145 146 uint64_t frameID = JSValueToNumber(context, arguments[0], exception);146 WebCore::FrameIdentifier frameID = WebCore::frameIdentifierFromID(JSValueToNumber(context, arguments[0], exception)); 147 147 uint64_t callbackID = JSValueToNumber(context, arguments[1], exception); 148 148 auto result = adoptRef(JSValueToStringCopy(context, arguments[2], exception)); … … 221 221 void WebAutomationSessionProxy::didClearWindowObjectForFrame(WebFrame& frame) 222 222 { 223 uint64_tframeID = frame.frameID();223 WebCore::FrameIdentifier frameID = frame.frameID(); 224 224 if (JSObjectRef scriptObject = m_webFrameScriptObjectMap.take(frameID)) 225 225 JSValueUnprotect(frame.jsContext(), scriptObject); … … 233 233 } 234 234 235 void WebAutomationSessionProxy::evaluateJavaScriptFunction(WebCore::PageIdentifier pageID, uint64_t frameID, const String& function, Vector<String> arguments, bool expectsImplicitCallbackArgument, int callbackTimeout, uint64_t callbackID)235 void WebAutomationSessionProxy::evaluateJavaScriptFunction(WebCore::PageIdentifier pageID, Optional<WebCore::FrameIdentifier> optionalFrameID, const String& function, Vector<String> arguments, bool expectsImplicitCallbackArgument, int callbackTimeout, uint64_t callbackID) 236 236 { 237 237 WebPage* page = WebProcess::singleton().webPage(pageID); … … 241 241 return; 242 242 } 243 WebFrame* frame = frameID ? WebProcess::singleton().webFrame(frameID) : page->mainWebFrame();243 WebFrame* frame = optionalFrameID ? WebProcess::singleton().webFrame(*optionalFrameID) : page->mainWebFrame(); 244 244 if (!frame) { 245 245 WebProcess::singleton().parentProcessConnection()->send(Messages::WebAutomationSession::DidEvaluateJavaScriptFunction(callbackID, { }, … … 251 251 ASSERT(scriptObject); 252 252 253 frameID = frame->frameID();253 auto frameID = frame->frameID(); 254 254 JSValueRef exception = nullptr; 255 255 JSGlobalContextRef context = frame->jsContext(); … … 264 264 toJSArray(context, arguments, toJSValue, &exception), 265 265 JSValueMakeBoolean(context, expectsImplicitCallbackArgument), 266 JSValueMakeNumber(context, frameID ),266 JSValueMakeNumber(context, frameID.toUInt64()), 267 267 JSValueMakeNumber(context, callbackID), 268 268 JSObjectMakeFunctionWithCallback(context, nullptr, evaluateJavaScriptCallback), … … 301 301 } 302 302 303 void WebAutomationSessionProxy::didEvaluateJavaScriptFunction( uint64_tframeID, uint64_t callbackID, const String& result, const String& errorType)303 void WebAutomationSessionProxy::didEvaluateJavaScriptFunction(WebCore::FrameIdentifier frameID, uint64_t callbackID, const String& result, const String& errorType) 304 304 { 305 305 auto findResult = m_webFramePendingEvaluateJavaScriptCallbacksMap.find(frameID); … … 314 314 } 315 315 316 void WebAutomationSessionProxy::resolveChildFrameWithOrdinal(WebCore::PageIdentifier pageID, uint64_t frameID, uint32_t ordinal, CompletionHandler<void(Optional<String>, uint64_t)>&& completionHandler)316 void WebAutomationSessionProxy::resolveChildFrameWithOrdinal(WebCore::PageIdentifier pageID, Optional<WebCore::FrameIdentifier> frameID, uint32_t ordinal, CompletionHandler<void(Optional<String>, Optional<WebCore::FrameIdentifier>)>&& completionHandler) 317 317 { 318 318 WebPage* page = WebProcess::singleton().webPage(pageID); 319 319 if (!page) { 320 320 String windowNotFoundErrorType = Inspector::Protocol::AutomationHelpers::getEnumConstantValue(Inspector::Protocol::Automation::ErrorMessage::WindowNotFound); 321 completionHandler(windowNotFoundErrorType, 0);321 completionHandler(windowNotFoundErrorType, WTF::nullopt); 322 322 return; 323 323 } … … 325 325 String frameNotFoundErrorType = Inspector::Protocol::AutomationHelpers::getEnumConstantValue(Inspector::Protocol::Automation::ErrorMessage::FrameNotFound); 326 326 327 WebFrame* frame = frameID ? WebProcess::singleton().webFrame( frameID) : page->mainWebFrame();327 WebFrame* frame = frameID ? WebProcess::singleton().webFrame(*frameID) : page->mainWebFrame(); 328 328 if (!frame) { 329 completionHandler(frameNotFoundErrorType, 0);329 completionHandler(frameNotFoundErrorType, WTF::nullopt); 330 330 return; 331 331 } … … 333 333 WebCore::Frame* coreFrame = frame->coreFrame(); 334 334 if (!coreFrame) { 335 completionHandler(frameNotFoundErrorType, 0);335 completionHandler(frameNotFoundErrorType, WTF::nullopt); 336 336 return; 337 337 } … … 339 339 WebCore::Frame* coreChildFrame = coreFrame->tree().scopedChild(ordinal); 340 340 if (!coreChildFrame) { 341 completionHandler(frameNotFoundErrorType, 0);341 completionHandler(frameNotFoundErrorType, WTF::nullopt); 342 342 return; 343 343 } … … 345 345 WebFrame* childFrame = WebFrame::fromCoreFrame(*coreChildFrame); 346 346 if (!childFrame) { 347 completionHandler(frameNotFoundErrorType, 0);347 completionHandler(frameNotFoundErrorType, WTF::nullopt); 348 348 return; 349 349 } … … 352 352 } 353 353 354 void WebAutomationSessionProxy::resolveChildFrameWithNodeHandle(WebCore::PageIdentifier pageID, uint64_t frameID, const String& nodeHandle, CompletionHandler<void(Optional<String>, uint64_t)>&& completionHandler)354 void WebAutomationSessionProxy::resolveChildFrameWithNodeHandle(WebCore::PageIdentifier pageID, Optional<WebCore::FrameIdentifier> frameID, const String& nodeHandle, CompletionHandler<void(Optional<String>, Optional<WebCore::FrameIdentifier>)>&& completionHandler) 355 355 { 356 356 WebPage* page = WebProcess::singleton().webPage(pageID); 357 357 if (!page) { 358 358 String windowNotFoundErrorType = Inspector::Protocol::AutomationHelpers::getEnumConstantValue(Inspector::Protocol::Automation::ErrorMessage::WindowNotFound); 359 completionHandler(windowNotFoundErrorType, 0);359 completionHandler(windowNotFoundErrorType, WTF::nullopt); 360 360 return; 361 361 } … … 363 363 String frameNotFoundErrorType = Inspector::Protocol::AutomationHelpers::getEnumConstantValue(Inspector::Protocol::Automation::ErrorMessage::FrameNotFound); 364 364 365 WebFrame* frame = frameID ? WebProcess::singleton().webFrame( frameID) : page->mainWebFrame();365 WebFrame* frame = frameID ? WebProcess::singleton().webFrame(*frameID) : page->mainWebFrame(); 366 366 if (!frame) { 367 completionHandler(frameNotFoundErrorType, 0);367 completionHandler(frameNotFoundErrorType, WTF::nullopt); 368 368 return; 369 369 } … … 371 371 WebCore::Element* coreElement = elementForNodeHandle(*frame, nodeHandle); 372 372 if (!is<WebCore::HTMLFrameElementBase>(coreElement)) { 373 completionHandler(frameNotFoundErrorType, 0);373 completionHandler(frameNotFoundErrorType, WTF::nullopt); 374 374 return; 375 375 } … … 377 377 WebCore::Frame* coreFrameFromElement = downcast<WebCore::HTMLFrameElementBase>(*coreElement).contentFrame(); 378 378 if (!coreFrameFromElement) { 379 completionHandler(frameNotFoundErrorType, 0);379 completionHandler(frameNotFoundErrorType, WTF::nullopt); 380 380 return; 381 381 } … … 383 383 WebFrame* frameFromElement = WebFrame::fromCoreFrame(*coreFrameFromElement); 384 384 if (!frameFromElement) { 385 completionHandler(frameNotFoundErrorType, 0);385 completionHandler(frameNotFoundErrorType, WTF::nullopt); 386 386 return; 387 387 } … … 390 390 } 391 391 392 void WebAutomationSessionProxy::resolveChildFrameWithName(WebCore::PageIdentifier pageID, uint64_t frameID, const String& name, CompletionHandler<void(Optional<String>, uint64_t)>&& completionHandler)392 void WebAutomationSessionProxy::resolveChildFrameWithName(WebCore::PageIdentifier pageID, Optional<WebCore::FrameIdentifier> frameID, const String& name, CompletionHandler<void(Optional<String>, Optional<WebCore::FrameIdentifier>)>&& completionHandler) 393 393 { 394 394 WebPage* page = WebProcess::singleton().webPage(pageID); 395 395 if (!page) { 396 396 String windowNotFoundErrorType = Inspector::Protocol::AutomationHelpers::getEnumConstantValue(Inspector::Protocol::Automation::ErrorMessage::WindowNotFound); 397 completionHandler(windowNotFoundErrorType, 0);397 completionHandler(windowNotFoundErrorType, WTF::nullopt); 398 398 return; 399 399 } … … 401 401 String frameNotFoundErrorType = Inspector::Protocol::AutomationHelpers::getEnumConstantValue(Inspector::Protocol::Automation::ErrorMessage::FrameNotFound); 402 402 403 WebFrame* frame = frameID ? WebProcess::singleton().webFrame( frameID) : page->mainWebFrame();403 WebFrame* frame = frameID ? WebProcess::singleton().webFrame(*frameID) : page->mainWebFrame(); 404 404 if (!frame) { 405 completionHandler(frameNotFoundErrorType, 0);405 completionHandler(frameNotFoundErrorType, WTF::nullopt); 406 406 return; 407 407 } … … 409 409 WebCore::Frame* coreFrame = frame->coreFrame(); 410 410 if (!coreFrame) { 411 completionHandler(frameNotFoundErrorType, 0);411 completionHandler(frameNotFoundErrorType, WTF::nullopt); 412 412 return; 413 413 } … … 415 415 WebCore::Frame* coreChildFrame = coreFrame->tree().scopedChild(name); 416 416 if (!coreChildFrame) { 417 completionHandler(frameNotFoundErrorType, 0);417 completionHandler(frameNotFoundErrorType, WTF::nullopt); 418 418 return; 419 419 } … … 421 421 WebFrame* childFrame = WebFrame::fromCoreFrame(*coreChildFrame); 422 422 if (!childFrame) { 423 completionHandler(frameNotFoundErrorType, 0);423 completionHandler(frameNotFoundErrorType, WTF::nullopt); 424 424 return; 425 425 } … … 428 428 } 429 429 430 void WebAutomationSessionProxy::resolveParentFrame(WebCore::PageIdentifier pageID, uint64_t frameID, CompletionHandler<void(Optional<String>, uint64_t)>&& completionHandler)430 void WebAutomationSessionProxy::resolveParentFrame(WebCore::PageIdentifier pageID, Optional<WebCore::FrameIdentifier> frameID, CompletionHandler<void(Optional<String>, Optional<WebCore::FrameIdentifier>)>&& completionHandler) 431 431 { 432 432 WebPage* page = WebProcess::singleton().webPage(pageID); 433 433 if (!page) { 434 434 String windowNotFoundErrorType = Inspector::Protocol::AutomationHelpers::getEnumConstantValue(Inspector::Protocol::Automation::ErrorMessage::WindowNotFound); 435 completionHandler(windowNotFoundErrorType, 0);435 completionHandler(windowNotFoundErrorType, WTF::nullopt); 436 436 return; 437 437 } … … 439 439 String frameNotFoundErrorType = Inspector::Protocol::AutomationHelpers::getEnumConstantValue(Inspector::Protocol::Automation::ErrorMessage::FrameNotFound); 440 440 441 WebFrame* frame = frameID ? WebProcess::singleton().webFrame( frameID) : page->mainWebFrame();441 WebFrame* frame = frameID ? WebProcess::singleton().webFrame(*frameID) : page->mainWebFrame(); 442 442 if (!frame) { 443 completionHandler(frameNotFoundErrorType, 0);443 completionHandler(frameNotFoundErrorType, WTF::nullopt); 444 444 return; 445 445 } … … 447 447 WebFrame* parentFrame = frame->parentFrame(); 448 448 if (!parentFrame) { 449 completionHandler(frameNotFoundErrorType, 0);449 completionHandler(frameNotFoundErrorType, WTF::nullopt); 450 450 return; 451 451 } … … 454 454 } 455 455 456 void WebAutomationSessionProxy::focusFrame(WebCore::PageIdentifier pageID, uint64_tframeID)456 void WebAutomationSessionProxy::focusFrame(WebCore::PageIdentifier pageID, Optional<WebCore::FrameIdentifier> frameID) 457 457 { 458 458 WebPage* page = WebProcess::singleton().webPage(pageID); … … 460 460 return; 461 461 462 WebFrame* frame = frameID ? WebProcess::singleton().webFrame( frameID) : page->mainWebFrame();462 WebFrame* frame = frameID ? WebProcess::singleton().webFrame(*frameID) : page->mainWebFrame(); 463 463 if (!frame) 464 464 return; … … 529 529 } 530 530 531 void WebAutomationSessionProxy::computeElementLayout(WebCore::PageIdentifier pageID, uint64_tframeID, String nodeHandle, bool scrollIntoViewIfNeeded, CoordinateSystem coordinateSystem, CompletionHandler<void(Optional<String>, WebCore::IntRect, Optional<WebCore::IntPoint>, bool)>&& completionHandler)531 void WebAutomationSessionProxy::computeElementLayout(WebCore::PageIdentifier pageID, Optional<WebCore::FrameIdentifier> frameID, String nodeHandle, bool scrollIntoViewIfNeeded, CoordinateSystem coordinateSystem, CompletionHandler<void(Optional<String>, WebCore::IntRect, Optional<WebCore::IntPoint>, bool)>&& completionHandler) 532 532 { 533 533 WebPage* page = WebProcess::singleton().webPage(pageID); … … 538 538 } 539 539 540 WebFrame* frame = frameID ? WebProcess::singleton().webFrame( frameID) : page->mainWebFrame();540 WebFrame* frame = frameID ? WebProcess::singleton().webFrame(*frameID) : page->mainWebFrame(); 541 541 if (!frame || !frame->coreFrame() || !frame->coreFrame()->view()) { 542 542 String frameNotFoundErrorType = Inspector::Protocol::AutomationHelpers::getEnumConstantValue(Inspector::Protocol::Automation::ErrorMessage::FrameNotFound); … … 637 637 } 638 638 639 void WebAutomationSessionProxy::selectOptionElement(WebCore::PageIdentifier pageID, uint64_tframeID, String nodeHandle, CompletionHandler<void(Optional<String>)>&& completionHandler)639 void WebAutomationSessionProxy::selectOptionElement(WebCore::PageIdentifier pageID, Optional<WebCore::FrameIdentifier> frameID, String nodeHandle, CompletionHandler<void(Optional<String>)>&& completionHandler) 640 640 { 641 641 WebPage* page = WebProcess::singleton().webPage(pageID); … … 646 646 } 647 647 648 WebFrame* frame = frameID ? WebProcess::singleton().webFrame( frameID) : page->mainWebFrame();648 WebFrame* frame = frameID ? WebProcess::singleton().webFrame(*frameID) : page->mainWebFrame(); 649 649 if (!frame || !frame->coreFrame() || !frame->coreFrame()->view()) { 650 650 String frameNotFoundErrorType = Inspector::Protocol::AutomationHelpers::getEnumConstantValue(Inspector::Protocol::Automation::ErrorMessage::FrameNotFound); … … 705 705 } 706 706 707 void WebAutomationSessionProxy::takeScreenshot(WebCore::PageIdentifier pageID, uint64_tframeID, String nodeHandle, bool scrollIntoViewIfNeeded, bool clipToViewport, uint64_t callbackID)707 void WebAutomationSessionProxy::takeScreenshot(WebCore::PageIdentifier pageID, Optional<WebCore::FrameIdentifier> frameID, String nodeHandle, bool scrollIntoViewIfNeeded, bool clipToViewport, uint64_t callbackID) 708 708 { 709 709 ShareableBitmap::Handle handle; … … 716 716 } 717 717 718 WebFrame* frame = frameID ? WebProcess::singleton().webFrame( frameID) : page->mainWebFrame();718 WebFrame* frame = frameID ? WebProcess::singleton().webFrame(*frameID) : page->mainWebFrame(); 719 719 if (!frame || !frame->coreFrame()) { 720 720 String frameNotFoundErrorType = Inspector::Protocol::AutomationHelpers::getEnumConstantValue(Inspector::Protocol::Automation::ErrorMessage::FrameNotFound); … … 753 753 } 754 754 755 void WebAutomationSessionProxy::getCookiesForFrame(WebCore::PageIdentifier pageID, uint64_tframeID, CompletionHandler<void(Optional<String>, Vector<WebCore::Cookie>)>&& completionHandler)755 void WebAutomationSessionProxy::getCookiesForFrame(WebCore::PageIdentifier pageID, Optional<WebCore::FrameIdentifier> frameID, CompletionHandler<void(Optional<String>, Vector<WebCore::Cookie>)>&& completionHandler) 756 756 { 757 757 WebPage* page = WebProcess::singleton().webPage(pageID); … … 762 762 } 763 763 764 WebFrame* frame = frameID ? WebProcess::singleton().webFrame( frameID) : page->mainWebFrame();764 WebFrame* frame = frameID ? WebProcess::singleton().webFrame(*frameID) : page->mainWebFrame(); 765 765 if (!frame || !frame->coreFrame() || !frame->coreFrame()->document()) { 766 766 String frameNotFoundErrorType = Inspector::Protocol::AutomationHelpers::getEnumConstantValue(Inspector::Protocol::Automation::ErrorMessage::FrameNotFound); … … 778 778 } 779 779 780 void WebAutomationSessionProxy::deleteCookie(WebCore::PageIdentifier pageID, uint64_tframeID, String cookieName, CompletionHandler<void(Optional<String>)>&& completionHandler)780 void WebAutomationSessionProxy::deleteCookie(WebCore::PageIdentifier pageID, Optional<WebCore::FrameIdentifier> frameID, String cookieName, CompletionHandler<void(Optional<String>)>&& completionHandler) 781 781 { 782 782 WebPage* page = WebProcess::singleton().webPage(pageID); … … 787 787 } 788 788 789 WebFrame* frame = frameID ? WebProcess::singleton().webFrame( frameID) : page->mainWebFrame();789 WebFrame* frame = frameID ? WebProcess::singleton().webFrame(*frameID) : page->mainWebFrame(); 790 790 if (!frame || !frame->coreFrame() || !frame->coreFrame()->document()) { 791 791 String frameNotFoundErrorType = Inspector::Protocol::AutomationHelpers::getEnumConstantValue(Inspector::Protocol::Automation::ErrorMessage::FrameNotFound); -
trunk/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.h
r245796 r248713 29 29 #include "CoordinateSystem.h" 30 30 #include <JavaScriptCore/JSBase.h> 31 #include <WebCore/FrameIdentifier.h> 31 32 #include <WebCore/PageIdentifier.h> 32 33 #include <wtf/text/WTFString.h> … … 52 53 void didClearWindowObjectForFrame(WebFrame&); 53 54 54 void didEvaluateJavaScriptFunction( uint64_t frameID, uint64_t callbackID, const String& result, const String& errorType);55 void didEvaluateJavaScriptFunction(WebCore::FrameIdentifier, uint64_t callbackID, const String& result, const String& errorType); 55 56 56 57 private: … … 62 63 63 64 // Called by WebAutomationSessionProxy messages 64 void evaluateJavaScriptFunction(WebCore::PageIdentifier, uint64_t frameID, const String& function, Vector<String> arguments, bool expectsImplicitCallbackArgument, int callbackTimeout, uint64_t callbackID);65 void resolveChildFrameWithOrdinal(WebCore::PageIdentifier, uint64_t frameID, uint32_t ordinal, CompletionHandler<void(Optional<String>, uint64_t)>&&);66 void resolveChildFrameWithNodeHandle(WebCore::PageIdentifier, uint64_t frameID, const String& nodeHandle, CompletionHandler<void(Optional<String>, uint64_t)>&&);67 void resolveChildFrameWithName(WebCore::PageIdentifier, uint64_t frameID, const String& name, CompletionHandler<void(Optional<String>, uint64_t)>&&);68 void resolveParentFrame(WebCore::PageIdentifier, uint64_t frameID, CompletionHandler<void(Optional<String>, uint64_t)>&&);69 void focusFrame(WebCore::PageIdentifier, uint64_t frameID);70 void computeElementLayout(WebCore::PageIdentifier, uint64_t frameID, String nodeHandle, bool scrollIntoViewIfNeeded, CoordinateSystem, CompletionHandler<void(Optional<String>, WebCore::IntRect, Optional<WebCore::IntPoint>, bool)>&&);71 void selectOptionElement(WebCore::PageIdentifier, uint64_t frameID, String nodeHandle, CompletionHandler<void(Optional<String>)>&&);72 void takeScreenshot(WebCore::PageIdentifier, uint64_t frameID, String nodeHandle, bool scrollIntoViewIfNeeded, bool clipToViewport, uint64_t callbackID);73 void getCookiesForFrame(WebCore::PageIdentifier, uint64_t frameID, CompletionHandler<void(Optional<String>, Vector<WebCore::Cookie>)>&&);74 void deleteCookie(WebCore::PageIdentifier, uint64_t frameID, String cookieName, CompletionHandler<void(Optional<String>)>&&);65 void evaluateJavaScriptFunction(WebCore::PageIdentifier, Optional<WebCore::FrameIdentifier>, const String& function, Vector<String> arguments, bool expectsImplicitCallbackArgument, int callbackTimeout, uint64_t callbackID); 66 void resolveChildFrameWithOrdinal(WebCore::PageIdentifier, Optional<WebCore::FrameIdentifier>, uint32_t ordinal, CompletionHandler<void(Optional<String>, Optional<WebCore::FrameIdentifier>)>&&); 67 void resolveChildFrameWithNodeHandle(WebCore::PageIdentifier, Optional<WebCore::FrameIdentifier>, const String& nodeHandle, CompletionHandler<void(Optional<String>, Optional<WebCore::FrameIdentifier>)>&&); 68 void resolveChildFrameWithName(WebCore::PageIdentifier, Optional<WebCore::FrameIdentifier>, const String& name, CompletionHandler<void(Optional<String>, Optional<WebCore::FrameIdentifier>)>&&); 69 void resolveParentFrame(WebCore::PageIdentifier, Optional<WebCore::FrameIdentifier>, CompletionHandler<void(Optional<String>, Optional<WebCore::FrameIdentifier>)>&&); 70 void focusFrame(WebCore::PageIdentifier, Optional<WebCore::FrameIdentifier>); 71 void computeElementLayout(WebCore::PageIdentifier, Optional<WebCore::FrameIdentifier>, String nodeHandle, bool scrollIntoViewIfNeeded, CoordinateSystem, CompletionHandler<void(Optional<String>, WebCore::IntRect, Optional<WebCore::IntPoint>, bool)>&&); 72 void selectOptionElement(WebCore::PageIdentifier, Optional<WebCore::FrameIdentifier>, String nodeHandle, CompletionHandler<void(Optional<String>)>&&); 73 void takeScreenshot(WebCore::PageIdentifier, Optional<WebCore::FrameIdentifier>, String nodeHandle, bool scrollIntoViewIfNeeded, bool clipToViewport, uint64_t callbackID); 74 void getCookiesForFrame(WebCore::PageIdentifier, Optional<WebCore::FrameIdentifier>, CompletionHandler<void(Optional<String>, Vector<WebCore::Cookie>)>&&); 75 void deleteCookie(WebCore::PageIdentifier, Optional<WebCore::FrameIdentifier>, String cookieName, CompletionHandler<void(Optional<String>)>&&); 75 76 76 77 String m_sessionIdentifier; 77 78 78 HashMap< uint64_t, JSObjectRef> m_webFrameScriptObjectMap;79 HashMap< uint64_t, Vector<uint64_t>> m_webFramePendingEvaluateJavaScriptCallbacksMap;79 HashMap<WebCore::FrameIdentifier, JSObjectRef> m_webFrameScriptObjectMap; 80 HashMap<WebCore::FrameIdentifier, Vector<uint64_t>> m_webFramePendingEvaluateJavaScriptCallbacksMap; 80 81 }; 81 82 -
trunk/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.messages.in
r245796 r248713 22 22 23 23 messages -> WebAutomationSessionProxy { 24 EvaluateJavaScriptFunction(WebCore::PageIdentifier pageID, uint64_tframeID, String function, Vector<String> arguments, bool expectsImplicitCallbackArgument, int callbackTimeout, uint64_t callbackID)24 EvaluateJavaScriptFunction(WebCore::PageIdentifier pageID, Optional<WebCore::FrameIdentifier> frameID, String function, Vector<String> arguments, bool expectsImplicitCallbackArgument, int callbackTimeout, uint64_t callbackID) 25 25 26 ResolveChildFrameWithOrdinal(WebCore::PageIdentifier pageID, uint64_t frameID, uint32_t ordinal) -> (Optional<String> errorType, uint64_tframeID) Async27 ResolveChildFrameWithNodeHandle(WebCore::PageIdentifier pageID, uint64_t frameID, String nodeHandle) -> (Optional<String> errorType, uint64_tframeID) Async28 ResolveChildFrameWithName(WebCore::PageIdentifier pageID, uint64_t frameID, String name) -> (Optional<String> errorType, uint64_tframeID) Async29 ResolveParentFrame(WebCore::PageIdentifier pageID, uint64_t frameID) -> (Optional<String> errorType, uint64_tframeID) Async26 ResolveChildFrameWithOrdinal(WebCore::PageIdentifier pageID, Optional<WebCore::FrameIdentifier> frameID, uint32_t ordinal) -> (Optional<String> errorType, Optional<WebCore::FrameIdentifier> frameID) Async 27 ResolveChildFrameWithNodeHandle(WebCore::PageIdentifier pageID, Optional<WebCore::FrameIdentifier> frameID, String nodeHandle) -> (Optional<String> errorType, Optional<WebCore::FrameIdentifier> frameID) Async 28 ResolveChildFrameWithName(WebCore::PageIdentifier pageID, Optional<WebCore::FrameIdentifier> frameID, String name) -> (Optional<String> errorType, Optional<WebCore::FrameIdentifier> frameID) Async 29 ResolveParentFrame(WebCore::PageIdentifier pageID, Optional<WebCore::FrameIdentifier> frameID) -> (Optional<String> errorType, Optional<WebCore::FrameIdentifier> frameID) Async 30 30 31 FocusFrame(WebCore::PageIdentifier pageID, uint64_tframeID)31 FocusFrame(WebCore::PageIdentifier pageID, Optional<WebCore::FrameIdentifier> frameID) 32 32 33 ComputeElementLayout(WebCore::PageIdentifier pageID, uint64_tframeID, String nodeHandle, bool scrollIntoViewIfNeeded, enum:uint8_t WebKit::CoordinateSystem coordinateSystem) -> (Optional<String> errorType, WebCore::IntRect rect, Optional<WebCore::IntPoint> inViewCenterPoint, bool isObscured) Async33 ComputeElementLayout(WebCore::PageIdentifier pageID, Optional<WebCore::FrameIdentifier> frameID, String nodeHandle, bool scrollIntoViewIfNeeded, enum:uint8_t WebKit::CoordinateSystem coordinateSystem) -> (Optional<String> errorType, WebCore::IntRect rect, Optional<WebCore::IntPoint> inViewCenterPoint, bool isObscured) Async 34 34 35 SelectOptionElement(WebCore::PageIdentifier pageID, uint64_tframeID, String nodeHandle) -> (Optional<String> errorType) Async35 SelectOptionElement(WebCore::PageIdentifier pageID, Optional<WebCore::FrameIdentifier> frameID, String nodeHandle) -> (Optional<String> errorType) Async 36 36 37 TakeScreenshot(WebCore::PageIdentifier pageID, uint64_tframeID, String nodeHandle, bool scrollIntoViewIfNeeded, bool clipToViewport, uint64_t callbackID)37 TakeScreenshot(WebCore::PageIdentifier pageID, Optional<WebCore::FrameIdentifier> frameID, String nodeHandle, bool scrollIntoViewIfNeeded, bool clipToViewport, uint64_t callbackID) 38 38 39 GetCookiesForFrame(WebCore::PageIdentifier pageID, uint64_tframeID) -> (Optional<String> errorType, Vector<WebCore::Cookie> cookies) Async40 DeleteCookie(WebCore::PageIdentifier pageID, uint64_tframeID, String cookieName) -> (Optional<String> errorType) Async39 GetCookiesForFrame(WebCore::PageIdentifier pageID, Optional<WebCore::FrameIdentifier> frameID) -> (Optional<String> errorType, Vector<WebCore::Cookie> cookies) Async 40 DeleteCookie(WebCore::PageIdentifier pageID, Optional<WebCore::FrameIdentifier> frameID, String cookieName) -> (Optional<String> errorType) Async 41 41 } -
trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm
r242339 r248713 49 49 + (instancetype)lookUpFrameFromHandle:(_WKFrameHandle *)handle 50 50 { 51 return wrapper(WebKit::WebProcess::singleton().webFrame( handle._frameID));51 return wrapper(WebKit::WebProcess::singleton().webFrame(WebCore::frameIdentifierFromID(handle._frameID))); 52 52 } 53 53 -
trunk/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitFrame.cpp
r245176 r248713 75 75 g_return_val_if_fail(WEBKIT_IS_FRAME(frame), 0); 76 76 77 return frame->priv->webFrame->frameID() ;77 return frame->priv->webFrame->frameID().toUInt64(); 78 78 } 79 79 -
trunk/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp
r248677 r248713 160 160 WebResourceLoader::TrackingParameters trackingParameters; 161 161 trackingParameters.pageID = frameLoaderClient.pageID().valueOr(PageIdentifier { }); 162 trackingParameters.frameID = frameLoaderClient.frameID().valueOr( 0);162 trackingParameters.frameID = frameLoaderClient.frameID().valueOr(FrameIdentifier { }); 163 163 trackingParameters.resourceID = identifier; 164 164 auto sessionID = frameLoaderClient.sessionID(); … … 169 169 if (resourceLoader.documentLoader()->scheduleArchiveLoad(resourceLoader, resourceLoader.request())) { 170 170 LOG(NetworkScheduling, "(WebProcess) WebLoaderStrategy::scheduleLoad, url '%s' will be handled as an archive resource.", resourceLoader.url().string().utf8().data()); 171 RELEASE_LOG_IF_ALLOWED(resourceLoader, "scheduleLoad: URL will be handled as an archive resource (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), trackingParameters.pageID.toUInt64(), trackingParameters.frameID , identifier);171 RELEASE_LOG_IF_ALLOWED(resourceLoader, "scheduleLoad: URL will be handled as an archive resource (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), trackingParameters.pageID.toUInt64(), trackingParameters.frameID.toUInt64(), identifier); 172 172 m_webResourceLoaders.set(identifier, WebResourceLoader::create(resourceLoader, trackingParameters)); 173 173 return; … … 177 177 if (resourceLoader.documentLoader()->applicationCacheHost().maybeLoadResource(resourceLoader, resourceLoader.request(), resourceLoader.request().url())) { 178 178 LOG(NetworkScheduling, "(WebProcess) WebLoaderStrategy::scheduleLoad, url '%s' will be loaded from application cache.", resourceLoader.url().string().utf8().data()); 179 RELEASE_LOG_IF_ALLOWED(resourceLoader, "scheduleLoad: URL will be loaded from application cache (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), trackingParameters.pageID.toUInt64(), trackingParameters.frameID , identifier);179 RELEASE_LOG_IF_ALLOWED(resourceLoader, "scheduleLoad: URL will be loaded from application cache (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), trackingParameters.pageID.toUInt64(), trackingParameters.frameID.toUInt64(), identifier); 180 180 m_webResourceLoaders.set(identifier, WebResourceLoader::create(resourceLoader, trackingParameters)); 181 181 return; … … 184 184 if (resourceLoader.request().url().protocolIsData()) { 185 185 LOG(NetworkScheduling, "(WebProcess) WebLoaderStrategy::scheduleLoad, url '%s' will be loaded as data.", resourceLoader.url().string().utf8().data()); 186 RELEASE_LOG_IF_ALLOWED(resourceLoader, "scheduleLoad: URL will be loaded as data (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), trackingParameters.pageID.toUInt64(), trackingParameters.frameID , identifier);186 RELEASE_LOG_IF_ALLOWED(resourceLoader, "scheduleLoad: URL will be loaded as data (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), trackingParameters.pageID.toUInt64(), trackingParameters.frameID.toUInt64(), identifier); 187 187 startLocalLoad(resourceLoader); 188 188 return; … … 192 192 if (isQuickLookPreviewURL(resourceLoader.request().url())) { 193 193 LOG(NetworkScheduling, "(WebProcess) WebLoaderStrategy::scheduleLoad, url '%s' will be handled as a QuickLook resource.", resourceLoader.url().string().utf8().data()); 194 RELEASE_LOG_IF_ALLOWED(resourceLoader, "scheduleLoad: URL will be handled as a QuickLook resource (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), trackingParameters.pageID.toUInt64(), trackingParameters.frameID , identifier);194 RELEASE_LOG_IF_ALLOWED(resourceLoader, "scheduleLoad: URL will be handled as a QuickLook resource (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), trackingParameters.pageID.toUInt64(), trackingParameters.frameID.toUInt64(), identifier); 195 195 startLocalLoad(resourceLoader); 196 196 return; … … 203 203 if (resourceLoader.request().url().protocolIs("resource")) { 204 204 LOG(NetworkScheduling, "(WebProcess) WebLoaderStrategy::scheduleLoad, url '%s' will be handled as a GResource.", resourceLoader.url().string().utf8().data()); 205 RELEASE_LOG_IF_ALLOWED(resourceLoader, "scheduleLoad: URL will be handled as a GResource (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), trackingParameters.pageID.toUInt64(), trackingParameters.frameID , identifier);205 RELEASE_LOG_IF_ALLOWED(resourceLoader, "scheduleLoad: URL will be handled as a GResource (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), trackingParameters.pageID.toUInt64(), trackingParameters.frameID.toUInt64(), identifier); 206 206 startLocalLoad(resourceLoader); 207 207 return; … … 213 213 if (result != ServiceWorkerClientFetch::Result::Unhandled) { 214 214 LOG(NetworkScheduling, "(WebProcess) WebLoaderStrategy::scheduleLoad, url '%s' will be scheduled through ServiceWorker handle fetch algorithm", resourceLoader->url().string().latin1().data()); 215 RELEASE_LOG_IF_ALLOWED(resourceLoader.get(), "scheduleLoad: URL will be scheduled through ServiceWorker handle fetch algorithm (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader->frame(), trackingParameters.pageID.toUInt64(), trackingParameters.frameID , identifier);215 RELEASE_LOG_IF_ALLOWED(resourceLoader.get(), "scheduleLoad: URL will be scheduled through ServiceWorker handle fetch algorithm (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader->frame(), trackingParameters.pageID.toUInt64(), trackingParameters.frameID.toUInt64(), identifier); 216 216 return; 217 217 } 218 218 if (resourceLoader->options().serviceWorkersMode == ServiceWorkersMode::Only) { 219 RELEASE_LOG_ERROR_IF_ALLOWED(resourceLoader.get(), "scheduleLoad: unable to schedule URL through ServiceWorker handle fetch algorithm (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader->frame(), trackingParameters.pageID.toUInt64(), trackingParameters.frameID , identifier);219 RELEASE_LOG_ERROR_IF_ALLOWED(resourceLoader.get(), "scheduleLoad: unable to schedule URL through ServiceWorker handle fetch algorithm (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader->frame(), trackingParameters.pageID.toUInt64(), trackingParameters.frameID.toUInt64(), identifier); 220 220 callOnMainThread([resourceLoader = WTFMove(resourceLoader)] { 221 221 auto error = internalError(resourceLoader->request().url()); … … 229 229 WebProcess::singleton().webLoaderStrategy().scheduleLoadFromNetworkProcess(resourceLoader.get(), resourceLoader->request(), trackingParameters, sessionID, shouldClearReferrerOnHTTPSToHTTPRedirect, maximumBufferingTime); 230 230 else 231 RELEASE_LOG_IF_ALLOWED(resourceLoader.get(), "scheduleLoad: URL not handled by any handlers (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader->frame(), trackingParameters.pageID.toUInt64(), trackingParameters.frameID , identifier);231 RELEASE_LOG_IF_ALLOWED(resourceLoader.get(), "scheduleLoad: URL not handled by any handlers (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader->frame(), trackingParameters.pageID.toUInt64(), trackingParameters.frameID.toUInt64(), identifier); 232 232 }); 233 233 #else … … 235 235 scheduleLoadFromNetworkProcess(resourceLoader, resourceLoader.request(), trackingParameters, sessionID, shouldClearReferrerOnHTTPSToHTTPRedirect, maximumBufferingTime(resource)); 236 236 else 237 RELEASE_LOG_IF_ALLOWED(resourceLoader, "scheduleLoad: URL not handled by any handlers (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), trackingParameters.pageID.toUInt64(), trackingParameters.frameID , identifier);237 RELEASE_LOG_IF_ALLOWED(resourceLoader, "scheduleLoad: URL not handled by any handlers (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), trackingParameters.pageID.toUInt64(), trackingParameters.frameID.toUInt64(), identifier); 238 238 #endif 239 239 } … … 326 326 ASSERT(loadParameters.sourceOrigin); 327 327 if (!loadParameters.sourceOrigin) { 328 RELEASE_LOG_ERROR_IF_ALLOWED(resourceLoader, "scheduleLoad: no sourceOrigin (frame = %p, priority = %d, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), static_cast<int>(resourceLoader.request().priority()), loadParameters.webPageID.toUInt64(), loadParameters.webFrameID , loadParameters.identifier);328 RELEASE_LOG_ERROR_IF_ALLOWED(resourceLoader, "scheduleLoad: no sourceOrigin (frame = %p, priority = %d, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), static_cast<int>(resourceLoader.request().priority()), loadParameters.webPageID.toUInt64(), loadParameters.webFrameID.toUInt64(), loadParameters.identifier); 329 329 scheduleInternallyFailedLoad(resourceLoader); 330 330 return; … … 349 349 ASSERT((loadParameters.webPageID && loadParameters.webFrameID) || loadParameters.clientCredentialPolicy == ClientCredentialPolicy::CannotAskClientForCredentials); 350 350 351 RELEASE_LOG_IF_ALLOWED(resourceLoader, "scheduleLoad: Resource is being scheduled with the NetworkProcess (frame = %p, priority = %d, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), static_cast<int>(resourceLoader.request().priority()), loadParameters.webPageID.toUInt64(), loadParameters.webFrameID , loadParameters.identifier);351 RELEASE_LOG_IF_ALLOWED(resourceLoader, "scheduleLoad: Resource is being scheduled with the NetworkProcess (frame = %p, priority = %d, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), static_cast<int>(resourceLoader.request().priority()), loadParameters.webPageID.toUInt64(), loadParameters.webFrameID.toUInt64(), loadParameters.identifier); 352 352 if (!WebProcess::singleton().ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::ScheduleResourceLoad(loadParameters), 0)) { 353 RELEASE_LOG_ERROR_IF_ALLOWED(resourceLoader, "scheduleLoad: Unable to schedule resource with the NetworkProcess (frame = %p, priority = %d, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), static_cast<int>(resourceLoader.request().priority()), loadParameters.webPageID.toUInt64(), loadParameters.webFrameID , loadParameters.identifier);353 RELEASE_LOG_ERROR_IF_ALLOWED(resourceLoader, "scheduleLoad: Unable to schedule resource with the NetworkProcess (frame = %p, priority = %d, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), static_cast<int>(resourceLoader.request().priority()), loadParameters.webPageID.toUInt64(), loadParameters.webFrameID.toUInt64(), loadParameters.identifier); 354 354 // We probably failed to schedule this load with the NetworkProcess because it had crashed. 355 355 // This load will never succeed so we will schedule it to fail asynchronously. … … 521 521 522 522 auto pageID = webPage ? webPage->pageID() : PageIdentifier { }; 523 auto frameID = webFrame ? webFrame->frameID() : 0;523 auto frameID = webFrame ? webFrame->frameID() : FrameIdentifier { }; 524 524 auto sessionID = webPage ? webPage->sessionID() : PAL::SessionID::defaultSessionID(); 525 525 526 526 auto* document = frameLoader.frame().document(); 527 527 if (!document) { 528 RELEASE_LOG_ERROR_IF_ALLOWED(sessionID, "loadResourceSynchronously: no document (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %lu)", pageID.toUInt64(), frameID , resourceLoadIdentifier);528 RELEASE_LOG_ERROR_IF_ALLOWED(sessionID, "loadResourceSynchronously: no document (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %lu)", pageID.toUInt64(), frameID.toUInt64(), resourceLoadIdentifier); 529 529 error = internalError(request.url()); 530 530 return; … … 532 532 533 533 if (auto syncLoadResult = tryLoadingSynchronouslyUsingURLSchemeHandler(frameLoader, resourceLoadIdentifier, request)) { 534 RELEASE_LOG_ERROR_IF_ALLOWED(sessionID, "loadResourceSynchronously: failed calling tryLoadingSynchronouslyUsingURLSchemeHandler (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %lu, error = %d)", pageID.toUInt64(), frameID , resourceLoadIdentifier, syncLoadResult->error.errorCode());534 RELEASE_LOG_ERROR_IF_ALLOWED(sessionID, "loadResourceSynchronously: failed calling tryLoadingSynchronouslyUsingURLSchemeHandler (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %lu, error = %d)", pageID.toUInt64(), frameID.toUInt64(), resourceLoadIdentifier, syncLoadResult->error.errorCode()); 535 535 error = WTFMove(syncLoadResult->error); 536 536 response = WTFMove(syncLoadResult->response); … … 570 570 571 571 if (!WebProcess::singleton().ensureNetworkProcessConnection().connection().sendSync(Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad(loadParameters), Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad::Reply(error, response, data), 0)) { 572 RELEASE_LOG_ERROR_IF_ALLOWED(sessionID, "loadResourceSynchronously: failed sending synchronous network process message (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %lu)", pageID.toUInt64(), frameID , resourceLoadIdentifier);572 RELEASE_LOG_ERROR_IF_ALLOWED(sessionID, "loadResourceSynchronously: failed sending synchronous network process message (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %lu)", pageID.toUInt64(), frameID.toUInt64(), resourceLoadIdentifier); 573 573 if (auto* page = webPage ? webPage->corePage() : nullptr) 574 574 page->diagnosticLoggingClient().logDiagnosticMessage(WebCore::DiagnosticLoggingKeys::internalErrorKey(), WebCore::DiagnosticLoggingKeys::synchronousMessageFailedKey(), WebCore::ShouldSample::No); -
trunk/Source/WebKit/WebProcess/Network/WebResourceLoader.cpp
r245796 r248713 89 89 90 90 LOG(Network, "(WebProcess) WebResourceLoader::willSendRequest to '%s'", proposedRequest.url().string().latin1().data()); 91 RELEASE_LOG_IF_ALLOWED("willSendRequest: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID , m_trackingParameters.resourceID);91 RELEASE_LOG_IF_ALLOWED("willSendRequest: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID.toUInt64(), m_trackingParameters.resourceID); 92 92 93 93 if (m_coreLoader->documentLoader()->applicationCacheHost().maybeLoadFallbackForRedirect(m_coreLoader.get(), proposedRequest, redirectResponse)) { 94 RELEASE_LOG_IF_ALLOWED("willSendRequest: exiting early because maybeLoadFallbackForRedirect returned false (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID , m_trackingParameters.resourceID);94 RELEASE_LOG_IF_ALLOWED("willSendRequest: exiting early because maybeLoadFallbackForRedirect returned false (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID.toUInt64(), m_trackingParameters.resourceID); 95 95 return; 96 96 } … … 98 98 m_coreLoader->willSendRequest(WTFMove(proposedRequest), redirectResponse, [this, protectedThis = WTFMove(protectedThis)](ResourceRequest&& request) { 99 99 if (!m_coreLoader || !m_coreLoader->identifier()) { 100 RELEASE_LOG_IF_ALLOWED("willSendRequest: exiting early because no coreloader or identifier (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID , m_trackingParameters.resourceID);100 RELEASE_LOG_IF_ALLOWED("willSendRequest: exiting early because no coreloader or identifier (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID.toUInt64(), m_trackingParameters.resourceID); 101 101 return; 102 102 } … … 114 114 { 115 115 LOG(Network, "(WebProcess) WebResourceLoader::didReceiveResponse for '%s'. Status %d.", m_coreLoader->url().string().latin1().data(), response.httpStatusCode()); 116 RELEASE_LOG_IF_ALLOWED("didReceiveResponse: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", status = %d)", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID , m_trackingParameters.resourceID, response.httpStatusCode());116 RELEASE_LOG_IF_ALLOWED("didReceiveResponse: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", status = %d)", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID.toUInt64(), m_trackingParameters.resourceID, response.httpStatusCode()); 117 117 118 118 Ref<WebResourceLoader> protectedThis(*this); 119 119 120 120 if (m_coreLoader->documentLoader()->applicationCacheHost().maybeLoadFallbackForResponse(m_coreLoader.get(), response)) { 121 RELEASE_LOG_IF_ALLOWED("didReceiveResponse: not continuing load because the content is already cached (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID , m_trackingParameters.resourceID);121 RELEASE_LOG_IF_ALLOWED("didReceiveResponse: not continuing load because the content is already cached (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID.toUInt64(), m_trackingParameters.resourceID); 122 122 return; 123 123 } … … 136 136 send(Messages::NetworkResourceLoader::ContinueDidReceiveResponse()); 137 137 else 138 RELEASE_LOG_IF_ALLOWED("didReceiveResponse: not continuing load because no coreLoader or no ID (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID , m_trackingParameters.resourceID);138 RELEASE_LOG_IF_ALLOWED("didReceiveResponse: not continuing load because no coreLoader or no ID (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID.toUInt64(), m_trackingParameters.resourceID); 139 139 }; 140 140 } … … 149 149 150 150 if (!m_numBytesReceived) { 151 RELEASE_LOG_IF_ALLOWED("didReceiveData: Started receiving data (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID , m_trackingParameters.resourceID);151 RELEASE_LOG_IF_ALLOWED("didReceiveData: Started receiving data (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID.toUInt64(), m_trackingParameters.resourceID); 152 152 } 153 153 m_numBytesReceived += data.size(); … … 159 159 { 160 160 LOG(Network, "(WebProcess) WebResourceLoader::didFinishResourceLoad for '%s'", m_coreLoader->url().string().latin1().data()); 161 RELEASE_LOG_IF_ALLOWED("didFinishResourceLoad: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", length = %zd)", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID , m_trackingParameters.resourceID, m_numBytesReceived);161 RELEASE_LOG_IF_ALLOWED("didFinishResourceLoad: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", length = %zd)", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID.toUInt64(), m_trackingParameters.resourceID, m_numBytesReceived); 162 162 163 163 ASSERT_WITH_MESSAGE(!m_isProcessingNetworkResponse, "Load should not be able to finish before we've validated the response"); … … 168 168 { 169 169 LOG(Network, "(WebProcess) WebResourceLoader::didFailResourceLoad for '%s'", m_coreLoader->url().string().latin1().data()); 170 RELEASE_LOG_IF_ALLOWED("didFailResourceLoad: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID , m_trackingParameters.resourceID);170 RELEASE_LOG_IF_ALLOWED("didFailResourceLoad: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID.toUInt64(), m_trackingParameters.resourceID); 171 171 172 172 ASSERT_WITH_MESSAGE(!m_isProcessingNetworkResponse, "Load should not be able to finish before we've validated the response"); … … 180 180 { 181 181 LOG(Network, "(WebProcess) WebResourceLoader::didBlockAuthenticationChallenge for '%s'", m_coreLoader->url().string().latin1().data()); 182 RELEASE_LOG_IF_ALLOWED("didBlockAuthenticationChallenge: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID , m_trackingParameters.resourceID);182 RELEASE_LOG_IF_ALLOWED("didBlockAuthenticationChallenge: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID.toUInt64(), m_trackingParameters.resourceID); 183 183 184 184 m_coreLoader->didBlockAuthenticationChallenge(); … … 188 188 { 189 189 LOG(Network, "(WebProcess) WebResourceLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied for '%s'", m_coreLoader->url().string().latin1().data()); 190 RELEASE_LOG_IF_ALLOWED("stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID , m_trackingParameters.resourceID);190 RELEASE_LOG_IF_ALLOWED("stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID.toUInt64(), m_trackingParameters.resourceID); 191 191 192 192 m_coreLoader->documentLoader()->stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied(m_coreLoader->identifier(), response); … … 197 197 { 198 198 LOG(Network, "(WebProcess) WebResourceLoader::didReceiveResource for '%s'", m_coreLoader->url().string().latin1().data()); 199 RELEASE_LOG_IF_ALLOWED("didReceiveResource: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID , m_trackingParameters.resourceID);199 RELEASE_LOG_IF_ALLOWED("didReceiveResource: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID.toUInt64(), m_trackingParameters.resourceID); 200 200 201 201 RefPtr<SharedBuffer> buffer = handle.tryWrapInSharedBuffer(); … … 203 203 if (!buffer) { 204 204 LOG_ERROR("Unable to create buffer from ShareableResource sent from the network process."); 205 RELEASE_LOG_IF_ALLOWED("didReceiveResource: Unable to create SharedBuffer (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID , m_trackingParameters.resourceID);205 RELEASE_LOG_IF_ALLOWED("didReceiveResource: Unable to create SharedBuffer (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID.toUInt64(), m_trackingParameters.resourceID); 206 206 if (auto* frame = m_coreLoader->frame()) { 207 207 if (auto* page = frame->page()) -
trunk/Source/WebKit/WebProcess/Network/WebResourceLoader.h
r245796 r248713 29 29 #include "MessageSender.h" 30 30 #include "ShareableResource.h" 31 #include <WebCore/FrameIdentifier.h> 31 32 #include <WebCore/PageIdentifier.h> 32 33 #include <wtf/RefCounted.h> … … 53 54 struct TrackingParameters { 54 55 WebCore::PageIdentifier pageID; 55 uint64_t frameID { 0 };56 WebCore::FrameIdentifier frameID; 56 57 ResourceLoadIdentifier resourceID { 0 }; 57 58 }; -
trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp
r247923 r248713 74 74 class ServiceWorkerFrameLoaderClient final : public EmptyFrameLoaderClient { 75 75 public: 76 ServiceWorkerFrameLoaderClient(WebSWContextManagerConnection& connection, PAL::SessionID sessionID, WebCore::PageIdentifier pageID, uint64_tframeID, const String& userAgent)76 ServiceWorkerFrameLoaderClient(WebSWContextManagerConnection& connection, PAL::SessionID sessionID, WebCore::PageIdentifier pageID, FrameIdentifier frameID, const String& userAgent) 77 77 : m_connection(connection) 78 78 , m_sessionID(sessionID) … … 97 97 PAL::SessionID sessionID() const final { return m_sessionID; } 98 98 Optional<WebCore::PageIdentifier> pageID() const final { return m_pageID; } 99 Optional< uint64_t> frameID() const final { return m_frameID; }99 Optional<WebCore::FrameIdentifier> frameID() const final { return m_frameID; } 100 100 String userAgent(const URL&) final { return m_userAgent; } 101 101 102 102 WebSWContextManagerConnection& m_connection; 103 103 PAL::SessionID m_sessionID; 104 WebCore::PageIdentifier m_pageID;105 uint64_t m_frameID { 0 };104 PageIdentifier m_pageID; 105 FrameIdentifier m_frameID; 106 106 String m_userAgent; 107 107 }; … … 154 154 // FIXME: This method should be moved directly to WebCore::SWContextManager::Connection 155 155 // If it weren't for ServiceWorkerFrameLoaderClient's dependence on WebDocumentLoader, this could already happen. 156 auto frameLoaderClient = std::make_unique<ServiceWorkerFrameLoaderClient>(*this, sessionID, m_pageID, ++m_previousServiceWorkerID, effectiveUserAgent); 156 // FIXME: Weird to pass m_previousServiceWorkerID as a FrameIdentifier. 157 auto frameLoaderClient = std::make_unique<ServiceWorkerFrameLoaderClient>(*this, sessionID, m_pageID, frameIdentifierFromID(++m_previousServiceWorkerID), effectiveUserAgent); 157 158 pageConfiguration.loaderClientForMainFrame = frameLoaderClient.get(); 158 159 m_loaders.add(WTFMove(frameLoaderClient)); -
trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
r248139 r248713 266 266 WebFrame* webFrame = frame ? WebFrame::fromCoreFrame(*frame) : nullptr; 267 267 268 WebProcess::singleton().parentProcessConnection()->send(Messages::WebPageProxy::FocusedFrameChanged(webFrame ? webFrame->frameID() : 0), m_page.pageID());268 WebProcess::singleton().parentProcessConnection()->send(Messages::WebPageProxy::FocusedFrameChanged(webFrame ? makeOptional(webFrame->frameID()) : WTF::nullopt), m_page.pageID()); 269 269 } 270 270 … … 626 626 if (largestFrame != m_cachedFrameSetLargestFrame.get()) { 627 627 m_cachedFrameSetLargestFrame = largestFrame; 628 m_page.send(Messages::WebPageProxy::FrameSetLargestFrameChanged(largestFrame ? largestFrame->frameID() : 0));628 m_page.send(Messages::WebPageProxy::FrameSetLargestFrameChanged(largestFrame ? makeOptional(largestFrame->frameID()) : WTF::nullopt)); 629 629 } 630 630 } … … 1317 1317 1318 1318 #if ENABLE(RESOURCE_LOAD_STATISTICS) 1319 void WebChromeClient::hasStorageAccess(RegistrableDomain&& subFrameDomain, RegistrableDomain&& topFrameDomain, uint64_tframeID, PageIdentifier, CompletionHandler<void(bool)>&& completionHandler)1319 void WebChromeClient::hasStorageAccess(RegistrableDomain&& subFrameDomain, RegistrableDomain&& topFrameDomain, FrameIdentifier frameID, PageIdentifier, CompletionHandler<void(bool)>&& completionHandler) 1320 1320 { 1321 1321 m_page.hasStorageAccess(WTFMove(subFrameDomain), WTFMove(topFrameDomain), frameID, WTFMove(completionHandler)); 1322 1322 } 1323 1323 1324 void WebChromeClient::requestStorageAccess(RegistrableDomain&& subFrameDomain, RegistrableDomain&& topFrameDomain, uint64_tframeID, PageIdentifier, CompletionHandler<void(StorageAccessWasGranted, StorageAccessPromptWasShown)>&& completionHandler)1324 void WebChromeClient::requestStorageAccess(RegistrableDomain&& subFrameDomain, RegistrableDomain&& topFrameDomain, FrameIdentifier frameID, PageIdentifier, CompletionHandler<void(StorageAccessWasGranted, StorageAccessPromptWasShown)>&& completionHandler) 1325 1325 { 1326 1326 m_page.requestStorageAccess(WTFMove(subFrameDomain), WTFMove(topFrameDomain), frameID, WTFMove(completionHandler)); -
trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h
r248139 r248713 368 368 369 369 #if ENABLE(RESOURCE_LOAD_STATISTICS) 370 void hasStorageAccess(WebCore::RegistrableDomain&& subFrameDomain, WebCore::RegistrableDomain&& topFrameDomain, uint64_t frameID, WebCore::PageIdentifier, WTF::CompletionHandler<void(bool)>&&) final;371 void requestStorageAccess(WebCore::RegistrableDomain&& subFrameDomain, WebCore::RegistrableDomain&& topFrameDomain, uint64_t frameID, WebCore::PageIdentifier, WTF::CompletionHandler<void(WebCore::StorageAccessWasGranted, WebCore::StorageAccessPromptWasShown)>&&) final;370 void hasStorageAccess(WebCore::RegistrableDomain&& subFrameDomain, WebCore::RegistrableDomain&& topFrameDomain, WebCore::FrameIdentifier, WebCore::PageIdentifier, WTF::CompletionHandler<void(bool)>&&) final; 371 void requestStorageAccess(WebCore::RegistrableDomain&& subFrameDomain, WebCore::RegistrableDomain&& topFrameDomain, WebCore::FrameIdentifier, WebCore::PageIdentifier, WTF::CompletionHandler<void(WebCore::StorageAccessWasGranted, WebCore::StorageAccessPromptWasShown)>&&) final; 372 372 #endif 373 373 -
trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
r248522 r248713 121 121 } 122 122 123 Optional< uint64_t> WebFrameLoaderClient::frameID() const123 Optional<FrameIdentifier> WebFrameLoaderClient::frameID() const 124 124 { 125 125 if (m_frame) … … 547 547 return; 548 548 549 RELEASE_LOG(Network, "%p - WebFrameLoaderClient::dispatchDidFailProvisionalLoad: (pageID = %" PRIu64 ", frameID = %" PRIu64 ")", this, webPage->pageID().toUInt64(), m_frame->frameID() );549 RELEASE_LOG(Network, "%p - WebFrameLoaderClient::dispatchDidFailProvisionalLoad: (pageID = %" PRIu64 ", frameID = %" PRIu64 ")", this, webPage->pageID().toUInt64(), m_frame->frameID().toUInt64()); 550 550 551 551 RefPtr<API::Object> userData; … … 583 583 return; 584 584 585 RELEASE_LOG(Network, "%p - WebFrameLoaderClient::dispatchDidFailLoad: (pageID = %" PRIu64 ", frameID = %" PRIu64 ")", this, webPage->pageID().toUInt64(), m_frame->frameID() );585 RELEASE_LOG(Network, "%p - WebFrameLoaderClient::dispatchDidFailLoad: (pageID = %" PRIu64 ", frameID = %" PRIu64 ")", this, webPage->pageID().toUInt64(), m_frame->frameID().toUInt64()); 586 586 587 587 RefPtr<API::Object> userData; -
trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
r245796 r248713 53 53 54 54 Optional<WebCore::PageIdentifier> pageID() const final; 55 Optional< uint64_t> frameID() const final;55 Optional<WebCore::FrameIdentifier> frameID() const final; 56 56 PAL::SessionID sessionID() const final; 57 57 -
trunk/Source/WebKit/WebProcess/WebPage/WebCookieJar.cpp
r245796 r248713 51 51 String WebCookieJar::cookies(WebCore::Document& document, const URL& url) const 52 52 { 53 Optional< uint64_t> frameID;53 Optional<FrameIdentifier> frameID; 54 54 Optional<PageIdentifier> pageID; 55 55 if (auto* frame = document.frame()) { … … 68 68 void WebCookieJar::setCookies(WebCore::Document& document, const URL& url, const String& cookieString) 69 69 { 70 Optional< uint64_t> frameID;70 Optional<FrameIdentifier> frameID; 71 71 Optional<PageIdentifier> pageID; 72 72 if (auto* frame = document.frame()) { … … 86 86 } 87 87 88 std::pair<String, WebCore::SecureCookiesAccessed> WebCookieJar::cookieRequestHeaderFieldValue(const PAL::SessionID& sessionID, const URL& firstParty, const WebCore::SameSiteInfo& sameSiteInfo, const URL& url, Optional< uint64_t> frameID, Optional<PageIdentifier> pageID, WebCore::IncludeSecureCookies includeSecureCookies) const88 std::pair<String, WebCore::SecureCookiesAccessed> WebCookieJar::cookieRequestHeaderFieldValue(const PAL::SessionID& sessionID, const URL& firstParty, const WebCore::SameSiteInfo& sameSiteInfo, const URL& url, Optional<FrameIdentifier> frameID, Optional<PageIdentifier> pageID, WebCore::IncludeSecureCookies includeSecureCookies) const 89 89 { 90 90 String cookieString; … … 97 97 bool WebCookieJar::getRawCookies(const WebCore::Document& document, const URL& url, Vector<WebCore::Cookie>& rawCookies) const 98 98 { 99 Optional< uint64_t> frameID;99 Optional<FrameIdentifier> frameID; 100 100 Optional<PageIdentifier> pageID; 101 101 if (auto* frame = document.frame()) { -
trunk/Source/WebKit/WebProcess/WebPage/WebCookieJar.h
r245796 r248713 37 37 void setCookies(WebCore::Document&, const URL&, const String& cookieString) final; 38 38 bool cookiesEnabled(const WebCore::Document&) const final; 39 std::pair<String, WebCore::SecureCookiesAccessed> cookieRequestHeaderFieldValue(const PAL::SessionID&, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, Optional< uint64_t> frameID, Optional<WebCore::PageIdentifier>, WebCore::IncludeSecureCookies) const final;39 std::pair<String, WebCore::SecureCookiesAccessed> cookieRequestHeaderFieldValue(const PAL::SessionID&, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, Optional<WebCore::FrameIdentifier>, Optional<WebCore::PageIdentifier>, WebCore::IncludeSecureCookies) const final; 40 40 bool getRawCookies(const WebCore::Document&, const URL&, Vector<WebCore::Cookie>&) const final; 41 41 void deleteCookie(const WebCore::Document&, const URL&, const String& cookieName) final; -
trunk/Source/WebKit/WebProcess/WebPage/WebFrame.cpp
r247921 r248713 96 96 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, webFrameCounter, ("WebFrame")); 97 97 98 static uint64_t generateFrameID()99 {100 static uint64_t uniqueFrameID = 1;101 return uniqueFrameID++;102 }103 104 98 static uint64_t generateListenerID() 105 99 { … … 149 143 WebFrame::WebFrame(std::unique_ptr<WebFrameLoaderClient> frameLoaderClient) 150 144 : m_frameLoaderClient(WTFMove(frameLoaderClient)) 151 , m_frameID( generateFrameID())145 , m_frameID(FrameIdentifier::generate()) 152 146 { 153 147 m_frameLoaderClient->setWebFrame(this); -
trunk/Source/WebKit/WebProcess/WebPage/WebFrame.h
r244493 r248713 81 81 82 82 FrameInfoData info() const; 83 uint64_tframeID() const { return m_frameID; }83 WebCore::FrameIdentifier frameID() const { return m_frameID; } 84 84 85 85 enum class ForNavigationAction { No, Yes }; … … 188 188 LoadListener* m_loadListener { nullptr }; 189 189 190 uint64_t m_frameID { 0 };190 WebCore::FrameIdentifier m_frameID; 191 191 192 192 #if PLATFORM(IOS_FAMILY) -
trunk/Source/WebKit/WebProcess/WebPage/WebInspector.cpp
r248177 r248713 210 210 } 211 211 212 void WebInspector::showMainResourceForFrame( uint64_tframeIdentifier)212 void WebInspector::showMainResourceForFrame(WebCore::FrameIdentifier frameIdentifier) 213 213 { 214 214 WebFrame* frame = WebProcess::singleton().webFrame(frameIdentifier); -
trunk/Source/WebKit/WebProcess/WebPage/WebInspector.h
r248177 r248713 29 29 #include "Connection.h" 30 30 #include "MessageReceiver.h" 31 #include <WebCore/FrameIdentifier.h> 31 32 #include <wtf/Noncopyable.h> 32 33 #include <wtf/text/WTFString.h> … … 61 62 void showResources(); 62 63 63 void showMainResourceForFrame( uint64_t frameIdentifier);64 void showMainResourceForFrame(WebCore::FrameIdentifier); 64 65 65 66 void setAttached(bool attached) { m_attached = attached; } -
trunk/Source/WebKit/WebProcess/WebPage/WebInspector.messages.in
r248177 r248713 30 30 ShowResources() 31 31 32 ShowMainResourceForFrame( uint64_tframeIdentifier)32 ShowMainResourceForFrame(WebCore::FrameIdentifier frameIdentifier) 33 33 34 34 OpenInNewTab(String url) -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r248522 r248713 1498 1498 } 1499 1499 1500 void WebPage::loadURLInFrame(URL&& url, const String& referrer, uint64_tframeID)1500 void WebPage::loadURLInFrame(URL&& url, const String& referrer, FrameIdentifier frameID) 1501 1501 { 1502 1502 WebFrame* frame = WebProcess::singleton().webFrame(frameID); … … 1507 1507 } 1508 1508 1509 void WebPage::loadDataInFrame(IPC::DataReference&& data, String&& MIMEType, String&& encodingName, URL&& baseURL, uint64_tframeID)1509 void WebPage::loadDataInFrame(IPC::DataReference&& data, String&& MIMEType, String&& encodingName, URL&& baseURL, FrameIdentifier frameID) 1510 1510 { 1511 1511 WebFrame* frame = WebProcess::singleton().webFrame(frameID); … … 1615 1615 } 1616 1616 1617 void WebPage::stopLoadingFrame( uint64_tframeID)1617 void WebPage::stopLoadingFrame(FrameIdentifier frameID) 1618 1618 { 1619 1619 WebFrame* frame = WebProcess::singleton().webFrame(frameID); … … 3235 3235 } 3236 3236 3237 void WebPage::didReceivePolicyDecision( uint64_tframeID, uint64_t listenerID, PolicyCheckIdentifier identifier, PolicyAction policyAction, uint64_t navigationID, const DownloadID& downloadID, Optional<WebsitePoliciesData>&& websitePolicies)3237 void WebPage::didReceivePolicyDecision(FrameIdentifier frameID, uint64_t listenerID, PolicyCheckIdentifier identifier, PolicyAction policyAction, uint64_t navigationID, const DownloadID& downloadID, Optional<WebsitePoliciesData>&& websitePolicies) 3238 3238 { 3239 3239 WebFrame* frame = WebProcess::singleton().webFrame(frameID); … … 3243 3243 } 3244 3244 3245 void WebPage::continueWillSubmitForm( uint64_tframeID, uint64_t listenerID)3245 void WebPage::continueWillSubmitForm(FrameIdentifier frameID, uint64_t listenerID) 3246 3246 { 3247 3247 WebFrame* frame = WebProcess::singleton().webFrame(frameID); … … 3385 3385 } 3386 3386 3387 void WebPage::runJavaScriptInFrame( uint64_tframeID, const String& script, bool forceUserGesture, CallbackID callbackID)3387 void WebPage::runJavaScriptInFrame(FrameIdentifier frameID, const String& script, bool forceUserGesture, CallbackID callbackID) 3388 3388 { 3389 3389 WebFrame* frame = WebProcess::singleton().webFrame(frameID); … … 3446 3446 } 3447 3447 3448 void WebPage::getSourceForFrame( uint64_tframeID, CallbackID callbackID)3448 void WebPage::getSourceForFrame(FrameIdentifier frameID, CallbackID callbackID) 3449 3449 { 3450 3450 String resultString; … … 3455 3455 } 3456 3456 3457 void WebPage::getMainResourceDataOfFrame( uint64_tframeID, CallbackID callbackID)3457 void WebPage::getMainResourceDataOfFrame(FrameIdentifier frameID, CallbackID callbackID) 3458 3458 { 3459 3459 RefPtr<SharedBuffer> buffer; … … 3486 3486 } 3487 3487 3488 void WebPage::getResourceDataFromFrame( uint64_tframeID, const String& resourceURLString, CallbackID callbackID)3488 void WebPage::getResourceDataFromFrame(FrameIdentifier frameID, const String& resourceURLString, CallbackID callbackID) 3489 3489 { 3490 3490 RefPtr<SharedBuffer> buffer; … … 3500 3500 } 3501 3501 3502 void WebPage::getWebArchiveOfFrame( uint64_tframeID, CallbackID callbackID)3502 void WebPage::getWebArchiveOfFrame(FrameIdentifier frameID, CallbackID callbackID) 3503 3503 { 3504 3504 #if PLATFORM(COCOA) … … 3803 3803 #endif 3804 3804 3805 void WebPage::addConsoleMessage( uint64_tframeID, MessageSource messageSource, MessageLevel messageLevel, const String& message, uint64_t requestID)3805 void WebPage::addConsoleMessage(FrameIdentifier frameID, MessageSource messageSource, MessageLevel messageLevel, const String& message, uint64_t requestID) 3806 3806 { 3807 3807 if (auto* frame = WebProcess::singleton().webFrame(frameID)) … … 3809 3809 } 3810 3810 3811 void WebPage::sendCSPViolationReport( uint64_tframeID, const URL& reportURL, IPC::FormDataReference&& reportData)3811 void WebPage::sendCSPViolationReport(FrameIdentifier frameID, const URL& reportURL, IPC::FormDataReference&& reportData) 3812 3812 { 3813 3813 auto report = reportData.takeData(); … … 3818 3818 } 3819 3819 3820 void WebPage::enqueueSecurityPolicyViolationEvent( uint64_tframeID, SecurityPolicyViolationEvent::Init&& eventInit)3820 void WebPage::enqueueSecurityPolicyViolationEvent(FrameIdentifier frameID, SecurityPolicyViolationEvent::Init&& eventInit) 3821 3821 { 3822 3822 auto* frame = WebProcess::singleton().webFrame(frameID); … … 4681 4681 #endif 4682 4682 4683 void WebPage::beginPrinting( uint64_tframeID, const PrintInfo& printInfo)4683 void WebPage::beginPrinting(FrameIdentifier frameID, const PrintInfo& printInfo) 4684 4684 { 4685 4685 WebFrame* frame = WebProcess::singleton().webFrame(frameID); … … 4725 4725 } 4726 4726 4727 void WebPage::computePagesForPrinting( uint64_tframeID, const PrintInfo& printInfo, CallbackID callbackID)4727 void WebPage::computePagesForPrinting(FrameIdentifier frameID, const PrintInfo& printInfo, CallbackID callbackID) 4728 4728 { 4729 4729 Vector<IntRect> resultPageRects; … … 4734 4734 } 4735 4735 4736 void WebPage::computePagesForPrintingImpl( uint64_tframeID, const PrintInfo& printInfo, Vector<WebCore::IntRect>& resultPageRects, double& resultTotalScaleFactorForPrinting, FloatBoxExtent& computedPageMargin)4736 void WebPage::computePagesForPrintingImpl(FrameIdentifier frameID, const PrintInfo& printInfo, Vector<WebCore::IntRect>& resultPageRects, double& resultTotalScaleFactorForPrinting, FloatBoxExtent& computedPageMargin) 4737 4737 { 4738 4738 ASSERT(resultPageRects.isEmpty()); … … 4757 4757 4758 4758 #if PLATFORM(COCOA) 4759 void WebPage::drawRectToImage( uint64_tframeID, const PrintInfo& printInfo, const IntRect& rect, const WebCore::IntSize& imageSize, CallbackID callbackID)4759 void WebPage::drawRectToImage(FrameIdentifier frameID, const PrintInfo& printInfo, const IntRect& rect, const WebCore::IntSize& imageSize, CallbackID callbackID) 4760 4760 { 4761 4761 WebFrame* frame = WebProcess::singleton().webFrame(frameID); … … 4807 4807 } 4808 4808 4809 void WebPage::drawPagesToPDF( uint64_tframeID, const PrintInfo& printInfo, uint32_t first, uint32_t count, CallbackID callbackID)4809 void WebPage::drawPagesToPDF(FrameIdentifier frameID, const PrintInfo& printInfo, uint32_t first, uint32_t count, CallbackID callbackID) 4810 4810 { 4811 4811 RetainPtr<CFMutableDataRef> pdfPageData; … … 4814 4814 } 4815 4815 4816 void WebPage::drawPagesToPDFImpl( uint64_tframeID, const PrintInfo& printInfo, uint32_t first, uint32_t count, RetainPtr<CFMutableDataRef>& pdfPageData)4816 void WebPage::drawPagesToPDFImpl(FrameIdentifier frameID, const PrintInfo& printInfo, uint32_t first, uint32_t count, RetainPtr<CFMutableDataRef>& pdfPageData) 4817 4817 { 4818 4818 WebFrame* frame = WebProcess::singleton().webFrame(frameID); … … 4865 4865 4866 4866 #elif PLATFORM(GTK) 4867 void WebPage::drawPagesForPrinting( uint64_tframeID, const PrintInfo& printInfo, CallbackID callbackID)4867 void WebPage::drawPagesForPrinting(FrameIdentifier frameID, const PrintInfo& printInfo, CallbackID callbackID) 4868 4868 { 4869 4869 beginPrinting(frameID, printInfo); … … 6503 6503 } 6504 6504 6505 void WebPage::frameBecameRemote( uint64_tframeID, GlobalFrameIdentifier&& remoteFrameIdentifier, GlobalWindowIdentifier&& remoteWindowIdentifier)6505 void WebPage::frameBecameRemote(FrameIdentifier frameID, GlobalFrameIdentifier&& remoteFrameIdentifier, GlobalWindowIdentifier&& remoteWindowIdentifier) 6506 6506 { 6507 6507 RefPtr<WebFrame> frame = WebProcess::singleton().webFrame(frameID); … … 6535 6535 6536 6536 #if ENABLE(RESOURCE_LOAD_STATISTICS) 6537 void WebPage::hasStorageAccess(RegistrableDomain&& subFrameDomain, RegistrableDomain&& topFrameDomain, uint64_tframeID, CompletionHandler<void(bool)>&& completionHandler)6537 void WebPage::hasStorageAccess(RegistrableDomain&& subFrameDomain, RegistrableDomain&& topFrameDomain, FrameIdentifier frameID, CompletionHandler<void(bool)>&& completionHandler) 6538 6538 { 6539 6539 WebProcess::singleton().ensureNetworkProcessConnection().connection().sendWithAsyncReply(Messages::NetworkConnectionToWebProcess::HasStorageAccess(sessionID(), WTFMove(subFrameDomain), WTFMove(topFrameDomain), frameID, m_pageID), WTFMove(completionHandler)); 6540 6540 } 6541 6541 6542 void WebPage::requestStorageAccess(RegistrableDomain&& subFrameDomain, RegistrableDomain&& topFrameDomain, uint64_tframeID, CompletionHandler<void(WebCore::StorageAccessWasGranted, WebCore::StorageAccessPromptWasShown)>&& completionHandler)6542 void WebPage::requestStorageAccess(RegistrableDomain&& subFrameDomain, RegistrableDomain&& topFrameDomain, FrameIdentifier frameID, CompletionHandler<void(WebCore::StorageAccessWasGranted, WebCore::StorageAccessPromptWasShown)>&& completionHandler) 6543 6543 { 6544 6544 WebProcess::singleton().ensureNetworkProcessConnection().connection().sendWithAsyncReply(Messages::NetworkConnectionToWebProcess::RequestStorageAccess(sessionID(), WTFMove(subFrameDomain), WTFMove(topFrameDomain), frameID, m_pageID), WTFMove(completionHandler)); … … 6556 6556 6557 6557 #if ENABLE(DEVICE_ORIENTATION) 6558 void WebPage::shouldAllowDeviceOrientationAndMotionAccess( uint64_tframeID, WebCore::SecurityOriginData&& origin, bool mayPrompt, CompletionHandler<void(DeviceOrientationOrMotionPermissionState)>&& completionHandler)6558 void WebPage::shouldAllowDeviceOrientationAndMotionAccess(FrameIdentifier frameID, WebCore::SecurityOriginData&& origin, bool mayPrompt, CompletionHandler<void(DeviceOrientationOrMotionPermissionState)>&& completionHandler) 6559 6559 { 6560 6560 sendWithAsyncReply(Messages::WebPageProxy::ShouldAllowDeviceOrientationAndMotionAccess(frameID, WTFMove(origin), mayPrompt), WTFMove(completionHandler)); -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.h
r248700 r248713 347 347 #endif 348 348 349 void addConsoleMessage( uint64_t frameID, MessageSource, MessageLevel, const String&, uint64_t requestID = 0);350 void sendCSPViolationReport( uint64_t frameID, const URL& reportURL, IPC::FormDataReference&&);351 void enqueueSecurityPolicyViolationEvent( uint64_t frameID, WebCore::SecurityPolicyViolationEvent::Init&&);349 void addConsoleMessage(WebCore::FrameIdentifier, MessageSource, MessageLevel, const String&, uint64_t requestID = 0); 350 void sendCSPViolationReport(WebCore::FrameIdentifier, const URL& reportURL, IPC::FormDataReference&&); 351 void enqueueSecurityPolicyViolationEvent(WebCore::FrameIdentifier, WebCore::SecurityPolicyViolationEvent::Init&&); 352 352 353 353 // -- Called by the DrawingArea. … … 523 523 524 524 void stopLoading(); 525 void stopLoadingFrame( uint64_t frameID);525 void stopLoadingFrame(WebCore::FrameIdentifier); 526 526 bool defersLoading() const; 527 527 void setDefersLoading(bool deferLoading); … … 770 770 void cancelComposition(); 771 771 772 void collapseSelectionInFrame( uint64_t frameID);772 void collapseSelectionInFrame(WebCore::FrameIdentifier); 773 773 void showEmojiPicker(WebCore::Frame&); 774 774 … … 863 863 #endif 864 864 865 void beginPrinting( uint64_t frameID, const PrintInfo&);865 void beginPrinting(WebCore::FrameIdentifier, const PrintInfo&); 866 866 void endPrinting(); 867 void computePagesForPrinting( uint64_t frameID, const PrintInfo&, CallbackID);868 void computePagesForPrintingImpl( uint64_t frameID, const PrintInfo&, Vector<WebCore::IntRect>& pageRects, double& totalScaleFactor, WebCore::FloatBoxExtent& computedMargin);867 void computePagesForPrinting(WebCore::FrameIdentifier, const PrintInfo&, CallbackID); 868 void computePagesForPrintingImpl(WebCore::FrameIdentifier, const PrintInfo&, Vector<WebCore::IntRect>& pageRects, double& totalScaleFactor, WebCore::FloatBoxExtent& computedMargin); 869 869 870 870 #if PLATFORM(COCOA) 871 void drawRectToImage( uint64_t frameID, const PrintInfo&, const WebCore::IntRect&, const WebCore::IntSize&, CallbackID);872 void drawPagesToPDF( uint64_t frameID, const PrintInfo&, uint32_t first, uint32_t count, CallbackID);873 void drawPagesToPDFImpl( uint64_t frameID, const PrintInfo&, uint32_t first, uint32_t count, RetainPtr<CFMutableDataRef>& pdfPageData);871 void drawRectToImage(WebCore::FrameIdentifier, const PrintInfo&, const WebCore::IntRect&, const WebCore::IntSize&, CallbackID); 872 void drawPagesToPDF(WebCore::FrameIdentifier, const PrintInfo&, uint32_t first, uint32_t count, CallbackID); 873 void drawPagesToPDFImpl(WebCore::FrameIdentifier, const PrintInfo&, uint32_t first, uint32_t count, RetainPtr<CFMutableDataRef>& pdfPageData); 874 874 #endif 875 875 876 876 #if PLATFORM(IOS_FAMILY) 877 void computePagesForPrintingAndDrawToPDF( uint64_t frameID, const PrintInfo&, CallbackID, Messages::WebPage::ComputePagesForPrintingAndDrawToPDF::DelayedReply&&);877 void computePagesForPrintingAndDrawToPDF(WebCore::FrameIdentifier, const PrintInfo&, CallbackID, Messages::WebPage::ComputePagesForPrintingAndDrawToPDF::DelayedReply&&); 878 878 #endif 879 879 880 880 #if PLATFORM(GTK) 881 void drawPagesForPrinting( uint64_t frameID, const PrintInfo&, CallbackID);881 void drawPagesForPrinting(WebCore::FrameIdentifier, const PrintInfo&, CallbackID); 882 882 void didFinishPrintOperation(const WebCore::ResourceError&, CallbackID); 883 883 #endif … … 1132 1132 1133 1133 #if ENABLE(RESOURCE_LOAD_STATISTICS) 1134 void hasStorageAccess(WebCore::RegistrableDomain&& subFrameDomain, WebCore::RegistrableDomain&& topFrameDomain, uint64_t frameID, CompletionHandler<void(bool)>&&);1135 void requestStorageAccess(WebCore::RegistrableDomain&& subFrameDomain, WebCore::RegistrableDomain&& topFrameDomain, uint64_t frameID, CompletionHandler<void(WebCore::StorageAccessWasGranted, WebCore::StorageAccessPromptWasShown)>&&);1134 void hasStorageAccess(WebCore::RegistrableDomain&& subFrameDomain, WebCore::RegistrableDomain&& topFrameDomain, WebCore::FrameIdentifier, CompletionHandler<void(bool)>&&); 1135 void requestStorageAccess(WebCore::RegistrableDomain&& subFrameDomain, WebCore::RegistrableDomain&& topFrameDomain, WebCore::FrameIdentifier, CompletionHandler<void(WebCore::StorageAccessWasGranted, WebCore::StorageAccessPromptWasShown)>&&); 1136 1136 void wasLoadedWithDataTransferFromPrevalentResource(); 1137 1137 #endif 1138 1138 1139 1139 #if ENABLE(DEVICE_ORIENTATION) 1140 void shouldAllowDeviceOrientationAndMotionAccess( uint64_t frameID, WebCore::SecurityOriginData&&, bool mayPrompt, CompletionHandler<void(WebCore::DeviceOrientationOrMotionPermissionState)>&&);1140 void shouldAllowDeviceOrientationAndMotionAccess(WebCore::FrameIdentifier, WebCore::SecurityOriginData&&, bool mayPrompt, CompletionHandler<void(WebCore::DeviceOrientationOrMotionPermissionState)>&&); 1141 1141 #endif 1142 1142 … … 1357 1357 static bool logicalScroll(WebCore::Page*, WebCore::ScrollLogicalDirection, WebCore::ScrollGranularity); 1358 1358 1359 void loadURLInFrame(URL&&, const String& referrer, uint64_t frameID);1360 void loadDataInFrame(IPC::DataReference&&, String&& MIMEType, String&& encodingName, URL&& baseURL, uint64_t frameID);1359 void loadURLInFrame(URL&&, const String& referrer, WebCore::FrameIdentifier); 1360 void loadDataInFrame(IPC::DataReference&&, String&& MIMEType, String&& encodingName, URL&& baseURL, WebCore::FrameIdentifier); 1361 1361 1362 1362 enum class WasRestoredByAPIRequest { No, Yes }; … … 1390 1390 void getContentsAsMHTMLData(CallbackID); 1391 1391 #endif 1392 void getMainResourceDataOfFrame( uint64_t frameID, CallbackID);1393 void getResourceDataFromFrame( uint64_t frameID, const String& resourceURL, CallbackID);1392 void getMainResourceDataOfFrame(WebCore::FrameIdentifier, CallbackID); 1393 void getResourceDataFromFrame(WebCore::FrameIdentifier, const String& resourceURL, CallbackID); 1394 1394 void getRenderTreeExternalRepresentation(CallbackID); 1395 1395 void getSelectionOrContentsAsString(CallbackID); 1396 1396 void getSelectionAsWebArchiveData(CallbackID); 1397 void getSourceForFrame( uint64_t frameID, CallbackID);1398 void getWebArchiveOfFrame( uint64_t frameID, CallbackID);1397 void getSourceForFrame(WebCore::FrameIdentifier, CallbackID); 1398 void getWebArchiveOfFrame(WebCore::FrameIdentifier, CallbackID); 1399 1399 void runJavaScript(WebFrame*, const String&, bool forceUserGesture, const Optional<String>& worldName, CallbackID); 1400 1400 void runJavaScriptInMainFrameScriptWorld(const String&, bool forceUserGesture, const Optional<String>& worldName, CallbackID); 1401 void runJavaScriptInFrame( uint64_t frameID, const String&, bool forceUserGesture, CallbackID);1401 void runJavaScriptInFrame(WebCore::FrameIdentifier, const String&, bool forceUserGesture, CallbackID); 1402 1402 void forceRepaint(CallbackID); 1403 1403 void takeSnapshot(WebCore::IntRect snapshotRect, WebCore::IntSize bitmapSize, uint32_t options, CallbackID); … … 1413 1413 #endif 1414 1414 1415 void didReceivePolicyDecision( uint64_t frameID, uint64_t listenerID, WebCore::PolicyCheckIdentifier, WebCore::PolicyAction, uint64_t navigationID, const DownloadID&, Optional<WebsitePoliciesData>&&);1416 void continueWillSubmitForm( uint64_t frameID, uint64_t listenerID);1415 void didReceivePolicyDecision(WebCore::FrameIdentifier, uint64_t listenerID, WebCore::PolicyCheckIdentifier, WebCore::PolicyAction, uint64_t navigationID, const DownloadID&, Optional<WebsitePoliciesData>&&); 1416 void continueWillSubmitForm(WebCore::FrameIdentifier, uint64_t listenerID); 1417 1417 void setUserAgent(const String&); 1418 1418 void setCustomTextEncodingName(const String&); … … 1432 1432 1433 1433 RetainPtr<PDFDocument> pdfDocumentForPrintingFrame(WebCore::Frame*); 1434 void computePagesForPrintingPDFDocument( uint64_t frameID, const PrintInfo&, Vector<WebCore::IntRect>& resultPageRects);1434 void computePagesForPrintingPDFDocument(WebCore::FrameIdentifier, const PrintInfo&, Vector<WebCore::IntRect>& resultPageRects); 1435 1435 void drawPDFDocument(CGContextRef, PDFDocument *, const PrintInfo&, const WebCore::IntRect&); 1436 1436 void drawPagesToPDFFromPDFDocument(CGContextRef, PDFDocument *, const PrintInfo&, uint32_t first, uint32_t count); … … 1585 1585 #endif 1586 1586 1587 void frameBecameRemote( uint64_t frameID, WebCore::GlobalFrameIdentifier&& remoteFrameIdentifier, WebCore::GlobalWindowIdentifier&& remoteWindowIdentifier);1587 void frameBecameRemote(WebCore::FrameIdentifier, WebCore::GlobalFrameIdentifier&& remoteFrameIdentifier, WebCore::GlobalWindowIdentifier&& remoteWindowIdentifier); 1588 1588 1589 1589 void registerURLSchemeHandler(uint64_t identifier, const String& scheme); -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in
r248522 r248713 28 28 SetBackgroundColor(Optional<WebCore::Color> color) 29 29 30 AddConsoleMessage( uint64_tframeID, enum:uint8_t JSC::MessageSource messageSource, enum:uint8_t JSC::MessageLevel messageLevel, String message, uint64_t requestID)31 SendCSPViolationReport( uint64_tframeID, URL reportURL, IPC::FormDataReference reportData)32 EnqueueSecurityPolicyViolationEvent( uint64_tframeID, WebCore::SecurityPolicyViolationEvent::Init eventInit)30 AddConsoleMessage(WebCore::FrameIdentifier frameID, enum:uint8_t JSC::MessageSource messageSource, enum:uint8_t JSC::MessageLevel messageLevel, String message, uint64_t requestID) 31 SendCSPViolationReport(WebCore::FrameIdentifier frameID, URL reportURL, IPC::FormDataReference reportData) 32 EnqueueSecurityPolicyViolationEvent(WebCore::FrameIdentifier frameID, WebCore::SecurityPolicyViolationEvent::Init eventInit) 33 33 34 34 TestProcessIncomingSyncMessagesWhenWaitingForSyncReply() -> (bool handled) Synchronous … … 163 163 TryRestoreScrollPosition() 164 164 165 LoadURLInFrame(URL url, String referrer, uint64_tframeID)166 LoadDataInFrame(IPC::DataReference data, String MIMEType, String encodingName, URL baseURL, uint64_tframeID)165 LoadURLInFrame(URL url, String referrer, WebCore::FrameIdentifier frameID) 166 LoadDataInFrame(IPC::DataReference data, String MIMEType, String encodingName, URL baseURL, WebCore::FrameIdentifier frameID) 167 167 LoadRequest(struct WebKit::LoadParameters loadParameters) 168 168 LoadData(struct WebKit::LoadParameters loadParameters) … … 174 174 StopLoading() 175 175 176 StopLoadingFrame( uint64_tframeID)176 StopLoadingFrame(WebCore::FrameIdentifier frameID) 177 177 178 178 RestoreSession(Vector<WebKit::BackForwardListItemState> itemStates) … … 183 183 184 184 UpdateWebsitePolicies(struct WebKit::WebsitePoliciesData websitePolicies) 185 DidReceivePolicyDecision( uint64_tframeID, uint64_t listenerID, WebCore::PolicyCheckIdentifier policyCheckIdentifier, enum:uint8_t WebCore::PolicyAction policyAction, uint64_t navigationID, WebKit::DownloadID downloadID, Optional<WebKit::WebsitePoliciesData> websitePolicies)186 ContinueWillSubmitForm( uint64_tframeID, uint64_t listenerID)185 DidReceivePolicyDecision(WebCore::FrameIdentifier frameID, uint64_t listenerID, WebCore::PolicyCheckIdentifier policyCheckIdentifier, enum:uint8_t WebCore::PolicyAction policyAction, uint64_t navigationID, WebKit::DownloadID downloadID, Optional<WebKit::WebsitePoliciesData> websitePolicies) 186 ContinueWillSubmitForm(WebCore::FrameIdentifier frameID, uint64_t listenerID) 187 187 188 188 ClearSelection() … … 197 197 GetContentsAsMHTMLData(WebKit::CallbackID callbackID) 198 198 #endif 199 GetMainResourceDataOfFrame( uint64_tframeID, WebKit::CallbackID callbackID)200 GetResourceDataFromFrame( uint64_tframeID, String resourceURL, WebKit::CallbackID callbackID)199 GetMainResourceDataOfFrame(WebCore::FrameIdentifier frameID, WebKit::CallbackID callbackID) 200 GetResourceDataFromFrame(WebCore::FrameIdentifier frameID, String resourceURL, WebKit::CallbackID callbackID) 201 201 GetRenderTreeExternalRepresentation(WebKit::CallbackID callbackID) 202 202 GetSelectionOrContentsAsString(WebKit::CallbackID callbackID) 203 203 GetSelectionAsWebArchiveData(WebKit::CallbackID callbackID) 204 GetSourceForFrame( uint64_tframeID, WebKit::CallbackID callbackID)205 GetWebArchiveOfFrame( uint64_tframeID, WebKit::CallbackID callbackID)204 GetSourceForFrame(WebCore::FrameIdentifier frameID, WebKit::CallbackID callbackID) 205 GetWebArchiveOfFrame(WebCore::FrameIdentifier frameID, WebKit::CallbackID callbackID) 206 206 RunJavaScriptInMainFrameScriptWorld(String script, bool forceUserGesture, Optional<String> worldName, WebKit::CallbackID callbackID) 207 RunJavaScriptInFrame( uint64_tframeID, String script, bool forceUserGesture, WebKit::CallbackID callbackID)207 RunJavaScriptInFrame(WebCore::FrameIdentifier frameID, String script, bool forceUserGesture, WebKit::CallbackID callbackID) 208 208 ForceRepaint(WebKit::CallbackID callbackID) 209 209 … … 381 381 382 382 # Printing. 383 BeginPrinting( uint64_tframeID, struct WebKit::PrintInfo printInfo)383 BeginPrinting(WebCore::FrameIdentifier frameID, struct WebKit::PrintInfo printInfo) 384 384 EndPrinting() 385 ComputePagesForPrinting( uint64_tframeID, struct WebKit::PrintInfo printInfo, WebKit::CallbackID callbackID)386 #if PLATFORM(COCOA) 387 DrawRectToImage( uint64_tframeID, struct WebKit::PrintInfo printInfo, WebCore::IntRect rect, WebCore::IntSize imageSize, WebKit::CallbackID callbackID)388 DrawPagesToPDF( uint64_tframeID, struct WebKit::PrintInfo printInfo, uint32_t first, uint32_t count, WebKit::CallbackID callbackID)385 ComputePagesForPrinting(WebCore::FrameIdentifier frameID, struct WebKit::PrintInfo printInfo, WebKit::CallbackID callbackID) 386 #if PLATFORM(COCOA) 387 DrawRectToImage(WebCore::FrameIdentifier frameID, struct WebKit::PrintInfo printInfo, WebCore::IntRect rect, WebCore::IntSize imageSize, WebKit::CallbackID callbackID) 388 DrawPagesToPDF(WebCore::FrameIdentifier frameID, struct WebKit::PrintInfo printInfo, uint32_t first, uint32_t count, WebKit::CallbackID callbackID) 389 389 #if PLATFORM(IOS_FAMILY) 390 ComputePagesForPrintingAndDrawToPDF( uint64_tframeID, struct WebKit::PrintInfo printInfo, WebKit::CallbackID callbackID) -> (uint32_t pageCount) Synchronous390 ComputePagesForPrintingAndDrawToPDF(WebCore::FrameIdentifier frameID, struct WebKit::PrintInfo printInfo, WebKit::CallbackID callbackID) -> (uint32_t pageCount) Synchronous 391 391 #endif 392 392 #endif 393 393 #if PLATFORM(GTK) 394 DrawPagesForPrinting( uint64_tframeID, struct WebKit::PrintInfo printInfo, WebKit::CallbackID callbackID)394 DrawPagesForPrinting(WebCore::FrameIdentifier frameID, struct WebKit::PrintInfo printInfo, WebKit::CallbackID callbackID) 395 395 #endif 396 396 … … 414 414 CancelComposition() 415 415 416 CollapseSelectionInFrame( uint64_tframeID)416 CollapseSelectionInFrame(WebCore::FrameIdentifier frameID) 417 417 418 418 GetCenterForZoomGesture(WebCore::IntPoint centerInViewCoordinates) -> (WebCore::IntPoint center) Synchronous … … 537 537 #endif 538 538 539 FrameBecameRemote( uint64_tframeID, struct WebCore::GlobalFrameIdentifier remoteFrameIdentifier, struct WebCore::GlobalWindowIdentifier remoteWindowIdentifier)539 FrameBecameRemote(WebCore::FrameIdentifier frameID, struct WebCore::GlobalFrameIdentifier remoteFrameIdentifier, struct WebCore::GlobalWindowIdentifier remoteWindowIdentifier) 540 540 541 541 RegisterURLSchemeHandler(uint64_t identifier, String scheme) -
trunk/Source/WebKit/WebProcess/WebPage/gtk/WebPageGtk.cpp
r247719 r248713 184 184 } 185 185 186 void WebPage::collapseSelectionInFrame( uint64_tframeID)186 void WebPage::collapseSelectionInFrame(FrameIdentifier frameID) 187 187 { 188 188 WebFrame* frame = WebProcess::singleton().webFrame(frameID); -
trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
r248700 r248713 552 552 } 553 553 554 void WebPage::computePagesForPrintingPDFDocument( uint64_t, const PrintInfo&, Vector<IntRect>&)554 void WebPage::computePagesForPrintingPDFDocument(WebCore::FrameIdentifier, const PrintInfo&, Vector<IntRect>&) 555 555 { 556 556 notImplemented(); … … 3706 3706 #endif 3707 3707 3708 void WebPage::computePagesForPrintingAndDrawToPDF( uint64_tframeID, const PrintInfo& printInfo, CallbackID callbackID, Messages::WebPage::ComputePagesForPrintingAndDrawToPDF::DelayedReply&& reply)3708 void WebPage::computePagesForPrintingAndDrawToPDF(WebCore::FrameIdentifier frameID, const PrintInfo& printInfo, CallbackID callbackID, Messages::WebPage::ComputePagesForPrintingAndDrawToPDF::DelayedReply&& reply) 3709 3709 { 3710 3710 if (printInfo.snapshotFirstPage) { -
trunk/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm
r247460 r248713 671 671 } 672 672 673 void WebPage::computePagesForPrintingPDFDocument( uint64_tframeID, const PrintInfo& printInfo, Vector<IntRect>& resultPageRects)673 void WebPage::computePagesForPrintingPDFDocument(WebCore::FrameIdentifier frameID, const PrintInfo& printInfo, Vector<IntRect>& resultPageRects) 674 674 { 675 675 ASSERT(resultPageRects.isEmpty()); -
trunk/Source/WebKit/WebProcess/WebProcess.cpp
r248697 r248713 769 769 } 770 770 771 WebFrame* WebProcess::webFrame( uint64_tframeID) const771 WebFrame* WebProcess::webFrame(FrameIdentifier frameID) const 772 772 { 773 773 return m_frameMap.get(frameID); 774 774 } 775 775 776 void WebProcess::addWebFrame( uint64_tframeID, WebFrame* frame)776 void WebProcess::addWebFrame(FrameIdentifier frameID, WebFrame* frame) 777 777 { 778 778 m_frameMap.set(frameID, frame); 779 779 } 780 780 781 void WebProcess::removeWebFrame( uint64_tframeID)781 void WebProcess::removeWebFrame(FrameIdentifier frameID) 782 782 { 783 783 m_frameMap.remove(frameID); -
trunk/Source/WebKit/WebProcess/WebProcess.h
r246490 r248713 41 41 #include "WebSocketChannelManager.h" 42 42 #include <WebCore/ActivityState.h> 43 #include <WebCore/FrameIdentifier.h> 43 44 #include <WebCore/PageIdentifier.h> 44 45 #include <WebCore/RegistrableDomain.h> … … 173 174 bool fullKeyboardAccessEnabled() const { return m_fullKeyboardAccessEnabled; } 174 175 175 WebFrame* webFrame( uint64_t) const;176 void addWebFrame( uint64_t, WebFrame*);177 void removeWebFrame( uint64_t);176 WebFrame* webFrame(WebCore::FrameIdentifier) const; 177 void addWebFrame(WebCore::FrameIdentifier, WebFrame*); 178 void removeWebFrame(WebCore::FrameIdentifier); 178 179 179 180 WebPageGroupProxy* webPageGroup(WebCore::PageGroup*); … … 490 491 bool m_fullKeyboardAccessEnabled { false }; 491 492 492 HashMap< uint64_t, WebFrame*> m_frameMap;493 HashMap<WebCore::FrameIdentifier, WebFrame*> m_frameMap; 493 494 494 495 typedef HashMap<const char*, std::unique_ptr<WebProcessSupplement>, PtrHash<const char*>> WebProcessSupplementMap; -
trunk/Source/WebKitLegacy/mac/ChangeLog
r248699 r248713 1 2019-08-15 Simon Fraser <simon.fraser@apple.com> 2 3 Use ObjectIdentifier<FrameIdentifierType> for frameIDs 4 https://bugs.webkit.org/show_bug.cgi?id=199986 5 6 Reviewed by Ryosuke Niwa. 7 8 Use the strongly-typed FrameIdentifier instead of uint64_t as frame identifiers everywhere. 9 10 * WebCoreSupport/WebFrameLoaderClient.h: 11 * WebCoreSupport/WebFrameLoaderClient.mm: 12 (WebFrameLoaderClient::frameID const): 13 1 14 2019-08-14 Ryan Haddad <ryanhaddad@apple.com> 2 15 -
trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.h
r245796 r248713 65 65 66 66 Optional<WebCore::PageIdentifier> pageID() const final; 67 Optional< uint64_t> frameID() const final;67 Optional<WebCore::FrameIdentifier> frameID() const final; 68 68 PAL::SessionID sessionID() const final; 69 69 -
trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm
r247416 r248713 215 215 } 216 216 217 Optional< uint64_t> WebFrameLoaderClient::frameID() const217 Optional<FrameIdentifier> WebFrameLoaderClient::frameID() const 218 218 { 219 219 return WTF::nullopt; -
trunk/Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.cpp
r248444 r248713 128 128 } 129 129 130 Optional< uint64_t> WebFrameLoaderClient::frameID() const130 Optional<WebCore::FrameIdentifier> WebFrameLoaderClient::frameID() const 131 131 { 132 132 return WTF::nullopt; -
trunk/Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.h
r245796 r248713 53 53 54 54 Optional<WebCore::PageIdentifier> pageID() const final; 55 Optional< uint64_t> frameID() const final;55 Optional<WebCore::FrameIdentifier> frameID() const final; 56 56 PAL::SessionID sessionID() const final; 57 57
Note:
See TracChangeset
for help on using the changeset viewer.