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 23/09/21 (#9107)

Diego Pino46b5c81f82af
diff --git a/browser_patches/webkit/BUILD_NUMBER b/browser_patches/webkit/BUILD_NUMBER
index 6150fa16fe..b712826218 100644
--- a/browser_patches/webkit/BUILD_NUMBER
+++ b/browser_patches/webkit/BUILD_NUMBER
@@ -1,2 +1,2 @@
-1550
-Changed: [email protected] Mon 27 Sep 2021 04:11:39 PM PDT
+1551
+Changed: [email protected] Wed Sep 29 03:45:05 UTC 2021
diff --git a/browser_patches/webkit/UPSTREAM_CONFIG.sh b/browser_patches/webkit/UPSTREAM_CONFIG.sh
index 958789d640..5d1b182e88 100644
--- a/browser_patches/webkit/UPSTREAM_CONFIG.sh
+++ b/browser_patches/webkit/UPSTREAM_CONFIG.sh
@@ -1,3 +1,3 @@
REMOTE_URL="https://github.com/WebKit/WebKit.git"
BASE_BRANCH="main"
-BASE_REVISION="beeaa88c67c1c2b451e3f7dae32e49825c4a3730"
+BASE_REVISION="6bfc8637e750c252fdfb9388954e34b18e7b9803"
diff --git a/browser_patches/webkit/patches/bootstrap.diff b/browser_patches/webkit/patches/bootstrap.diff
index 791b0df911..b931532da1 100644
--- a/browser_patches/webkit/patches/bootstrap.diff
+++ b/browser_patches/webkit/patches/bootstrap.diff
@@ -1,5 +1,5 @@
diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt
-index 38cb84da056e2b6a6c13ed9f8d70518eaf08958e..c7c390d4d547e7f6bd923437b814ca371dd73121 100644
+index 2fd20d7def92b64d194a754aed1f1acbb8be9a8c..60638e0b8ef2c744cd2144502ce4fb3992695cd3 100644
--- a/Source/JavaScriptCore/CMakeLists.txt
+++ b/Source/JavaScriptCore/CMakeLists.txt
@@ -1323,22 +1323,27 @@ set(JavaScriptCore_INSPECTOR_DOMAINS
@@ -1927,13 +1927,13 @@ index 4345be38811965680c7c8e80d64234e130b16548..d8ea7866e3df2d8dcc6adc7a0dd021c4
Source/third_party/opus/src/celt
Source/third_party/opus/src/include
diff --git a/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp b/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp
-index dbb614f5617bf696427f3f9c4cf843be7693d9b2..e1038d9ee40b1ca0e907883003d32aba7c6dfb21 100644
+index 7327457360d7393e60c6886e5786542208594c63..a26f4944ed40d7abe7315a4b4f3dad0842e38a43 100644
--- a/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp
+++ b/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp
-@@ -326,3 +326,23 @@ __ZNK3rtc13SocketAddresseqERKS0_
- __ZNK3rtc9IPAddress5IsNilEv
+@@ -327,3 +327,23 @@ __ZNK3rtc9IPAddress5IsNilEv
__ZN3rtc12SSLCertChainD1Ev
__ZN6webrtc24SctpTransportInformationD1Ev
+ __ZNK3rtc9IPAddressneERKS0_
+__ZN8mkvmuxer11SegmentInfo15set_writing_appEPKc
+__ZN8mkvmuxer11SegmentInfo4InitEv
+__ZN8mkvmuxer7Segment10OutputCuesEb
@@ -2050,7 +2050,7 @@ index d8677555342ee0168223a0bc3ef54603b1a23460..b9ee7198a702cbc0241de3a33b65a694
41323A1D2665288B00B38623 /* packet_sequencer.cc in Sources */,
4131BF2D234B88200028A615 /* rtc_stats_collector.cc in Sources */,
diff --git a/Source/WTF/Scripts/Preferences/WebPreferences.yaml b/Source/WTF/Scripts/Preferences/WebPreferences.yaml
-index 25afb2508e8cd45df55044d61e62a84a16336bea..c2ed115fa695ba072f9913bfc11ca956dfee651c 100644
+index 2ceac4200afdd11986a88499252288dc5ad63003..b30792cda8ae3d4c5fecf5d0c544b92ba087f2a0 100644
--- a/Source/WTF/Scripts/Preferences/WebPreferences.yaml
+++ b/Source/WTF/Scripts/Preferences/WebPreferences.yaml
@@ -1020,7 +1020,7 @@ InspectorStartsAttached:
@@ -2062,7 +2062,7 @@ index 25afb2508e8cd45df55044d61e62a84a16336bea..c2ed115fa695ba072f9913bfc11ca956
InspectorWindowFrame:
type: String
-@@ -1737,6 +1737,17 @@ PluginsEnabled:
+@@ -1749,6 +1749,17 @@ PluginsEnabled:
WebCore:
default: false
@@ -2081,19 +2081,10 @@ index 25afb2508e8cd45df55044d61e62a84a16336bea..c2ed115fa695ba072f9913bfc11ca956
type: bool
humanReadableName: "Private Click Measurement"
diff --git a/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml b/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml
-index febcd6ef091269394803f9736bb564933a85580a..c01621d37add6e06204b57f37c41936105078a76 100644
+index d773ebc5a19d8a64d1f2eec957f3a464c63b58e4..e707a89df82d7b36902dc0a6f8c9f0aab6b04d51 100644
--- a/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml
+++ b/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml
-@@ -365,7 +365,7 @@ CrossOriginOpenerPolicyEnabled:
- WebKitLegacy:
- default: false
- WebKit:
-- default: true
-+ default: false
- WebCore:
- default: false
-
-@@ -731,9 +731,9 @@ MaskWebGLStringsEnabled:
+@@ -742,9 +742,9 @@ MaskWebGLStringsEnabled:
WebKitLegacy:
default: true
WebKit:
@@ -2105,7 +2096,7 @@ index febcd6ef091269394803f9736bb564933a85580a..c01621d37add6e06204b57f37c419361
# FIXME: This is on by default in WebKit2. Perhaps we should consider turning it on for WebKitLegacy as well.
MediaCapabilitiesExtensionsEnabled:
-@@ -1109,7 +1109,7 @@ SpeechRecognitionEnabled:
+@@ -1144,7 +1144,7 @@ SpeechRecognitionEnabled:
WebKitLegacy:
default: false
WebKit:
@@ -2249,10 +2240,10 @@ index de0b45bd0a88eaba466b6e6c0ad66dc02f525741..81857a2be24fa3ff0a60ebbcd0113096
WTF_EXPORT_PRIVATE LocalTimeOffset calculateLocalTimeOffset(double utcInMilliseconds, TimeType = UTCTime);
diff --git a/Source/WTF/wtf/PlatformEnable.h b/Source/WTF/wtf/PlatformEnable.h
-index 041a3e28ec958a17127c0b027785caafe2bbe246..f2c31838792de5e4601f1efe53c7ce6ac64d97c1 100644
+index 8738d25d1bcc709589b26b2f928f4f8cee60c6f9..414d6a6fc88ebc54f738b0a650ed521e7ae8d828 100644
--- a/Source/WTF/wtf/PlatformEnable.h
+++ b/Source/WTF/wtf/PlatformEnable.h
-@@ -417,7 +417,7 @@
+@@ -413,7 +413,7 @@
#endif
#if !defined(ENABLE_ORIENTATION_EVENTS)
@@ -2261,7 +2252,7 @@ index 041a3e28ec958a17127c0b027785caafe2bbe246..f2c31838792de5e4601f1efe53c7ce6a
#endif
#if OS(WINDOWS)
-@@ -482,7 +482,7 @@
+@@ -474,7 +474,7 @@
#endif
#if !defined(ENABLE_TOUCH_EVENTS)
@@ -2271,7 +2262,7 @@ index 041a3e28ec958a17127c0b027785caafe2bbe246..f2c31838792de5e4601f1efe53c7ce6a
#if !defined(ENABLE_TOUCH_ACTION_REGIONS)
diff --git a/Source/WTF/wtf/PlatformEnableCocoa.h b/Source/WTF/wtf/PlatformEnableCocoa.h
-index cdf426918faeff164e06eca1fe4d06d9aac49ccd..398b443afb05c85a763601a1e8181ac401ae82a3 100644
+index 68ca2ca711427f0db0858de6f798056efa74127d..5b22bad41214f783e951582f790334cd378c53e6 100644
--- a/Source/WTF/wtf/PlatformEnableCocoa.h
+++ b/Source/WTF/wtf/PlatformEnableCocoa.h
@@ -208,7 +208,7 @@
@@ -2296,10 +2287,10 @@ index 4a12b5a4393fe2bbe39673e3fa547c9d6976abd7..678b777736019debbd25fcd72fd34f3d
if (Systemd_FOUND)
diff --git a/Source/WTF/wtf/PlatformHave.h b/Source/WTF/wtf/PlatformHave.h
-index b066e5fc131fc4e8b7fb956795379989f6a85bcc..9008dfb7a119ecb2a391a76507afe3e041b41c70 100644
+index 18e4d511061080e2ffa721589a9bfb9b915d1caa..6ba7bfd782cf63750f7ba9c6bc9e1bf58b07b955 100644
--- a/Source/WTF/wtf/PlatformHave.h
+++ b/Source/WTF/wtf/PlatformHave.h
-@@ -387,7 +387,7 @@
+@@ -391,7 +391,7 @@
#define HAVE_NSHTTPCOOKIESTORAGE__INITWITHIDENTIFIER_WITH_INACCURATE_NULLABILITY 1
#endif
@@ -2321,10 +2312,10 @@ index 643ef0fcdf4f3ce4a1f27bc0cc6e179b7143bbd4..f6ee05b80ebc200d0db74fc7e975d96c
if (Systemd_FOUND)
diff --git a/Source/WebCore/DerivedSources.make b/Source/WebCore/DerivedSources.make
-index cc3301d6ef9062e80a61638e91a52bad1088b116..12ec6cbc6c419932d1b86d583db1894bda2b027c 100644
+index d20243ef8577be3855285157d9a6f754e9757f15..95c91cccf7b5c3cd1a5eb6fac8efb46ba1afb8f8 100644
--- a/Source/WebCore/DerivedSources.make
+++ b/Source/WebCore/DerivedSources.make
-@@ -752,6 +752,10 @@ JS_BINDING_IDLS := \
+@@ -765,6 +765,10 @@ JS_BINDING_IDLS := \
$(WebCore)/dom/Slotable.idl \
$(WebCore)/dom/StaticRange.idl \
$(WebCore)/dom/StringCallback.idl \
@@ -2335,7 +2326,7 @@ index cc3301d6ef9062e80a61638e91a52bad1088b116..12ec6cbc6c419932d1b86d583db1894b
$(WebCore)/dom/Text.idl \
$(WebCore)/dom/TextDecoder.idl \
$(WebCore)/dom/TextDecoderStream.idl \
-@@ -1283,9 +1287,6 @@ JS_BINDING_IDLS := \
+@@ -1302,9 +1306,6 @@ JS_BINDING_IDLS := \
ADDITIONAL_BINDING_IDLS = \
DocumentTouch.idl \
GestureEvent.idl \
@@ -2443,7 +2434,7 @@ index 9f4daefcd385d534149f0a5a6ce0e8016e25638f..37f64495ec9b316bbf0a5e3212917d43
set(CSS_VALUE_PLATFORM_DEFINES "HAVE_OS_DARK_MODE_SUPPORT=1")
diff --git a/Source/WebCore/SourcesCocoa.txt b/Source/WebCore/SourcesCocoa.txt
-index 2afd4c23201851ccbcf0f73344169fcccb8e08b8..390a74feaafc10c2364bcb2da83b19e63a049cfe 100644
+index ca3fa6413d2b1c93f08acf0b1387b8ee3e8b8884..38782cb8de962bff675325e6d3f90d262c70f0c4 100644
--- a/Source/WebCore/SourcesCocoa.txt
+++ b/Source/WebCore/SourcesCocoa.txt
@@ -599,3 +599,9 @@ platform/graphics/angle/ExtensionsGLANGLE.cpp @no-unify
@@ -2457,10 +2448,10 @@ index 2afd4c23201851ccbcf0f73344169fcccb8e08b8..390a74feaafc10c2364bcb2da83b19e6
+JSTouchList.cpp
+// Playwright end
diff --git a/Source/WebCore/SourcesGTK.txt b/Source/WebCore/SourcesGTK.txt
-index e222f66b156a8b7f26b5f98d66e9d7acca3d4d06..2c603f4512a3793afe47064df8bda242cdd9dddf 100644
+index 8973012330948d6ee0835fe4f862927d26430429..c5236b250475f33a21106cf80c5f22ee975043cb 100644
--- a/Source/WebCore/SourcesGTK.txt
+++ b/Source/WebCore/SourcesGTK.txt
-@@ -84,7 +84,7 @@ platform/graphics/egl/GLContextEGLLibWPE.cpp @no-unify
+@@ -91,7 +91,7 @@ platform/graphics/egl/GLContextEGLLibWPE.cpp @no-unify
platform/graphics/egl/GLContextEGLWayland.cpp @no-unify
platform/graphics/egl/GLContextEGLX11.cpp @no-unify
@@ -2470,7 +2461,7 @@ index e222f66b156a8b7f26b5f98d66e9d7acca3d4d06..2c603f4512a3793afe47064df8bda242
platform/graphics/gtk/ColorGtk.cpp
platform/graphics/gtk/DisplayRefreshMonitorGtk.cpp
diff --git a/Source/WebCore/SourcesWPE.txt b/Source/WebCore/SourcesWPE.txt
-index b10c1ece52075b7535da51c2cc316dc9343fd081..8520d6b90ccb2aa2762d83fab0f63c1e7107aed3 100644
+index a9a2791418016991db24d5bf09c9e510c80133b8..04dd5279a51f78cc299eb843c00498f8a0832377 100644
--- a/Source/WebCore/SourcesWPE.txt
+++ b/Source/WebCore/SourcesWPE.txt
@@ -44,6 +44,8 @@ editing/libwpe/EditorLibWPE.cpp
@@ -2508,10 +2499,10 @@ index 9f85e4986c53a1cc8d63b3394d3f7295832af387..1228fda7c688c5b24cecaf07e21437d3
__ZN7WebCore14DocumentLoaderD2Ev
__ZN7WebCore14DocumentLoader17clearMainResourceEv
diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
-index 6958da796b4e14b44384f07fc9c8dfdc1bcccdd8..6f087f8bc946daf2dc526b38b3c7d2e777469d5f 100644
+index 7a81e09dbf9004cf2f2dbeb5eef7888d340e00a7..d41bb333e57c415d7e804cf4fd0a78590132edee 100644
--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
-@@ -5388,6 +5388,14 @@
+@@ -5385,6 +5385,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, ); }; };
@@ -2526,7 +2517,7 @@ index 6958da796b4e14b44384f07fc9c8dfdc1bcccdd8..6f087f8bc946daf2dc526b38b3c7d2e7
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, ); }; };
-@@ -16643,6 +16651,14 @@
+@@ -16708,6 +16716,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>"; };
@@ -2541,7 +2532,7 @@ index 6958da796b4e14b44384f07fc9c8dfdc1bcccdd8..6f087f8bc946daf2dc526b38b3c7d2e7
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>"; };
-@@ -22186,7 +22202,12 @@
+@@ -22310,7 +22326,12 @@
93D6B7A62551D3ED0058DD3A /* DummySpeechRecognitionProvider.h */,
1AF326770D78B9440068F0C4 /* EditorClient.h */,
93C09A800B064F00005ABD4D /* EventHandler.cpp */,
@@ -2554,7 +2545,7 @@ index 6958da796b4e14b44384f07fc9c8dfdc1bcccdd8..6f087f8bc946daf2dc526b38b3c7d2e7
E0FEF371B27C53EAC1C1FBEE /* EventSource.cpp */,
E0FEF371B17C53EAC1C1FBEE /* EventSource.h */,
E0FEF371B07C53EAC1C1FBEE /* EventSource.idl */,
-@@ -27963,6 +27984,8 @@
+@@ -28100,6 +28121,8 @@
29E4D8DF16B0940F00C84704 /* PlatformSpeechSynthesizer.h */,
1AD8F81A11CAB9E900E93E54 /* PlatformStrategies.cpp */,
1AD8F81911CAB9E900E93E54 /* PlatformStrategies.h */,
@@ -2563,7 +2554,7 @@ index 6958da796b4e14b44384f07fc9c8dfdc1bcccdd8..6f087f8bc946daf2dc526b38b3c7d2e7
0FD7C21D23CE41E30096D102 /* PlatformWheelEvent.cpp */,
935C476A09AC4D4F00A6AAB4 /* PlatformWheelEvent.h */,
BCBB8AB513F1AFB000734DF0 /* PODInterval.h */,
-@@ -30158,6 +30181,7 @@
+@@ -30307,6 +30330,7 @@
BCCFBAE70B5152ED0001F1D7 /* DocumentParser.h */,
AD6E71AA1668899D00320C13 /* DocumentSharedObjectPool.cpp */,
AD6E71AB1668899D00320C13 /* DocumentSharedObjectPool.h */,
@@ -2571,7 +2562,7 @@ index 6958da796b4e14b44384f07fc9c8dfdc1bcccdd8..6f087f8bc946daf2dc526b38b3c7d2e7
6BDB5DC1227BD3B800919770 /* DocumentStorageAccess.cpp */,
6BDB5DC0227BD3B800919770 /* DocumentStorageAccess.h */,
7CE7FA5B1EF882300060C9D6 /* DocumentTouch.cpp */,
-@@ -31169,6 +31193,7 @@
+@@ -31318,6 +31342,7 @@
93C4F6EB1108F9A50099D0DB /* AccessibilityScrollbar.h in Headers */,
29489FC712C00F0300D83F0F /* AccessibilityScrollView.h in Headers */,
0709FC4E1025DEE30059CDBA /* AccessibilitySlider.h in Headers */,
@@ -2579,7 +2570,7 @@ index 6958da796b4e14b44384f07fc9c8dfdc1bcccdd8..6f087f8bc946daf2dc526b38b3c7d2e7
29D7BCFA1444AF7D0070619C /* AccessibilitySpinButton.h in Headers */,
69A6CBAD1C6BE42C00B836E9 /* AccessibilitySVGElement.h in Headers */,
AAC08CF315F941FD00F1E188 /* AccessibilitySVGRoot.h in Headers */,
-@@ -33227,6 +33252,7 @@
+@@ -33391,6 +33416,7 @@
6E4ABCD5138EA0B70071D291 /* JSHTMLUnknownElement.h in Headers */,
E44614170CD6826900FADA75 /* JSHTMLVideoElement.h in Headers */,
81BE20D311F4BC3200915DFA /* JSIDBCursor.h in Headers */,
@@ -2587,7 +2578,7 @@ index 6958da796b4e14b44384f07fc9c8dfdc1bcccdd8..6f087f8bc946daf2dc526b38b3c7d2e7
7C3D8EF01E0B21430023B084 /* JSIDBCursorDirection.h in Headers */,
C585A68311D4FB08004C3E4B /* JSIDBDatabase.h in Headers */,
C585A69711D4FB13004C3E4B /* JSIDBFactory.h in Headers */,
-@@ -35316,9 +35342,11 @@
+@@ -35490,9 +35516,11 @@
B2C3DA3A0D006C1D00EF6F26 /* TextCodec.h in Headers */,
26E98A10130A9FCA008EB7B2 /* TextCodecASCIIFastPath.h in Headers */,
DF95B14A24FDAFD300B1F4D7 /* TextCodecCJK.h in Headers */,
@@ -2599,7 +2590,7 @@ index 6958da796b4e14b44384f07fc9c8dfdc1bcccdd8..6f087f8bc946daf2dc526b38b3c7d2e7
B2C3DA400D006C1D00EF6F26 /* TextCodecUserDefined.h in Headers */,
B2C3DA420D006C1D00EF6F26 /* TextCodecUTF16.h in Headers */,
9343CB8212F25E510033C5EE /* TextCodecUTF8.h in Headers */,
-@@ -36272,6 +36300,7 @@
+@@ -36444,6 +36472,7 @@
1ABA76CA11D20E50004C201C /* CSSPropertyNames.cpp in Sources */,
2D22830323A8470700364B7E /* CursorMac.mm in Sources */,
5CBD59592280E926002B22AA /* CustomHeaderFields.cpp in Sources */,
@@ -2607,7 +2598,7 @@ index 6958da796b4e14b44384f07fc9c8dfdc1bcccdd8..6f087f8bc946daf2dc526b38b3c7d2e7
6E72F54C229DCD0C00B3E151 /* ExtensionsGLANGLE.cpp in Sources */,
7CE6CBFD187F394900D46BF5 /* FormatConverter.cpp in Sources */,
5130F2F624AEA60A00E1D0A0 /* GameControllerSoftLink.mm in Sources */,
-@@ -36358,6 +36387,7 @@
+@@ -36527,6 +36556,7 @@
6E72F54F229DCD1300B3E151 /* TemporaryANGLESetting.cpp in Sources */,
CE88EE262414467B007F29C2 /* TextAlternativeWithRange.mm in Sources */,
51DF6D800B92A18E00C2DC85 /* ThreadCheck.mm in Sources */,
@@ -2615,7 +2606,7 @@ index 6958da796b4e14b44384f07fc9c8dfdc1bcccdd8..6f087f8bc946daf2dc526b38b3c7d2e7
538EC8031F96AF81004D22A8 /* UnifiedSource1-mm.mm in Sources */,
538EC8021F96AF81004D22A8 /* UnifiedSource1.cpp in Sources */,
538EC8051F96AF81004D22A8 /* UnifiedSource2-mm.mm in Sources */,
-@@ -36406,6 +36436,7 @@
+@@ -36575,6 +36605,7 @@
538EC8881F993F9C004D22A8 /* UnifiedSource23.cpp in Sources */,
DE5F85801FA1ABF4006DB63A /* UnifiedSource24-mm.mm in Sources */,
538EC8891F993F9D004D22A8 /* UnifiedSource24.cpp in Sources */,
@@ -2623,7 +2614,7 @@ index 6958da796b4e14b44384f07fc9c8dfdc1bcccdd8..6f087f8bc946daf2dc526b38b3c7d2e7
DE5F85811FA1ABF4006DB63A /* UnifiedSource25-mm.mm in Sources */,
538EC88A1F993F9D004D22A8 /* UnifiedSource25.cpp in Sources */,
DE5F85821FA1ABF4006DB63A /* UnifiedSource26-mm.mm in Sources */,
-@@ -36938,6 +36969,7 @@
+@@ -37107,6 +37138,7 @@
2D8B92F1203D13E1009C868F /* UnifiedSource516.cpp in Sources */,
2D8B92F2203D13E1009C868F /* UnifiedSource517.cpp in Sources */,
2D8B92F3203D13E1009C868F /* UnifiedSource518.cpp in Sources */,
@@ -2632,7 +2623,7 @@ index 6958da796b4e14b44384f07fc9c8dfdc1bcccdd8..6f087f8bc946daf2dc526b38b3c7d2e7
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 c6f99faab4a5db170b618ca72c03dc00227eeab2..5d8a30e271d578e7d68efe9b5508ecb22a4d7c55 100644
+index 2e163d33462224857fad29fa0c671996a31419e2..f85304d7d68b555e9e15497d26bae90217ebb757 100644
--- a/Source/WebCore/accessibility/AccessibilityObject.cpp
+++ b/Source/WebCore/accessibility/AccessibilityObject.cpp
@@ -59,6 +59,7 @@
@@ -2663,10 +2654,10 @@ index c6f99faab4a5db170b618ca72c03dc00227eeab2..5d8a30e271d578e7d68efe9b5508ecb2
{
AXComputedObjectAttributeCache* attributeCache = nullptr;
diff --git a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h
-index 7ca2ab5af591635db521991e282b76c1ee603f0f..95974f017ff3d79a1134b7c08bb67085198ec523 100644
+index 9b8a18b4c99f368e770cce06b9645061de4d7b7c..6c62c43ffa3aebdc29698ebfd4f9a4788b21a4bf 100644
--- a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h
+++ b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h
-@@ -99,6 +99,8 @@ namespace WebCore {
+@@ -109,6 +109,8 @@ namespace WebCore {
macro(Database) \
macro(DataTransferItem) \
macro(DataTransferItemList) \
@@ -2675,7 +2666,7 @@ index 7ca2ab5af591635db521991e282b76c1ee603f0f..95974f017ff3d79a1134b7c08bb67085
macro(DocumentTimeline) \
macro(EnterPictureInPictureEvent) \
macro(ExtendableEvent) \
-@@ -169,6 +171,7 @@ namespace WebCore {
+@@ -179,6 +181,7 @@ namespace WebCore {
macro(NavigatorMediaDevices) \
macro(NavigatorPermissions) \
macro(NavigatorUserMedia) \
@@ -2926,7 +2917,7 @@ index 9dd41d6366512fd385937a7608bd3fc9b5b90f60..d6bb529fb891a65c8f6dcc6cff1e718c
#endif // USE(LIBWPE)
diff --git a/Source/WebCore/html/FileInputType.cpp b/Source/WebCore/html/FileInputType.cpp
-index f17189dc0e212107604a4bec63d9bc459f5dea53..d73a51ac7c5accbba5cce62c7918ffed826a500f 100644
+index e0ff53963b570cb1dffd304919cdaf7c4a137404..02d69f4a5e57b6a222c0d9ca9f2373192460e81b 100644
--- a/Source/WebCore/html/FileInputType.cpp
+++ b/Source/WebCore/html/FileInputType.cpp
@@ -36,6 +36,7 @@
@@ -3013,7 +3004,7 @@ index 784bf482fd68da68e1f38fd5cd6bcedc8971dfda..6cdf012453ff31120adbe5946ce23f07
} // namespace WebCore
diff --git a/Source/WebCore/inspector/InspectorInstrumentation.cpp b/Source/WebCore/inspector/InspectorInstrumentation.cpp
-index fe206aea35e67933e2019fc5af1e93afda0e3837..255c6aff8676961aae292b8fb8a849e3b964d841 100644
+index a7ca7162d791ed7fba8cc91c21a2cf3af6e69a7e..0ce597e692a429832a29571928fc66cc365b36dc 100644
--- a/Source/WebCore/inspector/InspectorInstrumentation.cpp
+++ b/Source/WebCore/inspector/InspectorInstrumentation.cpp
@@ -569,6 +569,13 @@ void InspectorInstrumentation::applyUserAgentOverrideImpl(InstrumentingAgents& i
@@ -3097,26 +3088,26 @@ index fe206aea35e67933e2019fc5af1e93afda0e3837..255c6aff8676961aae292b8fb8a849e3
networkAgent->interceptRequest(loader, WTFMove(handler));
}
--void InspectorInstrumentation::interceptResponseImpl(InstrumentingAgents& instrumentingAgents, const ResourceResponse& response, unsigned long identifier, CompletionHandler<void(const ResourceResponse&, RefPtr<SharedBuffer>)>&& handler)
-+void InspectorInstrumentation::interceptResponseImpl(InstrumentingAgents& instrumentingAgents, const ResourceResponse& response, unsigned long identifier, CompletionHandler<void(std::optional<ResourceError>&&, const ResourceResponse&, RefPtr<SharedBuffer>)>&& handler)
+-void InspectorInstrumentation::interceptResponseImpl(InstrumentingAgents& instrumentingAgents, const ResourceResponse& response, ResourceLoaderIdentifier identifier, CompletionHandler<void(const ResourceResponse&, RefPtr<SharedBuffer>)>&& handler)
++void InspectorInstrumentation::interceptResponseImpl(InstrumentingAgents& instrumentingAgents, const ResourceResponse& response, ResourceLoaderIdentifier identifier, CompletionHandler<void(std::optional<ResourceError>&&, const ResourceResponse&, RefPtr<SharedBuffer>)>&& handler)
{
if (auto* networkAgent = instrumentingAgents.enabledNetworkAgent())
networkAgent->interceptResponse(response, identifier, WTFMove(handler));
}
-+void InspectorInstrumentation::interceptDidReceiveDataImpl(InstrumentingAgents& instrumentingAgents, unsigned long identifier, const SharedBuffer& buffer)
++void InspectorInstrumentation::interceptDidReceiveDataImpl(InstrumentingAgents& instrumentingAgents, ResourceLoaderIdentifier identifier, const SharedBuffer& buffer)
+{
+ if (auto* networkAgent = instrumentingAgents.enabledNetworkAgent())
+ networkAgent->interceptDidReceiveData(identifier, buffer);
+}
+
-+void InspectorInstrumentation::interceptDidFinishResourceLoadImpl(InstrumentingAgents& instrumentingAgents, unsigned long identifier)
++void InspectorInstrumentation::interceptDidFinishResourceLoadImpl(InstrumentingAgents& instrumentingAgents, ResourceLoaderIdentifier identifier)
+{
+ if (auto* networkAgent = instrumentingAgents.enabledNetworkAgent())
+ networkAgent->interceptDidFinishResourceLoad(identifier);
+}
+
-+void InspectorInstrumentation::interceptDidFailResourceLoadImpl(InstrumentingAgents& instrumentingAgents, unsigned long identifier, const ResourceError& error)
++void InspectorInstrumentation::interceptDidFailResourceLoadImpl(InstrumentingAgents& instrumentingAgents, ResourceLoaderIdentifier identifier, const ResourceError& error)
+{
+ if (auto* networkAgent = instrumentingAgents.enabledNetworkAgent())
+ networkAgent->interceptDidFailResourceLoad(identifier, error);
@@ -3177,7 +3168,7 @@ index fe206aea35e67933e2019fc5af1e93afda0e3837..255c6aff8676961aae292b8fb8a849e3
{
if (is<Document>(context))
diff --git a/Source/WebCore/inspector/InspectorInstrumentation.h b/Source/WebCore/inspector/InspectorInstrumentation.h
-index 31f05c50f805db579b8c930bc90b9f61a92fac68..352c16433b9fa8990468bc3addd7d49e1b3c5b5b 100644
+index 29202a1156980a486aab96530b55b55a45053187..797ed925a9c78a701c42c37b8d46d25cef24aed8 100644
--- a/Source/WebCore/inspector/InspectorInstrumentation.h
+++ b/Source/WebCore/inspector/InspectorInstrumentation.h
@@ -31,6 +31,7 @@
@@ -3194,9 +3185,9 @@ index 31f05c50f805db579b8c930bc90b9f61a92fac68..352c16433b9fa8990468bc3addd7d49e
#include "Page.h"
+#include "ResourceError.h"
#include "ResourceLoader.h"
+ #include "ResourceLoaderIdentifier.h"
#include "StorageArea.h"
- #include "WebAnimation.h"
-@@ -74,6 +76,7 @@ class DOMWrapperWorld;
+@@ -76,6 +78,7 @@ class DOMWrapperWorld;
class Document;
class DocumentLoader;
class EventListener;
@@ -3204,23 +3195,23 @@ index 31f05c50f805db579b8c930bc90b9f61a92fac68..352c16433b9fa8990468bc3addd7d49e
class HTTPHeaderMap;
class InspectorTimelineAgent;
class InstrumentingAgents;
-@@ -182,6 +185,7 @@ public:
+@@ -186,6 +189,7 @@ public:
static void didRecalculateStyle(Document&);
static void didScheduleStyleRecalculation(Document&);
static void applyUserAgentOverride(Frame&, String&);
+ static void applyPlatformOverride(Frame&, String&);
static void applyEmulatedMedia(Frame&, String&);
- static void willSendRequest(Frame*, unsigned long identifier, DocumentLoader*, ResourceRequest&, const ResourceResponse& redirectResponse, const CachedResource*);
-@@ -191,6 +195,7 @@ public:
- static void didReceiveData(Frame*, unsigned long identifier, const uint8_t* data, int dataLength, int encodedDataLength);
- static void didFinishLoading(Frame*, DocumentLoader*, unsigned long identifier, const NetworkLoadMetrics&, ResourceLoader*);
- static void didFailLoading(Frame*, DocumentLoader*, unsigned long identifier, const ResourceError&);
+ static void willSendRequest(Frame*, ResourceLoaderIdentifier, DocumentLoader*, ResourceRequest&, const ResourceResponse& redirectResponse, const CachedResource*);
+@@ -195,6 +199,7 @@ public:
+ static void didReceiveData(Frame*, ResourceLoaderIdentifier, const uint8_t* data, int dataLength, int encodedDataLength);
+ static void didFinishLoading(Frame*, DocumentLoader*, ResourceLoaderIdentifier, const NetworkLoadMetrics&, ResourceLoader*);
+ static void didFailLoading(Frame*, DocumentLoader*, ResourceLoaderIdentifier, const ResourceError&);
+ static void didReceiveMainResourceError(Frame&, const ResourceError&);
- static void willSendRequest(WorkerOrWorkletGlobalScope&, unsigned long identifier, ResourceRequest&);
- static void didReceiveResourceResponse(WorkerOrWorkletGlobalScope&, unsigned long identifier, const ResourceResponse&);
-@@ -217,11 +222,11 @@ public:
+ static void willSendRequest(WorkerOrWorkletGlobalScope&, ResourceLoaderIdentifier, ResourceRequest&);
+ static void didReceiveResourceResponse(WorkerOrWorkletGlobalScope&, ResourceLoaderIdentifier, const ResourceResponse&);
+@@ -221,11 +226,11 @@ public:
static void frameDetachedFromParent(Frame&);
static void didCommitLoad(Frame&, DocumentLoader*);
static void frameDocumentUpdated(Frame&);
@@ -3233,19 +3224,19 @@ index 31f05c50f805db579b8c930bc90b9f61a92fac68..352c16433b9fa8990468bc3addd7d49e
#if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT)
static void defaultAppearanceDidChange(Page&, bool useDarkAppearance);
#endif
-@@ -231,7 +236,10 @@ public:
+@@ -235,7 +240,10 @@ public:
static bool shouldInterceptRequest(const Frame&, const ResourceRequest&);
static bool shouldInterceptResponse(const Frame&, const ResourceResponse&);
static void interceptRequest(ResourceLoader&, Function<void(const ResourceRequest&)>&&);
-- static void interceptResponse(const Frame&, const ResourceResponse&, unsigned long identifier, CompletionHandler<void(const ResourceResponse&, RefPtr<SharedBuffer>)>&&);
-+ static void interceptResponse(const Frame&, const ResourceResponse&, unsigned long identifier, CompletionHandler<void(std::optional<ResourceError>&&, const ResourceResponse&, RefPtr<SharedBuffer>)>&&);
-+ static void interceptDidReceiveData(const Frame&, unsigned long identifier, const SharedBuffer&);
-+ static void interceptDidFinishResourceLoad(const Frame&, unsigned long identifier);
-+ static void interceptDidFailResourceLoad(const Frame&, unsigned long identifier, const ResourceError& error);
+- static void interceptResponse(const Frame&, const ResourceResponse&, ResourceLoaderIdentifier, CompletionHandler<void(const ResourceResponse&, RefPtr<SharedBuffer>)>&&);
++ static void interceptResponse(const Frame&, const ResourceResponse&, ResourceLoaderIdentifier, CompletionHandler<void(std::optional<ResourceError>&&, const ResourceResponse&, RefPtr<SharedBuffer>)>&&);
++ static void interceptDidReceiveData(const Frame&, ResourceLoaderIdentifier, const SharedBuffer&);
++ static void interceptDidFinishResourceLoad(const Frame&, ResourceLoaderIdentifier);
++ static void interceptDidFailResourceLoad(const Frame&, ResourceLoaderIdentifier, const ResourceError& error);
static void addMessageToConsole(Page&, std::unique_ptr<Inspector::ConsoleMessage>);
static void addMessageToConsole(WorkerOrWorkletGlobalScope&, std::unique_ptr<Inspector::ConsoleMessage>);
-@@ -308,6 +316,12 @@ public:
+@@ -312,6 +320,12 @@ public:
static void layerTreeDidChange(Page*);
static void renderLayerDestroyed(Page*, const RenderLayer&);
@@ -3258,7 +3249,7 @@ index 31f05c50f805db579b8c930bc90b9f61a92fac68..352c16433b9fa8990468bc3addd7d49e
static void frontendCreated();
static void frontendDeleted();
static bool hasFrontends() { return InspectorInstrumentationPublic::hasFrontends(); }
-@@ -324,6 +338,8 @@ public:
+@@ -328,6 +342,8 @@ public:
static void registerInstrumentingAgents(InstrumentingAgents&);
static void unregisterInstrumentingAgents(InstrumentingAgents&);
@@ -3267,23 +3258,23 @@ index 31f05c50f805db579b8c930bc90b9f61a92fac68..352c16433b9fa8990468bc3addd7d49e
private:
static void didClearWindowObjectInWorldImpl(InstrumentingAgents&, Frame&, DOMWrapperWorld&);
static bool isDebuggerPausedImpl(InstrumentingAgents&);
-@@ -401,6 +417,7 @@ private:
+@@ -405,6 +421,7 @@ private:
static void didRecalculateStyleImpl(InstrumentingAgents&);
static void didScheduleStyleRecalculationImpl(InstrumentingAgents&, Document&);
static void applyUserAgentOverrideImpl(InstrumentingAgents&, String&);
+ static void applyPlatformOverrideImpl(InstrumentingAgents&, String&);
static void applyEmulatedMediaImpl(InstrumentingAgents&, String&);
- static void willSendRequestImpl(InstrumentingAgents&, unsigned long identifier, DocumentLoader*, ResourceRequest&, const ResourceResponse& redirectResponse, const CachedResource*);
-@@ -412,6 +429,7 @@ private:
- static void didReceiveDataImpl(InstrumentingAgents&, unsigned long identifier, const uint8_t* data, int dataLength, int encodedDataLength);
- static void didFinishLoadingImpl(InstrumentingAgents&, unsigned long identifier, DocumentLoader*, const NetworkLoadMetrics&, ResourceLoader*);
- static void didFailLoadingImpl(InstrumentingAgents&, unsigned long identifier, DocumentLoader*, const ResourceError&);
+ static void willSendRequestImpl(InstrumentingAgents&, ResourceLoaderIdentifier, DocumentLoader*, ResourceRequest&, const ResourceResponse& redirectResponse, const CachedResource*);
+@@ -416,6 +433,7 @@ private:
+ static void didReceiveDataImpl(InstrumentingAgents&, ResourceLoaderIdentifier, const uint8_t* data, int dataLength, int encodedDataLength);
+ static void didFinishLoadingImpl(InstrumentingAgents&, ResourceLoaderIdentifier, DocumentLoader*, const NetworkLoadMetrics&, ResourceLoader*);
+ static void didFailLoadingImpl(InstrumentingAgents&, ResourceLoaderIdentifier, DocumentLoader*, const ResourceError&);
+ static void didReceiveMainResourceErrorImpl(InstrumentingAgents&, Frame&, const ResourceError&);
static void willLoadXHRSynchronouslyImpl(InstrumentingAgents&);
static void didLoadXHRSynchronouslyImpl(InstrumentingAgents&);
- static void scriptImportedImpl(InstrumentingAgents&, unsigned long identifier, const String& sourceString);
-@@ -422,11 +440,11 @@ private:
+ static void scriptImportedImpl(InstrumentingAgents&, ResourceLoaderIdentifier, const String& sourceString);
+@@ -426,11 +444,11 @@ private:
static void frameDetachedFromParentImpl(InstrumentingAgents&, Frame&);
static void didCommitLoadImpl(InstrumentingAgents&, Frame&, DocumentLoader*);
static void frameDocumentUpdatedImpl(InstrumentingAgents&, Frame&);
@@ -3296,19 +3287,18 @@ index 31f05c50f805db579b8c930bc90b9f61a92fac68..352c16433b9fa8990468bc3addd7d49e
#if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT)
static void defaultAppearanceDidChangeImpl(InstrumentingAgents&, bool useDarkAppearance);
#endif
-@@ -436,7 +454,10 @@ private:
- static bool shouldInterceptRequestImpl(InstrumentingAgents&, const ResourceRequest&);
+@@ -441,6 +459,10 @@ private:
static bool shouldInterceptResponseImpl(InstrumentingAgents&, const ResourceResponse&);
static void interceptRequestImpl(InstrumentingAgents&, ResourceLoader&, Function<void(const ResourceRequest&)>&&);
-- static void interceptResponseImpl(InstrumentingAgents&, const ResourceResponse&, unsigned long identifier, CompletionHandler<void(const ResourceResponse&, RefPtr<SharedBuffer>)>&&);
-+ static void interceptResponseImpl(InstrumentingAgents&, const ResourceResponse&, unsigned long identifier, CompletionHandler<void(std::optional<ResourceError>&&, const ResourceResponse&, RefPtr<SharedBuffer>)>&&);
-+ static void interceptDidReceiveDataImpl(InstrumentingAgents&, unsigned long identifier, const SharedBuffer&);
-+ static void interceptDidFinishResourceLoadImpl(InstrumentingAgents&, unsigned long identifier);
-+ static void interceptDidFailResourceLoadImpl(InstrumentingAgents&, unsigned long identifier, const ResourceError& error);
+ static void interceptResponseImpl(InstrumentingAgents&, const ResourceResponse&, ResourceLoaderIdentifier, CompletionHandler<void(const ResourceResponse&, RefPtr<SharedBuffer>)>&&);
++ static void interceptResponseImpl(InstrumentingAgents&, const ResourceResponse&, ResourceLoaderIdentifier, CompletionHandler<void(std::optional<ResourceError>&&, const ResourceResponse&, RefPtr<SharedBuffer>)>&&);
++ static void interceptDidReceiveDataImpl(InstrumentingAgents&, ResourceLoaderIdentifier, const SharedBuffer&);
++ static void interceptDidFinishResourceLoadImpl(InstrumentingAgents&, ResourceLoaderIdentifier);
++ static void interceptDidFailResourceLoadImpl(InstrumentingAgents&, ResourceLoaderIdentifier, const ResourceError& error);
static void addMessageToConsoleImpl(InstrumentingAgents&, std::unique_ptr<Inspector::ConsoleMessage>);
-@@ -508,6 +529,12 @@ private:
+@@ -512,6 +534,12 @@ private:
static void layerTreeDidChangeImpl(InstrumentingAgents&);
static void renderLayerDestroyedImpl(InstrumentingAgents&, const RenderLayer&);
@@ -3321,7 +3311,7 @@ index 31f05c50f805db579b8c930bc90b9f61a92fac68..352c16433b9fa8990468bc3addd7d49e
static InstrumentingAgents& instrumentingAgents(Page&);
static InstrumentingAgents& instrumentingAgents(WorkerOrWorkletGlobalScope&);
-@@ -1026,6 +1053,13 @@ inline void InspectorInstrumentation::applyUserAgentOverride(Frame& frame, Strin
+@@ -1030,6 +1058,13 @@ inline void InspectorInstrumentation::applyUserAgentOverride(Frame& frame, Strin
applyUserAgentOverrideImpl(*agents, userAgent);
}
@@ -3335,8 +3325,17 @@ index 31f05c50f805db579b8c930bc90b9f61a92fac68..352c16433b9fa8990468bc3addd7d49e
inline void InspectorInstrumentation::applyEmulatedMedia(Frame& frame, String& media)
{
FAST_RETURN_IF_NO_FRONTENDS(void());
-@@ -1109,6 +1143,13 @@ inline void InspectorInstrumentation::didFailLoading(Frame* frame, DocumentLoade
- didFailLoadingImpl(*agents, identifier, loader, error);
+@@ -1080,7 +1115,7 @@ inline void InspectorInstrumentation::didReceiveThreadableLoaderResponse(Documen
+ if (auto* agents = instrumentingAgents(documentThreadableLoader.document()))
+ didReceiveThreadableLoaderResponseImpl(*agents, documentThreadableLoader, identifier);
+ }
+-
++
+ inline void InspectorInstrumentation::didReceiveData(Frame* frame, ResourceLoaderIdentifier identifier, const uint8_t* data, int dataLength, int encodedDataLength)
+ {
+ FAST_RETURN_IF_NO_FRONTENDS(void());
+@@ -1118,6 +1153,13 @@ inline void InspectorInstrumentation::didFailLoading(WorkerOrWorkletGlobalScope&
+ didFailLoadingImpl(instrumentingAgents(globalScope), identifier, nullptr, error);
}
+inline void InspectorInstrumentation::didReceiveMainResourceError(Frame& frame, const ResourceError& error)
@@ -3346,10 +3345,10 @@ index 31f05c50f805db579b8c930bc90b9f61a92fac68..352c16433b9fa8990468bc3addd7d49e
+ didReceiveMainResourceErrorImpl(*agents, frame, error);
+}
+
- inline void InspectorInstrumentation::didFailLoading(WorkerOrWorkletGlobalScope& globalScope, unsigned long identifier, const ResourceError& error)
+ inline void InspectorInstrumentation::continueAfterXFrameOptionsDenied(Frame& frame, ResourceLoaderIdentifier identifier, DocumentLoader& loader, const ResourceResponse& response)
{
- didFailLoadingImpl(instrumentingAgents(globalScope), identifier, nullptr, error);
-@@ -1204,13 +1245,6 @@ inline void InspectorInstrumentation::frameDocumentUpdated(Frame& frame)
+ // Treat the same as didReceiveResponse.
+@@ -1208,13 +1250,6 @@ inline void InspectorInstrumentation::frameDocumentUpdated(Frame& frame)
frameDocumentUpdatedImpl(*agents, frame);
}
@@ -3363,7 +3362,7 @@ index 31f05c50f805db579b8c930bc90b9f61a92fac68..352c16433b9fa8990468bc3addd7d49e
inline void InspectorInstrumentation::frameStartedLoading(Frame& frame)
{
FAST_RETURN_IF_NO_FRONTENDS(void());
-@@ -1239,6 +1273,13 @@ inline void InspectorInstrumentation::frameClearedScheduledNavigation(Frame& fra
+@@ -1243,6 +1278,13 @@ inline void InspectorInstrumentation::frameClearedScheduledNavigation(Frame& fra
frameClearedScheduledNavigationImpl(*agents, frame);
}
@@ -3377,29 +3376,29 @@ index 31f05c50f805db579b8c930bc90b9f61a92fac68..352c16433b9fa8990468bc3addd7d49e
#if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT)
inline void InspectorInstrumentation::defaultAppearanceDidChange(Page& page, bool useDarkAppearance)
{
-@@ -1284,13 +1325,29 @@ inline void InspectorInstrumentation::interceptRequest(ResourceLoader& loader, F
+@@ -1288,13 +1330,29 @@ inline void InspectorInstrumentation::interceptRequest(ResourceLoader& loader, F
interceptRequestImpl(*agents, loader, WTFMove(handler));
}
--inline void InspectorInstrumentation::interceptResponse(const Frame& frame, const ResourceResponse& response, unsigned long identifier, CompletionHandler<void(const ResourceResponse&, RefPtr<SharedBuffer>)>&& handler)
-+inline void InspectorInstrumentation::interceptResponse(const Frame& frame, const ResourceResponse& response, unsigned long identifier, CompletionHandler<void(std::optional<ResourceError>&&, const ResourceResponse&, RefPtr<SharedBuffer>)>&& handler)
+-inline void InspectorInstrumentation::interceptResponse(const Frame& frame, const ResourceResponse& response, ResourceLoaderIdentifier identifier, CompletionHandler<void(const ResourceResponse&, RefPtr<SharedBuffer>)>&& handler)
++inline void InspectorInstrumentation::interceptResponse(const Frame& frame, const ResourceResponse& response, ResourceLoaderIdentifier identifier, CompletionHandler<void(std::optional<ResourceError>&&, const ResourceResponse&, RefPtr<SharedBuffer>)>&& handler)
{
ASSERT(InspectorInstrumentation::shouldInterceptResponse(frame, response));
if (auto* agents = instrumentingAgents(frame))
interceptResponseImpl(*agents, response, identifier, WTFMove(handler));
}
-+inline void InspectorInstrumentation::interceptDidReceiveData(const Frame& frame, unsigned long identifier, const SharedBuffer& buffer)
++inline void InspectorInstrumentation::interceptDidReceiveData(const Frame& frame, ResourceLoaderIdentifier identifier, const SharedBuffer& buffer)
+{
+ if (auto* agents = instrumentingAgents(frame))
+ interceptDidReceiveDataImpl(*agents, identifier, buffer);
+}
-+inline void InspectorInstrumentation::interceptDidFinishResourceLoad(const Frame& frame, unsigned long identifier)
++inline void InspectorInstrumentation::interceptDidFinishResourceLoad(const Frame& frame, ResourceLoaderIdentifier identifier)
+{
+ if (auto* agents = instrumentingAgents(frame))
+ interceptDidFinishResourceLoadImpl(*agents, identifier);
+}
-+inline void InspectorInstrumentation::interceptDidFailResourceLoad(const Frame& frame, unsigned long identifier, const ResourceError& error)
++inline void InspectorInstrumentation::interceptDidFailResourceLoad(const Frame& frame, ResourceLoaderIdentifier identifier, const ResourceError& error)
+{
+ if (auto* agents = instrumentingAgents(frame))
+ interceptDidFailResourceLoadImpl(*agents, identifier, error);
@@ -3408,7 +3407,7 @@ index 31f05c50f805db579b8c930bc90b9f61a92fac68..352c16433b9fa8990468bc3addd7d49e
inline void InspectorInstrumentation::didOpenDatabase(Database& database)
{
FAST_RETURN_IF_NO_FRONTENDS(void());
-@@ -1669,6 +1726,42 @@ inline void InspectorInstrumentation::renderLayerDestroyed(Page* page, const Ren
+@@ -1673,6 +1731,42 @@ inline void InspectorInstrumentation::renderLayerDestroyed(Page* page, const Ren
renderLayerDestroyedImpl(*agents, renderLayer);
}
@@ -3452,37 +3451,37 @@ index 31f05c50f805db579b8c930bc90b9f61a92fac68..352c16433b9fa8990468bc3addd7d49e
{
return context ? instrumentingAgents(*context) : nullptr;
diff --git a/Source/WebCore/inspector/InspectorInstrumentationWebKit.cpp b/Source/WebCore/inspector/InspectorInstrumentationWebKit.cpp
-index 73163278cca3998f4f0122d5cb0577da46a50747..a7616f9d2d503a6547c2f5c0779f8154db1aef54 100644
+index 61e4bc3ba019ee25e5c8bc221dff6077eddb863d..51e2be3691f10d9fe755ce919e31d8a2414c799b 100644
--- a/Source/WebCore/inspector/InspectorInstrumentationWebKit.cpp
+++ b/Source/WebCore/inspector/InspectorInstrumentationWebKit.cpp
@@ -45,9 +45,24 @@ void InspectorInstrumentationWebKit::interceptRequestInternal(ResourceLoader& lo
InspectorInstrumentation::interceptRequest(loader, WTFMove(handler));
}
--void InspectorInstrumentationWebKit::interceptResponseInternal(const Frame& frame, const ResourceResponse& response, unsigned long identifier, CompletionHandler<void(const ResourceResponse&, RefPtr<SharedBuffer>)>&& handler)
-+void InspectorInstrumentationWebKit::interceptResponseInternal(const Frame& frame, const ResourceResponse& response, unsigned long identifier, CompletionHandler<void(std::optional<ResourceError>&& error, const ResourceResponse&, RefPtr<SharedBuffer>)>&& handler)
+-void InspectorInstrumentationWebKit::interceptResponseInternal(const Frame& frame, const ResourceResponse& response, ResourceLoaderIdentifier identifier, CompletionHandler<void(const ResourceResponse&, RefPtr<SharedBuffer>)>&& handler)
++void InspectorInstrumentationWebKit::interceptResponseInternal(const Frame& frame, const ResourceResponse& response, ResourceLoaderIdentifier identifier, CompletionHandler<void(std::optional<ResourceError>&& error, const ResourceResponse&, RefPtr<SharedBuffer>)>&& handler)
{
InspectorInstrumentation::interceptResponse(frame, response, identifier, WTFMove(handler));
}
-+void InspectorInstrumentationWebKit::interceptDidReceiveDataInternal(const Frame& frame, unsigned long identifier, const SharedBuffer& buffer)
++void InspectorInstrumentationWebKit::interceptDidReceiveDataInternal(const Frame& frame, ResourceLoaderIdentifier identifier, const SharedBuffer& buffer)
+{
+ InspectorInstrumentation::interceptDidReceiveData(frame, identifier, buffer);
+}
+
-+void InspectorInstrumentationWebKit::interceptDidFinishResourceLoadInternal(const Frame& frame, unsigned long identifier)
++void InspectorInstrumentationWebKit::interceptDidFinishResourceLoadInternal(const Frame& frame, ResourceLoaderIdentifier identifier)
+{
+ InspectorInstrumentation::interceptDidFinishResourceLoad(frame, identifier);
+}
+
-+void InspectorInstrumentationWebKit::interceptDidFailResourceLoadInternal(const Frame& frame, unsigned long identifier, const ResourceError& error)
++void InspectorInstrumentationWebKit::interceptDidFailResourceLoadInternal(const Frame& frame, ResourceLoaderIdentifier identifier, const ResourceError& error)
+{
+ InspectorInstrumentation::interceptDidFailResourceLoad(frame, identifier, error);
+}
+
} // namespace WebCore
diff --git a/Source/WebCore/inspector/InspectorInstrumentationWebKit.h b/Source/WebCore/inspector/InspectorInstrumentationWebKit.h
-index bffc870806476538115e80f20ddca4e8222e629b..fd1fc1eab9f9f2499a529e7d038e3c9cea2a748d 100644
+index f76114ce98f42a7ff906a48d0420b96305d36914..e3be41d7e9e5d2ae5872424df2ed6cbf0453d56d 100644
--- a/Source/WebCore/inspector/InspectorInstrumentationWebKit.h
+++ b/Source/WebCore/inspector/InspectorInstrumentationWebKit.h
@@ -26,6 +26,7 @@
@@ -3505,21 +3504,21 @@ index bffc870806476538115e80f20ddca4e8222e629b..fd1fc1eab9f9f2499a529e7d038e3c9c
static bool shouldInterceptRequest(const Frame*, const ResourceRequest&);
static bool shouldInterceptResponse(const Frame*, const ResourceResponse&);
static void interceptRequest(ResourceLoader&, Function<void(const ResourceRequest&)>&&);
-- static void interceptResponse(const Frame*, const ResourceResponse&, unsigned long identifier, CompletionHandler<void(const ResourceResponse&, RefPtr<SharedBuffer>)>&&);
-+ static void interceptResponse(const Frame*, const ResourceResponse&, unsigned long identifier, CompletionHandler<void(std::optional<ResourceError>&& error, const ResourceResponse&, RefPtr<SharedBuffer>)>&&);
-+ static void interceptDidReceiveData(const Frame*, unsigned long identifier, const SharedBuffer&);
-+ static void interceptDidFinishResourceLoad(const Frame*, unsigned long identifier);
-+ static void interceptDidFailResourceLoad(const Frame*, unsigned long identifier, const ResourceError& error);
+- static void interceptResponse(const Frame*, const ResourceResponse&, ResourceLoaderIdentifier, CompletionHandler<void(const ResourceResponse&, RefPtr<SharedBuffer>)>&&);
++ static void interceptResponse(const Frame*, const ResourceResponse&, ResourceLoaderIdentifier identifier, CompletionHandler<void(std::optional<ResourceError>&& error, const ResourceResponse&, RefPtr<SharedBuffer>)>&&);
++ static void interceptDidReceiveData(const Frame*, ResourceLoaderIdentifier identifier, const SharedBuffer&);
++ static void interceptDidFinishResourceLoad(const Frame*, ResourceLoaderIdentifier identifier);
++ static void interceptDidFailResourceLoad(const Frame*, ResourceLoaderIdentifier identifier, const ResourceError& error);
private:
static bool shouldInterceptRequestInternal(const Frame&, const ResourceRequest&);
static bool shouldInterceptResponseInternal(const Frame&, const ResourceResponse&);
static void interceptRequestInternal(ResourceLoader&, Function<void(const ResourceRequest&)>&&);
-- static void interceptResponseInternal(const Frame&, const ResourceResponse&, unsigned long identifier, CompletionHandler<void(const ResourceResponse&, RefPtr<SharedBuffer>)>&&);
-+ static void interceptResponseInternal(const Frame&, const ResourceResponse&, unsigned long identifier, CompletionHandler<void(std::optional<ResourceError>&& error, const ResourceResponse&, RefPtr<SharedBuffer>)>&&);
-+ static void interceptDidReceiveDataInternal(const Frame&, unsigned long identifier, const SharedBuffer&);
-+ static void interceptDidFinishResourceLoadInternal(const Frame&, unsigned long identifier);
-+ static void interceptDidFailResourceLoadInternal(const Frame&, unsigned long identifier, const ResourceError& error);
+- static void interceptResponseInternal(const Frame&, const ResourceResponse&, ResourceLoaderIdentifier, CompletionHandler<void(const ResourceResponse&, RefPtr<SharedBuffer>)>&&);
++ static void interceptResponseInternal(const Frame&, const ResourceResponse&, ResourceLoaderIdentifier identifier, CompletionHandler<void(std::optional<ResourceError>&& error, const ResourceResponse&, RefPtr<SharedBuffer>)>&&);
++ static void interceptDidReceiveDataInternal(const Frame&, ResourceLoaderIdentifier identifier, const SharedBuffer&);
++ static void interceptDidFinishResourceLoadInternal(const Frame&, ResourceLoaderIdentifier identifier);
++ static void interceptDidFailResourceLoadInternal(const Frame&, ResourceLoaderIdentifier identifier, const ResourceError& error);
};
inline bool InspectorInstrumentationWebKit::shouldInterceptRequest(const Frame* frame, const ResourceRequest& request)
@@ -3527,14 +3526,14 @@ index bffc870806476538115e80f20ddca4e8222e629b..fd1fc1eab9f9f2499a529e7d038e3c9c
interceptRequestInternal(loader, WTFMove(handler));
}
--inline void InspectorInstrumentationWebKit::interceptResponse(const Frame* frame, const ResourceResponse& response, unsigned long identifier, CompletionHandler<void(const ResourceResponse&, RefPtr<SharedBuffer>)>&& handler)
-+inline void InspectorInstrumentationWebKit::interceptResponse(const Frame* frame, const ResourceResponse& response, unsigned long identifier, CompletionHandler<void(std::optional<ResourceError>&& error, const ResourceResponse&, RefPtr<SharedBuffer>)>&& handler)
+-inline void InspectorInstrumentationWebKit::interceptResponse(const Frame* frame, const ResourceResponse& response, ResourceLoaderIdentifier identifier, CompletionHandler<void(const ResourceResponse&, RefPtr<SharedBuffer>)>&& handler)
++inline void InspectorInstrumentationWebKit::interceptResponse(const Frame* frame, const ResourceResponse& response, ResourceLoaderIdentifier identifier, CompletionHandler<void(std::optional<ResourceError>&& error, const ResourceResponse&, RefPtr<SharedBuffer>)>&& handler)
{
ASSERT(InspectorInstrumentationWebKit::shouldInterceptResponse(frame, response));
interceptResponseInternal(*frame, response, identifier, WTFMove(handler));
}
-+inline void InspectorInstrumentationWebKit::interceptDidReceiveData(const Frame* frame, unsigned long identifier, const SharedBuffer& buffer)
++inline void InspectorInstrumentationWebKit::interceptDidReceiveData(const Frame* frame, ResourceLoaderIdentifier identifier, const SharedBuffer& buffer)
+{
+ if (!frame)
+ return;
@@ -3542,7 +3541,7 @@ index bffc870806476538115e80f20ddca4e8222e629b..fd1fc1eab9f9f2499a529e7d038e3c9c
+ interceptDidReceiveDataInternal(*frame, identifier, buffer);
+}
+
-+inline void InspectorInstrumentationWebKit::interceptDidFinishResourceLoad(const Frame* frame, unsigned long identifier)
++inline void InspectorInstrumentationWebKit::interceptDidFinishResourceLoad(const Frame* frame, ResourceLoaderIdentifier identifier)
+{
+ if (!frame)
+ return;
@@ -3550,7 +3549,7 @@ index bffc870806476538115e80f20ddca4e8222e629b..fd1fc1eab9f9f2499a529e7d038e3c9c
+ interceptDidFinishResourceLoadInternal(*frame, identifier);
+}
+
-+inline void InspectorInstrumentationWebKit::interceptDidFailResourceLoad(const Frame* frame, unsigned long identifier, const ResourceError& error)
++inline void InspectorInstrumentationWebKit::interceptDidFailResourceLoad(const Frame* frame, ResourceLoaderIdentifier identifier, const ResourceError& error)
+{
+ if (!frame)
+ return;
@@ -3952,7 +3951,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 7948852dd9a6bc42b40116941ce0346c32e16f2d..13e7b4eaf2a95575439d20b68e5cce1cc05f9144 100644
+index 37468432577f64e3d18bc3667ca298f43a3bf503..81e54d04c6142b29241ec5379470ef475a6983de 100644
--- a/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp
+++ b/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp
@@ -45,6 +45,7 @@
@@ -3979,7 +3978,7 @@ index 7948852dd9a6bc42b40116941ce0346c32e16f2d..13e7b4eaf2a95575439d20b68e5cce1c
namespace WebCore {
-@@ -305,8 +308,8 @@ static Ref<Protocol::Network::Request> buildObjectForResourceRequest(const Resou
+@@ -307,8 +310,8 @@ static Ref<Protocol::Network::Request> buildObjectForResourceRequest(const Resou
.setHeaders(buildObjectForHeaders(request.httpHeaderFields()))
.release();
if (request.httpBody() && !request.httpBody()->isEmpty()) {
@@ -3990,7 +3989,7 @@ index 7948852dd9a6bc42b40116941ce0346c32e16f2d..13e7b4eaf2a95575439d20b68e5cce1c
}
return requestObject;
}
-@@ -351,6 +354,8 @@ RefPtr<Protocol::Network::Response> InspectorNetworkAgent::buildObjectForResourc
+@@ -353,6 +356,8 @@ RefPtr<Protocol::Network::Response> InspectorNetworkAgent::buildObjectForResourc
.setSource(responseSource(response.source()))
.release();
@@ -3998,10 +3997,10 @@ index 7948852dd9a6bc42b40116941ce0346c32e16f2d..13e7b4eaf2a95575439d20b68e5cce1c
+
if (resourceLoader) {
auto* metrics = response.deprecatedNetworkLoadMetricsOrNull();
- responseObject->setTiming(buildObjectForTiming(metrics ? *metrics : NetworkLoadMetrics { }, *resourceLoader));
-@@ -488,9 +493,15 @@ static InspectorPageAgent::ResourceType resourceTypeForLoadType(InspectorInstrum
+ responseObject->setTiming(buildObjectForTiming(metrics ? *metrics : NetworkLoadMetrics::emptyMetrics(), *resourceLoader));
+@@ -490,9 +495,15 @@ static InspectorPageAgent::ResourceType resourceTypeForLoadType(InspectorInstrum
- void InspectorNetworkAgent::willSendRequest(unsigned long identifier, DocumentLoader* loader, ResourceRequest& request, const ResourceResponse& redirectResponse, const CachedResource* cachedResource)
+ void InspectorNetworkAgent::willSendRequest(ResourceLoaderIdentifier identifier, DocumentLoader* loader, ResourceRequest& request, const ResourceResponse& redirectResponse, const CachedResource* cachedResource)
{
- if (!cachedResource && loader)
- cachedResource = InspectorPageAgent::cachedResource(loader->frame(), request.url());
@@ -4017,8 +4016,8 @@ index 7948852dd9a6bc42b40116941ce0346c32e16f2d..13e7b4eaf2a95575439d20b68e5cce1c
+ willSendRequest(identifier, loader, request, redirectResponse, resourceType);
}
- void InspectorNetworkAgent::willSendRequestOfType(unsigned long identifier, DocumentLoader* loader, ResourceRequest& request, InspectorInstrumentation::LoadType loadType)
-@@ -950,6 +961,18 @@ Protocol::ErrorStringOr<std::tuple<String, bool /* base64Encoded */>> InspectorN
+ void InspectorNetworkAgent::willSendRequestOfType(ResourceLoaderIdentifier identifier, DocumentLoader* loader, ResourceRequest& request, InspectorInstrumentation::LoadType loadType)
+@@ -952,6 +963,18 @@ Protocol::ErrorStringOr<std::tuple<String, bool /* base64Encoded */>> InspectorN
return makeUnexpected("Missing content of resource for given requestId"_s);
}
@@ -4037,7 +4036,7 @@ index 7948852dd9a6bc42b40116941ce0346c32e16f2d..13e7b4eaf2a95575439d20b68e5cce1c
Protocol::ErrorStringOr<void> InspectorNetworkAgent::setResourceCachingDisabled(bool disabled)
{
setResourceCachingDisabledInternal(disabled);
-@@ -1104,8 +1127,7 @@ bool InspectorNetworkAgent::willIntercept(const ResourceRequest& request)
+@@ -1106,8 +1129,7 @@ bool InspectorNetworkAgent::willIntercept(const ResourceRequest& request)
if (!m_interceptionEnabled)
return false;
@@ -4047,17 +4046,17 @@ index 7948852dd9a6bc42b40116941ce0346c32e16f2d..13e7b4eaf2a95575439d20b68e5cce1c
}
bool InspectorNetworkAgent::shouldInterceptRequest(const ResourceRequest& request)
-@@ -1138,7 +1160,7 @@ void InspectorNetworkAgent::interceptRequest(ResourceLoader& loader, Function<vo
+@@ -1140,7 +1162,7 @@ void InspectorNetworkAgent::interceptRequest(ResourceLoader& loader, Function<vo
m_frontendDispatcher->requestIntercepted(requestId, buildObjectForResourceRequest(loader.request()));
}
--void InspectorNetworkAgent::interceptResponse(const ResourceResponse& response, unsigned long identifier, CompletionHandler<void(const ResourceResponse&, RefPtr<SharedBuffer>)>&& handler)
-+void InspectorNetworkAgent::interceptResponse(const ResourceResponse& response, unsigned long identifier, CompletionHandler<void(std::optional<ResourceError>&&, const ResourceResponse&, RefPtr<SharedBuffer>)>&& handler)
+-void InspectorNetworkAgent::interceptResponse(const ResourceResponse& response, ResourceLoaderIdentifier identifier, CompletionHandler<void(const ResourceResponse&, RefPtr<SharedBuffer>)>&& handler)
++void InspectorNetworkAgent::interceptResponse(const ResourceResponse& response, ResourceLoaderIdentifier identifier, CompletionHandler<void(std::optional<ResourceError>&&, const ResourceResponse&, RefPtr<SharedBuffer>)>&& handler)
{
ASSERT(m_enabled);
ASSERT(m_interceptionEnabled);
-@@ -1146,7 +1168,7 @@ void InspectorNetworkAgent::interceptResponse(const ResourceResponse& response,
- String requestId = IdentifiersFactory::requestId(identifier);
+@@ -1148,7 +1170,7 @@ void InspectorNetworkAgent::interceptResponse(const ResourceResponse& response,
+ String requestId = IdentifiersFactory::requestId(identifier.toUInt64());
if (m_pendingInterceptResponses.contains(requestId)) {
ASSERT_NOT_REACHED();
- handler(response, nullptr);
@@ -4065,7 +4064,7 @@ index 7948852dd9a6bc42b40116941ce0346c32e16f2d..13e7b4eaf2a95575439d20b68e5cce1c
return;
}
-@@ -1159,6 +1181,62 @@ void InspectorNetworkAgent::interceptResponse(const ResourceResponse& response,
+@@ -1161,6 +1183,62 @@ void InspectorNetworkAgent::interceptResponse(const ResourceResponse& response,
m_frontendDispatcher->responseIntercepted(requestId, resourceResponse.releaseNonNull());
}
@@ -4098,9 +4097,9 @@ index 7948852dd9a6bc42b40116941ce0346c32e16f2d..13e7b4eaf2a95575439d20b68e5cce1c
+ return { };
+}
+
-+void InspectorNetworkAgent::interceptDidReceiveData(unsigned long identifier, const SharedBuffer& buffer)
++void InspectorNetworkAgent::interceptDidReceiveData(ResourceLoaderIdentifier identifier, const SharedBuffer& buffer)
+{
-+ String requestId = IdentifiersFactory::requestId(identifier);
++ String requestId = IdentifiersFactory::requestId(identifier.toUInt64());
+ auto* interceptedResponse = m_pendingInterceptResponses.get(requestId);
+ if (!interceptedResponse) {
+ ASSERT_NOT_REACHED();
@@ -4109,9 +4108,9 @@ index 7948852dd9a6bc42b40116941ce0346c32e16f2d..13e7b4eaf2a95575439d20b68e5cce1c
+ interceptedResponse->didReceiveData(buffer);
+}
+
-+void InspectorNetworkAgent::interceptDidFinishResourceLoad(unsigned long identifier)
++void InspectorNetworkAgent::interceptDidFinishResourceLoad(ResourceLoaderIdentifier identifier)
+{
-+ String requestId = IdentifiersFactory::requestId(identifier);
++ String requestId = IdentifiersFactory::requestId(identifier.toUInt64());
+ auto* interceptedResponse = m_pendingInterceptResponses.get(requestId);
+ if (!interceptedResponse) {
+ ASSERT_NOT_REACHED();
@@ -4120,7 +4119,7 @@ index 7948852dd9a6bc42b40116941ce0346c32e16f2d..13e7b4eaf2a95575439d20b68e5cce1c
+ interceptedResponse->didFinishLoading();
+}
+
-+void InspectorNetworkAgent::interceptDidFailResourceLoad(unsigned long identifier, const ResourceError&)
++void InspectorNetworkAgent::interceptDidFailResourceLoad(ResourceLoaderIdentifier identifier, const ResourceError&)
+{
+ interceptDidFinishResourceLoad(identifier);
+}
@@ -4128,7 +4127,7 @@ index 7948852dd9a6bc42b40116941ce0346c32e16f2d..13e7b4eaf2a95575439d20b68e5cce1c
Protocol::ErrorStringOr<void> InspectorNetworkAgent::interceptContinue(const Protocol::Network::RequestId& requestId, Protocol::Network::NetworkStage networkStage)
{
switch (networkStage) {
-@@ -1188,6 +1266,9 @@ Protocol::ErrorStringOr<void> InspectorNetworkAgent::interceptWithRequest(const
+@@ -1190,6 +1268,9 @@ Protocol::ErrorStringOr<void> InspectorNetworkAgent::interceptWithRequest(const
return makeUnexpected("Missing pending intercept request for given requestId"_s);
auto& loader = *pendingRequest->m_loader;
@@ -4138,7 +4137,7 @@ index 7948852dd9a6bc42b40116941ce0346c32e16f2d..13e7b4eaf2a95575439d20b68e5cce1c
ResourceRequest request = loader.request();
if (!!url)
request.setURL(URL({ }, url));
-@@ -1287,14 +1368,24 @@ Protocol::ErrorStringOr<void> InspectorNetworkAgent::interceptRequestWithRespons
+@@ -1289,14 +1370,24 @@ Protocol::ErrorStringOr<void> InspectorNetworkAgent::interceptRequestWithRespons
response.setHTTPStatusCode(status);
response.setHTTPStatusText(statusText);
HTTPHeaderMap explicitHeaders;
@@ -4163,7 +4162,7 @@ index 7948852dd9a6bc42b40116941ce0346c32e16f2d..13e7b4eaf2a95575439d20b68e5cce1c
if (buffer->size())
loader->didReceiveBuffer(WTFMove(buffer), buffer->size(), DataPayloadWholeResource);
loader->didFinishLoading(NetworkLoadMetrics());
-@@ -1335,6 +1426,12 @@ Protocol::ErrorStringOr<void> InspectorNetworkAgent::interceptRequestWithError(c
+@@ -1337,6 +1428,12 @@ Protocol::ErrorStringOr<void> InspectorNetworkAgent::interceptRequestWithError(c
return { };
}
@@ -4176,7 +4175,7 @@ index 7948852dd9a6bc42b40116941ce0346c32e16f2d..13e7b4eaf2a95575439d20b68e5cce1c
bool InspectorNetworkAgent::shouldTreatAsText(const String& mimeType)
{
return startsWithLettersIgnoringASCIICase(mimeType, "text/")
-@@ -1376,6 +1473,12 @@ std::optional<String> InspectorNetworkAgent::textContentForCachedResource(Cached
+@@ -1378,6 +1475,12 @@ std::optional<String> InspectorNetworkAgent::textContentForCachedResource(Cached
return std::nullopt;
}
@@ -4190,18 +4189,19 @@ index 7948852dd9a6bc42b40116941ce0346c32e16f2d..13e7b4eaf2a95575439d20b68e5cce1c
{
ASSERT(result);
diff --git a/Source/WebCore/inspector/agents/InspectorNetworkAgent.h b/Source/WebCore/inspector/agents/InspectorNetworkAgent.h
-index 7cdc5865e58e9a9a30ea25202692d4b9aa77b2d6..b078407fa21c56edbb00abdaca356a65070a19a3 100644
+index 8f6fbcc293aebf8b9d5c945d2829a1527b74bc7f..34e6726d970400c28f1812cdf5ceddb326534ae6 100644
--- a/Source/WebCore/inspector/agents/InspectorNetworkAgent.h
+++ b/Source/WebCore/inspector/agents/InspectorNetworkAgent.h
-@@ -34,6 +34,7 @@
+@@ -34,6 +34,8 @@
#include "InspectorInstrumentation.h"
#include "InspectorPageAgent.h"
#include "InspectorWebAgentBase.h"
+#include "ResourceError.h"
++#include "SharedBuffer.h"
#include "WebSocket.h"
#include <JavaScriptCore/InspectorBackendDispatchers.h>
#include <JavaScriptCore/InspectorFrontendDispatchers.h>
-@@ -72,6 +73,7 @@ public:
+@@ -72,6 +74,7 @@ public:
static Ref<TextResourceDecoder> createTextDecoder(const String& mimeType, const String& textEncodingName);
static std::optional<String> textContentForCachedResource(CachedResource&);
static bool cachedResourceContent(CachedResource&, String* result, bool* base64Encoded);
@@ -4209,7 +4209,7 @@ index 7cdc5865e58e9a9a30ea25202692d4b9aa77b2d6..b078407fa21c56edbb00abdaca356a65
// InspectorAgentBase
void didCreateFrontendAndBackend(Inspector::FrontendRouter*, Inspector::BackendDispatcher*) final;
-@@ -82,6 +84,7 @@ public:
+@@ -82,6 +85,7 @@ public:
Inspector::Protocol::ErrorStringOr<void> disable() final;
Inspector::Protocol::ErrorStringOr<void> setExtraHTTPHeaders(Ref<JSON::Object>&&) final;
Inspector::Protocol::ErrorStringOr<std::tuple<String, bool /* base64Encoded */>> getResponseBody(const Inspector::Protocol::Network::RequestId&) final;
@@ -4217,7 +4217,7 @@ index 7cdc5865e58e9a9a30ea25202692d4b9aa77b2d6..b078407fa21c56edbb00abdaca356a65
Inspector::Protocol::ErrorStringOr<void> setResourceCachingDisabled(bool) final;
void loadResource(const Inspector::Protocol::Network::FrameId&, const String& url, Ref<LoadResourceCallback>&&) final;
Inspector::Protocol::ErrorStringOr<String> getSerializedCertificate(const Inspector::Protocol::Network::RequestId&) final;
-@@ -92,8 +95,10 @@ public:
+@@ -92,8 +96,10 @@ public:
Inspector::Protocol::ErrorStringOr<void> interceptContinue(const Inspector::Protocol::Network::RequestId&, Inspector::Protocol::Network::NetworkStage) final;
Inspector::Protocol::ErrorStringOr<void> interceptWithRequest(const Inspector::Protocol::Network::RequestId&, const String& url, const String& method, RefPtr<JSON::Object>&& headers, const String& postData) 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;
@@ -4228,20 +4228,20 @@ index 7cdc5865e58e9a9a30ea25202692d4b9aa77b2d6..b078407fa21c56edbb00abdaca356a65
// InspectorInstrumentation
void willRecalculateStyle();
-@@ -123,8 +128,11 @@ public:
+@@ -123,8 +129,11 @@ public:
bool willIntercept(const ResourceRequest&);
bool shouldInterceptRequest(const ResourceRequest&);
bool shouldInterceptResponse(const ResourceResponse&);
-- void interceptResponse(const ResourceResponse&, unsigned long identifier, CompletionHandler<void(const ResourceResponse&, RefPtr<SharedBuffer>)>&&);
-+ void interceptResponse(const ResourceResponse&, unsigned long identifier, CompletionHandler<void(std::optional<ResourceError>&&, const ResourceResponse&, RefPtr<SharedBuffer>)>&&);
+- void interceptResponse(const ResourceResponse&, ResourceLoaderIdentifier, CompletionHandler<void(const ResourceResponse&, RefPtr<SharedBuffer>)>&&);
++ void interceptResponse(const ResourceResponse&, ResourceLoaderIdentifier, CompletionHandler<void(std::optional<ResourceError>&&, const ResourceResponse&, RefPtr<SharedBuffer>)>&&);
void interceptRequest(ResourceLoader&, Function<void(const ResourceRequest&)>&&);
-+ void interceptDidReceiveData(unsigned long identifier, const SharedBuffer&);
-+ void interceptDidFinishResourceLoad(unsigned long identifier);
-+ void interceptDidFailResourceLoad(unsigned long identifier, const ResourceError& error);
++ void interceptDidReceiveData(ResourceLoaderIdentifier, const SharedBuffer&);
++ void interceptDidFinishResourceLoad(ResourceLoaderIdentifier);
++ void interceptDidFailResourceLoad(ResourceLoaderIdentifier, const ResourceError& error);
void searchOtherRequests(const JSC::Yarr::RegularExpression&, Ref<JSON::ArrayOf<Inspector::Protocol::Page::SearchResult>>&);
void searchInRequest(Inspector::Protocol::ErrorString&, const Inspector::Protocol::Network::RequestId&, const String& query, bool caseSensitive, bool isRegex, RefPtr<JSON::ArrayOf<Inspector::Protocol::GenericTypes::SearchMatch>>&);
-@@ -185,9 +193,10 @@ private:
+@@ -185,9 +194,10 @@ private:
WTF_MAKE_NONCOPYABLE(PendingInterceptResponse);
WTF_MAKE_FAST_ALLOCATED;
public:
@@ -4253,7 +4253,7 @@ index 7cdc5865e58e9a9a30ea25202692d4b9aa77b2d6..b078407fa21c56edbb00abdaca356a65
{ }
~PendingInterceptResponse()
-@@ -203,6 +212,36 @@ private:
+@@ -203,6 +213,36 @@ private:
}
void respond(const ResourceResponse& response, RefPtr<SharedBuffer> data)
@@ -4290,7 +4290,7 @@ index 7cdc5865e58e9a9a30ea25202692d4b9aa77b2d6..b078407fa21c56edbb00abdaca356a65
{
ASSERT(!m_responded);
if (m_responded)
-@@ -210,13 +249,25 @@ private:
+@@ -210,13 +250,25 @@ private:
m_responded = true;
@@ -4320,7 +4320,7 @@ index 7cdc5865e58e9a9a30ea25202692d4b9aa77b2d6..b078407fa21c56edbb00abdaca356a65
std::unique_ptr<Inspector::NetworkFrontendDispatcher> m_frontendDispatcher;
diff --git a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp
-index 64117425ba5c5b6a71d190dfc8f1eefb4ffc637c..ef016c881edabc9a4457466a40dcdf9b023165d2 100644
+index 762d4cadc00706dff00fe421b2f5d3ff8ec38ff0..5e8ed43bac580dfb4ae9a09cfd012e7d449a2061 100644
--- a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp
+++ b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp
@@ -32,19 +32,25 @@
@@ -5256,7 +5256,7 @@ index 64117425ba5c5b6a71d190dfc8f1eefb4ffc637c..ef016c881edabc9a4457466a40dcdf9b
+{
+ if (!WebCore::AXObjectCache::accessibilityEnabled())
+ WebCore::AXObjectCache::enableAccessibility();
-+ auto document = makeRefPtr(m_inspectedPage.mainFrame().document());
++ RefPtr document = m_inspectedPage.mainFrame().document();
+ if (!document)
+ return makeUnexpected("No document for main frame"_s);
+
@@ -5278,7 +5278,7 @@ index 64117425ba5c5b6a71d190dfc8f1eefb4ffc637c..ef016c881edabc9a4457466a40dcdf9b
+ }
+
+ m_doingAccessibilitySnapshot = true;
-+ Ref<Inspector::Protocol::Page::AXNode> axNode = snapshotForAXObject(makeRefPtr(axObject), node);
++ Ref<Inspector::Protocol::Page::AXNode> axNode = snapshotForAXObject(RefPtr { axObject }, node);
+ m_doingAccessibilitySnapshot = false;
+ return axNode;
+}
@@ -5765,6 +5765,19 @@ index 16edb3bc689b8e2dde17597b642b706c1343e1f5..f363b2ca2410f22cff8d6ad908a88527
~UserGestureEmulationScope();
private:
+diff --git a/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp b/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp
+index 10c5e1501c202d9dba64f2af20daf42390fcd27a..e7fc5bfdc8e269c7547290936649570f50b47664 100644
+--- a/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp
++++ b/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp
+@@ -258,7 +258,7 @@ void LineLayout::updateFormattingRootGeometryAndInvalidate()
+
+ auto updateGeometry = [&](auto& root) {
+ root.setContentBoxWidth(flow.contentLogicalWidth());
+- root.setPadding(Layout::Edges { { flow.paddingStart(), flow.paddingEnd() }, { flow.paddingBefore(), flow.paddingAfter() } });
++ root.setPadding(Layout::Edges { { flow.paddingStart(), flow.paddingEnd() }, { flow.paddingBefore(), flow.paddingAfter() } });
+ root.setBorder(Layout::Edges { { flow.borderStart(), flow.borderEnd() }, { flow.borderBefore(), flow.borderAfter() } });
+ root.setHorizontalMargin({ });
+ root.setVerticalMargin({ });
diff --git a/Source/WebCore/loader/CookieJar.h b/Source/WebCore/loader/CookieJar.h
index 982691dd2dfe2f65201370a12302b5086703c126..4af72beb3b1405ffac78e89e7fbb2b14d6647903 100644
--- a/Source/WebCore/loader/CookieJar.h
@@ -5788,7 +5801,7 @@ index 982691dd2dfe2f65201370a12302b5086703c126..4af72beb3b1405ffac78e89e7fbb2b14
protected:
static SameSiteInfo sameSiteInfo(const Document&, IsForDOMCookieAccess = IsForDOMCookieAccess::No);
diff --git a/Source/WebCore/loader/DocumentLoader.cpp b/Source/WebCore/loader/DocumentLoader.cpp
-index 0d2d141222de76fdabad6e04df7246674f70a64d..cee006ecdcd61f7e1cb31db8d130ae59521d9bea 100644
+index f09e0edabee0ce0ad83d1227cde45761d5dbfca4..b5dc27544621223ff04691a99060ac1659f7ccac 100644
--- a/Source/WebCore/loader/DocumentLoader.cpp
+++ b/Source/WebCore/loader/DocumentLoader.cpp
@@ -1584,8 +1584,6 @@ void DocumentLoader::detachFromFrame()
@@ -5801,10 +5814,10 @@ index 0d2d141222de76fdabad6e04df7246674f70a64d..cee006ecdcd61f7e1cb31db8d130ae59
}
diff --git a/Source/WebCore/loader/DocumentLoader.h b/Source/WebCore/loader/DocumentLoader.h
-index a7313926acda59218b0215110b973a53fa4bb2f9..48812e8193eae29bed0c8c3aedcc4820dea197ee 100644
+index 8ee14a24d57b34cc7cbea4cdc773102726d2e5d6..80084e2a3551584a101d74869b4eb21d66ebf055 100644
--- a/Source/WebCore/loader/DocumentLoader.h
+++ b/Source/WebCore/loader/DocumentLoader.h
-@@ -167,9 +167,13 @@ public:
+@@ -168,9 +168,13 @@ public:
WEBCORE_EXPORT virtual void detachFromFrame();
@@ -5819,7 +5832,7 @@ index a7313926acda59218b0215110b973a53fa4bb2f9..48812e8193eae29bed0c8c3aedcc4820
DocumentWriter& writer() const { return m_writer; }
diff --git a/Source/WebCore/loader/FrameLoader.cpp b/Source/WebCore/loader/FrameLoader.cpp
-index 2a6e166eb227e564b881ed3189b8c1125114d1a7..afc6f97c4f172e453510f8bce434235db932909b 100644
+index 37e511379245f9f58d41809483146715b4f60bd8..6c0d11ed2a205cf236d2c13f3cc2cae0f57c3fb5 100644
--- a/Source/WebCore/loader/FrameLoader.cpp
+++ b/Source/WebCore/loader/FrameLoader.cpp
@@ -1168,6 +1168,7 @@ void FrameLoader::loadInSameDocument(const URL& url, SerializedScriptValue* stat
@@ -5876,7 +5889,7 @@ index 2a6e166eb227e564b881ed3189b8c1125114d1a7..afc6f97c4f172e453510f8bce434235d
}
void FrameLoader::continueFragmentScrollAfterNavigationPolicy(const ResourceRequest& request, bool shouldContinue)
-@@ -3965,9 +3976,6 @@ String FrameLoader::referrer() const
+@@ -3962,9 +3973,6 @@ String FrameLoader::referrer() const
void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds()
{
@@ -5886,7 +5899,7 @@ index 2a6e166eb227e564b881ed3189b8c1125114d1a7..afc6f97c4f172e453510f8bce434235d
Vector<Ref<DOMWrapperWorld>> worlds;
ScriptController::getAllWorlds(worlds);
for (auto& world : worlds)
-@@ -3976,13 +3984,13 @@ void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds()
+@@ -3973,13 +3981,13 @@ void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds()
void FrameLoader::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld& world)
{
@@ -5907,10 +5920,10 @@ index 2a6e166eb227e564b881ed3189b8c1125114d1a7..afc6f97c4f172e453510f8bce434235d
InspectorInstrumentation::didClearWindowObjectInWorld(m_frame, world);
}
diff --git a/Source/WebCore/loader/LoaderStrategy.h b/Source/WebCore/loader/LoaderStrategy.h
-index b018af04d05ce3ac38bb57d8e50a7b063ee51733..6929c01318f509ed560276168d18e0112b116bc2 100644
+index e2ecd1afc35ba6d312388c828ea4ce1ddc23acfc..b2bcda2e6990d621e5003819c7d8d03c1853b469 100644
--- a/Source/WebCore/loader/LoaderStrategy.h
+++ b/Source/WebCore/loader/LoaderStrategy.h
-@@ -84,6 +84,7 @@ public:
+@@ -85,6 +85,7 @@ public:
virtual bool isOnLine() const = 0;
virtual void addOnlineStateChangeListener(WTF::Function<void(bool)>&&) = 0;
@@ -5919,7 +5932,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 cd895a9795ca2807f34597c7024709a098af8a32..b70b0616e01d7c21a53f0bae3ba3d6da4b942af7 100644
+index 87e26409bd399d5435a668dc6867eabe7cf5d622..40f0276fb7ec244583cb1925e931fa8da109709a 100644
--- a/Source/WebCore/loader/PolicyChecker.cpp
+++ b/Source/WebCore/loader/PolicyChecker.cpp
@@ -46,6 +46,7 @@
@@ -5936,7 +5949,7 @@ index cd895a9795ca2807f34597c7024709a098af8a32..b70b0616e01d7c21a53f0bae3ba3d6da
+ InspectorInstrumentation::willCheckNewWindowPolicy(m_frame, request.url());
auto requestIdentifier = PolicyCheckIdentifier::create();
- m_frame.loader().client().dispatchDecidePolicyForNewWindowAction(navigationAction, request, formState.get(), frameName, requestIdentifier, [frame = makeRef(m_frame), request,
+ m_frame.loader().client().dispatchDecidePolicyForNewWindowAction(navigationAction, request, formState.get(), frameName, requestIdentifier, [frame = Ref { m_frame }, request,
formState = WTFMove(formState), frameName, navigationAction, function = WTFMove(function), blobURLLifetimeExtension = WTFMove(blobURLLifetimeExtension),
requestIdentifier] (PolicyAction policyAction, PolicyCheckIdentifier responseIdentifier) mutable {
@@ -5965,10 +5978,10 @@ index cd895a9795ca2807f34597c7024709a098af8a32..b70b0616e01d7c21a53f0bae3ba3d6da
return;
}
diff --git a/Source/WebCore/loader/ProgressTracker.cpp b/Source/WebCore/loader/ProgressTracker.cpp
-index 0dcb47556d04874878656e459c9bac9af64dcfbf..df57e9a47160bfbeb8188d80afd175c756e982f9 100644
+index fa84c366c63175f9fb4730eb85c4677fc3d6368f..ecf5b8dc97e35910baf493424e673155cfa7d7a4 100644
--- a/Source/WebCore/loader/ProgressTracker.cpp
+++ b/Source/WebCore/loader/ProgressTracker.cpp
-@@ -154,6 +154,8 @@ void ProgressTracker::progressCompleted(Frame& frame)
+@@ -152,6 +152,8 @@ void ProgressTracker::progressCompleted(Frame& frame)
if (!m_numProgressTrackedFrames || m_originatingProgressFrame == &frame)
finalProgressComplete();
@@ -5977,7 +5990,7 @@ index 0dcb47556d04874878656e459c9bac9af64dcfbf..df57e9a47160bfbeb8188d80afd175c7
m_client->didChangeEstimatedProgress();
}
-@@ -179,8 +181,6 @@ void ProgressTracker::finalProgressComplete()
+@@ -177,8 +179,6 @@ void ProgressTracker::finalProgressComplete()
frame->loader().client().setMainFrameDocumentReady(true);
m_client->progressFinished(*frame);
frame->loader().loadProgressingStatusChanged();
@@ -5985,9 +5998,9 @@ index 0dcb47556d04874878656e459c9bac9af64dcfbf..df57e9a47160bfbeb8188d80afd175c7
- InspectorInstrumentation::frameStoppedLoading(*frame);
}
- void ProgressTracker::incrementProgress(unsigned long identifier, const ResourceResponse& response)
+ void ProgressTracker::incrementProgress(ResourceLoaderIdentifier identifier, const ResourceResponse& response)
diff --git a/Source/WebCore/page/ChromeClient.h b/Source/WebCore/page/ChromeClient.h
-index 06c4e1ea92646e3ce6ac9cfa76757721789b3a51..576353e38b12913549acbeccb60f3ff29456e826 100644
+index 4cfcb1681f17309ac4a7fc0b219acef95957b79d..93bb87fb16d3c9e43fc84fa47e8a8aba5b19918a 100644
--- a/Source/WebCore/page/ChromeClient.h
+++ b/Source/WebCore/page/ChromeClient.h
@@ -306,7 +306,7 @@ public:
@@ -6000,10 +6013,10 @@ index 06c4e1ea92646e3ce6ac9cfa76757721789b3a51..576353e38b12913549acbeccb60f3ff2
#if ENABLE(INPUT_TYPE_COLOR)
diff --git a/Source/WebCore/page/EventHandler.cpp b/Source/WebCore/page/EventHandler.cpp
-index b6a16774c7ba3e6f25806ba8b64adb19996b9796..c60e83de2814f145fdda35cd3808e1940162c43e 100644
+index 0b8e835bec88a7c88bbdf74d18745b79a19eba92..8f8f6bf077d67732274564e51f8de6a373a3bfbc 100644
--- a/Source/WebCore/page/EventHandler.cpp
+++ b/Source/WebCore/page/EventHandler.cpp
-@@ -131,6 +131,7 @@
+@@ -133,6 +133,7 @@
#if ENABLE(TOUCH_EVENTS) && !ENABLE(IOS_TOUCH_EVENTS)
#include "PlatformTouchEvent.h"
@@ -6011,7 +6024,7 @@ index b6a16774c7ba3e6f25806ba8b64adb19996b9796..c60e83de2814f145fdda35cd3808e194
#endif
#if ENABLE(MAC_GESTURE_EVENTS)
-@@ -786,9 +787,7 @@ bool EventHandler::handleMousePressEvent(const MouseEventWithHitTestResults& eve
+@@ -792,9 +793,7 @@ bool EventHandler::handleMousePressEvent(const MouseEventWithHitTestResults& eve
m_mousePressNode = event.targetNode();
m_frame.document()->setFocusNavigationStartingNode(event.targetNode());
@@ -6021,7 +6034,7 @@ index b6a16774c7ba3e6f25806ba8b64adb19996b9796..c60e83de2814f145fdda35cd3808e194
m_mousePressed = true;
m_selectionInitiationState = HaveNotStartedSelection;
-@@ -828,8 +827,6 @@ VisiblePosition EventHandler::selectionExtentRespectingEditingBoundary(const Vis
+@@ -834,8 +833,6 @@ VisiblePosition EventHandler::selectionExtentRespectingEditingBoundary(const Vis
return adjustedTarget->renderer()->positionForPoint(LayoutPoint(selectionEndPoint), nullptr);
}
@@ -6030,7 +6043,7 @@ index b6a16774c7ba3e6f25806ba8b64adb19996b9796..c60e83de2814f145fdda35cd3808e194
#if !PLATFORM(IOS_FAMILY)
bool EventHandler::supportsSelectionUpdatesOnMouseDrag() const
-@@ -851,8 +848,10 @@ bool EventHandler::handleMouseDraggedEvent(const MouseEventWithHitTestResults& e
+@@ -857,8 +854,10 @@ bool EventHandler::handleMouseDraggedEvent(const MouseEventWithHitTestResults& e
Ref<Frame> protectedFrame(m_frame);
@@ -6041,7 +6054,7 @@ index b6a16774c7ba3e6f25806ba8b64adb19996b9796..c60e83de2814f145fdda35cd3808e194
RefPtr targetNode = event.targetNode();
if (event.event().button() != LeftButton || !targetNode)
-@@ -873,7 +872,9 @@ bool EventHandler::handleMouseDraggedEvent(const MouseEventWithHitTestResults& e
+@@ -879,7 +878,9 @@ bool EventHandler::handleMouseDraggedEvent(const MouseEventWithHitTestResults& e
ASSERT(mouseDownMayStartSelect() || m_mouseDownMayStartAutoscroll);
#endif
@@ -6051,7 +6064,7 @@ index b6a16774c7ba3e6f25806ba8b64adb19996b9796..c60e83de2814f145fdda35cd3808e194
if (m_mouseDownMayStartAutoscroll && !panScrollInProgress()) {
m_autoscrollController->startAutoscrollForSelection(renderer);
-@@ -890,6 +891,8 @@ bool EventHandler::handleMouseDraggedEvent(const MouseEventWithHitTestResults& e
+@@ -896,6 +897,8 @@ bool EventHandler::handleMouseDraggedEvent(const MouseEventWithHitTestResults& e
return true;
}
@@ -6060,7 +6073,7 @@ index b6a16774c7ba3e6f25806ba8b64adb19996b9796..c60e83de2814f145fdda35cd3808e194
bool EventHandler::eventMayStartDrag(const PlatformMouseEvent& event) const
{
// This is a pre-flight check of whether the event might lead to a drag being started. Be careful
-@@ -921,6 +924,8 @@ bool EventHandler::eventMayStartDrag(const PlatformMouseEvent& event) const
+@@ -927,6 +930,8 @@ bool EventHandler::eventMayStartDrag(const PlatformMouseEvent& event) const
return targetElement && page->dragController().draggableElement(&m_frame, targetElement.get(), result.roundedPointInInnerNodeFrame(), state);
}
@@ -6069,7 +6082,7 @@ index b6a16774c7ba3e6f25806ba8b64adb19996b9796..c60e83de2814f145fdda35cd3808e194
void EventHandler::updateSelectionForMouseDrag()
{
if (!supportsSelectionUpdatesOnMouseDrag())
-@@ -1015,7 +1020,6 @@ void EventHandler::updateSelectionForMouseDrag(const HitTestResult& hitTestResul
+@@ -1021,7 +1026,6 @@ void EventHandler::updateSelectionForMouseDrag(const HitTestResult& hitTestResul
if (oldSelection != newSelection && HTMLElement::isImageOverlayText(newSelection.start().containerNode()) && HTMLElement::isImageOverlayText(newSelection.end().containerNode()))
invalidateClick();
}
@@ -6077,7 +6090,7 @@ index b6a16774c7ba3e6f25806ba8b64adb19996b9796..c60e83de2814f145fdda35cd3808e194
void EventHandler::lostMouseCapture()
{
-@@ -1063,9 +1067,7 @@ bool EventHandler::handleMouseReleaseEvent(const MouseEventWithHitTestResults& e
+@@ -1069,9 +1073,7 @@ bool EventHandler::handleMouseReleaseEvent(const MouseEventWithHitTestResults& e
// on the selection, the selection goes away. However, if we are
// editing, place the caret.
if (m_mouseDownWasSingleClickInSelection && m_selectionInitiationState != ExtendedSelection
@@ -6087,7 +6100,7 @@ index b6a16774c7ba3e6f25806ba8b64adb19996b9796..c60e83de2814f145fdda35cd3808e194
&& m_frame.selection().isRange()
&& event.event().button() != RightButton) {
VisibleSelection newSelection;
-@@ -2032,10 +2034,8 @@ bool EventHandler::handleMouseMoveEvent(const PlatformMouseEvent& platformMouseE
+@@ -2038,10 +2040,8 @@ bool EventHandler::handleMouseMoveEvent(const PlatformMouseEvent& platformMouseE
swallowEvent = !dispatchMouseEvent(eventNames().mousemoveEvent, mouseEvent.targetNode(), 0, platformMouseEvent, FireMouseOverOut::Yes);
@@ -6098,7 +6111,7 @@ index b6a16774c7ba3e6f25806ba8b64adb19996b9796..c60e83de2814f145fdda35cd3808e194
return swallowEvent;
}
-@@ -4064,7 +4064,14 @@ bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, CheckDr
+@@ -4097,7 +4097,14 @@ bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, CheckDr
if (!m_frame.document())
return false;
@@ -6114,7 +6127,7 @@ index b6a16774c7ba3e6f25806ba8b64adb19996b9796..c60e83de2814f145fdda35cd3808e194
auto hasNonDefaultPasteboardData = HasNonDefaultPasteboardData::No;
if (dragState().shouldDispatchEvents) {
-@@ -4472,7 +4479,8 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
+@@ -4505,7 +4512,8 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
allTouchReleased = false;
}
@@ -6124,7 +6137,7 @@ index b6a16774c7ba3e6f25806ba8b64adb19996b9796..c60e83de2814f145fdda35cd3808e194
PlatformTouchPoint::State pointState = point.state();
LayoutPoint pagePoint = documentPointForWindowPoint(m_frame, point.pos());
-@@ -4599,6 +4607,9 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
+@@ -4632,6 +4640,9 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
changedTouches[pointState].m_touches->append(WTFMove(touch));
changedTouches[pointState].m_targets.add(touchTarget);
}
@@ -6135,7 +6148,7 @@ index b6a16774c7ba3e6f25806ba8b64adb19996b9796..c60e83de2814f145fdda35cd3808e194
m_touchPressed = touches->length() > 0;
if (allTouchReleased)
diff --git a/Source/WebCore/page/EventHandler.h b/Source/WebCore/page/EventHandler.h
-index 0696e5c2beeeee289a0cdd50148b01868f9732e5..b6161fab1a17493a25e854188e8f74e4016f9d29 100644
+index 496d1357937767f11ea9ab9ad72f956e0b2b3914..6f8a6dc479af1731b9557e6f2a8b41cdd041a2ed 100644
--- a/Source/WebCore/page/EventHandler.h
+++ b/Source/WebCore/page/EventHandler.h
@@ -136,9 +136,7 @@ public:
@@ -6148,7 +6161,7 @@ index 0696e5c2beeeee289a0cdd50148b01868f9732e5..b6161fab1a17493a25e854188e8f74e4
#if ENABLE(PAN_SCROLLING)
void didPanScrollStart();
-@@ -382,10 +380,8 @@ private:
+@@ -384,10 +382,8 @@ private:
bool startKeyboardScrolling(KeyboardEvent&);
void stopKeyboardScrolling();
@@ -6159,7 +6172,7 @@ index 0696e5c2beeeee289a0cdd50148b01868f9732e5..b6161fab1a17493a25e854188e8f74e4
WEBCORE_EXPORT bool handleMouseReleaseEvent(const MouseEventWithHitTestResults&);
-@@ -486,10 +482,8 @@ private:
+@@ -488,10 +484,8 @@ private:
void defaultTabEventHandler(KeyboardEvent&);
void defaultArrowEventHandler(FocusDirection, KeyboardEvent&);
@@ -6170,7 +6183,7 @@ index 0696e5c2beeeee289a0cdd50148b01868f9732e5..b6161fab1a17493a25e854188e8f74e4
// The following are called at the beginning of handleMouseUp and handleDrag.
// If they return true it indicates that they have consumed the event.
-@@ -497,9 +491,10 @@ private:
+@@ -499,9 +493,10 @@ private:
#if ENABLE(DRAG_SUPPORT)
bool eventLoopHandleMouseDragged(const MouseEventWithHitTestResults&);
@@ -6182,7 +6195,7 @@ index 0696e5c2beeeee289a0cdd50148b01868f9732e5..b6161fab1a17493a25e854188e8f74e4
enum class SetOrClearLastScrollbar { Clear, Set };
void updateLastScrollbarUnderMouse(Scrollbar*, SetOrClearLastScrollbar);
-@@ -591,8 +586,8 @@ private:
+@@ -593,8 +588,8 @@ private:
Timer m_autoHideCursorTimer;
#endif
@@ -6193,7 +6206,7 @@ index 0696e5c2beeeee289a0cdd50148b01868f9732e5..b6161fab1a17493a25e854188e8f74e4
bool m_mouseDownMayStartDrag { false };
bool m_dragMayStartSelectionInstead { false };
diff --git a/Source/WebCore/page/EventSource.cpp b/Source/WebCore/page/EventSource.cpp
-index 7b77e407ee5d08ab3784d0899cfa33f0177f0648..0060ebfb1128cc5eb28baa5ecf4538a203ba82e1 100644
+index 602631bb7cd10860b1a3121043c97d8efe44761d..867320c576201d35124a186ac60c2927d9511afb 100644
--- a/Source/WebCore/page/EventSource.cpp
+++ b/Source/WebCore/page/EventSource.cpp
@@ -36,6 +36,7 @@
@@ -6213,7 +6226,7 @@ index 7b77e407ee5d08ab3784d0899cfa33f0177f0648..0060ebfb1128cc5eb28baa5ecf4538a2
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 6a95f2aa052feeb07e38a7192d02d98468f7e5cb..b36ed11386c28cefc844901a0b57c45e5446bc19 100644
+index 7e31e744922dfe73fd956a46f444e7d111da5ec2..31178cfc798c961a8fc13523e12ffa5bf82c2ed1 100644
--- a/Source/WebCore/page/Frame.cpp
+++ b/Source/WebCore/page/Frame.cpp
@@ -39,6 +39,7 @@
@@ -6430,7 +6443,7 @@ index 6a95f2aa052feeb07e38a7192d02d98468f7e5cb..b36ed11386c28cefc844901a0b57c45e
+ if (element.isMouseFocusable())
+ return true;
+
-+ if (auto shadowRoot = makeRefPtr(element.shadowRoot())) {
++ if (RefPtr shadowRoot = element.shadowRoot()) {
+ if (shadowRoot->delegatesFocus()) {
+ for (auto& node : composedTreeDescendants(element)) {
+ if (is<Element>(node) && downcast<Element>(node).isMouseFocusable())
@@ -6743,7 +6756,7 @@ index 28d1fc3242174a680711027877d4153923790220..058b5309eed081fcc1e4158f66e80642
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 e7f6f99a2a230b6cca7f03d846bbba92c6e80be1..52a86145b85bc44588e6f8d5db8cebedbf87d387 100644
+index 39612b81b85bbf269549cda3e0330833f0d1152d..c1fd65f9bd42e1c73b6bbf7832b94caf236fe36d 100644
--- a/Source/WebCore/page/Page.cpp
+++ b/Source/WebCore/page/Page.cpp
@@ -462,6 +462,37 @@ void Page::setOverrideViewportArguments(const std::optional<ViewportArguments>&
@@ -6795,7 +6808,7 @@ index e7f6f99a2a230b6cca7f03d846bbba92c6e80be1..52a86145b85bc44588e6f8d5db8cebed
resetSeenPlugins();
resetSeenMediaEngines();
-@@ -3271,6 +3298,16 @@ void Page::setUseDarkAppearanceOverride(std::optional<bool> valueOverride)
+@@ -3270,6 +3297,16 @@ void Page::setUseDarkAppearanceOverride(std::optional<bool> valueOverride)
#endif
}
@@ -6813,10 +6826,10 @@ index e7f6f99a2a230b6cca7f03d846bbba92c6e80be1..52a86145b85bc44588e6f8d5db8cebed
{
if (insets == m_fullscreenInsets)
diff --git a/Source/WebCore/page/Page.h b/Source/WebCore/page/Page.h
-index 4f9cdca1bf9c3966c3a66bf6f52b08504f58c693..d0826abc55bdad1698b39ffd451ecf617e14ef00 100644
+index a301b7844cc855fe7d99f4d736fcd85f96690006..c14611328c47690c3845e0c5ce80a359066eb42f 100644
--- a/Source/WebCore/page/Page.h
+++ b/Source/WebCore/page/Page.h
-@@ -262,6 +262,9 @@ public:
+@@ -256,6 +256,9 @@ public:
const std::optional<ViewportArguments>& overrideViewportArguments() const { return m_overrideViewportArguments; }
WEBCORE_EXPORT void setOverrideViewportArguments(const std::optional<ViewportArguments>&);
@@ -6826,7 +6839,7 @@ index 4f9cdca1bf9c3966c3a66bf6f52b08504f58c693..d0826abc55bdad1698b39ffd451ecf61
static void refreshPlugins(bool reload);
WEBCORE_EXPORT PluginData& pluginData();
void clearPluginData();
-@@ -314,6 +317,10 @@ public:
+@@ -308,6 +311,10 @@ public:
DragCaretController& dragCaretController() const { return *m_dragCaretController; }
#if ENABLE(DRAG_SUPPORT)
DragController& dragController() const { return *m_dragController; }
@@ -6837,7 +6850,7 @@ index 4f9cdca1bf9c3966c3a66bf6f52b08504f58c693..d0826abc55bdad1698b39ffd451ecf61
#endif
FocusController& focusController() const { return *m_focusController; }
#if ENABLE(CONTEXT_MENUS)
-@@ -472,6 +479,8 @@ public:
+@@ -466,6 +473,8 @@ public:
WEBCORE_EXPORT void effectiveAppearanceDidChange(bool useDarkAppearance, bool useElevatedUserInterfaceLevel);
bool defaultUseDarkAppearance() const { return m_useDarkAppearance; }
void setUseDarkAppearanceOverride(std::optional<bool>);
@@ -6846,7 +6859,7 @@ index 4f9cdca1bf9c3966c3a66bf6f52b08504f58c693..d0826abc55bdad1698b39ffd451ecf61
#if ENABLE(TEXT_AUTOSIZING)
float textAutosizingWidth() const { return m_textAutosizingWidth; }
-@@ -847,6 +856,11 @@ public:
+@@ -841,6 +850,11 @@ public:
WEBCORE_EXPORT Vector<Ref<Element>> editableElementsInRect(const FloatRect&) const;
@@ -6858,7 +6871,7 @@ index 4f9cdca1bf9c3966c3a66bf6f52b08504f58c693..d0826abc55bdad1698b39ffd451ecf61
#if ENABLE(DEVICE_ORIENTATION) && PLATFORM(IOS_FAMILY)
DeviceOrientationUpdateProvider* deviceOrientationUpdateProvider() const { return m_deviceOrientationUpdateProvider.get(); }
#endif
-@@ -935,6 +949,9 @@ private:
+@@ -929,6 +943,9 @@ private:
#if ENABLE(DRAG_SUPPORT)
const std::unique_ptr<DragController> m_dragController;
@@ -6868,7 +6881,7 @@ index 4f9cdca1bf9c3966c3a66bf6f52b08504f58c693..d0826abc55bdad1698b39ffd451ecf61
#endif
const std::unique_ptr<FocusController> m_focusController;
#if ENABLE(CONTEXT_MENUS)
-@@ -1014,6 +1031,7 @@ private:
+@@ -1008,6 +1025,7 @@ private:
bool m_useElevatedUserInterfaceLevel { false };
bool m_useDarkAppearance { false };
std::optional<bool> m_useDarkAppearanceOverride;
@@ -6876,7 +6889,7 @@ index 4f9cdca1bf9c3966c3a66bf6f52b08504f58c693..d0826abc55bdad1698b39ffd451ecf61
#if ENABLE(TEXT_AUTOSIZING)
float m_textAutosizingWidth { 0 };
-@@ -1175,6 +1193,11 @@ private:
+@@ -1169,6 +1187,11 @@ private:
#endif
std::optional<ViewportArguments> m_overrideViewportArguments;
@@ -6933,10 +6946,10 @@ index 49548142f6db6b245cf6ba234272615028aad1ae..ff1ed0ea25ff4f036763c5f381803cc3
#endif
bool hasAnyElement() const {
diff --git a/Source/WebCore/page/RuntimeEnabledFeatures.cpp b/Source/WebCore/page/RuntimeEnabledFeatures.cpp
-index 40c2ebaa2f7acad478c9e5abe2e49b1f4b585202..ba7edc32330d314c0e4ad1c9422a356b72dd9452 100644
+index f90b8e6de036986779294cbb03c753ffcaf71801..af9672ae6605c341f2cbda8559e5441c1988a988 100644
--- a/Source/WebCore/page/RuntimeEnabledFeatures.cpp
+++ b/Source/WebCore/page/RuntimeEnabledFeatures.cpp
-@@ -57,7 +57,11 @@ RuntimeEnabledFeatures& RuntimeEnabledFeatures::sharedFeatures()
+@@ -61,7 +61,11 @@ RuntimeEnabledFeatures& RuntimeEnabledFeatures::sharedFeatures()
#if ENABLE(TOUCH_EVENTS)
bool RuntimeEnabledFeatures::touchEventsEnabled() const
{
@@ -6950,7 +6963,7 @@ index 40c2ebaa2f7acad478c9e5abe2e49b1f4b585202..ba7edc32330d314c0e4ad1c9422a356b
#endif
diff --git a/Source/WebCore/page/RuntimeEnabledFeatures.h b/Source/WebCore/page/RuntimeEnabledFeatures.h
-index b7d5b02f40cd8f391700b9e2d7d738d94131f183..40e995e2adfa4b15fe64284d616cbcdffff1aa9c 100644
+index 6417c0635061567d14c09707130e659aedfb4cd5..f83ae70c5ec165d42f9a5c56ed0d587accab7a8f 100644
--- a/Source/WebCore/page/RuntimeEnabledFeatures.h
+++ b/Source/WebCore/page/RuntimeEnabledFeatures.h
@@ -200,6 +200,7 @@ public:
@@ -7332,10 +7345,10 @@ index d47d193e8bee85c2d2a35e218decdd84b7212dc1..a1cd2f3b8f025436b596d1b1081357d9
#endif
diff --git a/Source/WebCore/platform/ScrollableArea.h b/Source/WebCore/platform/ScrollableArea.h
-index fd39633380b947a2050a7b8680c57990f6d75cb6..a9e564cee2d4b8e72344f31491a1561971d7dcf9 100644
+index 319bba8327381457567261a64cc9d9a3dd117661..6e746fc92b5871228f825e2211d394aed3467c4f 100644
--- a/Source/WebCore/platform/ScrollableArea.h
+++ b/Source/WebCore/platform/ScrollableArea.h
-@@ -101,7 +101,7 @@ public:
+@@ -102,7 +102,7 @@ public:
void doPostThumbMoveSnapping(ScrollbarOrientation);
#if ENABLE(TOUCH_EVENTS)
@@ -7431,10 +7444,10 @@ index 0000000000000000000000000000000000000000..f0c3a183e5bc44bdfa4201e0db2067b4
+
+#endif // ENABLE(SPEECH_SYNTHESIS)
diff --git a/Source/WebCore/platform/graphics/FontCascade.h b/Source/WebCore/platform/graphics/FontCascade.h
-index 73993808718b200e082cdae413d357c813c16019..f5605188cbff1e79653f02888525d843fa892254 100644
+index 98ec71d24d30d3124d5ed41237186f4b9f037681..6c644cf82481446bc861d93c0b9934cfc993abeb 100644
--- a/Source/WebCore/platform/graphics/FontCascade.h
+++ b/Source/WebCore/platform/graphics/FontCascade.h
-@@ -293,7 +293,8 @@ private:
+@@ -292,7 +292,8 @@ private:
return true;
if (textRenderingMode == TextRenderingMode::OptimizeSpeed)
return false;
@@ -8309,7 +8322,7 @@ index 39cb560e54bf9efd2dad6e1fb60dd0f609daf6bf..91c132460d4b466f61a8c579f70329fd
m_commonHeaders.append(CommonHeader { name, value });
}
diff --git a/Source/WebCore/platform/network/ResourceResponseBase.h b/Source/WebCore/platform/network/ResourceResponseBase.h
-index 176b737da53bec1063a298145f7c139b1e6314ad..5573eac98ef23a95805e0e2091cc8bd261dfd6e8 100644
+index 262e53180d6dd7c4d133ddc1daf5652bd6f31c76..d09aed9c9c58afe3c2040e1d5d683374365e65f8 100644
--- a/Source/WebCore/platform/network/ResourceResponseBase.h
+++ b/Source/WebCore/platform/network/ResourceResponseBase.h
@@ -221,6 +221,8 @@ public:
@@ -8321,7 +8334,7 @@ index 176b737da53bec1063a298145f7c139b1e6314ad..5573eac98ef23a95805e0e2091cc8bd2
protected:
enum InitLevel {
Uninitialized,
-@@ -303,6 +305,7 @@ void ResourceResponseBase::encode(Encoder& encoder) const
+@@ -300,6 +302,7 @@ void ResourceResponseBase::encode(Encoder& encoder) const
encoder << m_httpStatusText;
encoder << m_httpVersion;
encoder << m_httpHeaderFields;
@@ -8329,7 +8342,7 @@ index 176b737da53bec1063a298145f7c139b1e6314ad..5573eac98ef23a95805e0e2091cc8bd2
// We don't want to put the networkLoadMetrics info
// into the disk cache, because we will never use the old info.
-@@ -375,6 +378,12 @@ bool ResourceResponseBase::decode(Decoder& decoder, ResourceResponseBase& respon
+@@ -372,6 +375,12 @@ bool ResourceResponseBase::decode(Decoder& decoder, ResourceResponseBase& respon
return false;
response.m_httpHeaderFields = WTFMove(*httpHeaderFields);
@@ -8373,7 +8386,7 @@ index 7330aa933924791f1292c0847921e3b367493d96..a5238a748d1fb4bfa5b3e0882fe62f40
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 850fca17a21d971a9e20279a2312e2da2790042b..5a7e2d132d1c3729e1a0985365dc4bd350c5767d 100644
+index 311aef2d80fe7336cd8e5113c39d950db8f4394c..995545c175a9b22145f82c7efa8ef539cec4279b 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()
@@ -9155,7 +9168,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 5dd8b35683d588f1e7d72cb18123c266765de623..e9006cf4f2b272686fb7f5642dffd82bab5cc8f3 100644
+index aaa8731f9ecaa6a81f521dc0e7f84923faa81f06..9f0502c4058ce24e86b2c9e25775e78f9da078c6 100644
--- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
+++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
@@ -76,6 +76,11 @@
@@ -9187,10 +9200,10 @@ index 5dd8b35683d588f1e7d72cb18123c266765de623..e9006cf4f2b272686fb7f5642dffd82b
void NetworkConnectionToWebProcess::removeStorageAccessForFrame(FrameIdentifier frameID, PageIdentifier pageID)
{
diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
-index e98a2e5da15f6b08dd250be98b6f8fab53341a4c..08cb29282a547b4a05928ce9c52ee1cafc8221de 100644
+index d161cf96c4c5d9ad13094962e1991a5f4efd80b4..2444744e6c1b743a024b80496d180d0b17b31f44 100644
--- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
+++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
-@@ -289,6 +289,8 @@ private:
+@@ -288,6 +288,8 @@ private:
void clearPageSpecificData(WebCore::PageIdentifier);
@@ -9200,7 +9213,7 @@ index e98a2e5da15f6b08dd250be98b6f8fab53341a4c..08cb29282a547b4a05928ce9c52ee1ca
void removeStorageAccessForFrame(WebCore::FrameIdentifier, WebCore::PageIdentifier);
diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
-index 15da6abfc53869fd4386247696fea511b6a9db92..28a7fda804e90860dd513c2c7702cdd050e431ff 100644
+index 7682ba9bb29ff6f08ebebb943fc894546734c2e7..bdf77c32dfb8eeceb9ac355256b894d2c3559bc8 100644
--- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
+++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
@@ -66,6 +66,8 @@ messages -> NetworkConnectionToWebProcess LegacyReceiver {
@@ -9213,7 +9226,7 @@ index 15da6abfc53869fd4386247696fea511b6a9db92..28a7fda804e90860dd513c2c7702cdd0
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 4dcb32cdb757564bfb023455f9ffcbaab3df61fc..17025ec50ad5b2481c05ca76546302ffbf45c8ff 100644
+index 7cd6890cfc55129c8dda5648311f38c78adf48a0..664a1c3dd2fa0d346e4e1a6998cc2d3ec0c011cd 100644
--- a/Source/WebKit/NetworkProcess/NetworkProcess.cpp
+++ b/Source/WebKit/NetworkProcess/NetworkProcess.cpp
@@ -26,7 +26,6 @@
@@ -9224,7 +9237,7 @@ index 4dcb32cdb757564bfb023455f9ffcbaab3df61fc..17025ec50ad5b2481c05ca76546302ff
#include "ArgumentCoders.h"
#include "Attachment.h"
#include "AuthenticationManager.h"
-@@ -577,6 +576,59 @@ void NetworkProcess::destroySession(PAL::SessionID sessionID)
+@@ -578,6 +577,59 @@ void NetworkProcess::destroySession(PAL::SessionID sessionID)
removeStorageManagerForSession(sessionID);
}
@@ -9285,7 +9298,7 @@ index 4dcb32cdb757564bfb023455f9ffcbaab3df61fc..17025ec50ad5b2481c05ca76546302ff
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 106022ce685197830f265aab653d84e00f851cd9..bb62b3f543bb344d0b9035550a32218fcd54a961 100644
+index e7585b86e60a7a045d8548511865a9923fba2d23..16d1fefed3e18485681a31c4810947bec2e5f398 100644
--- a/Source/WebKit/NetworkProcess/NetworkProcess.h
+++ b/Source/WebKit/NetworkProcess/NetworkProcess.h
@@ -35,6 +35,7 @@
@@ -9320,7 +9333,7 @@ index 106022ce685197830f265aab653d84e00f851cd9..bb62b3f543bb344d0b9035550a32218f
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 d5958936fae11ed8bb2a373a7d4ff0bd7fb34f51..67ec3852d26ffb27ad3d242f690f2554b535b338 100644
+index 9aa9eaa9f131b01f669b5388500226e4352a1d0a..46a061225808caf14d86a85d2ec9a073bdf62d1b 100644
--- a/Source/WebKit/NetworkProcess/NetworkProcess.messages.in
+++ b/Source/WebKit/NetworkProcess/NetworkProcess.messages.in
@@ -77,6 +77,14 @@ messages -> NetworkProcess LegacyReceiver {
@@ -9339,10 +9352,10 @@ index d5958936fae11ed8bb2a373a7d4ff0bd7fb34f51..67ec3852d26ffb27ad3d242f690f2554
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 ffbf9322cd923b13febbaa7d0e8f8ae8988ef306..e0651bad9259fc4c0e08a9fc6f745bad4ca12ef9 100644
+index 97f7d07f586b2b97cd65497826a77e3a033c9b86..78638ee8e618340273035e141c2fdf95f577e89c 100644
--- a/Source/WebKit/NetworkProcess/NetworkSession.h
+++ b/Source/WebKit/NetworkProcess/NetworkSession.h
-@@ -163,6 +163,9 @@ public:
+@@ -165,6 +165,9 @@ public:
bool isStaleWhileRevalidateEnabled() const { return m_isStaleWhileRevalidateEnabled; }
@@ -9352,7 +9365,7 @@ index ffbf9322cd923b13febbaa7d0e8f8ae8988ef306..e0651bad9259fc4c0e08a9fc6f745bad
#if ENABLE(SERVICE_WORKER)
void addSoftUpdateLoader(std::unique_ptr<ServiceWorkerSoftUpdateLoader>&& loader) { m_softUpdateLoaders.add(WTFMove(loader)); }
void removeSoftUpdateLoader(ServiceWorkerSoftUpdateLoader* loader) { m_softUpdateLoaders.remove(loader); }
-@@ -210,6 +213,7 @@ protected:
+@@ -212,6 +215,7 @@ protected:
#endif
bool m_isStaleWhileRevalidateEnabled { false };
UniqueRef<PCM::ManagerInterface> m_privateClickMeasurement;
@@ -9361,7 +9374,7 @@ index ffbf9322cd923b13febbaa7d0e8f8ae8988ef306..e0651bad9259fc4c0e08a9fc6f745bad
HashSet<Ref<NetworkResourceLoader>> m_keptAliveLoads;
diff --git a/Source/WebKit/NetworkProcess/NetworkSocketStream.cpp b/Source/WebKit/NetworkProcess/NetworkSocketStream.cpp
-index 52eb5b08f16cba232149028cdaa8150ad04e4a9f..1f541ccfbe183ee152cea69108b80ffd3b1ff34f 100644
+index 8e30448e0d72c61f60506f758559b790d4a7bda6..77663f51040b4fe368994873d68c19df14073d2d 100644
--- a/Source/WebKit/NetworkProcess/NetworkSocketStream.cpp
+++ b/Source/WebKit/NetworkProcess/NetworkSocketStream.cpp
@@ -43,7 +43,7 @@ Ref<NetworkSocketStream> NetworkSocketStream::create(NetworkProcess& networkProc
@@ -9491,7 +9504,7 @@ index 47c84e483fa93672815651b3d2196a2b56cb02ab..bc5603f78e5a4d8499bd2795d2da6ed6
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 e4e88a11311aba49c65e6bc84767a1188588db36..33136b2448281b26c8c441626e38e536c49aa580 100644
+index 08f61abd7aab58dcf4dc31f3610db1d7deeab411..2bc41e6c517d7dcacd13b12a681ec1de51a39b28 100644
--- a/Source/WebKit/NetworkProcess/WebStorage/StorageManagerSet.cpp
+++ b/Source/WebKit/NetworkProcess/WebStorage/StorageManagerSet.cpp
@@ -245,6 +245,50 @@ void StorageManagerSet::getLocalStorageOrigins(PAL::SessionID sessionID, GetOrig
@@ -9502,7 +9515,7 @@ index e4e88a11311aba49c65e6bc84767a1188588db36..33136b2448281b26c8c441626e38e536
+{
+ ASSERT(RunLoop::isMain());
+
-+ m_queue->dispatch([this, protectedThis = makeRef(*this), sessionID, completionHandler = WTFMove(completionHandler)]() mutable {
++ m_queue->dispatch([this, protectedThis = Ref { *this }, sessionID, completionHandler = WTFMove(completionHandler)]() mutable {
+ auto* storageManager = m_storageManagers.get(sessionID);
+ ASSERT(storageManager);
+
@@ -9517,7 +9530,7 @@ index e4e88a11311aba49c65e6bc84767a1188588db36..33136b2448281b26c8c441626e38e536
+{
+ ASSERT(RunLoop::isMain());
+
-+ m_queue->dispatch([this, protectedThis = makeRef(*this), sessionID, storageNamespaceID, origins = WTFMove(origins), completionHandler = WTFMove(completionHandler)]() mutable {
++ m_queue->dispatch([this, protectedThis = Ref { *this }, sessionID, storageNamespaceID, origins = WTFMove(origins), completionHandler = WTFMove(completionHandler)]() mutable {
+ auto* storageManager = m_storageManagers.get(sessionID);
+ ASSERT(storageManager);
+
@@ -9580,7 +9593,7 @@ index b9ab0deebb9f927c73742e86a0be7f97160bd6fb..735d3bdf70f24d96d01aa84b53b4a09b
NetworkDataTaskCocoa(NetworkSession&, NetworkDataTaskClient&, const NetworkLoadParameters&);
diff --git a/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm b/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm
-index e6f4c14a1ad2459f9c2aa0677115dd9f48c8ab46..850ae39428207262d04ac56e83534099525a119a 100644
+index 5c1251af416c36a21a71bc84f18d04c951a6799f..116e28a69e306dc26e0480f4471d15ea1a88ab11 100644
--- a/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm
+++ b/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm
@@ -42,6 +42,7 @@
@@ -9652,7 +9665,7 @@ index e6f4c14a1ad2459f9c2aa0677115dd9f48c8ab46..850ae39428207262d04ac56e83534099
+
}
diff --git a/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm b/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
-index b2bdf59a05784d1583fb702765ecb438efc07eac..3fc5e301b57b99f35918d2201333cf4e0a9461c8 100644
+index 00d911afa63f58a2d969b4c4530d1cec9e5cd046..33bda4410cb2f016e186102151e9d81eef34942b 100644
--- a/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
+++ b/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
@@ -724,7 +724,7 @@ static inline void processServerTrustEvaluation(NetworkSessionCocoa& session, Se
@@ -9664,7 +9677,7 @@ index b2bdf59a05784d1583fb702765ecb438efc07eac..3fc5e301b57b99f35918d2201333cf4e
return completionHandler(NSURLSessionAuthChallengeUseCredential, [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]);
#if HAVE(TLS_PROTOCOL_VERSION_T)
-@@ -987,6 +987,13 @@ ALLOW_DEPRECATED_DECLARATIONS_END
+@@ -989,6 +989,13 @@ ALLOW_DEPRECATED_DECLARATIONS_END
resourceResponse.setDeprecatedNetworkLoadMetrics(WebCore::copyTimingData(taskMetrics, networkDataTask->networkLoadMetrics()));
@@ -9679,7 +9692,7 @@ index b2bdf59a05784d1583fb702765ecb438efc07eac..3fc5e301b57b99f35918d2201333cf4e
#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 715701aa5a53f5a7ea833772170d56faa5a0121c..05241c9cf0ba6c91343a34110fd8d67ab9ebfb9d 100644
+index 8fc7b663e6f7562b2b35489398a2fe731be074f1..a1d7ef83a53c45a841caaf03673028ca11b74182 100644
--- a/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp
+++ b/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp
@@ -26,9 +26,13 @@
@@ -9732,7 +9745,7 @@ index 715701aa5a53f5a7ea833772170d56faa5a0121c..05241c9cf0ba6c91343a34110fd8d67a
handleCookieHeaders(request.resourceRequest(), receivedResponse);
@@ -177,7 +188,10 @@ void NetworkDataTaskCurl::curlDidReceiveBuffer(CurlRequest&, Ref<SharedBuffer>&&
- auto protectedThis = makeRef(*this);
+ Ref protectedThis { *this };
if (state() == State::Canceling || state() == State::Completed || (!m_client && !isDownload()))
return;
-
@@ -9852,18 +9865,19 @@ index 1c427ddb78d6953fe8960c5692afde4f4f0eee85..cf33ff6076dd95ffe564f1dde89c177a
WebCore::ShouldRelaxThirdPartyCookieBlocking m_shouldRelaxThirdPartyCookieBlocking { WebCore::ShouldRelaxThirdPartyCookieBlocking::No };
diff --git a/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp b/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp
-index 175283132c0ca93eb4e6c4f7a9c466e7b6b22764..86fa6bef3c6ca8bc79c2bc02781dd93f9d82041a 100644
+index 055e1504c3850ff293fd852019746d8490dee22c..457aa314c73a67114c64cb2c1866561411530268 100644
--- a/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp
+++ b/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp
-@@ -493,6 +493,7 @@ void NetworkDataTaskSoup::didSendRequest(GRefPtr<GInputStream>&& inputStream)
+@@ -493,6 +493,8 @@ void NetworkDataTaskSoup::didSendRequest(GRefPtr<GInputStream>&& inputStream)
m_networkLoadMetrics.failsTAOCheck = !passesTimingAllowOriginCheck(m_response, *origin);
}
-+ m_response.m_httpRequestHeaderFields = m_networkLoadMetrics.requestHeaders;
++ auto& additionalMetrics = additionalNetworkLoadMetricsForWebInspector();
++ m_response.m_httpRequestHeaderFields = additionalMetrics.requestHeaders;
dispatchDidReceiveResponse();
}
-@@ -590,6 +591,8 @@ bool NetworkDataTaskSoup::acceptCertificate(GTlsCertificate* certificate, GTlsCe
+@@ -590,6 +592,8 @@ bool NetworkDataTaskSoup::acceptCertificate(GTlsCertificate* certificate, GTlsCe
{
ASSERT(m_soupMessage);
URL url = soupURIToURL(soup_message_get_uri(m_soupMessage.get()));
@@ -9872,9 +9886,9 @@ index 175283132c0ca93eb4e6c4f7a9c466e7b6b22764..86fa6bef3c6ca8bc79c2bc02781dd93f
auto error = static_cast<NetworkSessionSoup&>(*m_session).soupNetworkSession().checkTLSErrors(url, certificate, tlsErrors);
if (!error)
return true;
-@@ -1210,6 +1213,12 @@ static String tlsProtocolVersionToString(GTlsProtocolVersion version)
+@@ -1217,6 +1221,12 @@ WebCore::AdditionalNetworkLoadMetricsForWebInspector& NetworkDataTaskSoup::addit
+ return *m_networkLoadMetrics.additionalNetworkLoadMetricsForWebInspector;
}
- #endif
+static void headers_size(const char *name, const char *value, gpointer pointer)
+{
@@ -9885,23 +9899,23 @@ index 175283132c0ca93eb4e6c4f7a9c466e7b6b22764..86fa6bef3c6ca8bc79c2bc02781dd93f
void NetworkDataTaskSoup::didGetHeaders()
{
// We are a bit more conservative with the persistent credential storage than the session store,
-@@ -1253,6 +1262,20 @@ void NetworkDataTaskSoup::didGetHeaders()
- m_networkLoadMetrics.tlsProtocol = tlsProtocolVersionToString(soup_message_get_tls_protocol_version(m_soupMessage.get()));
- m_networkLoadMetrics.tlsCipher = String::fromUTF8(soup_message_get_tls_ciphersuite_name(m_soupMessage.get()));
- m_networkLoadMetrics.responseHeaderBytesReceived = soup_message_metrics_get_response_header_bytes_received(metrics);
+@@ -1262,6 +1272,20 @@ void NetworkDataTaskSoup::didGetHeaders()
+ additionalMetrics.tlsProtocol = tlsProtocolVersionToString(soup_message_get_tls_protocol_version(m_soupMessage.get()));
+ additionalMetrics.tlsCipher = String::fromUTF8(soup_message_get_tls_ciphersuite_name(m_soupMessage.get()));
+ additionalMetrics.responseHeaderBytesReceived = soup_message_metrics_get_response_header_bytes_received(metrics);
+#else
+ {
+ auto* requestHeaders = soup_message_get_request_headers(m_soupMessage.get());
+ int requestHeadersSize = 0;
+ soup_message_headers_foreach(requestHeaders, headers_size, &requestHeadersSize);
-+ m_networkLoadMetrics.requestHeaderBytesSent = requestHeadersSize;
++ additionalMetrics.requestHeaderBytesSent = requestHeadersSize;
+ }
+
+ {
+ auto* responseHeaders = soup_message_get_response_headers(m_soupMessage.get());
+ int responseHeadersSize = 0;
+ soup_message_headers_foreach(responseHeaders, headers_size, &responseHeadersSize);
-+ m_networkLoadMetrics.responseHeaderBytesReceived = responseHeadersSize;
++ additionalMetrics.responseHeaderBytesReceived = responseHeadersSize;
+ }
#endif
}
@@ -10493,10 +10507,10 @@ index ad411b806298a4b85e8785bbf475ff2d93cf17ef..05f95934ccc7c052bc721a51b5b19c2d
return std::nullopt;
diff --git a/Source/WebKit/Shared/WebPageCreationParameters.h b/Source/WebKit/Shared/WebPageCreationParameters.h
-index 98df46cfa4a214d78101743bb3e8ea0083f43384..2e7be14e6ca2a414fdc005049365874c63c68c44 100644
+index 4a05d60b2ace122401348bba9aa1da1746b89240..26b82cd757fd3e4fb032e9d6901895fced4e19eb 100644
--- a/Source/WebKit/Shared/WebPageCreationParameters.h
+++ b/Source/WebKit/Shared/WebPageCreationParameters.h
-@@ -251,6 +251,8 @@ struct WebPageCreationParameters {
+@@ -252,6 +252,8 @@ struct WebPageCreationParameters {
WebCore::ShouldRelaxThirdPartyCookieBlocking shouldRelaxThirdPartyCookieBlocking { WebCore::ShouldRelaxThirdPartyCookieBlocking::No };
@@ -10809,10 +10823,10 @@ index 85d6f74114f4e7f82d9502d1b99d69098d6a49b6..6896c9756edb233dda46c7031e1af699
return WebTouchEvent();
}
diff --git a/Source/WebKit/Sources.txt b/Source/WebKit/Sources.txt
-index 42665b504fdffd05df5cdccd47f35dc26674be06..d2c6610ab1338b41b49dd302a9aa1b3a16aadee7 100644
+index 93dba6cd960b0891b2bdf49fe5fe0057584ba462..f55f84b46673af314a43c4b9d828da46763a0f79 100644
--- a/Source/WebKit/Sources.txt
+++ b/Source/WebKit/Sources.txt
-@@ -308,11 +308,14 @@ Shared/XR/XRDeviceProxy.cpp
+@@ -307,11 +307,14 @@ Shared/XR/XRDeviceProxy.cpp
UIProcess/AuxiliaryProcessProxy.cpp
UIProcess/BackgroundProcessResponsivenessTimer.cpp
@@ -10827,7 +10841,7 @@ index 42665b504fdffd05df5cdccd47f35dc26674be06..d2c6610ab1338b41b49dd302a9aa1b3a
UIProcess/LegacyGlobalSettings.cpp
UIProcess/MediaKeySystemPermissionRequestManagerProxy.cpp
UIProcess/MediaKeySystemPermissionRequestProxy.cpp
-@@ -321,6 +324,7 @@ UIProcess/PageLoadState.cpp
+@@ -320,6 +323,7 @@ UIProcess/PageLoadState.cpp
UIProcess/ProcessAssertion.cpp
UIProcess/ProcessThrottler.cpp
UIProcess/ProvisionalPageProxy.cpp
@@ -10835,7 +10849,7 @@ index 42665b504fdffd05df5cdccd47f35dc26674be06..d2c6610ab1338b41b49dd302a9aa1b3a
UIProcess/ResponsivenessTimer.cpp
UIProcess/SpeechRecognitionRemoteRealtimeMediaSource.cpp
UIProcess/SpeechRecognitionRemoteRealtimeMediaSourceManager.cpp
-@@ -361,6 +365,8 @@ UIProcess/WebOpenPanelResultListenerProxy.cpp
+@@ -360,6 +364,8 @@ UIProcess/WebOpenPanelResultListenerProxy.cpp
UIProcess/WebPageDiagnosticLoggingClient.cpp
UIProcess/WebPageGroup.cpp
UIProcess/WebPageInjectedBundleClient.cpp
@@ -10844,7 +10858,7 @@ index 42665b504fdffd05df5cdccd47f35dc26674be06..d2c6610ab1338b41b49dd302a9aa1b3a
UIProcess/WebPageProxy.cpp
UIProcess/WebPasteboardProxy.cpp
UIProcess/WebPreferences.cpp
-@@ -482,7 +488,11 @@ UIProcess/Inspector/WebInspectorUtilities.cpp
+@@ -481,7 +487,11 @@ UIProcess/Inspector/WebInspectorUtilities.cpp
UIProcess/Inspector/WebPageDebuggable.cpp
UIProcess/Inspector/WebPageInspectorController.cpp
@@ -11326,7 +11340,7 @@ index 0000000000000000000000000000000000000000..e7143513ea2be8e1cdab5c86a28643ff
+}
+@end
diff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKDownload.mm b/Source/WebKit/UIProcess/API/Cocoa/_WKDownload.mm
-index 0b32900879f73b9776f1bfbb6aec73c0553f7ac0..d3bac7b1130311c1094401b57c28b8f617d153aa 100644
+index 1f4c571931265c75912f8d24c795d0c522ee74f6..71ca08f3b335d97124db9c216bc5a6ba327ad5f3 100644
--- a/Source/WebKit/UIProcess/API/Cocoa/_WKDownload.mm
+++ b/Source/WebKit/UIProcess/API/Cocoa/_WKDownload.mm
@@ -32,6 +32,7 @@
@@ -11651,10 +11665,10 @@ index 6c1cf45443633e4c548c146657bd52a574362ab3..7259c07ec55f92d0d74ab46376aafdce
bool canRunBeforeUnloadConfirmPanel() const final { return true; }
diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
-index 1bc51dd1ed3b1185ed7265559bb1d3aed979026d..adff0ce038ca876c5b0397811faae16beee7a899 100644
+index 1b128a4c6825de9f93550725c5195f4ab0443548..eb6114654dc8961140693f9bbbdcc87d33901a6e 100644
--- a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
-@@ -120,8 +120,8 @@ enum {
+@@ -121,8 +121,8 @@ enum {
PROP_LOCAL_STORAGE_DIRECTORY,
#endif
PROP_WEBSITE_DATA_MANAGER,
@@ -11775,7 +11789,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 55434d8a09fcfab7954f2a7edc27996de40956dd..90d9f108bb52b1288d886974712164c89bf24b90 100644
+index f094f53893944955f79839c25d9dee925df4700e..143e3d189cbe7520082354c975c8eecc2861923f 100644
--- a/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
@@ -32,6 +32,7 @@
@@ -12658,7 +12672,7 @@ index 329db791cf432724636342800504b08ea89db0e3..5d2b8aa95a5a9daae91c111803becf13
bool webViewRunBeforeUnloadConfirmPanelWithMessageInitiatedByFrameCompletionHandler : 1;
bool webViewRequestGeolocationPermissionForFrameDecisionHandler : 1;
diff --git a/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm b/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
-index bdd6b3a683355aced3b9a720247a61315eae9f41..0e52a9f9e666eaf6f21959df8dfd170b6591b020 100644
+index 11b7a4058a5b641ab884a976577cf2103bcb6bdd..d64b09b1892f04023780782da636c621144a91b5 100644
--- a/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
+++ b/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
@@ -106,6 +106,7 @@ void UIDelegate::setDelegate(id <WKUIDelegate> delegate)
@@ -12686,7 +12700,7 @@ index bdd6b3a683355aced3b9a720247a61315eae9f41..0e52a9f9e666eaf6f21959df8dfd170b
{
if (!m_uiDelegate)
diff --git a/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm b/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
-index 3301ed48f045a9dd54f3a853bae90f12eda7ca57..08e760b54681bfd2230e12303620a0e26e33c054 100644
+index 2ab50dd76fd3ae3cf31f6f82ebdf5b7a271bedc5..e8c71025da8b09564801847feb76ca9c8542d083 100644
--- a/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
+++ b/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
@@ -35,6 +35,7 @@
@@ -12765,10 +12779,10 @@ index 3301ed48f045a9dd54f3a853bae90f12eda7ca57..08e760b54681bfd2230e12303620a0e2
#if PLATFORM(IOS_FAMILY)
diff --git a/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm b/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
-index eb8561176596db9a4249cb10771ece1e359fe6d3..3ed5173359f8315e02a166330333077d338650e0 100644
+index 1a390b08c7585753b43a3170d10d30cb26b9de70..7f31e7261974bf68a78f382f97e287a9a1a84da2 100644
--- a/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
+++ b/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
-@@ -421,7 +421,7 @@ void WebProcessPool::platformInitializeWebProcess(const WebProcessProxy& process
+@@ -453,7 +453,7 @@ void WebProcessPool::platformInitializeWebProcess(const WebProcessProxy& process
auto screenProperties = WebCore::collectScreenProperties();
parameters.screenProperties = WTFMove(screenProperties);
#if PLATFORM(MAC)
@@ -12777,7 +12791,7 @@ index eb8561176596db9a4249cb10771ece1e359fe6d3..3ed5173359f8315e02a166330333077d
#endif
#if PLATFORM(IOS)
-@@ -706,8 +706,8 @@ void WebProcessPool::registerNotificationObservers()
+@@ -771,8 +771,8 @@ void WebProcessPool::registerNotificationObservers()
}];
m_scrollerStyleNotificationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSPreferredScrollerStyleDidChangeNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *notification) {
@@ -12994,7 +13008,7 @@ index b23a45ff7d313317d8ba64fb430ebba3b6adef71..8419b69c5e278cf88a3ab6b98c335edd
} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp b/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp
-index 78967b6e2fbe893af99544726658113bd4df300d..363fdee5eb314181f86b57c82fd159fc04707261 100644
+index 46384e42f91e14c122154cb90750d29eb2d46e0d..80ce910e0c5caffb92bf25e334ff6b0244730f8e 100644
--- a/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp
+++ b/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp
@@ -42,8 +42,10 @@
@@ -13023,9 +13037,9 @@ index 78967b6e2fbe893af99544726658113bd4df300d..363fdee5eb314181f86b57c82fd159fc
void DownloadProxy::cancel(CompletionHandler<void(API::Data*)>&& completionHandler)
{
if (m_dataStore) {
-- m_dataStore->networkProcess().sendWithAsyncReply(Messages::NetworkProcess::CancelDownload(m_downloadID), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)] (const IPC::DataReference& resumeData) mutable {
+- m_dataStore->networkProcess().sendWithAsyncReply(Messages::NetworkProcess::CancelDownload(m_downloadID), [this, protectedThis = Ref { *this }, completionHandler = WTFMove(completionHandler)] (const IPC::DataReference& resumeData) mutable {
+ auto* instrumentation = m_dataStore->downloadInstrumentation();
-+ m_dataStore->networkProcess().sendWithAsyncReply(Messages::NetworkProcess::CancelDownload(m_downloadID), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler), instrumentation] (const IPC::DataReference& resumeData) mutable {
++ m_dataStore->networkProcess().sendWithAsyncReply(Messages::NetworkProcess::CancelDownload(m_downloadID), [this, protectedThis = Ref { *this }, completionHandler = WTFMove(completionHandler), instrumentation] (const IPC::DataReference& resumeData) mutable {
m_legacyResumeData = createData(resumeData);
completionHandler(m_legacyResumeData.get());
+ if (instrumentation)
@@ -13052,7 +13066,7 @@ index 78967b6e2fbe893af99544726658113bd4df300d..363fdee5eb314181f86b57c82fd159fc
+ return;
+ }
+
- m_client->decideDestinationWithSuggestedFilename(*this, response, ResourceResponseBase::sanitizeSuggestedFilename(suggestedFilename), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)] (AllowOverwrite allowOverwrite, String destination) mutable {
+ m_client->decideDestinationWithSuggestedFilename(*this, response, ResourceResponseBase::sanitizeSuggestedFilename(suggestedFilename), [this, protectedThis = Ref { *this }, completionHandler = WTFMove(completionHandler)] (AllowOverwrite allowOverwrite, String destination) mutable {
SandboxExtension::Handle sandboxExtensionHandle;
if (!destination.isNull()) {
@@ -184,6 +207,8 @@ void DownloadProxy::didCreateDestination(const String& path)
@@ -13784,7 +13798,7 @@ index 0000000000000000000000000000000000000000..8f2795dbf1323dd8d5f986f18e6fe164
+} // 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..62f20814b72e90275eb4fa0e8302fc15abdaaab2
+index 0000000000000000000000000000000000000000..86a2559c353e8aa87c7318b891e99f31888fe247
--- /dev/null
+++ b/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.cpp
@@ -0,0 +1,393 @@
@@ -14172,7 +14186,7 @@ index 0000000000000000000000000000000000000000..62f20814b72e90275eb4fa0e8302fc15
+ }
+
+ flushLastFrame();
-+ m_vpxCodec->finishAsync([protectRef = makeRef(*this), callback = WTFMove(callback)] () mutable {
++ m_vpxCodec->finishAsync([protectRef = Ref { *this }, callback = WTFMove(callback)] () mutable {
+ RunLoop::main().dispatch([callback = WTFMove(callback)] {
+ callback();
+ });
@@ -16464,7 +16478,7 @@ index 5998c94340cd5936dc0ec22a7103e8036e7f7a8f..028aa3c14e887889363be4884dfa1e54
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 f65b8a487c2e6c01cb309a3cd850a5c3e33cb6f0..8a99a0d9349216bbc1aa5b2ba7376a5c6a7f8a2e 100644
+index b0919b8cb4a5a4332ef882db5a44a2c340924bea..b498c15220238a66661f2fc0862ce3213956dafd 100644
--- a/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
+++ b/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
@@ -622,3 +622,5 @@ bool ProvisionalPageProxy::sendMessage(UniqueRef<IPC::Encoder>&& encoder, Option
@@ -17495,7 +17509,7 @@ index 0000000000000000000000000000000000000000..48c9ccc420c1b4ae3259e1d5ba17fd8f
+
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/WebPageProxy.cpp b/Source/WebKit/UIProcess/WebPageProxy.cpp
-index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6c815b8af 100644
+index 5a7db04e822e52611b9e22a322aaee4e892b7d77..87bd8c7703e7454221b4f1f6af5278d65bc555ed 100644
--- a/Source/WebKit/UIProcess/WebPageProxy.cpp
+++ b/Source/WebKit/UIProcess/WebPageProxy.cpp
@@ -246,6 +246,9 @@
@@ -17549,7 +17563,7 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
RefPtr<API::Navigation> WebPageProxy::loadRequest(ResourceRequest&& request, ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy, API::Object* userData)
{
if (m_isClosed)
-@@ -1905,6 +1928,31 @@ void WebPageProxy::setControlledByAutomation(bool controlled)
+@@ -1906,6 +1929,31 @@ void WebPageProxy::setControlledByAutomation(bool controlled)
websiteDataStore().networkProcess().send(Messages::NetworkProcess::SetSessionIsControlledByAutomation(m_websiteDataStore->sessionID(), m_controlledByAutomation), 0);
}
@@ -17581,7 +17595,7 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
void WebPageProxy::createInspectorTarget(const String& targetId, Inspector::InspectorTargetType type)
{
MESSAGE_CHECK(m_process, !targetId.isEmpty());
-@@ -2095,6 +2143,25 @@ void WebPageProxy::updateActivityState(OptionSet<ActivityState::Flag> flagsToUpd
+@@ -2096,6 +2144,25 @@ void WebPageProxy::updateActivityState(OptionSet<ActivityState::Flag> flagsToUpd
{
bool wasVisible = isViewVisible();
m_activityState.remove(flagsToUpdate);
@@ -17607,7 +17621,7 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
if (flagsToUpdate & ActivityState::IsFocused && pageClient().isViewFocused())
m_activityState.add(ActivityState::IsFocused);
if (flagsToUpdate & ActivityState::WindowIsActive && pageClient().isViewWindowActive())
-@@ -2667,6 +2734,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag
+@@ -2668,6 +2735,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag
{
if (!hasRunningProcess())
return;
@@ -17616,7 +17630,7 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
#if PLATFORM(GTK)
UNUSED_PARAM(dragStorageName);
UNUSED_PARAM(sandboxExtensionHandle);
-@@ -2677,6 +2746,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag
+@@ -2678,6 +2747,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag
m_process->assumeReadAccessToBaseURL(*this, url);
ASSERT(dragData.platformData());
@@ -17625,7 +17639,7 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
send(Messages::WebPage::PerformDragControllerAction(action, dragData.clientPosition(), dragData.globalPosition(), dragData.draggingSourceOperationMask(), *dragData.platformData(), dragData.flags()));
#else
send(Messages::WebPage::PerformDragControllerAction(action, dragData, sandboxExtensionHandle, sandboxExtensionsForUpload));
-@@ -2692,18 +2763,41 @@ void WebPageProxy::didPerformDragControllerAction(std::optional<WebCore::DragOpe
+@@ -2693,18 +2764,41 @@ void WebPageProxy::didPerformDragControllerAction(std::optional<WebCore::DragOpe
m_currentDragCaretEditableElementRect = editableElementRect;
setDragCaretRect(insertionRect);
pageClient().didPerformDragControllerAction();
@@ -17670,7 +17684,7 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
void WebPageProxy::dragEnded(const IntPoint& clientPosition, const IntPoint& globalPosition, OptionSet<WebCore::DragOperation> dragOperationMask)
{
if (!hasRunningProcess())
-@@ -2712,6 +2806,24 @@ void WebPageProxy::dragEnded(const IntPoint& clientPosition, const IntPoint& glo
+@@ -2713,6 +2807,24 @@ void WebPageProxy::dragEnded(const IntPoint& clientPosition, const IntPoint& glo
setDragCaretRect({ });
}
@@ -17695,7 +17709,7 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
void WebPageProxy::didPerformDragOperation(bool handled)
{
pageClient().didPerformDragOperation(handled);
-@@ -2724,8 +2836,18 @@ void WebPageProxy::didStartDrag()
+@@ -2725,8 +2837,18 @@ void WebPageProxy::didStartDrag()
discardQueuedMouseEvents();
send(Messages::WebPage::DidStartDrag());
@@ -17715,7 +17729,7 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
void WebPageProxy::dragCancelled()
{
if (hasRunningProcess())
-@@ -2830,16 +2952,38 @@ void WebPageProxy::processNextQueuedMouseEvent()
+@@ -2831,16 +2953,38 @@ void WebPageProxy::processNextQueuedMouseEvent()
m_process->startResponsivenessTimer();
}
@@ -17761,7 +17775,7 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
}
void WebPageProxy::doAfterProcessingAllPendingMouseEvents(WTF::Function<void ()>&& action)
-@@ -3059,7 +3203,7 @@ static TrackingType mergeTrackingTypes(TrackingType a, TrackingType b)
+@@ -3060,7 +3204,7 @@ static TrackingType mergeTrackingTypes(TrackingType a, TrackingType b)
void WebPageProxy::updateTouchEventTracking(const WebTouchEvent& touchStartEvent)
{
@@ -17770,7 +17784,7 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
const EventNames& names = eventNames();
for (auto& touchPoint : touchStartEvent.touchPoints()) {
IntPoint location = touchPoint.location();
-@@ -3092,7 +3236,7 @@ void WebPageProxy::updateTouchEventTracking(const WebTouchEvent& touchStartEvent
+@@ -3093,7 +3237,7 @@ void WebPageProxy::updateTouchEventTracking(const WebTouchEvent& touchStartEvent
m_touchAndPointerEventTracking.touchStartTracking = TrackingType::Synchronous;
m_touchAndPointerEventTracking.touchMoveTracking = TrackingType::Synchronous;
m_touchAndPointerEventTracking.touchEndTracking = TrackingType::Synchronous;
@@ -17779,7 +17793,7 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
}
TrackingType WebPageProxy::touchEventTrackingType(const WebTouchEvent& touchStartEvent) const
-@@ -3481,6 +3625,8 @@ void WebPageProxy::receivedNavigationPolicyDecision(PolicyAction policyAction, A
+@@ -3482,6 +3626,8 @@ void WebPageProxy::receivedNavigationPolicyDecision(PolicyAction policyAction, A
policyAction = PolicyAction::Download;
if (policyAction != PolicyAction::Use || !frame.isMainFrame() || !navigation) {
@@ -17788,7 +17802,7 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
receivedPolicyDecision(policyAction, navigation, WTFMove(policies), WTFMove(navigationAction), WTFMove(sender));
return;
}
-@@ -3547,6 +3693,7 @@ void WebPageProxy::receivedNavigationPolicyDecision(PolicyAction policyAction, A
+@@ -3548,6 +3694,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, std::optional<SandboxExtension::Handle> sandboxExtensionHandle, WillContinueLoadInNewProcess willContinueLoadInNewProcess)
{
@@ -17796,7 +17810,7 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
if (!hasRunningProcess()) {
sender->send(PolicyDecision { sender->identifier(), isNavigatingToAppBoundDomain(), PolicyAction::Ignore, 0, std::nullopt, std::nullopt });
return;
-@@ -4289,6 +4436,11 @@ void WebPageProxy::pageScaleFactorDidChange(double scaleFactor)
+@@ -4290,6 +4437,11 @@ void WebPageProxy::pageScaleFactorDidChange(double scaleFactor)
m_pageScaleFactor = scaleFactor;
}
@@ -17808,7 +17822,7 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
void WebPageProxy::pluginScaleFactorDidChange(double pluginScaleFactor)
{
m_pluginScaleFactor = pluginScaleFactor;
-@@ -4622,6 +4774,7 @@ void WebPageProxy::didDestroyNavigation(uint64_t navigationID)
+@@ -4623,6 +4775,7 @@ void WebPageProxy::didDestroyNavigation(uint64_t navigationID)
return;
m_navigationState->didDestroyNavigation(navigationID);
@@ -17816,7 +17830,7 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
}
void WebPageProxy::didStartProvisionalLoadForFrame(FrameIdentifier frameID, FrameInfoData&& frameInfo, ResourceRequest&& request, uint64_t navigationID, URL&& url, URL&& unreachableURL, const UserData& userData)
-@@ -4844,6 +4997,8 @@ void WebPageProxy::didFailProvisionalLoadForFrameShared(Ref<WebProcessProxy>&& p
+@@ -4845,6 +4998,8 @@ void WebPageProxy::didFailProvisionalLoadForFrameShared(Ref<WebProcessProxy>&& p
m_failingProvisionalLoadURL = { };
@@ -17825,13 +17839,13 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
// 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;
-@@ -5297,7 +5452,14 @@ void WebPageProxy::decidePolicyForNavigationActionAsync(FrameIdentifier frameID,
+@@ -5298,7 +5453,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);
+ if (m_inspectorController->shouldPauseLoading()) {
-+ m_inspectorController->setContinueLoadingCallback([this, protectedThis = makeRef(*this), frameID, frameInfo = WTFMove(frameInfo), identifier, navigationID, navigationActionData = WTFMove(navigationActionData),
++ m_inspectorController->setContinueLoadingCallback([this, protectedThis = Ref { *this }, frameID, frameInfo = WTFMove(frameInfo), identifier, navigationID, navigationActionData = WTFMove(navigationActionData),
+ originatingFrameInfo = WTFMove(originatingFrameInfo), originatingPageID, originalRequest, request = WTFMove(request), requestBody = WTFMove(requestBody), redirectResponse = WTFMove(redirectResponse), userData, listenerID] () mutable {
+ 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);
+ });
@@ -17846,10 +17860,10 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
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 {
+ auto completionHandler = [this, protectedThis = Ref { *this }, mainFrameURL, request, reply = WTFMove(reply), privateClickMeasurement = navigationActionData.privateClickMeasurement] (RefPtr<WebPageProxy> newPage) mutable {
if (!newPage) {
reply(std::nullopt, std::nullopt);
-@@ -5875,6 +6038,7 @@ void WebPageProxy::createNewPage(FrameInfoData&& originatingFrameInfoData, WebPa
+@@ -5877,6 +6040,7 @@ void WebPageProxy::createNewPage(FrameInfoData&& originatingFrameInfoData, WebPa
void WebPageProxy::showPage()
{
m_uiClient->showPage(this);
@@ -17857,7 +17871,7 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
}
void WebPageProxy::exitFullscreenImmediately()
-@@ -5910,6 +6074,10 @@ void WebPageProxy::closePage()
+@@ -5912,6 +6076,10 @@ void WebPageProxy::closePage()
if (isClosed())
return;
@@ -17868,7 +17882,7 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
WEBPAGEPROXY_RELEASE_LOG(Process, "closePage:");
pageClient().clearAllEditCommands();
m_uiClient->close(this);
-@@ -5946,6 +6114,8 @@ void WebPageProxy::runJavaScriptAlert(FrameIdentifier frameID, FrameInfoData&& f
+@@ -5948,6 +6116,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 {
@@ -17877,7 +17891,7 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
page.m_uiClient->runJavaScriptAlert(page, message, frame, WTFMove(frameInfo), [reply = WTFMove(reply), completion = WTFMove(completion)]() mutable {
reply();
completion();
-@@ -5967,6 +6137,8 @@ void WebPageProxy::runJavaScriptConfirm(FrameIdentifier frameID, FrameInfoData&&
+@@ -5969,6 +6139,8 @@ void WebPageProxy::runJavaScriptConfirm(FrameIdentifier frameID, FrameInfoData&&
if (auto* automationSession = process().processPool().automationSession())
automationSession->willShowJavaScriptDialog(*this);
}
@@ -17886,7 +17900,7 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
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 {
-@@ -5990,6 +6162,8 @@ void WebPageProxy::runJavaScriptPrompt(FrameIdentifier frameID, FrameInfoData&&
+@@ -5992,6 +6164,8 @@ void WebPageProxy::runJavaScriptPrompt(FrameIdentifier frameID, FrameInfoData&&
if (auto* automationSession = process().processPool().automationSession())
automationSession->willShowJavaScriptDialog(*this);
}
@@ -17895,7 +17909,7 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
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 {
-@@ -6150,6 +6324,8 @@ void WebPageProxy::runBeforeUnloadConfirmPanel(FrameIdentifier frameID, FrameInf
+@@ -6152,6 +6326,8 @@ void WebPageProxy::runBeforeUnloadConfirmPanel(FrameIdentifier frameID, FrameInf
return;
}
}
@@ -17904,7 +17918,7 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
// Since runBeforeUnloadConfirmPanel() can spin a nested run loop we need to turn off the responsiveness timer and the tryClose timer.
m_process->stopResponsivenessTimer();
-@@ -7374,6 +7550,8 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
+@@ -7376,6 +7552,8 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
if (auto* automationSession = process().processPool().automationSession())
automationSession->mouseEventsFlushedForPage(*this);
didFinishProcessingAllPendingMouseEvents();
@@ -17913,7 +17927,7 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
}
break;
}
-@@ -7388,10 +7566,13 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
+@@ -7390,10 +7568,13 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
pageClient().wheelEventWasNotHandledByWebCore(oldestProcessedEvent);
}
@@ -17930,7 +17944,7 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
break;
}
-@@ -7400,7 +7581,6 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
+@@ -7402,7 +7583,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());
@@ -17938,7 +17952,7 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
MESSAGE_CHECK(m_process, !m_keyEventQueue.isEmpty());
auto event = m_keyEventQueue.takeFirst();
MESSAGE_CHECK(m_process, type == event.type());
-@@ -7419,7 +7599,6 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
+@@ -7421,7 +7601,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);
@@ -17946,7 +17960,7 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
pageClient().doneWithKeyEvent(event, handled);
if (!handled)
m_uiClient->didNotHandleKeyEvent(this, event);
-@@ -7428,6 +7607,7 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
+@@ -7430,6 +7609,7 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
if (!canProcessMoreKeyEvents) {
if (auto* automationSession = process().processPool().automationSession())
automationSession->keyboardEventsFlushedForPage(*this);
@@ -17954,9 +17968,9 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
}
break;
}
-@@ -7759,7 +7939,10 @@ void WebPageProxy::dispatchProcessDidTerminate(ProcessTerminationReason reason)
+@@ -7784,7 +7964,10 @@ void WebPageProxy::dispatchProcessDidTerminate(ProcessTerminationReason reason)
{
- WEBPAGEPROXY_RELEASE_LOG_ERROR(Loading, "dispatchProcessDidTerminate: reason=%d", reason);
+ WEBPAGEPROXY_RELEASE_LOG_ERROR(Loading, "dispatchProcessDidTerminate: reason=%{public}s", processTerminationReasonToString(reason));
- bool handledByClient = false;
+ bool handledByClient = m_inspectorController->pageCrashed(reason);
@@ -17966,7 +17980,7 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
if (m_loaderClient)
handledByClient = reason != ProcessTerminationReason::RequestedByClient && m_loaderClient->processDidCrash(*this);
else
-@@ -8132,6 +8315,7 @@ static const Vector<ASCIILiteral>& mediaRelatedIOKitClasses()
+@@ -8157,6 +8340,7 @@ static const Vector<ASCIILiteral>& mediaRelatedIOKitClasses()
WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& process, DrawingAreaProxy& drawingArea, RefPtr<API::WebsitePolicies>&& websitePolicies)
{
@@ -17974,7 +17988,7 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
WebPageCreationParameters parameters;
parameters.processDisplayName = configuration().processDisplayName();
-@@ -8324,6 +8508,8 @@ WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& proc
+@@ -8349,6 +8533,8 @@ WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& proc
parameters.shouldRelaxThirdPartyCookieBlocking = m_configuration->shouldRelaxThirdPartyCookieBlocking();
parameters.canUseCredentialStorage = m_canUseCredentialStorage;
@@ -17983,7 +17997,7 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
#if PLATFORM(GTK)
parameters.gtkSettings = GtkSettingsManager::singleton().settingsState();
#endif
-@@ -8404,6 +8590,14 @@ void WebPageProxy::gamepadActivity(const Vector<GamepadData>& gamepadDatas, Even
+@@ -8429,6 +8615,14 @@ void WebPageProxy::gamepadActivity(const Vector<GamepadData>& gamepadDatas, Even
void WebPageProxy::didReceiveAuthenticationChallengeProxy(Ref<AuthenticationChallengeProxy>&& authenticationChallenge, NegotiatedLegacyTLS negotiatedLegacyTLS)
{
@@ -17996,9 +18010,9 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
+ return;
+ }
if (negotiatedLegacyTLS == NegotiatedLegacyTLS::Yes) {
- m_navigationClient->shouldAllowLegacyTLS(*this, authenticationChallenge.get(), [this, protectedThis = makeRef(*this), authenticationChallenge] (bool shouldAllowLegacyTLS) {
+ m_navigationClient->shouldAllowLegacyTLS(*this, authenticationChallenge.get(), [this, protectedThis = Ref { *this }, authenticationChallenge] (bool shouldAllowLegacyTLS) {
if (shouldAllowLegacyTLS)
-@@ -8497,6 +8691,15 @@ void WebPageProxy::requestGeolocationPermissionForFrame(GeolocationIdentifier ge
+@@ -8522,6 +8716,15 @@ void WebPageProxy::requestGeolocationPermissionForFrame(GeolocationIdentifier ge
request->deny();
};
@@ -18015,7 +18029,7 @@ index d9f3855c6f48fa2fc5c8a70d105aaaf5ffd26c97..586d5caf63df3d4a101a5c6092d9edd6
// 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 f441714431a414fb5395f641bbf8ede8d3546a1b..9a47700f78f55f125f8665455ac415cfca9bc1a3 100644
+index be10105f1613bcc49e7725e818551e3b5e40cef3..96cdfce3143cf9068441b71e0f1c9025206c22d4 100644
--- a/Source/WebKit/UIProcess/WebPageProxy.h
+++ b/Source/WebKit/UIProcess/WebPageProxy.h
@@ -39,6 +39,7 @@
@@ -18026,7 +18040,7 @@ index f441714431a414fb5395f641bbf8ede8d3546a1b..9a47700f78f55f125f8665455ac415cf
#include "LayerTreeContext.h"
#include "MediaKeySystemPermissionRequestManagerProxy.h"
#include "MediaPlaybackState.h"
-@@ -144,8 +145,11 @@
+@@ -145,8 +146,11 @@
#include "EndowmentStateTracker.h"
#endif
@@ -18038,7 +18052,7 @@ index f441714431a414fb5395f641bbf8ede8d3546a1b..9a47700f78f55f125f8665455ac415cf
#endif
#if ENABLE(TOUCH_EVENTS)
-@@ -167,6 +171,14 @@
+@@ -168,6 +172,14 @@
#include "ArgumentCodersGtk.h"
#endif
@@ -18053,7 +18067,7 @@ index f441714431a414fb5395f641bbf8ede8d3546a1b..9a47700f78f55f125f8665455ac415cf
#if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS_FAMILY)
#include <WebCore/MediaPlaybackTargetPicker.h>
#include <WebCore/WebMediaSessionManagerClient.h>
-@@ -246,6 +258,7 @@ class AuthenticationChallenge;
+@@ -247,6 +259,7 @@ class AuthenticationChallenge;
class CertificateInfo;
class Cursor;
class DragData;
@@ -18061,7 +18075,7 @@ index f441714431a414fb5395f641bbf8ede8d3546a1b..9a47700f78f55f125f8665455ac415cf
class FloatRect;
class FontAttributeChanges;
class FontChanges;
-@@ -253,7 +266,6 @@ class GraphicsLayer;
+@@ -254,7 +267,6 @@ class GraphicsLayer;
class IntSize;
class ProtectionSpace;
class RunLoopObserver;
@@ -18069,7 +18083,7 @@ index f441714431a414fb5395f641bbf8ede8d3546a1b..9a47700f78f55f125f8665455ac415cf
class SharedBuffer;
class SpeechRecognitionRequest;
class TextIndicator;
-@@ -533,6 +545,8 @@ public:
+@@ -534,6 +546,8 @@ public:
void setControlledByAutomation(bool);
WebPageInspectorController& inspectorController() { return *m_inspectorController; }
@@ -18078,7 +18092,7 @@ index f441714431a414fb5395f641bbf8ede8d3546a1b..9a47700f78f55f125f8665455ac415cf
#if PLATFORM(IOS_FAMILY)
void showInspectorIndication();
-@@ -615,6 +629,11 @@ public:
+@@ -616,6 +630,11 @@ public:
void setPageLoadStateObserver(std::unique_ptr<PageLoadState::Observer>&&);
@@ -18090,7 +18104,7 @@ index f441714431a414fb5395f641bbf8ede8d3546a1b..9a47700f78f55f125f8665455ac415cf
void initializeWebPage();
void setDrawingArea(std::unique_ptr<DrawingAreaProxy>&&);
-@@ -642,6 +661,7 @@ public:
+@@ -643,6 +662,7 @@ public:
void closePage();
void addPlatformLoadParameters(WebProcessProxy&, LoadParameters&);
@@ -18098,7 +18112,7 @@ index f441714431a414fb5395f641bbf8ede8d3546a1b..9a47700f78f55f125f8665455ac415cf
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);
-@@ -1157,6 +1177,7 @@ public:
+@@ -1158,6 +1178,7 @@ public:
#endif
void pageScaleFactorDidChange(double);
@@ -18106,7 +18120,7 @@ index f441714431a414fb5395f641bbf8ede8d3546a1b..9a47700f78f55f125f8665455ac415cf
void pluginScaleFactorDidChange(double);
void pluginZoomFactorDidChange(double);
-@@ -1231,14 +1252,20 @@ public:
+@@ -1232,14 +1253,20 @@ public:
void didStartDrag();
void dragCancelled();
void setDragCaretRect(const WebCore::IntRect&);
@@ -18128,7 +18142,7 @@ index f441714431a414fb5395f641bbf8ede8d3546a1b..9a47700f78f55f125f8665455ac415cf
#endif
void processDidBecomeUnresponsive();
-@@ -1482,6 +1509,8 @@ public:
+@@ -1483,6 +1510,8 @@ public:
#if PLATFORM(COCOA) || PLATFORM(GTK)
RefPtr<ViewSnapshot> takeViewSnapshot(std::optional<WebCore::IntRect>&&);
@@ -18137,7 +18151,7 @@ index f441714431a414fb5395f641bbf8ede8d3546a1b..9a47700f78f55f125f8665455ac415cf
#endif
#if ENABLE(WEB_CRYPTO)
-@@ -2590,6 +2619,7 @@ private:
+@@ -2591,6 +2620,7 @@ private:
String m_overrideContentSecurityPolicy;
RefPtr<WebInspectorUIProxy> m_inspector;
@@ -18145,7 +18159,7 @@ index f441714431a414fb5395f641bbf8ede8d3546a1b..9a47700f78f55f125f8665455ac415cf
#if PLATFORM(COCOA)
WeakObjCPtr<WKWebView> m_cocoaView;
-@@ -2844,6 +2874,20 @@ private:
+@@ -2845,6 +2875,20 @@ private:
unsigned m_currentDragNumberOfFilesToBeAccepted { 0 };
WebCore::IntRect m_currentDragCaretRect;
WebCore::IntRect m_currentDragCaretEditableElementRect;
@@ -18166,7 +18180,7 @@ index f441714431a414fb5395f641bbf8ede8d3546a1b..9a47700f78f55f125f8665455ac415cf
#endif
PageLoadState m_pageLoadState;
-@@ -3057,6 +3101,9 @@ private:
+@@ -3058,6 +3102,9 @@ private:
RefPtr<API::Object> messageBody;
};
Vector<InjectedBundleMessage> m_pendingInjectedBundleMessages;
@@ -18177,7 +18191,7 @@ index f441714431a414fb5395f641bbf8ede8d3546a1b..9a47700f78f55f125f8665455ac415cf
#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 4ba558ae824cb339027c4af30c0eb8878315c9bf..c2f6a7e00f98f69bf2334bc571f7ded87cdba73e 100644
+index 32e2e4a5c449e91875604fab0278db5808f0818e..7c8c017778116e9bffe4a951a8c0071b4c58aba8 100644
--- a/Source/WebKit/UIProcess/WebPageProxy.messages.in
+++ b/Source/WebKit/UIProcess/WebPageProxy.messages.in
@@ -29,6 +29,7 @@ messages -> WebPageProxy {
@@ -18212,7 +18226,7 @@ index 4ba558ae824cb339027c4af30c0eb8878315c9bf..c2f6a7e00f98f69bf2334bc571f7ded8
DidPerformDragOperation(bool handled)
#endif
diff --git a/Source/WebKit/UIProcess/WebProcessPool.cpp b/Source/WebKit/UIProcess/WebProcessPool.cpp
-index dc764f8d4fe7cf4e878133459ef5966c1d24604a..8cc753fcf337061cf4e49fdbe5a7dd6032548615 100644
+index 391408c7709447a4ffd6cddc60b0aac07c2acb6c..41a8e5526bc37e3f1699a3880526281199884d8d 100644
--- a/Source/WebKit/UIProcess/WebProcessPool.cpp
+++ b/Source/WebKit/UIProcess/WebProcessPool.cpp
@@ -512,6 +512,14 @@ void WebProcessPool::establishWorkerContextConnectionToNetworkProcess(NetworkPro
@@ -18246,7 +18260,7 @@ index dc764f8d4fe7cf4e878133459ef5966c1d24604a..8cc753fcf337061cf4e49fdbe5a7dd60
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 2cbe12884b5c076e9d04df28fc99445b2f38e8a4..5831bfc909f4a9c5d988966f5c20af0cf745390a 100644
+index 2be96a69160f16e6eca5f5b086434435c4f2f93f..99cbc92507421ea90cb58a66298a27525cfa459d 100644
--- a/Source/WebKit/UIProcess/WebProcessProxy.cpp
+++ b/Source/WebKit/UIProcess/WebProcessProxy.cpp
@@ -145,6 +145,11 @@ HashMap<ProcessIdentifier, WebProcessProxy*>& WebProcessProxy::allProcesses()
@@ -18274,7 +18288,7 @@ index 6dce42e82ad23813206dc7fe250985afe818a455..fda6ea5376d688855e6e325f42c84023
WebConnection* webConnection() const { return m_webConnection.get(); }
diff --git a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
-index 778960ac338f22ffad5a6b25052759e855a593dd..ef6ceb2ea892f75b7331df7ed97c9d350a22a130 100644
+index 210cd0af72831050c91eaef8ccd90a935436db2a..e8b46b17ebbcb6f115d669f5ae64fb432a5fb43d 100644
--- a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
+++ b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
@@ -2209,6 +2209,17 @@ void WebsiteDataStore::renameOriginInWebsiteData(URL&& oldName, URL&& newName, O
@@ -18296,7 +18310,7 @@ index 778960ac338f22ffad5a6b25052759e855a593dd..ef6ceb2ea892f75b7331df7ed97c9d35
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 f3d5a24e59ceb515a2f777b0ee0ee053676007ea..508c1ff4557db181780ee95d1132762d5020387e 100644
+index 3559a39baea80dc3d51e37824d6b59850d7997fb..6fb18ae38a1378d16f79faf4b77a9c9feb625525 100644
--- a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
+++ b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
@@ -86,6 +86,7 @@ class SecKeyProxyStore;
@@ -19375,7 +19389,7 @@ index 34e2d00746ebb079719becbe781f5bc6cea1d480..bf496a6327b962f8f40c207c9e2023d2
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 92da53787981efa63eb9efa50d6d2687cac7fa5e..215905493d6aba013318ebc00c049f3ef0862dd8 100644
+index a95a57048b7889e1d1d7b63b9a2f10607b4ad491..5ea0886b67604e607b5eea88a1236c39580c1017 100644
--- a/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm
+++ b/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm
@@ -362,6 +362,12 @@ void WebContextMenuProxyMac::getShareMenuItem(CompletionHandler<void(NSMenuItem
@@ -20332,10 +20346,10 @@ index 0000000000000000000000000000000000000000..c3d7cacea987ba2b094d5022c670705e
+
+} // namespace WebKit
diff --git a/Source/WebKit/WebKit.xcodeproj/project.pbxproj b/Source/WebKit/WebKit.xcodeproj/project.pbxproj
-index 45d8830b2cb94ba9ddde19e72057d4cb303fc597..f7e25b452c2f79107dc7a90da9361e6cebfed608 100644
+index 4c3298e6e0a96747cef0a2ba1135343cc33d21ba..06458d99ac343879118b8aff5389675f0f47280f 100644
--- a/Source/WebKit/WebKit.xcodeproj/project.pbxproj
+++ b/Source/WebKit/WebKit.xcodeproj/project.pbxproj
-@@ -1968,6 +1968,18 @@
+@@ -1969,6 +1969,18 @@
DF0C5F28252ECB8E00D921DB /* WKDownload.h in Headers */ = {isa = PBXBuildFile; fileRef = DF0C5F24252ECB8D00D921DB /* WKDownload.h */; settings = {ATTRIBUTES = (Public, ); }; };
DF0C5F2A252ECB8E00D921DB /* WKDownloadDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = DF0C5F26252ECB8E00D921DB /* WKDownloadDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
DF0C5F2B252ED44000D921DB /* WKDownloadInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = DF0C5F25252ECB8E00D921DB /* WKDownloadInternal.h */; };
@@ -20354,7 +20368,7 @@ index 45d8830b2cb94ba9ddde19e72057d4cb303fc597..f7e25b452c2f79107dc7a90da9361e6c
DF462E0F23F22F5500EFF35F /* WKHTTPCookieStorePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = DF462E0E23F22F5300EFF35F /* WKHTTPCookieStorePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
DF462E1223F338BE00EFF35F /* WKContentWorldPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = DF462E1123F338AD00EFF35F /* WKContentWorldPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
DF84CEE4249AA24D009096F6 /* WKPDFHUDView.mm in Sources */ = {isa = PBXBuildFile; fileRef = DF84CEE2249AA21F009096F6 /* WKPDFHUDView.mm */; };
-@@ -2024,6 +2036,9 @@
+@@ -2025,6 +2037,9 @@
E5BEF6822130C48000F31111 /* WebDataListSuggestionsDropdownIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = E5BEF6802130C47F00F31111 /* WebDataListSuggestionsDropdownIOS.h */; };
E5CB07DC20E1678F0022C183 /* WKFormColorControl.h in Headers */ = {isa = PBXBuildFile; fileRef = E5CB07DA20E1678F0022C183 /* WKFormColorControl.h */; };
ED82A7F2128C6FAF004477B3 /* WKBundlePageOverlay.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A22F0FF1289FCD90085E74F /* WKBundlePageOverlay.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -20364,7 +20378,7 @@ index 45d8830b2cb94ba9ddde19e72057d4cb303fc597..f7e25b452c2f79107dc7a90da9361e6c
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, ); }; };
-@@ -5928,6 +5943,19 @@
+@@ -5952,6 +5967,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>"; };
@@ -20384,7 +20398,7 @@ index 45d8830b2cb94ba9ddde19e72057d4cb303fc597..f7e25b452c2f79107dc7a90da9361e6c
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>"; };
-@@ -6046,6 +6074,14 @@
+@@ -6070,6 +6098,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>"; };
@@ -20399,7 +20413,7 @@ index 45d8830b2cb94ba9ddde19e72057d4cb303fc597..f7e25b452c2f79107dc7a90da9361e6c
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>"; };
-@@ -6162,6 +6198,7 @@
+@@ -6193,6 +6229,7 @@
3766F9EF189A1244003CF19B /* QuartzCore.framework in Frameworks */,
37694525184FC6B600CDE21F /* Security.framework in Frameworks */,
37BEC4DD1948FC6A008B4286 /* WebCore.framework in Frameworks */,
@@ -20407,7 +20421,7 @@ index 45d8830b2cb94ba9ddde19e72057d4cb303fc597..f7e25b452c2f79107dc7a90da9361e6c
);
runOnlyForDeploymentPostprocessing = 0;
};
-@@ -8072,6 +8109,7 @@
+@@ -8106,6 +8143,7 @@
37C4C08318149C2A003688B9 /* Cocoa */ = {
isa = PBXGroup;
children = (
@@ -20415,7 +20429,7 @@ index 45d8830b2cb94ba9ddde19e72057d4cb303fc597..f7e25b452c2f79107dc7a90da9361e6c
1A43E826188F38E2009E4D30 /* Deprecated */,
37A5E01218BBF937000A081E /* _WKActivatedElementInfo.h */,
37A5E01118BBF937000A081E /* _WKActivatedElementInfo.mm */,
-@@ -9138,6 +9176,7 @@
+@@ -9172,6 +9210,7 @@
isa = PBXGroup;
children = (
57A9FF15252C6AEF006A2040 /* libWTF.a */,
@@ -20423,7 +20437,7 @@ index 45d8830b2cb94ba9ddde19e72057d4cb303fc597..f7e25b452c2f79107dc7a90da9361e6c
5750F32A2032D4E500389347 /* LocalAuthentication.framework */,
570DAAB0230273D200E8FC04 /* NearField.framework */,
);
-@@ -9624,6 +9663,12 @@
+@@ -9657,6 +9696,12 @@
children = (
9197940423DBC4BB00257892 /* InspectorBrowserAgent.cpp */,
9197940323DBC4BB00257892 /* InspectorBrowserAgent.h */,
@@ -20436,7 +20450,7 @@ index 45d8830b2cb94ba9ddde19e72057d4cb303fc597..f7e25b452c2f79107dc7a90da9361e6c
);
path = Agents;
sourceTree = "<group>";
-@@ -9632,6 +9677,7 @@
+@@ -9665,6 +9710,7 @@
isa = PBXGroup;
children = (
A5D3504D1D78F0D2005124A9 /* RemoteWebInspectorUIProxyMac.mm */,
@@ -20444,7 +20458,7 @@ index 45d8830b2cb94ba9ddde19e72057d4cb303fc597..f7e25b452c2f79107dc7a90da9361e6c
1CA8B935127C774E00576C2B /* WebInspectorUIProxyMac.mm */,
99A7ACE326012919006D57FD /* WKInspectorResourceURLSchemeHandler.h */,
99A7ACE42601291A006D57FD /* WKInspectorResourceURLSchemeHandler.mm */,
-@@ -10143,6 +10189,12 @@
+@@ -10176,6 +10222,12 @@
BC032DC310F438260058C15A /* UIProcess */ = {
isa = PBXGroup;
children = (
@@ -20457,7 +20471,7 @@ index 45d8830b2cb94ba9ddde19e72057d4cb303fc597..f7e25b452c2f79107dc7a90da9361e6c
BC032DC410F4387C0058C15A /* API */,
512F588D12A8836F00629530 /* Authentication */,
9955A6E81C79809000EB6A93 /* Automation */,
-@@ -10445,6 +10497,7 @@
+@@ -10478,6 +10530,7 @@
BC0C376610F807660076D7CB /* C */ = {
isa = PBXGroup;
children = (
@@ -20465,7 +20479,7 @@ index 45d8830b2cb94ba9ddde19e72057d4cb303fc597..f7e25b452c2f79107dc7a90da9361e6c
5123CF18133D25E60056F800 /* cg */,
6EE849C41368D9040038D481 /* mac */,
BCB63477116BF10600603215 /* WebKit2_C.h */,
-@@ -11040,6 +11093,11 @@
+@@ -11073,6 +11126,11 @@
BCCF085C113F3B7500C650C5 /* mac */ = {
isa = PBXGroup;
children = (
@@ -20477,7 +20491,7 @@ index 45d8830b2cb94ba9ddde19e72057d4cb303fc597..f7e25b452c2f79107dc7a90da9361e6c
B878B613133428DC006888E9 /* CorrectionPanel.h */,
B878B614133428DC006888E9 /* CorrectionPanel.mm */,
C1817362205844A900DFDA65 /* DisplayLink.cpp */,
-@@ -11893,6 +11951,7 @@
+@@ -11933,6 +11991,7 @@
99788ACB1F421DDA00C08000 /* _WKAutomationSessionConfiguration.h in Headers */,
990D28AC1C6420CF00986977 /* _WKAutomationSessionDelegate.h in Headers */,
990D28B11C65208D00986977 /* _WKAutomationSessionInternal.h in Headers */,
@@ -20485,7 +20499,7 @@ index 45d8830b2cb94ba9ddde19e72057d4cb303fc597..f7e25b452c2f79107dc7a90da9361e6c
5C4609E7224317B4009943C2 /* _WKContentRuleListAction.h in Headers */,
5C4609E8224317BB009943C2 /* _WKContentRuleListActionInternal.h in Headers */,
1A5704F81BE01FF400874AF1 /* _WKContextMenuElementInfo.h in Headers */,
-@@ -12191,6 +12250,7 @@
+@@ -12231,6 +12290,7 @@
1A14F8E21D74C834006CBEC6 /* FrameInfoData.h in Headers */,
1AE00D611831792100087DD7 /* FrameLoadState.h in Headers */,
5C121E842410208D00486F9B /* FrameTreeNodeData.h in Headers */,
@@ -20493,7 +20507,7 @@ index 45d8830b2cb94ba9ddde19e72057d4cb303fc597..f7e25b452c2f79107dc7a90da9361e6c
2D4AF0892044C3C4006C8817 /* FrontBoardServicesSPI.h in Headers */,
CD78E1151DB7D7ED0014A2DE /* FullscreenClient.h in Headers */,
CD19D2EA2046406F0017074A /* FullscreenTouchSecheuristic.h in Headers */,
-@@ -12206,6 +12266,7 @@
+@@ -12246,6 +12306,7 @@
4614F13225DED875007006E7 /* GPUProcessConnectionParameters.h in Headers */,
F40BBB41257FF46E0067463A /* GPUProcessWakeupMessageArguments.h in Headers */,
2DA049B8180CCD0A00AAFA9E /* GraphicsLayerCARemote.h in Headers */,
@@ -20501,7 +20515,7 @@ index 45d8830b2cb94ba9ddde19e72057d4cb303fc597..f7e25b452c2f79107dc7a90da9361e6c
C0CE72AD1247E78D00BC0EC4 /* HandleMessage.h in Headers */,
1AC75A1B1B3368270056745B /* HangDetectionDisabler.h in Headers */,
57AC8F50217FEED90055438C /* HidConnection.h in Headers */,
-@@ -12353,6 +12414,7 @@
+@@ -12393,6 +12454,7 @@
413075AC1DE85F370039EC69 /* NetworkRTCMonitor.h in Headers */,
41DC45961E3D6E2200B11F51 /* NetworkRTCProvider.h in Headers */,
5C20CBA01BB1ECD800895BB1 /* NetworkSession.h in Headers */,
@@ -20509,7 +20523,7 @@ index 45d8830b2cb94ba9ddde19e72057d4cb303fc597..f7e25b452c2f79107dc7a90da9361e6c
532159551DBAE7290054AA3C /* NetworkSessionCocoa.h in Headers */,
417915B92257046F00D6F97E /* NetworkSocketChannel.h in Headers */,
93085DE026E5BCFD000EC6A7 /* NetworkStorageManager.h in Headers */,
-@@ -12444,6 +12506,7 @@
+@@ -12484,6 +12546,7 @@
BC1A7C581136E19C00FB7167 /* ProcessLauncher.h in Headers */,
463FD4821EB94EC000A2982C /* ProcessTerminationReason.h in Headers */,
86E67A251910B9D100004AB7 /* ProcessThrottler.h in Headers */,
@@ -20517,7 +20531,7 @@ index 45d8830b2cb94ba9ddde19e72057d4cb303fc597..f7e25b452c2f79107dc7a90da9361e6c
83048AE61ACA45DC0082C832 /* ProcessThrottlerClient.h in Headers */,
2D279E1926955768004B3EEB /* PrototypeToolsSPI.h in Headers */,
A1E688701F6E2BAB007006A6 /* QuarantineSPI.h in Headers */,
-@@ -12465,6 +12528,7 @@
+@@ -12505,6 +12568,7 @@
CDAC20B423FB58F20021DEE3 /* RemoteCDMInstanceProxy.h in Headers */,
CDAC20CA23FC2F750021DEE3 /* RemoteCDMInstanceSession.h in Headers */,
CDAC20C923FC2F750021DEE3 /* RemoteCDMInstanceSessionIdentifier.h in Headers */,
@@ -20525,7 +20539,7 @@ index 45d8830b2cb94ba9ddde19e72057d4cb303fc597..f7e25b452c2f79107dc7a90da9361e6c
2D47B56D1810714E003A3AEE /* RemoteLayerBackingStore.h in Headers */,
2DDF731518E95060004F5A66 /* RemoteLayerBackingStoreCollection.h in Headers */,
1AB16AEA164B3A8800290D62 /* RemoteLayerTreeContext.h in Headers */,
-@@ -12783,6 +12847,7 @@
+@@ -12822,6 +12886,7 @@
A543E30D215C8A9000279CD9 /* WebPageInspectorTargetController.h in Headers */,
A543E307215AD13700279CD9 /* WebPageInspectorTargetFrontendChannel.h in Headers */,
C0CE72A11247E71D00BC0EC4 /* WebPageMessages.h in Headers */,
@@ -20533,7 +20547,7 @@ index 45d8830b2cb94ba9ddde19e72057d4cb303fc597..f7e25b452c2f79107dc7a90da9361e6c
2D5C9D0619C81D8F00B3C5C1 /* WebPageOverlay.h in Headers */,
46C392292316EC4D008EED9B /* WebPageProxyIdentifier.h in Headers */,
BCBD3915125BB1A800D2C29F /* WebPageProxyMessages.h in Headers */,
-@@ -12915,6 +12980,7 @@
+@@ -12954,6 +13019,7 @@
BCD25F1711D6BDE100169B0E /* WKBundleFrame.h in Headers */,
BCF049E611FE20F600F86A58 /* WKBundleFramePrivate.h in Headers */,
BC49862F124D18C100D834E1 /* WKBundleHitTestResult.h in Headers */,
@@ -20541,7 +20555,7 @@ index 45d8830b2cb94ba9ddde19e72057d4cb303fc597..f7e25b452c2f79107dc7a90da9361e6c
BC204EF211C83EC8008F3375 /* WKBundleInitialize.h in Headers */,
65B86F1E12F11DE300B7DD8A /* WKBundleInspector.h in Headers */,
1A8B66B41BC45B010082DF77 /* WKBundleMac.h in Headers */,
-@@ -12968,6 +13034,7 @@
+@@ -13007,6 +13073,7 @@
5C795D71229F3757003FF1C4 /* WKContextMenuElementInfoPrivate.h in Headers */,
51A555F6128C6C47009ABCEC /* WKContextMenuItem.h in Headers */,
51A55601128C6D92009ABCEC /* WKContextMenuItemTypes.h in Headers */,
@@ -20549,7 +20563,7 @@ index 45d8830b2cb94ba9ddde19e72057d4cb303fc597..f7e25b452c2f79107dc7a90da9361e6c
A1EA02381DABFF7E0096021F /* WKContextMenuListener.h in Headers */,
BCC938E11180DE440085E5FE /* WKContextPrivate.h in Headers */,
9FB5F395169E6A80002C25BF /* WKContextPrivateMac.h in Headers */,
-@@ -13124,6 +13191,7 @@
+@@ -13163,6 +13230,7 @@
1AB8A1F818400BB800E9AE69 /* WKPageContextMenuClient.h in Headers */,
8372DB251A674C8F00C697C5 /* WKPageDiagnosticLoggingClient.h in Headers */,
1AB8A1F418400B8F00E9AE69 /* WKPageFindClient.h in Headers */,
@@ -20557,7 +20571,7 @@ index 45d8830b2cb94ba9ddde19e72057d4cb303fc597..f7e25b452c2f79107dc7a90da9361e6c
1AB8A1F618400B9D00E9AE69 /* WKPageFindMatchesClient.h in Headers */,
1AB8A1F018400B0000E9AE69 /* WKPageFormClient.h in Headers */,
BC7B633712A45ABA00D174A4 /* WKPageGroup.h in Headers */,
-@@ -14353,6 +14421,7 @@
+@@ -14405,6 +14473,7 @@
C1A152D724E5A29A00978C8B /* HandleXPCEndpointMessages.mm in Sources */,
2749F6442146561B008380BF /* InjectedBundleNodeHandle.cpp in Sources */,
2749F6452146561E008380BF /* InjectedBundleRangeHandle.cpp in Sources */,
@@ -20565,7 +20579,7 @@ index 45d8830b2cb94ba9ddde19e72057d4cb303fc597..f7e25b452c2f79107dc7a90da9361e6c
9BF5EC642541145600984E77 /* JSIPCBinding.cpp in Sources */,
2D913441212CF9F000128AFD /* JSNPMethod.cpp in Sources */,
2D913442212CF9F000128AFD /* JSNPObject.cpp in Sources */,
-@@ -14372,6 +14441,7 @@
+@@ -14424,6 +14493,7 @@
2D92A781212B6A7100F493FD /* MessageReceiverMap.cpp in Sources */,
2D92A782212B6A7100F493FD /* MessageSender.cpp in Sources */,
2D92A77A212B6A6100F493FD /* Module.cpp in Sources */,
@@ -20573,7 +20587,7 @@ index 45d8830b2cb94ba9ddde19e72057d4cb303fc597..f7e25b452c2f79107dc7a90da9361e6c
57B826452304F14000B72EB0 /* NearFieldSoftLink.mm in Sources */,
2D913443212CF9F000128AFD /* NetscapeBrowserFuncs.cpp in Sources */,
2D913444212CF9F000128AFD /* NetscapePlugin.cpp in Sources */,
-@@ -14398,6 +14468,7 @@
+@@ -14450,6 +14520,7 @@
1A2D8439127F65D5001EB962 /* NPObjectMessageReceiverMessageReceiver.cpp in Sources */,
2D92A792212B6AD400F493FD /* NPObjectProxy.cpp in Sources */,
2D92A793212B6AD400F493FD /* NPRemoteObjectMap.cpp in Sources */,
@@ -20581,7 +20595,7 @@ index 45d8830b2cb94ba9ddde19e72057d4cb303fc597..f7e25b452c2f79107dc7a90da9361e6c
2D913447212CF9F000128AFD /* NPRuntimeObjectMap.cpp in Sources */,
2D913448212CF9F000128AFD /* NPRuntimeUtilities.cpp in Sources */,
2D92A794212B6AD400F493FD /* NPVariantData.cpp in Sources */,
-@@ -14703,6 +14774,7 @@
+@@ -14755,6 +14826,7 @@
2D92A78C212B6AB100F493FD /* WebMouseEvent.cpp in Sources */,
31BA924D148831260062EDB5 /* WebNotificationManagerMessageReceiver.cpp in Sources */,
2DF6FE52212E110900469030 /* WebPage.cpp in Sources */,
@@ -20590,7 +20604,7 @@ index 45d8830b2cb94ba9ddde19e72057d4cb303fc597..f7e25b452c2f79107dc7a90da9361e6c
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 35253106cb1d301339c2b30e8602f6bf24a3e72b..033529d62fc43220a324b57200bd35aef636a1fa 100644
+index 0d1829b398c36051b84e215db3d16ea347791965..39ef8d2b88cbdbeb9faa3a68d46c64656da75db5 100644
--- a/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp
+++ b/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp
@@ -231,6 +231,11 @@ void WebLoaderStrategy::scheduleLoad(ResourceLoader& resourceLoader, CachedResou
@@ -20613,7 +20627,7 @@ index 35253106cb1d301339c2b30e8602f6bf24a3e72b..033529d62fc43220a324b57200bd35ae
+// static
+bool WebLoaderStrategy::fillParametersForNetworkProcessLoad(ResourceLoader& resourceLoader, const ResourceRequest& request, const WebResourceLoader::TrackingParameters& trackingParameters, bool shouldClearReferrerOnHTTPSToHTTPRedirect, Seconds maximumBufferingTime, NetworkResourceLoadParameters& loadParameters)
{
- ResourceLoadIdentifier identifier = resourceLoader.identifier();
+ auto identifier = resourceLoader.identifier();
ASSERT(identifier);
@@ -306,7 +312,6 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL
@@ -20668,7 +20682,7 @@ index 35253106cb1d301339c2b30e8602f6bf24a3e72b..033529d62fc43220a324b57200bd35ae
}
void WebLoaderStrategy::scheduleInternallyFailedLoad(WebCore::ResourceLoader& resourceLoader)
-@@ -830,7 +843,7 @@ void WebLoaderStrategy::didFinishPreconnection(uint64_t preconnectionIdentifier,
+@@ -827,7 +840,7 @@ void WebLoaderStrategy::didFinishPreconnection(WebCore::ResourceLoaderIdentifier
bool WebLoaderStrategy::isOnLine() const
{
@@ -20677,7 +20691,7 @@ index 35253106cb1d301339c2b30e8602f6bf24a3e72b..033529d62fc43220a324b57200bd35ae
}
void WebLoaderStrategy::addOnlineStateChangeListener(Function<void(bool)>&& listener)
-@@ -850,6 +863,11 @@ void WebLoaderStrategy::isResourceLoadFinished(CachedResource& resource, Complet
+@@ -847,6 +860,11 @@ void WebLoaderStrategy::isResourceLoadFinished(CachedResource& resource, Complet
void WebLoaderStrategy::setOnLineState(bool isOnLine)
{
@@ -20689,7 +20703,7 @@ index 35253106cb1d301339c2b30e8602f6bf24a3e72b..033529d62fc43220a324b57200bd35ae
if (m_isOnLine == isOnLine)
return;
-@@ -858,6 +876,12 @@ void WebLoaderStrategy::setOnLineState(bool isOnLine)
+@@ -855,6 +873,12 @@ void WebLoaderStrategy::setOnLineState(bool isOnLine)
listener(isOnLine);
}
@@ -20703,7 +20717,7 @@ index 35253106cb1d301339c2b30e8602f6bf24a3e72b..033529d62fc43220a324b57200bd35ae
{
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 c796ae50f14c16ec25e6e0149d766bf7d11e187b..bc99214f8f4170e0c8db001ee543ce7b38e0f55a 100644
+index 405c73430e21012b1e1ac788965cbc9767762368..f315eec6fe4f2405883178165db3a8ea42e5bf82 100644
--- a/Source/WebKit/WebProcess/Network/WebLoaderStrategy.h
+++ b/Source/WebKit/WebProcess/Network/WebLoaderStrategy.h
@@ -41,6 +41,7 @@ struct FetchOptions;
@@ -20714,18 +20728,17 @@ index c796ae50f14c16ec25e6e0149d766bf7d11e187b..bc99214f8f4170e0c8db001ee543ce7b
class WebFrame;
class WebPage;
class WebURLSchemeTaskProxy;
-@@ -89,8 +90,10 @@ public:
+@@ -88,6 +89,9 @@ public:
bool isOnLine() const final;
void addOnlineStateChangeListener(Function<void(bool)>&&) final;
void setOnLineState(bool);
+ void setEmulateOfflineState(bool) final;
-
- static uint64_t generateLoadIdentifier();
++
+ static bool fillParametersForNetworkProcessLoad(WebCore::ResourceLoader&, const WebCore::ResourceRequest&, const WebResourceLoader::TrackingParameters&, bool shouldClearReferrerOnHTTPSToHTTPRedirect, Seconds maximumBufferingTime, NetworkResourceLoadParameters&);
void setExistingNetworkResourceLoadIdentifierToResume(std::optional<NetworkResourceLoadIdentifier> existingNetworkResourceLoadIdentifierToResume) { m_existingNetworkResourceLoadIdentifierToResume = existingNetworkResourceLoadIdentifierToResume; }
-@@ -140,6 +143,7 @@ private:
+@@ -137,6 +141,7 @@ private:
Vector<Function<void(bool)>> m_onlineStateChangeListeners;
std::optional<NetworkResourceLoadIdentifier> m_existingNetworkResourceLoadIdentifierToResume;
bool m_isOnLine { true };
@@ -20734,15 +20747,15 @@ index c796ae50f14c16ec25e6e0149d766bf7d11e187b..bc99214f8f4170e0c8db001ee543ce7b
} // namespace WebKit
diff --git a/Source/WebKit/WebProcess/Network/WebResourceLoader.cpp b/Source/WebKit/WebProcess/Network/WebResourceLoader.cpp
-index ecd4052eac038028255a786236e1969853afa1d8..da1f3a2887b7b10088703c92c77eb75357b10d17 100644
+index 259449423855fed3aaaab414819f8951a3b8b7ff..c97f042082096fa88990e40ac9d23d939c7b897f 100644
--- a/Source/WebKit/WebProcess/Network/WebResourceLoader.cpp
+++ b/Source/WebKit/WebProcess/Network/WebResourceLoader.cpp
@@ -155,17 +155,19 @@ void WebResourceLoader::didReceiveResponse(const ResourceResponse& response, boo
if (InspectorInstrumentationWebKit::shouldInterceptResponse(m_coreLoader->frame(), response)) {
- unsigned long interceptedRequestIdentifier = m_coreLoader->identifier();
+ auto interceptedRequestIdentifier = m_coreLoader->identifier();
m_interceptController.beginInterceptingResponse(interceptedRequestIdentifier);
-- InspectorInstrumentationWebKit::interceptResponse(m_coreLoader->frame(), response, interceptedRequestIdentifier, [this, protectedThis = makeRef(*this), interceptedRequestIdentifier, policyDecisionCompletionHandler = WTFMove(policyDecisionCompletionHandler)](const ResourceResponse& inspectorResponse, RefPtr<SharedBuffer> overrideData) mutable {
-+ InspectorInstrumentationWebKit::interceptResponse(m_coreLoader->frame(), response, interceptedRequestIdentifier, [this, protectedThis = makeRef(*this), interceptedRequestIdentifier](std::optional<ResourceError>&& error, const ResourceResponse& inspectorResponse, RefPtr<SharedBuffer> overrideData) mutable {
+- InspectorInstrumentationWebKit::interceptResponse(m_coreLoader->frame(), response, interceptedRequestIdentifier, [this, protectedThis = Ref { *this }, interceptedRequestIdentifier, policyDecisionCompletionHandler = WTFMove(policyDecisionCompletionHandler)](const ResourceResponse& inspectorResponse, RefPtr<SharedBuffer> overrideData) mutable {
++ InspectorInstrumentationWebKit::interceptResponse(m_coreLoader->frame(), response, interceptedRequestIdentifier, [this, protectedThis = Ref { *this }, interceptedRequestIdentifier](std::optional<ResourceError>&& error, const ResourceResponse& inspectorResponse, RefPtr<SharedBuffer> overrideData) mutable {
if (!m_coreLoader || !m_coreLoader->identifier()) {
WEBRESOURCELOADER_RELEASE_LOG("didReceiveResponse: not continuing intercept load because no coreLoader or no ID");
m_interceptController.continueResponse(interceptedRequestIdentifier);
@@ -20775,7 +20788,7 @@ index ecd4052eac038028255a786236e1969853afa1d8..da1f3a2887b7b10088703c92c77eb753
if (UNLIKELY(m_interceptController.isIntercepting(m_coreLoader->identifier()))) {
auto buffer = SharedBuffer::create(data.data(), data.size());
+ InspectorInstrumentationWebKit::interceptDidReceiveData(m_coreLoader->frame(), m_coreLoader->identifier(), buffer.get());
- m_interceptController.defer(m_coreLoader->identifier(), [this, protectedThis = makeRef(*this), buffer = WTFMove(buffer), encodedDataLength]() mutable {
+ m_interceptController.defer(m_coreLoader->identifier(), [this, protectedThis = Ref { *this }, buffer = WTFMove(buffer), encodedDataLength]() mutable {
if (m_coreLoader)
didReceiveData({ buffer->data(), buffer->size() }, encodedDataLength);
@@ -216,6 +221,7 @@ void WebResourceLoader::didFinishResourceLoad(const NetworkLoadMetrics& networkL
@@ -20783,7 +20796,7 @@ index ecd4052eac038028255a786236e1969853afa1d8..da1f3a2887b7b10088703c92c77eb753
if (UNLIKELY(m_interceptController.isIntercepting(m_coreLoader->identifier()))) {
+ InspectorInstrumentationWebKit::interceptDidFinishResourceLoad(m_coreLoader->frame(), m_coreLoader->identifier());
- m_interceptController.defer(m_coreLoader->identifier(), [this, protectedThis = makeRef(*this), networkLoadMetrics]() mutable {
+ m_interceptController.defer(m_coreLoader->identifier(), [this, protectedThis = Ref { *this }, networkLoadMetrics]() mutable {
if (m_coreLoader)
didFinishResourceLoad(networkLoadMetrics);
@@ -259,6 +265,7 @@ void WebResourceLoader::didFailResourceLoad(const ResourceError& error)
@@ -20791,11 +20804,11 @@ index ecd4052eac038028255a786236e1969853afa1d8..da1f3a2887b7b10088703c92c77eb753
if (UNLIKELY(m_interceptController.isIntercepting(m_coreLoader->identifier()))) {
+ InspectorInstrumentationWebKit::interceptDidFailResourceLoad(m_coreLoader->frame(), m_coreLoader->identifier(), error);
- m_interceptController.defer(m_coreLoader->identifier(), [this, protectedThis = makeRef(*this), error]() mutable {
+ m_interceptController.defer(m_coreLoader->identifier(), [this, protectedThis = Ref { *this }, error]() mutable {
if (m_coreLoader)
didFailResourceLoad(error);
diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
-index 8cd191c03674c415e9bce9a8cc586cade0d90a65..d17e3266e5111bb56db1e43bea80a84a8cebcc4e 100644
+index 21bc276235486a9fd377169a44aff8ce2a3f8976..4a274c1c99552f8ddd506ed7aaae8cd6c9f5300a 100644
--- a/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
@@ -398,6 +398,8 @@ void WebChromeClient::setResizable(bool resizable)
@@ -20849,10 +20862,10 @@ index 2eb0886f13ed035a53b8eaa60605de4dfe53fbe3..c46393209cb4f80704bbc9268fad4371
{
}
diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
-index 00889b00c85793598b7fe1330ef29d86a77ee48f..a496e9543a0d7b5268b29f23ca05e890f41fa421 100644
+index 58f0c44fac09f0ebc2dd219503364d66ce8a5033..7729d42bfc3503b724789a11d9dacec47e6d00a4 100644
--- a/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
-@@ -1575,13 +1575,6 @@ void WebFrameLoaderClient::transitionToCommittedForNewPage()
+@@ -1576,13 +1576,6 @@ void WebFrameLoaderClient::transitionToCommittedForNewPage()
if (webPage->scrollPinningBehavior() != DoNotPin)
view->setScrollPinningBehavior(webPage->scrollPinningBehavior());
@@ -20867,7 +20880,7 @@ index 00889b00c85793598b7fe1330ef29d86a77ee48f..a496e9543a0d7b5268b29f23ca05e890
void WebFrameLoaderClient::didRestoreFromBackForwardCache()
diff --git a/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm b/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm
-index e9f2b2237b1d8a1b21ad28e0fa309b80252b5ebd..b2d3ca7cc093ed428f95df992c208b1b9491067d 100644
+index 6a7d683dcf066d7d3d5604f4328ca8cf9aef50c8..661014539a45fa745604adeaa4f0614bb696f278 100644
--- a/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm
+++ b/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm
@@ -127,7 +127,8 @@ static WebCore::CachedImage* cachedImage(Element& element)
@@ -21253,10 +21266,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 1abdf7e042488e6c5e98740354a5eff9a8eb8f45..60637dacec9d1fb724601faf103b309ac3ae829b 100644
+index 2460a43d2e64b7ea9113a98562bd3b5926c2ab99..f1983899806b85ea683ee4e883000eefc1189fd8 100644
--- a/Source/WebKit/WebProcess/WebPage/WebPage.cpp
+++ b/Source/WebKit/WebProcess/WebPage/WebPage.cpp
-@@ -895,6 +895,9 @@ WebPage::WebPage(PageIdentifier pageID, WebPageCreationParameters&& parameters)
+@@ -896,6 +896,9 @@ WebPage::WebPage(PageIdentifier pageID, WebPageCreationParameters&& parameters)
m_page->setCanUseCredentialStorage(parameters.canUseCredentialStorage);
@@ -21266,7 +21279,7 @@ index 1abdf7e042488e6c5e98740354a5eff9a8eb8f45..60637dacec9d1fb724601faf103b309a
updateThrottleState();
}
-@@ -1696,6 +1699,22 @@ void WebPage::platformDidReceiveLoadParameters(const LoadParameters& loadParamet
+@@ -1697,6 +1700,22 @@ void WebPage::platformDidReceiveLoadParameters(const LoadParameters& loadParamet
}
#endif
@@ -21289,7 +21302,7 @@ index 1abdf7e042488e6c5e98740354a5eff9a8eb8f45..60637dacec9d1fb724601faf103b309a
void WebPage::loadRequest(LoadParameters&& loadParameters)
{
setLastNavigationWasAppInitiated(loadParameters.request.isAppInitiated());
-@@ -1941,17 +1960,13 @@ void WebPage::setSize(const WebCore::IntSize& viewSize)
+@@ -1942,17 +1961,13 @@ void WebPage::setSize(const WebCore::IntSize& viewSize)
view->resize(viewSize);
m_drawingArea->setNeedsDisplay();
@@ -21308,7 +21321,7 @@ index 1abdf7e042488e6c5e98740354a5eff9a8eb8f45..60637dacec9d1fb724601faf103b309a
// Viewport properties have no impact on zero sized fixed viewports.
if (m_viewSize.isEmpty())
-@@ -1968,20 +1983,18 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArg
+@@ -1969,20 +1984,18 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArg
ViewportAttributes attr = computeViewportAttributes(viewportArguments, minimumLayoutFallbackWidth, deviceWidth, deviceHeight, 1, m_viewSize);
@@ -21336,7 +21349,7 @@ index 1abdf7e042488e6c5e98740354a5eff9a8eb8f45..60637dacec9d1fb724601faf103b309a
#if USE(COORDINATED_GRAPHICS)
m_drawingArea->didChangeViewportAttributes(WTFMove(attr));
-@@ -1989,7 +2002,6 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArg
+@@ -1990,7 +2003,6 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArg
send(Messages::WebPageProxy::DidChangeViewportProperties(attr));
#endif
}
@@ -21344,7 +21357,7 @@ index 1abdf7e042488e6c5e98740354a5eff9a8eb8f45..60637dacec9d1fb724601faf103b309a
void WebPage::scrollMainFrameIfNotAtMaxScrollPosition(const IntSize& scrollOffset)
{
-@@ -2284,6 +2296,7 @@ void WebPage::scaleView(double scale)
+@@ -2285,6 +2297,7 @@ void WebPage::scaleView(double scale)
}
m_page->setViewScaleFactor(scale);
@@ -21352,7 +21365,7 @@ index 1abdf7e042488e6c5e98740354a5eff9a8eb8f45..60637dacec9d1fb724601faf103b309a
scalePage(pageScale, scrollPositionAtNewScale);
}
-@@ -2388,17 +2401,13 @@ void WebPage::viewportPropertiesDidChange(const ViewportArguments& viewportArgum
+@@ -2389,17 +2402,13 @@ void WebPage::viewportPropertiesDidChange(const ViewportArguments& viewportArgum
viewportConfigurationChanged();
#endif
@@ -21371,7 +21384,7 @@ index 1abdf7e042488e6c5e98740354a5eff9a8eb8f45..60637dacec9d1fb724601faf103b309a
}
void WebPage::listenForLayoutMilestones(OptionSet<WebCore::LayoutMilestone> milestones)
-@@ -3280,6 +3289,104 @@ void WebPage::touchEvent(const WebTouchEvent& touchEvent)
+@@ -3281,6 +3290,104 @@ void WebPage::touchEvent(const WebTouchEvent& touchEvent)
send(Messages::WebPageProxy::DidReceiveEvent(static_cast<uint32_t>(touchEvent.type()), handled));
}
@@ -21476,7 +21489,7 @@ index 1abdf7e042488e6c5e98740354a5eff9a8eb8f45..60637dacec9d1fb724601faf103b309a
#endif
void WebPage::cancelPointer(WebCore::PointerID pointerId, const WebCore::IntPoint& documentPoint)
-@@ -3356,6 +3463,11 @@ void WebPage::sendMessageToTargetBackend(const String& targetId, const String& m
+@@ -3357,6 +3464,11 @@ void WebPage::sendMessageToTargetBackend(const String& targetId, const String& m
m_inspectorTargetController->sendMessageToTargetBackend(targetId, message);
}
@@ -21488,7 +21501,7 @@ index 1abdf7e042488e6c5e98740354a5eff9a8eb8f45..60637dacec9d1fb724601faf103b309a
void WebPage::insertNewlineInQuotedContent()
{
Ref frame = CheckedRef(m_page->focusController())->focusedOrMainFrame();
-@@ -3594,6 +3706,7 @@ void WebPage::didCompletePageTransition()
+@@ -3595,6 +3707,7 @@ void WebPage::didCompletePageTransition()
void WebPage::show()
{
send(Messages::WebPageProxy::ShowPage());
@@ -21496,7 +21509,7 @@ index 1abdf7e042488e6c5e98740354a5eff9a8eb8f45..60637dacec9d1fb724601faf103b309a
}
void WebPage::setIsTakingSnapshotsForApplicationSuspension(bool isTakingSnapshotsForApplicationSuspension)
-@@ -4358,7 +4471,7 @@ NotificationPermissionRequestManager* WebPage::notificationPermissionRequestMana
+@@ -4371,7 +4484,7 @@ NotificationPermissionRequestManager* WebPage::notificationPermissionRequestMana
#if ENABLE(DRAG_SUPPORT)
@@ -21505,7 +21518,7 @@ index 1abdf7e042488e6c5e98740354a5eff9a8eb8f45..60637dacec9d1fb724601faf103b309a
void WebPage::performDragControllerAction(DragControllerAction action, const IntPoint& clientPosition, const IntPoint& globalPosition, OptionSet<DragOperation> draggingSourceOperationMask, SelectionData&& selectionData, OptionSet<DragApplicationFlags> flags)
{
if (!m_page) {
-@@ -6684,6 +6797,9 @@ Ref<DocumentLoader> WebPage::createDocumentLoader(Frame& frame, const ResourceRe
+@@ -6697,6 +6810,9 @@ Ref<DocumentLoader> WebPage::createDocumentLoader(Frame& frame, const ResourceRe
WebsitePoliciesData::applyToDocumentLoader(WTFMove(*m_pendingWebsitePolicies), documentLoader);
m_pendingWebsitePolicies = std::nullopt;
}
@@ -21516,7 +21529,7 @@ index 1abdf7e042488e6c5e98740354a5eff9a8eb8f45..60637dacec9d1fb724601faf103b309a
return documentLoader;
diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.h b/Source/WebKit/WebProcess/WebPage/WebPage.h
-index 7f65d2b48354b84b0052b70f748e2a64c9b85f67..1cabd11e55fc3718c1e3cc2c48044fd9716bd770 100644
+index 9bc4107786993b5cd002542bc8909cbad058c437..53c3f02726699999c2d8f35d0bcc0f36086a64e7 100644
--- a/Source/WebKit/WebProcess/WebPage/WebPage.h
+++ b/Source/WebKit/WebProcess/WebPage/WebPage.h
@@ -116,6 +116,10 @@ typedef struct _AtkObject AtkObject;
@@ -21530,7 +21543,7 @@ index 7f65d2b48354b84b0052b70f748e2a64c9b85f67..1cabd11e55fc3718c1e3cc2c48044fd9
#if PLATFORM(GTK) || PLATFORM(WPE)
#include "InputMethodState.h"
#endif
-@@ -971,11 +975,11 @@ public:
+@@ -974,11 +978,11 @@ public:
void clearSelection();
void restoreSelectionInFocusedEditableElement();
@@ -21544,7 +21557,7 @@ index 7f65d2b48354b84b0052b70f748e2a64c9b85f67..1cabd11e55fc3718c1e3cc2c48044fd9
void performDragControllerAction(DragControllerAction, const WebCore::DragData&, SandboxExtension::Handle&&, Vector<SandboxExtension::Handle>&&);
#endif
-@@ -989,6 +993,9 @@ public:
+@@ -992,6 +996,9 @@ public:
void didStartDrag();
void dragCancelled();
OptionSet<WebCore::DragSourceAction> allowedDragSourceActions() const { return m_allowedDragSourceActions; }
@@ -21554,7 +21567,7 @@ index 7f65d2b48354b84b0052b70f748e2a64c9b85f67..1cabd11e55fc3718c1e3cc2c48044fd9
#endif
void beginPrinting(WebCore::FrameIdentifier, const PrintInfo&);
-@@ -1223,6 +1230,7 @@ public:
+@@ -1226,6 +1233,7 @@ public:
void connectInspector(const String& targetId, Inspector::FrontendChannel::ConnectionType);
void disconnectInspector(const String& targetId);
void sendMessageToTargetBackend(const String& targetId, const String& message);
@@ -21562,7 +21575,7 @@ index 7f65d2b48354b84b0052b70f748e2a64c9b85f67..1cabd11e55fc3718c1e3cc2c48044fd9
void insertNewlineInQuotedContent();
-@@ -1580,6 +1588,7 @@ private:
+@@ -1583,6 +1591,7 @@ private:
// Actions
void tryClose(CompletionHandler<void(bool)>&&);
void platformDidReceiveLoadParameters(const LoadParameters&);
@@ -21570,7 +21583,7 @@ index 7f65d2b48354b84b0052b70f748e2a64c9b85f67..1cabd11e55fc3718c1e3cc2c48044fd9
void loadRequest(LoadParameters&&);
NO_RETURN void loadRequestWaitingForProcessLaunch(LoadParameters&&, URL&&, WebPageProxyIdentifier, bool);
void loadData(LoadParameters&&);
-@@ -1617,6 +1626,7 @@ private:
+@@ -1620,6 +1629,7 @@ private:
void updatePotentialTapSecurityOrigin(const WebTouchEvent&, bool wasHandled);
#elif ENABLE(TOUCH_EVENTS)
void touchEvent(const WebTouchEvent&);
@@ -21578,7 +21591,7 @@ index 7f65d2b48354b84b0052b70f748e2a64c9b85f67..1cabd11e55fc3718c1e3cc2c48044fd9
#endif
void cancelPointer(WebCore::PointerID, const WebCore::IntPoint&);
-@@ -1740,9 +1750,7 @@ private:
+@@ -1743,9 +1753,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)>&&);
@@ -21588,7 +21601,7 @@ index 7f65d2b48354b84b0052b70f748e2a64c9b85f67..1cabd11e55fc3718c1e3cc2c48044fd9
void didChangeSelectedIndexForActivePopupMenu(int32_t newIndex);
void setTextForActivePopupMenu(int32_t index);
-@@ -2275,6 +2283,7 @@ private:
+@@ -2278,6 +2286,7 @@ private:
UserActivity m_userActivity;
uint64_t m_pendingNavigationID { 0 };
@@ -21597,10 +21610,10 @@ index 7f65d2b48354b84b0052b70f748e2a64c9b85f67..1cabd11e55fc3718c1e3cc2c48044fd9
bool m_mainFrameProgressCompleted { false };
diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.messages.in b/Source/WebKit/WebProcess/WebPage/WebPage.messages.in
-index 0c59c9130ea25b7bd60b5e845fd5e3e55d0cfa90..bcb04f91964e2327777ce193c848e6fad110c800 100644
+index d24f7aff0892d012240cbefab29992540a1fabb0..a5680b96589c470e412cd984900220c869cddba2 100644
--- a/Source/WebKit/WebProcess/WebPage/WebPage.messages.in
+++ b/Source/WebKit/WebProcess/WebPage/WebPage.messages.in
-@@ -132,6 +132,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
+@@ -134,6 +134,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
ConnectInspector(String targetId, Inspector::FrontendChannel::ConnectionType connectionType)
DisconnectInspector(String targetId)
SendMessageToTargetBackend(String targetId, String message)
@@ -21608,7 +21621,7 @@ index 0c59c9130ea25b7bd60b5e845fd5e3e55d0cfa90..bcb04f91964e2327777ce193c848e6fa
#if ENABLE(REMOTE_INSPECTOR)
SetIndicating(bool indicating);
-@@ -143,6 +144,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
+@@ -145,6 +146,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
#endif
#if !ENABLE(IOS_TOUCH_EVENTS) && ENABLE(TOUCH_EVENTS)
TouchEvent(WebKit::WebTouchEvent event)
@@ -21616,7 +21629,7 @@ index 0c59c9130ea25b7bd60b5e845fd5e3e55d0cfa90..bcb04f91964e2327777ce193c848e6fa
#endif
CancelPointer(WebCore::PointerID pointerId, WebCore::IntPoint documentPoint)
-@@ -172,6 +174,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
+@@ -174,6 +176,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
LoadURLInFrame(URL url, String referrer, WebCore::FrameIdentifier frameID)
LoadDataInFrame(IPC::DataReference data, String MIMEType, String encodingName, URL baseURL, WebCore::FrameIdentifier frameID)
LoadRequest(struct WebKit::LoadParameters loadParameters)
@@ -21624,7 +21637,7 @@ index 0c59c9130ea25b7bd60b5e845fd5e3e55d0cfa90..bcb04f91964e2327777ce193c848e6fa
LoadRequestWaitingForProcessLaunch(struct WebKit::LoadParameters loadParameters, URL resourceDirectoryURL, WebKit::WebPageProxyIdentifier pageID, bool checkAssumedReadAccessToResourceURL)
LoadData(struct WebKit::LoadParameters loadParameters)
LoadSimulatedRequestAndResponse(struct WebKit::LoadParameters loadParameters, WebCore::ResourceResponse simulatedResponse)
-@@ -311,10 +314,10 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
+@@ -313,10 +316,10 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
AddMIMETypeWithCustomContentProvider(String mimeType)
# Drag and drop.
@@ -21637,7 +21650,7 @@ index 0c59c9130ea25b7bd60b5e845fd5e3e55d0cfa90..bcb04f91964e2327777ce193c848e6fa
PerformDragControllerAction(enum:uint8_t WebKit::DragControllerAction action, WebCore::DragData dragData, WebKit::SandboxExtension::Handle sandboxExtensionHandle, Vector<WebKit::SandboxExtension::Handle> sandboxExtensionsForUpload)
#endif
#if ENABLE(DRAG_SUPPORT)
-@@ -323,6 +326,10 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
+@@ -325,6 +328,10 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
DragCancelled()
#endif
@@ -21649,7 +21662,7 @@ index 0c59c9130ea25b7bd60b5e845fd5e3e55d0cfa90..bcb04f91964e2327777ce193c848e6fa
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 1751f694a0fe17271f1595411dd05ad5f21775d5..3031862c88241872472a0580f13aa69710a84b57 100644
+index c255f38c358a0c5c4e17a6621d7b37dde45f61e5..e50cba5f7cee151f590142e6467a3bb464be99c6 100644
--- a/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm
+++ b/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm
@@ -836,21 +836,37 @@ String WebPage::platformUserAgent(const URL&) const
@@ -21741,7 +21754,7 @@ index 0cf4707d44fb20a2cb125aaf9465d1282bf84651..59a6c108a4be8ef05ae01cb594898357
}
diff --git a/Source/WebKit/WebProcess/WebProcess.cpp b/Source/WebKit/WebProcess/WebProcess.cpp
-index 6b3b54b387619e91e3fe254fb6b291dacf1a6ee9..b1d354229166a20e7f79cf8a718debc5fdb97d0f 100644
+index 198ae3d0272e2217de469f037e5376b4dab363fb..aecda54648a307d186adb41ed97253ee532a2b15 100644
--- a/Source/WebKit/WebProcess/WebProcess.cpp
+++ b/Source/WebKit/WebProcess/WebProcess.cpp
@@ -88,6 +88,7 @@
@@ -21777,10 +21790,10 @@ index 8987c3964a9308f2454759de7f8972215a3ae416..bcac0afeb94ed8123d1f9fb0b932c849
SetProcessDPIAware();
return true;
diff --git a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
-index 23092260f6bc1507834aed6d850ccbd2abdbb487..212a453acc0f250f5404c99e045f70826f6f6f2c 100644
+index cec9b8e318598aeeeb8411706811bc312cc1cecf..e69c97af81f3206146d288572613fc871ace2e80 100644
--- a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
-@@ -4241,7 +4241,7 @@ static BOOL currentScrollIsBlit(NSView *clipView)
+@@ -4242,7 +4242,7 @@ static BOOL currentScrollIsBlit(NSView *clipView)
_private->handlingMouseDownEvent = NO;
}
@@ -21790,7 +21803,7 @@ index 23092260f6bc1507834aed6d850ccbd2abdbb487..212a453acc0f250f5404c99e045f7082
- (void)touch:(WebEvent *)event
{
diff --git a/Source/WebKitLegacy/mac/WebView/WebView.mm b/Source/WebKitLegacy/mac/WebView/WebView.mm
-index 687fd483cb8b98cb0903f54d279e934f1c1ea407..295438a37e4546257453f4fcd8c6d12fe3810538 100644
+index f923a894d9b2f8175b34e8477f89a62edd94877e..fdccb0d1b8502aae7b2d2b2002f5b91c64187db7 100644
--- a/Source/WebKitLegacy/mac/WebView/WebView.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebView.mm
@@ -4036,7 +4036,7 @@ IGNORE_WARNINGS_END
@@ -21843,12 +21856,12 @@ index 0000000000000000000000000000000000000000..dd6a53e2d57318489b7e49dd7373706d
+ LIBVPX_LIBRARIES
+)
diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake
-index 5e8501a6000a30a192bbd603e7dab8a2d7714024..50b284f48a747829ff6a28a6416aecde323d4c28 100644
+index 04fa71ad80a721f8db6656ecf1904b13aa11677a..e08610e659baefd7ce20a40bcf3618a7fa612906 100644
--- a/Source/cmake/OptionsGTK.cmake
+++ b/Source/cmake/OptionsGTK.cmake
@@ -5,6 +5,7 @@ WEBKIT_OPTION_BEGIN()
- SET_PROJECT_VERSION(2 33 3)
+ SET_PROJECT_VERSION(2 35 0)
+set(ENABLE_WEBKIT_LEGACY OFF)
@@ -21864,8 +21877,8 @@ index 5e8501a6000a30a192bbd603e7dab8a2d7714024..50b284f48a747829ff6a28a6416aecde
+
include(GStreamerDefinitions)
- SET_AND_EXPOSE_TO_BUILD(USE_ATK TRUE)
-@@ -60,7 +65,7 @@ WEBKIT_OPTION_DEFINE(ENABLE_INTROSPECTION "Whether to enable GObject introspecti
+ SET_AND_EXPOSE_TO_BUILD(USE_CAIRO TRUE)
+@@ -59,7 +64,7 @@ WEBKIT_OPTION_DEFINE(ENABLE_INTROSPECTION "Whether to enable GObject introspecti
WEBKIT_OPTION_DEFINE(ENABLE_QUARTZ_TARGET "Whether to enable support for the Quartz windowing target." PUBLIC ON)
WEBKIT_OPTION_DEFINE(ENABLE_WAYLAND_TARGET "Whether to enable support for the Wayland windowing target." PUBLIC ON)
WEBKIT_OPTION_DEFINE(ENABLE_X11_TARGET "Whether to enable support for the X11 windowing target." PUBLIC ON)
@@ -21874,7 +21887,7 @@ index 5e8501a6000a30a192bbd603e7dab8a2d7714024..50b284f48a747829ff6a28a6416aecde
WEBKIT_OPTION_DEFINE(USE_GTK4 "Whether to enable usage of GTK4 instead of GTK3." PUBLIC OFF)
WEBKIT_OPTION_DEFINE(USE_LCMS "Whether to enable support for image color management using libcms2." PUBLIC ON)
WEBKIT_OPTION_DEFINE(USE_LIBHYPHEN "Whether to enable the default automatic hyphenation implementation." PUBLIC ON)
-@@ -68,7 +73,7 @@ WEBKIT_OPTION_DEFINE(USE_LIBNOTIFY "Whether to enable the default web notificati
+@@ -67,7 +72,7 @@ WEBKIT_OPTION_DEFINE(USE_LIBNOTIFY "Whether to enable the default web notificati
WEBKIT_OPTION_DEFINE(USE_LIBSECRET "Whether to enable the persistent credential storage using libsecret." PUBLIC ON)
WEBKIT_OPTION_DEFINE(USE_OPENGL_OR_ES "Whether to use OpenGL or ES." PUBLIC ON)
WEBKIT_OPTION_DEFINE(USE_OPENJPEG "Whether to enable support for JPEG2000 images." PUBLIC ON)
@@ -22564,7 +22577,7 @@ index ddc2a96ac68cd51d5f4efeca78a118db91709aa2..57a78f54e72d264daa27faa53ac2a30c
# WebInspectorUI must come after JavaScriptCore and WebCore but before WebKit and WebKit2
my $webKitIndex = first { $projects[$_] eq "Source/WebKitLegacy" } 0..$#projects;
diff --git a/Tools/WebKitTestRunner/PlatformGTK.cmake b/Tools/WebKitTestRunner/PlatformGTK.cmake
-index 6f8366b63e43eca6b95b67bb47fee9e7a1970cf9..cc8299dfa4380b833e79a870779a222059579d3b 100644
+index 8962e645e9a9ac6bd35de9194e1b3f8447259e8d..a4725c6e5754484e0ad2b08562bebbf8b03487d4 100644
--- a/Tools/WebKitTestRunner/PlatformGTK.cmake
+++ b/Tools/WebKitTestRunner/PlatformGTK.cmake
@@ -26,6 +26,7 @@ list(APPEND WebKitTestRunner_LIBRARIES