Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

browser(webkit): roll to 06/03 (#6889)

Yury Semikhatskycce62da3b25b
diff --git a/browser_patches/webkit/BUILD_NUMBER b/browser_patches/webkit/BUILD_NUMBER
index 1fdf9876c0..053d866107 100644
--- a/browser_patches/webkit/BUILD_NUMBER
+++ b/browser_patches/webkit/BUILD_NUMBER
@@ -1,2 +1,2 @@
-1492
-Changed: [email protected] Thu 03 Jun 2021 11:45:44 AM PDT
+1493
+Changed: [email protected] Thu 03 Jun 2021 03:46:28 PM PDT
diff --git a/browser_patches/webkit/UPSTREAM_CONFIG.sh b/browser_patches/webkit/UPSTREAM_CONFIG.sh
index 35d091ebb7..47f9739ff0 100644
--- a/browser_patches/webkit/UPSTREAM_CONFIG.sh
+++ b/browser_patches/webkit/UPSTREAM_CONFIG.sh
@@ -1,3 +1,3 @@
REMOTE_URL="https://git.webkit.org/git/WebKit.git"
BASE_BRANCH="master"
-BASE_REVISION="92cb2e2c458a415ea246c0e69f63a04435ba269e"
+BASE_REVISION="bb7adf2388696725912768e008939800b8dffe1d"
diff --git a/browser_patches/webkit/embedder/Playwright/win/Common.cpp b/browser_patches/webkit/embedder/Playwright/win/Common.cpp
index accbfdb33f..1f7781acf0 100644
--- a/browser_patches/webkit/embedder/Playwright/win/Common.cpp
+++ b/browser_patches/webkit/embedder/Playwright/win/Common.cpp
@@ -34,7 +34,6 @@
#include "PlaywrightReplace.h"
#include <dbghelp.h>
#include <shlobj.h>
-#include <wtf/Optional.h>
#include <wtf/StdLibExtras.h>
#include <vector>
@@ -122,7 +121,7 @@ void createCrashReport(EXCEPTION_POINTERS* exceptionPointers)
}
}
-Optional<Credential> askCredential(HWND hwnd, const std::wstring& realm)
+std::optional<Credential> askCredential(HWND hwnd, const std::wstring& realm)
{
struct AuthDialog : public Dialog {
std::wstring realm;
@@ -146,7 +145,7 @@ Optional<Credential> askCredential(HWND hwnd, const std::wstring& realm)
if (dialog.run(hInst, hwnd, IDD_AUTH))
return dialog.credential;
- return WTF::nullopt;
+ return std::nullopt;
}
bool askServerTrustEvaluation(HWND hwnd, const std::wstring& text)
diff --git a/browser_patches/webkit/embedder/Playwright/win/Common.h b/browser_patches/webkit/embedder/Playwright/win/Common.h
index 6d7d2e5c98..32d221b0f3 100644
--- a/browser_patches/webkit/embedder/Playwright/win/Common.h
+++ b/browser_patches/webkit/embedder/Playwright/win/Common.h
@@ -29,7 +29,6 @@
#include <WebKit/WKRetainPtr.h>
#include <WebKit/WKString.h>
#include <WebKit/WKURL.h>
-#include <wtf/Optional.h>
struct CommandLineOptions {
bool useFullDesktop { };
@@ -55,7 +54,7 @@ void computeFullDesktopFrame();
bool getAppDataFolder(_bstr_t& directory);
CommandLineOptions parseCommandLine();
void createCrashReport(EXCEPTION_POINTERS*);
-Optional<Credential> askCredential(HWND, const std::wstring& realm);
+std::optional<Credential> askCredential(HWND, const std::wstring& realm);
bool askServerTrustEvaluation(HWND, const std::wstring& text);
std::wstring replaceString(std::wstring src, const std::wstring& oldValue, const std::wstring& newValue);
diff --git a/browser_patches/webkit/patches/bootstrap.diff b/browser_patches/webkit/patches/bootstrap.diff
index b016d3090a..de8f183dfa 100644
--- a/browser_patches/webkit/patches/bootstrap.diff
+++ b/browser_patches/webkit/patches/bootstrap.diff
@@ -1,8 +1,8 @@
diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt
-index 5df693efd7d701a404b2579b65c89af84840d252..b93a33920eb7fd5ee170bb29c5d81e1ea120092d 100644
+index 62caf61217087b6534a1a7bef2d7b329ad30f109..ca84452d35a5c8fa7982b84804198c82c9ede43e 100644
--- a/Source/JavaScriptCore/CMakeLists.txt
+++ b/Source/JavaScriptCore/CMakeLists.txt
-@@ -1241,22 +1241,27 @@ set(JavaScriptCore_INSPECTOR_DOMAINS
+@@ -1240,22 +1240,27 @@ set(JavaScriptCore_INSPECTOR_DOMAINS
${JAVASCRIPTCORE_DIR}/inspector/protocol/CSS.json
${JAVASCRIPTCORE_DIR}/inspector/protocol/Canvas.json
${JAVASCRIPTCORE_DIR}/inspector/protocol/Console.json
@@ -118,14 +118,14 @@ index eb25aedee4cd9ebe007e06c2515b37ee095b06f4..badf6559595c8377db1089ca3c25008e
static String requestId(unsigned long identifier);
};
diff --git a/Source/JavaScriptCore/inspector/InjectedScript.cpp b/Source/JavaScriptCore/inspector/InjectedScript.cpp
-index 65f8d6bf17af27b559d5bef3089757ffa85c54de..f431ca3f55536b8419e007a612fd56120d4702dd 100644
+index 8b290faebc1865519b0e7c514f497585dfc0bbda..53c68bca057c85c94201ef8e9870f0cb9e4cef6f 100644
--- a/Source/JavaScriptCore/inspector/InjectedScript.cpp
+++ b/Source/JavaScriptCore/inspector/InjectedScript.cpp
@@ -91,7 +91,7 @@ void InjectedScript::awaitPromise(const String& promiseObjectId, bool returnByVa
makeAsyncCall(function, WTFMove(callback));
}
--void InjectedScript::callFunctionOn(Protocol::ErrorString& errorString, const String& objectId, const String& expression, const String& arguments, bool returnByValue, bool generatePreview, RefPtr<Protocol::Runtime::RemoteObject>& result, Optional<bool>& wasThrown)
+-void InjectedScript::callFunctionOn(Protocol::ErrorString& errorString, const String& objectId, const String& expression, const String& arguments, bool returnByValue, bool generatePreview, RefPtr<Protocol::Runtime::RemoteObject>& result, std::optional<bool>& wasThrown)
+void InjectedScript::callFunctionOn(const String& objectId, const String& expression, const String& arguments, bool returnByValue, bool generatePreview, bool awaitPromise, AsyncCallCallback&& callback)
{
Deprecated::ScriptFunctionCall function(injectedScriptObject(), "callFunctionOn"_s, inspectorEnvironment()->functionCallHandler());
@@ -135,14 +135,14 @@ index 65f8d6bf17af27b559d5bef3089757ffa85c54de..f431ca3f55536b8419e007a612fd5612
function.appendArgument(returnByValue);
function.appendArgument(generatePreview);
-
-- Optional<int> savedResultIndex;
+- std::optional<int> savedResultIndex;
- makeEvalCall(errorString, function, result, wasThrown, savedResultIndex);
- ASSERT(!savedResultIndex);
+ function.appendArgument(awaitPromise);
+ makeAsyncCall(function, WTFMove(callback));
}
- void InjectedScript::evaluateOnCallFrame(Protocol::ErrorString& errorString, JSC::JSValue callFrames, const String& callFrameId, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generatePreview, bool saveResult, RefPtr<Protocol::Runtime::RemoteObject>& result, Optional<bool>& wasThrown, Optional<int>& savedResultIndex)
+ void InjectedScript::evaluateOnCallFrame(Protocol::ErrorString& errorString, JSC::JSValue callFrames, const String& callFrameId, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generatePreview, bool saveResult, RefPtr<Protocol::Runtime::RemoteObject>& result, std::optional<bool>& wasThrown, std::optional<int>& savedResultIndex)
@@ -289,6 +287,10 @@ RefPtr<Protocol::Runtime::RemoteObject> InjectedScript::wrapObject(JSC::JSValue
auto callResult = callFunctionWithEvalEnabled(wrapFunction);
if (!callResult)
@@ -155,14 +155,14 @@ index 65f8d6bf17af27b559d5bef3089757ffa85c54de..f431ca3f55536b8419e007a612fd5612
auto resultValue = toInspectorValue(globalObject(), callResult.value());
if (!resultValue)
diff --git a/Source/JavaScriptCore/inspector/InjectedScript.h b/Source/JavaScriptCore/inspector/InjectedScript.h
-index 59c07a341eaa2788f3189fb6c39e2f6b633859c4..89b0d84b85929ebf160b72ecd43cdb13e5a84d28 100644
+index e6b24967273095ae424ac9b3fe5e081ee8999ab7..9f7b72259ab79504b8bfcc24d35abe70d7372065 100644
--- a/Source/JavaScriptCore/inspector/InjectedScript.h
+++ b/Source/JavaScriptCore/inspector/InjectedScript.h
@@ -64,7 +64,7 @@ public:
- void evaluate(Protocol::ErrorString&, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generatePreview, bool saveResult, RefPtr<Protocol::Runtime::RemoteObject>& result, Optional<bool>& wasThrown, Optional<int>& savedResultIndex);
+ void evaluate(Protocol::ErrorString&, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generatePreview, bool saveResult, RefPtr<Protocol::Runtime::RemoteObject>& result, std::optional<bool>& wasThrown, std::optional<int>& savedResultIndex);
void awaitPromise(const String& promiseObjectId, bool returnByValue, bool generatePreview, bool saveResult, AsyncCallCallback&&);
- void evaluateOnCallFrame(Protocol::ErrorString&, JSC::JSValue callFrames, const String& callFrameId, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generatePreview, bool saveResult, RefPtr<Protocol::Runtime::RemoteObject>& result, Optional<bool>& wasThrown, Optional<int>& savedResultIndex);
-- void callFunctionOn(Protocol::ErrorString&, const String& objectId, const String& expression, const String& arguments, bool returnByValue, bool generatePreview, RefPtr<Protocol::Runtime::RemoteObject>& result, Optional<bool>& wasThrown);
+ void evaluateOnCallFrame(Protocol::ErrorString&, JSC::JSValue callFrames, const String& callFrameId, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generatePreview, bool saveResult, RefPtr<Protocol::Runtime::RemoteObject>& result, std::optional<bool>& wasThrown, std::optional<int>& savedResultIndex);
+- void callFunctionOn(Protocol::ErrorString&, const String& objectId, const String& expression, const String& arguments, bool returnByValue, bool generatePreview, RefPtr<Protocol::Runtime::RemoteObject>& result, std::optional<bool>& wasThrown);
+ void callFunctionOn(const String& objectId, const String& expression, const String& arguments, bool returnByValue, bool generatePreview, bool awaitPromise, AsyncCallCallback&&);
void getFunctionDetails(Protocol::ErrorString&, const String& functionId, RefPtr<Protocol::Debugger::FunctionDetails>& result);
void functionDetails(Protocol::ErrorString&, JSC::JSValue, RefPtr<Protocol::Debugger::FunctionDetails>& result);
@@ -248,7 +248,7 @@ index 48baed6a1b7ffad453379a2f1eb71b8c4925f6c4..40d36f784f46e44dbad908402a71e6b0
}
diff --git a/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp b/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp
-index 033a1b4713352777ee0de5ed53e64f8391f9d74f..fc356dec4b1518547a4217def6a7b5f1d97330fb 100644
+index 4895c5a70d6a4745597f77163bc92e0745594829..e4905e0d4e5ff88e479147c84e41359f9274b341 100644
--- a/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp
+++ b/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp
@@ -101,7 +101,7 @@ void BackendDispatcher::registerDispatcherForDomain(const String& domain, Supple
@@ -269,12 +269,12 @@ index 033a1b4713352777ee0de5ed53e64f8391f9d74f..fc356dec4b1518547a4217def6a7b5f1
+
{
// We could be called re-entrantly from a nested run loop, so restore the previous id.
- SetForScope<Optional<long>> scopedRequestId(m_currentRequestId, requestId);
+ SetForScope<std::optional<long>> scopedRequestId(m_currentRequestId, requestId);
diff --git a/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.h b/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.h
-index 8a5efb316e9d09337ada2323dc6f926056a9c2f9..f3dcc8fcc087f474abc88cea837d11ff3e5faeff 100644
+index 37c4f9833d4981b47bcd8debd4a79109254641a2..1c82cc9783618234bef7024d91821ce509912526 100644
--- a/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.h
+++ b/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.h
-@@ -84,7 +84,10 @@ public:
+@@ -83,7 +83,10 @@ public:
};
void registerDispatcherForDomain(const String& domain, SupplementalBackendDispatcher*);
@@ -338,15 +338,15 @@ index 4b95964db4d902b4b7f4b0b4c40afea51654ff2f..966a5927702b65edb343369decafda7f
bool m_isPaused { false };
};
diff --git a/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp b/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp
-index 40437211f132ea95748086b5ea3ed2868341e766..fd49f7509bd07ce773d84af89c4de0f8bb9abca1 100644
+index 76d72c7273f1bb2170485015d931b1fba92d3b5a..c0cf9588c04bfba0d6176c4d6af691bd56ca6cec 100644
--- a/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp
+++ b/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp
@@ -168,16 +168,15 @@ void InspectorRuntimeAgent::awaitPromise(const Protocol::Runtime::RemoteObjectId
});
}
--Protocol::ErrorStringOr<std::tuple<Ref<Protocol::Runtime::RemoteObject>, Optional<bool> /* wasThrown */>> InspectorRuntimeAgent::callFunctionOn(const Protocol::Runtime::RemoteObjectId& objectId, const String& functionDeclaration, RefPtr<JSON::Array>&& arguments, Optional<bool>&& doNotPauseOnExceptionsAndMuteConsole, Optional<bool>&& returnByValue, Optional<bool>&& generatePreview, Optional<bool>&& /* emulateUserGesture */)
-+void InspectorRuntimeAgent::callFunctionOn(const Protocol::Runtime::RemoteObjectId& objectId, const String& functionDeclaration, RefPtr<JSON::Array>&& arguments, Optional<bool>&& doNotPauseOnExceptionsAndMuteConsole, Optional<bool>&& returnByValue, Optional<bool>&& generatePreview, Optional<bool>&& /* emulateUserGesture */, Optional<bool>&& awaitPromise, Ref<CallFunctionOnCallback>&& callback)
+-Protocol::ErrorStringOr<std::tuple<Ref<Protocol::Runtime::RemoteObject>, std::optional<bool> /* wasThrown */>> InspectorRuntimeAgent::callFunctionOn(const Protocol::Runtime::RemoteObjectId& objectId, const String& functionDeclaration, RefPtr<JSON::Array>&& arguments, std::optional<bool>&& doNotPauseOnExceptionsAndMuteConsole, std::optional<bool>&& returnByValue, std::optional<bool>&& generatePreview, std::optional<bool>&& /* emulateUserGesture */)
++void InspectorRuntimeAgent::callFunctionOn(const Protocol::Runtime::RemoteObjectId& objectId, const String& functionDeclaration, RefPtr<JSON::Array>&& arguments, std::optional<bool>&& doNotPauseOnExceptionsAndMuteConsole, std::optional<bool>&& returnByValue, std::optional<bool>&& generatePreview, std::optional<bool>&& /* emulateUserGesture */, std::optional<bool>&& awaitPromise, Ref<CallFunctionOnCallback>&& callback)
{
Protocol::ErrorString errorString;
@@ -355,7 +355,7 @@ index 40437211f132ea95748086b5ea3ed2868341e766..fd49f7509bd07ce773d84af89c4de0f8
- return makeUnexpected("Missing injected script for given objectId"_s);
-
- RefPtr<Protocol::Runtime::RemoteObject> result;
-- Optional<bool> wasThrown;
+- std::optional<bool> wasThrown;
+ if (injectedScript.hasNoValue()) {
+ callback->sendFailure("Missing injected script for given objectId"_s);
+ return;
@@ -363,12 +363,12 @@ index 40437211f132ea95748086b5ea3ed2868341e766..fd49f7509bd07ce773d84af89c4de0f8
JSC::Debugger::TemporarilyDisableExceptionBreakpoints temporarilyDisableExceptionBreakpoints(m_debugger);
-@@ -187,15 +186,15 @@ Protocol::ErrorStringOr<std::tuple<Ref<Protocol::Runtime::RemoteObject>, Optiona
+@@ -187,15 +186,15 @@ Protocol::ErrorStringOr<std::tuple<Ref<Protocol::Runtime::RemoteObject>, std::op
muteConsole();
}
-- injectedScript.callFunctionOn(errorString, objectId, functionDeclaration, arguments ? arguments->toJSONString() : nullString(), returnByValue.valueOr(false), generatePreview.valueOr(false), result, wasThrown);
-+ injectedScript.callFunctionOn(objectId, functionDeclaration, arguments ? arguments->toJSONString() : nullString(), returnByValue.valueOr(false), generatePreview.valueOr(false), awaitPromise.valueOr(false), [callback=WTFMove(callback)] (Protocol::ErrorString& errorString, RefPtr<Protocol::Runtime::RemoteObject>&& result, Optional<bool>&& wasThrown, Optional<int>&&) {
+- injectedScript.callFunctionOn(errorString, objectId, functionDeclaration, arguments ? arguments->toJSONString() : nullString(), returnByValue.value_or(false), generatePreview.value_or(false), result, wasThrown);
++ injectedScript.callFunctionOn(objectId, functionDeclaration, arguments ? arguments->toJSONString() : nullString(), returnByValue.value_or(false), generatePreview.value_or(false), awaitPromise.value_or(false), [callback=WTFMove(callback)] (Protocol::ErrorString& errorString, RefPtr<Protocol::Runtime::RemoteObject>&& result, std::optional<bool>&& wasThrown, std::optional<int>&&) {
+ if (!result)
+ callback->sendFailure(errorString);
+ else
@@ -386,20 +386,20 @@ index 40437211f132ea95748086b5ea3ed2868341e766..fd49f7509bd07ce773d84af89c4de0f8
Protocol::ErrorStringOr<Ref<Protocol::Runtime::ObjectPreview>> InspectorRuntimeAgent::getPreview(const Protocol::Runtime::RemoteObjectId& objectId)
diff --git a/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.h b/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.h
-index f402946ff6daa88c485d097aac61c1d9ebfc09aa..01d88090c966134efd15c530ef7e183a2a01da6e 100644
+index c4f6fa5b9de54317da07c2371a7126aae1c967aa..0d549faeb1f0f80c7a6e7c208c72c6ef9cf4dbd5 100644
--- a/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.h
+++ b/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.h
@@ -62,7 +62,7 @@ public:
Protocol::ErrorStringOr<std::tuple<Protocol::Runtime::SyntaxErrorType, String /* message */, RefPtr<Protocol::Runtime::ErrorRange>>> parse(const String& expression) final;
- Protocol::ErrorStringOr<std::tuple<Ref<Protocol::Runtime::RemoteObject>, Optional<bool> /* wasThrown */, Optional<int> /* savedResultIndex */>> evaluate(const String& expression, const String& objectGroup, Optional<bool>&& includeCommandLineAPI, Optional<bool>&& doNotPauseOnExceptionsAndMuteConsole, Optional<Protocol::Runtime::ExecutionContextId>&&, Optional<bool>&& returnByValue, Optional<bool>&& generatePreview, Optional<bool>&& saveResult, Optional<bool>&& emulateUserGesture) override;
- void awaitPromise(const Protocol::Runtime::RemoteObjectId&, Optional<bool>&& returnByValue, Optional<bool>&& generatePreview, Optional<bool>&& saveResult, Ref<AwaitPromiseCallback>&&) final;
-- Protocol::ErrorStringOr<std::tuple<Ref<Protocol::Runtime::RemoteObject>, Optional<bool> /* wasThrown */>> callFunctionOn(const Protocol::Runtime::RemoteObjectId&, const String& functionDeclaration, RefPtr<JSON::Array>&& arguments, Optional<bool>&& doNotPauseOnExceptionsAndMuteConsole, Optional<bool>&& returnByValue, Optional<bool>&& generatePreview, Optional<bool>&& emulateUserGesture) override;
-+ void callFunctionOn(const Protocol::Runtime::RemoteObjectId&, const String& functionDeclaration, RefPtr<JSON::Array>&& arguments, Optional<bool>&& doNotPauseOnExceptionsAndMuteConsole, Optional<bool>&& returnByValue, Optional<bool>&& generatePreview, Optional<bool>&& emulateUserGesture, Optional<bool>&& awaitPromise, Ref<CallFunctionOnCallback>&&) override;
+ Protocol::ErrorStringOr<std::tuple<Ref<Protocol::Runtime::RemoteObject>, std::optional<bool> /* wasThrown */, std::optional<int> /* savedResultIndex */>> evaluate(const String& expression, const String& objectGroup, std::optional<bool>&& includeCommandLineAPI, std::optional<bool>&& doNotPauseOnExceptionsAndMuteConsole, std::optional<Protocol::Runtime::ExecutionContextId>&&, std::optional<bool>&& returnByValue, std::optional<bool>&& generatePreview, std::optional<bool>&& saveResult, std::optional<bool>&& emulateUserGesture) override;
+ void awaitPromise(const Protocol::Runtime::RemoteObjectId&, std::optional<bool>&& returnByValue, std::optional<bool>&& generatePreview, std::optional<bool>&& saveResult, Ref<AwaitPromiseCallback>&&) final;
+- Protocol::ErrorStringOr<std::tuple<Ref<Protocol::Runtime::RemoteObject>, std::optional<bool> /* wasThrown */>> callFunctionOn(const Protocol::Runtime::RemoteObjectId&, const String& functionDeclaration, RefPtr<JSON::Array>&& arguments, std::optional<bool>&& doNotPauseOnExceptionsAndMuteConsole, std::optional<bool>&& returnByValue, std::optional<bool>&& generatePreview, std::optional<bool>&& emulateUserGesture) override;
++ void callFunctionOn(const Protocol::Runtime::RemoteObjectId&, const String& functionDeclaration, RefPtr<JSON::Array>&& arguments, std::optional<bool>&& doNotPauseOnExceptionsAndMuteConsole, std::optional<bool>&& returnByValue, std::optional<bool>&& generatePreview, std::optional<bool>&& emulateUserGesture, std::optional<bool>&& awaitPromise, Ref<CallFunctionOnCallback>&&) override;
Protocol::ErrorStringOr<void> releaseObject(const Protocol::Runtime::RemoteObjectId&) final;
Protocol::ErrorStringOr<Ref<Protocol::Runtime::ObjectPreview>> getPreview(const Protocol::Runtime::RemoteObjectId&) final;
- Protocol::ErrorStringOr<std::tuple<Ref<JSON::ArrayOf<Protocol::Runtime::PropertyDescriptor>>, RefPtr<JSON::ArrayOf<Protocol::Runtime::InternalPropertyDescriptor>>>> getProperties(const Protocol::Runtime::RemoteObjectId&, Optional<bool>&& ownProperties, Optional<int>&& fetchStart, Optional<int>&& fetchCount, Optional<bool>&& generatePreview) final;
+ Protocol::ErrorStringOr<std::tuple<Ref<JSON::ArrayOf<Protocol::Runtime::PropertyDescriptor>>, RefPtr<JSON::ArrayOf<Protocol::Runtime::InternalPropertyDescriptor>>>> getProperties(const Protocol::Runtime::RemoteObjectId&, std::optional<bool>&& ownProperties, std::optional<int>&& fetchStart, std::optional<int>&& fetchCount, std::optional<bool>&& generatePreview) final;
diff --git a/Source/JavaScriptCore/inspector/agents/InspectorTargetAgent.cpp b/Source/JavaScriptCore/inspector/agents/InspectorTargetAgent.cpp
-index 508eb02ec95c52408384a1e2b77648afd426dd9d..05f483dced4b62ffdd60b0a0447504802e1f5711 100644
+index 508eb02ec95c52408384a1e2b77648afd426dd9d..c0099a56794ae411fe9cdce1a65a95f1a7e37924 100644
--- a/Source/JavaScriptCore/inspector/agents/InspectorTargetAgent.cpp
+++ b/Source/JavaScriptCore/inspector/agents/InspectorTargetAgent.cpp
@@ -87,6 +87,34 @@ Protocol::ErrorStringOr<void> InspectorTargetAgent::sendMessageToTarget(const St
@@ -420,7 +420,7 @@ index 508eb02ec95c52408384a1e2b77648afd426dd9d..05f483dced4b62ffdd60b0a044750480
+ return { };
+}
+
-+Protocol::ErrorStringOr<void> InspectorTargetAgent::close(const String& targetId, Optional<bool>&& runBeforeUnload)
++Protocol::ErrorStringOr<void> InspectorTargetAgent::close(const String& targetId, std::optional<bool>&& runBeforeUnload)
+{
+ InspectorTarget* target = m_targets.get(targetId);
+ if (!target)
@@ -476,7 +476,7 @@ index 508eb02ec95c52408384a1e2b77648afd426dd9d..05f483dced4b62ffdd60b0a044750480
{
return m_router.hasLocalFrontend() ? Inspector::FrontendChannel::ConnectionType::Local : Inspector::FrontendChannel::ConnectionType::Remote;
diff --git a/Source/JavaScriptCore/inspector/agents/InspectorTargetAgent.h b/Source/JavaScriptCore/inspector/agents/InspectorTargetAgent.h
-index e81573fd0fffaaf6fd2af36635c78fcdf8608c69..3d7b412e8cf1e4c32d23091514795a39927012fd 100644
+index e81573fd0fffaaf6fd2af36635c78fcdf8608c69..4169e227b5fb5a3a7fb51396c4679100f495719c 100644
--- a/Source/JavaScriptCore/inspector/agents/InspectorTargetAgent.h
+++ b/Source/JavaScriptCore/inspector/agents/InspectorTargetAgent.h
@@ -50,15 +50,21 @@ public:
@@ -484,7 +484,7 @@ index e81573fd0fffaaf6fd2af36635c78fcdf8608c69..3d7b412e8cf1e4c32d23091514795a39
Protocol::ErrorStringOr<void> resume(const String& targetId) final;
Protocol::ErrorStringOr<void> sendMessageToTarget(const String& targetId, const String& message) final;
+ Protocol::ErrorStringOr<void> activate(const String& targetId) override;
-+ Protocol::ErrorStringOr<void> close(const String& targetId, Optional<bool>&& runBeforeUnload) override;
++ Protocol::ErrorStringOr<void> close(const String& targetId, std::optional<bool>&& runBeforeUnload) override;
// Target lifecycle.
void targetCreated(InspectorTarget&);
@@ -1676,7 +1676,7 @@ index 2decf8a83c80e80ca8677f4c787bf79c6c2995fa..9010384a32f7c2ab69a8fb20eb19cd56
}
diff --git a/Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp b/Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp
-index 28bbf6f3eeb31236b783d46a518b93d700a86cb5..b119332071a733b55a004574dafb33934b587c49 100644
+index 2729df9dd4d15e19b7b2019ca94dd7647c5a6706..a7fdc92d594a7930ca029f162cc385bbdb949597 100644
--- a/Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp
+++ b/Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp
@@ -36,6 +36,7 @@
@@ -1743,10 +1743,10 @@ index ea0bfb0d7a5a64c1570da5333199f99b552a5ff6..2ebe8c6c5ac4343e0b373ccc271e86a4
m_timeZoneCache = std::unique_ptr<OpaqueICUTimeZone, OpaqueICUTimeZoneDeleter>(bitwise_cast<OpaqueICUTimeZone*>(icu::TimeZone::detectHostTimeZone()));
#endif
diff --git a/Source/ThirdParty/libwebrtc/CMakeLists.txt b/Source/ThirdParty/libwebrtc/CMakeLists.txt
-index a5590db19470176d41d0ba2ba93e77d47a5f1d7f..b4c0a401540cb3d0084135423c92e3eba7e741f7 100644
+index a6f1c25626c79ea0f98226ba92a54d11bcb264fb..66d4d7e3256e64a76523925feb4f1fb675284662 100644
--- a/Source/ThirdParty/libwebrtc/CMakeLists.txt
+++ b/Source/ThirdParty/libwebrtc/CMakeLists.txt
-@@ -290,6 +290,11 @@ set(webrtc_SOURCES
+@@ -292,6 +292,11 @@ set(webrtc_SOURCES
Source/third_party/jsoncpp/source/src/lib_json/json_reader.cpp
Source/third_party/jsoncpp/source/src/lib_json/json_value.cpp
Source/third_party/jsoncpp/source/src/lib_json/json_writer.cpp
@@ -1758,7 +1758,7 @@ index a5590db19470176d41d0ba2ba93e77d47a5f1d7f..b4c0a401540cb3d0084135423c92e3eb
Source/third_party/libyuv/source/compare_common.cc
Source/third_party/libyuv/source/compare_gcc.cc
Source/third_party/libyuv/source/convert.cc
-@@ -1697,6 +1702,10 @@ set(webrtc_INCLUDE_DIRECTORIES PRIVATE
+@@ -1699,6 +1704,10 @@ set(webrtc_INCLUDE_DIRECTORIES PRIVATE
Source/third_party/libsrtp/config
Source/third_party/libsrtp/crypto/include
Source/third_party/libsrtp/include
@@ -1811,10 +1811,10 @@ index 5dfabd5717a8297192f06c046c7cd7fdee3d468d..6437ad739fbffaf92bf04b202a3f40af
PUBLIC_HEADERS_FOLDER_PATH = /usr/local/include/libwebrtc;
USE_HEADERMAP = NO;
diff --git a/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj b/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj
-index ab5df37feaa08defe0af4007afc85b88d9213e64..e2d8887e5e762f3864d05d2e6f2d7358a7337e18 100644
+index 5a80ee0dc9ddad9eb467fadffd7f0dffc6b70160..4245287a2c0adec02af5553ecfb6610953da7a45 100644
--- a/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj
+++ b/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj
-@@ -3790,6 +3790,9 @@
+@@ -3793,6 +3793,9 @@
CDFD2FCC24C4DAF70048DAC3 /* reader.h in Copy webm headers */ = {isa = PBXBuildFile; fileRef = CDEBB40524C0191A00ADBD44 /* reader.h */; };
CDFD2FCD24C4DAF70048DAC3 /* status.h in Copy webm headers */ = {isa = PBXBuildFile; fileRef = CDEBB40624C0191A00ADBD44 /* status.h */; };
CDFD2FCE24C4DAF70048DAC3 /* webm_parser.h in Copy webm headers */ = {isa = PBXBuildFile; fileRef = CDEBB40824C0191A00ADBD44 /* webm_parser.h */; };
@@ -1824,7 +1824,7 @@ index ab5df37feaa08defe0af4007afc85b88d9213e64..e2d8887e5e762f3864d05d2e6f2d7358
/* End PBXBuildFile section */
/* Begin PBXBuildRule section */
-@@ -8220,6 +8223,9 @@
+@@ -8226,6 +8229,9 @@
CDEBB49D24C0191A00ADBD44 /* master_parser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = master_parser.h; sourceTree = "<group>"; };
CDFD2F9624C4B2F90048DAC3 /* vp9_header_parser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = vp9_header_parser.h; sourceTree = "<group>"; };
CDFD2F9A24C4B2F90048DAC3 /* vp9_header_parser.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = vp9_header_parser.cc; sourceTree = "<group>"; };
@@ -1834,7 +1834,7 @@ index ab5df37feaa08defe0af4007afc85b88d9213e64..e2d8887e5e762f3864d05d2e6f2d7358
FB39D0D11200F0E300088E69 /* libwebrtc.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libwebrtc.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
-@@ -15077,6 +15083,7 @@
+@@ -15110,6 +15116,7 @@
isa = PBXGroup;
children = (
CDFD2F9224C4B2F90048DAC3 /* common */,
@@ -1842,7 +1842,7 @@ index ab5df37feaa08defe0af4007afc85b88d9213e64..e2d8887e5e762f3864d05d2e6f2d7358
CDEBB19224C0191800ADBD44 /* webm_parser */,
);
path = libwebm;
-@@ -15211,6 +15218,16 @@
+@@ -15244,6 +15251,16 @@
path = common;
sourceTree = "<group>";
};
@@ -1859,7 +1859,7 @@ index ab5df37feaa08defe0af4007afc85b88d9213e64..e2d8887e5e762f3864d05d2e6f2d7358
FB39D06E1200ED9200088E69 = {
isa = PBXGroup;
children = (
-@@ -17268,7 +17285,7 @@
+@@ -17301,7 +17318,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
@@ -1868,7 +1868,7 @@ index ab5df37feaa08defe0af4007afc85b88d9213e64..e2d8887e5e762f3864d05d2e6f2d7358
};
5CD286461E6E154E0094FDC8 /* Check for Weak VTables and Externals */ = {
isa = PBXShellScriptBuildPhase;
-@@ -18412,6 +18429,7 @@
+@@ -18448,6 +18465,7 @@
419C82F51FE20EB50040C30F /* audio_encoder_opus.cc in Sources */,
419C82F31FE20EB50040C30F /* audio_encoder_opus_config.cc in Sources */,
4140B8201E4E3383007409E6 /* audio_encoder_pcm.cc in Sources */,
@@ -1876,7 +1876,7 @@ index ab5df37feaa08defe0af4007afc85b88d9213e64..e2d8887e5e762f3864d05d2e6f2d7358
5CDD8FFE1E43CE3A00621E92 /* audio_encoder_pcm16b.cc in Sources */,
5CD285461E6A61D20094FDC8 /* audio_format.cc in Sources */,
41DDB26F212679D200296D47 /* audio_format_to_string.cc in Sources */,
-@@ -18830,6 +18848,7 @@
+@@ -18866,6 +18884,7 @@
417953DB216983910028266B /* metrics.cc in Sources */,
5CDD865E1E43B8B500621E92 /* min_max_operations.c in Sources */,
4189395B242A71F5007FDC41 /* min_video_bitrate_experiment.cc in Sources */,
@@ -1884,7 +1884,7 @@ index ab5df37feaa08defe0af4007afc85b88d9213e64..e2d8887e5e762f3864d05d2e6f2d7358
4131C387234B957D0028A615 /* moving_average.cc in Sources */,
41FCBB1521B1F7AA00A5DF27 /* moving_average.cc in Sources */,
5CD286101E6A64C90094FDC8 /* moving_max.cc in Sources */,
-@@ -19055,6 +19074,7 @@
+@@ -19091,6 +19110,7 @@
4131C53B234C8B190028A615 /* rtc_event_rtp_packet_outgoing.cc in Sources */,
4131C552234C8B190028A615 /* rtc_event_video_receive_stream_config.cc in Sources */,
4131C554234C8B190028A615 /* rtc_event_video_send_stream_config.cc in Sources */,
@@ -1922,7 +1922,7 @@ index 6b349693f1119c4b7f9f239ad4f0a546446253f0..b9e4f1e4bb794db6003f7f46ca47aab2
# FIXME: This is on by default in WebKit2. Perhaps we should consider turning it on for WebKitLegacy as well.
MediaCapabilitiesExtensionsEnabled:
diff --git a/Source/WTF/wtf/DateMath.cpp b/Source/WTF/wtf/DateMath.cpp
-index 1e128fb9f20b50b6874a88656907bb4c059bc229..d2bae0c62da3b9ae22222241dce9d7121a0295df 100644
+index ebd69a4c76cd7acb0a233be552071158ca2171ca..2ee388e94a56d3de9c9fb2506d2ddead2db1ef87 100644
--- a/Source/WTF/wtf/DateMath.cpp
+++ b/Source/WTF/wtf/DateMath.cpp
@@ -76,9 +76,14 @@
@@ -2090,7 +2090,7 @@ index fa6958fbd30fabfd1d237aaf1a89f6eb5fa3b366..c0d6541242d79dc6d615a43710343b89
if (Systemd_FOUND)
diff --git a/Source/WTF/wtf/PlatformHave.h b/Source/WTF/wtf/PlatformHave.h
-index eabd349ed66c709e4cc14b99ab566f77e98b5e0d..5a11102d61ea00478260396c04624e92ccee940b 100644
+index 6e20d6f8f122262b2dc48098c48ed065366abb2d..f52a3ec05cf9b11691237abce84e5e1289827a2b 100644
--- a/Source/WTF/wtf/PlatformHave.h
+++ b/Source/WTF/wtf/PlatformHave.h
@@ -384,7 +384,7 @@
@@ -2140,7 +2140,7 @@ index bf89cae2cd1be60572395c162f92fa170988e7fc..8908069e4371fb3ff8a03a2001709b83
vpath %.in $(WEBKITADDITIONS_HEADER_SEARCH_PATHS)
diff --git a/Source/WebCore/Modules/geolocation/Geolocation.cpp b/Source/WebCore/Modules/geolocation/Geolocation.cpp
-index 68bdc458def3f26e161a8e399473aa297873ceee..18fecb23930c8e39c75aeca5e5b15860f133bb93 100644
+index 7995d4dd461de036cd8691b3ff181aeaefb12d92..49207cd294acebb4bac53ecb28817baa827d389f 100644
--- a/Source/WebCore/Modules/geolocation/Geolocation.cpp
+++ b/Source/WebCore/Modules/geolocation/Geolocation.cpp
@@ -358,8 +358,9 @@ bool Geolocation::shouldBlockGeolocationRequests()
@@ -2277,10 +2277,10 @@ index ef168b76819216d984b7a2d0f760005fb9d24de8..2d6cf51f3b45191ad84106429d4f108f
__ZN7WebCore14DocumentLoaderD2Ev
__ZN7WebCore14DocumentLoader17clearMainResourceEv
diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
-index 502d09b642b512c337950bbc24c03b8958e0d9c5..cd2eb06700cbc42d6ce94576c83aa1e67150e954 100644
+index 6f80031f076a7416d3de130ac40c34d0b370b1e5..06f9b338b628af77d6bd820419cdd3ce9c649d93 100644
--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
-@@ -5321,6 +5321,14 @@
+@@ -5341,6 +5341,14 @@
EDE3A5000C7A430600956A37 /* ColorMac.h in Headers */ = {isa = PBXBuildFile; fileRef = EDE3A4FF0C7A430600956A37 /* ColorMac.h */; settings = {ATTRIBUTES = (Private, ); }; };
EDEC98030AED7E170059137F /* WebCorePrefix.h in Headers */ = {isa = PBXBuildFile; fileRef = EDEC98020AED7E170059137F /* WebCorePrefix.h */; };
EFCC6C8F20FE914400A2321B /* CanvasActivityRecord.h in Headers */ = {isa = PBXBuildFile; fileRef = EFCC6C8D20FE914000A2321B /* CanvasActivityRecord.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -2295,7 +2295,7 @@ index 502d09b642b512c337950bbc24c03b8958e0d9c5..cd2eb06700cbc42d6ce94576c83aa1e6
F12171F616A8CF0B000053CA /* WebVTTElement.h in Headers */ = {isa = PBXBuildFile; fileRef = F12171F416A8BC63000053CA /* WebVTTElement.h */; };
F32BDCD92363AACA0073B6AE /* UserGestureEmulationScope.h in Headers */ = {isa = PBXBuildFile; fileRef = F32BDCD72363AACA0073B6AE /* UserGestureEmulationScope.h */; };
F344C7141125B82C00F26EEE /* InspectorFrontendClient.h in Headers */ = {isa = PBXBuildFile; fileRef = F344C7121125B82C00F26EEE /* InspectorFrontendClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
-@@ -16775,6 +16783,14 @@
+@@ -16830,6 +16838,14 @@
EDEC98020AED7E170059137F /* WebCorePrefix.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebCorePrefix.h; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
EFB7287B2124C73D005C2558 /* CanvasActivityRecord.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CanvasActivityRecord.cpp; sourceTree = "<group>"; };
EFCC6C8D20FE914000A2321B /* CanvasActivityRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CanvasActivityRecord.h; sourceTree = "<group>"; };
@@ -2310,7 +2310,7 @@ index 502d09b642b512c337950bbc24c03b8958e0d9c5..cd2eb06700cbc42d6ce94576c83aa1e6
F12171F316A8BC63000053CA /* WebVTTElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebVTTElement.cpp; sourceTree = "<group>"; };
F12171F416A8BC63000053CA /* WebVTTElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebVTTElement.h; sourceTree = "<group>"; };
F32BDCD52363AAC90073B6AE /* UserGestureEmulationScope.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserGestureEmulationScope.cpp; sourceTree = "<group>"; };
-@@ -22373,7 +22389,12 @@
+@@ -22430,7 +22446,12 @@
93D6B7A62551D3ED0058DD3A /* DummySpeechRecognitionProvider.h */,
1AF326770D78B9440068F0C4 /* EditorClient.h */,
93C09A800B064F00005ABD4D /* EventHandler.cpp */,
@@ -2323,25 +2323,24 @@ index 502d09b642b512c337950bbc24c03b8958e0d9c5..cd2eb06700cbc42d6ce94576c83aa1e6
E0FEF371B27C53EAC1C1FBEE /* EventSource.cpp */,
E0FEF371B17C53EAC1C1FBEE /* EventSource.h */,
E0FEF371B07C53EAC1C1FBEE /* EventSource.idl */,
-@@ -27909,7 +27930,9 @@
- B2C3D9EC0D006C1D00EF6F26 /* text */,
- E1EE8B6B2412B2A700E794D6 /* xr */,
- DFDB912CF8E88A6DA1AD264F /* AbortableTaskQueue.h */,
+@@ -28141,6 +28162,8 @@
+ 29E4D8DF16B0940F00C84704 /* PlatformSpeechSynthesizer.h */,
+ 1AD8F81A11CAB9E900E93E54 /* PlatformStrategies.cpp */,
+ 1AD8F81911CAB9E900E93E54 /* PlatformStrategies.h */,
+ F050E16623AC9C070011CE47 /* PlatformTouchEvent.h */,
- 49AE2D94134EE5F90072920A /* CalculationValue.cpp */,
+ F050E17623AD70C40011CE47 /* PlatformTouchPoint.h */,
- 49AE2D95134EE5F90072920A /* CalculationValue.h */,
- C330A22113EC196B0000B45B /* ColorChooser.h */,
- C37CDEBC149EF2030042090D /* ColorChooserClient.h */,
-@@ -30469,6 +30492,7 @@
+ 0FD7C21D23CE41E30096D102 /* PlatformWheelEvent.cpp */,
+ 935C476A09AC4D4F00A6AAB4 /* PlatformWheelEvent.h */,
+ BCBB8AB513F1AFB000734DF0 /* PODInterval.h */,
+@@ -30577,6 +30600,7 @@
BCCFBAE70B5152ED0001F1D7 /* DocumentParser.h */,
AD6E71AA1668899D00320C13 /* DocumentSharedObjectPool.cpp */,
AD6E71AB1668899D00320C13 /* DocumentSharedObjectPool.h */,
+ F050E17323AD6A800011CE47 /* DocumentTouch.cpp */,
6BDB5DC1227BD3B800919770 /* DocumentStorageAccess.cpp */,
6BDB5DC0227BD3B800919770 /* DocumentStorageAccess.h */,
- 86D982F6125C154000AD9E3D /* DocumentTiming.h */,
-@@ -31483,6 +31507,7 @@
+ 7CE7FA5B1EF882300060C9D6 /* DocumentTouch.cpp */,
+@@ -31590,6 +31614,7 @@
93C4F6EB1108F9A50099D0DB /* AccessibilityScrollbar.h in Headers */,
29489FC712C00F0300D83F0F /* AccessibilityScrollView.h in Headers */,
0709FC4E1025DEE30059CDBA /* AccessibilitySlider.h in Headers */,
@@ -2349,7 +2348,7 @@ index 502d09b642b512c337950bbc24c03b8958e0d9c5..cd2eb06700cbc42d6ce94576c83aa1e6
29D7BCFA1444AF7D0070619C /* AccessibilitySpinButton.h in Headers */,
69A6CBAD1C6BE42C00B836E9 /* AccessibilitySVGElement.h in Headers */,
AAC08CF315F941FD00F1E188 /* AccessibilitySVGRoot.h in Headers */,
-@@ -33499,6 +33524,7 @@
+@@ -33625,6 +33650,7 @@
6E4ABCD5138EA0B70071D291 /* JSHTMLUnknownElement.h in Headers */,
E44614170CD6826900FADA75 /* JSHTMLVideoElement.h in Headers */,
81BE20D311F4BC3200915DFA /* JSIDBCursor.h in Headers */,
@@ -2357,7 +2356,7 @@ index 502d09b642b512c337950bbc24c03b8958e0d9c5..cd2eb06700cbc42d6ce94576c83aa1e6
7C3D8EF01E0B21430023B084 /* JSIDBCursorDirection.h in Headers */,
C585A68311D4FB08004C3E4B /* JSIDBDatabase.h in Headers */,
C585A69711D4FB13004C3E4B /* JSIDBFactory.h in Headers */,
-@@ -35556,9 +35582,11 @@
+@@ -35684,9 +35710,11 @@
B2C3DA3A0D006C1D00EF6F26 /* TextCodec.h in Headers */,
26E98A10130A9FCA008EB7B2 /* TextCodecASCIIFastPath.h in Headers */,
DF95B14A24FDAFD300B1F4D7 /* TextCodecCJK.h in Headers */,
@@ -2369,7 +2368,7 @@ index 502d09b642b512c337950bbc24c03b8958e0d9c5..cd2eb06700cbc42d6ce94576c83aa1e6
B2C3DA400D006C1D00EF6F26 /* TextCodecUserDefined.h in Headers */,
B2C3DA420D006C1D00EF6F26 /* TextCodecUTF16.h in Headers */,
9343CB8212F25E510033C5EE /* TextCodecUTF8.h in Headers */,
-@@ -36519,6 +36547,7 @@
+@@ -36647,6 +36675,7 @@
1ABA76CA11D20E50004C201C /* CSSPropertyNames.cpp in Sources */,
2D22830323A8470700364B7E /* CursorMac.mm in Sources */,
5CBD59592280E926002B22AA /* CustomHeaderFields.cpp in Sources */,
@@ -2377,7 +2376,7 @@ index 502d09b642b512c337950bbc24c03b8958e0d9c5..cd2eb06700cbc42d6ce94576c83aa1e6
6E72F54C229DCD0C00B3E151 /* ExtensionsGLANGLE.cpp in Sources */,
7CE6CBFD187F394900D46BF5 /* FormatConverter.cpp in Sources */,
5130F2F624AEA60A00E1D0A0 /* GameControllerSoftLink.mm in Sources */,
-@@ -36605,6 +36634,7 @@
+@@ -36733,6 +36762,7 @@
6E72F54F229DCD1300B3E151 /* TemporaryANGLESetting.cpp in Sources */,
CE88EE262414467B007F29C2 /* TextAlternativeWithRange.mm in Sources */,
51DF6D800B92A18E00C2DC85 /* ThreadCheck.mm in Sources */,
@@ -2385,7 +2384,7 @@ index 502d09b642b512c337950bbc24c03b8958e0d9c5..cd2eb06700cbc42d6ce94576c83aa1e6
538EC8031F96AF81004D22A8 /* UnifiedSource1-mm.mm in Sources */,
538EC8021F96AF81004D22A8 /* UnifiedSource1.cpp in Sources */,
538EC8051F96AF81004D22A8 /* UnifiedSource2-mm.mm in Sources */,
-@@ -36653,6 +36683,7 @@
+@@ -36781,6 +36811,7 @@
538EC8881F993F9C004D22A8 /* UnifiedSource23.cpp in Sources */,
DE5F85801FA1ABF4006DB63A /* UnifiedSource24-mm.mm in Sources */,
538EC8891F993F9D004D22A8 /* UnifiedSource24.cpp in Sources */,
@@ -2393,7 +2392,7 @@ index 502d09b642b512c337950bbc24c03b8958e0d9c5..cd2eb06700cbc42d6ce94576c83aa1e6
DE5F85811FA1ABF4006DB63A /* UnifiedSource25-mm.mm in Sources */,
538EC88A1F993F9D004D22A8 /* UnifiedSource25.cpp in Sources */,
DE5F85821FA1ABF4006DB63A /* UnifiedSource26-mm.mm in Sources */,
-@@ -37185,6 +37216,7 @@
+@@ -37313,6 +37344,7 @@
2D8B92F1203D13E1009C868F /* UnifiedSource516.cpp in Sources */,
2D8B92F2203D13E1009C868F /* UnifiedSource517.cpp in Sources */,
2D8B92F3203D13E1009C868F /* UnifiedSource518.cpp in Sources */,
@@ -2402,7 +2401,7 @@ index 502d09b642b512c337950bbc24c03b8958e0d9c5..cd2eb06700cbc42d6ce94576c83aa1e6
2D8B92F5203D13E1009C868F /* UnifiedSource520.cpp in Sources */,
2D8B92F6203D13E1009C868F /* UnifiedSource521.cpp in Sources */,
diff --git a/Source/WebCore/accessibility/AccessibilityObject.cpp b/Source/WebCore/accessibility/AccessibilityObject.cpp
-index 5439529aa796093989ebd43adaeef88c4ddffb27..4d00bd1d5e35a845f28e697adc7cb3c4273d6b32 100644
+index 6e6e76404ee138b3cb0623a5aeaad54a7c1e4ba6..fc95d90a4100845e79b5781439e6d8665e3e4572 100644
--- a/Source/WebCore/accessibility/AccessibilityObject.cpp
+++ b/Source/WebCore/accessibility/AccessibilityObject.cpp
@@ -59,6 +59,7 @@
@@ -2433,7 +2432,7 @@ index 5439529aa796093989ebd43adaeef88c4ddffb27..4d00bd1d5e35a845f28e697adc7cb3c4
{
AXComputedObjectAttributeCache* attributeCache = nullptr;
diff --git a/Source/WebCore/css/MediaQueryEvaluator.cpp b/Source/WebCore/css/MediaQueryEvaluator.cpp
-index 11619a9688856b4488d059273359757da3978a89..700f403a063fdfd33f8d924d4caff470c0bea8d5 100644
+index a47b2fe549a89414a207864aabe897d07a59727c..53357bc9ce111bcb1241256647c3630ae767213d 100644
--- a/Source/WebCore/css/MediaQueryEvaluator.cpp
+++ b/Source/WebCore/css/MediaQueryEvaluator.cpp
@@ -844,7 +844,11 @@ static bool prefersContrastEvaluate(CSSValue* value, const CSSToLengthConversion
@@ -2442,7 +2441,7 @@ index 11619a9688856b4488d059273359757da3978a89..700f403a063fdfd33f8d924d4caff470
bool userPrefersReducedMotion = false;
-
+
-+ Optional<bool> reducedMotionOverride = frame.page()->useReducedMotionOverride();
++ std::optional<bool> reducedMotionOverride = frame.page()->useReducedMotionOverride();
+ if (reducedMotionOverride)
+ userPrefersReducedMotion = reducedMotionOverride.value();
+ else {
@@ -2615,7 +2614,7 @@ index 9dd41d6366512fd385937a7608bd3fc9b5b90f60..d6bb529fb891a65c8f6dcc6cff1e718c
#endif // USE(LIBWPE)
diff --git a/Source/WebCore/html/FileInputType.cpp b/Source/WebCore/html/FileInputType.cpp
-index 06c84321bb291fb178625f3d783438ee88846f93..1c8a87decc58045ed353b66240a9f2ad322e49e0 100644
+index bb8ca873e34b367e91b4927b78b7ce38ef641293..472f21b21db90f505a8a226d9a982ad007cc86c0 100644
--- a/Source/WebCore/html/FileInputType.cpp
+++ b/Source/WebCore/html/FileInputType.cpp
@@ -36,6 +36,7 @@
@@ -3002,7 +3001,7 @@ index 8f040444bb183d162c60f6fd4752becd9ce6ab99..c4b2e73c7344f94634d8ab40f626fa0d
{
return context ? instrumentingAgents(*context) : nullptr;
diff --git a/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp b/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
-index 00c4db3d6e7d994949fb90cedc1bc97c2f1978be..f08641169bd3b04cec82820cb252a7760e91c3ee 100644
+index f52e4abc8e76c02285b9c68ac9c7a98bd203e0dd..a3f08d8c0644ac2ca61c66c979d3ae7a529dced7 100644
--- a/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
+++ b/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
@@ -62,12 +62,16 @@
@@ -3037,30 +3036,30 @@ index 00c4db3d6e7d994949fb90cedc1bc97c2f1978be..f08641169bd3b04cec82820cb252a776
#include "StaticNodeList.h"
#include "StyleProperties.h"
#include "StyleResolver.h"
-@@ -132,7 +139,8 @@ using namespace HTMLNames;
+@@ -131,7 +138,8 @@ using namespace HTMLNames;
static const size_t maxTextSize = 10000;
static const UChar ellipsisUChar[] = { 0x2026, 0 };
--static Optional<Color> parseColor(RefPtr<JSON::Object>&& colorObject)
+-static std::optional<Color> parseColor(RefPtr<JSON::Object>&& colorObject)
+// static
-+Optional<Color> InspectorDOMAgent::parseColor(RefPtr<JSON::Object>&& colorObject)
++std::optional<Color> InspectorDOMAgent::parseColor(RefPtr<JSON::Object>&& colorObject)
{
if (!colorObject)
- return WTF::nullopt;
-@@ -151,7 +159,7 @@ static Optional<Color> parseColor(RefPtr<JSON::Object>&& colorObject)
+ return std::nullopt;
+@@ -150,7 +158,7 @@ static std::optional<Color> parseColor(RefPtr<JSON::Object>&& colorObject)
static Color parseConfigColor(const String& fieldName, JSON::Object& configObject)
{
-- return parseColor(configObject.getObject(fieldName)).valueOr(Color::transparentBlack);
-+ return InspectorDOMAgent::parseColor(configObject.getObject(fieldName)).valueOr(Color::transparentBlack);
+- return parseColor(configObject.getObject(fieldName)).value_or(Color::transparentBlack);
++ return InspectorDOMAgent::parseColor(configObject.getObject(fieldName)).value_or(Color::transparentBlack);
}
static bool parseQuad(Ref<JSON::Array>&& quadArray, FloatQuad* quad)
-@@ -436,6 +444,20 @@ Node* InspectorDOMAgent::assertNode(Protocol::ErrorString& errorString, Protocol
+@@ -435,6 +443,20 @@ Node* InspectorDOMAgent::assertNode(Protocol::ErrorString& errorString, Protocol
return node;
}
-+Node* InspectorDOMAgent::assertNode(Protocol::ErrorString& errorString, Optional<Protocol::DOM::NodeId>&& nodeId, const String& objectId)
++Node* InspectorDOMAgent::assertNode(Protocol::ErrorString& errorString, std::optional<Protocol::DOM::NodeId>&& nodeId, const String& objectId)
+{
+ Node* node = nullptr;
+ if (nodeId) {
@@ -3077,8 +3076,8 @@ index 00c4db3d6e7d994949fb90cedc1bc97c2f1978be..f08641169bd3b04cec82820cb252a776
Document* InspectorDOMAgent::assertDocument(Protocol::ErrorString& errorString, Protocol::DOM::NodeId nodeId)
{
Node* node = assertNode(errorString, nodeId);
-@@ -1395,16 +1417,7 @@ Protocol::ErrorStringOr<void> InspectorDOMAgent::highlightSelector(Ref<JSON::Obj
- Protocol::ErrorStringOr<void> InspectorDOMAgent::highlightNode(Ref<JSON::Object>&& highlightInspectorObject, Optional<Protocol::DOM::NodeId>&& nodeId, const Protocol::Runtime::RemoteObjectId& objectId)
+@@ -1394,16 +1416,7 @@ Protocol::ErrorStringOr<void> InspectorDOMAgent::highlightSelector(Ref<JSON::Obj
+ Protocol::ErrorStringOr<void> InspectorDOMAgent::highlightNode(Ref<JSON::Object>&& highlightInspectorObject, std::optional<Protocol::DOM::NodeId>&& nodeId, const Protocol::Runtime::RemoteObjectId& objectId)
{
Protocol::ErrorString errorString;
-
@@ -3095,7 +3094,7 @@ index 00c4db3d6e7d994949fb90cedc1bc97c2f1978be..f08641169bd3b04cec82820cb252a776
if (!node)
return makeUnexpected(errorString);
-@@ -1606,15 +1619,136 @@ Protocol::ErrorStringOr<void> InspectorDOMAgent::setInspectedNode(Protocol::DOM:
+@@ -1605,15 +1618,136 @@ Protocol::ErrorStringOr<void> InspectorDOMAgent::setInspectedNode(Protocol::DOM:
return { };
}
@@ -3181,10 +3180,10 @@ index 00c4db3d6e7d994949fb90cedc1bc97c2f1978be..f08641169bd3b04cec82820cb252a776
+ bool insideFixed;
+ LayoutRect absoluteBounds = renderer->absoluteBoundingBoxRect(true, &insideFixed);
+ if (rect) {
-+ Optional<double> x = rect->getDouble("x");
-+ Optional<double> y = rect->getDouble("y");
-+ Optional<double> width = rect->getDouble("width");
-+ Optional<double> height = rect->getDouble("height");
++ std::optional<double> x = rect->getDouble("x");
++ std::optional<double> y = rect->getDouble("y");
++ std::optional<double> width = rect->getDouble("width");
++ std::optional<double> height = rect->getDouble("height");
+ if (!x || !y || !width || !height)
+ return makeUnexpected("Malformed rect"_s);
+
@@ -3224,7 +3223,7 @@ index 00c4db3d6e7d994949fb90cedc1bc97c2f1978be..f08641169bd3b04cec82820cb252a776
+ return buildArrayOfQuads(quads);
+}
+
-+Protocol::ErrorStringOr<Ref<Protocol::Runtime::RemoteObject>> InspectorDOMAgent::resolveNode(Optional<Inspector::Protocol::DOM::NodeId>&& nodeId, const String& objectId, Optional<int>&& contextId, const String& objectGroup)
++Protocol::ErrorStringOr<Ref<Protocol::Runtime::RemoteObject>> InspectorDOMAgent::resolveNode(std::optional<Inspector::Protocol::DOM::NodeId>&& nodeId, const String& objectId, std::optional<int>&& contextId, const String& objectGroup)
+{
+ Protocol::ErrorString errorString;
+ Node* node = assertNode(errorString, WTFMove(nodeId), objectId);
@@ -3236,16 +3235,16 @@ index 00c4db3d6e7d994949fb90cedc1bc97c2f1978be..f08641169bd3b04cec82820cb252a776
if (!object)
return makeUnexpected("Missing injected script for given nodeId"_s);
-@@ -2806,7 +2940,7 @@ Protocol::ErrorStringOr<Protocol::DOM::NodeId> InspectorDOMAgent::pushNodeByPath
+@@ -2805,7 +2939,7 @@ Protocol::ErrorStringOr<Protocol::DOM::NodeId> InspectorDOMAgent::pushNodeByPath
return makeUnexpected("Missing node for given path"_s);
}
-RefPtr<Protocol::Runtime::RemoteObject> InspectorDOMAgent::resolveNode(Node* node, const String& objectGroup)
-+RefPtr<Inspector::Protocol::Runtime::RemoteObject> InspectorDOMAgent::resolveNode(Node* node, const String& objectGroup, Optional<int>&& contextId)
++RefPtr<Inspector::Protocol::Runtime::RemoteObject> InspectorDOMAgent::resolveNode(Node* node, const String& objectGroup, std::optional<int>&& contextId)
{
Document* document = &node->document();
if (auto* templateHost = document->templateDocumentHost())
-@@ -2815,12 +2949,16 @@ RefPtr<Protocol::Runtime::RemoteObject> InspectorDOMAgent::resolveNode(Node* nod
+@@ -2814,12 +2948,16 @@ RefPtr<Protocol::Runtime::RemoteObject> InspectorDOMAgent::resolveNode(Node* nod
if (!frame)
return nullptr;
@@ -3265,7 +3264,7 @@ index 00c4db3d6e7d994949fb90cedc1bc97c2f1978be..f08641169bd3b04cec82820cb252a776
}
Node* InspectorDOMAgent::scriptValueAsNode(JSC::JSValue value)
-@@ -2843,4 +2981,42 @@ Protocol::ErrorStringOr<void> InspectorDOMAgent::setAllowEditingUserAgentShadowT
+@@ -2842,4 +2980,42 @@ Protocol::ErrorStringOr<void> InspectorDOMAgent::setAllowEditingUserAgentShadowT
return { };
}
@@ -3295,7 +3294,7 @@ index 00c4db3d6e7d994949fb90cedc1bc97c2f1978be..f08641169bd3b04cec82820cb252a776
+ if (!obj->getString("name", name) || !obj->getString("type", type) || !obj->getString("data", data))
+ return makeUnexpected("Invalid file payload format"_s);
+
-+ Optional<Vector<uint8_t>> buffer = base64Decode(data);
++ std::optional<Vector<uint8_t>> buffer = base64Decode(data);
+ if (!buffer)
+ return makeUnexpected("Unable to decode given content"_s);
+
@@ -3309,7 +3308,7 @@ index 00c4db3d6e7d994949fb90cedc1bc97c2f1978be..f08641169bd3b04cec82820cb252a776
+
} // namespace WebCore
diff --git a/Source/WebCore/inspector/agents/InspectorDOMAgent.h b/Source/WebCore/inspector/agents/InspectorDOMAgent.h
-index fd4ea25d520f411c8a80ddc391fc1a3acf259c7e..333ad9fbdf2132454452306460867c1e1054801b 100644
+index 74a60f618092676d8bee87538c9d697f3c584304..055e6f68ef4940618fa5e74d3a64eb3ebb27bc6a 100644
--- a/Source/WebCore/inspector/agents/InspectorDOMAgent.h
+++ b/Source/WebCore/inspector/agents/InspectorDOMAgent.h
@@ -56,6 +56,7 @@ namespace WebCore {
@@ -3324,16 +3323,16 @@ index fd4ea25d520f411c8a80ddc391fc1a3acf259c7e..333ad9fbdf2132454452306460867c1e
static String toErrorString(Exception&&);
static String documentURLString(Document*);
-+ static Optional<Color> parseColor(RefPtr<JSON::Object>&&);
++ static std::optional<Color> parseColor(RefPtr<JSON::Object>&&);
// We represent embedded doms as a part of the same hierarchy. Hence we treat children of frame owners differently.
// We also skip whitespace text nodes conditionally. Following methods encapsulate these specifics.
@@ -128,7 +130,7 @@ public:
- Inspector::Protocol::ErrorStringOr<std::tuple<String /* searchId */, int /* resultCount */>> performSearch(const String& query, RefPtr<JSON::Array>&& nodeIds, Optional<bool>&& caseSensitive);
+ Inspector::Protocol::ErrorStringOr<std::tuple<String /* searchId */, int /* resultCount */>> performSearch(const String& query, RefPtr<JSON::Array>&& nodeIds, std::optional<bool>&& caseSensitive);
Inspector::Protocol::ErrorStringOr<Ref<JSON::ArrayOf<Inspector::Protocol::DOM::NodeId>>> getSearchResults(const String& searchId, int fromIndex, int toIndex);
Inspector::Protocol::ErrorStringOr<void> discardSearchResults(const String& searchId);
- Inspector::Protocol::ErrorStringOr<Ref<Inspector::Protocol::Runtime::RemoteObject>> resolveNode(Inspector::Protocol::DOM::NodeId, const String& objectGroup);
-+ Inspector::Protocol::ErrorStringOr<Ref<Inspector::Protocol::Runtime::RemoteObject>> resolveNode(Optional<Inspector::Protocol::DOM::NodeId>&& nodeId, const String& objectId, Optional<int>&& contextId, const String& objectGroup);
++ Inspector::Protocol::ErrorStringOr<Ref<Inspector::Protocol::Runtime::RemoteObject>> resolveNode(std::optional<Inspector::Protocol::DOM::NodeId>&& nodeId, const String& objectId, std::optional<int>&& contextId, const String& objectGroup);
Inspector::Protocol::ErrorStringOr<Ref<JSON::ArrayOf<String>>> getAttributes(Inspector::Protocol::DOM::NodeId);
#if PLATFORM(IOS_FAMILY)
Inspector::Protocol::ErrorStringOr<void> setInspectModeEnabled(bool, RefPtr<JSON::Object>&& highlightConfig);
@@ -3353,7 +3352,7 @@ index fd4ea25d520f411c8a80ddc391fc1a3acf259c7e..333ad9fbdf2132454452306460867c1e
Inspector::Protocol::DOM::NodeId boundNodeId(const Node*);
- RefPtr<Inspector::Protocol::Runtime::RemoteObject> resolveNode(Node*, const String& objectGroup);
-+ RefPtr<Inspector::Protocol::Runtime::RemoteObject> resolveNode(Node*, const String& objectGroup, Optional<int>&& contextId);
++ RefPtr<Inspector::Protocol::Runtime::RemoteObject> resolveNode(Node*, const String& objectGroup, std::optional<int>&& contextId);
bool handleMousePress();
void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags);
void inspect(Node*);
@@ -3361,7 +3360,7 @@ index fd4ea25d520f411c8a80ddc391fc1a3acf259c7e..333ad9fbdf2132454452306460867c1e
void reset();
Node* assertNode(Inspector::Protocol::ErrorString&, Inspector::Protocol::DOM::NodeId);
-+ Node* assertNode(Inspector::Protocol::ErrorString&, Optional<Inspector::Protocol::DOM::NodeId>&& nodeId, const String& objectId);
++ Node* assertNode(Inspector::Protocol::ErrorString&, std::optional<Inspector::Protocol::DOM::NodeId>&& nodeId, const String& objectId);
Element* assertElement(Inspector::Protocol::ErrorString&, Inspector::Protocol::DOM::NodeId);
Document* assertDocument(Inspector::Protocol::ErrorString&, Inspector::Protocol::DOM::NodeId);
@@ -3394,7 +3393,7 @@ index 3386cb879f1178c1b9635775c9a0e864f5b94c52..d2350182f5f061855e8ca172779ad60e
class Page;
class SecurityOrigin;
diff --git a/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp b/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp
-index 430012c5f17ab7e332d920e99385b832ed5ac5c5..bd0d781d1658de2f8e5681b972faa56ad808f99f 100644
+index cc90fe9d100dc2017de9af67fdc3d97bf5f9c29e..7d67644d3559524673121510f63b97c735268324 100644
--- a/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp
+++ b/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp
@@ -45,6 +45,7 @@
@@ -3413,7 +3412,7 @@ index 430012c5f17ab7e332d920e99385b832ed5ac5c5..bd0d781d1658de2f8e5681b972faa56a
#include "Page.h"
#include "PlatformStrategies.h"
#include "ProgressTracker.h"
-@@ -307,8 +309,8 @@ static Ref<Protocol::Network::Request> buildObjectForResourceRequest(const Resou
+@@ -305,8 +307,8 @@ static Ref<Protocol::Network::Request> buildObjectForResourceRequest(const Resou
.setHeaders(buildObjectForHeaders(request.httpHeaderFields()))
.release();
if (request.httpBody() && !request.httpBody()->isEmpty()) {
@@ -3424,15 +3423,15 @@ index 430012c5f17ab7e332d920e99385b832ed5ac5c5..bd0d781d1658de2f8e5681b972faa56a
}
return requestObject;
}
-@@ -353,6 +355,8 @@ RefPtr<Protocol::Network::Response> InspectorNetworkAgent::buildObjectForResourc
+@@ -351,6 +353,8 @@ RefPtr<Protocol::Network::Response> InspectorNetworkAgent::buildObjectForResourc
.setSource(responseSource(response.source()))
.release();
+ responseObject->setRequestHeaders(buildObjectForHeaders(response.m_httpRequestHeaderFields));
+
- if (resourceLoader)
- responseObject->setTiming(buildObjectForTiming(response.deprecatedNetworkLoadMetricsOrNull(), *resourceLoader));
-
+ if (resourceLoader) {
+ auto* metrics = response.deprecatedNetworkLoadMetricsOrNull();
+ responseObject->setTiming(buildObjectForTiming(metrics ? *metrics : NetworkLoadMetrics { }, *resourceLoader));
@@ -488,8 +492,14 @@ static InspectorPageAgent::ResourceType resourceTypeForLoadType(InspectorInstrum
void InspectorNetworkAgent::willSendRequest(unsigned long identifier, DocumentLoader* loader, ResourceRequest& request, const ResourceResponse& redirectResponse)
@@ -3450,7 +3449,7 @@ index 430012c5f17ab7e332d920e99385b832ed5ac5c5..bd0d781d1658de2f8e5681b972faa56a
}
void InspectorNetworkAgent::willSendRequestOfType(unsigned long identifier, DocumentLoader* loader, ResourceRequest& request, InspectorInstrumentation::LoadType loadType)
-@@ -1103,8 +1113,7 @@ bool InspectorNetworkAgent::willIntercept(const ResourceRequest& request)
+@@ -1101,8 +1111,7 @@ bool InspectorNetworkAgent::willIntercept(const ResourceRequest& request)
if (!m_interceptionEnabled)
return false;
@@ -3460,7 +3459,7 @@ index 430012c5f17ab7e332d920e99385b832ed5ac5c5..bd0d781d1658de2f8e5681b972faa56a
}
bool InspectorNetworkAgent::shouldInterceptRequest(const ResourceRequest& request)
-@@ -1187,6 +1196,9 @@ Protocol::ErrorStringOr<void> InspectorNetworkAgent::interceptWithRequest(const
+@@ -1185,6 +1194,9 @@ Protocol::ErrorStringOr<void> InspectorNetworkAgent::interceptWithRequest(const
return makeUnexpected("Missing pending intercept request for given requestId"_s);
auto& loader = *pendingRequest->m_loader;
@@ -3470,7 +3469,7 @@ index 430012c5f17ab7e332d920e99385b832ed5ac5c5..bd0d781d1658de2f8e5681b972faa56a
ResourceRequest request = loader.request();
if (!!url)
request.setURL(URL({ }, url));
-@@ -1282,14 +1294,24 @@ Protocol::ErrorStringOr<void> InspectorNetworkAgent::interceptRequestWithRespons
+@@ -1280,14 +1292,24 @@ Protocol::ErrorStringOr<void> InspectorNetworkAgent::interceptRequestWithRespons
response.setHTTPStatusCode(status);
response.setHTTPStatusText(statusText);
HTTPHeaderMap explicitHeaders;
@@ -3495,7 +3494,7 @@ index 430012c5f17ab7e332d920e99385b832ed5ac5c5..bd0d781d1658de2f8e5681b972faa56a
if (buffer->size())
loader->didReceiveBuffer(WTFMove(buffer), buffer->size(), DataPayloadWholeResource);
loader->didFinishLoading(NetworkLoadMetrics());
-@@ -1330,6 +1352,12 @@ Protocol::ErrorStringOr<void> InspectorNetworkAgent::interceptRequestWithError(c
+@@ -1328,6 +1350,12 @@ Protocol::ErrorStringOr<void> InspectorNetworkAgent::interceptRequestWithError(c
return { };
}
@@ -3508,8 +3507,8 @@ index 430012c5f17ab7e332d920e99385b832ed5ac5c5..bd0d781d1658de2f8e5681b972faa56a
bool InspectorNetworkAgent::shouldTreatAsText(const String& mimeType)
{
return startsWithLettersIgnoringASCIICase(mimeType, "text/")
-@@ -1371,6 +1399,12 @@ Optional<String> InspectorNetworkAgent::textContentForCachedResource(CachedResou
- return WTF::nullopt;
+@@ -1369,6 +1397,12 @@ std::optional<String> InspectorNetworkAgent::textContentForCachedResource(Cached
+ return std::nullopt;
}
+// static
@@ -3522,19 +3521,19 @@ index 430012c5f17ab7e332d920e99385b832ed5ac5c5..bd0d781d1658de2f8e5681b972faa56a
{
ASSERT(result);
diff --git a/Source/WebCore/inspector/agents/InspectorNetworkAgent.h b/Source/WebCore/inspector/agents/InspectorNetworkAgent.h
-index 8b2e296705a5ad7b37b55a4fb667ff0d8d32f979..73c6aba7255dd6210fc71bbf35f18b2de48e9c9a 100644
+index d1ba2755317fcc5fde70f5257270105f2a4b5c4f..ceeb2ff6dfe05ed6f6204db99878add5e20f18cd 100644
--- a/Source/WebCore/inspector/agents/InspectorNetworkAgent.h
+++ b/Source/WebCore/inspector/agents/InspectorNetworkAgent.h
@@ -72,6 +72,7 @@ public:
static Ref<TextResourceDecoder> createTextDecoder(const String& mimeType, const String& textEncodingName);
- static Optional<String> textContentForCachedResource(CachedResource&);
+ static std::optional<String> textContentForCachedResource(CachedResource&);
static bool cachedResourceContent(CachedResource&, String* result, bool* base64Encoded);
+ static String initiatorIdentifierForEventSource();
// InspectorAgentBase
void didCreateFrontendAndBackend(Inspector::FrontendRouter*, Inspector::BackendDispatcher*) final;
@@ -94,6 +95,7 @@ public:
- Inspector::Protocol::ErrorStringOr<void> interceptWithResponse(const Inspector::Protocol::Network::RequestId&, const String& content, bool base64Encoded, const String& mimeType, Optional<int>&& status, const String& statusText, RefPtr<JSON::Object>&& headers) final;
+ Inspector::Protocol::ErrorStringOr<void> interceptWithResponse(const Inspector::Protocol::Network::RequestId&, const String& content, bool base64Encoded, const String& mimeType, std::optional<int>&& status, const String& statusText, RefPtr<JSON::Object>&& headers) final;
Inspector::Protocol::ErrorStringOr<void> interceptRequestWithResponse(const Inspector::Protocol::Network::RequestId&, const String& content, bool base64Encoded, const String& mimeType, int status, const String& statusText, Ref<JSON::Object>&& headers) final;
Inspector::Protocol::ErrorStringOr<void> interceptRequestWithError(const Inspector::Protocol::Network::RequestId&, Inspector::Protocol::Network::ResourceErrorType) final;
+ Inspector::Protocol::ErrorStringOr<void> setEmulateOfflineState(bool offline) final;
@@ -3542,7 +3541,7 @@ index 8b2e296705a5ad7b37b55a4fb667ff0d8d32f979..73c6aba7255dd6210fc71bbf35f18b2d
// InspectorInstrumentation
void willRecalculateStyle();
diff --git a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp
-index 63932daf9168bfbc6aee3be2ef7cc312c4c2141d..a24dd48965fc4e7e7471b630bdbfb6cc52d10c74 100644
+index f55cbef37e294ea7abe9389a6b0a44b1cb71adbb..9ff6d44ceedd51cbc7eaa2a2cd7122c09c0007db 100644
--- a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp
+++ b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp
@@ -32,19 +32,25 @@
@@ -3655,7 +3654,7 @@ index 63932daf9168bfbc6aee3be2ef7cc312c4c2141d..a24dd48965fc4e7e7471b630bdbfb6cc
setShowPaintRects(false);
#if !PLATFORM(IOS_FAMILY)
-@@ -406,6 +436,22 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::reload(Optional<bool>&& ignore
+@@ -406,6 +436,22 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::reload(std::optional<bool>&& i
return { };
}
@@ -3875,28 +3874,28 @@ index 63932daf9168bfbc6aee3be2ef7cc312c4c2141d..a24dd48965fc4e7e7471b630bdbfb6cc
{
ASSERT_ARG(frame, frame);
@@ -1079,11 +1194,13 @@ Protocol::ErrorStringOr<String> InspectorPageAgent::snapshotNode(Protocol::DOM::
- return snapshot->toDataURL("image/png"_s, WTF::nullopt, PreserveResolution::Yes);
+ return snapshot->toDataURL("image/png"_s, std::nullopt, PreserveResolution::Yes);
}
-Protocol::ErrorStringOr<String> InspectorPageAgent::snapshotRect(int x, int y, int width, int height, Protocol::Page::CoordinateSystem coordinateSystem)
-+Protocol::ErrorStringOr<String> InspectorPageAgent::snapshotRect(int x, int y, int width, int height, Protocol::Page::CoordinateSystem coordinateSystem, Optional<bool>&& omitDeviceScaleFactor)
++Protocol::ErrorStringOr<String> InspectorPageAgent::snapshotRect(int x, int y, int width, int height, Protocol::Page::CoordinateSystem coordinateSystem, std::optional<bool>&& omitDeviceScaleFactor)
{
SnapshotOptions options = SnapshotOptionsNone;
if (coordinateSystem == Protocol::Page::CoordinateSystem::Viewport)
options |= SnapshotOptionsInViewCoordinates;
-+ if (omitDeviceScaleFactor.hasValue() && *omitDeviceScaleFactor)
++ if (omitDeviceScaleFactor.has_value() && *omitDeviceScaleFactor)
+ options |= SnapshotOptionsOmitDeviceScaleFactor;
IntRect rectangle(x, y, width, height);
auto snapshot = snapshotFrameRect(m_inspectedPage.mainFrame(), rectangle, options);
@@ -1094,6 +1211,47 @@ Protocol::ErrorStringOr<String> InspectorPageAgent::snapshotRect(int x, int y, i
- return snapshot->toDataURL("image/png"_s, WTF::nullopt, PreserveResolution::Yes);
+ return snapshot->toDataURL("image/png"_s, std::nullopt, PreserveResolution::Yes);
}
-+Protocol::ErrorStringOr<void> InspectorPageAgent::setForcedReducedMotion(Optional<Protocol::Page::ReducedMotion>&& reducedMotion)
++Protocol::ErrorStringOr<void> InspectorPageAgent::setForcedReducedMotion(std::optional<Protocol::Page::ReducedMotion>&& reducedMotion)
+{
+ if (!reducedMotion) {
-+ m_inspectedPage.setUseReducedMotionOverride(WTF::nullopt);
++ m_inspectedPage.setUseReducedMotionOverride(std::nullopt);
+ return { };
+ }
+
@@ -3942,11 +3941,11 @@ index 63932daf9168bfbc6aee3be2ef7cc312c4c2141d..a24dd48965fc4e7e7471b630bdbfb6cc
#endif
-#if !PLATFORM(COCOA)
- Protocol::ErrorStringOr<void> InspectorPageAgent::setScreenSizeOverride(Optional<int>&& width, Optional<int>&& height)
+ Protocol::ErrorStringOr<void> InspectorPageAgent::setScreenSizeOverride(std::optional<int>&& width, std::optional<int>&& height)
{
- if (width.hasValue() != height.hasValue())
-@@ -1121,6 +1278,595 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::setScreenSizeOverride(Optional
- m_inspectedPage.mainFrame().setOverrideScreenSize(FloatSize(width.valueOr(0), height.valueOr(0)));
+ if (width.has_value() != height.has_value())
+@@ -1121,6 +1278,595 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::setScreenSizeOverride(std::opt
+ m_inspectedPage.mainFrame().setOverrideScreenSize(FloatSize(width.value_or(0), height.value_or(0)));
return { };
}
+
@@ -4428,7 +4427,7 @@ index 63932daf9168bfbc6aee3be2ef7cc312c4c2141d..a24dd48965fc4e7e7471b630bdbfb6cc
+ return makeUnexpected("Internal error: No frame view to set color two"_s);
+
+ if (!color) {
-+ view->updateBackgroundRecursively(Optional<Color>());
++ view->updateBackgroundRecursively(std::optional<Color>());
+ return { };
+ }
+
@@ -4467,7 +4466,7 @@ index 63932daf9168bfbc6aee3be2ef7cc312c4c2141d..a24dd48965fc4e7e7471b630bdbfb6cc
+ return { };
+}
+
-+Protocol::ErrorStringOr<void> InspectorPageAgent::setOrientationOverride(Optional<int>&& angle)
++Protocol::ErrorStringOr<void> InspectorPageAgent::setOrientationOverride(std::optional<int>&& angle)
+{
+#if ENABLE(ORIENTATION_EVENTS)
+ m_inspectedPage.setOverrideOrientation(WTFMove(angle));
@@ -4478,26 +4477,26 @@ index 63932daf9168bfbc6aee3be2ef7cc312c4c2141d..a24dd48965fc4e7e7471b630bdbfb6cc
#endif
+}
+
-+static Optional<FloatBoxExtent> parseInsets(RefPtr<JSON::Object>&& insets)
++static std::optional<FloatBoxExtent> parseInsets(RefPtr<JSON::Object>&& insets)
+{
-+ Optional<double> top = insets->getDouble("top");
-+ Optional<double> right = insets->getDouble("right");
-+ Optional<double> bottom = insets->getDouble("bottom");
-+ Optional<double> left = insets->getDouble("left");
++ std::optional<double> top = insets->getDouble("top");
++ std::optional<double> right = insets->getDouble("right");
++ std::optional<double> bottom = insets->getDouble("bottom");
++ std::optional<double> left = insets->getDouble("left");
+ if (top && right && bottom && left)
+ return FloatBoxExtent(static_cast<float>(*top), static_cast<float>(*right), static_cast<float>(*bottom), static_cast<float>(*left));
-+ return Optional<FloatBoxExtent>();
++ return std::optional<FloatBoxExtent>();
+}
+
-+static Optional<FloatRect> parseRect(RefPtr<JSON::Object>&& insets)
++static std::optional<FloatRect> parseRect(RefPtr<JSON::Object>&& insets)
+{
-+ Optional<double> x = insets->getDouble("x");
-+ Optional<double> y = insets->getDouble("y");
-+ Optional<double> width = insets->getDouble("width");
-+ Optional<double> height = insets->getDouble("height");
++ std::optional<double> x = insets->getDouble("x");
++ std::optional<double> y = insets->getDouble("y");
++ std::optional<double> width = insets->getDouble("width");
++ std::optional<double> height = insets->getDouble("height");
+ if (x && y && width && height)
+ return FloatRect(static_cast<float>(*x), static_cast<float>(*y), static_cast<float>(*width), static_cast<float>(*height));
-+ return Optional<FloatRect>();
++ return std::optional<FloatRect>();
+}
+
+Protocol::ErrorStringOr<void> InspectorPageAgent::setVisibleContentRects(RefPtr<JSON::Object>&& unobscuredContentRect, RefPtr<JSON::Object>&& contentInsets, RefPtr<JSON::Object>&& obscuredInsets, RefPtr<JSON::Object>&& unobscuredInsets)
@@ -4507,7 +4506,7 @@ index 63932daf9168bfbc6aee3be2ef7cc312c4c2141d..a24dd48965fc4e7e7471b630bdbfb6cc
+ return makeUnexpected("Internal error: No frame view to set content rects for"_s);
+
+ if (unobscuredContentRect) {
-+ Optional<FloatRect> ucr = parseRect(WTFMove(unobscuredContentRect));
++ std::optional<FloatRect> ucr = parseRect(WTFMove(unobscuredContentRect));
+ if (!ucr)
+ return makeUnexpected("Invalid unobscured content rect");
+
@@ -4515,7 +4514,7 @@ index 63932daf9168bfbc6aee3be2ef7cc312c4c2141d..a24dd48965fc4e7e7471b630bdbfb6cc
+ }
+
+ if (contentInsets) {
-+ Optional<FloatBoxExtent> ci = parseInsets(WTFMove(contentInsets));
++ std::optional<FloatBoxExtent> ci = parseInsets(WTFMove(contentInsets));
+ if (!ci)
+ return makeUnexpected("Invalid content insets");
+
@@ -4523,7 +4522,7 @@ index 63932daf9168bfbc6aee3be2ef7cc312c4c2141d..a24dd48965fc4e7e7471b630bdbfb6cc
+ }
+
+ if (obscuredInsets) {
-+ Optional<FloatBoxExtent> oi = parseInsets(WTFMove(obscuredInsets));
++ std::optional<FloatBoxExtent> oi = parseInsets(WTFMove(obscuredInsets));
+ if (!oi)
+ return makeUnexpected("Invalid obscured insets");
+
@@ -4531,7 +4530,7 @@ index 63932daf9168bfbc6aee3be2ef7cc312c4c2141d..a24dd48965fc4e7e7471b630bdbfb6cc
+ }
+
+ if (unobscuredInsets) {
-+ Optional<FloatBoxExtent> ui = parseInsets(WTFMove(unobscuredInsets));
++ std::optional<FloatBoxExtent> ui = parseInsets(WTFMove(unobscuredInsets));
+ if (!ui)
+ return makeUnexpected("Invalid unobscured insets");
+
@@ -4542,7 +4541,7 @@ index 63932daf9168bfbc6aee3be2ef7cc312c4c2141d..a24dd48965fc4e7e7471b630bdbfb6cc
} // namespace WebCore
diff --git a/Source/WebCore/inspector/agents/InspectorPageAgent.h b/Source/WebCore/inspector/agents/InspectorPageAgent.h
-index 78a98224ab5450e0729751571fe1bb957d303301..51dc095e26f97f1543ffdee6dd6893e36f10a60e 100644
+index dec3d001b1d41d4f3f245caf50adf788a1965007..b7547fd8024bff5f1da695f72d70d02305c4137e 100644
--- a/Source/WebCore/inspector/agents/InspectorPageAgent.h
+++ b/Source/WebCore/inspector/agents/InspectorPageAgent.h
@@ -34,17 +34,23 @@
@@ -4587,36 +4586,36 @@ index 78a98224ab5450e0729751571fe1bb957d303301..51dc095e26f97f1543ffdee6dd6893e3
@@ -95,6 +103,8 @@ public:
Inspector::Protocol::ErrorStringOr<void> enable();
Inspector::Protocol::ErrorStringOr<void> disable();
- Inspector::Protocol::ErrorStringOr<void> reload(Optional<bool>&& ignoreCache, Optional<bool>&& revalidateAllResources);
+ Inspector::Protocol::ErrorStringOr<void> reload(std::optional<bool>&& ignoreCache, std::optional<bool>&& revalidateAllResources);
+ Inspector::Protocol::ErrorStringOr<void> goBack();
+ Inspector::Protocol::ErrorStringOr<void> goForward();
Inspector::Protocol::ErrorStringOr<void> navigate(const String& url);
Inspector::Protocol::ErrorStringOr<void> overrideUserAgent(const String&);
- Inspector::Protocol::ErrorStringOr<void> overrideSetting(Inspector::Protocol::Page::Setting, Optional<bool>&& value);
+ Inspector::Protocol::ErrorStringOr<void> overrideSetting(Inspector::Protocol::Page::Setting, std::optional<bool>&& value);
@@ -103,7 +113,7 @@ public:
Inspector::Protocol::ErrorStringOr<void> deleteCookie(const String& cookieName, const String& url);
Inspector::Protocol::ErrorStringOr<Ref<Inspector::Protocol::Page::FrameResourceTree>> getResourceTree();
Inspector::Protocol::ErrorStringOr<std::tuple<String, bool /* base64Encoded */>> getResourceContent(const Inspector::Protocol::Network::FrameId&, const String& url);
- Inspector::Protocol::ErrorStringOr<void> setBootstrapScript(const String& source);
+ Inspector::Protocol::ErrorStringOr<void> setBootstrapScript(const String& source, const String& worldName);
- Inspector::Protocol::ErrorStringOr<Ref<JSON::ArrayOf<Inspector::Protocol::GenericTypes::SearchMatch>>> searchInResource(const Inspector::Protocol::Network::FrameId&, const String& url, const String& query, Optional<bool>&& caseSensitive, Optional<bool>&& isRegex, const Inspector::Protocol::Network::RequestId&);
- Inspector::Protocol::ErrorStringOr<Ref<JSON::ArrayOf<Inspector::Protocol::Page::SearchResult>>> searchInResources(const String&, Optional<bool>&& caseSensitive, Optional<bool>&& isRegex);
+ Inspector::Protocol::ErrorStringOr<Ref<JSON::ArrayOf<Inspector::Protocol::GenericTypes::SearchMatch>>> searchInResource(const Inspector::Protocol::Network::FrameId&, const String& url, const String& query, std::optional<bool>&& caseSensitive, std::optional<bool>&& isRegex, const Inspector::Protocol::Network::RequestId&);
+ Inspector::Protocol::ErrorStringOr<Ref<JSON::ArrayOf<Inspector::Protocol::Page::SearchResult>>> searchInResources(const String&, std::optional<bool>&& caseSensitive, std::optional<bool>&& isRegex);
#if !PLATFORM(IOS_FAMILY)
@@ -114,25 +124,36 @@ public:
#if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT)
- Inspector::Protocol::ErrorStringOr<void> setForcedAppearance(Optional<Inspector::Protocol::Page::Appearance>&&);
+ Inspector::Protocol::ErrorStringOr<void> setForcedAppearance(std::optional<Inspector::Protocol::Page::Appearance>&&);
#endif
-+ Inspector::Protocol::ErrorStringOr<void> setForcedReducedMotion(Optional<Inspector::Protocol::Page::ReducedMotion>&&);
++ Inspector::Protocol::ErrorStringOr<void> setForcedReducedMotion(std::optional<Inspector::Protocol::Page::ReducedMotion>&&);
+ Inspector::Protocol::ErrorStringOr<void> setTimeZone(const String&);
+ Inspector::Protocol::ErrorStringOr<void> setTouchEmulationEnabled(bool);
Inspector::Protocol::ErrorStringOr<String> snapshotNode(Inspector::Protocol::DOM::NodeId);
- Inspector::Protocol::ErrorStringOr<String> snapshotRect(int x, int y, int width, int height, Inspector::Protocol::Page::CoordinateSystem);
-+ Inspector::Protocol::ErrorStringOr<String> snapshotRect(int x, int y, int width, int height, Inspector::Protocol::Page::CoordinateSystem, Optional<bool>&& omitDeviceScaleFactor);
++ Inspector::Protocol::ErrorStringOr<String> snapshotRect(int x, int y, int width, int height, Inspector::Protocol::Page::CoordinateSystem, std::optional<bool>&& omitDeviceScaleFactor);
#if ENABLE(WEB_ARCHIVE) && USE(CF)
Inspector::Protocol::ErrorStringOr<String> archive();
#endif
-#if !PLATFORM(COCOA)
- Inspector::Protocol::ErrorStringOr<void> setScreenSizeOverride(Optional<int>&& width, Optional<int>&& height);
+ Inspector::Protocol::ErrorStringOr<void> setScreenSizeOverride(std::optional<int>&& width, std::optional<int>&& height);
-#endif
+
+ Inspector::Protocol::ErrorStringOr<void> insertText(const String& text);
@@ -4626,7 +4625,7 @@ index 78a98224ab5450e0729751571fe1bb957d303301..51dc095e26f97f1543ffdee6dd6893e3
+ Inspector::Protocol::ErrorStringOr<void> createUserWorld(const String&);
+ Inspector::Protocol::ErrorStringOr<void> setBypassCSP(bool);
+ Inspector::Protocol::ErrorStringOr<void> crash();
-+ Inspector::Protocol::ErrorStringOr<void> setOrientationOverride(Optional<int>&& angle);
++ Inspector::Protocol::ErrorStringOr<void> setOrientationOverride(std::optional<int>&& angle);
+ Inspector::Protocol::ErrorStringOr<void> setVisibleContentRects(RefPtr<JSON::Object>&& unobscuredContentRect, RefPtr<JSON::Object>&& contentInsets, RefPtr<JSON::Object>&& obscuredInsets, RefPtr<JSON::Object>&& unobscuredInsets);
// InspectorInstrumentation
@@ -4708,7 +4707,7 @@ index 33caa0aa2079ad4081cc29605a53537c24d66bef..4b74d397d4de9a7eba3d5530538443d8
void InspectorWorkerAgent::disconnectFromWorkerInspectorProxy(WorkerInspectorProxy& proxy)
diff --git a/Source/WebCore/inspector/agents/page/PageDebuggerAgent.cpp b/Source/WebCore/inspector/agents/page/PageDebuggerAgent.cpp
-index 746da1a4d3e03a871b7880a3e52856b0ed2835cd..6d06ed07527541b8339236eefa51f15ecaebc93e 100644
+index 55d9518494195b96df165a94c1c2963adceb8395..98035b606587337e5fdacd31459a196fa7c28702 100644
--- a/Source/WebCore/inspector/agents/page/PageDebuggerAgent.cpp
+++ b/Source/WebCore/inspector/agents/page/PageDebuggerAgent.cpp
@@ -38,6 +38,7 @@
@@ -4719,9 +4718,9 @@ index 746da1a4d3e03a871b7880a3e52856b0ed2835cd..6d06ed07527541b8339236eefa51f15e
#include "Page.h"
#include "PageConsoleClient.h"
#include "PageDebugger.h"
-@@ -70,7 +71,11 @@ bool PageDebuggerAgent::enabled() const
+@@ -69,7 +70,11 @@ bool PageDebuggerAgent::enabled() const
- Protocol::ErrorStringOr<std::tuple<Ref<Protocol::Runtime::RemoteObject>, Optional<bool> /* wasThrown */, Optional<int> /* savedResultIndex */>> PageDebuggerAgent::evaluateOnCallFrame(const Protocol::Debugger::CallFrameId& callFrameId, const String& expression, const String& objectGroup, Optional<bool>&& includeCommandLineAPI, Optional<bool>&& doNotPauseOnExceptionsAndMuteConsole, Optional<bool>&& returnByValue, Optional<bool>&& generatePreview, Optional<bool>&& saveResult, Optional<bool>&& emulateUserGesture)
+ Protocol::ErrorStringOr<std::tuple<Ref<Protocol::Runtime::RemoteObject>, std::optional<bool> /* wasThrown */, std::optional<int> /* savedResultIndex */>> PageDebuggerAgent::evaluateOnCallFrame(const Protocol::Debugger::CallFrameId& callFrameId, const String& expression, const String& objectGroup, std::optional<bool>&& includeCommandLineAPI, std::optional<bool>&& doNotPauseOnExceptionsAndMuteConsole, std::optional<bool>&& returnByValue, std::optional<bool>&& generatePreview, std::optional<bool>&& saveResult, std::optional<bool>&& emulateUserGesture)
{
- UserGestureEmulationScope userGestureScope(m_inspectedPage, emulateUserGesture && *emulateUserGesture);
+ InjectedScript injectedScript = injectedScriptManager().injectedScriptForObjectId(callFrameId);
@@ -4732,7 +4731,7 @@ index 746da1a4d3e03a871b7880a3e52856b0ed2835cd..6d06ed07527541b8339236eefa51f15e
return WebDebuggerAgent::evaluateOnCallFrame(callFrameId, expression, objectGroup, WTFMove(includeCommandLineAPI), WTFMove(doNotPauseOnExceptionsAndMuteConsole), WTFMove(returnByValue), WTFMove(generatePreview), WTFMove(saveResult), WTFMove(emulateUserGesture));
}
-@@ -122,8 +127,9 @@ void PageDebuggerAgent::unmuteConsole()
+@@ -121,8 +126,9 @@ void PageDebuggerAgent::unmuteConsole()
void PageDebuggerAgent::debuggerWillEvaluate(JSC::Debugger&, const JSC::Breakpoint::Action& action)
{
@@ -4744,7 +4743,7 @@ index 746da1a4d3e03a871b7880a3e52856b0ed2835cd..6d06ed07527541b8339236eefa51f15e
void PageDebuggerAgent::debuggerDidEvaluate(JSC::Debugger&, const JSC::Breakpoint::Action& action)
diff --git a/Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp b/Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp
-index 00e69f1aa2e3f8ea2f445e8dd446dd16ea6363df..78dda16d71cc379f07803ca313b47b55da183ec7 100644
+index b32f3f699c2d2a377289760b245ac81784102458..48f0fab7f07bfc2b2408764e9adec252cc380705 100644
--- a/Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp
+++ b/Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp
@@ -35,12 +35,14 @@
@@ -4775,16 +4774,16 @@ index 00e69f1aa2e3f8ea2f445e8dd446dd16ea6363df..78dda16d71cc379f07803ca313b47b55
+ }
+}
+
- InjectedScript PageRuntimeAgent::injectedScriptForEval(Protocol::ErrorString& errorString, Optional<Protocol::Runtime::ExecutionContextId>&& executionContextId)
+ InjectedScript PageRuntimeAgent::injectedScriptForEval(Protocol::ErrorString& errorString, std::optional<Protocol::Runtime::ExecutionContextId>&& executionContextId)
{
if (!executionContextId) {
@@ -191,14 +202,24 @@ void PageRuntimeAgent::notifyContextCreated(const Protocol::Network::FrameId& fr
- Protocol::ErrorStringOr<std::tuple<Ref<Protocol::Runtime::RemoteObject>, Optional<bool> /* wasThrown */, Optional<int> /* savedResultIndex */>> PageRuntimeAgent::evaluate(const String& expression, const String& objectGroup, Optional<bool>&& includeCommandLineAPI, Optional<bool>&& doNotPauseOnExceptionsAndMuteConsole, Optional<Protocol::Runtime::ExecutionContextId>&& executionContextId, Optional<bool>&& returnByValue, Optional<bool>&& generatePreview, Optional<bool>&& saveResult, Optional<bool>&& emulateUserGesture)
+ Protocol::ErrorStringOr<std::tuple<Ref<Protocol::Runtime::RemoteObject>, std::optional<bool> /* wasThrown */, std::optional<int> /* savedResultIndex */>> PageRuntimeAgent::evaluate(const String& expression, const String& objectGroup, std::optional<bool>&& includeCommandLineAPI, std::optional<bool>&& doNotPauseOnExceptionsAndMuteConsole, std::optional<Protocol::Runtime::ExecutionContextId>&& executionContextId, std::optional<bool>&& returnByValue, std::optional<bool>&& generatePreview, std::optional<bool>&& saveResult, std::optional<bool>&& emulateUserGesture)
{
- UserGestureEmulationScope userGestureScope(m_inspectedPage, emulateUserGesture && *emulateUserGesture);
+ String errorString;
-+ InjectedScript injectedScript = injectedScriptForEval(errorString, Optional<Protocol::Runtime::ExecutionContextId>(executionContextId));
++ InjectedScript injectedScript = injectedScriptForEval(errorString, std::optional<Protocol::Runtime::ExecutionContextId>(executionContextId));
+ if (!errorString.isEmpty())
+ return makeUnexpected(errorString);
+
@@ -4794,8 +4793,8 @@ index 00e69f1aa2e3f8ea2f445e8dd446dd16ea6363df..78dda16d71cc379f07803ca313b47b55
return InspectorRuntimeAgent::evaluate(expression, objectGroup, WTFMove(includeCommandLineAPI), WTFMove(doNotPauseOnExceptionsAndMuteConsole), WTFMove(executionContextId), WTFMove(returnByValue), WTFMove(generatePreview), WTFMove(saveResult), WTFMove(emulateUserGesture));
}
--Protocol::ErrorStringOr<std::tuple<Ref<Protocol::Runtime::RemoteObject>, Optional<bool> /* wasThrown */>> PageRuntimeAgent::callFunctionOn(const Protocol::Runtime::RemoteObjectId& objectId, const String& expression, RefPtr<JSON::Array>&& optionalArguments, Optional<bool>&& doNotPauseOnExceptionsAndMuteConsole, Optional<bool>&& returnByValue, Optional<bool>&& generatePreview, Optional<bool>&& emulateUserGesture)
-+void PageRuntimeAgent::callFunctionOn(const Protocol::Runtime::RemoteObjectId& objectId, const String& expression, RefPtr<JSON::Array>&& optionalArguments, Optional<bool>&& doNotPauseOnExceptionsAndMuteConsole, Optional<bool>&& returnByValue, Optional<bool>&& generatePreview, Optional<bool>&& emulateUserGesture, Optional<bool>&& awaitPromise, Ref<CallFunctionOnCallback>&& callback)
+-Protocol::ErrorStringOr<std::tuple<Ref<Protocol::Runtime::RemoteObject>, std::optional<bool> /* wasThrown */>> PageRuntimeAgent::callFunctionOn(const Protocol::Runtime::RemoteObjectId& objectId, const String& expression, RefPtr<JSON::Array>&& optionalArguments, std::optional<bool>&& doNotPauseOnExceptionsAndMuteConsole, std::optional<bool>&& returnByValue, std::optional<bool>&& generatePreview, std::optional<bool>&& emulateUserGesture)
++void PageRuntimeAgent::callFunctionOn(const Protocol::Runtime::RemoteObjectId& objectId, const String& expression, RefPtr<JSON::Array>&& optionalArguments, std::optional<bool>&& doNotPauseOnExceptionsAndMuteConsole, std::optional<bool>&& returnByValue, std::optional<bool>&& generatePreview, std::optional<bool>&& emulateUserGesture, std::optional<bool>&& awaitPromise, Ref<CallFunctionOnCallback>&& callback)
{
- UserGestureEmulationScope userGestureScope(m_inspectedPage, emulateUserGesture && *emulateUserGesture);
- return InspectorRuntimeAgent::callFunctionOn(objectId, expression, WTFMove(optionalArguments), WTFMove(doNotPauseOnExceptionsAndMuteConsole), WTFMove(returnByValue), WTFMove(generatePreview), WTFMove(emulateUserGesture));
@@ -4808,7 +4807,7 @@ index 00e69f1aa2e3f8ea2f445e8dd446dd16ea6363df..78dda16d71cc379f07803ca313b47b55
} // namespace WebCore
diff --git a/Source/WebCore/inspector/agents/page/PageRuntimeAgent.h b/Source/WebCore/inspector/agents/page/PageRuntimeAgent.h
-index 298465c52b42464c2733659e07f3f760174a95eb..5af56f4aa2d2de51153b1ae2c5e17274d88713d0 100644
+index 6aba3a2c6e8bbb7a0bca4f07824cf4de8ce36f8e..537e3b34d6405e412bf0e2350909c9afda06bed8 100644
--- a/Source/WebCore/inspector/agents/page/PageRuntimeAgent.h
+++ b/Source/WebCore/inspector/agents/page/PageRuntimeAgent.h
@@ -54,25 +54,25 @@ public:
@@ -4817,12 +4816,12 @@ index 298465c52b42464c2733659e07f3f760174a95eb..5af56f4aa2d2de51153b1ae2c5e17274
// RuntimeBackendDispatcherHandler
- Inspector::Protocol::ErrorStringOr<void> enable();
- Inspector::Protocol::ErrorStringOr<void> disable();
-- Inspector::Protocol::ErrorStringOr<std::tuple<Ref<Inspector::Protocol::Runtime::RemoteObject>, Optional<bool> /* wasThrown */, Optional<int> /* savedResultIndex */>> evaluate(const String& expression, const String& objectGroup, Optional<bool>&& includeCommandLineAPI, Optional<bool>&& doNotPauseOnExceptionsAndMuteConsole, Optional<Inspector::Protocol::Runtime::ExecutionContextId>&&, Optional<bool>&& returnByValue, Optional<bool>&& generatePreview, Optional<bool>&& saveResult, Optional<bool>&& emulateUserGesture);
-- Inspector::Protocol::ErrorStringOr<std::tuple<Ref<Inspector::Protocol::Runtime::RemoteObject>, Optional<bool> /* wasThrown */>> callFunctionOn(const Inspector::Protocol::Runtime::RemoteObjectId&, const String& expression, RefPtr<JSON::Array>&& arguments, Optional<bool>&& doNotPauseOnExceptionsAndMuteConsole, Optional<bool>&& returnByValue, Optional<bool>&& generatePreview, Optional<bool>&& emulateUserGesture);
+- Inspector::Protocol::ErrorStringOr<std::tuple<Ref<Inspector::Protocol::Runtime::RemoteObject>, std::optional<bool> /* wasThrown */, std::optional<int> /* savedResultIndex */>> evaluate(const String& expression, const String& objectGroup, std::optional<bool>&& includeCommandLineAPI, std::optional<bool>&& doNotPauseOnExceptionsAndMuteConsole, std::optional<Inspector::Protocol::Runtime::ExecutionContextId>&&, std::optional<bool>&& returnByValue, std::optional<bool>&& generatePreview, std::optional<bool>&& saveResult, std::optional<bool>&& emulateUserGesture);
+- Inspector::Protocol::ErrorStringOr<std::tuple<Ref<Inspector::Protocol::Runtime::RemoteObject>, std::optional<bool> /* wasThrown */>> callFunctionOn(const Inspector::Protocol::Runtime::RemoteObjectId&, const String& expression, RefPtr<JSON::Array>&& arguments, std::optional<bool>&& doNotPauseOnExceptionsAndMuteConsole, std::optional<bool>&& returnByValue, std::optional<bool>&& generatePreview, std::optional<bool>&& emulateUserGesture);
+ Inspector::Protocol::ErrorStringOr<void> enable() override;
+ Inspector::Protocol::ErrorStringOr<void> disable() override;
-+ Inspector::Protocol::ErrorStringOr<std::tuple<Ref<Inspector::Protocol::Runtime::RemoteObject>, Optional<bool> /* wasThrown */, Optional<int> /* savedResultIndex */>> evaluate(const String& expression, const String& objectGroup, Optional<bool>&& includeCommandLineAPI, Optional<bool>&& doNotPauseOnExceptionsAndMuteConsole, Optional<Inspector::Protocol::Runtime::ExecutionContextId>&&, Optional<bool>&& returnByValue, Optional<bool>&& generatePreview, Optional<bool>&& saveResult, Optional<bool>&& emulateUserGesture) override;
-+ void callFunctionOn(const Inspector::Protocol::Runtime::RemoteObjectId&, const String& functionDeclaration, RefPtr<JSON::Array>&& arguments, Optional<bool>&& doNotPauseOnExceptionsAndMuteConsole, Optional<bool>&& returnByValue, Optional<bool>&& generatePreview, Optional<bool>&& emulateUserGesture, Optional<bool>&& awaitPromise, Ref<CallFunctionOnCallback>&&) override;
++ Inspector::Protocol::ErrorStringOr<std::tuple<Ref<Inspector::Protocol::Runtime::RemoteObject>, std::optional<bool> /* wasThrown */, std::optional<int> /* savedResultIndex */>> evaluate(const String& expression, const String& objectGroup, std::optional<bool>&& includeCommandLineAPI, std::optional<bool>&& doNotPauseOnExceptionsAndMuteConsole, std::optional<Inspector::Protocol::Runtime::ExecutionContextId>&&, std::optional<bool>&& returnByValue, std::optional<bool>&& generatePreview, std::optional<bool>&& saveResult, std::optional<bool>&& emulateUserGesture) override;
++ void callFunctionOn(const Inspector::Protocol::Runtime::RemoteObjectId&, const String& functionDeclaration, RefPtr<JSON::Array>&& arguments, std::optional<bool>&& doNotPauseOnExceptionsAndMuteConsole, std::optional<bool>&& returnByValue, std::optional<bool>&& generatePreview, std::optional<bool>&& emulateUserGesture, std::optional<bool>&& awaitPromise, Ref<CallFunctionOnCallback>&&) override;
// InspectorInstrumentation
void frameNavigated(Frame&);
@@ -4830,10 +4829,10 @@ index 298465c52b42464c2733659e07f3f760174a95eb..5af56f4aa2d2de51153b1ae2c5e17274
+ void didReceiveMainResourceError(Frame&);
private:
-- Inspector::InjectedScript injectedScriptForEval(Inspector::Protocol::ErrorString&, Optional<Inspector::Protocol::Runtime::ExecutionContextId>&&);
+- Inspector::InjectedScript injectedScriptForEval(Inspector::Protocol::ErrorString&, std::optional<Inspector::Protocol::Runtime::ExecutionContextId>&&);
- void muteConsole();
- void unmuteConsole();
-+ Inspector::InjectedScript injectedScriptForEval(Inspector::Protocol::ErrorString&, Optional<Inspector::Protocol::Runtime::ExecutionContextId>&&) override;
++ Inspector::InjectedScript injectedScriptForEval(Inspector::Protocol::ErrorString&, std::optional<Inspector::Protocol::Runtime::ExecutionContextId>&&) override;
+ void muteConsole() override;
+ void unmuteConsole() override;
void reportExecutionContextCreation();
@@ -4846,18 +4845,18 @@ index 298465c52b42464c2733659e07f3f760174a95eb..5af56f4aa2d2de51153b1ae2c5e17274
Page& m_inspectedPage;
diff --git a/Source/WebCore/inspector/agents/page/UserGestureEmulationScope.cpp b/Source/WebCore/inspector/agents/page/UserGestureEmulationScope.cpp
-index 633bce6e8f3c0785632eb7f26d172f6016b3efd9..14f531504bb2b96646d1a48092a0b132b0510f55 100644
+index 8699436e3f962b465b47aebebd601ee90152ef83..35fbd46627f68d9ebac52500bc560d4fd9866166 100644
--- a/Source/WebCore/inspector/agents/page/UserGestureEmulationScope.cpp
+++ b/Source/WebCore/inspector/agents/page/UserGestureEmulationScope.cpp
-@@ -39,9 +39,9 @@
+@@ -38,9 +38,9 @@
namespace WebCore {
-UserGestureEmulationScope::UserGestureEmulationScope(Page& inspectedPage, bool emulateUserGesture)
+UserGestureEmulationScope::UserGestureEmulationScope(Page& inspectedPage, bool emulateUserGesture, Document* document)
: m_pageChromeClient(inspectedPage.chrome().client())
-- , m_gestureIndicator(emulateUserGesture ? Optional<ProcessingUserGestureState>(ProcessingUserGesture) : WTF::nullopt)
-+ , m_gestureIndicator(emulateUserGesture ? Optional<ProcessingUserGestureState>(ProcessingUserGesture) : WTF::nullopt, document)
+- , m_gestureIndicator(emulateUserGesture ? std::optional<ProcessingUserGestureState>(ProcessingUserGesture) : std::nullopt)
++ , m_gestureIndicator(emulateUserGesture ? std::optional<ProcessingUserGestureState>(ProcessingUserGesture) : std::nullopt, document)
, m_emulateUserGesture(emulateUserGesture)
, m_userWasInteracting(false)
{
@@ -4881,10 +4880,10 @@ index 16edb3bc689b8e2dde17597b642b706c1343e1f5..f363b2ca2410f22cff8d6ad908a88527
private:
diff --git a/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp b/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp
-index 6820b0faaa69d454d992bd9d0fbb07aa1c2e547f..89caf34c9b4b85aec8fb7e7889338de566650fd9 100644
+index 92a0b1d304cca9ab0170d135e8c9537f65f469db..18617fb37245d7087825fe3c94feda94b117a320 100644
--- a/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp
+++ b/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp
-@@ -251,7 +251,7 @@ void LineLayout::prepareLayoutState()
+@@ -250,7 +250,7 @@ void LineLayout::prepareLayoutState()
auto& rootGeometry = m_layoutState.ensureGeometryForBox(rootLayoutBox());
rootGeometry.setContentBoxWidth(flow().contentSize().width());
@@ -4894,7 +4893,7 @@ index 6820b0faaa69d454d992bd9d0fbb07aa1c2e547f..89caf34c9b4b85aec8fb7e7889338de5
rootGeometry.setHorizontalMargin({ });
rootGeometry.setVerticalMargin({ });
diff --git a/Source/WebCore/loader/CookieJar.h b/Source/WebCore/loader/CookieJar.h
-index 07b4ede9fb784ffe1b8030929217e10415e7ff82..9bce3c64607dd621c21117211af660c69d2ae3b2 100644
+index 982691dd2dfe2f65201370a12302b5086703c126..4af72beb3b1405ffac78e89e7fbb2b14d6647903 100644
--- a/Source/WebCore/loader/CookieJar.h
+++ b/Source/WebCore/loader/CookieJar.h
@@ -43,6 +43,7 @@ struct CookieRequestHeaderFieldProxy;
@@ -4916,10 +4915,10 @@ index 07b4ede9fb784ffe1b8030929217e10415e7ff82..9bce3c64607dd621c21117211af660c6
protected:
static SameSiteInfo sameSiteInfo(const Document&, IsForDOMCookieAccess = IsForDOMCookieAccess::No);
diff --git a/Source/WebCore/loader/DocumentLoader.cpp b/Source/WebCore/loader/DocumentLoader.cpp
-index 905d92fb98d87c43a0c55a3c7881430b63567f27..45e172b7820e49dff838e07cc9a57476763ac920 100644
+index b9dc5b06a88ad19ede9da8a00579da1aa87b3b18..719f7c3661406645b422e8896658048c673c78ce 100644
--- a/Source/WebCore/loader/DocumentLoader.cpp
+++ b/Source/WebCore/loader/DocumentLoader.cpp
-@@ -1408,8 +1408,6 @@ void DocumentLoader::detachFromFrame()
+@@ -1405,8 +1405,6 @@ void DocumentLoader::detachFromFrame()
if (!m_frame)
return;
@@ -4929,7 +4928,7 @@ index 905d92fb98d87c43a0c55a3c7881430b63567f27..45e172b7820e49dff838e07cc9a57476
}
diff --git a/Source/WebCore/loader/DocumentLoader.h b/Source/WebCore/loader/DocumentLoader.h
-index 7b2a0ec585a19ebde96eea7775330817535f7455..ef604a838ff27f76e3bb4d46aa4afcc17224dbed 100644
+index 45b202bcdf4b44a68de05fe827697948e8ce245b..0172d4a408c9c1198c07eb5e2ab0227babf31fd8 100644
--- a/Source/WebCore/loader/DocumentLoader.h
+++ b/Source/WebCore/loader/DocumentLoader.h
@@ -166,9 +166,13 @@ public:
@@ -4947,10 +4946,10 @@ index 7b2a0ec585a19ebde96eea7775330817535f7455..ef604a838ff27f76e3bb4d46aa4afcc1
DocumentWriter& writer() const { return m_writer; }
diff --git a/Source/WebCore/loader/FrameLoader.cpp b/Source/WebCore/loader/FrameLoader.cpp
-index 82d16d6952fd79ef577209b615af1f3dfc9c09da..400ac32eecd19ed12ed8f54b291f1f077c97ad29 100644
+index 0f09d26dac13136ff8b3d9e5af4143e30f8c57c8..6356c03c524a83296d6fc5fbd1b3dd2dc8061bff 100644
--- a/Source/WebCore/loader/FrameLoader.cpp
+++ b/Source/WebCore/loader/FrameLoader.cpp
-@@ -1153,6 +1153,7 @@ void FrameLoader::loadInSameDocument(const URL& url, SerializedScriptValue* stat
+@@ -1152,6 +1152,7 @@ void FrameLoader::loadInSameDocument(const URL& url, SerializedScriptValue* stat
}
m_client->dispatchDidNavigateWithinPage();
@@ -4958,7 +4957,7 @@ index 82d16d6952fd79ef577209b615af1f3dfc9c09da..400ac32eecd19ed12ed8f54b291f1f07
m_frame.document()->statePopped(stateObject ? Ref<SerializedScriptValue> { *stateObject } : SerializedScriptValue::nullValue());
m_client->dispatchDidPopStateWithinPage();
-@@ -1471,6 +1472,7 @@ void FrameLoader::load(FrameLoadRequest&& request)
+@@ -1470,6 +1471,7 @@ void FrameLoader::load(FrameLoadRequest&& request)
void FrameLoader::loadWithNavigationAction(const ResourceRequest& request, NavigationAction&& action, FrameLoadType type, RefPtr<FormState>&& formState, AllowNavigationToInvalidURL allowNavigationToInvalidURL, CompletionHandler<void()>&& completionHandler)
{
@@ -4966,7 +4965,7 @@ index 82d16d6952fd79ef577209b615af1f3dfc9c09da..400ac32eecd19ed12ed8f54b291f1f07
FRAMELOADER_RELEASE_LOG_IF_ALLOWED(ResourceLoading, "loadWithNavigationAction: frame load started");
Ref<DocumentLoader> loader = m_client->createDocumentLoader(request, defaultSubstituteDataForURL(request.url()));
-@@ -1574,6 +1576,8 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t
+@@ -1573,6 +1575,8 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t
const String& httpMethod = loader->request().httpMethod();
if (shouldPerformFragmentNavigation(isFormSubmission, httpMethod, policyChecker().loadType(), newURL)) {
@@ -4975,7 +4974,7 @@ index 82d16d6952fd79ef577209b615af1f3dfc9c09da..400ac32eecd19ed12ed8f54b291f1f07
RefPtr<DocumentLoader> oldDocumentLoader = m_documentLoader;
NavigationAction action { *m_frame.document(), loader->request(), InitiatedByMainFrame::Unknown, policyChecker().loadType(), isFormSubmission };
-@@ -3168,6 +3172,8 @@ void FrameLoader::receivedMainResourceError(const ResourceError& error)
+@@ -3167,6 +3171,8 @@ void FrameLoader::receivedMainResourceError(const ResourceError& error)
checkCompleted();
if (m_frame.page())
checkLoadComplete();
@@ -4984,7 +4983,7 @@ index 82d16d6952fd79ef577209b615af1f3dfc9c09da..400ac32eecd19ed12ed8f54b291f1f07
}
void FrameLoader::continueFragmentScrollAfterNavigationPolicy(const ResourceRequest& request, bool shouldContinue)
-@@ -3930,9 +3936,6 @@ String FrameLoader::referrer() const
+@@ -3928,9 +3934,6 @@ String FrameLoader::referrer() const
void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds()
{
@@ -4994,7 +4993,7 @@ index 82d16d6952fd79ef577209b615af1f3dfc9c09da..400ac32eecd19ed12ed8f54b291f1f07
Vector<Ref<DOMWrapperWorld>> worlds;
ScriptController::getAllWorlds(worlds);
for (auto& world : worlds)
-@@ -3941,13 +3944,13 @@ void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds()
+@@ -3939,13 +3942,13 @@ void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds()
void FrameLoader::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld& world)
{
@@ -5027,7 +5026,7 @@ index b018af04d05ce3ac38bb57d8e50a7b063ee51733..6929c01318f509ed560276168d18e011
virtual bool shouldPerformSecurityChecks() const { return false; }
virtual bool havePerformedSecurityChecks(const ResourceResponse&) const { return false; }
diff --git a/Source/WebCore/loader/PolicyChecker.cpp b/Source/WebCore/loader/PolicyChecker.cpp
-index 7d0da7ca2dc430b842adddc2b181046eca9845b2..7de6fb65b1c03bf260b6788141e3682143a2400d 100644
+index 98e961977567080e848095fe1023666ede05d0ea..33e100b34079152390e53d3af13e3ff478f7275e 100644
--- a/Source/WebCore/loader/PolicyChecker.cpp
+++ b/Source/WebCore/loader/PolicyChecker.cpp
@@ -46,6 +46,7 @@
@@ -5095,10 +5094,10 @@ index e24fded2225f1c1918f454017566717e20484eab..30e4b7a986418c4b4f6c799b858b6082
void ProgressTracker::incrementProgress(unsigned long identifier, const ResourceResponse& response)
diff --git a/Source/WebCore/page/ChromeClient.h b/Source/WebCore/page/ChromeClient.h
-index b6d91a83317e222c9c2b17b168c306889d466b13..fc5afcc5e8e4875a6234e6bacfd7ae2a8d312af7 100644
+index ec72e95492a6a75791b870506cbbde8eb9e7d285..9b9ca88a8091eb2f60b04462ca51eea6a2a833e0 100644
--- a/Source/WebCore/page/ChromeClient.h
+++ b/Source/WebCore/page/ChromeClient.h
-@@ -296,7 +296,7 @@ public:
+@@ -297,7 +297,7 @@ public:
#endif
#if ENABLE(ORIENTATION_EVENTS)
@@ -5108,10 +5107,10 @@ index b6d91a83317e222c9c2b17b168c306889d466b13..fc5afcc5e8e4875a6234e6bacfd7ae2a
#if ENABLE(INPUT_TYPE_COLOR)
diff --git a/Source/WebCore/page/EventHandler.cpp b/Source/WebCore/page/EventHandler.cpp
-index 9943f4b337defde350a0639c4cce0a6cbd4783f9..9eda32eec9159cb89d6d77ea75a39d3dd68f87cd 100644
+index 6356825b2e678c034f6e0f8089b2200a83926f98..521cd7403ff2e64fa49d7b54588e8de4db7147ed 100644
--- a/Source/WebCore/page/EventHandler.cpp
+++ b/Source/WebCore/page/EventHandler.cpp
-@@ -124,6 +124,7 @@
+@@ -125,6 +125,7 @@
#if ENABLE(TOUCH_EVENTS) && !ENABLE(IOS_TOUCH_EVENTS)
#include "PlatformTouchEvent.h"
@@ -5206,7 +5205,7 @@ index 9943f4b337defde350a0639c4cce0a6cbd4783f9..9eda32eec9159cb89d6d77ea75a39d3d
return swallowEvent;
}
-@@ -4025,7 +4025,14 @@ bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, CheckDr
+@@ -4046,7 +4046,14 @@ bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, CheckDr
if (!m_frame.document())
return false;
@@ -5222,7 +5221,7 @@ index 9943f4b337defde350a0639c4cce0a6cbd4783f9..9eda32eec9159cb89d6d77ea75a39d3d
auto hasNonDefaultPasteboardData = HasNonDefaultPasteboardData::No;
if (dragState().shouldDispatchEvents) {
-@@ -4381,7 +4388,8 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
+@@ -4402,7 +4409,8 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
allTouchReleased = false;
}
@@ -5232,7 +5231,7 @@ index 9943f4b337defde350a0639c4cce0a6cbd4783f9..9eda32eec9159cb89d6d77ea75a39d3d
PlatformTouchPoint::State pointState = point.state();
LayoutPoint pagePoint = documentPointForWindowPoint(m_frame, point.pos());
-@@ -4507,6 +4515,9 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
+@@ -4528,6 +4536,9 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
changedTouches[pointState].m_touches->append(WTFMove(touch));
changedTouches[pointState].m_targets.add(touchTarget);
}
@@ -5243,7 +5242,7 @@ index 9943f4b337defde350a0639c4cce0a6cbd4783f9..9eda32eec9159cb89d6d77ea75a39d3d
m_touchPressed = touches->length() > 0;
if (allTouchReleased)
diff --git a/Source/WebCore/page/EventHandler.h b/Source/WebCore/page/EventHandler.h
-index ffb7369450e4939ec7bcae2dba7ba9285f8f671b..a960012a05921f74d8b0035ed4b8f2e9d8fdfb23 100644
+index d426a0c2ef94ebb4a58d66ff527d6eb52d3668a8..e97f903e5bc097e84d4b61aa612fb694c4b551e3 100644
--- a/Source/WebCore/page/EventHandler.h
+++ b/Source/WebCore/page/EventHandler.h
@@ -135,9 +135,7 @@ public:
@@ -5301,7 +5300,7 @@ index ffb7369450e4939ec7bcae2dba7ba9285f8f671b..a960012a05921f74d8b0035ed4b8f2e9
bool m_mouseDownMayStartDrag { false };
bool m_dragMayStartSelectionInstead { false };
diff --git a/Source/WebCore/page/EventSource.cpp b/Source/WebCore/page/EventSource.cpp
-index dbf637cfb2980661aa6770a78a447afed0359a87..c4e166225fabe8a4f85cf0d3a663541ea326cd03 100644
+index 0dac7ff03cc846d1896a088f6263028616bdfa69..f4f702bf97428a4991d6254900e3ffcb0ce2a8a1 100644
--- a/Source/WebCore/page/EventSource.cpp
+++ b/Source/WebCore/page/EventSource.cpp
@@ -36,6 +36,7 @@
@@ -5312,7 +5311,7 @@ index dbf637cfb2980661aa6770a78a447afed0359a87..c4e166225fabe8a4f85cf0d3a663541e
#include "MessageEvent.h"
#include "ResourceError.h"
#include "ResourceRequest.h"
-@@ -98,6 +99,7 @@ void EventSource::connect()
+@@ -97,6 +98,7 @@ void EventSource::connect()
ASSERT(!m_requestInFlight);
ResourceRequest request { m_url };
@@ -5321,7 +5320,7 @@ index dbf637cfb2980661aa6770a78a447afed0359a87..c4e166225fabe8a4f85cf0d3a663541e
request.setHTTPHeaderField(HTTPHeaderName::Accept, "text/event-stream");
request.setHTTPHeaderField(HTTPHeaderName::CacheControl, "no-cache");
diff --git a/Source/WebCore/page/Frame.cpp b/Source/WebCore/page/Frame.cpp
-index c81e5e2611d76d5bc7c4dec991ec7cb47b953fab..5b8fca555fb4e737c9c1718c808396d3e1af80d5 100644
+index 1af27d84f35af0d3ba1fb9dbafa31e43c6661332..151625332aef8f5d7bcdc44acc7ca8369404ee30 100644
--- a/Source/WebCore/page/Frame.cpp
+++ b/Source/WebCore/page/Frame.cpp
@@ -39,6 +39,7 @@
@@ -5717,7 +5716,7 @@ index c81e5e2611d76d5bc7c4dec991ec7cb47b953fab..5b8fca555fb4e737c9c1718c808396d3
#undef RELEASE_LOG_ERROR_IF_ALLOWED
diff --git a/Source/WebCore/page/Frame.h b/Source/WebCore/page/Frame.h
-index 6f9f2ed9422bb39c44fa3397ce88644e8f712d0c..7fc6272dcb781ccf38285f634542243567079a7c 100644
+index 37b1af211e340974e0c527bee8b173b6668eee0c..57d07c9196c714846177d529e2c66370d873a3ad 100644
--- a/Source/WebCore/page/Frame.h
+++ b/Source/WebCore/page/Frame.h
@@ -110,8 +110,8 @@ enum {
@@ -5827,20 +5826,20 @@ index 1023738af87f73d4313ab17f793e67e9663a36f9..0ed28b16672709db2933391dd2ea12e4
typedef unsigned SnapshotOptions;
diff --git a/Source/WebCore/page/FrameView.cpp b/Source/WebCore/page/FrameView.cpp
-index 85760843cae332f9598dec5054fdc9496bdc55dc..191cc51fe7c12fa8b5803ab712ddf32bfb064bb1 100644
+index ae519c8d74f7afe40447b4a581b633c7df86ebb5..6fdc50573d7874801cff97105ea1c5f89e36c11d 100644
--- a/Source/WebCore/page/FrameView.cpp
+++ b/Source/WebCore/page/FrameView.cpp
-@@ -3034,7 +3034,7 @@ void FrameView::setBaseBackgroundColor(const Color& backgroundColor)
+@@ -3028,7 +3028,7 @@ void FrameView::setBaseBackgroundColor(const Color& backgroundColor)
- void FrameView::updateBackgroundRecursively(const Optional<Color>& backgroundColor)
+ void FrameView::updateBackgroundRecursively(const std::optional<Color>& backgroundColor)
{
-#if HAVE(OS_DARK_MODE_SUPPORT)
+#if HAVE(OS_DARK_MODE_SUPPORT) && (defined(WTF_PLATFORM_MAC) && WTF_PLATFORM_MAC) || (defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY)
- Color baseBackgroundColor = backgroundColor.valueOr(RenderTheme::singleton().systemColor(CSSValueAppleSystemControlBackground, styleColorOptions()));
+ Color baseBackgroundColor = backgroundColor.value_or(RenderTheme::singleton().systemColor(CSSValueAppleSystemControlBackground, styleColorOptions()));
#else
- Color baseBackgroundColor = backgroundColor.valueOr(Color::white);
+ Color baseBackgroundColor = backgroundColor.value_or(Color::white);
diff --git a/Source/WebCore/page/History.cpp b/Source/WebCore/page/History.cpp
-index 38fd7b29b53eab484e30963b51c8ae525c5d7a38..3c2f2104e3f364d3d6201e3009a448b4db317d03 100644
+index 28d1fc3242174a680711027877d4153923790220..058b5309eed081fcc1e4158f66e806421dcc9d56 100644
--- a/Source/WebCore/page/History.cpp
+++ b/Source/WebCore/page/History.cpp
@@ -33,6 +33,7 @@
@@ -5860,19 +5859,19 @@ index 38fd7b29b53eab484e30963b51c8ae525c5d7a38..3c2f2104e3f364d3d6201e3009a448b4
if (stateObjectType == StateObjectType::Push) {
frame->loader().history().pushState(WTFMove(data), title, fullURL.string());
diff --git a/Source/WebCore/page/Page.cpp b/Source/WebCore/page/Page.cpp
-index 61dd86058e7a1e7230edd6786ce84e1434fccdbe..148de2e46a9ed0fd693ddb4a96bf7229cdad0e2a 100644
+index 94a54bb6f0dc5e16f8b173168f04cec562eeaaea..710537e98d21bb5eb550057bdcca658c8fa80b92 100644
--- a/Source/WebCore/page/Page.cpp
+++ b/Source/WebCore/page/Page.cpp
-@@ -446,6 +446,37 @@ void Page::setOverrideViewportArguments(const Optional<ViewportArguments>& viewp
+@@ -446,6 +446,37 @@ void Page::setOverrideViewportArguments(const std::optional<ViewportArguments>&
document->updateViewportArguments();
}
+FloatSize Page::screenSize()
+{
-+ return m_overrideScreenSize.valueOr(screenRect(mainFrame().view()).size());
++ return m_overrideScreenSize.value_or(screenRect(mainFrame().view()).size());
+}
+
-+void Page::setOverrideScreenSize(Optional<FloatSize> size)
++void Page::setOverrideScreenSize(std::optional<FloatSize> size)
+{
+ if (size == m_overrideScreenSize)
+ return;
@@ -5885,10 +5884,10 @@ index 61dd86058e7a1e7230edd6786ce84e1434fccdbe..148de2e46a9ed0fd693ddb4a96bf7229
+#if ENABLE(ORIENTATION_EVENTS)
+int Page::orientation() const
+{
-+ return m_overrideOrientation.valueOr(chrome().client().deviceOrientation());
++ return m_overrideOrientation.value_or(chrome().client().deviceOrientation());
+}
+
-+void Page::setOverrideOrientation(Optional<int> orientation)
++void Page::setOverrideOrientation(std::optional<int> orientation)
+{
+ if (orientation == m_overrideOrientation)
+ return;
@@ -5907,17 +5906,17 @@ index 61dd86058e7a1e7230edd6786ce84e1434fccdbe..148de2e46a9ed0fd693ddb4a96bf7229
#endif
-
-#if HAVE(OS_DARK_MODE_SUPPORT)
-- setUseDarkAppearanceOverride(WTF::nullopt);
+- setUseDarkAppearanceOverride(std::nullopt);
-#endif
-
resetSeenPlugins();
resetSeenMediaEngines();
}
-@@ -3244,6 +3270,16 @@ void Page::setUseDarkAppearanceOverride(Optional<bool> valueOverride)
+@@ -3244,6 +3270,16 @@ void Page::setUseDarkAppearanceOverride(std::optional<bool> valueOverride)
#endif
}
-+void Page::setUseReducedMotionOverride(Optional<bool> valueOverride)
++void Page::setUseReducedMotionOverride(std::optional<bool> valueOverride)
+{
+ if (valueOverride == m_useReducedMotionOverride)
+ return;
@@ -5931,15 +5930,15 @@ index 61dd86058e7a1e7230edd6786ce84e1434fccdbe..148de2e46a9ed0fd693ddb4a96bf7229
{
if (insets == m_fullscreenInsets)
diff --git a/Source/WebCore/page/Page.h b/Source/WebCore/page/Page.h
-index 917a1ad769d94cb0ec35169c1df090d76954a392..69a714415033fa3f113445f9fe3446d6c365b698 100644
+index 16167ce081c4ca8c701a09b910c81cb19a06aebb..9c42ef5422f0bcda3a60ce314c0c9d21c7a9d996 100644
--- a/Source/WebCore/page/Page.h
+++ b/Source/WebCore/page/Page.h
@@ -253,6 +253,9 @@ public:
- const Optional<ViewportArguments>& overrideViewportArguments() const { return m_overrideViewportArguments; }
- WEBCORE_EXPORT void setOverrideViewportArguments(const Optional<ViewportArguments>&);
+ const std::optional<ViewportArguments>& overrideViewportArguments() const { return m_overrideViewportArguments; }
+ WEBCORE_EXPORT void setOverrideViewportArguments(const std::optional<ViewportArguments>&);
+ WEBCORE_EXPORT FloatSize screenSize();
-+ void setOverrideScreenSize(Optional<FloatSize> size);
++ void setOverrideScreenSize(std::optional<FloatSize> size);
+
static void refreshPlugins(bool reload);
WEBCORE_EXPORT PluginData& pluginData();
@@ -5958,25 +5957,25 @@ index 917a1ad769d94cb0ec35169c1df090d76954a392..69a714415033fa3f113445f9fe3446d6
@@ -457,6 +464,8 @@ public:
WEBCORE_EXPORT void effectiveAppearanceDidChange(bool useDarkAppearance, bool useElevatedUserInterfaceLevel);
bool defaultUseDarkAppearance() const { return m_useDarkAppearance; }
- void setUseDarkAppearanceOverride(Optional<bool>);
-+ Optional<bool> useReducedMotionOverride() const { return m_useReducedMotionOverride; }
-+ void setUseReducedMotionOverride(Optional<bool>);
+ void setUseDarkAppearanceOverride(std::optional<bool>);
++ std::optional<bool> useReducedMotionOverride() const { return m_useReducedMotionOverride; }
++ void setUseReducedMotionOverride(std::optional<bool>);
#if ENABLE(TEXT_AUTOSIZING)
float textAutosizingWidth() const { return m_textAutosizingWidth; }
-@@ -834,6 +843,11 @@ public:
+@@ -835,6 +844,11 @@ public:
WEBCORE_EXPORT Vector<Ref<Element>> editableElementsInRect(const FloatRect&) const;
+#if ENABLE(ORIENTATION_EVENTS)
+ int orientation() const;
-+ void setOverrideOrientation(Optional<int>);
++ void setOverrideOrientation(std::optional<int>);
+#endif
+
#if ENABLE(DEVICE_ORIENTATION) && PLATFORM(IOS_FAMILY)
DeviceOrientationUpdateProvider* deviceOrientationUpdateProvider() const { return m_deviceOrientationUpdateProvider.get(); }
#endif
-@@ -909,6 +923,9 @@ private:
+@@ -910,6 +924,9 @@ private:
#if ENABLE(DRAG_SUPPORT)
const std::unique_ptr<DragController> m_dragController;
@@ -5986,22 +5985,22 @@ index 917a1ad769d94cb0ec35169c1df090d76954a392..69a714415033fa3f113445f9fe3446d6
#endif
const std::unique_ptr<FocusController> m_focusController;
#if ENABLE(CONTEXT_MENUS)
-@@ -988,6 +1005,7 @@ private:
+@@ -989,6 +1006,7 @@ private:
bool m_useElevatedUserInterfaceLevel { false };
bool m_useDarkAppearance { false };
- Optional<bool> m_useDarkAppearanceOverride;
-+ Optional<bool> m_useReducedMotionOverride;
+ std::optional<bool> m_useDarkAppearanceOverride;
++ std::optional<bool> m_useReducedMotionOverride;
#if ENABLE(TEXT_AUTOSIZING)
float m_textAutosizingWidth { 0 };
-@@ -1148,6 +1166,11 @@ private:
+@@ -1149,6 +1167,11 @@ private:
#endif
- Optional<ViewportArguments> m_overrideViewportArguments;
-+ Optional<FloatSize> m_overrideScreenSize;
+ std::optional<ViewportArguments> m_overrideViewportArguments;
++ std::optional<FloatSize> m_overrideScreenSize;
+
+#if ENABLE(ORIENTATION_EVENTS)
-+ Optional<int> m_overrideOrientation;
++ std::optional<int> m_overrideOrientation;
+#endif
#if ENABLE(DEVICE_ORIENTATION) && PLATFORM(IOS_FAMILY)
@@ -6051,24 +6050,24 @@ index 27ee794779152f113b49391e4e59614cb5794764..cad99479d44588710bb87dd1a6c6c367
#endif
bool hasAnyElement() const {
diff --git a/Source/WebCore/page/RuntimeEnabledFeatures.cpp b/Source/WebCore/page/RuntimeEnabledFeatures.cpp
-index e9d30c7c06618177cbab04e35b75735dc291ad1f..d0673b66d9c14e4e3f2317faa29438aa0bdc616e 100644
+index 6b2bc1bdb38be0543f20d51d200944b3f547f6a9..68a1773c0f578ecf8d5d7aa15ec1d34d9ad7a0a2 100644
--- a/Source/WebCore/page/RuntimeEnabledFeatures.cpp
+++ b/Source/WebCore/page/RuntimeEnabledFeatures.cpp
@@ -56,7 +56,11 @@ RuntimeEnabledFeatures& RuntimeEnabledFeatures::sharedFeatures()
#if ENABLE(TOUCH_EVENTS)
bool RuntimeEnabledFeatures::touchEventsEnabled() const
{
-- return m_touchEventsEnabled.valueOr(screenHasTouchDevice());
-+ return m_touchEventsEnabled.valueOr(platformScreenHasTouchDevice());
+- return m_touchEventsEnabled.value_or(screenHasTouchDevice());
++ return m_touchEventsEnabled.value_or(platformScreenHasTouchDevice());
+}
+bool RuntimeEnabledFeatures::isTouchPrimaryInputDevice() const
+{
-+ return m_touchEventsEnabled.valueOr(platformScreenIsTouchPrimaryInputDevice());
++ return m_touchEventsEnabled.value_or(platformScreenIsTouchPrimaryInputDevice());
}
#endif
diff --git a/Source/WebCore/page/RuntimeEnabledFeatures.h b/Source/WebCore/page/RuntimeEnabledFeatures.h
-index 736d3d15a9219d2d0a7ec1845185d939503f7063..8658851eddb20b43adcd015efc28c4a8efe1fb0d 100644
+index d0774fd91166b2b977f2e930c5909f35a215be8e..73061176c6f23eaead3add9a71a42de3962dec76 100644
--- a/Source/WebCore/page/RuntimeEnabledFeatures.h
+++ b/Source/WebCore/page/RuntimeEnabledFeatures.h
@@ -200,6 +200,7 @@ public:
@@ -6133,7 +6132,7 @@ index 3bec0aef174336939838fb1069fffbcb9f3d5604..566ef3806be3c5ccf1bb951251c2a90d
RefPtr<ThreadableWebSocketChannel> SocketProvider::createWebSocketChannel(Document&, WebSocketChannelClient&)
diff --git a/Source/WebCore/page/csp/ContentSecurityPolicy.cpp b/Source/WebCore/page/csp/ContentSecurityPolicy.cpp
-index 0176b4d35830139d8049f4a30108daae319dd58a..27c443db7cb01fd8a4f9ad42eaf2373fe72ac0a8 100644
+index 6ad6b23777ea62fae078f4f8a835d2c96ce64f70..0d595e4a3a6144c94c71f073dfa8feaf61437f0b 100644
--- a/Source/WebCore/page/csp/ContentSecurityPolicy.cpp
+++ b/Source/WebCore/page/csp/ContentSecurityPolicy.cpp
@@ -281,6 +281,8 @@ bool ContentSecurityPolicy::protocolMatchesSelf(const URL& url) const
@@ -6524,7 +6523,7 @@ index 12cc7336ae87b6d9d8ea83cf543d029914eaf1db..b97227e21bf9e7166980c20d2efdc24e
Document* document = this->document();
diff --git a/Source/WebCore/page/wpe/DragControllerWPE.cpp b/Source/WebCore/page/wpe/DragControllerWPE.cpp
new file mode 100644
-index 0000000000000000000000000000000000000000..e86e4295101a0a3e9be64681a84eb16b8bfe49d8
+index 0000000000000000000000000000000000000000..3dedfa855f990643e3e7bbe7754abca4e88a0f1c
--- /dev/null
+++ b/Source/WebCore/page/wpe/DragControllerWPE.cpp
@@ -0,0 +1,79 @@
@@ -6580,13 +6579,13 @@ index 0000000000000000000000000000000000000000..e86e4295101a0a3e9be64681a84eb16b
+ return dragData.flags().contains(DragApplicationFlags::IsCopyKeyDown);
+}
+
-+Optional<DragOperation> DragController::dragOperation(const DragData& dragData)
++std::optional<DragOperation> DragController::dragOperation(const DragData& dragData)
+{
+ // FIXME: This logic is incomplete
+ if (dragData.containsURL())
+ return DragOperation::Copy;
+
-+ return WTF::nullopt;
++ return std::nullopt;
+}
+
+const IntSize& DragController::maxDragImageSize()
@@ -6620,7 +6619,7 @@ index 237ebfbb80338d313d2a51a77e28309d705fbf69..134b26cecc94e6989126a9f40d1d42a4
platform/graphics/cairo/RefPtrCairo.h
)
diff --git a/Source/WebCore/platform/DragData.h b/Source/WebCore/platform/DragData.h
-index ce0dff2cfaf3b5cf55070eb991bd5db1f2c8e1f7..cb3df549cb15f95140d46082c9e706c0158d575a 100644
+index 6600dfa7b189e15fab7fb796f66ef1a79dcd22f3..4c0bc485ca92614efca23a5a2da871b77d5285d3 100644
--- a/Source/WebCore/platform/DragData.h
+++ b/Source/WebCore/platform/DragData.h
@@ -48,7 +48,7 @@ typedef void* DragDataRef;
@@ -6633,7 +6632,7 @@ index ce0dff2cfaf3b5cf55070eb991bd5db1f2c8e1f7..cb3df549cb15f95140d46082c9e706c0
class SelectionData;
}
diff --git a/Source/WebCore/platform/DragImage.cpp b/Source/WebCore/platform/DragImage.cpp
-index 1939fb90c22564d02cadf65bdaf7f65ccb7ce9a7..f6a73e6ac480ed0d9b964617d6aa62f364bc391a 100644
+index 903428f3ea6433a70dc1b8d55801e37746596c0f..19dc1ca1b09d472d180ce8d6576fd57d7a1ac461 100644
--- a/Source/WebCore/platform/DragImage.cpp
+++ b/Source/WebCore/platform/DragImage.cpp
@@ -274,7 +274,7 @@ DragImage::~DragImage()
@@ -6646,7 +6645,7 @@ index 1939fb90c22564d02cadf65bdaf7f65ccb7ce9a7..f6a73e6ac480ed0d9b964617d6aa62f3
IntSize dragImageSize(DragImageRef)
{
diff --git a/Source/WebCore/platform/Pasteboard.h b/Source/WebCore/platform/Pasteboard.h
-index af54715d8ac8e6f87c41bfafe7fab2ff63648d97..819b43372068ae385381fad264bf72fa10459732 100644
+index 7d247dcd1a16f342c1754c45c4a73529bf8f71b2..6903f0a0ab250526f533bcc69e1af11e578fb03d 100644
--- a/Source/WebCore/platform/Pasteboard.h
+++ b/Source/WebCore/platform/Pasteboard.h
@@ -44,7 +44,7 @@ OBJC_CLASS NSString;
@@ -6723,7 +6722,7 @@ index af54715d8ac8e6f87c41bfafe7fab2ff63648d97..819b43372068ae385381fad264bf72fa
#endif
+#if PLATFORM(WPE)
-+ Optional<SelectionData> m_selectionData;
++ std::optional<SelectionData> m_selectionData;
+#endif
+
#if PLATFORM(COCOA)
@@ -6738,7 +6737,7 @@ index af54715d8ac8e6f87c41bfafe7fab2ff63648d97..819b43372068ae385381fad264bf72fa
};
diff --git a/Source/WebCore/platform/PlatformKeyboardEvent.h b/Source/WebCore/platform/PlatformKeyboardEvent.h
-index 1a1367f7a9df0ab1ace16d0365e55f6538d0cbd6..e24d748074295cc68f2eb89fb21adccc1acad149 100644
+index f90f1dad6b7b4e6703745c9cb97a32c872fa1aa8..9ad9c22488cc001cade2e8e8a6f4e9b8dc515cbd 100644
--- a/Source/WebCore/platform/PlatformKeyboardEvent.h
+++ b/Source/WebCore/platform/PlatformKeyboardEvent.h
@@ -134,6 +134,7 @@ namespace WebCore {
@@ -6787,10 +6786,10 @@ index ba50b688ab6d0bae5d199fa0bac4b7e2004baf81..0b83a798b00835635a95a0db22173de0
+} // namespace WebCore
+#endif
diff --git a/Source/WebCore/platform/PlatformScreen.h b/Source/WebCore/platform/PlatformScreen.h
-index dee41b971a751c68b1909455e596dbeb4db8a8f6..902e86c0c6c8efb319e162d1cc72a8693ec8b74f 100644
+index bb5411ad58c4ea427837dc7ffeb8687d51e79061..0bc31619d5f8ce268cfbe8b4ee54f8c5d7903aa5 100644
--- a/Source/WebCore/platform/PlatformScreen.h
+++ b/Source/WebCore/platform/PlatformScreen.h
-@@ -149,12 +149,14 @@ WEBCORE_EXPORT float screenScaleFactor(UIScreen * = nullptr);
+@@ -146,12 +146,14 @@ WEBCORE_EXPORT float screenScaleFactor(UIScreen * = nullptr);
#endif
#if ENABLE(TOUCH_EVENTS)
@@ -6809,7 +6808,7 @@ index dee41b971a751c68b1909455e596dbeb4db8a8f6..902e86c0c6c8efb319e162d1cc72a869
#endif
diff --git a/Source/WebCore/platform/ScrollableArea.h b/Source/WebCore/platform/ScrollableArea.h
-index d481f7edcbfbf33bdab663677c8fd50b738af9a6..4b6659c0c7e6e09d8e60bd7752bebbdb9094069d 100644
+index 0195a1554379a9c3e1695f7c44ecdd3defd077fe..d7d42a204bd91a06c9dab1a820feb90293a8d761 100644
--- a/Source/WebCore/platform/ScrollableArea.h
+++ b/Source/WebCore/platform/ScrollableArea.h
@@ -106,7 +106,7 @@ public:
@@ -6822,10 +6821,10 @@ index d481f7edcbfbf33bdab663677c8fd50b738af9a6..4b6659c0c7e6e09d8e60bd7752bebbdb
#if PLATFORM(IOS_FAMILY)
diff --git a/Source/WebCore/platform/graphics/FontCascade.h b/Source/WebCore/platform/graphics/FontCascade.h
-index 1ef9e76ff16d408f57788ffbcfd86d57555abe2d..b7d97dcb6d33a38756fef930b8a2f1aac2bce3fa 100644
+index 6dade9146fe99078ac1a58b28cf0c5dd0c351095..16a641f4237a8a3a7a40461e3429551f7ca96203 100644
--- a/Source/WebCore/platform/graphics/FontCascade.h
+++ b/Source/WebCore/platform/graphics/FontCascade.h
-@@ -284,7 +284,8 @@ private:
+@@ -283,7 +283,8 @@ private:
return true;
if (textRenderingMode == TextRenderingMode::OptimizeSpeed)
return false;
@@ -6836,7 +6835,7 @@ index 1ef9e76ff16d408f57788ffbcfd86d57555abe2d..b7d97dcb6d33a38756fef930b8a2f1aa
#else
return false;
diff --git a/Source/WebCore/platform/graphics/cairo/ImageBufferUtilitiesCairo.cpp b/Source/WebCore/platform/graphics/cairo/ImageBufferUtilitiesCairo.cpp
-index 5a4d3a50859a5e844c7f424130691714802b01c7..c6559fcacd76e3d8bde538ea6becd84abc3a8f42 100644
+index 4db603a94f3af1b1bce94ab0f1ae36054c004fcc..c1820f48eb86348f8ca678fde636244e8c91267e 100644
--- a/Source/WebCore/platform/graphics/cairo/ImageBufferUtilitiesCairo.cpp
+++ b/Source/WebCore/platform/graphics/cairo/ImageBufferUtilitiesCairo.cpp
@@ -48,6 +48,13 @@
@@ -6857,7 +6856,7 @@ index 5a4d3a50859a5e844c7f424130691714802b01c7..c6559fcacd76e3d8bde538ea6becd84a
return cairo_surface_write_to_png_stream(image, writeFunction, output) == CAIRO_STATUS_SUCCESS;
}
--Vector<uint8_t> data(cairo_surface_t* image, const String& mimeType, Optional<double>)
+-Vector<uint8_t> data(cairo_surface_t* image, const String& mimeType, std::optional<double>)
+static Vector<uint8_t> encodeJpeg(cairo_surface_t* image, int quality)
+{
+ if (cairo_surface_get_type(image) != CAIRO_SURFACE_TYPE_IMAGE) {
@@ -6918,7 +6917,7 @@ index 5a4d3a50859a5e844c7f424130691714802b01c7..c6559fcacd76e3d8bde538ea6becd84a
+ return output;
+}
+
-+Vector<uint8_t> data(cairo_surface_t* image, const String& mimeType, Optional<double> quality)
++Vector<uint8_t> data(cairo_surface_t* image, const String& mimeType, std::optional<double> quality)
{
+ if (mimeType == "image/jpeg") {
+ int qualityPercent = 100;
@@ -6931,10 +6930,10 @@ index 5a4d3a50859a5e844c7f424130691714802b01c7..c6559fcacd76e3d8bde538ea6becd84a
if (!image || !encodeImage(image, mimeType, &encodedImage))
return { };
diff --git a/Source/WebCore/platform/graphics/cg/ImageBufferUtilitiesCG.h b/Source/WebCore/platform/graphics/cg/ImageBufferUtilitiesCG.h
-index 998311795537117f8c476adb3e2e0f007c69b609..ccfdafa2974601c9d3b1fa5ec1b15354e5f37576 100644
+index eac8346d3e177f87792fb0a8fc9dd0fb3b2f6efc..2ddd1dc810033a7f60f17ba555813f1b529d71f7 100644
--- a/Source/WebCore/platform/graphics/cg/ImageBufferUtilitiesCG.h
+++ b/Source/WebCore/platform/graphics/cg/ImageBufferUtilitiesCG.h
-@@ -35,10 +35,10 @@ class PixelBuffer;
+@@ -36,10 +36,10 @@ class PixelBuffer;
WEBCORE_EXPORT uint8_t verifyImageBufferIsBigEnough(const void* buffer, size_t bufferSize);
@@ -6942,13 +6941,13 @@ index 998311795537117f8c476adb3e2e0f007c69b609..ccfdafa2974601c9d3b1fa5ec1b15354
+WEBCORE_EXPORT CFStringRef jpegUTI();
RetainPtr<CFStringRef> utiFromImageBufferMIMEType(const String&);
--Vector<uint8_t> data(CGImageRef, CFStringRef destinationUTI, Optional<double> quality);
-+WEBCORE_EXPORT Vector<uint8_t> data(CGImageRef, CFStringRef destinationUTI, Optional<double> quality);
- Vector<uint8_t> data(const PixelBuffer&, const String& mimeType, Optional<double> quality);
+-Vector<uint8_t> data(CGImageRef, CFStringRef destinationUTI, std::optional<double> quality);
++WEBCORE_EXPORT Vector<uint8_t> data(CGImageRef, CFStringRef destinationUTI, std::optional<double> quality);
+ Vector<uint8_t> data(const PixelBuffer&, const String& mimeType, std::optional<double> quality);
- String dataURL(CGImageRef, CFStringRef destinationUTI, const String& mimeType, Optional<double> quality);
+ String dataURL(CGImageRef, CFStringRef destinationUTI, const String& mimeType, std::optional<double> quality);
diff --git a/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp b/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp
-index ce4c0fb9a237ac8c72a0c23f79f0c023530d90ab..789e3814ad16fa10a353ea3ef645c6961a040601 100644
+index 2e46b61536c835dfcacf9f79e10e6d59ae7a3836..fa0c72d80d83c58a8407e78988de010fe97d7c38 100644
--- a/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp
+++ b/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp
@@ -27,7 +27,7 @@
@@ -7292,12 +7291,12 @@ index 7a3b4723f48c179864b2dd6d5b1ed8d27492358e..a741751acad01f11d7da0f6896eeb002
auto* display = gdk_display_get_default();
if (!display)
diff --git a/Source/WebCore/platform/libwpe/PasteboardLibWPE.cpp b/Source/WebCore/platform/libwpe/PasteboardLibWPE.cpp
-index 59d3bc81471d3e7bca77cda22d7a05895a5a21b5..0c25426bc0a477786c367fe28ad6816a82437a33 100644
+index f4c905dc15a2183629b0e9817dc24135e0ff7fe5..e9925e7a9fc3cbf5fefffaf38f409fbeec189cb0 100644
--- a/Source/WebCore/platform/libwpe/PasteboardLibWPE.cpp
+++ b/Source/WebCore/platform/libwpe/PasteboardLibWPE.cpp
-@@ -33,6 +33,10 @@
+@@ -32,6 +32,10 @@
+ #include "PasteboardStrategy.h"
#include "PlatformStrategies.h"
- #include <wtf/Optional.h>
+#if ENABLE(DRAG_SUPPORT)
+#include "DragData.h"
@@ -7306,7 +7305,7 @@ index 59d3bc81471d3e7bca77cda22d7a05895a5a21b5..0c25426bc0a477786c367fe28ad6816a
namespace WebCore {
std::unique_ptr<Pasteboard> Pasteboard::createForCopyAndPaste(std::unique_ptr<PasteboardContext>&& context)
-@@ -74,6 +78,16 @@ String Pasteboard::readOrigin()
+@@ -73,6 +77,16 @@ String Pasteboard::readOrigin()
String Pasteboard::readString(const String& type)
{
@@ -7323,7 +7322,7 @@ index 59d3bc81471d3e7bca77cda22d7a05895a5a21b5..0c25426bc0a477786c367fe28ad6816a
return platformStrategies()->pasteboardStrategy()->readStringFromPasteboard(0, type, name(), context());
}
-@@ -85,6 +99,15 @@ String Pasteboard::readStringInCustomData(const String&)
+@@ -84,6 +98,15 @@ String Pasteboard::readStringInCustomData(const String&)
void Pasteboard::writeString(const String& type, const String& text)
{
@@ -7339,7 +7338,7 @@ index 59d3bc81471d3e7bca77cda22d7a05895a5a21b5..0c25426bc0a477786c367fe28ad6816a
platformStrategies()->pasteboardStrategy()->writeToPasteboard(type, text);
}
-@@ -112,7 +135,12 @@ void Pasteboard::read(PasteboardFileReader&, Optional<size_t>)
+@@ -111,7 +134,12 @@ void Pasteboard::read(PasteboardFileReader&, std::optional<size_t>)
void Pasteboard::write(const PasteboardURL& url)
{
@@ -7353,7 +7352,7 @@ index 59d3bc81471d3e7bca77cda22d7a05895a5a21b5..0c25426bc0a477786c367fe28ad6816a
}
void Pasteboard::writeTrustworthyWebURLsPboardType(const PasteboardURL&)
-@@ -120,13 +148,28 @@ void Pasteboard::writeTrustworthyWebURLsPboardType(const PasteboardURL&)
+@@ -119,13 +147,28 @@ void Pasteboard::writeTrustworthyWebURLsPboardType(const PasteboardURL&)
notImplemented();
}
@@ -7384,7 +7383,7 @@ index 59d3bc81471d3e7bca77cda22d7a05895a5a21b5..0c25426bc0a477786c367fe28ad6816a
}
Pasteboard::FileContentState Pasteboard::fileContentState()
-@@ -157,6 +200,35 @@ void Pasteboard::write(const Color&)
+@@ -156,6 +199,35 @@ void Pasteboard::write(const Color&)
{
}
@@ -7699,20 +7698,8 @@ index 39cb560e54bf9efd2dad6e1fb60dd0f609daf6bf..91c132460d4b466f61a8c579f70329fd
else
m_commonHeaders.append(CommonHeader { name, value });
}
-diff --git a/Source/WebCore/platform/network/NetworkStateNotifier.h b/Source/WebCore/platform/network/NetworkStateNotifier.h
-index 87930048f4fd18d6098af7de4da25be532df5931..2bb2afcf9473b0d5d97efbe18dd7b8145bc5f932 100644
---- a/Source/WebCore/platform/network/NetworkStateNotifier.h
-+++ b/Source/WebCore/platform/network/NetworkStateNotifier.h
-@@ -72,6 +72,7 @@ private:
- #endif
-
- Optional<bool> m_isOnLine;
-+ Optional<bool> m_emulatedIsOnLine;
- Vector<WTF::Function<void(bool)>> m_listeners;
- Timer m_updateStateTimer;
-
diff --git a/Source/WebCore/platform/network/ResourceResponseBase.h b/Source/WebCore/platform/network/ResourceResponseBase.h
-index 0e97fee9c6d65a382d6bc5616ffa91de776b771b..9b337b3a2d3a641707fb9568efadb7fc5c2ef4b8 100644
+index f5c0970b031a2e9e2a176af81e6cf510ace4cb4a..713ade70c5bec341613bb0b5997c5c64382f41e3 100644
--- a/Source/WebCore/platform/network/ResourceResponseBase.h
+++ b/Source/WebCore/platform/network/ResourceResponseBase.h
@@ -217,6 +217,8 @@ public:
@@ -7736,7 +7723,7 @@ index 0e97fee9c6d65a382d6bc5616ffa91de776b771b..9b337b3a2d3a641707fb9568efadb7fc
return false;
response.m_httpHeaderFields = WTFMove(*httpHeaderFields);
-+ Optional<HTTPHeaderMap> httpRequestHeaderFields;
++ std::optional<HTTPHeaderMap> httpRequestHeaderFields;
+ decoder >> httpRequestHeaderFields;
+ if (!httpRequestHeaderFields)
+ return false;
@@ -7744,9 +7731,9 @@ index 0e97fee9c6d65a382d6bc5616ffa91de776b771b..9b337b3a2d3a641707fb9568efadb7fc
+
// The networkLoadMetrics info is only send over IPC and not stored in disk cache.
if constexpr (Decoder::isIPCDecoder) {
- Optional<Box<NetworkLoadMetrics>> networkLoadMetrics;
+ std::optional<Box<NetworkLoadMetrics>> networkLoadMetrics;
diff --git a/Source/WebCore/platform/network/cf/SocketStreamHandleImpl.h b/Source/WebCore/platform/network/cf/SocketStreamHandleImpl.h
-index d677280d2b5e7b053a240c155d64bc881f1737bb..1be949e09982b34366d162e6d45ebc51a76dcfb0 100644
+index 7330aa933924791f1292c0847921e3b367493d96..a5238a748d1fb4bfa5b3e0882fe62f4029f84e5f 100644
--- a/Source/WebCore/platform/network/cf/SocketStreamHandleImpl.h
+++ b/Source/WebCore/platform/network/cf/SocketStreamHandleImpl.h
@@ -47,7 +47,7 @@ class SocketStreamHandleClient;
@@ -7759,7 +7746,7 @@ index d677280d2b5e7b053a240c155d64bc881f1737bb..1be949e09982b34366d162e6d45ebc51
virtual ~SocketStreamHandleImpl();
@@ -61,7 +61,7 @@ private:
- Optional<size_t> platformSendInternal(const uint8_t*, size_t);
+ std::optional<size_t> platformSendInternal(const uint8_t*, size_t);
bool sendPendingData();
- WEBCORE_EXPORT SocketStreamHandleImpl(const URL&, SocketStreamHandleClient&, PAL::SessionID, const String& credentialPartition, SourceApplicationAuditToken&&, const StorageSessionProvider*);
@@ -7776,7 +7763,7 @@ index d677280d2b5e7b053a240c155d64bc881f1737bb..1be949e09982b34366d162e6d45ebc51
StreamBuffer<uint8_t, 1024 * 1024> m_buffer;
static const unsigned maxBufferSize = 100 * 1024 * 1024;
diff --git a/Source/WebCore/platform/network/cf/SocketStreamHandleImplCFNet.cpp b/Source/WebCore/platform/network/cf/SocketStreamHandleImplCFNet.cpp
-index 9915f0ceacaf946eb4af2d6b740f7226e344b78d..4382ccde112e3c21892a4dd28fba416a6db90a62 100644
+index 625485bf1c0e8e5819bf654055bd386437183a48..90028b00190238722f5edf53ce5142d7e8a6b08a 100644
--- a/Source/WebCore/platform/network/cf/SocketStreamHandleImplCFNet.cpp
+++ b/Source/WebCore/platform/network/cf/SocketStreamHandleImplCFNet.cpp
@@ -96,7 +96,7 @@ static inline auto callbacksRunLoopMode()
@@ -7806,7 +7793,7 @@ index 9915f0ceacaf946eb4af2d6b740f7226e344b78d..4382ccde112e3c21892a4dd28fba416a
kCFStreamSSLPeerName,
kCFStreamSSLLevel,
diff --git a/Source/WebCore/platform/network/curl/CookieJarDB.h b/Source/WebCore/platform/network/curl/CookieJarDB.h
-index 4849c667c2a128841ffb0576a6690c4d8fd45e21..2bde2ba91baa13ca3d2cd2421f54e4989520aa4a 100644
+index c4eb67d6f7c334076b32b798dcea40b570681e6f..ce86ab28225aa466350671441294f2ace8851bbd 100644
--- a/Source/WebCore/platform/network/curl/CookieJarDB.h
+++ b/Source/WebCore/platform/network/curl/CookieJarDB.h
@@ -72,7 +72,7 @@ public:
@@ -7899,7 +7886,7 @@ index 7d881206c9689f433227969c9b7f9ff268bdaaed..2e8118f11f87fa5f32adcedc165aec82
void send(CurlStreamID, UniqueArray<uint8_t>&&, size_t);
diff --git a/Source/WebCore/platform/network/curl/SocketStreamHandleImpl.h b/Source/WebCore/platform/network/curl/SocketStreamHandleImpl.h
-index fad4ef9198118f5e6e5ed7d3c14b99e574593451..a2d59843896f252fccdddbb94c5275eec6300f1b 100644
+index 2d0584dab5cff6d1490629642baea652faea0033..bc0f81f4f5161ff2f046ecb4b429641c921a8707 100644
--- a/Source/WebCore/platform/network/curl/SocketStreamHandleImpl.h
+++ b/Source/WebCore/platform/network/curl/SocketStreamHandleImpl.h
@@ -44,7 +44,7 @@ class StorageSessionProvider;
@@ -7919,9 +7906,9 @@ index fad4ef9198118f5e6e5ed7d3c14b99e574593451..a2d59843896f252fccdddbb94c5275ee
+ WEBCORE_EXPORT SocketStreamHandleImpl(const URL&, bool ignoreCertificateErrors, SocketStreamHandleClient&, const StorageSessionProvider*);
size_t bufferedAmount() final;
- Optional<size_t> platformSendInternal(const uint8_t*, size_t);
+ std::optional<size_t> platformSendInternal(const uint8_t*, size_t);
diff --git a/Source/WebCore/platform/network/curl/SocketStreamHandleImplCurl.cpp b/Source/WebCore/platform/network/curl/SocketStreamHandleImplCurl.cpp
-index cae8c43d60fcf6a3d69c58a7436516f923d227cb..e6b03f378929abbd4437f8507ea2f6c563edcff7 100644
+index 2fece028effdbe88518ec7b8be259b0a09086ccf..9eeffdceaa546488f31db0207d19d97efd9cc7ea 100644
--- a/Source/WebCore/platform/network/curl/SocketStreamHandleImplCurl.cpp
+++ b/Source/WebCore/platform/network/curl/SocketStreamHandleImplCurl.cpp
@@ -43,7 +43,7 @@
@@ -7943,7 +7930,7 @@ index cae8c43d60fcf6a3d69c58a7436516f923d227cb..e6b03f378929abbd4437f8507ea2f6c5
SocketStreamHandleImpl::~SocketStreamHandleImpl()
diff --git a/Source/WebCore/platform/network/soup/SocketStreamHandleImpl.h b/Source/WebCore/platform/network/soup/SocketStreamHandleImpl.h
-index 3ecf866005da6da9cec7c7930e6a4f93cb39d6e0..d81dc9ac0c433e00ab4ad73e206856098ab9230e 100644
+index 88df3748e980a22e71bd835864caf24b6b7ea50b..f83c7f2535fd1abae7b1cccca946254b9407f86f 100644
--- a/Source/WebCore/platform/network/soup/SocketStreamHandleImpl.h
+++ b/Source/WebCore/platform/network/soup/SocketStreamHandleImpl.h
@@ -47,7 +47,7 @@ class StorageSessionProvider;
@@ -7992,7 +7979,7 @@ index c50799b63e05adbe32bae3535d786c7d268f980f..9cf1cc7ec4eaae22947f80ba272dfae2
HGLOBAL createGlobalData(const String&);
HGLOBAL createGlobalData(const Vector<char>&);
diff --git a/Source/WebCore/platform/win/DragDataWin.cpp b/Source/WebCore/platform/win/DragDataWin.cpp
-index 9e28783e6e1ac135970b06d420f5ec64a6b99fa1..bac00b5d69ae8d462ab0204082ca51cb105fd090 100644
+index 579a112579af39fc12ef024979d81fc55af36c2b..82c566c9d2ced02a92902a90e7ff97c142fa1903 100644
--- a/Source/WebCore/platform/win/DragDataWin.cpp
+++ b/Source/WebCore/platform/win/DragDataWin.cpp
@@ -48,6 +48,7 @@ DragData::DragData(const DragDataMap& data, const IntPoint& clientPosition, cons
@@ -8028,10 +8015,10 @@ index aae6c99dd052985a43718846b68536454050c234..7e2e5d0c1de90f1454f7fdb71a40ab71
bool PlatformKeyboardEvent::currentCapsLockState()
diff --git a/Source/WebCore/platform/win/PasteboardWin.cpp b/Source/WebCore/platform/win/PasteboardWin.cpp
-index cc8003f5e153205ac075ad06954215950199debc..310c0a03162b987f21ad9288bd71337abf1d3893 100644
+index 9e3357b20e60f47829ced8d2849f5d8c9a7bb50a..be6579859e80c846235b7f94f2ec7551078c9fdd 100644
--- a/Source/WebCore/platform/win/PasteboardWin.cpp
+++ b/Source/WebCore/platform/win/PasteboardWin.cpp
-@@ -1135,7 +1135,21 @@ void Pasteboard::writeCustomData(const Vector<PasteboardCustomData>& data)
+@@ -1134,7 +1134,21 @@ void Pasteboard::writeCustomData(const Vector<PasteboardCustomData>& data)
}
clear();
@@ -8053,7 +8040,7 @@ index cc8003f5e153205ac075ad06954215950199debc..310c0a03162b987f21ad9288bd71337a
if (::OpenClipboard(m_owner)) {
const auto& customData = data.first();
customData.forEachPlatformStringOrBuffer([](auto& type, auto& stringOrBuffer) {
-@@ -1174,4 +1188,25 @@ void Pasteboard::write(const Color&)
+@@ -1173,4 +1187,25 @@ void Pasteboard::write(const Color&)
{
}
@@ -8494,7 +8481,7 @@ index 0000000000000000000000000000000000000000..cf2b51f6f02837a1106f4d999f2f130e
+
+} // namespace WebCore
diff --git a/Source/WebCore/rendering/RenderLayer.cpp b/Source/WebCore/rendering/RenderLayer.cpp
-index e80d5e7032ccae2ff240a4d1b1963d4e57a3e456..d4b0ab32766b8cbbb582e43dae5670c9cf5f7f0f 100644
+index 1f11a978e315badd7acc823b71d7d85088f03ef3..085492154fba257f37521c765564ac49b7669474 100644
--- a/Source/WebCore/rendering/RenderLayer.cpp
+++ b/Source/WebCore/rendering/RenderLayer.cpp
@@ -2560,7 +2560,7 @@ LayoutRect RenderLayer::getRectToExpose(const LayoutRect& visibleRect, const Lay
@@ -8526,7 +8513,7 @@ index 242aca3a06b91574a748b13ecefa80c6172b9c59..4dcd61750471013be4455b0270a8a21a
{
auto innerText = innerTextElement();
diff --git a/Source/WebCore/rendering/RenderTextControl.h b/Source/WebCore/rendering/RenderTextControl.h
-index 6a37b0b3e7d6602d57e65f6665e7c7a5530b2ae1..80cbe930884e1d4c229ae9b919de5725816e68bc 100644
+index 2e90534ffd8da83b7dc54d46fa7def16319bbb43..2493c00d58957751c65c37eb409fa8d675efd5ca 100644
--- a/Source/WebCore/rendering/RenderTextControl.h
+++ b/Source/WebCore/rendering/RenderTextControl.h
@@ -36,9 +36,9 @@ public:
@@ -8553,7 +8540,7 @@ index 694008e0451edc5770142a0a6d9eed52b04ded80..ec93869f9486bdf7bd3bb56478c62469
WEBCORE_EXPORT WTF::TextStream& operator<<(WTF::TextStream&, ScrollAlignment::Behavior);
diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
-index c44a4838fc9749ea657ac0eff02e5987eae567c9..a3e88cfbc1b2f9e12a764f534ef96a1714404383 100644
+index 2d19190a3470dfb523585f22f7f465050df33929..2595f7ddf6e1cf0c2013e92f6298e0573fbde005 100644
--- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
+++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
@@ -74,6 +74,11 @@
@@ -8585,7 +8572,7 @@ index c44a4838fc9749ea657ac0eff02e5987eae567c9..a3e88cfbc1b2f9e12a764f534ef96a17
void NetworkConnectionToWebProcess::removeStorageAccessForFrame(FrameIdentifier frameID, PageIdentifier pageID)
{
diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
-index 9465b68f36c4e59eeaac67481906a3e195c9b47e..14f0d51be44b8189ec334650ad996e142d94b15b 100644
+index 30b8dae1b63f62af7077d9566cb1cfc6fed7da5c..47f7e34d87c36226a0244f38d7456853da90860d 100644
--- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
+++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
@@ -285,6 +285,8 @@ private:
@@ -8598,7 +8585,7 @@ index 9465b68f36c4e59eeaac67481906a3e195c9b47e..14f0d51be44b8189ec334650ad996e14
void removeStorageAccessForFrame(WebCore::FrameIdentifier, WebCore::PageIdentifier);
diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
-index c63a6ba71fae430b9d2a326ecfb86a14ddd31993..739672cfcd5d7d803b5fa32466e66481fb786a7d 100644
+index 063ee6a461bb68ebde70c6f9ee4e83961d03354b..d7db79273b77296864150d1bc00363291c343947 100644
--- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
+++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
@@ -64,6 +64,8 @@ messages -> NetworkConnectionToWebProcess LegacyReceiver {
@@ -8611,7 +8598,7 @@ index c63a6ba71fae430b9d2a326ecfb86a14ddd31993..739672cfcd5d7d803b5fa32466e66481
RemoveStorageAccessForFrame(WebCore::FrameIdentifier frameID, WebCore::PageIdentifier pageID);
LogUserInteraction(WebCore::RegistrableDomain domain)
diff --git a/Source/WebKit/NetworkProcess/NetworkProcess.cpp b/Source/WebKit/NetworkProcess/NetworkProcess.cpp
-index 364c23618b3ce25e0c43b54bf538582adab83192..cdf9a6f823865608b10c3e65f13d32f5082f05a8 100644
+index b0f0c5011bd4385536c90f47c71fe75020da19be..b9686679e6940827766e74036b56fdf88fc8aaaf 100644
--- a/Source/WebKit/NetworkProcess/NetworkProcess.cpp
+++ b/Source/WebKit/NetworkProcess/NetworkProcess.cpp
@@ -26,7 +26,6 @@
@@ -8674,7 +8661,7 @@ index 364c23618b3ce25e0c43b54bf538582adab83192..cdf9a6f823865608b10c3e65f13d32f5
void NetworkProcess::dumpResourceLoadStatistics(PAL::SessionID sessionID, CompletionHandler<void(String)>&& completionHandler)
{
diff --git a/Source/WebKit/NetworkProcess/NetworkProcess.h b/Source/WebKit/NetworkProcess/NetworkProcess.h
-index 083382c99a07b26fd58921c5c87e2a61b210761c..af15a73973ed9207fa65765982813a975d17194d 100644
+index b8a7ad49ca10ed0f33e6017cd4d36b02febd9966..858ed6d0f0b0e22c27d5357bd3e59675251beff3 100644
--- a/Source/WebKit/NetworkProcess/NetworkProcess.h
+++ b/Source/WebKit/NetworkProcess/NetworkProcess.h
@@ -79,6 +79,7 @@ class SessionID;
@@ -8700,12 +8687,12 @@ index 083382c99a07b26fd58921c5c87e2a61b210761c..af15a73973ed9207fa65765982813a97
void clearPrevalentResource(PAL::SessionID, const RegistrableDomain&, CompletionHandler<void()>&&);
void clearUserInteraction(PAL::SessionID, const RegistrableDomain&, CompletionHandler<void()>&&);
diff --git a/Source/WebKit/NetworkProcess/NetworkProcess.messages.in b/Source/WebKit/NetworkProcess/NetworkProcess.messages.in
-index 40ea12a0d44aeda21492e852479d6a8dc22d83c8..e74c749360b916d61c02816c6960f777ede7ada9 100644
+index 90463d25bd6a4894a2e6e9c15f15e2c82884f19e..23e6eb20ee72b39ffdf17ead3ef4f0b21e02cb5f 100644
--- a/Source/WebKit/NetworkProcess/NetworkProcess.messages.in
+++ b/Source/WebKit/NetworkProcess/NetworkProcess.messages.in
@@ -79,6 +79,13 @@ messages -> NetworkProcess LegacyReceiver {
- PreconnectTo(PAL::SessionID sessionID, WebKit::WebPageProxyIdentifier webPageProxyID, WebCore::PageIdentifier webPageID, URL url, String userAgent, enum:uint8_t WebCore::StoredCredentialsPolicy storedCredentialsPolicy, enum:bool Optional<WebKit::NavigatingToAppBoundDomain> isNavigatingToAppBoundDomain, enum:bool WebKit::LastNavigationWasAppBound lastNavigationWasAppBound);
+ PreconnectTo(PAL::SessionID sessionID, WebKit::WebPageProxyIdentifier webPageProxyID, WebCore::PageIdentifier webPageID, URL url, String userAgent, enum:uint8_t WebCore::StoredCredentialsPolicy storedCredentialsPolicy, enum:bool std::optional<WebKit::NavigatingToAppBoundDomain> isNavigatingToAppBoundDomain, enum:bool WebKit::LastNavigationWasAppBound lastNavigationWasAppBound);
+ GetAllCookies(PAL::SessionID sessionID) -> (Vector<WebCore::Cookie> cookies) Async
+ SetCookies(PAL::SessionID sessionID, Vector<WebCore::Cookie> cookies) -> (bool success) Async
@@ -8718,7 +8705,7 @@ index 40ea12a0d44aeda21492e852479d6a8dc22d83c8..e74c749360b916d61c02816c6960f777
ClearPrevalentResource(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain) -> () Async
ClearUserInteraction(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain) -> () Async
diff --git a/Source/WebKit/NetworkProcess/NetworkSession.h b/Source/WebKit/NetworkProcess/NetworkSession.h
-index 17540d4554fe5c93a31020a6feca788dd75a00a4..4988a0a8598dd7fe60de7bdcf897cc8ec9c64a60 100644
+index 7af3f36f1e61c4c2b2358e7d6f8f7e37b9e731a8..ba41409688495af299995baa68388c8aa9a59b36 100644
--- a/Source/WebKit/NetworkProcess/NetworkSession.h
+++ b/Source/WebKit/NetworkProcess/NetworkSession.h
@@ -151,6 +151,9 @@ public:
@@ -8740,7 +8727,7 @@ index 17540d4554fe5c93a31020a6feca788dd75a00a4..4988a0a8598dd7fe60de7bdcf897cc8e
HashSet<Ref<NetworkResourceLoader>> m_keptAliveLoads;
diff --git a/Source/WebKit/NetworkProcess/NetworkSocketStream.cpp b/Source/WebKit/NetworkProcess/NetworkSocketStream.cpp
-index 48c883bfc0fc7d501c8a4a4e7684ccc33e38c14d..20dedbbaf4b1a713c8be41e21425c3074e4e22ff 100644
+index 15a99ece34ac16034d6bbc8e47c289e38b6c92b5..32f3c34b41e49494a7fcf51563f616ff82eda5a4 100644
--- a/Source/WebKit/NetworkProcess/NetworkSocketStream.cpp
+++ b/Source/WebKit/NetworkProcess/NetworkSocketStream.cpp
@@ -43,7 +43,7 @@ Ref<NetworkSocketStream> NetworkSocketStream::create(NetworkProcess& networkProc
@@ -8835,7 +8822,7 @@ index 0d6e7aedff68227bf7dc8ab7184abc6fd3321c54..67b616d818aa42f8cae33f0535c888cd
void deleteLocalStorageEntriesForOrigins(const Vector<WebCore::SecurityOriginData>&);
Vector<LocalStorageDatabaseTracker::OriginDetails> getLocalStorageOriginDetailsCrossThreadCopy() const;
diff --git a/Source/WebKit/NetworkProcess/WebStorage/StorageManagerSet.cpp b/Source/WebKit/NetworkProcess/WebStorage/StorageManagerSet.cpp
-index f9e843de37319dd6c5c1063a3cdcf5c1d4bba195..f1ad21127d562ab469443cafa332abec6d9840c5 100644
+index 4655487a6ecd300c413c1aa5613bdffb48ce8da6..617d26c4401f3307ff8e261de5a10902c76df570 100644
--- a/Source/WebKit/NetworkProcess/WebStorage/StorageManagerSet.cpp
+++ b/Source/WebKit/NetworkProcess/WebStorage/StorageManagerSet.cpp
@@ -253,6 +253,21 @@ void StorageManagerSet::getLocalStorageOrigins(PAL::SessionID sessionID, GetOrig
@@ -8861,10 +8848,10 @@ index f9e843de37319dd6c5c1063a3cdcf5c1d4bba195..f1ad21127d562ab469443cafa332abec
{
ASSERT(RunLoop::isMain());
diff --git a/Source/WebKit/NetworkProcess/WebStorage/StorageManagerSet.h b/Source/WebKit/NetworkProcess/WebStorage/StorageManagerSet.h
-index 70a65a4ba68f7725b90f52f4d7a9c55fd96bcfed..81dd1d49f98ecefcb2e63670aa08eac617e48bcf 100644
+index 4243f32573bdad1452107f55c82328961cd5b0d4..44dfe33090d7548d2a58d5d5a8fb3e97027f0796 100644
--- a/Source/WebKit/NetworkProcess/WebStorage/StorageManagerSet.h
+++ b/Source/WebKit/NetworkProcess/WebStorage/StorageManagerSet.h
-@@ -45,6 +45,7 @@ using ConnectToStorageAreaCallback = CompletionHandler<void(const Optional<Stora
+@@ -45,6 +45,7 @@ using ConnectToStorageAreaCallback = CompletionHandler<void(const std::optional<
using GetValuesCallback = CompletionHandler<void(const HashMap<String, String>&)>;
using GetOriginsCallback = CompletionHandler<void(HashSet<WebCore::SecurityOriginData>&&)>;
using GetOriginDetailsCallback = CompletionHandler<void(Vector<LocalStorageDatabaseTracker::OriginDetails>&&)>;
@@ -8881,7 +8868,7 @@ index 70a65a4ba68f7725b90f52f4d7a9c55fd96bcfed..81dd1d49f98ecefcb2e63670aa08eac6
void didReceiveMessage(IPC::Connection&, IPC::Decoder&);
diff --git a/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h b/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h
-index d91819fc14c3d65f993917a4a3e88bd36b09c6c1..dccc51729796babfcc3c6e81251404f61b3e40e1 100644
+index 869284c36e115a5e554f452dfba58dee72501364..ebb414bf256a3c8c13b4c8e6afbedfcb8c477ed0 100644
--- a/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h
+++ b/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h
@@ -84,6 +84,8 @@ public:
@@ -8891,10 +8878,10 @@ index d91819fc14c3d65f993917a4a3e88bd36b09c6c1..dccc51729796babfcc3c6e81251404f6
+ static void setCookieFromResponse(NetworkSessionCocoa& session, const NetworkLoadParameters&, const URL& mainDocumentURL, const String& setCookieValue);
+
private:
- NetworkDataTaskCocoa(NetworkSession&, NetworkDataTaskClient&, const WebCore::ResourceRequest&, WebCore::FrameIdentifier, WebCore::PageIdentifier, WebPageProxyIdentifier, WebCore::StoredCredentialsPolicy, WebCore::ContentSniffingPolicy, WebCore::ContentEncodingSniffingPolicy, bool shouldClearReferrerOnHTTPSToHTTPRedirect, PreconnectOnly, bool dataTaskIsForMainFrameNavigation, bool dataTaskIsForMainResourceNavigationForAnyFrame, Optional<NetworkActivityTracker>, Optional<NavigatingToAppBoundDomain> isNavigatingToAppBoundDomain, WebCore::ShouldRelaxThirdPartyCookieBlocking, Optional<WebCore::PrivateClickMeasurement::PcmDataCarried>);
+ NetworkDataTaskCocoa(NetworkSession&, NetworkDataTaskClient&, const WebCore::ResourceRequest&, WebCore::FrameIdentifier, WebCore::PageIdentifier, WebPageProxyIdentifier, WebCore::StoredCredentialsPolicy, WebCore::ContentSniffingPolicy, WebCore::ContentEncodingSniffingPolicy, bool shouldClearReferrerOnHTTPSToHTTPRedirect, PreconnectOnly, bool dataTaskIsForMainFrameNavigation, bool dataTaskIsForMainResourceNavigationForAnyFrame, std::optional<NetworkActivityTracker>, std::optional<NavigatingToAppBoundDomain> isNavigatingToAppBoundDomain, WebCore::ShouldRelaxThirdPartyCookieBlocking, std::optional<WebCore::PrivateClickMeasurement::PcmDataCarried>);
diff --git a/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm b/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm
-index 6aeeaa1f0d1c44b40cf406a6819c47e95aabf9dc..90b101da54e4da0ba26b6b9dc594e5244f716a72 100644
+index 1bf41e555f06701dce772a417dc86f1e3d85463f..ad79c5499adf49565bc31cd8de056b1d76052aa3 100644
--- a/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm
+++ b/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm
@@ -41,6 +41,7 @@
@@ -8905,7 +8892,7 @@ index 6aeeaa1f0d1c44b40cf406a6819c47e95aabf9dc..90b101da54e4da0ba26b6b9dc594e524
#import <wtf/BlockPtr.h>
#import <wtf/FileSystem.h>
#import <wtf/MainThread.h>
-@@ -714,4 +715,59 @@ void NetworkDataTaskCocoa::setPriority(WebCore::ResourceLoadPriority priority)
+@@ -718,4 +719,59 @@ void NetworkDataTaskCocoa::setPriority(WebCore::ResourceLoadPriority priority)
m_task.get().priority = toNSURLSessionTaskPriority(priority);
}
@@ -8966,7 +8953,7 @@ index 6aeeaa1f0d1c44b40cf406a6819c47e95aabf9dc..90b101da54e4da0ba26b6b9dc594e524
+
}
diff --git a/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm b/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
-index 72615ac9cfc67d588f871e37a54349598bc374b0..4711611687234608d39f6c20a79d809ebad32ec2 100644
+index 06cebafbedfc75a7c82cb821139c4789e1f56392..ad5924870e46069e31bd1efdbe87faeb9b9f4f46 100644
--- a/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
+++ b/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
@@ -661,7 +661,7 @@ static inline void processServerTrustEvaluation(NetworkSessionCocoa& session, Se
@@ -8980,7 +8967,7 @@ index 72615ac9cfc67d588f871e37a54349598bc374b0..4711611687234608d39f6c20a79d809e
#if HAVE(TLS_PROTOCOL_VERSION_T)
@@ -911,6 +911,13 @@ static inline void processServerTrustEvaluation(NetworkSessionCocoa& session, Se
- resourceResponse.setDeprecatedNetworkLoadMetrics(WebCore::copyTimingData(metrics));
+ resourceResponse.setDeprecatedNetworkLoadMetrics(WebCore::copyTimingData(taskMetrics, networkDataTask->networkLoadMetrics().hasCrossOriginRedirect));
+ __block WebCore::HTTPHeaderMap requestHeaders;
+ NSURLSessionTaskTransactionMetrics *m = dataTask._incompleteTaskMetrics.transactionMetrics.lastObject;
@@ -8993,7 +8980,7 @@ index 72615ac9cfc67d588f871e37a54349598bc374b0..4711611687234608d39f6c20a79d809e
#if !LOG_DISABLED
LOG(NetworkSession, "%llu didReceiveResponse completionHandler (%d)", taskIdentifier, policyAction);
diff --git a/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp b/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp
-index e9fdf357d64f8916b35e5e00469b997580db3abd..7f44429cde3a8d2e44b47d3f65549b76a24ed38a 100644
+index e9f9b2c257866d9300e79781cbef3addc59cd9de..c45d2f047614da8a5e360b88960fbd2afb16072f 100644
--- a/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp
+++ b/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp
@@ -26,9 +26,13 @@
@@ -9018,16 +9005,16 @@ index e9fdf357d64f8916b35e5e00469b997580db3abd..7f44429cde3a8d2e44b47d3f65549b76
namespace WebKit {
-@@ -79,6 +84,8 @@ NetworkDataTaskCurl::NetworkDataTaskCurl(NetworkSession& session, NetworkDataTas
+@@ -77,6 +82,8 @@ NetworkDataTaskCurl::NetworkDataTaskCurl(NetworkSession& session, NetworkDataTas
m_curlRequest->setUserPass(m_initialCredential.user(), m_initialCredential.password());
m_curlRequest->setAuthenticationScheme(ProtectionSpaceAuthenticationSchemeHTTPBasic);
}
+ if (m_session->ignoreCertificateErrors())
+ m_curlRequest->disableServerTrustEvaluation();
- m_curlRequest->setStartTime(m_startTime);
m_curlRequest->start();
}
-@@ -109,6 +116,9 @@ void NetworkDataTaskCurl::cancel()
+
+@@ -106,6 +113,9 @@ void NetworkDataTaskCurl::cancel()
if (m_curlRequest)
m_curlRequest->cancel();
@@ -9037,7 +9024,7 @@ index e9fdf357d64f8916b35e5e00469b997580db3abd..7f44429cde3a8d2e44b47d3f65549b76
}
void NetworkDataTaskCurl::invalidateAndCancel()
-@@ -153,6 +163,7 @@ void NetworkDataTaskCurl::curlDidReceiveResponse(CurlRequest& request, CurlRespo
+@@ -150,6 +160,7 @@ void NetworkDataTaskCurl::curlDidReceiveResponse(CurlRequest& request, CurlRespo
m_response = ResourceResponse(receivedResponse);
m_response.setCertificateInfo(WTFMove(receivedResponse.certificateInfo));
m_response.setDeprecatedNetworkLoadMetrics(Box<NetworkLoadMetrics>::create(WTFMove(receivedResponse.networkLoadMetrics)));
@@ -9045,7 +9032,7 @@ index e9fdf357d64f8916b35e5e00469b997580db3abd..7f44429cde3a8d2e44b47d3f65549b76
handleCookieHeaders(request.resourceRequest(), receivedResponse);
-@@ -180,7 +191,10 @@ void NetworkDataTaskCurl::curlDidReceiveBuffer(CurlRequest&, Ref<SharedBuffer>&&
+@@ -177,7 +188,10 @@ void NetworkDataTaskCurl::curlDidReceiveBuffer(CurlRequest&, Ref<SharedBuffer>&&
auto protectedThis = makeRef(*this);
if (state() == State::Canceling || state() == State::Completed || (!m_client && !isDownload()))
return;
@@ -9057,7 +9044,7 @@ index e9fdf357d64f8916b35e5e00469b997580db3abd..7f44429cde3a8d2e44b47d3f65549b76
m_client->didReceiveData(WTFMove(buffer));
}
-@@ -189,9 +203,26 @@ void NetworkDataTaskCurl::curlDidComplete(CurlRequest&, NetworkLoadMetrics&& net
+@@ -186,9 +200,26 @@ void NetworkDataTaskCurl::curlDidComplete(CurlRequest&, NetworkLoadMetrics&& net
if (state() == State::Canceling || state() == State::Completed || (!m_client && !isDownload()))
return;
@@ -9084,7 +9071,7 @@ index e9fdf357d64f8916b35e5e00469b997580db3abd..7f44429cde3a8d2e44b47d3f65549b76
void NetworkDataTaskCurl::curlDidFailWithError(CurlRequest& request, ResourceError&& resourceError, CertificateInfo&& certificateInfo)
{
if (state() == State::Canceling || state() == State::Completed || (!m_client && !isDownload()))
-@@ -202,6 +233,14 @@ void NetworkDataTaskCurl::curlDidFailWithError(CurlRequest& request, ResourceErr
+@@ -199,6 +230,14 @@ void NetworkDataTaskCurl::curlDidFailWithError(CurlRequest& request, ResourceErr
return;
}
@@ -9099,7 +9086,7 @@ index e9fdf357d64f8916b35e5e00469b997580db3abd..7f44429cde3a8d2e44b47d3f65549b76
m_client->didCompleteWithError(resourceError);
}
-@@ -239,6 +278,19 @@ void NetworkDataTaskCurl::invokeDidReceiveResponse()
+@@ -236,6 +275,19 @@ void NetworkDataTaskCurl::invokeDidReceiveResponse()
case PolicyAction::Ignore:
invalidateAndCancel();
break;
@@ -9119,17 +9106,17 @@ index e9fdf357d64f8916b35e5e00469b997580db3abd..7f44429cde3a8d2e44b47d3f65549b76
default:
notImplemented();
break;
-@@ -321,6 +373,8 @@ void NetworkDataTaskCurl::willPerformHTTPRedirection()
+@@ -315,6 +367,8 @@ void NetworkDataTaskCurl::willPerformHTTPRedirection()
m_curlRequest->setUserPass(m_initialCredential.user(), m_initialCredential.password());
m_curlRequest->setAuthenticationScheme(ProtectionSpaceAuthenticationSchemeHTTPBasic);
}
+ if (m_session->ignoreCertificateErrors())
+ m_curlRequest->disableServerTrustEvaluation();
- m_curlRequest->setStartTime(m_startTime);
m_curlRequest->start();
+ if (m_state != State::Suspended) {
diff --git a/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.h b/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.h
-index 46c215a99a9bb31546e8880ce6f0876193c075fe..82c3afd36a91962c540e69d176c086b98e80ddc1 100644
+index 1c427ddb78d6953fe8960c5692afde4f4f0eee85..cf33ff6076dd95ffe564f1dde89c177acd27b02c 100644
--- a/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.h
+++ b/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.h
@@ -32,6 +32,7 @@
@@ -9156,7 +9143,7 @@ index 46c215a99a9bb31546e8880ce6f0876193c075fe..82c3afd36a91962c540e69d176c086b9
State m_state { State::Suspended };
-@@ -104,6 +105,8 @@ private:
+@@ -103,6 +104,8 @@ private:
WebCore::FrameIdentifier m_frameID;
WebCore::PageIdentifier m_pageID;
@@ -9166,10 +9153,10 @@ index 46c215a99a9bb31546e8880ce6f0876193c075fe..82c3afd36a91962c540e69d176c086b9
WebCore::ShouldRelaxThirdPartyCookieBlocking m_shouldRelaxThirdPartyCookieBlocking { WebCore::ShouldRelaxThirdPartyCookieBlocking::No };
diff --git a/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp b/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp
-index 2282cb558e2419b8c1e3a7c4e3058b63f5fac592..ba0f19fecee0ac71a04b7f0658d1675c574ac8f3 100644
+index 457807605d781be334897357849f00f4c0f5ab5a..2775faada0730308ce2ef95d67a56fc143c2a80b 100644
--- a/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp
+++ b/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp
-@@ -449,6 +449,7 @@ void NetworkDataTaskSoup::didSendRequest(GRefPtr<GInputStream>&& inputStream)
+@@ -483,6 +483,7 @@ void NetworkDataTaskSoup::didSendRequest(GRefPtr<GInputStream>&& inputStream)
// FIXME: This cannot be eliminated until other code no longer relies on ResourceResponse's NetworkLoadMetrics.
m_response.setDeprecatedNetworkLoadMetrics(Box<NetworkLoadMetrics>::create(m_networkLoadMetrics));
@@ -9177,7 +9164,7 @@ index 2282cb558e2419b8c1e3a7c4e3058b63f5fac592..ba0f19fecee0ac71a04b7f0658d1675c
dispatchDidReceiveResponse();
}
-@@ -543,6 +544,8 @@ bool NetworkDataTaskSoup::acceptCertificate(GTlsCertificate* certificate, GTlsCe
+@@ -577,6 +578,8 @@ bool NetworkDataTaskSoup::acceptCertificate(GTlsCertificate* certificate, GTlsCe
{
ASSERT(m_soupMessage);
URL url = soupURIToURL(soup_message_get_uri(m_soupMessage.get()));
@@ -9424,7 +9411,7 @@ index caf67e1dece5b727e43eba780e70814f8fdb0f63..740150d2589d6e16a516daa3bf6ef899
#include <WebKit/WKContextConfigurationRef.h>
#include <WebKit/WKCredential.h>
diff --git a/Source/WebKit/Shared/NativeWebKeyboardEvent.h b/Source/WebKit/Shared/NativeWebKeyboardEvent.h
-index fd2b55f40fdd3d82d6d6947dc33ad31f24f4c1c7..bb1487b1efcbab2fd7ccf79a50eae99ecf4b4cab 100644
+index ee8cac1c980039c4a36de5501ab7f135e710d06b..deae2be9e720ff76186ecea89920dfc39c4f186a 100644
--- a/Source/WebKit/Shared/NativeWebKeyboardEvent.h
+++ b/Source/WebKit/Shared/NativeWebKeyboardEvent.h
@@ -33,6 +33,7 @@
@@ -9446,7 +9433,7 @@ index fd2b55f40fdd3d82d6d6947dc33ad31f24f4c1c7..bb1487b1efcbab2fd7ccf79a50eae99e
#elif PLATFORM(GTK)
NativeWebKeyboardEvent(const NativeWebKeyboardEvent&);
NativeWebKeyboardEvent(GdkEvent*, const String&, Vector<String>&& commands);
- NativeWebKeyboardEvent(const String&, Optional<Vector<WebCore::CompositionUnderline>>&&, Optional<EditingRange>&&);
+ NativeWebKeyboardEvent(const String&, std::optional<Vector<WebCore::CompositionUnderline>>&&, std::optional<EditingRange>&&);
NativeWebKeyboardEvent(Type, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, Vector<String>&& commands, bool isKeypad, OptionSet<Modifier>);
+ NativeWebKeyboardEvent(Type type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<Modifier> modifiers, WallTime timestamp, Vector<String>&& commands)
+ : WebKeyboardEvent(type, text, unmodifiedText, key, code, keyIdentifier, windowsVirtualKeyCode, nativeVirtualKeyCode, isAutoRepeat, isKeypad, isSystemKey, modifiers, timestamp, WTFMove(commands))
@@ -9457,7 +9444,7 @@ index fd2b55f40fdd3d82d6d6947dc33ad31f24f4c1c7..bb1487b1efcbab2fd7ccf79a50eae99e
NativeWebKeyboardEvent(::WebEvent *, HandledByInputMethod);
#elif USE(LIBWPE)
enum class HandledByInputMethod : bool { No, Yes };
- NativeWebKeyboardEvent(struct wpe_input_keyboard_event*, const String&, HandledByInputMethod, Optional<Vector<WebCore::CompositionUnderline>>&&, Optional<EditingRange>&&);
+ NativeWebKeyboardEvent(struct wpe_input_keyboard_event*, const String&, HandledByInputMethod, std::optional<Vector<WebCore::CompositionUnderline>>&&, std::optional<EditingRange>&&);
+ NativeWebKeyboardEvent(Type type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<Modifier> modifiers, WallTime timestamp)
+ : WebKeyboardEvent(type, text, unmodifiedText, key, code, keyIdentifier, windowsVirtualKeyCode, nativeVirtualKeyCode, isAutoRepeat, isKeypad, isSystemKey, modifiers, timestamp)
+ {
@@ -9472,7 +9459,7 @@ index fd2b55f40fdd3d82d6d6947dc33ad31f24f4c1c7..bb1487b1efcbab2fd7ccf79a50eae99e
#if USE(APPKIT)
diff --git a/Source/WebKit/Shared/NativeWebMouseEvent.h b/Source/WebKit/Shared/NativeWebMouseEvent.h
-index 9b8dd42b2e3cc2e6f6c24b2104c682cb8f98ea73..730cb3f64418d2909c78d0074ee81d40440bff96 100644
+index 001558dd58f4d85f360d5711caa03db33889011e..1e0898f985f1d13036d31e3e284258a3c64fa0a4 100644
--- a/Source/WebKit/Shared/NativeWebMouseEvent.h
+++ b/Source/WebKit/Shared/NativeWebMouseEvent.h
@@ -77,6 +77,11 @@ public:
@@ -9488,7 +9475,7 @@ index 9b8dd42b2e3cc2e6f6c24b2104c682cb8f98ea73..730cb3f64418d2909c78d0074ee81d40
NSEvent* nativeEvent() const { return m_nativeEvent.get(); }
#elif PLATFORM(GTK)
diff --git a/Source/WebKit/Shared/WebCoreArgumentCoders.cpp b/Source/WebKit/Shared/WebCoreArgumentCoders.cpp
-index 35c2cd33df3d3731620374681a131ae52e099e1b..f7b7192323b34d2228b4ff33e76e3d98e203cce5 100644
+index f0c8eef53d3597e0ea8a11db101ea94601419e17..3c7888732f3bbc59fb47e8c8575260a99a8a8c3c 100644
--- a/Source/WebKit/Shared/WebCoreArgumentCoders.cpp
+++ b/Source/WebKit/Shared/WebCoreArgumentCoders.cpp
@@ -120,6 +120,10 @@
@@ -9592,7 +9579,7 @@ index 3ae6504779d3917a79f69f32b58260afeda270b4..72d44c33953cc13bf2ed7c762b4f9a7b
#include <wtf/text/WTFString.h>
diff --git a/Source/WebKit/Shared/WebKeyboardEvent.cpp b/Source/WebKit/Shared/WebKeyboardEvent.cpp
-index bc4322286484e6afdd49353fae6a8fb3cd5e66f2..7af88c4e93f6a0ea61dd107699c04c0695f7842f 100644
+index a70eb76c5c22a2c779c30874433ac19036b5f1a4..f97fa9dec785fd6327bb7847454e8a32b8a0d3ac 100644
--- a/Source/WebKit/Shared/WebKeyboardEvent.cpp
+++ b/Source/WebKit/Shared/WebKeyboardEvent.cpp
@@ -35,6 +35,7 @@ WebKeyboardEvent::WebKeyboardEvent()
@@ -9627,7 +9614,7 @@ index bc4322286484e6afdd49353fae6a8fb3cd5e66f2..7af88c4e93f6a0ea61dd107699c04c06
+
#elif PLATFORM(GTK)
- WebKeyboardEvent::WebKeyboardEvent(Type type, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool handledByInputMethod, Optional<Vector<WebCore::CompositionUnderline>>&& preeditUnderlines, Optional<EditingRange>&& preeditSelectionRange, Vector<String>&& commands, bool isKeypad, OptionSet<Modifier> modifiers, WallTime timestamp)
+ WebKeyboardEvent::WebKeyboardEvent(Type type, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool handledByInputMethod, std::optional<Vector<WebCore::CompositionUnderline>>&& preeditUnderlines, std::optional<EditingRange>&& preeditSelectionRange, Vector<String>&& commands, bool isKeypad, OptionSet<Modifier> modifiers, WallTime timestamp)
@@ -79,6 +98,24 @@ WebKeyboardEvent::WebKeyboardEvent(Type type, const String& text, const String&
ASSERT(isKeyboardEventType(type));
}
@@ -9682,7 +9669,7 @@ index bc4322286484e6afdd49353fae6a8fb3cd5e66f2..7af88c4e93f6a0ea61dd107699c04c06
{
}
diff --git a/Source/WebKit/Shared/WebKeyboardEvent.h b/Source/WebKit/Shared/WebKeyboardEvent.h
-index cb8029dc46dc2531f5cc23409dc6d2f11d5a3b49..a0e673b9680b0013d56920e525f358e333b06b0b 100644
+index 7a5893eb68ad24cf92c832070485489b7cfafa0c..a2d68a5eb59d8b7155c1e17b75a12e55f299b868 100644
--- a/Source/WebKit/Shared/WebKeyboardEvent.h
+++ b/Source/WebKit/Shared/WebKeyboardEvent.h
@@ -43,14 +43,18 @@ public:
@@ -9691,12 +9678,12 @@ index cb8029dc46dc2531f5cc23409dc6d2f11d5a3b49..a0e673b9680b0013d56920e525f358e3
WebKeyboardEvent(Type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, int macCharCode, bool handledByInputMethod, const Vector<WebCore::KeypressCommand>&, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<Modifier>, WallTime timestamp);
+ WebKeyboardEvent(Type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<Modifier>, WallTime timestamp, Vector<WebCore::KeypressCommand>&& commands);
#elif PLATFORM(GTK)
- WebKeyboardEvent(Type, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool handledByInputMethod, Optional<Vector<WebCore::CompositionUnderline>>&&, Optional<EditingRange>&&, Vector<String>&& commands, bool isKeypad, OptionSet<Modifier>, WallTime timestamp);
+ WebKeyboardEvent(Type, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool handledByInputMethod, std::optional<Vector<WebCore::CompositionUnderline>>&&, std::optional<EditingRange>&&, Vector<String>&& commands, bool isKeypad, OptionSet<Modifier>, WallTime timestamp);
+ WebKeyboardEvent(Type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<Modifier>, WallTime timestamp, Vector<String>&& commands);
#elif PLATFORM(IOS_FAMILY)
WebKeyboardEvent(Type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, int macCharCode, bool handledByInputMethod, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<Modifier>, WallTime timestamp);
#elif USE(LIBWPE)
- WebKeyboardEvent(Type, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool handledByInputMethod, Optional<Vector<WebCore::CompositionUnderline>>&&, Optional<EditingRange>&&, bool isKeypad, OptionSet<Modifier>, WallTime timestamp);
+ WebKeyboardEvent(Type, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool handledByInputMethod, std::optional<Vector<WebCore::CompositionUnderline>>&&, std::optional<EditingRange>&&, bool isKeypad, OptionSet<Modifier>, WallTime timestamp);
+ WebKeyboardEvent(Type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<Modifier>, WallTime timestamp);
#else
WebKeyboardEvent(Type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, int macCharCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<Modifier>, WallTime timestamp);
@@ -9705,7 +9692,7 @@ index cb8029dc46dc2531f5cc23409dc6d2f11d5a3b49..a0e673b9680b0013d56920e525f358e3
const String& text() const { return m_text; }
diff --git a/Source/WebKit/Shared/WebPageCreationParameters.cpp b/Source/WebKit/Shared/WebPageCreationParameters.cpp
-index fb2a6fb914c7f96dcc937437a024839997b572b5..674b679d2f6a225eccb8f0b47349e2ac838909ef 100644
+index 9e7b7f2fbda107d1cd900248a5d9b6ac6ba729d6..e0952a57de56fd65b343d5cf6bd8e92730d0fd56 100644
--- a/Source/WebKit/Shared/WebPageCreationParameters.cpp
+++ b/Source/WebKit/Shared/WebPageCreationParameters.cpp
@@ -156,6 +156,8 @@ void WebPageCreationParameters::encode(IPC::Encoder& encoder) const
@@ -9717,20 +9704,20 @@ index fb2a6fb914c7f96dcc937437a024839997b572b5..674b679d2f6a225eccb8f0b47349e2ac
encoder << shouldCaptureAudioInUIProcess;
encoder << shouldCaptureAudioInGPUProcess;
encoder << shouldCaptureVideoInUIProcess;
-@@ -535,7 +537,10 @@ Optional<WebPageCreationParameters> WebPageCreationParameters::decode(IPC::Decod
+@@ -535,7 +537,10 @@ std::optional<WebPageCreationParameters> WebPageCreationParameters::decode(IPC::
if (!processDisplayName)
- return WTF::nullopt;
+ return std::nullopt;
parameters.processDisplayName = WTFMove(*processDisplayName);
-
+
+ if (!decoder.decode(parameters.shouldPauseInInspectorWhenShown))
-+ return WTF::nullopt;
++ return std::nullopt;
+
if (!decoder.decode(parameters.shouldCaptureAudioInUIProcess))
- return WTF::nullopt;
+ return std::nullopt;
diff --git a/Source/WebKit/Shared/WebPageCreationParameters.h b/Source/WebKit/Shared/WebPageCreationParameters.h
-index 13fa30ef166b08a52a39495a1cf67101064d30da..ca57bf05f0a4e098220567d3473318cdce26d564 100644
+index d5b13d2b0915b48ece9bf6de96e87ba59094efe5..df80ba50ff7e319ef00e2812c3a62c6d4add8f8d 100644
--- a/Source/WebKit/Shared/WebPageCreationParameters.h
+++ b/Source/WebKit/Shared/WebPageCreationParameters.h
@@ -246,6 +246,8 @@ struct WebPageCreationParameters {
@@ -9743,20 +9730,20 @@ index 13fa30ef166b08a52a39495a1cf67101064d30da..ca57bf05f0a4e098220567d3473318cd
String themeName;
#endif
diff --git a/Source/WebKit/Shared/gtk/NativeWebKeyboardEventGtk.cpp b/Source/WebKit/Shared/gtk/NativeWebKeyboardEventGtk.cpp
-index c76a9e1f7dae7a31c4048d8f00d849a18ebaff23..1cfd9c7acb69dea69783c42b3f427929509782a4 100644
+index c204637774ee803eac42a34cde79aa556f143b82..345f5b08179e3dd239725bed06e48b46bc718336 100644
--- a/Source/WebKit/Shared/gtk/NativeWebKeyboardEventGtk.cpp
+++ b/Source/WebKit/Shared/gtk/NativeWebKeyboardEventGtk.cpp
@@ -50,7 +50,7 @@ NativeWebKeyboardEvent::NativeWebKeyboardEvent(Type type, const String& text, co
}
NativeWebKeyboardEvent::NativeWebKeyboardEvent(const NativeWebKeyboardEvent& event)
-- : WebKeyboardEvent(event.type(), event.text(), event.key(), event.code(), event.keyIdentifier(), event.windowsVirtualKeyCode(), event.nativeVirtualKeyCode(), event.handledByInputMethod(), Optional<Vector<WebCore::CompositionUnderline>>(event.preeditUnderlines()), Optional<EditingRange>(event.preeditSelectionRange()), Vector<String>(event.commands()), event.isKeypad(), event.modifiers(), event.timestamp())
+- : WebKeyboardEvent(event.type(), event.text(), event.key(), event.code(), event.keyIdentifier(), event.windowsVirtualKeyCode(), event.nativeVirtualKeyCode(), event.handledByInputMethod(), std::optional<Vector<WebCore::CompositionUnderline>>(event.preeditUnderlines()), std::optional<EditingRange>(event.preeditSelectionRange()), Vector<String>(event.commands()), event.isKeypad(), event.modifiers(), event.timestamp())
+ : WebKeyboardEvent(event)
, m_nativeEvent(event.nativeEvent() ? gdk_event_copy(event.nativeEvent()) : nullptr)
{
}
diff --git a/Source/WebKit/Shared/gtk/NativeWebMouseEventGtk.cpp b/Source/WebKit/Shared/gtk/NativeWebMouseEventGtk.cpp
-index 46ef3b371f52c105451d917ff8fd384db518b39f..c64066b40d09c6b0605ad1895e3af1215288b3e4 100644
+index 7cc65739c320cb4312d9d705284220a383a0293a..da53885517d55d424423ee3d0dcead25825cc022 100644
--- a/Source/WebKit/Shared/gtk/NativeWebMouseEventGtk.cpp
+++ b/Source/WebKit/Shared/gtk/NativeWebMouseEventGtk.cpp
@@ -54,7 +54,7 @@ NativeWebMouseEvent::NativeWebMouseEvent(Type type, Button button, unsigned shor
@@ -9769,7 +9756,7 @@ index 46ef3b371f52c105451d917ff8fd384db518b39f..c64066b40d09c6b0605ad1895e3af121
{
}
diff --git a/Source/WebKit/Shared/ios/WebPlatformTouchPointIOS.cpp b/Source/WebKit/Shared/ios/WebPlatformTouchPointIOS.cpp
-index 2a9db4f8acafe9d64d5d4ebd9913aa161ea0f4c0..f151ef4e8e6abb5e3044771c235139d48e8aa7cf 100644
+index 03e118154f6bb5b704b4ecb83d3d9543f8c5a5fa..9725caaac6ee65a96ea324ddbb4e1a3785bbc028 100644
--- a/Source/WebKit/Shared/ios/WebPlatformTouchPointIOS.cpp
+++ b/Source/WebKit/Shared/ios/WebPlatformTouchPointIOS.cpp
@@ -26,7 +26,7 @@
@@ -9781,7 +9768,7 @@ index 2a9db4f8acafe9d64d5d4ebd9913aa161ea0f4c0..f151ef4e8e6abb5e3044771c235139d4
#include "WebCoreArgumentCoders.h"
-@@ -79,4 +79,4 @@ Optional<WebPlatformTouchPoint> WebPlatformTouchPoint::decode(IPC::Decoder& deco
+@@ -79,4 +79,4 @@ std::optional<WebPlatformTouchPoint> WebPlatformTouchPoint::decode(IPC::Decoder&
} // namespace WebKit
@@ -9808,7 +9795,7 @@ index e40a6e172bfd2b75076fd4053da643ebab9eb81f..2516655bbc9e5bc863537a554c5faac0
+#endif // ENABLE(TOUCH_EVENTS) && PLATFORM(IOS_FAMILY)
diff --git a/Source/WebKit/Shared/libwpe/ArgumentCodersWPE.cpp b/Source/WebKit/Shared/libwpe/ArgumentCodersWPE.cpp
new file mode 100644
-index 0000000000000000000000000000000000000000..0aa4440ac795d2068f0ec89e6cd62205dcd3e537
+index 0000000000000000000000000000000000000000..678010b33d70dae6369ace4337b4c0eb81152250
--- /dev/null
+++ b/Source/WebKit/Shared/libwpe/ArgumentCodersWPE.cpp
@@ -0,0 +1,173 @@
@@ -9912,73 +9899,73 @@ index 0000000000000000000000000000000000000000..0aa4440ac795d2068f0ec89e6cd62205
+ encoder << canSmartReplace;
+}
+
-+Optional<SelectionData> ArgumentCoder<SelectionData>::decode(Decoder& decoder)
++std::optional<SelectionData> ArgumentCoder<SelectionData>::decode(Decoder& decoder)
+{
+ SelectionData selection;
+
+ bool hasText;
+ if (!decoder.decode(hasText))
-+ return WTF::nullopt;
++ return std::nullopt;
+ if (hasText) {
+ String text;
+ if (!decoder.decode(text))
-+ return WTF::nullopt;
++ return std::nullopt;
+ selection.setText(text);
+ }
+
+ bool hasMarkup;
+ if (!decoder.decode(hasMarkup))
-+ return WTF::nullopt;
++ return std::nullopt;
+ if (hasMarkup) {
+ String markup;
+ if (!decoder.decode(markup))
-+ return WTF::nullopt;
++ return std::nullopt;
+ selection.setMarkup(markup);
+ }
+
+ bool hasURL;
+ if (!decoder.decode(hasURL))
-+ return WTF::nullopt;
++ return std::nullopt;
+ if (hasURL) {
+ String url;
+ if (!decoder.decode(url))
-+ return WTF::nullopt;
++ return std::nullopt;
+ selection.setURL(URL(URL(), url), String());
+ }
+
+ bool hasURIList;
+ if (!decoder.decode(hasURIList))
-+ return WTF::nullopt;
++ return std::nullopt;
+ if (hasURIList) {
+ String uriList;
+ if (!decoder.decode(uriList))
-+ return WTF::nullopt;
++ return std::nullopt;
+ selection.setURIList(uriList);
+ }
+
+ bool hasImage;
+ if (!decoder.decode(hasImage))
-+ return WTF::nullopt;
++ return std::nullopt;
+ if (hasImage) {
+ RefPtr<Image> image;
+ if (!decodeImage(decoder, image))
-+ return WTF::nullopt;
++ return std::nullopt;
+ selection.setImage(image.get());
+ }
+
+ bool hasCustomData;
+ if (!decoder.decode(hasCustomData))
-+ return WTF::nullopt;
++ return std::nullopt;
+ if (hasCustomData) {
+ RefPtr<SharedBuffer> buffer;
+ if (!decoder.decode(buffer))
-+ return WTF::nullopt;
++ return std::nullopt;
+ selection.setCustomData(Ref<SharedBuffer>(*buffer));
+ }
+
+ bool canSmartReplace;
+ if (!decoder.decode(canSmartReplace))
-+ return WTF::nullopt;
++ return std::nullopt;
+ selection.setCanSmartReplace(canSmartReplace);
+
+ return selection;
@@ -9987,7 +9974,7 @@ index 0000000000000000000000000000000000000000..0aa4440ac795d2068f0ec89e6cd62205
+}
diff --git a/Source/WebKit/Shared/libwpe/ArgumentCodersWPE.h b/Source/WebKit/Shared/libwpe/ArgumentCodersWPE.h
new file mode 100644
-index 0000000000000000000000000000000000000000..c5099cd4b6be31769e6344677625b0a1f7ee42a5
+index 0000000000000000000000000000000000000000..789a0d7cf69704c8f665a9ed79348fbcbc1301c4
--- /dev/null
+++ b/Source/WebKit/Shared/libwpe/ArgumentCodersWPE.h
@@ -0,0 +1,41 @@
@@ -10028,7 +10015,7 @@ index 0000000000000000000000000000000000000000..c5099cd4b6be31769e6344677625b0a1
+
+template<> struct ArgumentCoder<WebCore::SelectionData> {
+ static void encode(Encoder&, const WebCore::SelectionData&);
-+ static Optional<WebCore::SelectionData> decode(Decoder&);
++ static std::optional<WebCore::SelectionData> decode(Decoder&);
+};
+
+} // namespace IPC
@@ -10094,7 +10081,7 @@ index 02225453c31a5ba91858fe705c65e954c14d7066..ee195869db2496a536871fa80a6a1208
UIProcess/Media/AudioSessionRoutingArbitratorProxy.cpp
UIProcess/Media/MediaUsageManager.cpp
diff --git a/Source/WebKit/SourcesCocoa.txt b/Source/WebKit/SourcesCocoa.txt
-index b26599ba8e7064654b48b4588860f998873a1cb0..13bd7e9c2a49f2c37a9fa59abaf2b881f533baa6 100644
+index b148013c90465f932fc6ad94b1e7af94941238c9..921ac50b71e6baeb3a08f62bac0d4d63e398537c 100644
--- a/Source/WebKit/SourcesCocoa.txt
+++ b/Source/WebKit/SourcesCocoa.txt
@@ -265,6 +265,7 @@ UIProcess/API/Cocoa/_WKApplicationManifest.mm
@@ -10213,7 +10200,7 @@ index d16ed7753fa59fc87ea9402f5ff4872525ed32f6..60a3d2f1e9cbb415ce8196b6a780fb44
copy->m_shouldTakeUIBackgroundAssertion = this->m_shouldTakeUIBackgroundAssertion;
copy->m_shouldCaptureDisplayInUIProcess = this->m_shouldCaptureDisplayInUIProcess;
diff --git a/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h b/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h
-index 1f5079c85fdb954cd6a6c7c9cf7019b4d2c16f79..aae828602c4a20024c7267e48ed1cdbc20b98106 100644
+index 9fb2d63f614e1ed79da3fba1826e89fc5bd737b4..0dbfc99449f353cf803d7517dcce867fe3adf646 100644
--- a/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h
+++ b/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h
@@ -101,6 +101,11 @@ public:
@@ -10294,7 +10281,7 @@ index 026121d114c5fcad84c1396be8d692625beaa3bd..edd6e5cae033124c589959a42522fde0
}
#endif
diff --git a/Source/WebKit/UIProcess/API/C/WKPage.cpp b/Source/WebKit/UIProcess/API/C/WKPage.cpp
-index d482d3c34d8f4a1c8db651d9770625c32d507ec2..93e766ab756bc297d5480000647b31368b0d0c99 100644
+index b7bd0985481cea81f3e9c46f8fd58b2b6c3e71dc..e67213f737b9734a9b3943f17d3becd358a43dab 100644
--- a/Source/WebKit/UIProcess/API/C/WKPage.cpp
+++ b/Source/WebKit/UIProcess/API/C/WKPage.cpp
@@ -1778,6 +1778,13 @@ void WKPageSetPageUIClient(WKPageRef pageRef, const WKPageUIClientBase* wkClient
@@ -10407,7 +10394,7 @@ index afa925f36c29db9c23921298dead9cce737500d6..42d396342acdb6d39830f611df0ee40e
NS_ASSUME_NONNULL_END
diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm b/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
-index feea6e295fe8db162cd87be417eb2a115dadaada..95686cfcc6fefed0808988f28f2ff167e2a03102 100644
+index 6147d4034219ac32a9c8f86cbfd587fcaf918d93..2097e6ac73909e8576855877d6debb387fb690c1 100644
--- a/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
+++ b/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
@@ -42,6 +42,7 @@
@@ -10582,7 +10569,7 @@ index ca94c2173757a54a0c755cbf30f8e05a0b75c9cb..422c1379da9b091ae5903a42bc7625be
#import <wtf/RetainPtr.h>
diff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtension.mm b/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtension.mm
-index d74204597c79f50b6a3ecadefbb9cfc50073e60c..c55b1630b1e7812417ddc5d822c8f33e8ff238c4 100644
+index 46561d34314a79d42c57e59bf7927ad1fa451045..c84cbe9adc5236ad64240a18f5ff9a7215ba2ba2 100644
--- a/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtension.mm
+++ b/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtension.mm
@@ -24,7 +24,10 @@
@@ -10654,7 +10641,7 @@ index 4974e14214e2bb3e982325b885bab33e54f83998..cacdf8c71fab248d38d2faf03f7affdc
typedef NS_ENUM(NSInteger, _WKUserStyleLevel) {
_WKUserStyleUserLevel,
diff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKUserStyleSheet.mm b/Source/WebKit/UIProcess/API/Cocoa/_WKUserStyleSheet.mm
-index 8fb51da4c64e535e348b2ea2c4590e88449bdccc..7b21e221393210c4f5964eae0310c0757c2f8d10 100644
+index 1e827013c603ae8bd43d798170deb98fc3153852..2075bc78069bde530ec237c0b761773c10013948 100644
--- a/Source/WebKit/UIProcess/API/Cocoa/_WKUserStyleSheet.mm
+++ b/Source/WebKit/UIProcess/API/Cocoa/_WKUserStyleSheet.mm
@@ -35,6 +35,7 @@
@@ -11007,7 +10994,7 @@ index 78d1578f94793e9e59a3d4d2b33e79ea8530fa04..493cdadac3873508b3efa3048638e73a
#endif
+int webkitWebContextExistingCount();
diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp b/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
-index 76ee6d279b7a72655696b1f81048a5aa91497df2..82b1ba8545a700394370c48974897d1c909c7f72 100644
+index d46e0338f6335fa4e581ae3fe832c445eb00bd18..50deaa16224f20c32418f5ea05eaccc8ae16ea0c 100644
--- a/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
@@ -32,6 +32,7 @@
@@ -11085,7 +11072,7 @@ index 76ee6d279b7a72655696b1f81048a5aa91497df2..82b1ba8545a700394370c48974897d1c
{
if (!webView->priv->currentScriptDialog)
diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebViewPrivate.h b/Source/WebKit/UIProcess/API/glib/WebKitWebViewPrivate.h
-index 3f137538baa1a34337792a5ac08ba0ec8e5e0b07..08cc6135efd6f4538f0ee36901c6cd7ad708b081 100644
+index 0d98a9ed60616c7a893736b795adf90f2b7b33e0..ccd5124baeb5188b202818a23da1740c9bb989b2 100644
--- a/Source/WebKit/UIProcess/API/glib/WebKitWebViewPrivate.h
+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebViewPrivate.h
@@ -60,6 +60,7 @@ void webkitWebViewRunJavaScriptAlert(WebKitWebView*, const CString& message, Fun
@@ -11097,10 +11084,10 @@ index 3f137538baa1a34337792a5ac08ba0ec8e5e0b07..08cc6135efd6f4538f0ee36901c6cd7a
bool webkitWebViewIsScriptDialogRunning(WebKitWebView*, WebKitScriptDialog*);
String webkitWebViewGetCurrentScriptDialogMessage(WebKitWebView*);
diff --git a/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp b/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp
-index 2fbcb32740dfd728ce39abc7c33905ce19f4e933..d563163d7d1bcc0650b3675fc4d3cfff62354d9e 100644
+index 2bf03eec17b9d2add76b180b6a2bc41d8fba9602..9ca44d65460528b9b8e6f3b91aff8f91e81a29dc 100644
--- a/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp
+++ b/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp
-@@ -245,6 +245,8 @@ void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent& event, bool
+@@ -244,6 +244,8 @@ void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent& event, bool
{
if (wasEventHandled || event.type() != WebEvent::Type::KeyDown || !event.nativeEvent())
return;
@@ -11197,10 +11184,10 @@ index 0000000000000000000000000000000000000000..9f1a0173a5641d6f158d815b8f7b9ea6
+
+#endif
diff --git a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp
-index e78285494c829c05b86049c59e5d4eff3fdc9df9..7cb1d953565ae443172f7946a304f7843130f2fc 100644
+index bf4a2138ad5149722d89f436f53b393b30887c5a..045440b4dc7cbab2baf9759a8ff656fed3bc93a7 100644
--- a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp
+++ b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp
-@@ -2412,6 +2412,11 @@ void webkitWebViewBaseResetClickCounter(WebKitWebViewBase* webkitWebViewBase)
+@@ -2460,6 +2460,11 @@ void webkitWebViewBaseResetClickCounter(WebKitWebViewBase* webkitWebViewBase)
#endif
}
@@ -11213,7 +11200,7 @@ index e78285494c829c05b86049c59e5d4eff3fdc9df9..7cb1d953565ae443172f7946a304f784
{
ASSERT(webkitWebViewBase->priv->acceleratedBackingStore);
diff --git a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBasePrivate.h b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBasePrivate.h
-index 1150db65e00ecf6fb24f6213a0fbb6526e059e98..9474600127c1210e407a164ea2f8708f5bcda20f 100644
+index d28f9c69cabe96554daddfec77e6f007aa0987da..ece01f3d3e2f6aaca191975048320b6a91b946ea 100644
--- a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBasePrivate.h
+++ b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBasePrivate.h
@@ -27,6 +27,7 @@
@@ -11243,7 +11230,7 @@ index ecbe433ed888353b1e6013943b4463835c3582d2..7385877fe664515814fc5c3380a2b729
#include <webkit2/WebKitContextMenu.h>
#include <webkit2/WebKitContextMenuActions.h>
diff --git a/Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp b/Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp
-index eb3be657de82181296a6afc55072548d6b2ea33e..98f5579cde832ed0946d124f1c052ec5cbe8666b 100644
+index 7dfe3ef401aa20d63377152c879fbd44d83d17fe..1d27a04639e1448c547b793f2b9de8e63d10e19c 100644
--- a/Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp
+++ b/Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp
@@ -194,7 +194,7 @@ WebCore::IntPoint PageClientImpl::accessibilityScreenToRootView(const WebCore::I
@@ -11612,7 +11599,7 @@ index 7871ed4738b5cfc7e64757ff642cfbe51303a4eb..04b55aa995316d4d8cd467cf62d1a19f
bool webViewRunBeforeUnloadConfirmPanelWithMessageInitiatedByFrameCompletionHandler : 1;
bool webViewRequestGeolocationPermissionForFrameDecisionHandler : 1;
diff --git a/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm b/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
-index d57ccaa7596ad7c6e54bdaa6ea499d534479f86e..921adab8ee6e12f2bc065f27b43d8132c278d2ce 100644
+index ecf7213858b8d7b3eb2a54f3b3a8c12eed4bdd85..7d0fd38d5e29a97945ff248be054036193b1ff51 100644
--- a/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
+++ b/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
@@ -104,6 +104,7 @@ void UIDelegate::setDelegate(id <WKUIDelegate> delegate)
@@ -11640,7 +11627,7 @@ index d57ccaa7596ad7c6e54bdaa6ea499d534479f86e..921adab8ee6e12f2bc065f27b43d8132
{
if (!m_uiDelegate)
diff --git a/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm b/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
-index 2d103f0ed0a7d26141ec2f33b2bf6650bc8c5e2f..2a0f9f887bdc2a173bef2f42161479d83427f255 100644
+index 7f5390365030fbf2b45d21066fe98c8aa38a9fe7..dff5f731e75335b47f114cb4513065126804d222 100644
--- a/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
+++ b/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
@@ -34,6 +34,7 @@
@@ -11651,7 +11638,7 @@ index 2d103f0ed0a7d26141ec2f33b2bf6650bc8c5e2f..2a0f9f887bdc2a173bef2f42161479d8
#import "QuickLookThumbnailLoader.h"
#import "SafeBrowsingSPI.h"
#import "SafeBrowsingWarning.h"
-@@ -219,9 +220,66 @@ bool WebPageProxy::scrollingUpdatesDisabledForTesting()
+@@ -226,9 +227,66 @@ bool WebPageProxy::scrollingUpdatesDisabledForTesting()
void WebPageProxy::startDrag(const DragItem& dragItem, const ShareableBitmap::Handle& dragImageHandle)
{
@@ -11693,7 +11680,7 @@ index 2d103f0ed0a7d26141ec2f33b2bf6650bc8c5e2f..2a0f9f887bdc2a173bef2f42161479d8
+void WebPageProxy::releaseInspectorDragPasteboard() {
+ if (!!m_dragSelectionData)
-+ m_dragSelectionData = WTF::nullopt;
++ m_dragSelectionData = std::nullopt;
+ if (!m_overrideDragPasteboardName.isEmpty()) {
+ NSPasteboard *pasteboard = [NSPasteboard pasteboardWithUniqueName];
+ [pasteboard releaseGlobally];
@@ -11719,7 +11706,7 @@ index 2d103f0ed0a7d26141ec2f33b2bf6650bc8c5e2f..2a0f9f887bdc2a173bef2f42161479d8
#if PLATFORM(IOS_FAMILY)
diff --git a/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm b/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
-index 09ce4c7f50ba067979a233c16b7d01c07cf84d79..2b602e7bf261314abddd40a1a71f4e14fdeb01bd 100644
+index 6cd0c0136e1f8d9bb24679af22551aa7d66e930b..71058bba5e0e1b24605d89289da3119b7a6c0e5c 100644
--- a/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
+++ b/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
@@ -373,7 +373,7 @@ void WebProcessPool::platformInitializeWebProcess(const WebProcessProxy& process
@@ -11743,10 +11730,10 @@ index 09ce4c7f50ba067979a233c16b7d01c07cf84d79..2b602e7bf261314abddd40a1a71f4e14
m_activationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSApplicationDidBecomeActiveNotification object:NSApp queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *notification) {
diff --git a/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h b/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h
-index bd8d82c4157311464f4ec55d0e149dfe89870ba1..81117d5d6551ed5db3a2c59226a52ba4e37ffcae 100644
+index 7eb7b23f4442556db85fd05773e246da8b99ba8d..a10191e13f2f172e60798a3d7447076bb4fc85f3 100644
--- a/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h
+++ b/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h
-@@ -515,6 +515,9 @@ public:
+@@ -518,6 +518,9 @@ public:
void provideDataForPasteboard(NSPasteboard *, NSString *type);
NSArray *namesOfPromisedFilesDroppedAtDestination(NSURL *dropDestination);
@@ -11757,10 +11744,10 @@ index bd8d82c4157311464f4ec55d0e149dfe89870ba1..81117d5d6551ed5db3a2c59226a52ba4
void saveBackForwardSnapshotForCurrentItem();
void saveBackForwardSnapshotForItem(WebBackForwardListItem&);
diff --git a/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm b/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm
-index 88882157c0b176c65a16f68a589d70bdcaf4da12..717871eb8f1c0890927ac7dbcc85c85f9e09d196 100644
+index 5f5076affa21c72b46e66668ded1aa15e74d7fc8..ec351fa3fb5bf7831c77f2c5ccffc9a5bff981f1 100644
--- a/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm
+++ b/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm
-@@ -2519,6 +2519,11 @@ WebCore::DestinationColorSpace WebViewImpl::colorSpace()
+@@ -2525,6 +2525,11 @@ WebCore::DestinationColorSpace WebViewImpl::colorSpace()
if (!m_colorSpace)
m_colorSpace = [NSColorSpace sRGBColorSpace];
}
@@ -11772,7 +11759,7 @@ index 88882157c0b176c65a16f68a589d70bdcaf4da12..717871eb8f1c0890927ac7dbcc85c85f
ASSERT(m_colorSpace);
return WebCore::DestinationColorSpace { [m_colorSpace CGColorSpace] };
-@@ -4597,6 +4602,18 @@ static RetainPtr<CGImageRef> takeWindowSnapshot(CGSWindowID windowID, bool captu
+@@ -4603,6 +4608,18 @@ static RetainPtr<CGImageRef> takeWindowSnapshot(CGSWindowID windowID, bool captu
return adoptCF(CGWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, windowID, imageOptions));
}
@@ -12034,7 +12021,7 @@ index 4b9e12c40517fb84cb23d2de3e2adaa66c69da59..f56879a5a799115ef7353c060b00b842
} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/DrawingAreaProxy.h b/Source/WebKit/UIProcess/DrawingAreaProxy.h
-index 082b0c011d1e38a7915540de10c13c7118ce8a6f..b896c02ee56dcbb3293a019c134c965847212622 100644
+index 826c417c6c9ba1c7e6c2c32a6ab0f3ab8d72f0e0..641f418f78c56aba25740586bb982231997b6bf5 100644
--- a/Source/WebKit/UIProcess/DrawingAreaProxy.h
+++ b/Source/WebKit/UIProcess/DrawingAreaProxy.h
@@ -75,6 +75,7 @@ public:
@@ -12355,7 +12342,7 @@ index 0000000000000000000000000000000000000000..4ec8b96bbbddf8a7b042f53a8068754a
+cairo_status_t cairo_image_surface_write_to_jpeg_mem(cairo_surface_t *sfc, unsigned char **data, size_t *len, int quality);
diff --git a/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.cpp b/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.cpp
new file mode 100644
-index 0000000000000000000000000000000000000000..5fdc4b3f236ab8d0351d5dee468e262267532804
+index 0000000000000000000000000000000000000000..20122bd89c3ba0ec4ff878ac895bddd497cc9789
--- /dev/null
+++ b/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.cpp
@@ -0,0 +1,269 @@
@@ -12479,7 +12466,7 @@ index 0000000000000000000000000000000000000000..5fdc4b3f236ab8d0351d5dee468e2622
+}
+#endif
+
-+Inspector::Protocol::ErrorStringOr<String /* screencastID */> InspectorScreencastAgent::startVideo(const String& file, int width, int height, int toolbarHeight, Optional<double>&& scale)
++Inspector::Protocol::ErrorStringOr<String /* screencastID */> InspectorScreencastAgent::startVideo(const String& file, int width, int height, int toolbarHeight, std::optional<double>&& scale)
+{
+ if (m_encoder)
+ return makeUnexpected("Already recording"_s);
@@ -12630,7 +12617,7 @@ index 0000000000000000000000000000000000000000..5fdc4b3f236ab8d0351d5dee468e2622
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.h b/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.h
new file mode 100644
-index 0000000000000000000000000000000000000000..85084cced95b8b3c58e08f01f286c42e986b7c1a
+index 0000000000000000000000000000000000000000..8f2795dbf1323dd8d5f986f18e6fe16431dd7f70
--- /dev/null
+++ b/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.h
@@ -0,0 +1,96 @@
@@ -12699,7 +12686,7 @@ index 0000000000000000000000000000000000000000..85084cced95b8b3c58e08f01f286c42e
+ void didPaint(cairo_surface_t*);
+#endif
+
-+ Inspector::Protocol::ErrorStringOr<String /* screencastID */> startVideo(const String& file, int width, int height, int toolbarHeight, Optional<double>&& scale) override;
++ Inspector::Protocol::ErrorStringOr<String /* screencastID */> startVideo(const String& file, int width, int height, int toolbarHeight, std::optional<double>&& scale) override;
+ void stopVideo(Ref<StopVideoCallback>&&) override;
+
+ Inspector::Protocol::ErrorStringOr<int /* generation */> startScreencast(int width, int height, int toolbarHeight, int quality) override;
@@ -12732,7 +12719,7 @@ index 0000000000000000000000000000000000000000..85084cced95b8b3c58e08f01f286c42e
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.cpp b/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.cpp
new file mode 100644
-index 0000000000000000000000000000000000000000..eca2c4cd9c8d312ad519e312c99f0b0a2435c9eb
+index 0000000000000000000000000000000000000000..62f20814b72e90275eb4fa0e8302fc15abdaaab2
--- /dev/null
+++ b/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.cpp
@@ -0,0 +1,393 @@
@@ -12858,7 +12845,7 @@ index 0000000000000000000000000000000000000000..eca2c4cd9c8d312ad519e312c99f0b0a
+ : m_surface(WTFMove(surface))
+ { }
+#elif PLATFORM(MAC)
-+ VPXFrame(RetainPtr<CGImageRef> windowImage, Optional<double> scale, int offsetTop)
++ VPXFrame(RetainPtr<CGImageRef> windowImage, std::optional<double> scale, int offsetTop)
+ : m_windowImage(WTFMove(windowImage))
+ , m_scale(scale)
+ , m_offsetTop(offsetTop)
@@ -12900,7 +12887,7 @@ index 0000000000000000000000000000000000000000..eca2c4cd9c8d312ad519e312c99f0b0a
+ RefPtr<cairo_surface_t> m_surface;
+#elif PLATFORM(MAC)
+ RetainPtr<CGImageRef> m_windowImage;
-+ Optional<double> m_scale;
++ std::optional<double> m_scale;
+ int m_offsetTop { 0 };
+#endif
+ Seconds m_duration;
@@ -12993,7 +12980,7 @@ index 0000000000000000000000000000000000000000..eca2c4cd9c8d312ad519e312c99f0b0a
+ std::unique_ptr<vpx_image_t> m_image;
+};
+
-+ScreencastEncoder::ScreencastEncoder(std::unique_ptr<VPXCodec>&& vpxCodec, IntSize size, Optional<double> scale)
++ScreencastEncoder::ScreencastEncoder(std::unique_ptr<VPXCodec>&& vpxCodec, IntSize size, std::optional<double> scale)
+ : m_vpxCodec(WTFMove(vpxCodec))
+ , m_size(size)
+ , m_scale(scale)
@@ -13005,7 +12992,7 @@ index 0000000000000000000000000000000000000000..eca2c4cd9c8d312ad519e312c99f0b0a
+{
+}
+
-+RefPtr<ScreencastEncoder> ScreencastEncoder::create(String& errorString, const String& filePath, IntSize size, Optional<double> scale)
++RefPtr<ScreencastEncoder> ScreencastEncoder::create(String& errorString, const String& filePath, IntSize size, std::optional<double> scale)
+{
+ vpx_codec_iface_t* codec_interface = vpx_codec_vp8_cx();
+ if (!codec_interface) {
@@ -13131,7 +13118,7 @@ index 0000000000000000000000000000000000000000..eca2c4cd9c8d312ad519e312c99f0b0a
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.h b/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.h
new file mode 100644
-index 0000000000000000000000000000000000000000..c9ff0442e072d54c089540d291b7963688b6474b
+index 0000000000000000000000000000000000000000..1683da93db6b9088c3a472472c1b71477b47a7fd
--- /dev/null
+++ b/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.h
@@ -0,0 +1,81 @@
@@ -13183,10 +13170,10 @@ index 0000000000000000000000000000000000000000..c9ff0442e072d54c089540d291b79636
+public:
+ static constexpr int fps = 25;
+
-+ static RefPtr<ScreencastEncoder> create(String& errorString, const String& filePath, WebCore::IntSize, Optional<double> scale);
++ static RefPtr<ScreencastEncoder> create(String& errorString, const String& filePath, WebCore::IntSize, std::optional<double> scale);
+
+ class VPXCodec;
-+ ScreencastEncoder(std::unique_ptr<VPXCodec>&&, WebCore::IntSize, Optional<double> scale);
++ ScreencastEncoder(std::unique_ptr<VPXCodec>&&, WebCore::IntSize, std::optional<double> scale);
+ ~ScreencastEncoder();
+
+#if USE(CAIRO)
@@ -13201,12 +13188,12 @@ index 0000000000000000000000000000000000000000..c9ff0442e072d54c089540d291b79636
+private:
+ void flushLastFrame();
+#if PLATFORM(MAC)
-+ static void imageToARGB(CGImageRef, uint8_t* rgba_data, int width, int height, Optional<double> scale, int offsetTop);
++ static void imageToARGB(CGImageRef, uint8_t* rgba_data, int width, int height, std::optional<double> scale, int offsetTop);
+#endif
+
+ std::unique_ptr<VPXCodec> m_vpxCodec;
+ const WebCore::IntSize m_size;
-+ Optional<double> m_scale;
++ std::optional<double> m_scale;
+ MonotonicTime m_lastFrameTimestamp;
+ class VPXFrame;
+ std::unique_ptr<VPXFrame> m_lastFrame;
@@ -13909,7 +13896,7 @@ index 8c1339345d451874502b271f6aa2eca3fa0d3faf..331b61c70c7370ace480724bdb53c99a
} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/Inspector/mac/ScreencastEncoderMac.mm b/Source/WebKit/UIProcess/Inspector/mac/ScreencastEncoderMac.mm
new file mode 100644
-index 0000000000000000000000000000000000000000..0700f3624b34ab536f4101a12ba5fbd9a81e9a58
+index 0000000000000000000000000000000000000000..66d1c743de1cb35e29d6fc9b69379d265a59961f
--- /dev/null
+++ b/Source/WebKit/UIProcess/Inspector/mac/ScreencastEncoderMac.mm
@@ -0,0 +1,58 @@
@@ -13947,7 +13934,7 @@ index 0000000000000000000000000000000000000000..0700f3624b34ab536f4101a12ba5fbd9
+
+namespace WebKit {
+
-+void ScreencastEncoder::imageToARGB(CGImageRef image, uint8_t* argb_data, int width, int height, Optional<double> scale, int offsetTop)
++void ScreencastEncoder::imageToARGB(CGImageRef image, uint8_t* argb_data, int width, int height, std::optional<double> scale, int offsetTop)
+{
+ size_t bitsPerComponent = 8;
+ size_t bytesPerPixel = 4;
@@ -14143,7 +14130,7 @@ index 0000000000000000000000000000000000000000..d0e11ed81a6257c011df23d5870da740
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/InspectorPlaywrightAgent.cpp b/Source/WebKit/UIProcess/InspectorPlaywrightAgent.cpp
new file mode 100644
-index 0000000000000000000000000000000000000000..a99ca36604fadf1514e7c5211251e57e525a2eee
+index 0000000000000000000000000000000000000000..f6af8f9043965183816b0cd22ba3770d4d79454b
--- /dev/null
+++ b/Source/WebKit/UIProcess/InspectorPlaywrightAgent.cpp
@@ -0,0 +1,921 @@
@@ -14338,7 +14325,7 @@ index 0000000000000000000000000000000000000000..a99ca36604fadf1514e7c5211251e57e
+ .setValue(cookie.value)
+ .setDomain(cookie.domain)
+ .setPath(cookie.path)
-+ .setExpires(cookie.expires.valueOr(-1))
++ .setExpires(cookie.expires.value_or(-1))
+ .setHttpOnly(cookie.httpOnly)
+ .setSecure(cookie.secure)
+ .setSession(cookie.session)
@@ -14457,7 +14444,7 @@ index 0000000000000000000000000000000000000000..a99ca36604fadf1514e7c5211251e57e
+ return BackendDispatcher::InterceptionResult::Intercepted;
+ }
+
-+ Optional<int> requestId = idValue->asInteger();
++ std::optional<int> requestId = idValue->asInteger();
+ if (!requestId) {
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::InvalidRequest, "The type of 'id' must be number"_s);
+ m_backendDispatcher->sendPendingErrors();
@@ -14610,7 +14597,7 @@ index 0000000000000000000000000000000000000000..a99ca36604fadf1514e7c5211251e57e
+
+ WebsiteDataStore::forEachWebsiteDataStore([] (WebsiteDataStore& dataStore) {
+ dataStore.setDownloadInstrumentation(nullptr);
-+ dataStore.setDownloadForAutomation(Optional<bool>(), String());
++ dataStore.setDownloadForAutomation(std::optional<bool>(), String());
+ });
+ for (auto& it : m_browserContexts) {
+ it.value->dataStore->setDownloadInstrumentation(nullptr);
@@ -14897,14 +14884,14 @@ index 0000000000000000000000000000000000000000..a99ca36604fadf1514e7c5211251e57e
+ return;
+ }
+
-+ Optional<double> expires = obj->getDouble("expires");
++ std::optional<double> expires = obj->getDouble("expires");
+ if (expires && *expires != -1)
+ cookie.expires = *expires;
-+ if (Optional<bool> value = obj->getBoolean("httpOnly"))
++ if (std::optional<bool> value = obj->getBoolean("httpOnly"))
+ cookie.httpOnly = *value;
-+ if (Optional<bool> value = obj->getBoolean("secure"))
++ if (std::optional<bool> value = obj->getBoolean("secure"))
+ cookie.secure = *value;
-+ if (Optional<bool> value = obj->getBoolean("session"))
++ if (std::optional<bool> value = obj->getBoolean("session"))
+ cookie.session = *value;
+ String sameSite;
+ if (obj->getString("sameSite", sameSite)) {
@@ -14979,7 +14966,7 @@ index 0000000000000000000000000000000000000000..a99ca36604fadf1514e7c5211251e57e
+ if (!errorString.isEmpty())
+ return makeUnexpected(errorString);
+
-+ Optional<bool> allow;
++ std::optional<bool> allow;
+ if (behavior == "allow"_s)
+ allow = true;
+ if (behavior == "deny"_s)
@@ -15000,10 +14987,10 @@ index 0000000000000000000000000000000000000000..a99ca36604fadf1514e7c5211251e57e
+ return makeUnexpected("Internal error: geolocation manager is not available."_s);
+
+ if (geolocation) {
-+ Optional<double> timestamp = geolocation->getDouble("timestamp");
-+ Optional<double> latitude = geolocation->getDouble("latitude");
-+ Optional<double> longitude = geolocation->getDouble("longitude");
-+ Optional<double> accuracy = geolocation->getDouble("accuracy");
++ std::optional<double> timestamp = geolocation->getDouble("timestamp");
++ std::optional<double> latitude = geolocation->getDouble("latitude");
++ std::optional<double> longitude = geolocation->getDouble("longitude");
++ std::optional<double> accuracy = geolocation->getDouble("accuracy");
+ if (!timestamp || !latitude || !longitude || !accuracy)
+ return makeUnexpected("Invalid geolocation format"_s);
+
@@ -15289,10 +15276,10 @@ index 7a14cfba15c103a2d4fe263fa49d25af3c396ec2..3ee0e154349661632799057c71f1d1f1
BOOL result = ::CreateProcess(0, commandLine.data(), 0, 0, true, 0, 0, 0, &startupInfo, &processInformation);
diff --git a/Source/WebKit/UIProcess/PageClient.h b/Source/WebKit/UIProcess/PageClient.h
-index 7f9338c2a1b3e7b8a31f0d459e4b13d54f42e1d7..5a5a792d5c4de98230c4d0be54c21e08836b35ab 100644
+index e722b403a77d3fafd836c28ddfce6ae8b34b5d78..c437eaeb8b2295a9cffba88a1dadaf5c5fcb9ac0 100644
--- a/Source/WebKit/UIProcess/PageClient.h
+++ b/Source/WebKit/UIProcess/PageClient.h
-@@ -313,6 +313,11 @@ public:
+@@ -314,6 +314,11 @@ public:
virtual void selectionDidChange() = 0;
#endif
@@ -15302,10 +15289,10 @@ index 7f9338c2a1b3e7b8a31f0d459e4b13d54f42e1d7..5a5a792d5c4de98230c4d0be54c21e08
+#endif
+// Paywright end
#if PLATFORM(COCOA) || PLATFORM(GTK)
- virtual RefPtr<ViewSnapshot> takeViewSnapshot(Optional<WebCore::IntRect>&&) = 0;
+ virtual RefPtr<ViewSnapshot> takeViewSnapshot(std::optional<WebCore::IntRect>&&) = 0;
#endif
diff --git a/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp b/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
-index 226d2933405ea5b6f0bc369e51fd07862e37af76..7796abccb6b80baccf826a24fe4f45a4a56bb9d6 100644
+index bb4a4c2f6a17f4ada269a3450f9c276f648c72e1..49cd5218f23a6e8b8b8cf9d33542795dca95e548 100644
--- a/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
+++ b/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
@@ -598,3 +598,5 @@ bool ProvisionalPageProxy::sendMessage(UniqueRef<IPC::Encoder>&& encoder, Option
@@ -15676,7 +15663,7 @@ index 04f3227cd55c992a42cd96a3f25d697aed7965a2..f0d36935f47bab03ea2ec50b70509206
diff --git a/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.cpp b/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.cpp
new file mode 100644
-index 0000000000000000000000000000000000000000..9aae63765d546524680510868cb0efd6d4a71827
+index 0000000000000000000000000000000000000000..ae45b4212bdb3f6a004cc80a1d91146b540f86f5
--- /dev/null
+++ b/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.cpp
@@ -0,0 +1,147 @@
@@ -15740,7 +15727,7 @@ index 0000000000000000000000000000000000000000..9aae63765d546524680510868cb0efd6
+ m_commandsToRunWhenShown.clear();
+}
+
-+void WebPageInspectorEmulationAgent::setDeviceMetricsOverride(int width, int height, bool fixedlayout, Optional<double>&& deviceScaleFactor, Ref<SetDeviceMetricsOverrideCallback>&& callback)
++void WebPageInspectorEmulationAgent::setDeviceMetricsOverride(int width, int height, bool fixedlayout, std::optional<double>&& deviceScaleFactor, Ref<SetDeviceMetricsOverrideCallback>&& callback)
+{
+#if PLATFORM(GTK)
+ // On gtk, fixed layout doesn't work with compositing enabled
@@ -15787,11 +15774,11 @@ index 0000000000000000000000000000000000000000..9aae63765d546524680510868cb0efd6
+ if (!!username && !!password)
+ m_page.setAuthCredentialsForAutomation(WebCore::Credential(username, password, CredentialPersistencePermanent));
+ else
-+ m_page.setAuthCredentialsForAutomation(Optional<WebCore::Credential>());
++ m_page.setAuthCredentialsForAutomation(std::optional<WebCore::Credential>());
+ return { };
+}
+
-+Inspector::Protocol::ErrorStringOr<void> WebPageInspectorEmulationAgent::setActiveAndFocused(Optional<bool>&& active)
++Inspector::Protocol::ErrorStringOr<void> WebPageInspectorEmulationAgent::setActiveAndFocused(std::optional<bool>&& active)
+{
+ m_page.setActiveForAutomation(WTFMove(active));
+ return { };
@@ -15829,7 +15816,7 @@ index 0000000000000000000000000000000000000000..9aae63765d546524680510868cb0efd6
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.h b/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.h
new file mode 100644
-index 0000000000000000000000000000000000000000..663f7777e000e1fef583b2bda1d1464fa70ef4bc
+index 0000000000000000000000000000000000000000..b3bb4880a866ee6132b8b26acf8dad81afe14d85
--- /dev/null
+++ b/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.h
@@ -0,0 +1,75 @@
@@ -15888,10 +15875,10 @@ index 0000000000000000000000000000000000000000..663f7777e000e1fef583b2bda1d1464f
+ void didCreateFrontendAndBackend(Inspector::FrontendRouter*, Inspector::BackendDispatcher*) override;
+ void willDestroyFrontendAndBackend(Inspector::DisconnectReason) override;
+
-+ void setDeviceMetricsOverride(int width, int height, bool fixedlayout, Optional<double>&& deviceScaleFactor, Ref<SetDeviceMetricsOverrideCallback>&&) override;
++ void setDeviceMetricsOverride(int width, int height, bool fixedlayout, std::optional<double>&& deviceScaleFactor, Ref<SetDeviceMetricsOverrideCallback>&&) override;
+ Inspector::Protocol::ErrorStringOr<void> setJavaScriptEnabled(bool enabled) override;
+ Inspector::Protocol::ErrorStringOr<void> setAuthCredentials(const String&, const String&) override;
-+ Inspector::Protocol::ErrorStringOr<void> setActiveAndFocused(Optional<bool>&&) override;
++ Inspector::Protocol::ErrorStringOr<void> setActiveAndFocused(std::optional<bool>&&) override;
+ Inspector::Protocol::ErrorStringOr<void> grantPermissions(const String& origin, Ref<JSON::Array>&& permissions) override;
+ Inspector::Protocol::ErrorStringOr<void> resetPermissions() override;
+
@@ -15910,7 +15897,7 @@ index 0000000000000000000000000000000000000000..663f7777e000e1fef583b2bda1d1464f
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/WebPageInspectorInputAgent.cpp b/Source/WebKit/UIProcess/WebPageInspectorInputAgent.cpp
new file mode 100644
-index 0000000000000000000000000000000000000000..dc52f43a47153513e4ff063ff4edb4d4887104f0
+index 0000000000000000000000000000000000000000..eb16b3aa8912b4cc26a2e555669c27682b76378d
--- /dev/null
+++ b/Source/WebKit/UIProcess/WebPageInspectorInputAgent.cpp
@@ -0,0 +1,288 @@
@@ -16047,7 +16034,7 @@ index 0000000000000000000000000000000000000000..dc52f43a47153513e4ff063ff4edb4d4
+ return key;
+}
+
-+void WebPageInspectorInputAgent::dispatchKeyEvent(const String& type, Optional<int>&& modifiers, const String& text, const String& unmodifiedText, const String& code, const String& key, Optional<int>&& windowsVirtualKeyCode, Optional<int>&& nativeVirtualKeyCode, Optional<bool>&& autoRepeat, Optional<bool>&& isKeypad, Optional<bool>&& isSystemKey, RefPtr<JSON::Array>&& commands, Ref<Inspector::InputBackendDispatcherHandler::DispatchKeyEventCallback>&& callback)
++void WebPageInspectorInputAgent::dispatchKeyEvent(const String& type, std::optional<int>&& modifiers, const String& text, const String& unmodifiedText, const String& code, const String& key, std::optional<int>&& windowsVirtualKeyCode, std::optional<int>&& nativeVirtualKeyCode, std::optional<bool>&& autoRepeat, std::optional<bool>&& isKeypad, std::optional<bool>&& isSystemKey, RefPtr<JSON::Array>&& commands, Ref<Inspector::InputBackendDispatcherHandler::DispatchKeyEventCallback>&& callback)
+{
+ WebKit::WebEvent::Type eventType;
+ if (type == "keyDown") {
@@ -16116,7 +16103,7 @@ index 0000000000000000000000000000000000000000..dc52f43a47153513e4ff063ff4edb4d4
+ timestamp);
+}
+
-+void WebPageInspectorInputAgent::dispatchMouseEvent(const String& type, int x, int y, Optional<int>&& modifiers, const String& button, Optional<int>&& buttons, Optional<int>&& clickCount, Optional<int>&& deltaX, Optional<int>&& deltaY, Ref<DispatchMouseEventCallback>&& callback)
++void WebPageInspectorInputAgent::dispatchMouseEvent(const String& type, int x, int y, std::optional<int>&& modifiers, const String& button, std::optional<int>&& buttons, std::optional<int>&& clickCount, std::optional<int>&& deltaX, std::optional<int>&& deltaY, Ref<DispatchMouseEventCallback>&& callback)
+{
+ WebEvent::Type eventType = WebEvent::NoType;
+ if (type == "down")
@@ -16196,7 +16183,7 @@ index 0000000000000000000000000000000000000000..dc52f43a47153513e4ff063ff4edb4d4
+#endif
+}
+
-+void WebPageInspectorInputAgent::dispatchTapEvent(int x, int y, Optional<int>&& modifiers, Ref<DispatchTapEventCallback>&& callback) {
++void WebPageInspectorInputAgent::dispatchTapEvent(int x, int y, std::optional<int>&& modifiers, Ref<DispatchTapEventCallback>&& callback) {
+ m_page.sendWithAsyncReply(Messages::WebPage::FakeTouchTap(WebCore::IntPoint(x, y), modifiers ? *modifiers : 0), [callback]() {
+ callback->sendSuccess();
+ });
@@ -16204,7 +16191,7 @@ index 0000000000000000000000000000000000000000..dc52f43a47153513e4ff063ff4edb4d4
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/WebPageInspectorInputAgent.h b/Source/WebKit/UIProcess/WebPageInspectorInputAgent.h
new file mode 100644
-index 0000000000000000000000000000000000000000..01b8f65e87b4898b1418f47f4d95c4011c0c180f
+index 0000000000000000000000000000000000000000..94e9f24353337169992724e2fcdf7086dd888fa6
--- /dev/null
+++ b/Source/WebKit/UIProcess/WebPageInspectorInputAgent.h
@@ -0,0 +1,85 @@
@@ -16268,9 +16255,9 @@ index 0000000000000000000000000000000000000000..01b8f65e87b4898b1418f47f4d95c401
+ void willDestroyFrontendAndBackend(Inspector::DisconnectReason) override;
+
+ // Protocol handler
-+ void dispatchKeyEvent(const String& type, Optional<int>&& modifiers, const String& text, const String& unmodifiedText, const String& code, const String& key, Optional<int>&& windowsVirtualKeyCode, Optional<int>&& nativeVirtualKeyCode, Optional<bool>&& autoRepeat, Optional<bool>&& isKeypad, Optional<bool>&& isSystemKey, RefPtr<JSON::Array>&&, Ref<DispatchKeyEventCallback>&& callback) override;
-+ void dispatchMouseEvent(const String& type, int x, int y, Optional<int>&& modifiers, const String& button, Optional<int>&& buttons, Optional<int>&& clickCount, Optional<int>&& deltaX, Optional<int>&& deltaY, Ref<DispatchMouseEventCallback>&& callback) override;
-+ void dispatchTapEvent(int x, int y, Optional<int>&& modifiers, Ref<DispatchTapEventCallback>&& callback) override;
++ void dispatchKeyEvent(const String& type, std::optional<int>&& modifiers, const String& text, const String& unmodifiedText, const String& code, const String& key, std::optional<int>&& windowsVirtualKeyCode, std::optional<int>&& nativeVirtualKeyCode, std::optional<bool>&& autoRepeat, std::optional<bool>&& isKeypad, std::optional<bool>&& isSystemKey, RefPtr<JSON::Array>&&, Ref<DispatchKeyEventCallback>&& callback) override;
++ void dispatchMouseEvent(const String& type, int x, int y, std::optional<int>&& modifiers, const String& button, std::optional<int>&& buttons, std::optional<int>&& clickCount, std::optional<int>&& deltaX, std::optional<int>&& deltaY, Ref<DispatchMouseEventCallback>&& callback) override;
++ void dispatchTapEvent(int x, int y, std::optional<int>&& modifiers, Ref<DispatchTapEventCallback>&& callback) override;
+
+private:
+ void platformDispatchKeyEvent(WebKeyboardEvent::Type type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEvent::Modifier> modifiers, Vector<String>& commands, WallTime timestamp);
@@ -16278,7 +16265,7 @@ index 0000000000000000000000000000000000000000..01b8f65e87b4898b1418f47f4d95c401
+ void platformDispatchMouseEvent(WebMouseEvent::Type type, int x, int y, WebMouseEvent::Button button, OptionSet<WebEvent::Modifier> modifiers);
+#endif
+#if PLATFORM(MAC)
-+ void platformDispatchMouseEvent(const String& type, int x, int y, Optional<int>&& modifier, const String& button, Optional<int>&& clickCount);
++ void platformDispatchMouseEvent(const String& type, int x, int y, std::optional<int>&& modifier, const String& button, std::optional<int>&& clickCount);
+#endif
+
+ Ref<Inspector::InputBackendDispatcher> m_backendDispatcher;
@@ -16294,10 +16281,10 @@ index 0000000000000000000000000000000000000000..01b8f65e87b4898b1418f47f4d95c401
+
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/WebPageProxy.cpp b/Source/WebKit/UIProcess/WebPageProxy.cpp
-index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e613f5e3d 100644
+index df2ff1d277eee85d825ca499345cd7b47ae63ea4..c9e8ba83df54e99c9ecdfd3efd725ab841b903d1 100644
--- a/Source/WebKit/UIProcess/WebPageProxy.cpp
+++ b/Source/WebKit/UIProcess/WebPageProxy.cpp
-@@ -238,7 +238,7 @@
+@@ -239,7 +239,7 @@
#include "ViewSnapshotStore.h"
#endif
@@ -16306,7 +16293,7 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
#include <WebCore/SelectionData.h>
#endif
-@@ -607,6 +607,10 @@ WebPageProxy::~WebPageProxy()
+@@ -608,6 +608,10 @@ WebPageProxy::~WebPageProxy()
#if ENABLE(MEDIA_SESSION_COORDINATOR)
WEBPAGEPROXY_DESTRUCTOR_WKCOORDINATOR_ADDITIONS
#endif
@@ -16317,7 +16304,7 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
}
// FIXME: Should return a const PageClient& and add a separate non-const
-@@ -988,6 +992,7 @@ void WebPageProxy::finishAttachingToWebProcess(ProcessLaunchReason reason)
+@@ -990,6 +994,7 @@ void WebPageProxy::finishAttachingToWebProcess(ProcessLaunchReason reason)
m_pageLoadState.didSwapWebProcesses();
if (reason != ProcessLaunchReason::InitialProcess)
m_drawingArea->waitForBackingStoreUpdateOnNextPaint();
@@ -16325,7 +16312,7 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
}
void WebPageProxy::didAttachToRunningProcess()
-@@ -1305,6 +1310,21 @@ WebProcessProxy& WebPageProxy::ensureRunningProcess()
+@@ -1307,6 +1312,21 @@ WebProcessProxy& WebPageProxy::ensureRunningProcess()
return m_process;
}
@@ -16347,11 +16334,11 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
RefPtr<API::Navigation> WebPageProxy::loadRequest(ResourceRequest&& request, ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy, API::Object* userData)
{
if (m_isClosed)
-@@ -1822,6 +1842,31 @@ void WebPageProxy::setControlledByAutomation(bool controlled)
+@@ -1824,6 +1844,31 @@ void WebPageProxy::setControlledByAutomation(bool controlled)
websiteDataStore().networkProcess().send(Messages::NetworkProcess::SetSessionIsControlledByAutomation(m_websiteDataStore->sessionID(), m_controlledByAutomation), 0);
}
-+void WebPageProxy::setAuthCredentialsForAutomation(Optional<WebCore::Credential>&& credentials)
++void WebPageProxy::setAuthCredentialsForAutomation(std::optional<WebCore::Credential>&& credentials)
+{
+ m_credentialsForAutomation = WTFMove(credentials);
+}
@@ -16361,7 +16348,7 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
+ m_permissionsForAutomation = permissions;
+}
+
-+void WebPageProxy::setActiveForAutomation(Optional<bool> active) {
++void WebPageProxy::setActiveForAutomation(std::optional<bool> active) {
+ m_activeForAutomation = active;
+ OptionSet<ActivityState::Flag> state;
+ state.add(ActivityState::IsFocused);
@@ -16379,7 +16366,7 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
void WebPageProxy::createInspectorTarget(const String& targetId, Inspector::InspectorTargetType type)
{
MESSAGE_CHECK(m_process, !targetId.isEmpty());
-@@ -2012,6 +2057,25 @@ void WebPageProxy::updateActivityState(OptionSet<ActivityState::Flag> flagsToUpd
+@@ -2014,6 +2059,25 @@ void WebPageProxy::updateActivityState(OptionSet<ActivityState::Flag> flagsToUpd
{
bool wasVisible = isViewVisible();
m_activityState.remove(flagsToUpdate);
@@ -16405,7 +16392,7 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
if (flagsToUpdate & ActivityState::IsFocused && pageClient().isViewFocused())
m_activityState.add(ActivityState::IsFocused);
if (flagsToUpdate & ActivityState::WindowIsActive && pageClient().isViewWindowActive())
-@@ -2584,6 +2648,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag
+@@ -2581,6 +2645,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag
{
if (!hasRunningProcess())
return;
@@ -16414,7 +16401,7 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
#if PLATFORM(GTK)
UNUSED_PARAM(dragStorageName);
UNUSED_PARAM(sandboxExtensionHandle);
-@@ -2594,6 +2660,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag
+@@ -2591,6 +2657,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag
m_process->assumeReadAccessToBaseURL(*this, url);
ASSERT(dragData.platformData());
@@ -16423,7 +16410,7 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
send(Messages::WebPage::PerformDragControllerAction(action, dragData.clientPosition(), dragData.globalPosition(), dragData.draggingSourceOperationMask(), *dragData.platformData(), dragData.flags()));
#else
send(Messages::WebPage::PerformDragControllerAction(action, dragData, sandboxExtensionHandle, sandboxExtensionsForUpload));
-@@ -2609,18 +2677,41 @@ void WebPageProxy::didPerformDragControllerAction(Optional<WebCore::DragOperatio
+@@ -2606,18 +2674,41 @@ void WebPageProxy::didPerformDragControllerAction(std::optional<WebCore::DragOpe
m_currentDragCaretEditableElementRect = editableElementRect;
setDragCaretRect(insertionRect);
pageClient().didPerformDragControllerAction();
@@ -16468,14 +16455,14 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
void WebPageProxy::dragEnded(const IntPoint& clientPosition, const IntPoint& globalPosition, OptionSet<WebCore::DragOperation> dragOperationMask)
{
if (!hasRunningProcess())
-@@ -2629,6 +2720,24 @@ void WebPageProxy::dragEnded(const IntPoint& clientPosition, const IntPoint& glo
+@@ -2626,6 +2717,24 @@ void WebPageProxy::dragEnded(const IntPoint& clientPosition, const IntPoint& glo
setDragCaretRect({ });
}
+bool WebPageProxy::cancelDragIfNeeded() {
+ if (!m_dragSelectionData)
+ return false;
-+ m_dragSelectionData = WTF::nullopt;
++ m_dragSelectionData = std::nullopt;
+#if PLATFORM(COCOA)
+ releaseInspectorDragPasteboard();
+#endif
@@ -16493,7 +16480,7 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
void WebPageProxy::didPerformDragOperation(bool handled)
{
pageClient().didPerformDragOperation(handled);
-@@ -2641,8 +2750,18 @@ void WebPageProxy::didStartDrag()
+@@ -2638,8 +2747,18 @@ void WebPageProxy::didStartDrag()
discardQueuedMouseEvents();
send(Messages::WebPage::DidStartDrag());
@@ -16513,22 +16500,22 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
void WebPageProxy::dragCancelled()
{
if (hasRunningProcess())
-@@ -2747,16 +2866,38 @@ void WebPageProxy::processNextQueuedMouseEvent()
+@@ -2744,16 +2863,38 @@ void WebPageProxy::processNextQueuedMouseEvent()
m_process->startResponsivenessTimer();
}
-- Optional<SandboxExtension::HandleArray> sandboxExtensions;
+- std::optional<SandboxExtension::HandleArray> sandboxExtensions;
+ m_lastMousePositionForDrag = event.position();
+ if (!m_dragSelectionData) {
-+ Optional<SandboxExtension::HandleArray> sandboxExtensions;
++ std::optional<SandboxExtension::HandleArray> sandboxExtensions;
#if PLATFORM(MAC)
- bool eventMayStartDrag = !m_currentDragOperation && eventType == WebEvent::MouseMove && event.button() != WebMouseEvent::Button::NoButton;
- if (eventMayStartDrag)
-- sandboxExtensions = SandboxExtension::createHandlesForMachLookup({ "com.apple.iconservices"_s, "com.apple.iconservices.store"_s }, WTF::nullopt);
+- sandboxExtensions = SandboxExtension::createHandlesForMachLookup({ "com.apple.iconservices"_s, "com.apple.iconservices.store"_s }, std::nullopt);
+ bool eventMayStartDrag = !m_currentDragOperation && eventType == WebEvent::MouseMove && event.button() != WebMouseEvent::Button::NoButton;
+ if (eventMayStartDrag)
-+ sandboxExtensions = SandboxExtension::createHandlesForMachLookup({ "com.apple.iconservices"_s, "com.apple.iconservices.store"_s }, WTF::nullopt);
++ sandboxExtensions = SandboxExtension::createHandlesForMachLookup({ "com.apple.iconservices"_s, "com.apple.iconservices.store"_s }, std::nullopt);
#endif
-
- LOG(MouseHandling, "UIProcess: sent mouse event %s (queue size %zu)", webMouseEventTypeString(eventType), m_mouseEventQueue.size());
@@ -16551,7 +16538,7 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
+
+ performDragOperation(dragData, "", WTFMove(sandboxExtensionHandle), WTFMove(sandboxExtensionsForUpload));
+ }
-+ m_dragSelectionData = WTF::nullopt;
++ m_dragSelectionData = std::nullopt;
+ dragEnded(event.position(), event.globalPosition(), m_dragSourceOperationMask);
+ }
+ didReceiveEvent(eventType, true);
@@ -16559,7 +16546,7 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
}
void WebPageProxy::doAfterProcessingAllPendingMouseEvents(WTF::Function<void ()>&& action)
-@@ -2976,7 +3117,7 @@ static TrackingType mergeTrackingTypes(TrackingType a, TrackingType b)
+@@ -2973,7 +3114,7 @@ static TrackingType mergeTrackingTypes(TrackingType a, TrackingType b)
void WebPageProxy::updateTouchEventTracking(const WebTouchEvent& touchStartEvent)
{
@@ -16568,7 +16555,7 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
const EventNames& names = eventNames();
for (auto& touchPoint : touchStartEvent.touchPoints()) {
IntPoint location = touchPoint.location();
-@@ -3009,7 +3150,7 @@ void WebPageProxy::updateTouchEventTracking(const WebTouchEvent& touchStartEvent
+@@ -3006,7 +3147,7 @@ void WebPageProxy::updateTouchEventTracking(const WebTouchEvent& touchStartEvent
m_touchAndPointerEventTracking.touchStartTracking = TrackingType::Synchronous;
m_touchAndPointerEventTracking.touchMoveTracking = TrackingType::Synchronous;
m_touchAndPointerEventTracking.touchEndTracking = TrackingType::Synchronous;
@@ -16577,7 +16564,7 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
}
TrackingType WebPageProxy::touchEventTrackingType(const WebTouchEvent& touchStartEvent) const
-@@ -3385,6 +3526,8 @@ void WebPageProxy::receivedNavigationPolicyDecision(PolicyAction policyAction, A
+@@ -3389,6 +3530,8 @@ void WebPageProxy::receivedNavigationPolicyDecision(PolicyAction policyAction, A
policyAction = PolicyAction::Download;
if (policyAction != PolicyAction::Use || !frame.isMainFrame() || !navigation) {
@@ -16586,15 +16573,15 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
receivedPolicyDecision(policyAction, navigation, WTFMove(policies), WTFMove(navigationAction), WTFMove(sender));
return;
}
-@@ -3444,6 +3587,7 @@ void WebPageProxy::receivedNavigationPolicyDecision(PolicyAction policyAction, A
+@@ -3455,6 +3598,7 @@ void WebPageProxy::receivedNavigationPolicyDecision(PolicyAction policyAction, A
- void WebPageProxy::receivedPolicyDecision(PolicyAction action, API::Navigation* navigation, RefPtr<API::WebsitePolicies>&& websitePolicies, Variant<Ref<API::NavigationResponse>, Ref<API::NavigationAction>>&& navigationActionOrResponse, Ref<PolicyDecisionSender>&& sender, Optional<SandboxExtension::Handle> sandboxExtensionHandle, WillContinueLoadInNewProcess willContinueLoadInNewProcess)
+ void WebPageProxy::receivedPolicyDecision(PolicyAction action, API::Navigation* navigation, RefPtr<API::WebsitePolicies>&& websitePolicies, Variant<Ref<API::NavigationResponse>, Ref<API::NavigationAction>>&& navigationActionOrResponse, Ref<PolicyDecisionSender>&& sender, std::optional<SandboxExtension::Handle> sandboxExtensionHandle, WillContinueLoadInNewProcess willContinueLoadInNewProcess)
{
+ m_inspectorController->didReceivePolicyDecision(action, navigation ? navigation->navigationID() : 0);
if (!hasRunningProcess()) {
- sender->send(PolicyDecision { sender->identifier(), isNavigatingToAppBoundDomain(), PolicyAction::Ignore, 0, WTF::nullopt, WTF::nullopt });
+ sender->send(PolicyDecision { sender->identifier(), isNavigatingToAppBoundDomain(), PolicyAction::Ignore, 0, std::nullopt, std::nullopt });
return;
-@@ -4182,6 +4326,11 @@ void WebPageProxy::pageScaleFactorDidChange(double scaleFactor)
+@@ -4193,6 +4337,11 @@ void WebPageProxy::pageScaleFactorDidChange(double scaleFactor)
m_pageScaleFactor = scaleFactor;
}
@@ -16606,7 +16593,7 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
void WebPageProxy::pluginScaleFactorDidChange(double pluginScaleFactor)
{
m_pluginScaleFactor = pluginScaleFactor;
-@@ -4514,6 +4663,7 @@ void WebPageProxy::didDestroyNavigation(uint64_t navigationID)
+@@ -4525,6 +4674,7 @@ void WebPageProxy::didDestroyNavigation(uint64_t navigationID)
return;
m_navigationState->didDestroyNavigation(navigationID);
@@ -16614,7 +16601,7 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
}
void WebPageProxy::didStartProvisionalLoadForFrame(FrameIdentifier frameID, FrameInfoData&& frameInfo, ResourceRequest&& request, uint64_t navigationID, URL&& url, URL&& unreachableURL, const UserData& userData)
-@@ -4736,6 +4886,8 @@ void WebPageProxy::didFailProvisionalLoadForFrameShared(Ref<WebProcessProxy>&& p
+@@ -4747,6 +4897,8 @@ void WebPageProxy::didFailProvisionalLoadForFrameShared(Ref<WebProcessProxy>&& p
m_failingProvisionalLoadURL = { };
@@ -16623,8 +16610,8 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
// If the provisional page's load fails then we destroy the provisional page.
if (m_provisionalPage && m_provisionalPage->mainFrame() == frame && willContinueLoading == WillContinueLoading::No)
m_provisionalPage = nullptr;
-@@ -5175,7 +5327,14 @@ void WebPageProxy::decidePolicyForNavigationActionAsync(FrameIdentifier frameID,
- NavigationActionData&& navigationActionData, FrameInfoData&& originatingFrameInfo, Optional<WebPageProxyIdentifier> originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&& request,
+@@ -5188,7 +5340,14 @@ void WebPageProxy::decidePolicyForNavigationActionAsync(FrameIdentifier frameID,
+ NavigationActionData&& navigationActionData, FrameInfoData&& originatingFrameInfo, std::optional<WebPageProxyIdentifier> originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&& request,
IPC::FormDataReference&& requestBody, WebCore::ResourceResponse&& redirectResponse, const UserData& userData, uint64_t listenerID)
{
- decidePolicyForNavigationActionAsyncShared(m_process.copyRef(), m_webPageID, frameID, WTFMove(frameInfo), identifier, navigationID, WTFMove(navigationActionData), WTFMove(originatingFrameInfo), originatingPageID, originalRequest, WTFMove(request), WTFMove(requestBody), WTFMove(redirectResponse), userData, listenerID);
@@ -16639,15 +16626,15 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
}
void WebPageProxy::decidePolicyForNavigationActionAsyncShared(Ref<WebProcessProxy>&& process, PageIdentifier webPageID, FrameIdentifier frameID, FrameInfoData&& frameInfo,
-@@ -5692,6 +5851,7 @@ void WebPageProxy::createNewPage(FrameInfoData&& originatingFrameInfoData, WebPa
+@@ -5705,6 +5864,7 @@ void WebPageProxy::createNewPage(FrameInfoData&& originatingFrameInfoData, WebPa
auto* originatingPage = m_process->webPage(originatingPageID);
auto originatingFrameInfo = API::FrameInfo::create(WTFMove(originatingFrameInfoData), originatingPage);
auto mainFrameURL = m_mainFrame ? m_mainFrame->url() : URL();
+ m_inspectorController->willCreateNewPage(windowFeatures, request.url());
auto completionHandler = [this, protectedThis = makeRef(*this), mainFrameURL, request, reply = WTFMove(reply), privateClickMeasurement = navigationActionData.privateClickMeasurement] (RefPtr<WebPageProxy> newPage) mutable {
if (!newPage) {
- reply(WTF::nullopt, WTF::nullopt);
-@@ -5732,6 +5892,7 @@ void WebPageProxy::createNewPage(FrameInfoData&& originatingFrameInfoData, WebPa
+ reply(std::nullopt, std::nullopt);
+@@ -5745,6 +5905,7 @@ void WebPageProxy::createNewPage(FrameInfoData&& originatingFrameInfoData, WebPa
void WebPageProxy::showPage()
{
m_uiClient->showPage(this);
@@ -16655,7 +16642,7 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
}
void WebPageProxy::exitFullscreenImmediately()
-@@ -5767,6 +5928,10 @@ void WebPageProxy::closePage()
+@@ -5780,6 +5941,10 @@ void WebPageProxy::closePage()
if (isClosed())
return;
@@ -16663,10 +16650,10 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
+ if (m_activeContextMenu)
+ m_activeContextMenu->hide();
+#endif
- RELEASE_LOG_IF_ALLOWED(Process, "closePage:");
+ WEBPAGEPROXY_RELEASE_LOG(Process, "closePage:");
pageClient().clearAllEditCommands();
m_uiClient->close(this);
-@@ -5803,6 +5968,8 @@ void WebPageProxy::runJavaScriptAlert(FrameIdentifier frameID, FrameInfoData&& f
+@@ -5816,6 +5981,8 @@ void WebPageProxy::runJavaScriptAlert(FrameIdentifier frameID, FrameInfoData&& f
}
runModalJavaScriptDialog(WTFMove(frame), WTFMove(frameInfo), message, [reply = WTFMove(reply)](WebPageProxy& page, WebFrameProxy* frame, FrameInfoData&& frameInfo, const String& message, CompletionHandler<void()>&& completion) mutable {
@@ -16675,7 +16662,7 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
page.m_uiClient->runJavaScriptAlert(page, message, frame, WTFMove(frameInfo), [reply = WTFMove(reply), completion = WTFMove(completion)]() mutable {
reply();
completion();
-@@ -5824,6 +5991,8 @@ void WebPageProxy::runJavaScriptConfirm(FrameIdentifier frameID, FrameInfoData&&
+@@ -5837,6 +6004,8 @@ void WebPageProxy::runJavaScriptConfirm(FrameIdentifier frameID, FrameInfoData&&
if (auto* automationSession = process().processPool().automationSession())
automationSession->willShowJavaScriptDialog(*this);
}
@@ -16684,7 +16671,7 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
runModalJavaScriptDialog(WTFMove(frame), WTFMove(frameInfo), message, [reply = WTFMove(reply)](WebPageProxy& page, WebFrameProxy* frame, FrameInfoData&& frameInfo, const String& message, CompletionHandler<void()>&& completion) mutable {
page.m_uiClient->runJavaScriptConfirm(page, message, frame, WTFMove(frameInfo), [reply = WTFMove(reply), completion = WTFMove(completion)](bool result) mutable {
-@@ -5847,6 +6016,8 @@ void WebPageProxy::runJavaScriptPrompt(FrameIdentifier frameID, FrameInfoData&&
+@@ -5860,6 +6029,8 @@ void WebPageProxy::runJavaScriptPrompt(FrameIdentifier frameID, FrameInfoData&&
if (auto* automationSession = process().processPool().automationSession())
automationSession->willShowJavaScriptDialog(*this);
}
@@ -16693,7 +16680,7 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
runModalJavaScriptDialog(WTFMove(frame), WTFMove(frameInfo), message, [reply = WTFMove(reply), defaultValue](WebPageProxy& page, WebFrameProxy* frame, FrameInfoData&& frameInfo, const String& message, CompletionHandler<void()>&& completion) mutable {
page.m_uiClient->runJavaScriptPrompt(page, message, defaultValue, frame, WTFMove(frameInfo), [reply = WTFMove(reply), completion = WTFMove(completion)](auto& result) mutable {
-@@ -6007,6 +6178,8 @@ void WebPageProxy::runBeforeUnloadConfirmPanel(FrameIdentifier frameID, FrameInf
+@@ -6020,6 +6191,8 @@ void WebPageProxy::runBeforeUnloadConfirmPanel(FrameIdentifier frameID, FrameInf
return;
}
}
@@ -16702,7 +16689,7 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
// Since runBeforeUnloadConfirmPanel() can spin a nested run loop we need to turn off the responsiveness timer and the tryClose timer.
m_process->stopResponsivenessTimer();
-@@ -7213,6 +7386,8 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
+@@ -7226,6 +7399,8 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
if (auto* automationSession = process().processPool().automationSession())
automationSession->mouseEventsFlushedForPage(*this);
didFinishProcessingAllPendingMouseEvents();
@@ -16711,7 +16698,7 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
}
break;
}
-@@ -7239,7 +7414,6 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
+@@ -7252,7 +7427,6 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
case WebEvent::RawKeyDown:
case WebEvent::Char: {
LOG(KeyHandling, "WebPageProxy::didReceiveEvent: %s (queue empty %d)", webKeyboardEventTypeString(type), m_keyEventQueue.isEmpty());
@@ -16719,7 +16706,7 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
MESSAGE_CHECK(m_process, !m_keyEventQueue.isEmpty());
auto event = m_keyEventQueue.takeFirst();
MESSAGE_CHECK(m_process, type == event.type());
-@@ -7258,7 +7432,6 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
+@@ -7271,7 +7445,6 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
// The call to doneWithKeyEvent may close this WebPage.
// Protect against this being destroyed.
Ref<WebPageProxy> protect(*this);
@@ -16727,7 +16714,7 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
pageClient().doneWithKeyEvent(event, handled);
if (!handled)
m_uiClient->didNotHandleKeyEvent(this, event);
-@@ -7267,6 +7440,7 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
+@@ -7280,6 +7453,7 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
if (!canProcessMoreKeyEvents) {
if (auto* automationSession = process().processPool().automationSession())
automationSession->keyboardEventsFlushedForPage(*this);
@@ -16735,9 +16722,9 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
}
break;
}
-@@ -7597,7 +7771,10 @@ void WebPageProxy::dispatchProcessDidTerminate(ProcessTerminationReason reason)
+@@ -7610,7 +7784,10 @@ void WebPageProxy::dispatchProcessDidTerminate(ProcessTerminationReason reason)
{
- RELEASE_LOG_ERROR_IF_ALLOWED(Loading, "dispatchProcessDidTerminate: reason=%d", reason);
+ WEBPAGEPROXY_RELEASE_LOG_ERROR(Loading, "dispatchProcessDidTerminate: reason=%d", reason);
- bool handledByClient = false;
+ bool handledByClient = m_inspectorController->pageCrashed(reason);
@@ -16747,7 +16734,7 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
if (m_loaderClient)
handledByClient = reason != ProcessTerminationReason::RequestedByClient && m_loaderClient->processDidCrash(*this);
else
-@@ -7967,6 +8144,7 @@ static const Vector<ASCIILiteral>& mediaRelatedIOKitClasses()
+@@ -7980,6 +8157,7 @@ static const Vector<ASCIILiteral>& mediaRelatedIOKitClasses()
WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& process, DrawingAreaProxy& drawingArea, RefPtr<API::WebsitePolicies>&& websitePolicies)
{
@@ -16755,7 +16742,7 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
WebPageCreationParameters parameters;
parameters.processDisplayName = configuration().processDisplayName();
-@@ -8159,6 +8337,8 @@ WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& proc
+@@ -8172,6 +8350,8 @@ WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& proc
parameters.shouldRelaxThirdPartyCookieBlocking = m_configuration->shouldRelaxThirdPartyCookieBlocking();
parameters.canUseCredentialStorage = m_canUseCredentialStorage;
@@ -16764,11 +16751,11 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
#if PLATFORM(GTK)
parameters.themeName = pageClient().themeName();
#endif
-@@ -8231,6 +8411,14 @@ void WebPageProxy::gamepadActivity(const Vector<GamepadData>& gamepadDatas, Even
+@@ -8244,6 +8424,14 @@ void WebPageProxy::gamepadActivity(const Vector<GamepadData>& gamepadDatas, Even
void WebPageProxy::didReceiveAuthenticationChallengeProxy(Ref<AuthenticationChallengeProxy>&& authenticationChallenge, NegotiatedLegacyTLS negotiatedLegacyTLS)
{
-+ if (m_credentialsForAutomation.hasValue()) {
++ if (m_credentialsForAutomation.has_value()) {
+ if (m_credentialsForAutomation->isEmpty() || authenticationChallenge->core().previousFailureCount()) {
+ authenticationChallenge->listener().completeChallenge(AuthenticationChallengeDisposition::PerformDefaultHandling);
+ return;
@@ -16779,7 +16766,7 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
if (negotiatedLegacyTLS == NegotiatedLegacyTLS::Yes) {
m_navigationClient->shouldAllowLegacyTLS(*this, authenticationChallenge.get(), [this, protectedThis = makeRef(*this), authenticationChallenge] (bool shouldAllowLegacyTLS) {
if (shouldAllowLegacyTLS)
-@@ -8324,6 +8512,15 @@ void WebPageProxy::requestGeolocationPermissionForFrame(GeolocationIdentifier ge
+@@ -8337,6 +8525,15 @@ void WebPageProxy::requestGeolocationPermissionForFrame(GeolocationIdentifier ge
request->deny();
};
@@ -16796,7 +16783,7 @@ index c52e2b8e09f9b0ae4a34044f22d6832c80ec3384..7137c4291c37254513d2f4e490c5f06e
// and make it one UIClient call that calls the completionHandler with false
// if there is no delegate instead of returning the completionHandler
diff --git a/Source/WebKit/UIProcess/WebPageProxy.h b/Source/WebKit/UIProcess/WebPageProxy.h
-index 676c7c300c44860fc82236bc64af6f504b835ae5..098e12c2b7ee029ab5b99657bcf7913e9f09c635 100644
+index ba69944c9d30b87ac585e2f0499c3566737685d3..85c63743fe7cef4e5bb262c9eed592d4f49439c6 100644
--- a/Source/WebKit/UIProcess/WebPageProxy.h
+++ b/Source/WebKit/UIProcess/WebPageProxy.h
@@ -38,6 +38,7 @@
@@ -16807,7 +16794,7 @@ index 676c7c300c44860fc82236bc64af6f504b835ae5..098e12c2b7ee029ab5b99657bcf7913e
#include "LayerTreeContext.h"
#include "MediaKeySystemPermissionRequestManagerProxy.h"
#include "MediaPlaybackState.h"
-@@ -142,8 +143,11 @@
+@@ -141,8 +142,11 @@
#include "EndowmentStateTracker.h"
#endif
@@ -16819,7 +16806,7 @@ index 676c7c300c44860fc82236bc64af6f504b835ae5..098e12c2b7ee029ab5b99657bcf7913e
#endif
#if ENABLE(TOUCH_EVENTS)
-@@ -165,6 +169,14 @@
+@@ -164,6 +168,14 @@
#include "ArgumentCodersGtk.h"
#endif
@@ -16850,7 +16837,7 @@ index 676c7c300c44860fc82236bc64af6f504b835ae5..098e12c2b7ee029ab5b99657bcf7913e
class SharedBuffer;
class SpeechRecognitionRequest;
class TextIndicator;
-@@ -525,6 +537,8 @@ public:
+@@ -527,6 +539,8 @@ public:
void setControlledByAutomation(bool);
WebPageInspectorController& inspectorController() { return *m_inspectorController; }
@@ -16859,19 +16846,19 @@ index 676c7c300c44860fc82236bc64af6f504b835ae5..098e12c2b7ee029ab5b99657bcf7913e
#if PLATFORM(IOS_FAMILY)
void showInspectorIndication();
-@@ -596,6 +610,11 @@ public:
+@@ -598,6 +612,11 @@ public:
void setPageLoadStateObserver(std::unique_ptr<PageLoadState::Observer>&&);
-+ void setAuthCredentialsForAutomation(Optional<WebCore::Credential>&&);
++ void setAuthCredentialsForAutomation(std::optional<WebCore::Credential>&&);
+ void setPermissionsForAutomation(const HashMap<String, HashSet<String>>&);
-+ void setActiveForAutomation(Optional<bool> active);
++ void setActiveForAutomation(std::optional<bool> active);
+ void logToStderr(const String& str);
+
void initializeWebPage();
void setDrawingArea(std::unique_ptr<DrawingAreaProxy>&&);
-@@ -623,6 +642,7 @@ public:
+@@ -625,6 +644,7 @@ public:
void closePage();
void addPlatformLoadParameters(WebProcessProxy&, LoadParameters&);
@@ -16879,7 +16866,7 @@ index 676c7c300c44860fc82236bc64af6f504b835ae5..098e12c2b7ee029ab5b99657bcf7913e
RefPtr<API::Navigation> loadRequest(WebCore::ResourceRequest&&, WebCore::ShouldOpenExternalURLsPolicy = WebCore::ShouldOpenExternalURLsPolicy::ShouldAllowExternalSchemesButNotAppLinks, API::Object* userData = nullptr);
RefPtr<API::Navigation> loadFile(const String& fileURL, const String& resourceDirectoryURL, API::Object* userData = nullptr);
RefPtr<API::Navigation> loadData(const IPC::DataReference&, const String& MIMEType, const String& encoding, const String& baseURL, API::Object* userData = nullptr, WebCore::ShouldOpenExternalURLsPolicy = WebCore::ShouldOpenExternalURLsPolicy::ShouldNotAllow);
-@@ -1140,6 +1160,7 @@ public:
+@@ -1143,6 +1163,7 @@ public:
#endif
void pageScaleFactorDidChange(double);
@@ -16887,7 +16874,7 @@ index 676c7c300c44860fc82236bc64af6f504b835ae5..098e12c2b7ee029ab5b99657bcf7913e
void pluginScaleFactorDidChange(double);
void pluginZoomFactorDidChange(double);
-@@ -1214,14 +1235,20 @@ public:
+@@ -1217,14 +1238,20 @@ public:
void didStartDrag();
void dragCancelled();
void setDragCaretRect(const WebCore::IntRect&);
@@ -16909,16 +16896,16 @@ index 676c7c300c44860fc82236bc64af6f504b835ae5..098e12c2b7ee029ab5b99657bcf7913e
#endif
void processDidBecomeUnresponsive();
-@@ -1463,6 +1490,8 @@ public:
+@@ -1466,6 +1493,8 @@ public:
#if PLATFORM(COCOA) || PLATFORM(GTK)
- RefPtr<ViewSnapshot> takeViewSnapshot(Optional<WebCore::IntRect>&&);
+ RefPtr<ViewSnapshot> takeViewSnapshot(std::optional<WebCore::IntRect>&&);
+#elif PLATFORM(WPE)
-+ RefPtr<ViewSnapshot> takeViewSnapshot(Optional<WebCore::IntRect>&&) { return nullptr; }
++ RefPtr<ViewSnapshot> takeViewSnapshot(std::optional<WebCore::IntRect>&&) { return nullptr; }
#endif
#if ENABLE(WEB_CRYPTO)
-@@ -2539,6 +2568,7 @@ private:
+@@ -2545,6 +2574,7 @@ private:
String m_overrideContentSecurityPolicy;
RefPtr<WebInspectorUIProxy> m_inspector;
@@ -16926,7 +16913,7 @@ index 676c7c300c44860fc82236bc64af6f504b835ae5..098e12c2b7ee029ab5b99657bcf7913e
#if PLATFORM(COCOA)
WeakObjCPtr<WKWebView> m_cocoaView;
-@@ -2788,6 +2818,20 @@ private:
+@@ -2794,6 +2824,20 @@ private:
unsigned m_currentDragNumberOfFilesToBeAccepted { 0 };
WebCore::IntRect m_currentDragCaretRect;
WebCore::IntRect m_currentDragCaretEditableElementRect;
@@ -16935,30 +16922,30 @@ index 676c7c300c44860fc82236bc64af6f504b835ae5..098e12c2b7ee029ab5b99657bcf7913e
+ WebCore::IntPoint m_lastMousePositionForDrag;
+ int m_dragEventsQueued = 0;
+#if PLATFORM(COCOA)
-+ Optional<String> m_dragSelectionData;
++ std::optional<String> m_dragSelectionData;
+ String m_overrideDragPasteboardName;
+#endif
+#if PLATFORM(GTK) || PLATFORM(WPE)
-+ Optional<WebCore::SelectionData> m_dragSelectionData;
++ std::optional<WebCore::SelectionData> m_dragSelectionData;
+#endif
+#if PLATFORM(WIN)
-+ Optional<WebCore::DragDataMap> m_dragSelectionData;
++ std::optional<WebCore::DragDataMap> m_dragSelectionData;
+#endif
#endif
PageLoadState m_pageLoadState;
-@@ -3000,6 +3044,9 @@ private:
+@@ -3006,6 +3050,9 @@ private:
RefPtr<API::Object> messageBody;
};
Vector<InjectedBundleMessage> m_pendingInjectedBundleMessages;
-+ Optional<WebCore::Credential> m_credentialsForAutomation;
++ std::optional<WebCore::Credential> m_credentialsForAutomation;
+ HashMap<String, HashSet<String>> m_permissionsForAutomation;
-+ Optional<bool> m_activeForAutomation;
++ std::optional<bool> m_activeForAutomation;
#if PLATFORM(IOS_FAMILY) && ENABLE(DEVICE_ORIENTATION)
std::unique_ptr<WebDeviceOrientationUpdateProviderProxy> m_webDeviceOrientationUpdateProviderProxy;
diff --git a/Source/WebKit/UIProcess/WebPageProxy.messages.in b/Source/WebKit/UIProcess/WebPageProxy.messages.in
-index 6795451214dae0e59d440f4ae9b5efc1fef26b3d..443c8413427950dca21dce23d9fa56c1c0ecc9fc 100644
+index 9b04aa331bb07bab628cfb1c52e7890c9408dce5..d0a60f9bac2aad2f901ab3835d1d2191462a2d9e 100644
--- a/Source/WebKit/UIProcess/WebPageProxy.messages.in
+++ b/Source/WebKit/UIProcess/WebPageProxy.messages.in
@@ -29,6 +29,7 @@ messages -> WebPageProxy {
@@ -16969,7 +16956,7 @@ index 6795451214dae0e59d440f4ae9b5efc1fef26b3d..443c8413427950dca21dce23d9fa56c1
#if ENABLE(NETSCAPE_PLUGIN_API)
UnavailablePluginButtonClicked(uint32_t pluginUnavailabilityReason, String mimeType, String pluginURLString, String pluginspageAttributeURLString, String frameURLString, String pageURLString)
-@@ -180,6 +181,7 @@ messages -> WebPageProxy {
+@@ -181,6 +182,7 @@ messages -> WebPageProxy {
#endif
PageScaleFactorDidChange(double scaleFactor)
@@ -16977,7 +16964,7 @@ index 6795451214dae0e59d440f4ae9b5efc1fef26b3d..443c8413427950dca21dce23d9fa56c1
PluginScaleFactorDidChange(double zoomFactor)
PluginZoomFactorDidChange(double zoomFactor)
-@@ -310,10 +312,12 @@ messages -> WebPageProxy {
+@@ -311,10 +313,12 @@ messages -> WebPageProxy {
StartDrag(struct WebCore::DragItem dragItem, WebKit::ShareableBitmap::Handle dragImage)
SetPromisedDataForImage(String pasteboardName, WebKit::SharedMemory::IPCHandle imageHandle, String filename, String extension, String title, String url, String visibleURL, WebKit::SharedMemory::IPCHandle archiveHandle, String originIdentifier)
#endif
@@ -16993,7 +16980,7 @@ index 6795451214dae0e59d440f4ae9b5efc1fef26b3d..443c8413427950dca21dce23d9fa56c1
DidPerformDragOperation(bool handled)
#endif
diff --git a/Source/WebKit/UIProcess/WebProcessPool.cpp b/Source/WebKit/UIProcess/WebProcessPool.cpp
-index ba930fa4e7673b5d52e2f4d5ac39a5cc4fc3c316..f162e1dfb7d4efb15f0244ba3f0daf626d2aac79 100644
+index c1330e7437ef932b6d532a01b45456d610368e9d..e33705b9c2ce085bb85209d9a3b5b738dfca87ed 100644
--- a/Source/WebKit/UIProcess/WebProcessPool.cpp
+++ b/Source/WebKit/UIProcess/WebProcessPool.cpp
@@ -571,6 +571,14 @@ void WebProcessPool::establishWorkerContextConnectionToNetworkProcess(NetworkPro
@@ -17024,7 +17011,7 @@ index ba930fa4e7673b5d52e2f4d5ac39a5cc4fc3c316..f162e1dfb7d4efb15f0244ba3f0daf62
parameters.urlSchemesRegisteredAsEmptyDocument = copyToVector(m_schemesToRegisterAsEmptyDocument);
parameters.urlSchemesRegisteredAsSecure = copyToVector(LegacyGlobalSettings::singleton().schemesToRegisterAsSecure());
diff --git a/Source/WebKit/UIProcess/WebProcessProxy.cpp b/Source/WebKit/UIProcess/WebProcessProxy.cpp
-index f5ba50b99aec64772dbfa10ea88ca5c73342ec5f..be3ac88e6878adfff4b9983cb45046308e4143bd 100644
+index 447216b5c9fa428660f030d7a9599a2e2c78fc5f..dcff288102a46c7a377c6185597888be7f8b1fa6 100644
--- a/Source/WebKit/UIProcess/WebProcessProxy.cpp
+++ b/Source/WebKit/UIProcess/WebProcessProxy.cpp
@@ -122,6 +122,11 @@ HashMap<ProcessIdentifier, WebProcessProxy*>& WebProcessProxy::allProcesses()
@@ -17040,7 +17027,7 @@ index f5ba50b99aec64772dbfa10ea88ca5c73342ec5f..be3ac88e6878adfff4b9983cb4504630
{
return allProcesses().get(identifier);
diff --git a/Source/WebKit/UIProcess/WebProcessProxy.h b/Source/WebKit/UIProcess/WebProcessProxy.h
-index 08b8467cc8ae272d941c152794231064f6d9f44a..0ff3a64eb80ccb0a33a1240b69552e93618d5ea6 100644
+index 55c58c43ca7a96a7c93681616e3828660b106f7c..2e648b2610e3f7fc415e424687c937497d2c7205 100644
--- a/Source/WebKit/UIProcess/WebProcessProxy.h
+++ b/Source/WebKit/UIProcess/WebProcessProxy.h
@@ -137,6 +137,7 @@ public:
@@ -17052,7 +17039,7 @@ index 08b8467cc8ae272d941c152794231064f6d9f44a..0ff3a64eb80ccb0a33a1240b69552e93
WebConnection* webConnection() const { return m_webConnection.get(); }
diff --git a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
-index 63beaa169852cdf5aac75e60a2a677413699f4f4..ab6b05abef98e4454c78b4d944758874272ebec3 100644
+index bd96ab1ecd41a9f4984f1bf6add9f6d7190beef7..6ef22654827006edb495ee85381d2220ad1f2453 100644
--- a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
+++ b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
@@ -2123,6 +2123,17 @@ void WebsiteDataStore::renameOriginInWebsiteData(URL&& oldName, URL&& newName, O
@@ -17064,7 +17051,7 @@ index 63beaa169852cdf5aac75e60a2a677413699f4f4..ab6b05abef98e4454c78b4d944758874
+ m_languagesForAutomation = WTFMove(languages);
+}
+
-+void WebsiteDataStore::setDownloadForAutomation(Optional<bool> allow, const String& downloadPath)
++void WebsiteDataStore::setDownloadForAutomation(std::optional<bool> allow, const String& downloadPath)
+{
+ m_allowDownloadForAutomation = allow;
+ m_downloadPathForAutomation = downloadPath;
@@ -17074,7 +17061,7 @@ index 63beaa169852cdf5aac75e60a2a677413699f4f4..ab6b05abef98e4454c78b4d944758874
void WebsiteDataStore::hasAppBoundSession(CompletionHandler<void(bool)>&& completionHandler) const
{
diff --git a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
-index 034bca542991557fd760aba2052c867825ae6f5d..f4f0970a53ee55d9634d0838995b73832a139782 100644
+index 17aad057a3414fb9845e992a3a720512bb8b6080..ae3e4511a99d6dcc7f3363ce37d3207eb878cd90 100644
--- a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
+++ b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
@@ -92,6 +92,7 @@ enum class CacheModel : uint8_t;
@@ -17123,8 +17110,8 @@ index 034bca542991557fd760aba2052c867825ae6f5d..f4f0970a53ee55d9634d0838995b7383
+ void setLanguagesForAutomation(Vector<String>&&);
+ Vector<String>& languagesForAutomation() { return m_languagesForAutomation; };
-+ void setDownloadForAutomation(Optional<bool> allow, const String& downloadPath);
-+ Optional<bool> allowDownloadForAutomation() { return m_allowDownloadForAutomation; };
++ void setDownloadForAutomation(std::optional<bool> allow, const String& downloadPath);
++ std::optional<bool> allowDownloadForAutomation() { return m_allowDownloadForAutomation; };
+ String downloadPathForAutomation() { return m_downloadPathForAutomation; };
+ void setDownloadInstrumentation(DownloadInstrumentation* instrumentation) { m_downloadInstrumentation = instrumentation; };
+ DownloadInstrumentation* downloadInstrumentation() { return m_downloadInstrumentation; };
@@ -17150,7 +17137,7 @@ index 034bca542991557fd760aba2052c867825ae6f5d..f4f0970a53ee55d9634d0838995b7383
RefPtr<NetworkProcessProxy> m_networkProcess;
+ Vector<String> m_languagesForAutomation;
-+ Optional<bool> m_allowDownloadForAutomation;
++ std::optional<bool> m_allowDownloadForAutomation;
+ String m_downloadPathForAutomation;
+ DownloadInstrumentation* m_downloadInstrumentation { nullptr };
+
@@ -17188,7 +17175,7 @@ index 4f78b5eb5cdb51f2ebfcaff64ecd19b1e630ad9f..a2dc89ddf668e1be7b8f343a5df542b3
{
ASSERT(m_backend);
diff --git a/Source/WebKit/UIProcess/geoclue/GeoclueGeolocationProvider.cpp b/Source/WebKit/UIProcess/geoclue/GeoclueGeolocationProvider.cpp
-index 411056d43ea764c42bce0403e6c69ddb8b24b04e..86d4e842699a230ce595088b62a29eabea5b6b90 100644
+index 692a45a48fa027f9221338d74f5351bef4baf00f..db8c761c71cc7009be66255c2668de4eff36dee0 100644
--- a/Source/WebKit/UIProcess/geoclue/GeoclueGeolocationProvider.cpp
+++ b/Source/WebKit/UIProcess/geoclue/GeoclueGeolocationProvider.cpp
@@ -60,6 +60,8 @@ void GeoclueGeolocationProvider::start(UpdateNotifyFunction&& updateNotifyFuncti
@@ -17223,7 +17210,7 @@ index 411056d43ea764c42bce0403e6c69ddb8b24b04e..86d4e842699a230ce595088b62a29eab
"org.freedesktop.GeoClue2", clientPath, "org.freedesktop.GeoClue2.Client", m_cancellable.get(),
[](GObject*, GAsyncResult* result, gpointer userData) {
diff --git a/Source/WebKit/UIProcess/geoclue/GeoclueGeolocationProvider.h b/Source/WebKit/UIProcess/geoclue/GeoclueGeolocationProvider.h
-index 31d29091985f34a65134a2b0e7cb3ace1dae441d..571ceac8a4b291fa6e91eb8b17065c0aba908ac3 100644
+index b5e48e6c61a8a3f4b40b84112c4010101c4d5f41..46747b1d78bfe0270178609867c0d710807fa668 100644
--- a/Source/WebKit/UIProcess/geoclue/GeoclueGeolocationProvider.h
+++ b/Source/WebKit/UIProcess/geoclue/GeoclueGeolocationProvider.h
@@ -71,6 +71,9 @@ private:
@@ -17539,7 +17526,7 @@ index 0000000000000000000000000000000000000000..8a86cc348bc210b71bb463dcb3057f57
+
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/gtk/WebDateTimePickerGtk.cpp b/Source/WebKit/UIProcess/gtk/WebDateTimePickerGtk.cpp
-index 43a9045778362b44fe471b54d438c62eb8bcc814..890e5963a371faa38febbc2e7d331e0295b94d82 100644
+index 2ac15c9d7f1f19947b449794862555e913e211b7..111cd5464a19b81e73ba1bd02a2d76918cb40612 100644
--- a/Source/WebKit/UIProcess/gtk/WebDateTimePickerGtk.cpp
+++ b/Source/WebKit/UIProcess/gtk/WebDateTimePickerGtk.cpp
@@ -34,6 +34,8 @@
@@ -17738,7 +17725,7 @@ index 0000000000000000000000000000000000000000..d0f9827544994e450e24e3f7a427c35e
+
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm b/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
-index 50c9a01c408d46b17a475805144f5b48f45724da..71bd5fe7bcc9aa2ad6f81de1d66845274e12ba34 100644
+index badbefb6ccb5634afebe8a126b9a789a5b237a7c..e631a26b81cff05799a2d4e24b254db81aae92b3 100644
--- a/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
+++ b/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
@@ -441,6 +441,8 @@ IntRect PageClientImpl::rootViewToAccessibilityScreen(const IntRect& rect)
@@ -17939,7 +17926,7 @@ index 0000000000000000000000000000000000000000..721826c8c98fc85b68a4f45deaee69c1
+
+#endif
diff --git a/Source/WebKit/UIProcess/mac/PageClientImplMac.h b/Source/WebKit/UIProcess/mac/PageClientImplMac.h
-index 634d713dd1fcb078dd9d685849e5a2a79fa08a1a..ae1a0e24744aced37c802b7430e735d0b644d78a 100644
+index 89442cd9233264d09be0e380cc66013f3dd920af..9eec3ca27917d728dbb2b1afb3cf97f075d2f12e 100644
--- a/Source/WebKit/UIProcess/mac/PageClientImplMac.h
+++ b/Source/WebKit/UIProcess/mac/PageClientImplMac.h
@@ -53,6 +53,8 @@ class PageClientImpl final : public PageClientImplCocoa
@@ -17958,7 +17945,7 @@ index 634d713dd1fcb078dd9d685849e5a2a79fa08a1a..ae1a0e24744aced37c802b7430e735d0
+// Paywright begin
+ RetainPtr<CGImageRef> takeSnapshotForAutomation() override;
+// Paywright end
- RefPtr<ViewSnapshot> takeViewSnapshot(Optional<WebCore::IntRect>&&) override;
+ RefPtr<ViewSnapshot> takeViewSnapshot(std::optional<WebCore::IntRect>&&) override;
void wheelEventWasNotHandledByWebCore(const NativeWebWheelEvent&) override;
#if ENABLE(MAC_GESTURE_EVENTS)
@@ -219,6 +224,10 @@ private:
@@ -17973,7 +17960,7 @@ index 634d713dd1fcb078dd9d685849e5a2a79fa08a1a..ae1a0e24744aced37c802b7430e735d0
void navigationGestureWillEnd(bool willNavigate, WebBackForwardListItem&) override;
void navigationGestureDidEnd(bool willNavigate, WebBackForwardListItem&) override;
diff --git a/Source/WebKit/UIProcess/mac/PageClientImplMac.mm b/Source/WebKit/UIProcess/mac/PageClientImplMac.mm
-index 3de60170f605345f82f7e44e223f231b139c0f48..fb3a635069e55b1dc0ce2624f8e6ec55bbff8ea2 100644
+index c4c054fd5db3f7ac878f98d31ed992f458a01283..415577d3700f614bbfec5680e221cb1c75452399 100644
--- a/Source/WebKit/UIProcess/mac/PageClientImplMac.mm
+++ b/Source/WebKit/UIProcess/mac/PageClientImplMac.mm
@@ -81,6 +81,7 @@
@@ -18066,7 +18053,7 @@ index 3de60170f605345f82f7e44e223f231b139c0f48..fb3a635069e55b1dc0ce2624f8e6ec55
+}
+// Paywright begin
+
- RefPtr<ViewSnapshot> PageClientImpl::takeViewSnapshot(Optional<WebCore::IntRect>&&)
+ RefPtr<ViewSnapshot> PageClientImpl::takeViewSnapshot(std::optional<WebCore::IntRect>&&)
{
return m_impl->takeViewSnapshot();
@@ -803,6 +831,13 @@ void PageClientImpl::beganExitFullScreen(const IntRect& initialFrame, const IntR
@@ -18106,7 +18093,7 @@ index 56061afc3d03eb1d3ed99a39dacd6ccad36109be..7a148e64432926fce48e13fad5e84766
void getContextMenuItem(const WebContextMenuItemData&, CompletionHandler<void(NSMenuItem *)>&&);
void getContextMenuFromItems(const Vector<WebContextMenuItemData>&, CompletionHandler<void(NSMenu *)>&&);
diff --git a/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm b/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm
-index d5d9c8048c475180b25f1e2a31a5e87d6c5c8da0..f0ffa1ff074ed0bae52be458a705cebfd9adb33d 100644
+index 323bd3597f4946eb71e0462d19722eae5bab0767..91d25338865c54e30a41e23577094799aee6f337 100644
--- a/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm
+++ b/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm
@@ -361,6 +361,12 @@ void WebContextMenuProxyMac::getShareMenuItem(CompletionHandler<void(NSMenuItem
@@ -18174,7 +18161,7 @@ index 0000000000000000000000000000000000000000..6113f4cd60a5d72b8ead61176cb43200
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/mac/WebPageInspectorInputAgentMac.mm b/Source/WebKit/UIProcess/mac/WebPageInspectorInputAgentMac.mm
new file mode 100644
-index 0000000000000000000000000000000000000000..726053d74b9283d734d8699daca0e5e7f8893eca
+index 0000000000000000000000000000000000000000..e6e2c8c2769e4657c01f1452e554fd6f6d457279
--- /dev/null
+++ b/Source/WebKit/UIProcess/mac/WebPageInspectorInputAgentMac.mm
@@ -0,0 +1,124 @@
@@ -18215,7 +18202,7 @@ index 0000000000000000000000000000000000000000..726053d74b9283d734d8699daca0e5e7
+
+using namespace WebCore;
+
-+void WebPageInspectorInputAgent::platformDispatchMouseEvent(const String& type, int x, int y, Optional<int>&& optionalModifiers, const String& button, Optional<int>&& optionalClickCount) {
++void WebPageInspectorInputAgent::platformDispatchMouseEvent(const String& type, int x, int y, std::optional<int>&& optionalModifiers, const String& button, std::optional<int>&& optionalClickCount) {
+ IntPoint locationInWindow(x, y);
+
+ NSEventModifierFlags modifiers = 0;
@@ -18814,7 +18801,7 @@ index 0000000000000000000000000000000000000000..c3d7cacea987ba2b094d5022c670705e
+
+} // namespace WebKit
diff --git a/Source/WebKit/WebKit.xcodeproj/project.pbxproj b/Source/WebKit/WebKit.xcodeproj/project.pbxproj
-index 83999e5f328ec147ef9ff4f503a4be6dd0e8f878..7f4929759e8e4d638052e153d92907ae853aa127 100644
+index 93088dbd11608d0a0488c602de3458835c319c07..b7b97eacf78d38d4af8cc575eb7ca7739f47ed03 100644
--- a/Source/WebKit/WebKit.xcodeproj/project.pbxproj
+++ b/Source/WebKit/WebKit.xcodeproj/project.pbxproj
@@ -1953,6 +1953,18 @@
@@ -18846,7 +18833,7 @@ index 83999e5f328ec147ef9ff4f503a4be6dd0e8f878..7f4929759e8e4d638052e153d92907ae
F4094CBD2553053D003D73E3 /* DisplayListReaderHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = F4094CBB255304AF003D73E3 /* DisplayListReaderHandle.h */; };
F4094CBE25530540003D73E3 /* DisplayListWriterHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = F4094CB92553047E003D73E3 /* DisplayListWriterHandle.h */; };
F409BA181E6E64BC009DA28E /* WKDragDestinationAction.h in Headers */ = {isa = PBXBuildFile; fileRef = F409BA171E6E64B3009DA28E /* WKDragDestinationAction.h */; settings = {ATTRIBUTES = (Private, ); }; };
-@@ -5835,6 +5850,19 @@
+@@ -5834,6 +5849,19 @@
DF0C5F24252ECB8D00D921DB /* WKDownload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKDownload.h; sourceTree = "<group>"; };
DF0C5F25252ECB8E00D921DB /* WKDownloadInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKDownloadInternal.h; sourceTree = "<group>"; };
DF0C5F26252ECB8E00D921DB /* WKDownloadDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKDownloadDelegate.h; sourceTree = "<group>"; };
@@ -18866,7 +18853,7 @@ index 83999e5f328ec147ef9ff4f503a4be6dd0e8f878..7f4929759e8e4d638052e153d92907ae
DF462E0E23F22F5300EFF35F /* WKHTTPCookieStorePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKHTTPCookieStorePrivate.h; sourceTree = "<group>"; };
DF462E1123F338AD00EFF35F /* WKContentWorldPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContentWorldPrivate.h; sourceTree = "<group>"; };
DF58C6311371AC5800F9A37C /* NativeWebWheelEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeWebWheelEvent.h; sourceTree = "<group>"; };
-@@ -5947,6 +5975,14 @@
+@@ -5948,6 +5976,14 @@
ECA680D31E6904B500731D20 /* ExtraPrivateSymbolsForTAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtraPrivateSymbolsForTAPI.h; sourceTree = "<group>"; };
ECBFC1DB1E6A4D66000300C7 /* ExtraPublicSymbolsForTAPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ExtraPublicSymbolsForTAPI.h; sourceTree = "<group>"; };
F036978715F4BF0500C3A80E /* WebColorPicker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebColorPicker.cpp; sourceTree = "<group>"; };
@@ -18881,7 +18868,7 @@ index 83999e5f328ec147ef9ff4f503a4be6dd0e8f878..7f4929759e8e4d638052e153d92907ae
F4094CB92553047E003D73E3 /* DisplayListWriterHandle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DisplayListWriterHandle.h; sourceTree = "<group>"; };
F4094CBA2553047E003D73E3 /* DisplayListWriterHandle.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = DisplayListWriterHandle.cpp; sourceTree = "<group>"; };
F4094CBB255304AF003D73E3 /* DisplayListReaderHandle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DisplayListReaderHandle.h; sourceTree = "<group>"; };
-@@ -6057,6 +6093,7 @@
+@@ -6061,6 +6097,7 @@
3766F9EF189A1244003CF19B /* QuartzCore.framework in Frameworks */,
37694525184FC6B600CDE21F /* Security.framework in Frameworks */,
37BEC4DD1948FC6A008B4286 /* WebCore.framework in Frameworks */,
@@ -18889,7 +18876,7 @@ index 83999e5f328ec147ef9ff4f503a4be6dd0e8f878..7f4929759e8e4d638052e153d92907ae
);
runOnlyForDeploymentPostprocessing = 0;
};
-@@ -7910,6 +7947,7 @@
+@@ -7915,6 +7952,7 @@
37C4C08318149C2A003688B9 /* Cocoa */ = {
isa = PBXGroup;
children = (
@@ -18897,7 +18884,7 @@ index 83999e5f328ec147ef9ff4f503a4be6dd0e8f878..7f4929759e8e4d638052e153d92907ae
1A43E826188F38E2009E4D30 /* Deprecated */,
37A5E01218BBF937000A081E /* _WKActivatedElementInfo.h */,
37A5E01118BBF937000A081E /* _WKActivatedElementInfo.mm */,
-@@ -8980,6 +9018,7 @@
+@@ -8985,6 +9023,7 @@
isa = PBXGroup;
children = (
57A9FF15252C6AEF006A2040 /* libWTF.a */,
@@ -18905,7 +18892,7 @@ index 83999e5f328ec147ef9ff4f503a4be6dd0e8f878..7f4929759e8e4d638052e153d92907ae
5750F32A2032D4E500389347 /* LocalAuthentication.framework */,
570DAAB0230273D200E8FC04 /* NearField.framework */,
);
-@@ -9415,6 +9454,12 @@
+@@ -9420,6 +9459,12 @@
children = (
9197940423DBC4BB00257892 /* InspectorBrowserAgent.cpp */,
9197940323DBC4BB00257892 /* InspectorBrowserAgent.h */,
@@ -18918,7 +18905,7 @@ index 83999e5f328ec147ef9ff4f503a4be6dd0e8f878..7f4929759e8e4d638052e153d92907ae
);
path = Agents;
sourceTree = "<group>";
-@@ -9423,6 +9468,7 @@
+@@ -9428,6 +9473,7 @@
isa = PBXGroup;
children = (
A5D3504D1D78F0D2005124A9 /* RemoteWebInspectorUIProxyMac.mm */,
@@ -18926,7 +18913,7 @@ index 83999e5f328ec147ef9ff4f503a4be6dd0e8f878..7f4929759e8e4d638052e153d92907ae
1CA8B935127C774E00576C2B /* WebInspectorUIProxyMac.mm */,
99A7ACE326012919006D57FD /* WKInspectorResourceURLSchemeHandler.h */,
99A7ACE42601291A006D57FD /* WKInspectorResourceURLSchemeHandler.mm */,
-@@ -9912,6 +9958,12 @@
+@@ -9917,6 +9963,12 @@
BC032DC310F438260058C15A /* UIProcess */ = {
isa = PBXGroup;
children = (
@@ -18939,7 +18926,7 @@ index 83999e5f328ec147ef9ff4f503a4be6dd0e8f878..7f4929759e8e4d638052e153d92907ae
BC032DC410F4387C0058C15A /* API */,
512F588D12A8836F00629530 /* Authentication */,
9955A6E81C79809000EB6A93 /* Automation */,
-@@ -10210,6 +10262,7 @@
+@@ -10215,6 +10267,7 @@
BC0C376610F807660076D7CB /* C */ = {
isa = PBXGroup;
children = (
@@ -18947,7 +18934,7 @@ index 83999e5f328ec147ef9ff4f503a4be6dd0e8f878..7f4929759e8e4d638052e153d92907ae
5123CF18133D25E60056F800 /* cg */,
6EE849C41368D9040038D481 /* mac */,
BCB63477116BF10600603215 /* WebKit2_C.h */,
-@@ -10805,6 +10858,11 @@
+@@ -10810,6 +10863,11 @@
BCCF085C113F3B7500C650C5 /* mac */ = {
isa = PBXGroup;
children = (
@@ -18959,7 +18946,7 @@ index 83999e5f328ec147ef9ff4f503a4be6dd0e8f878..7f4929759e8e4d638052e153d92907ae
B878B613133428DC006888E9 /* CorrectionPanel.h */,
B878B614133428DC006888E9 /* CorrectionPanel.mm */,
C1817362205844A900DFDA65 /* DisplayLink.cpp */,
-@@ -11637,6 +11695,7 @@
+@@ -11645,6 +11703,7 @@
99788ACB1F421DDA00C08000 /* _WKAutomationSessionConfiguration.h in Headers */,
990D28AC1C6420CF00986977 /* _WKAutomationSessionDelegate.h in Headers */,
990D28B11C65208D00986977 /* _WKAutomationSessionInternal.h in Headers */,
@@ -18967,7 +18954,7 @@ index 83999e5f328ec147ef9ff4f503a4be6dd0e8f878..7f4929759e8e4d638052e153d92907ae
5C4609E7224317B4009943C2 /* _WKContentRuleListAction.h in Headers */,
5C4609E8224317BB009943C2 /* _WKContentRuleListActionInternal.h in Headers */,
1A5704F81BE01FF400874AF1 /* _WKContextMenuElementInfo.h in Headers */,
-@@ -11934,6 +11993,7 @@
+@@ -11942,6 +12001,7 @@
1A14F8E21D74C834006CBEC6 /* FrameInfoData.h in Headers */,
1AE00D611831792100087DD7 /* FrameLoadState.h in Headers */,
5C121E842410208D00486F9B /* FrameTreeNodeData.h in Headers */,
@@ -18975,7 +18962,7 @@ index 83999e5f328ec147ef9ff4f503a4be6dd0e8f878..7f4929759e8e4d638052e153d92907ae
2D4AF0892044C3C4006C8817 /* FrontBoardServicesSPI.h in Headers */,
CD78E1151DB7D7ED0014A2DE /* FullscreenClient.h in Headers */,
CD19D2EA2046406F0017074A /* FullscreenTouchSecheuristic.h in Headers */,
-@@ -11949,6 +12009,7 @@
+@@ -11957,6 +12017,7 @@
4614F13225DED875007006E7 /* GPUProcessConnectionParameters.h in Headers */,
F40BBB41257FF46E0067463A /* GPUProcessWakeupMessageArguments.h in Headers */,
2DA049B8180CCD0A00AAFA9E /* GraphicsLayerCARemote.h in Headers */,
@@ -18983,7 +18970,7 @@ index 83999e5f328ec147ef9ff4f503a4be6dd0e8f878..7f4929759e8e4d638052e153d92907ae
C0CE72AD1247E78D00BC0EC4 /* HandleMessage.h in Headers */,
1AC75A1B1B3368270056745B /* HangDetectionDisabler.h in Headers */,
57AC8F50217FEED90055438C /* HidConnection.h in Headers */,
-@@ -12095,6 +12156,7 @@
+@@ -12103,6 +12164,7 @@
413075AC1DE85F370039EC69 /* NetworkRTCMonitor.h in Headers */,
41DC45961E3D6E2200B11F51 /* NetworkRTCProvider.h in Headers */,
5C20CBA01BB1ECD800895BB1 /* NetworkSession.h in Headers */,
@@ -18991,7 +18978,7 @@ index 83999e5f328ec147ef9ff4f503a4be6dd0e8f878..7f4929759e8e4d638052e153d92907ae
532159551DBAE7290054AA3C /* NetworkSessionCocoa.h in Headers */,
417915B92257046F00D6F97E /* NetworkSocketChannel.h in Headers */,
5183247C26168C62003F239E /* NetworkURLSchemeHandler.h in Headers */,
-@@ -12182,6 +12244,7 @@
+@@ -12190,6 +12252,7 @@
BC1A7C581136E19C00FB7167 /* ProcessLauncher.h in Headers */,
463FD4821EB94EC000A2982C /* ProcessTerminationReason.h in Headers */,
86E67A251910B9D100004AB7 /* ProcessThrottler.h in Headers */,
@@ -18999,7 +18986,7 @@ index 83999e5f328ec147ef9ff4f503a4be6dd0e8f878..7f4929759e8e4d638052e153d92907ae
83048AE61ACA45DC0082C832 /* ProcessThrottlerClient.h in Headers */,
A1E688701F6E2BAB007006A6 /* QuarantineSPI.h in Headers */,
1A0C227E2451130A00ED614D /* QuickLookThumbnailingSoftLink.h in Headers */,
-@@ -12202,6 +12265,7 @@
+@@ -12210,6 +12273,7 @@
CDAC20B423FB58F20021DEE3 /* RemoteCDMInstanceProxy.h in Headers */,
CDAC20CA23FC2F750021DEE3 /* RemoteCDMInstanceSession.h in Headers */,
CDAC20C923FC2F750021DEE3 /* RemoteCDMInstanceSessionIdentifier.h in Headers */,
@@ -19007,7 +18994,7 @@ index 83999e5f328ec147ef9ff4f503a4be6dd0e8f878..7f4929759e8e4d638052e153d92907ae
2D47B56D1810714E003A3AEE /* RemoteLayerBackingStore.h in Headers */,
2DDF731518E95060004F5A66 /* RemoteLayerBackingStoreCollection.h in Headers */,
1AB16AEA164B3A8800290D62 /* RemoteLayerTreeContext.h in Headers */,
-@@ -12513,6 +12577,7 @@
+@@ -12521,6 +12585,7 @@
A543E30D215C8A9000279CD9 /* WebPageInspectorTargetController.h in Headers */,
A543E307215AD13700279CD9 /* WebPageInspectorTargetFrontendChannel.h in Headers */,
C0CE72A11247E71D00BC0EC4 /* WebPageMessages.h in Headers */,
@@ -19015,7 +19002,7 @@ index 83999e5f328ec147ef9ff4f503a4be6dd0e8f878..7f4929759e8e4d638052e153d92907ae
2D5C9D0619C81D8F00B3C5C1 /* WebPageOverlay.h in Headers */,
46C392292316EC4D008EED9B /* WebPageProxyIdentifier.h in Headers */,
BCBD3915125BB1A800D2C29F /* WebPageProxyMessages.h in Headers */,
-@@ -12642,6 +12707,7 @@
+@@ -12650,6 +12715,7 @@
BCD25F1711D6BDE100169B0E /* WKBundleFrame.h in Headers */,
BCF049E611FE20F600F86A58 /* WKBundleFramePrivate.h in Headers */,
BC49862F124D18C100D834E1 /* WKBundleHitTestResult.h in Headers */,
@@ -19023,7 +19010,7 @@ index 83999e5f328ec147ef9ff4f503a4be6dd0e8f878..7f4929759e8e4d638052e153d92907ae
BC204EF211C83EC8008F3375 /* WKBundleInitialize.h in Headers */,
65B86F1E12F11DE300B7DD8A /* WKBundleInspector.h in Headers */,
1A8B66B41BC45B010082DF77 /* WKBundleMac.h in Headers */,
-@@ -12695,6 +12761,7 @@
+@@ -12703,6 +12769,7 @@
5C795D71229F3757003FF1C4 /* WKContextMenuElementInfoPrivate.h in Headers */,
51A555F6128C6C47009ABCEC /* WKContextMenuItem.h in Headers */,
51A55601128C6D92009ABCEC /* WKContextMenuItemTypes.h in Headers */,
@@ -19031,7 +19018,7 @@ index 83999e5f328ec147ef9ff4f503a4be6dd0e8f878..7f4929759e8e4d638052e153d92907ae
A1EA02381DABFF7E0096021F /* WKContextMenuListener.h in Headers */,
BCC938E11180DE440085E5FE /* WKContextPrivate.h in Headers */,
9FB5F395169E6A80002C25BF /* WKContextPrivateMac.h in Headers */,
-@@ -12850,6 +12917,7 @@
+@@ -12858,6 +12925,7 @@
1AB8A1F818400BB800E9AE69 /* WKPageContextMenuClient.h in Headers */,
8372DB251A674C8F00C697C5 /* WKPageDiagnosticLoggingClient.h in Headers */,
1AB8A1F418400B8F00E9AE69 /* WKPageFindClient.h in Headers */,
@@ -19039,7 +19026,7 @@ index 83999e5f328ec147ef9ff4f503a4be6dd0e8f878..7f4929759e8e4d638052e153d92907ae
1AB8A1F618400B9D00E9AE69 /* WKPageFindMatchesClient.h in Headers */,
1AB8A1F018400B0000E9AE69 /* WKPageFormClient.h in Headers */,
BC7B633712A45ABA00D174A4 /* WKPageGroup.h in Headers */,
-@@ -14110,6 +14178,7 @@
+@@ -14136,6 +14204,7 @@
C1A152D724E5A29A00978C8B /* HandleXPCEndpointMessages.mm in Sources */,
2749F6442146561B008380BF /* InjectedBundleNodeHandle.cpp in Sources */,
2749F6452146561E008380BF /* InjectedBundleRangeHandle.cpp in Sources */,
@@ -19047,7 +19034,7 @@ index 83999e5f328ec147ef9ff4f503a4be6dd0e8f878..7f4929759e8e4d638052e153d92907ae
9BF5EC642541145600984E77 /* JSIPCBinding.cpp in Sources */,
2D913441212CF9F000128AFD /* JSNPMethod.cpp in Sources */,
2D913442212CF9F000128AFD /* JSNPObject.cpp in Sources */,
-@@ -14128,6 +14197,7 @@
+@@ -14154,6 +14223,7 @@
2D92A781212B6A7100F493FD /* MessageReceiverMap.cpp in Sources */,
2D92A782212B6A7100F493FD /* MessageSender.cpp in Sources */,
2D92A77A212B6A6100F493FD /* Module.cpp in Sources */,
@@ -19055,7 +19042,7 @@ index 83999e5f328ec147ef9ff4f503a4be6dd0e8f878..7f4929759e8e4d638052e153d92907ae
57B826452304F14000B72EB0 /* NearFieldSoftLink.mm in Sources */,
2D913443212CF9F000128AFD /* NetscapeBrowserFuncs.cpp in Sources */,
2D913444212CF9F000128AFD /* NetscapePlugin.cpp in Sources */,
-@@ -14152,6 +14222,7 @@
+@@ -14178,6 +14248,7 @@
1A2D8439127F65D5001EB962 /* NPObjectMessageReceiverMessageReceiver.cpp in Sources */,
2D92A792212B6AD400F493FD /* NPObjectProxy.cpp in Sources */,
2D92A793212B6AD400F493FD /* NPRemoteObjectMap.cpp in Sources */,
@@ -19063,7 +19050,7 @@ index 83999e5f328ec147ef9ff4f503a4be6dd0e8f878..7f4929759e8e4d638052e153d92907ae
2D913447212CF9F000128AFD /* NPRuntimeObjectMap.cpp in Sources */,
2D913448212CF9F000128AFD /* NPRuntimeUtilities.cpp in Sources */,
2D92A794212B6AD400F493FD /* NPVariantData.cpp in Sources */,
-@@ -14456,6 +14527,7 @@
+@@ -14482,6 +14553,7 @@
2D92A78C212B6AB100F493FD /* WebMouseEvent.cpp in Sources */,
31BA924D148831260062EDB5 /* WebNotificationManagerMessageReceiver.cpp in Sources */,
2DF6FE52212E110900469030 /* WebPage.cpp in Sources */,
@@ -19072,7 +19059,7 @@ index 83999e5f328ec147ef9ff4f503a4be6dd0e8f878..7f4929759e8e4d638052e153d92907ae
BCBD3914125BB1A800D2C29F /* WebPageProxyMessageReceiver.cpp in Sources */,
7CE9CE101FA0767A000177DE /* WebPageUpdatePreferences.cpp in Sources */,
diff --git a/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp b/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp
-index 65774e1459e8c420341801caa61f06086d82de38..81746195a7c5dae6e97e2f1171de564cec7a15c3 100644
+index 4b0b66bebbf7609bca40f928e64018a310d99b5a..78c482769cb9b8fc690d10fba5f9cd79f0b87c4d 100644
--- a/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp
+++ b/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp
@@ -235,6 +235,11 @@ void WebLoaderStrategy::scheduleLoad(ResourceLoader& resourceLoader, CachedResou
@@ -19185,7 +19172,7 @@ index 65774e1459e8c420341801caa61f06086d82de38..81746195a7c5dae6e97e2f1171de564c
{
WebProcess::singleton().ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::SetCaptureExtraNetworkLoadMetricsEnabled(enabled), 0);
diff --git a/Source/WebKit/WebProcess/Network/WebLoaderStrategy.h b/Source/WebKit/WebProcess/Network/WebLoaderStrategy.h
-index 6e56fc4067b3e8945f6598314a26f8bd2a1fb75c..b94e8c8539b46af914c05d04fa80e7253802da57 100644
+index ca2349958666a801b0e0a6bd767dbbcccfb716ae..b5529ff5a2e2fa97bccc21f88689624b3d5a3624 100644
--- a/Source/WebKit/WebProcess/Network/WebLoaderStrategy.h
+++ b/Source/WebKit/WebProcess/Network/WebLoaderStrategy.h
@@ -40,6 +40,7 @@ struct FetchOptions;
@@ -19216,7 +19203,7 @@ index 6e56fc4067b3e8945f6598314a26f8bd2a1fb75c..b94e8c8539b46af914c05d04fa80e725
} // namespace WebKit
diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
-index 4e7b981e1211bff29e7d7302a20d53cb7bfd73a5..fce0de3a025670651e62fa6b9b132e20766bd144 100644
+index e9f46d91f010437d9b9add8fb2876d08c4e9431e..5b4dca84b54905b7c24558ef618c204fe573070b 100644
--- a/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
@@ -398,6 +398,8 @@ void WebChromeClient::setResizable(bool resizable)
@@ -19270,7 +19257,7 @@ index 2eb0886f13ed035a53b8eaa60605de4dfe53fbe3..c46393209cb4f80704bbc9268fad4371
{
}
diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
-index a00ddc8a669487973104921a979cd2e897205008..de144422135fc363d0689c4994f46a2b457c0314 100644
+index 5ed231c855c059edaf73481d50b9318e4ee62102..b429883d1c8bccfa740fcb25bf9f51b0428e1e9b 100644
--- a/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
@@ -1566,13 +1566,6 @@ void WebFrameLoaderClient::transitionToCommittedForNewPage()
@@ -19429,7 +19416,7 @@ index 0000000000000000000000000000000000000000..9b413bb8150a1633d29b6e2606127c9c
+
+#endif // ENABLE(DRAG_SUPPORT)
diff --git a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp
-index e99457c742321b53e1f6ea5dc90ddea86523eb84..9315093f451ffc9afd3f680e37d35d4f7a95fbd2 100644
+index bc6d937bd62c1c9a801080f242b40da6d4c80c2c..cf4afa63bfb6b7b6d1b37456f1ed6ea7b74b2b4a 100644
--- a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp
+++ b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp
@@ -36,7 +36,9 @@
@@ -19579,7 +19566,7 @@ index cdba5ae658de5bda9ef87a2b6ebc99a44d33d658..90d718d74188fcb2ae05ba7b1dd74105
{
if (m_hasRemovedMessageReceiver)
diff --git a/Source/WebKit/WebProcess/WebPage/DrawingArea.h b/Source/WebKit/WebProcess/WebPage/DrawingArea.h
-index d9cd2126be15f5a5b6226b42b9db7c79f195d302..0bfdbd77cd946ded74c75de83e1cb28bab9e45f0 100644
+index bdc3dbee7e58bdcca551b85d9258f70dc34dda9b..a882d868046265efb85f2635adccdad35b31e374 100644
--- a/Source/WebKit/WebProcess/WebPage/DrawingArea.h
+++ b/Source/WebKit/WebProcess/WebPage/DrawingArea.h
@@ -144,6 +144,9 @@ public:
@@ -19593,7 +19580,7 @@ index d9cd2126be15f5a5b6226b42b9db7c79f195d302..0bfdbd77cd946ded74c75de83e1cb28b
virtual void adoptLayersFromDrawingArea(DrawingArea&) { }
virtual void adoptDisplayRefreshMonitorsFromDrawingArea(DrawingArea&) { }
diff --git a/Source/WebKit/WebProcess/WebPage/WebCookieJar.cpp b/Source/WebKit/WebProcess/WebPage/WebCookieJar.cpp
-index 25d9efc539c8b7b21a7041bcf18230868f8cc776..59f68d40c5d8a00e3cdcd2c8b8dbf2da9d48abe1 100644
+index 633828983ef77632392d0dbc2e4a90489e340b9e..91a09a613a0031fc3ba5ee452ac4bb843a216ffe 100644
--- a/Source/WebKit/WebProcess/WebPage/WebCookieJar.cpp
+++ b/Source/WebKit/WebProcess/WebPage/WebCookieJar.cpp
@@ -28,15 +28,19 @@
@@ -19640,7 +19627,7 @@ index 25d9efc539c8b7b21a7041bcf18230868f8cc776..59f68d40c5d8a00e3cdcd2c8b8dbf2da
+
} // namespace WebKit
diff --git a/Source/WebKit/WebProcess/WebPage/WebCookieJar.h b/Source/WebKit/WebProcess/WebPage/WebCookieJar.h
-index 70f87ac8b194b220c285cdb20ed8ceffd7eca28c..b935a85eeb1822a7cdb523efb1805300ec3da7d4 100644
+index bc78502b18b994a3ffa47b933273ebdb84fafde9..f4c95fcbc0a1d618cc51f748a0df82b7ebe20cab 100644
--- a/Source/WebKit/WebProcess/WebPage/WebCookieJar.h
+++ b/Source/WebKit/WebProcess/WebPage/WebCookieJar.h
@@ -52,6 +52,8 @@ public:
@@ -19687,10 +19674,10 @@ index f127d64d005ab7b93875591b94a5899205e91579..df0de26e4dc449a0fbf93e7037444df4
uint64_t m_navigationID;
};
diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.cpp b/Source/WebKit/WebProcess/WebPage/WebPage.cpp
-index 55acd257c15b70d573e3c5bb770754d21c6cd875..f5b6e5add2ed0008a149e523ecfe1d1130cbd282 100644
+index 6a7ec3e2b051595e9539d6680c19d6493e3f6ef6..b0dd825ce54b31fc6f173b09977051881a91d60f 100644
--- a/Source/WebKit/WebProcess/WebPage/WebPage.cpp
+++ b/Source/WebKit/WebProcess/WebPage/WebPage.cpp
-@@ -874,6 +874,9 @@ WebPage::WebPage(PageIdentifier pageID, WebPageCreationParameters&& parameters)
+@@ -875,6 +875,9 @@ WebPage::WebPage(PageIdentifier pageID, WebPageCreationParameters&& parameters)
m_page->setCanUseCredentialStorage(parameters.canUseCredentialStorage);
@@ -19700,7 +19687,7 @@ index 55acd257c15b70d573e3c5bb770754d21c6cd875..f5b6e5add2ed0008a149e523ecfe1d11
updateThrottleState();
}
-@@ -1659,6 +1662,22 @@ void WebPage::platformDidReceiveLoadParameters(const LoadParameters& loadParamet
+@@ -1660,6 +1663,22 @@ void WebPage::platformDidReceiveLoadParameters(const LoadParameters& loadParamet
}
#endif
@@ -19723,7 +19710,7 @@ index 55acd257c15b70d573e3c5bb770754d21c6cd875..f5b6e5add2ed0008a149e523ecfe1d11
void WebPage::loadRequest(LoadParameters&& loadParameters)
{
setLastNavigationWasAppBound(loadParameters.request.isAppBound());
-@@ -1919,17 +1938,13 @@ void WebPage::setSize(const WebCore::IntSize& viewSize)
+@@ -1920,17 +1939,13 @@ void WebPage::setSize(const WebCore::IntSize& viewSize)
view->resize(viewSize);
m_drawingArea->setNeedsDisplay();
@@ -19742,7 +19729,7 @@ index 55acd257c15b70d573e3c5bb770754d21c6cd875..f5b6e5add2ed0008a149e523ecfe1d11
// Viewport properties have no impact on zero sized fixed viewports.
if (m_viewSize.isEmpty())
-@@ -1946,20 +1961,18 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArg
+@@ -1947,20 +1962,18 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArg
ViewportAttributes attr = computeViewportAttributes(viewportArguments, minimumLayoutFallbackWidth, deviceWidth, deviceHeight, 1, m_viewSize);
@@ -19770,7 +19757,7 @@ index 55acd257c15b70d573e3c5bb770754d21c6cd875..f5b6e5add2ed0008a149e523ecfe1d11
#if USE(COORDINATED_GRAPHICS)
m_drawingArea->didChangeViewportAttributes(WTFMove(attr));
-@@ -1967,7 +1980,6 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArg
+@@ -1968,7 +1981,6 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArg
send(Messages::WebPageProxy::DidChangeViewportProperties(attr));
#endif
}
@@ -19778,7 +19765,7 @@ index 55acd257c15b70d573e3c5bb770754d21c6cd875..f5b6e5add2ed0008a149e523ecfe1d11
void WebPage::scrollMainFrameIfNotAtMaxScrollPosition(const IntSize& scrollOffset)
{
-@@ -2262,6 +2274,7 @@ void WebPage::scaleView(double scale)
+@@ -2263,6 +2275,7 @@ void WebPage::scaleView(double scale)
}
m_page->setViewScaleFactor(scale);
@@ -19786,7 +19773,7 @@ index 55acd257c15b70d573e3c5bb770754d21c6cd875..f5b6e5add2ed0008a149e523ecfe1d11
scalePage(pageScale, scrollPositionAtNewScale);
}
-@@ -2366,17 +2379,13 @@ void WebPage::viewportPropertiesDidChange(const ViewportArguments& viewportArgum
+@@ -2367,17 +2380,13 @@ void WebPage::viewportPropertiesDidChange(const ViewportArguments& viewportArgum
viewportConfigurationChanged();
#endif
@@ -19805,7 +19792,7 @@ index 55acd257c15b70d573e3c5bb770754d21c6cd875..f5b6e5add2ed0008a149e523ecfe1d11
}
void WebPage::listenForLayoutMilestones(OptionSet<WebCore::LayoutMilestone> milestones)
-@@ -3243,6 +3252,104 @@ void WebPage::touchEvent(const WebTouchEvent& touchEvent)
+@@ -3244,6 +3253,104 @@ void WebPage::touchEvent(const WebTouchEvent& touchEvent)
send(Messages::WebPageProxy::DidReceiveEvent(static_cast<uint32_t>(touchEvent.type()), handled));
}
@@ -19910,7 +19897,7 @@ index 55acd257c15b70d573e3c5bb770754d21c6cd875..f5b6e5add2ed0008a149e523ecfe1d11
#endif
void WebPage::cancelPointer(WebCore::PointerID pointerId, const WebCore::IntPoint& documentPoint)
-@@ -3319,6 +3426,11 @@ void WebPage::sendMessageToTargetBackend(const String& targetId, const String& m
+@@ -3320,6 +3427,11 @@ void WebPage::sendMessageToTargetBackend(const String& targetId, const String& m
m_inspectorTargetController->sendMessageToTargetBackend(targetId, message);
}
@@ -19922,7 +19909,7 @@ index 55acd257c15b70d573e3c5bb770754d21c6cd875..f5b6e5add2ed0008a149e523ecfe1d11
void WebPage::insertNewlineInQuotedContent()
{
Frame& frame = m_page->focusController().focusedOrMainFrame();
-@@ -3556,6 +3668,7 @@ void WebPage::didCompletePageTransition()
+@@ -3557,6 +3669,7 @@ void WebPage::didCompletePageTransition()
void WebPage::show()
{
send(Messages::WebPageProxy::ShowPage());
@@ -19930,7 +19917,7 @@ index 55acd257c15b70d573e3c5bb770754d21c6cd875..f5b6e5add2ed0008a149e523ecfe1d11
}
void WebPage::setIsTakingSnapshotsForApplicationSuspension(bool isTakingSnapshotsForApplicationSuspension)
-@@ -4279,7 +4392,7 @@ NotificationPermissionRequestManager* WebPage::notificationPermissionRequestMana
+@@ -4297,7 +4410,7 @@ NotificationPermissionRequestManager* WebPage::notificationPermissionRequestMana
#if ENABLE(DRAG_SUPPORT)
@@ -19939,9 +19926,9 @@ index 55acd257c15b70d573e3c5bb770754d21c6cd875..f5b6e5add2ed0008a149e523ecfe1d11
void WebPage::performDragControllerAction(DragControllerAction action, const IntPoint& clientPosition, const IntPoint& globalPosition, OptionSet<DragOperation> draggingSourceOperationMask, SelectionData&& selectionData, OptionSet<DragApplicationFlags> flags)
{
if (!m_page) {
-@@ -6607,6 +6720,9 @@ Ref<DocumentLoader> WebPage::createDocumentLoader(Frame& frame, const ResourceRe
+@@ -6625,6 +6738,9 @@ Ref<DocumentLoader> WebPage::createDocumentLoader(Frame& frame, const ResourceRe
WebsitePoliciesData::applyToDocumentLoader(WTFMove(*m_pendingWebsitePolicies), documentLoader);
- m_pendingWebsitePolicies = WTF::nullopt;
+ m_pendingWebsitePolicies = std::nullopt;
}
+ } else if (m_pendingFrameNavigationID) {
+ documentLoader->setNavigationID(m_pendingFrameNavigationID);
@@ -19950,7 +19937,7 @@ index 55acd257c15b70d573e3c5bb770754d21c6cd875..f5b6e5add2ed0008a149e523ecfe1d11
return documentLoader;
diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.h b/Source/WebKit/WebProcess/WebPage/WebPage.h
-index 1c6fb88173a975d4615f76be0a4953cb2a63f080..e8ad3ad449108e19e880fbeda95cf3799eae9c5b 100644
+index f5cd7ee0933c4da618fa580578ed20779afa6887..90139c38cb1e640d65e09dcfc7723ac213cad59b 100644
--- a/Source/WebKit/WebProcess/WebPage/WebPage.h
+++ b/Source/WebKit/WebProcess/WebPage/WebPage.h
@@ -111,6 +111,10 @@ typedef struct _AtkObject AtkObject;
@@ -19964,7 +19951,7 @@ index 1c6fb88173a975d4615f76be0a4953cb2a63f080..e8ad3ad449108e19e880fbeda95cf379
#if PLATFORM(GTK) || PLATFORM(WPE)
#include "InputMethodState.h"
#endif
-@@ -960,11 +964,11 @@ public:
+@@ -962,11 +966,11 @@ public:
void clearSelection();
void restoreSelectionInFocusedEditableElement();
@@ -19978,7 +19965,7 @@ index 1c6fb88173a975d4615f76be0a4953cb2a63f080..e8ad3ad449108e19e880fbeda95cf379
void performDragControllerAction(DragControllerAction, const WebCore::DragData&, SandboxExtension::Handle&&, SandboxExtension::HandleArray&&);
#endif
-@@ -978,6 +982,9 @@ public:
+@@ -980,6 +984,9 @@ public:
void didStartDrag();
void dragCancelled();
OptionSet<WebCore::DragSourceAction> allowedDragSourceActions() const { return m_allowedDragSourceActions; }
@@ -19988,7 +19975,7 @@ index 1c6fb88173a975d4615f76be0a4953cb2a63f080..e8ad3ad449108e19e880fbeda95cf379
#endif
void beginPrinting(WebCore::FrameIdentifier, const PrintInfo&);
-@@ -1208,6 +1215,7 @@ public:
+@@ -1212,6 +1219,7 @@ public:
void connectInspector(const String& targetId, Inspector::FrontendChannel::ConnectionType);
void disconnectInspector(const String& targetId);
void sendMessageToTargetBackend(const String& targetId, const String& message);
@@ -19996,7 +19983,7 @@ index 1c6fb88173a975d4615f76be0a4953cb2a63f080..e8ad3ad449108e19e880fbeda95cf379
void insertNewlineInQuotedContent();
-@@ -1555,6 +1563,7 @@ private:
+@@ -1559,6 +1567,7 @@ private:
// Actions
void tryClose(CompletionHandler<void(bool)>&&);
void platformDidReceiveLoadParameters(const LoadParameters&);
@@ -20004,7 +19991,7 @@ index 1c6fb88173a975d4615f76be0a4953cb2a63f080..e8ad3ad449108e19e880fbeda95cf379
void loadRequest(LoadParameters&&);
NO_RETURN void loadRequestWaitingForProcessLaunch(LoadParameters&&, URL&&, WebPageProxyIdentifier, bool);
void loadData(LoadParameters&&);
-@@ -1592,6 +1601,7 @@ private:
+@@ -1596,6 +1605,7 @@ private:
void updatePotentialTapSecurityOrigin(const WebTouchEvent&, bool wasHandled);
#elif ENABLE(TOUCH_EVENTS)
void touchEvent(const WebTouchEvent&);
@@ -20012,7 +19999,7 @@ index 1c6fb88173a975d4615f76be0a4953cb2a63f080..e8ad3ad449108e19e880fbeda95cf379
#endif
void cancelPointer(WebCore::PointerID, const WebCore::IntPoint&);
-@@ -1714,9 +1724,7 @@ private:
+@@ -1718,9 +1728,7 @@ private:
void countStringMatches(const String&, OptionSet<FindOptions>, uint32_t maxMatchCount);
void replaceMatches(const Vector<uint32_t>& matchIndices, const String& replacementText, bool selectionOnly, CompletionHandler<void(uint64_t)>&&);
@@ -20022,16 +20009,16 @@ index 1c6fb88173a975d4615f76be0a4953cb2a63f080..e8ad3ad449108e19e880fbeda95cf379
void didChangeSelectedIndexForActivePopupMenu(int32_t newIndex);
void setTextForActivePopupMenu(int32_t index);
-@@ -2240,6 +2248,7 @@ private:
+@@ -2244,6 +2252,7 @@ private:
UserActivity m_userActivity;
uint64_t m_pendingNavigationID { 0 };
+ uint64_t m_pendingFrameNavigationID { 0 };
- Optional<WebsitePoliciesData> m_pendingWebsitePolicies;
+ std::optional<WebsitePoliciesData> m_pendingWebsitePolicies;
bool m_mainFrameProgressCompleted { false };
diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.messages.in b/Source/WebKit/WebProcess/WebPage/WebPage.messages.in
-index 2f3cfe51d524c28a5a974b1f0a0a0e76dec0b0ed..e6b9c3a52e60c842cdb9bcfc7bbf6c6885c919b0 100644
+index 83fe55b0c404a09eb6f477838f86f18056ceb8eb..d4bcf211cb501dc6842638ec1bf39df9958a5f3c 100644
--- a/Source/WebKit/WebProcess/WebPage/WebPage.messages.in
+++ b/Source/WebKit/WebProcess/WebPage/WebPage.messages.in
@@ -133,6 +133,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
@@ -20083,7 +20070,7 @@ index 2f3cfe51d524c28a5a974b1f0a0a0e76dec0b0ed..e6b9c3a52e60c842cdb9bcfc7bbf6c68
RequestDragStart(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, OptionSet<WebCore::DragSourceAction> allowedActionsMask)
RequestAdditionalItemsForDragSession(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, OptionSet<WebCore::DragSourceAction> allowedActionsMask)
diff --git a/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm b/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm
-index 0ac8b876073c8ca391cf64cad82702e17696f5e0..1759015becd9286dfc5d7fd561380afba3aa5ca6 100644
+index a2b78fbf5ba733f4bdec7ff838bf9ce12fa37cd8..57d62390cb9f270bf0c558a6c662fb08ffe5282a 100644
--- a/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm
+++ b/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm
@@ -830,21 +830,37 @@ String WebPage::platformUserAgent(const URL&) const
@@ -20106,7 +20093,7 @@ index 0ac8b876073c8ca391cf64cad82702e17696f5e0..1759015becd9286dfc5d7fd561380afb
+#endif
}
- Optional<PointerCharacteristics> WebPage::pointerCharacteristicsOfPrimaryPointingDevice() const
+ std::optional<PointerCharacteristics> WebPage::pointerCharacteristicsOfPrimaryPointingDevice() const
{
+#if ENABLE(TOUCH_EVENTS)
+ if (screenIsTouchPrimaryInputDevice())
@@ -20125,7 +20112,7 @@ index 0ac8b876073c8ca391cf64cad82702e17696f5e0..1759015becd9286dfc5d7fd561380afb
}
diff --git a/Source/WebKit/WebProcess/WebPage/win/WebPageWin.cpp b/Source/WebKit/WebProcess/WebPage/win/WebPageWin.cpp
-index fbfc1fd3ece09dc3dfd9300dc1d67f045942053b..08a671959b8483760771a790ad6793eb124a9495 100644
+index 8e9454597bb23b22c506f929020fc3c37ffaa71a..9730e673e85da143a3acdda03fb9fa3fb4fb1119 100644
--- a/Source/WebKit/WebProcess/WebPage/win/WebPageWin.cpp
+++ b/Source/WebKit/WebProcess/WebPage/win/WebPageWin.cpp
@@ -43,6 +43,7 @@
@@ -20156,7 +20143,7 @@ index fbfc1fd3ece09dc3dfd9300dc1d67f045942053b..08a671959b8483760771a790ad6793eb
+#endif
}
- Optional<PointerCharacteristics> WebPage::pointerCharacteristicsOfPrimaryPointingDevice() const
+ std::optional<PointerCharacteristics> WebPage::pointerCharacteristicsOfPrimaryPointingDevice() const
{
+#if ENABLE(TOUCH_EVENTS)
+ if (screenIsTouchPrimaryInputDevice())
@@ -20175,7 +20162,7 @@ index fbfc1fd3ece09dc3dfd9300dc1d67f045942053b..08a671959b8483760771a790ad6793eb
}
diff --git a/Source/WebKit/WebProcess/WebProcess.cpp b/Source/WebKit/WebProcess/WebProcess.cpp
-index bbe2005ad6dc1f6c3dcb07ebc81d6e4f43bbef93..eb8008c16d33f608c797c13c78d88f1bb1344c07 100644
+index 788278943a817f3c4def4ad08e685fe3a639907e..5361d8458851e5ebeda4ee68809c39e79f26c228 100644
--- a/Source/WebKit/WebProcess/WebProcess.cpp
+++ b/Source/WebKit/WebProcess/WebProcess.cpp
@@ -87,6 +87,7 @@
@@ -20211,7 +20198,7 @@ index 8987c3964a9308f2454759de7f8972215a3ae416..bcac0afeb94ed8123d1f9fb0b932c849
SetProcessDPIAware();
return true;
diff --git a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
-index 61d6f4e86594dcab7e61790704b709ef5ccc2be0..6b0751c25624b7439391f38fce7843adc0d61648 100644
+index 3889d26709c67da40427525accff4722c20b3746..540db60a88d9199466a334be679ebfdc5815e79b 100644
--- a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
@@ -4237,7 +4237,7 @@ static BOOL currentScrollIsBlit(NSView *clipView)
@@ -20224,7 +20211,7 @@ index 61d6f4e86594dcab7e61790704b709ef5ccc2be0..6b0751c25624b7439391f38fce7843ad
- (void)touch:(WebEvent *)event
{
diff --git a/Source/WebKitLegacy/mac/WebView/WebView.mm b/Source/WebKitLegacy/mac/WebView/WebView.mm
-index 3010a6a88b957c90779146888c66893c4b5d7b17..1f3249ce3490216271255ade048637955fc8a7f1 100644
+index 8a4ec8910ca2f4104e4b59b22f1081200f280f9b..ef1933c8030f40d9deed891fcef31a93ad037c7d 100644
--- a/Source/WebKitLegacy/mac/WebView/WebView.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebView.mm
@@ -4027,7 +4027,7 @@ IGNORE_WARNINGS_END
@@ -20940,7 +20927,7 @@ index 775b41868718ea6734efc9082f8161eee2e0015e..68a720c0cb01d534653a259536c48168
list(APPEND WebKitTestRunnerInjectedBundle_LIBRARIES
diff --git a/Tools/WebKitTestRunner/TestController.cpp b/Tools/WebKitTestRunner/TestController.cpp
-index 181773c45180d4d15243ba8e2d0765c9877e4fc8..c4c619bdd3919e38261d8933f7a753da1fc7c624 100644
+index cfc9c4483c825d913ed27a4d55884f242d76f002..a14886f89ce62981006517ef528481ab2c9ff116 100644
--- a/Tools/WebKitTestRunner/TestController.cpp
+++ b/Tools/WebKitTestRunner/TestController.cpp
@@ -787,6 +787,7 @@ void TestController::createWebViewWithOptions(const TestOptions& options)
@@ -21036,13 +21023,13 @@ index 46388b47a0f433fbdae3874a958fb2d207916c45..d42933e66178ff007a5008dc807483c4
xfonts-utils"
diff --git a/Tools/win/DLLLauncher/DLLLauncherMain.cpp b/Tools/win/DLLLauncher/DLLLauncherMain.cpp
-index 952da8f40429622a5493d4e0334531407ce82270..446dc85cee7f42f33eb50498f3b794e929fb9436 100644
+index 52605867b9302d1afcc56c5e9b0c54acf0827900..6edf24ab60249241ba2969531ef55f4b495dce9e 100644
--- a/Tools/win/DLLLauncher/DLLLauncherMain.cpp
+++ b/Tools/win/DLLLauncher/DLLLauncherMain.cpp
-@@ -101,11 +101,9 @@ static bool prependPath(const wstring& directoryToPrepend)
- static int fatalError(const wstring& programName, const wstring& message)
+@@ -99,11 +99,9 @@ static bool prependPath(const std::wstring& directoryToPrepend)
+ static int fatalError(const std::wstring& programName, const std::wstring& message)
{
- wstring caption = programName + L" can't open.";
+ std::wstring caption = programName + L" can't open.";
-#if USE_CONSOLE_ENTRY_POINT
+// Playwright begin
fwprintf(stderr, L"%s\n%s\n", caption.c_str(), message.c_str());