Stop using blobRegistry in NetworkProcess
[WebKit-https.git] / Source / WebKit / ChangeLog
1 2019-02-05  Alex Christensen  <achristensen@webkit.org>
2
3         Stop using blobRegistry in NetworkProcess
4         https://bugs.webkit.org/show_bug.cgi?id=194027
5
6         Reviewed by Youenn Fablet.
7
8         * NetworkProcess/Downloads/DownloadManager.cpp:
9         (WebKit::DownloadManager::startDownload):
10         * NetworkProcess/Downloads/PendingDownload.cpp:
11         (WebKit::PendingDownload::PendingDownload):
12         * NetworkProcess/Downloads/PendingDownload.h:
13         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
14         (WebKit::NetworkBlobRegistry::registerFileBlobURL):
15         (WebKit::NetworkBlobRegistry::registerBlobURL):
16         (WebKit::NetworkBlobRegistry::registerBlobURLOptionallyFileBacked):
17         (WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
18         (WebKit::NetworkBlobRegistry::unregisterBlobURL):
19         (WebKit::NetworkBlobRegistry::blobSize):
20         (WebKit::NetworkBlobRegistry::writeBlobsToTemporaryFiles):
21         (WebKit::NetworkBlobRegistry::writeBlobToFilePath):
22         (WebKit::NetworkBlobRegistry::connectionToWebProcessDidClose):
23         (WebKit::NetworkBlobRegistry::filesInBlob):
24         (WebKit::NetworkBlobRegistry::singleton): Deleted.
25         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
26         (WebKit::NetworkBlobRegistry::blobRegistry):
27         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
28         (WebKit::NetworkConnectionToWebProcess::didClose):
29         (WebKit::NetworkConnectionToWebProcess::resolveBlobReferences):
30         (WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
31         (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
32         (WebKit::NetworkConnectionToWebProcess::loadPing):
33         (WebKit::NetworkConnectionToWebProcess::preconnectTo):
34         (WebKit::NetworkConnectionToWebProcess::registerFileBlobURL):
35         (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
36         (WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL):
37         (WebKit::NetworkConnectionToWebProcess::registerBlobURLOptionallyFileBacked):
38         (WebKit::NetworkConnectionToWebProcess::registerBlobURLForSlice):
39         (WebKit::NetworkConnectionToWebProcess::unregisterBlobURL):
40         (WebKit::NetworkConnectionToWebProcess::blobSize):
41         (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
42         (WebKit::NetworkConnectionToWebProcess::filesInBlob):
43         (WebKit::NetworkConnectionToWebProcess::blobRegistry):
44         * NetworkProcess/NetworkConnectionToWebProcess.h:
45         * NetworkProcess/NetworkDataTask.cpp:
46         (WebKit::NetworkDataTask::create):
47         * NetworkProcess/NetworkDataTaskBlob.cpp:
48         (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
49         * NetworkProcess/NetworkDataTaskBlob.h:
50         * NetworkProcess/NetworkLoad.cpp:
51         (WebKit::NetworkLoad::NetworkLoad):
52         (WebKit::NetworkLoad::initialize):
53         * NetworkProcess/NetworkLoad.h:
54         * NetworkProcess/NetworkProcess.cpp:
55         (WebKit::NetworkProcess::NetworkProcess):
56         (WebKit::NetworkProcess::removeNetworkConnectionToWebProcess):
57         * NetworkProcess/NetworkProcess.h:
58         (WebKit::NetworkProcess::networkBlobRegistry):
59         * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
60         (WebKit::NetworkProcessPlatformStrategies::createBlobRegistry):
61         * NetworkProcess/NetworkResourceLoader.cpp:
62         (WebKit::m_shouldCaptureExtraNetworkLoadMetrics):
63         (WebKit::NetworkResourceLoader::startNetworkLoad):
64         * NetworkProcess/PreconnectTask.cpp:
65         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
66         (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
67
68 2019-02-05  Daniel Bates  <dabates@apple.com>
69
70         Fix a typo in r241006. Substitute Modifier for Modifiers.
71
72         * Shared/mac/NativeWebGestureEventMac.mm:
73         (WebKit::NativeWebGestureEvent::NativeWebGestureEvent):
74
75 2019-02-05  Daniel Bates  <dabates@apple.com>
76
77         Attempt to fix the build following r241000
78         (https://bugs.webkit.org/show_bug.cgi?id=194241)
79
80         Substitute OptionSet<WebEvent::Modifier> for Modifiers.
81
82         * Shared/mac/NativeWebGestureEventMac.mm:
83         (WebKit::NativeWebGestureEvent::NativeWebGestureEvent):
84         * Shared/mac/WebGestureEvent.h:
85         (WebKit::WebGestureEvent::WebGestureEvent):
86
87 2019-02-05  Truitt Savell  <tsavell@apple.com>
88
89         Unreviewed, rolling out r240984.
90
91         Revision casued two API timeouts
92
93         Reverted changeset:
94
95         "Stop using blobRegistry in NetworkProcess"
96         https://bugs.webkit.org/show_bug.cgi?id=194027
97         https://trac.webkit.org/changeset/240984
98
99 2019-02-05  Youenn Fablet  <youenn@apple.com>
100
101         UserMediaPermissionRequestManagerProxy lambdas should check for 'this' being valid
102         https://bugs.webkit.org/show_bug.cgi?id=194246
103
104         Reviewed by Eric Carlson.
105
106         With PSON enabled, the manager proxy can be destroyed.
107         It is thus important for its callbacks to check for 'this' to be valid.
108
109         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
110         (WebKit::UserMediaPermissionRequestManagerProxy::captureDevicesChanged):
111         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
112         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
113
114 2019-02-05  Daniel Bates  <dabates@apple.com>
115
116         Attempt to fix the build following r241000
117         (https://bugs.webkit.org/show_bug.cgi?id=194241)
118
119         Substitute WebEvent::Modifier::CapsLockKey for WebEvent::CapsLockKey.
120
121         * Shared/gtk/WebEventFactory.cpp:
122         (WebKit::modifiersForEvent):
123         * Shared/mac/WebEventFactory.mm:
124         (WebKit::modifiersForEvent):
125         * UIProcess/API/Cocoa/WKNavigationAction.mm:
126         (toNSEventModifierFlags):
127         * UIProcess/Automation/WebAutomationSession.cpp:
128         (WebKit::protocolModifierToWebEventModifier):
129         * UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp:
130         (WebKit::modifiersToEventState):
131         * UIProcess/Automation/mac/WebAutomationSessionMac.mm:
132         (WebKit::WebAutomationSession::platformSimulateMouseInteraction):
133         * UIProcess/Cocoa/UIDelegate.mm:
134         (WebKit::toNSEventModifierFlags):
135
136 2019-02-05  Daniel Bates  <dabates@apple.com>
137
138         Make WebEvent::Modifiers an OptionSet
139         https://bugs.webkit.org/show_bug.cgi?id=194241
140
141         Reviewed by Simon Fraser.
142
143         Use an OptionSet to represent the bitmask of keyboard modifier flags. This improves type safety
144         and makes debugging more enjoyable because our LLDB pretty-printers have built-in support for
145         OptionSet.
146
147         While I am at it, make WebEvent::Modifier an enum class. It is currently an enum. This makes
148         this enum more closely match WebCore::PlatformEvent::Modifier.
149
150         * Shared/API/c/WKSharedAPICast.h:
151         (WebKit::toAPI):
152         * Shared/NavigationActionData.cpp:
153         (WebKit::NavigationActionData::encode const):
154         (WebKit::NavigationActionData::decode):
155         * Shared/NavigationActionData.h:
156         * Shared/WebEvent.cpp:
157         (WebKit::WebEvent::WebEvent):
158         * Shared/WebEvent.h:
159         (WebKit::WebEvent::shiftKey const):
160         (WebKit::WebEvent::controlKey const):
161         (WebKit::WebEvent::altKey const):
162         (WebKit::WebEvent::metaKey const):
163         (WebKit::WebEvent::capsLockKey const):
164         (WebKit::WebEvent::modifiers const):
165         (WebKit::WebTouchEvent::WebTouchEvent):
166         * Shared/WebEventConversion.cpp:
167         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
168         * Shared/WebKeyboardEvent.cpp:
169         (WebKit::WebKeyboardEvent::WebKeyboardEvent):
170         * Shared/WebMouseEvent.cpp:
171         (WebKit::WebMouseEvent::WebMouseEvent):
172         * Shared/WebTouchEvent.cpp:
173         (WebKit::WebTouchEvent::WebTouchEvent):
174         * Shared/WebWheelEvent.cpp:
175         (WebKit::WebWheelEvent::WebWheelEvent):
176         * Shared/gtk/WebEventFactory.cpp:
177         (WebKit::modifiersForEvent):
178         * Shared/ios/NativeWebTouchEventIOS.mm:
179         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
180         * Shared/ios/WebIOSEventFactory.mm:
181         (modifiersForEvent):
182         (WebIOSEventFactory::createWebKeyboardEvent):
183         (WebIOSEventFactory::createWebMouseEvent):
184         * Shared/libwpe/WebEventFactory.cpp:
185         (WebKit::modifiersForEventModifiers):
186         (WebKit::WebEventFactory::createWebWheelEvent):
187         (WebKit::WebEventFactory::createWebTouchEvent):
188         * Shared/mac/WebEventFactory.mm:
189         (WebKit::modifiersForEvent):
190         (WebKit::WebEventFactory::createWebMouseEvent):
191         (WebKit::WebEventFactory::createWebWheelEvent):
192         (WebKit::WebEventFactory::createWebKeyboardEvent):
193         * Shared/win/WebEventFactory.cpp:
194         (WebKit::modifiersForEvent):
195         (WebKit::modifiersForCurrentKeyState):
196         (WebKit::WebEventFactory::createWebMouseEvent):
197         (WebKit::WebEventFactory::createWebWheelEvent):
198         (WebKit::WebEventFactory::createWebKeyboardEvent):
199         * UIProcess/API/APINavigationAction.h:
200         * UIProcess/API/APIUIClient.h:
201         (API::UIClient::mouseDidMoveOverElement):
202         * UIProcess/API/C/WKPage.cpp:
203         (WKPageSetPageUIClient):
204         * UIProcess/API/Cocoa/WKNavigationAction.mm:
205         (toNSEventModifierFlags):
206         * UIProcess/API/glib/WebKitPrivate.cpp:
207         (toPlatformModifiers):
208         * UIProcess/API/glib/WebKitPrivate.h:
209         * UIProcess/API/glib/WebKitUIClient.cpp:
210         * UIProcess/API/glib/WebKitWebView.cpp:
211         (webkitWebViewMouseTargetChanged):
212         * UIProcess/API/glib/WebKitWebViewPrivate.h:
213         * UIProcess/Automation/WebAutomationSession.cpp:
214         (WebKit::WebAutomationSession::simulateMouseInteraction):
215         (WebKit::protocolModifierToWebEventModifier):
216         (WebKit::WebAutomationSession::performMouseInteraction):
217         * UIProcess/Automation/WebAutomationSession.h:
218         * UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp:
219         (WebKit::modifiersToEventState):
220         (WebKit::WebAutomationSession::platformSimulateMouseInteraction):
221         * UIProcess/Automation/mac/WebAutomationSessionMac.mm:
222         (WebKit::WebAutomationSession::platformSimulateMouseInteraction):
223         * UIProcess/Automation/wpe/WebAutomationSessionWPE.cpp:
224         (WebKit::modifiersToEventState):
225         (WebKit::WebAutomationSession::platformSimulateMouseInteraction):
226         * UIProcess/Cocoa/UIDelegate.h:
227         * UIProcess/Cocoa/UIDelegate.mm:
228         (WebKit::toNSEventModifierFlags):
229         (WebKit::UIDelegate::UIClient::mouseDidMoveOverElement):
230         * UIProcess/WebPageProxy.cpp:
231         (WebKit::WebPageProxy::mouseDidMoveOverElement):
232         * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
233         (API::InjectedBundle::PageUIClient::mouseDidMoveOverElement):
234         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
235         (WebKit::InjectedBundleNavigationAction::modifiersForNavigationAction):
236         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
237         (WebKit::InjectedBundleNavigationAction::modifiers const):
238         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
239         (WebKit::InjectedBundlePageUIClient::mouseDidMoveOverElement):
240         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
241         * WebProcess/Plugins/PDF/PDFPlugin.mm:
242         (WebKit::PDFPlugin::showContextMenuAtPoint):
243         * WebProcess/Plugins/PluginView.cpp:
244         (WebKit::PluginView::createWebEvent const):
245         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
246         (WebKit::WebChromeClient::mouseDidMoveOverElement):
247         * WebProcess/WebPage/WebPage.cpp:
248         (WebKit::WebPage::simulateMouseDown):
249         (WebKit::WebPage::simulateMouseUp):
250         (WebKit::WebPage::simulateMouseMotion):
251
252 2019-02-05  Tim Horton  <timothy_horton@apple.com>
253
254         Reproducible crash under WKShareSheet presentWithParameters when cancelling a share
255         https://bugs.webkit.org/show_bug.cgi?id=194301
256         <rdar://problem/47719379>
257
258         Reviewed by Beth Dakin.
259
260         * UIProcess/Cocoa/WKShareSheet.mm:
261         (-[WKShareSheet presentWithParameters:completionHandler:]):
262         NSSharingServicePicker's delegate callbacks can be called synchronously.
263         We release the WKShareSheet (which holds our reference to the NSSharingServicePicker)
264         under sharingServicePicker:didChooseSharingService:. On older versions of macOS,
265         there was nothing keeping the NSSharingServicePicker alive inside
266         showRelativeToRect:ofView:preferredEdge:, thus the whole chain of references would
267         fall and result in sending a message to a released NSSharingServicePicker.
268         To resolve this, keep an extra reference to the WKShareSheet until
269         presentation is complete.
270
271 2019-02-05  Keith Rollin  <krollin@apple.com>
272
273         Enable the automatic checking and regenerations of .xcfilelists during builds
274         https://bugs.webkit.org/show_bug.cgi?id=194124
275         <rdar://problem/47721277>
276
277         Reviewed by Tim Horton.
278
279         Bug 193790 add a facility for checking -- during build time -- that
280         any needed .xcfilelist files are up-to-date and for updating them if
281         they are not. This facility was initially opt-in by setting
282         WK_ENABLE_CHECK_XCFILELISTS until other pieces were in place and until
283         the process seemed robust. Its now time to enable this facility and
284         make it opt-out. If there is a need to disable this facility, set and
285         export WK_DISABLE_CHECK_XCFILELISTS=1 in your environment before
286         running `make` or `build-webkit`, or before running Xcode from the
287         command line.
288
289         Additionally, remove the step that generates a list of source files
290         going into the UnifiedSources build step. It's only necessarily to
291         specify Sources.txt and SourcesCocoa.txt as inputs.
292
293         * UnifiedSources-input.xcfilelist: Removed.
294         * WebKit.xcodeproj/project.pbxproj:
295
296 2019-02-05  Brady Eidson  <beidson@apple.com>
297
298         Add a new DownloadMap type that manages taking an assertion automatically.
299         https://bugs.webkit.org/show_bug.cgi?id=194294
300
301         Reviewed by Alex Christensen.
302
303         If we don't need the download assertion, we use a vanilla HashMap like today.
304         If we need the download assertion, we use the new DownloadMap class instead.
305
306         The new DownloadMap is a wrapper around a HashMap that also creates/destroys the assertion as needed.
307
308         * NetworkProcess/Downloads/DownloadManager.cpp:
309         (WebKit::DownloadManager::dataTaskBecameDownloadTask):
310         (WebKit::DownloadManager::downloadFinished):
311         * NetworkProcess/Downloads/DownloadManager.h:
312
313         * NetworkProcess/Downloads/DownloadMap.cpp: Added.
314         (WebKit::DownloadMap::get const):
315         (WebKit::DownloadMap::isEmpty const):
316         (WebKit::DownloadMap::size const):
317         (WebKit::DownloadMap::contains const):
318         (WebKit::DownloadMap::add):
319         (WebKit::DownloadMap::remove):
320         * NetworkProcess/Downloads/DownloadMap.h: Added.
321
322         * Sources.txt:
323
324         * UIProcess/ios/ProcessAssertionIOS.mm:
325         (WebKit::ProcessAssertion::ProcessAssertion):
326
327         * WebKit.xcodeproj/project.pbxproj:
328
329 2019-02-05  Brady Eidson  <beidson@apple.com>
330
331         Fix iOS simulator build after r240954
332
333         Unreviewed.
334
335         * UIProcess/ios/ProcessAssertionIOS.mm:
336         (WebKit::ProcessAssertion::ProcessAssertion): Implement the new constructor.
337
338 2019-02-05  Alex Christensen  <achristensen@webkit.org>
339
340         Stop using blobRegistry in NetworkProcess
341         https://bugs.webkit.org/show_bug.cgi?id=194027
342
343         Reviewed by Youenn Fablet.
344
345         * NetworkProcess/Downloads/DownloadManager.cpp:
346         (WebKit::DownloadManager::startDownload):
347         * NetworkProcess/Downloads/PendingDownload.cpp:
348         (WebKit::PendingDownload::PendingDownload):
349         * NetworkProcess/Downloads/PendingDownload.h:
350         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
351         (WebKit::NetworkBlobRegistry::registerFileBlobURL):
352         (WebKit::NetworkBlobRegistry::registerBlobURL):
353         (WebKit::NetworkBlobRegistry::registerBlobURLOptionallyFileBacked):
354         (WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
355         (WebKit::NetworkBlobRegistry::unregisterBlobURL):
356         (WebKit::NetworkBlobRegistry::blobSize):
357         (WebKit::NetworkBlobRegistry::writeBlobsToTemporaryFiles):
358         (WebKit::NetworkBlobRegistry::writeBlobToFilePath):
359         (WebKit::NetworkBlobRegistry::connectionToWebProcessDidClose):
360         (WebKit::NetworkBlobRegistry::filesInBlob):
361         (WebKit::NetworkBlobRegistry::singleton): Deleted.
362         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
363         (WebKit::NetworkBlobRegistry::blobRegistry):
364         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
365         (WebKit::NetworkConnectionToWebProcess::didClose):
366         (WebKit::NetworkConnectionToWebProcess::resolveBlobReferences):
367         (WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
368         (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
369         (WebKit::NetworkConnectionToWebProcess::loadPing):
370         (WebKit::NetworkConnectionToWebProcess::preconnectTo):
371         (WebKit::NetworkConnectionToWebProcess::registerFileBlobURL):
372         (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
373         (WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL):
374         (WebKit::NetworkConnectionToWebProcess::registerBlobURLOptionallyFileBacked):
375         (WebKit::NetworkConnectionToWebProcess::registerBlobURLForSlice):
376         (WebKit::NetworkConnectionToWebProcess::unregisterBlobURL):
377         (WebKit::NetworkConnectionToWebProcess::blobSize):
378         (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
379         (WebKit::NetworkConnectionToWebProcess::filesInBlob):
380         (WebKit::NetworkConnectionToWebProcess::blobRegistry):
381         * NetworkProcess/NetworkConnectionToWebProcess.h:
382         * NetworkProcess/NetworkDataTask.cpp:
383         (WebKit::NetworkDataTask::create):
384         * NetworkProcess/NetworkDataTaskBlob.cpp:
385         (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
386         * NetworkProcess/NetworkDataTaskBlob.h:
387         * NetworkProcess/NetworkLoad.cpp:
388         (WebKit::NetworkLoad::NetworkLoad):
389         (WebKit::NetworkLoad::initialize):
390         * NetworkProcess/NetworkLoad.h:
391         * NetworkProcess/NetworkProcess.cpp:
392         (WebKit::NetworkProcess::NetworkProcess):
393         (WebKit::NetworkProcess::removeNetworkConnectionToWebProcess):
394         * NetworkProcess/NetworkProcess.h:
395         (WebKit::NetworkProcess::networkBlobRegistry):
396         * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
397         (WebKit::NetworkProcessPlatformStrategies::createBlobRegistry):
398         * NetworkProcess/NetworkResourceLoader.cpp:
399         (WebKit::m_shouldCaptureExtraNetworkLoadMetrics):
400         (WebKit::NetworkResourceLoader::startNetworkLoad):
401         * NetworkProcess/PreconnectTask.cpp:
402         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
403         (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
404
405 2019-02-05  Ryan Haddad  <ryanhaddad@apple.com>
406
407         Unreviewed, rolling out r240742.
408
409         Causes crashes on iOS simulator.
410
411         Reverted changeset:
412
413         "[iOS] Keyups for non-modifier keys identified as "Dead" when
414         not focused in a content-editable element"
415         https://bugs.webkit.org/show_bug.cgi?id=192824
416         https://trac.webkit.org/changeset/240742
417
418 2019-02-05  Alex Christensen  <achristensen@webkit.org>
419
420         Protect globalWebSocketStreamMap with a Lock
421         https://bugs.webkit.org/show_bug.cgi?id=194224
422         <rdar://problem/47581081>
423
424         Reviewed by Ryosuke Niwa.
425
426         * WebProcess/Network/WebSocketStream.cpp:
427         (WebKit::WebSocketStream::streamWithIdentifier):
428         (WebKit::WebSocketStream::networkProcessCrashed):
429         (WebKit::WebSocketStream::WebSocketStream):
430         (WebKit::WebSocketStream::~WebSocketStream):
431
432 2019-02-04  Alex Christensen  <achristensen@webkit.org>
433
434         Add Networking Daemon skeleton
435         https://bugs.webkit.org/show_bug.cgi?id=194278
436
437         Reviewed by Zalan Bujtas.
438
439         Daemon skeletons? This is spooky stuff.
440
441         * NetworkProcess/EntryPoint/Cocoa/Daemon/DaemonEntryPoint.h: Added.
442         * NetworkProcess/EntryPoint/Cocoa/Daemon/DaemonEntryPoint.mm: Added.
443         (WebKit::DaemonMain):
444         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
445         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
446         (WebKit::NetworkDataTaskCocoa::restrictRequestReferrerToOriginIfNeeded):
447         * Shared/API/Cocoa/WKMain.h:
448         * Shared/API/Cocoa/WKMain.mm:
449         (WKDaemonMain):
450         * Shared/EntryPointUtilities/Cocoa/AuxiliaryProcessMain.cpp:
451         (main):
452         * SourcesCocoa.txt:
453         * UnifiedSources-input.xcfilelist:
454         * WebKit.xcodeproj/project.pbxproj:
455
456 2019-02-04  Yusuke Suzuki  <ysuzuki@apple.com>
457
458         [JSC] Shrink size of VM by lazily allocating IsoSubspaces for non-common types
459         https://bugs.webkit.org/show_bug.cgi?id=193993
460
461         Reviewed by Keith Miller.
462
463         * WebProcess/Plugins/Netscape/JSNPMethod.h:
464         * WebProcess/Plugins/Netscape/JSNPObject.h:
465
466 2019-02-04  Simon Fraser  <simon.fraser@apple.com>
467
468         Move some macOS/iOS scrolling code into the scrolling/cocoa directory
469         https://bugs.webkit.org/show_bug.cgi?id=194245
470
471         Reviewed by Zalan Bujtas.
472
473         Use PLATFORM(MAC), not !PLATFORM(IOS_FAMILY).
474
475         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
476         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
477
478 2019-02-04  Ms2ger  <Ms2ger@igalia.com>
479
480         [GTK][WPE] Need a function to convert internal URI to display ("pretty") URI
481         https://bugs.webkit.org/show_bug.cgi?id=174816
482
483         Reviewed by Michael Catanzaro.
484
485         Add webkit_uri_for_display for GTK and WPE.
486
487         * PlatformGTK.cmake:
488         * PlatformWPE.cmake:
489         * SourcesGTK.txt:
490         * SourcesWPE.txt:
491         * UIProcess/API/glib/WebKitURIUtilities.cpp: Added.
492         (webkit_uri_for_display):
493         * UIProcess/API/gtk/WebKitURIUtilities.h: Added.
494         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
495         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
496         * UIProcess/API/gtk/webkit2.h:
497         * UIProcess/API/wpe/WebKitURIUtilities.h: Added.
498         * UIProcess/API/wpe/docs/wpe-0.1-sections.txt:
499         * UIProcess/API/wpe/docs/wpe-docs.sgml:
500         * UIProcess/API/wpe/webkit.h:
501
502 2019-02-04  Alex Christensen  <achristensen@webkit.org>
503
504         Move XPCService main to a shared file calling a C function
505         https://bugs.webkit.org/show_bug.cgi?id=194256
506
507         Reviewed by Brady Eidson.
508
509         This not only reduces a few kilobytes of duplicated binary from the XPCService executables,
510         It will allow me to introduce a new kind of executable which will need to parse argv and call a different C function.
511         This is similar to r236075 but more general.
512
513         * Shared/API/Cocoa/WKMain.h: Added.
514         * Shared/API/Cocoa/WKMain.mm: Added.
515         (WKXPCServiceMain):
516         * Shared/EntryPointUtilities/Cocoa/AuxiliaryProcessMain.cpp: Added.
517         (main):
518         * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
519         (main): Deleted.
520         * SourcesCocoa.txt:
521         * WebKit.xcodeproj/project.pbxproj:
522
523 2019-02-04  Alex Christensen  <achristensen@webkit.org>
524
525         Make MessageSender functions const
526         https://bugs.webkit.org/show_bug.cgi?id=194247
527
528         Reviewed by Brady Eidson.
529
530         * NetworkProcess/Downloads/Download.cpp:
531         (WebKit::Download::messageSenderConnection const):
532         (WebKit::Download::messageSenderDestinationID const):
533         (WebKit::Download::messageSenderConnection): Deleted.
534         (WebKit::Download::messageSenderDestinationID): Deleted.
535         * NetworkProcess/Downloads/Download.h:
536         * NetworkProcess/Downloads/PendingDownload.cpp:
537         (WebKit::PendingDownload::messageSenderConnection const):
538         (WebKit::PendingDownload::messageSenderDestinationID const):
539         (WebKit::PendingDownload::messageSenderConnection): Deleted.
540         (WebKit::PendingDownload::messageSenderDestinationID): Deleted.
541         * NetworkProcess/Downloads/PendingDownload.h:
542         * NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:
543         (WebKit::WebIDBConnectionToClient::messageSenderConnection const):
544         (WebKit::WebIDBConnectionToClient::messageSenderConnection): Deleted.
545         * NetworkProcess/IndexedDB/WebIDBConnectionToClient.h:
546         * NetworkProcess/NetworkResourceLoader.cpp:
547         (WebKit::NetworkResourceLoader::messageSenderConnection const):
548         (WebKit::NetworkResourceLoader::messageSenderConnection): Deleted.
549         * NetworkProcess/NetworkResourceLoader.h:
550         * NetworkProcess/NetworkSocketStream.cpp:
551         (WebKit::NetworkSocketStream::messageSenderConnection const):
552         (WebKit::NetworkSocketStream::messageSenderDestinationID const):
553         (WebKit::NetworkSocketStream::messageSenderConnection): Deleted.
554         (WebKit::NetworkSocketStream::messageSenderDestinationID): Deleted.
555         * NetworkProcess/NetworkSocketStream.h:
556         * NetworkProcess/ServiceWorker/WebSWServerConnection.h:
557         * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
558         (WebKit::WebSWServerToContextConnection::messageSenderConnection const):
559         (WebKit::WebSWServerToContextConnection::messageSenderDestinationID const):
560         (WebKit::WebSWServerToContextConnection::messageSenderConnection): Deleted.
561         (WebKit::WebSWServerToContextConnection::messageSenderDestinationID): Deleted.
562         * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
563         * Platform/IPC/MessageSender.h:
564         * Shared/AuxiliaryProcess.cpp:
565         (WebKit::AuxiliaryProcess::messageSenderConnection const):
566         (WebKit::AuxiliaryProcess::messageSenderDestinationID const):
567         (WebKit::AuxiliaryProcess::messageSenderConnection): Deleted.
568         (WebKit::AuxiliaryProcess::messageSenderDestinationID): Deleted.
569         * Shared/AuxiliaryProcess.h:
570         * UIProcess/WebConnectionToWebProcess.cpp:
571         (WebKit::WebConnectionToWebProcess::messageSenderConnection const):
572         (WebKit::WebConnectionToWebProcess::messageSenderDestinationID const):
573         (WebKit::WebConnectionToWebProcess::messageSenderConnection): Deleted.
574         (WebKit::WebConnectionToWebProcess::messageSenderDestinationID): Deleted.
575         * UIProcess/WebConnectionToWebProcess.h:
576         * UIProcess/WebPageProxy.cpp:
577         (WebKit::WebPageProxy::messageSenderConnection const):
578         (WebKit::WebPageProxy::messageSenderDestinationID const):
579         (WebKit::WebPageProxy::messageSenderConnection): Deleted.
580         (WebKit::WebPageProxy::messageSenderDestinationID): Deleted.
581         * UIProcess/WebPageProxy.h:
582         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
583         (WebKit::WebIDBConnectionToServer::messageSenderConnection const):
584         (WebKit::WebIDBConnectionToServer::messageSenderConnection): Deleted.
585         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
586         * WebProcess/Network/WebResourceLoader.cpp:
587         (WebKit::WebResourceLoader::messageSenderConnection const):
588         (WebKit::WebResourceLoader::messageSenderDestinationID const):
589         (WebKit::WebResourceLoader::messageSenderConnection): Deleted.
590         (WebKit::WebResourceLoader::messageSenderDestinationID): Deleted.
591         * WebProcess/Network/WebResourceLoader.h:
592         * WebProcess/Network/WebSocketStream.cpp:
593         (WebKit::WebSocketStream::messageSenderConnection const):
594         (WebKit::WebSocketStream::messageSenderDestinationID const):
595         (WebKit::WebSocketStream::messageSenderConnection): Deleted.
596         (WebKit::WebSocketStream::messageSenderDestinationID): Deleted.
597         * WebProcess/Network/WebSocketStream.h:
598         * WebProcess/Storage/WebSWClientConnection.h:
599         * WebProcess/WebConnectionToUIProcess.cpp:
600         (WebKit::WebConnectionToUIProcess::messageSenderConnection const):
601         (WebKit::WebConnectionToUIProcess::messageSenderDestinationID const):
602         (WebKit::WebConnectionToUIProcess::messageSenderConnection): Deleted.
603         (WebKit::WebConnectionToUIProcess::messageSenderDestinationID): Deleted.
604         * WebProcess/WebConnectionToUIProcess.h:
605         * WebProcess/WebPage/WebPage.cpp:
606         (WebKit::WebPage::messageSenderConnection const):
607         (WebKit::WebPage::messageSenderDestinationID const):
608         (WebKit::WebPage::messageSenderConnection): Deleted.
609         (WebKit::WebPage::messageSenderDestinationID): Deleted.
610         * WebProcess/WebPage/WebPage.h:
611
612 2019-02-04  Brady Eidson  <beidson@apple.com>
613
614         Take additional process assertion while downloading.
615         <rdar://problem/47741356> and https://bugs.webkit.org/show_bug.cgi?id=194239
616
617         Reviewed by Chris Dumez.
618
619         When the first download starts, grab this new assertion.
620         When the last download ends, release it.
621
622         * Configurations/Network-iOS.entitlements:
623
624         * NetworkProcess/Downloads/DownloadManager.cpp:
625         (WebKit::DownloadManager::dataTaskBecameDownloadTask):
626         (WebKit::DownloadManager::downloadFinished):
627         * NetworkProcess/Downloads/DownloadManager.h:
628
629         * Platform/spi/ios/AssertionServicesSPI.h:
630
631         * UIProcess/ProcessAssertion.cpp:
632         (WebKit::ProcessAssertion::ProcessAssertion):
633         * UIProcess/ProcessAssertion.h:
634         (WebKit::ProcessAssertion::ProcessAssertion):
635
636         * UIProcess/WebProcessProxy.cpp:
637         (WebKit::WebProcessProxy::didSetAssertionState):
638
639         * UIProcess/ios/ProcessAssertionIOS.mm:
640         (WebKit::flagsForState):
641         (WebKit::reasonForState):
642         (WebKit::ProcessAssertion::ProcessAssertion):
643
644 2019-02-04  Said Abou-Hallawa  <said@apple.com>
645
646         [CG] Enable setAdditionalSupportedImageTypes for WK1
647         https://bugs.webkit.org/show_bug.cgi?id=194190
648
649         Reviewed by Tim Horton.
650
651         Move the function webCoreStringVectorFromNSStringArray from WebKit to
652         WebCore so it can be used by both WebKit and WebKitLegacy.
653
654         * Platform/mac/StringUtilities.h:
655         * Platform/mac/StringUtilities.mm:
656         (WebKit::webCoreStringVectorFromNSStringArray): Deleted.
657         * UIProcess/API/Cocoa/WKWebView.mm:
658         (-[WKWebView _initializeWithConfiguration:]):
659
660 2019-02-04  Benjamin Poulain  <benjamin@webkit.org>
661
662         Use deferrable timer to restart the Responsiveness Timer on each wheel event
663         https://bugs.webkit.org/show_bug.cgi?id=194135
664
665         Reviewed by Simon Fraser.
666
667         Simon Fraser suggested a neat improvement over my previous optimization
668         of ResponsivenessTimer.
669
670         Instead of reseting the deadline with every event, we can let the timer
671         fire and add the missing time from the last start.
672
673         I implemented that behavior in the new Deferrable Timer class and use
674         it from ResponsivenessTimer.
675
676         * NetworkProcess/watchos/NetworkProximityAssertion.h:
677         * UIProcess/ResponsivenessTimer.h:
678         * WebProcess/Plugins/PluginView.h:
679
680 2019-02-04  Simon Fraser  <simon.fraser@apple.com>
681
682         PageOverlayController's layers should be created lazily
683         https://bugs.webkit.org/show_bug.cgi?id=194199
684         rdar://problem/46571593
685
686         Reviewed by Tim Horton.
687         
688         Expose PageOverlayController::hasDocumentOverlays() and hasViewOverlays()
689         and use them to only parent the overlay-hosting layers when necessary.
690
691         For document overlays, RenderLayerCompositor::appendDocumentOverlayLayers() can
692         simply do nothing if there are none. Updates are triggered via Page::installedPageOverlaysChanged(),
693         which calls FrameView::setNeedsCompositingConfigurationUpdate() to trigger the root layer
694         compositing updates that parents the layerWithDocumentOverlays().
695
696         View overlays are added to the layer tree via the DrawingArea. When we go between having
697         none and some view overlays, Page::installedPageOverlaysChanged() calls attachViewOverlayGraphicsLayer()
698         on the ChromeClient, and the DrawingArea responds by calling updateRootLayers() and scheduling a
699         compositing flush (this has to be done manually because view overlay layers are outside the
700         subtree managed by RenderLayerCompositor).
701         
702         Now that GraphicsLayers are ref-counted, we can let the DrawingArea simply retain its m_viewOverlayRootLayer;
703         there is no need for RenderLayerCompositor::attachRootLayer()/detachRootLayer() to do anything with view
704         overlay layers. This implies that a page can navigate (new FrameView) and view overlays will persist, without
705         having to be manually removed and re-added. We can also remove the Frame argument to attachViewOverlayGraphicsLayer().
706
707         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
708         (WebKit::WebChromeClient::attachViewOverlayGraphicsLayer):
709         * WebProcess/WebCoreSupport/WebChromeClient.h:
710         * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
711         (WebKit::AcceleratedDrawingArea::attachViewOverlayGraphicsLayer):
712         * WebProcess/WebPage/AcceleratedDrawingArea.h:
713         * WebProcess/WebPage/DrawingArea.h:
714         (WebKit::DrawingArea::attachViewOverlayGraphicsLayer):
715         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
716         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
717         (WebKit::RemoteLayerTreeDrawingArea::attachViewOverlayGraphicsLayer):
718         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
719         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
720         (WebKit::TiledCoreAnimationDrawingArea::attachViewOverlayGraphicsLayer):
721         (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):
722
723 2019-02-04  Michael Catanzaro  <mcatanzaro@igalia.com>
724
725         Unreviewed, improve preprocessor guard
726         https://bugs.webkit.org/show_bug.cgi?id=194166
727         <rdar://problem/47694328>
728
729         AC mode is only optional in GTK port. Requested by Zan.
730
731         * WebProcess/WebPage/WebPage.cpp:
732         (WebKit::WebPage::updatePreferences):
733
734 2019-02-04  Sihui Liu  <sihui_liu@apple.com>
735
736         IndexedDB: leak WebIDBConnectionToServer in layout tests
737         https://bugs.webkit.org/show_bug.cgi?id=193688
738         <rdar://problem/47353263>
739
740         Reviewed by Geoffrey Garen.
741
742         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
743         (WebKit::NetworkConnectionToWebProcess::didClose):
744         (WebKit::NetworkConnectionToWebProcess::establishIDBConnectionToServer):
745         (WebKit::NetworkConnectionToWebProcess::removeIDBConnectionToServer): Deleted.
746         * NetworkProcess/NetworkConnectionToWebProcess.h:
747         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
748         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
749         (WebKit::WebIDBConnectionToServer::~WebIDBConnectionToServer):
750
751 2019-02-04  Antoine Quint  <graouts@apple.com>
752
753         <rdar://problem/47788802>
754
755         Unreviewed build fix.
756
757         * Platform/spi/ios/UIKitSPI.h:
758
759 2019-02-04  Youenn Fablet  <youenn@apple.com>
760
761         Capture state should be managed consistently when doing process swapping
762         https://bugs.webkit.org/show_bug.cgi?id=194122
763         <rdar://problem/47609293>
764
765         Reviewed by Eric Carlson.
766
767         When doing PSON, WebPageProxy::resetState is called.
768         It resets the media state, but does not call the client delegates.
769         Instead of directly updating the media state, call the routine used to update it so that client delegates are called.
770
771         Covered by new API test and layout test.
772
773         * UIProcess/API/Cocoa/WKWebView.mm:
774         (-[WKWebView _mediaCaptureState]):
775         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
776         * UIProcess/WebPageProxy.cpp:
777         (WebKit::WebPageProxy::resetState):
778         (WebKit::WebPageProxy::isPlayingMediaDidChange):
779         (WebKit::WebPageProxy::updatePlayingMediaDidChange):
780         * UIProcess/WebPageProxy.h:
781
782 2019-02-04  Antoine Quint  <graouts@apple.com>
783
784         Use a dedicated type instead of int32_t for pointer identifiers
785         https://bugs.webkit.org/show_bug.cgi?id=194217
786
787         Reviewed by Antti Koivisto.
788
789         * Scripts/webkit/messages.py:
790         * UIProcess/WebPageProxy.cpp:
791         (WebKit::WebPageProxy::cancelPointer):
792         * UIProcess/WebPageProxy.h:
793         * WebProcess/WebPage/WebPage.cpp:
794         (WebKit::WebPage::cancelPointer):
795         * WebProcess/WebPage/WebPage.h:
796         * WebProcess/WebPage/WebPage.messages.in:
797
798 2019-02-04  Michael Catanzaro  <mcatanzaro@igalia.com>
799
800         Unreviewed, avoid -Wswitch warnings introduced in r240880
801         https://bugs.webkit.org/show_bug.cgi?id=193740
802         <rdar://problem/47527267>
803
804         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
805         (WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse):
806
807 2019-02-04  Alexander Mikhaylenko  <exalm7659@gmail.com>
808
809         [GTK] Allow pinch zoom on touchpad
810         https://bugs.webkit.org/show_bug.cgi?id=194201
811
812         Reviewed by Michael Catanzaro.
813
814         Enable touchpad events for WebkitWebViewBase, then feed touchpad
815         pinch events to GestureController.
816
817         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
818         (webkitWebViewBaseRealize): Added GDK_TOUCHPAD_GESTURE_MASK to event mask.
819         (webkitWebViewBaseEvent): Added.
820         (webkit_web_view_base_class_init): Override event vfunc.
821
822 2019-02-04  Michael Catanzaro  <mcatanzaro@igalia.com>
823
824         Unreviewed, only force settings.acceleratedCompositingEnabled() to true for Cocoa ports
825         https://bugs.webkit.org/show_bug.cgi?id=194166
826         <rdar://problem/47694328>
827
828         Accelerated compositing is broken for me at least. We're a long way from being able to force
829         it.
830
831         * WebProcess/WebPage/WebPage.cpp:
832         (WebKit::WebPage::updatePreferences):
833
834 2019-02-04  Abderrahim Kitouni  <akitouni@gnome.org>
835
836         [GTK] Remove last python2 dependency from CMake build process
837         https://bugs.webkit.org/show_bug.cgi?id=194218
838
839         Reviewed by Michael Catanzaro.
840
841         * InspectorGResources.cmake:
842
843 2019-02-04  Antti Koivisto  <antti@apple.com>
844
845         Rename GraphicsLayer and PlatformCALayer type enum values to match "scroll container layer" convention
846         https://bugs.webkit.org/show_bug.cgi?id=194215
847
848         Reviewed by Frédéric Wang.
849
850         * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
851         (WebKit::RemoteLayerBackingStore::drawInContext):
852         * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
853         (WebKit::RemoteLayerTreeHost::makeNode):
854         * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
855         (WebKit::RemoteLayerTreeHost::makeNode):
856
857 2019-02-03  Antti Koivisto  <antti@apple.com>
858
859         [iOS] Tiles not created in large scrollable iframes
860         https://bugs.webkit.org/show_bug.cgi?id=193665
861
862         Reviewed by Simon Fraser.
863
864         * UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm:
865         (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateBeforeChildren):
866         * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
867         (WebKit::ScrollingTreeScrollingNodeDelegateIOS::commitStateBeforeChildren):
868
869         We now use scrollContainerLayer consistently so remove the special cases.
870
871 2019-02-03  Fujii Hironori  <Hironori.Fujii@sony.com>
872
873         [curl] [WebKit] Assertion failures of missing networkStorageSession for storage/indexeddb tests
874         https://bugs.webkit.org/show_bug.cgi?id=194141
875
876         Reviewed by Ross Kirsling.
877
878         Implemented WebKit::NetworkProcess::switchToNewTestingSession and
879         WebKit::NetworkProcess::ensureSession for curl port.
880
881         * NetworkProcess/NetworkProcess.cpp:
882         (WebKit::NetworkProcess::switchToNewTestingSession):
883         (WebKit::NetworkProcess::ensureSession):
884
885 2019-02-03  Simon Fraser  <simon.fraser@apple.com>
886
887         Make setNeedsLayout on the root more explicitly about triggering its side-effects
888         https://bugs.webkit.org/show_bug.cgi?id=194198
889
890         Reviewed by Antti Koivisto.
891
892         Call the newly named functions.
893
894         * WebProcess/Plugins/PDF/PDFPlugin.mm:
895         (WebKit::PDFPlugin::updateScrollbars):
896         * WebProcess/Plugins/PluginView.cpp:
897         (WebKit::PluginView::didInitializePlugin):
898         * WebProcess/WebPage/WebPage.cpp:
899         (WebKit::WebPage::setHeaderBannerHeightForTesting):
900         (WebKit::WebPage::setFooterBannerHeightForTesting):
901         * WebProcess/WebPage/mac/PageBannerMac.mm:
902         (WebKit::PageBanner::addToPage):
903         (WebKit::PageBanner::detachFromPage):
904         (WebKit::PageBanner::hide):
905
906 2019-02-03  Ryosuke Niwa  <rniwa@webkit.org>
907
908         Validate navigation policy decisions to avoid crashes in continueLoadAfterNavigationPolicy
909         https://bugs.webkit.org/show_bug.cgi?id=194189
910
911         Reviewed by Geoffrey Garen.
912
913         Pass the policy check identifier around functions and store it in PolicyDecisionSender
914         so that we can send it back to WebCore with the navigation policy decision.
915
916         We also store it in WebFrame in the case the policy decision had to be invalidated
917         before the decision was received (via WebFrame::invalidatePolicyListener).
918
919         * Scripts/webkit/messages.py:
920         * UIProcess/ProvisionalPageProxy.cpp:
921         (WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionAsync):
922         (WebKit::ProvisionalPageProxy::decidePolicyForResponse):
923         * UIProcess/ProvisionalPageProxy.h:
924         * UIProcess/WebPageProxy.cpp:
925         (WebKit::WebPageProxy::PolicyDecisionSender): Added PolicyCheckIdentifier as a member.
926         (WebKit::WebPageProxy::PolicyDecisionSender::create):
927         (WebKit::WebPageProxy::PolicyDecisionSender::send):
928         (WebKit::WebPageProxy::PolicyDecisionSender::PolicyDecisionSender):
929         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
930         (WebKit::WebPageProxy::decidePolicyForNavigationActionAsync):
931         (WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared):
932         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
933         (WebKit::WebPageProxy::decidePolicyForNavigationActionSync):
934         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
935         (WebKit::WebPageProxy::decidePolicyForResponse):
936         (WebKit::WebPageProxy::decidePolicyForResponseShared):
937         * UIProcess/WebPageProxy.h:
938         * UIProcess/WebPageProxy.messages.in:
939         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
940         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
941         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
942         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
943         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
944         * WebProcess/WebPage/WebFrame.cpp:
945         (WebKit::WebFrame::setUpPolicyListener):
946         (WebKit::WebFrame::invalidatePolicyListener):
947         (WebKit::WebFrame::didReceivePolicyDecision):
948         * WebProcess/WebPage/WebFrame.h:
949         * WebProcess/WebPage/WebPage.cpp:
950         (WebKit::WebPage::didReceivePolicyDecision):
951         * WebProcess/WebPage/WebPage.h:
952         * WebProcess/WebPage/WebPage.messages.in:
953
954 2019-02-03  Megan Gardner  <megan_gardner@apple.com>
955
956         Turn on Smart Paste
957         https://bugs.webkit.org/show_bug.cgi?id=193786
958
959         Reviewed by Ryosuke Niwa.
960
961         * Platform/spi/ios/UIKitSPI.h:
962         * UIProcess/ios/TextCheckerIOS.mm:
963         (WebKit::TextChecker::isSmartInsertDeleteEnabled):
964         Use the flag from UIKit to determine if smart copy paste should be
965         turned on.
966
967 2019-02-02  Simon Fraser  <simon.fraser@apple.com>
968
969         Tidy up data memebers of FrameView and related classes to shrink class sizes
970         https://bugs.webkit.org/show_bug.cgi?id=194197
971
972         Reviewed by Zalan Bujtas.
973
974         * UIProcess/PageClient.h: Declare enum size.
975
976 2018-12-16  Darin Adler  <darin@apple.com>
977
978         Convert additional String::format clients to alternative approaches
979         https://bugs.webkit.org/show_bug.cgi?id=192746
980
981         Reviewed by Alexey Proskuryakov.
982
983         * UIProcess/Cocoa/ViewGestureController.cpp:
984         (WebKit::ViewGestureController::SnapshotRemovalTracker::startWatchdog):
985         Use makeString and FormattedNumber.
986
987         * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
988         (WebKit::LocalAuthenticator::getAssertion): Added a comment about an
989         incorrect format specifier and left this code as is for now.
990
991 2019-02-01  David Kilzer  <ddkilzer@apple.com>
992
993         Move soft-linking of TelephonyUtilities.framework out of TUCallSPI.h
994         <https://webkit.org/b/193866>
995
996         Reviewed by Alex Christensen.
997
998         * Platform/mac/MenuUtilities.mm:
999         - Update for rename of TUCallSPI.h to TelephonyUtilitiesSPI.h.
1000         - Add soft-linking code formerly in TUCallSPI.h.
1001
1002 2019-02-01  Alex Christensen  <achristensen@webkit.org>
1003
1004         Move XPCService entry points from mac directory to new Cocoa directory
1005         https://bugs.webkit.org/show_bug.cgi?id=194129
1006
1007         Reviewed by Chris Dumez.
1008
1009         * Configurations/NetworkService.xcconfig:
1010         * Configurations/PluginService.64.xcconfig:
1011         * Configurations/WebContentService.xcconfig:
1012         * NetworkProcess/EntryPoint/Cocoa: Copied from Source/WebKit/NetworkProcess/EntryPoint/mac.
1013         * NetworkProcess/EntryPoint/mac: Removed.
1014         * PluginProcess/EntryPoint/Cocoa: Copied from Source/WebKit/PluginProcess/EntryPoint/mac.
1015         * PluginProcess/EntryPoint/mac: Removed.
1016         * Shared/EntryPointUtilities/Cocoa: Copied from Source/WebKit/Shared/EntryPointUtilities/mac.
1017         * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h:
1018         * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.mm:
1019         * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
1020         * Shared/EntryPointUtilities/mac: Removed.
1021         * SourcesCocoa.txt:
1022         * WebKit.xcodeproj/project.pbxproj:
1023         * WebProcess/EntryPoint/Cocoa: Copied from Source/WebKit/WebProcess/EntryPoint/mac.
1024         * WebProcess/EntryPoint/mac: Removed.
1025
1026 2019-02-01  Wenson Hsieh  <wenson_hsieh@apple.com>
1027
1028         [iOS] Consistent 1 sec hang when triggering modal alerts while handling synchronous touch events
1029         https://bugs.webkit.org/show_bug.cgi?id=194140
1030         <rdar://problem/47728098>
1031
1032         Reviewed by Tim Horton.
1033
1034         Currently, the UI process hangs when attempting to synchronously present modal UI from the web process while the
1035         UI process is waiting for sync IPC in the web process. While we have logic to generally mitigate IPC deadlock in
1036         this scenario by dispatching the web process' sync IPC immediately with the intention of allowing the web
1037         process to finish processing sync IPC (and consequently unblock the UI process), this fails in the case where
1038         the sync IPC message from the web process to the UI process requires main thread execution for an arbitrary
1039         amount of time (for instance, modal alert dialogs). In this case, we'll end up in a state where we've handled
1040         the web process' sync IPC in the UI process, yet we can't resume execution since the web process is still
1041         blocked.
1042
1043         By far the most egregious scenario in which this manifests is during synchronous gesture recognizer IPC, i.e.
1044         grabbing position information from the UI process, and handling touch events synchronously. Luckily, these are
1045         also cases where (1) we know sync IPC may safely time out, and (2) the presentation of modal UI from the web
1046         process should cause the gesture recognizers to fail anyways. As such, we can mitigate these scenarios in the
1047         web process by responding to the these pending sync IPC messages *before* sending our own sync IPC to the UI
1048         process.
1049
1050         Test: fast/events/touch/ios/show-modal-alert-during-touch-start.html
1051
1052         * Shared/ios/InteractionInformationAtPosition.h:
1053         (WebKit::InteractionInformationAtPosition::invalidInformation):
1054         * Shared/ios/InteractionInformationAtPosition.mm:
1055         (WebKit::InteractionInformationAtPosition::encode const):
1056         (WebKit::InteractionInformationAtPosition::decode):
1057
1058         Add a new flag to indicate whether an interaction information response can be valid. Interaction information
1059         cannot be valid in the case where the interaction information request was interrupted by certain sync IPC
1060         messages from the web process.
1061
1062         * UIProcess/API/C/WKContextConfigurationRef.cpp:
1063         (WKContextConfigurationIgnoreSynchronousMessagingTimeoutsForTesting):
1064         (WKContextConfigurationSetIgnoreSynchronousMessagingTimeoutsForTesting):
1065
1066         Add some testing SPI to ignore sync IPC timeouts, for the purposes of testing. Rather than use the existing
1067         Objective-C SPI in WKWebProcessPoolConfiguration, I decided to add C API plumbing for this flag, so that other
1068         non-Cocoa ports may also support the new layout test option to ignore sync IPC timeouts.
1069
1070         * UIProcess/API/C/WKContextConfigurationRef.h:
1071         * UIProcess/ios/WKContentViewInteraction.mm:
1072         (-[WKContentView ensurePositionInformationIsUpToDate:]):
1073         (-[WKContentView _positionInformationDidChange:]):
1074         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1075         (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
1076         (WebKit::WebChromeClient::runJavaScriptAlert):
1077         (WebKit::WebChromeClient::runJavaScriptConfirm):
1078         (WebKit::WebChromeClient::runJavaScriptPrompt):
1079         (WebKit::WebChromeClient::print):
1080         (WebKit::WebChromeClient::exceededDatabaseQuota):
1081         (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):
1082
1083         Cancel any pending sync IPC replies prior to sending sync IPC messages to the UI process which may result in
1084         sync IPC deadlock, by using the new helper method, sendSyncWithDelayedReply, instead of just sendSync.
1085
1086         * WebProcess/WebPage/WebPage.cpp:
1087         (WebKit::WebPage::cancelGesturesBlockedOnSynchronousReplies):
1088
1089         Add a helper to cancel pending sync messages coming in from the UI process that are being called from within
1090         gesture recognizer delegate hooks.
1091
1092         (WebKit::WebPage::touchEventSync):
1093         * WebProcess/WebPage/WebPage.h:
1094
1095         Add a new helper, sendSyncWithDelayedReply, to be used when sending a sync IPC message to the UI process that
1096         cannot be immediately completed upon arrival. Importantly, this cancels pending sync replies, and also passes
1097         IPC::SendSyncOption::InformPlatformProcessWillSuspend.
1098
1099         * WebProcess/WebPage/WebPage.messages.in:
1100
1101         Change these from LegacySync to Delayed messages.
1102
1103         * WebProcess/WebPage/ios/WebPageIOS.mm:
1104         (WebKit::WebPage::getPositionInformation):
1105
1106         Make this sync IPC handler (as well as WebPage::touchEventSync) store the IPC reply during the scope of the
1107         method, and invoke the stored reply at the end of the method if it wasn't interrupted due to something calling
1108         cancelGesturesBlockedOnSynchronousReplies().
1109
1110         (WebKit::WebPage::positionInformation):
1111
1112         Refactor getPositionInformation by pulling out the logic for building an InteractionInformationAtPosition into
1113         a separate helper.
1114
1115         (WebKit::WebPage::requestPositionInformation):
1116
1117 2019-02-01  David Quesada  <david_quesada@apple.com>
1118
1119         Network Process crash when resuming downloads: '-[__NSDictionaryI setObject:forKey:]: unrecognized selector sent to instance %p'
1120         https://bugs.webkit.org/show_bug.cgi?id=194144
1121         rdar://problem/47553456
1122
1123         Reviewed by Geoffrey Garen.
1124
1125         * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
1126         (WebKit::Download::resume):
1127             Make a mutable copy of the root object decoded from the resume data.
1128             It might have been originally encoded as an immutable dictionary.
1129
1130 2019-02-01  Chris Dumez  <cdumez@apple.com>
1131
1132         REGRESSION: Flaky ASSERTION FAILED: m_uncommittedState.state == State::Committed on http/tests/cookies/same-site/fetch-after-top-level-navigation-initiated-from-iframe-in-cross-origin-page.html
1133         https://bugs.webkit.org/show_bug.cgi?id=193740
1134         <rdar://problem/47527267>
1135
1136         Reviewed by Alex Christensen.
1137
1138         The issue was happening when the page is triggering a cross-site navigation while in the middle of parsing. This would cause us to
1139         start a new provisional load in a new process before the previous process sends the DidFinishLoadForFrame() IPC to the UIProcess.
1140         Getting such IPC after a provisional load has started would mess up our state machine and trip assertions.
1141
1142         This patch restores non-PSON behavior which is that the previous load in the old process now gets stopped so that no DidFinishLoadForFrame()
1143         / DidFailLoadForFrame() gets sent. To achieve this behavior, I introduced a new "StopAllLoads" PolicyAction that we now send the old
1144         process when the load is continuing in a new process, instead of sending it "Ignore".
1145
1146         * NetworkProcess/NetworkDataTaskBlob.cpp:
1147         (WebKit::NetworkDataTaskBlob::dispatchDidReceiveResponse):
1148         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1149         (toNSURLSessionResponseDisposition):
1150         * UIProcess/WebPageProxy.cpp:
1151         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
1152
1153 2019-02-01  Jer Noble  <jer.noble@apple.com>
1154
1155         Unreviewed build fix; Respect the 'condition:' field in the WebPreferences.yaml when generating
1156         WebPreferencesStoreDefaultsMap.cpp.
1157
1158         * page/SettingsBase.h:
1159
1160 2019-02-01  Antoine Quint  <graouts@apple.com>
1161
1162         Dispatch pointercancel events when content is panned or zoomed on iOS
1163         https://bugs.webkit.org/show_bug.cgi?id=193962
1164         <rdar://problem/47629134>
1165
1166         Reviewed by Dean Jackson.
1167
1168         When a user-agent-provided interaction, such as panning or zooming on iOS, uses a set of touches, we should dispatch a pointercancel
1169         event for the pointer ids of the touches involved. To facilitate this, we add a new method on WKContentView to cancel all the pointers
1170         matching active touches for a provided UIGestureRecognizer through an async IPC call into the Web process using the new method
1171         PointerCaptureController::cancelPointer().
1172
1173         * Platform/spi/ios/UIKitSPI.h: Add the necessary forward declaration for a necessary UIKit SPI allowing us to get the set of last-seen
1174         UITouches by the identifier generated for the matching WebKit touch.
1175         * UIProcess/API/Cocoa/WKWebView.mm:
1176         (-[WKWebView scrollViewWillBeginZooming:withView:]): Dispatch touchcancel events for all pointers involved in a pinch gesture on the
1177         top-level UIScrollView.
1178         (-[WKWebView _scrollView:adjustedOffsetForOffset:translation:startPoint:locationInView:horizontalVelocity:verticalVelocity:]): Dispatch
1179         touchcancel events for all pointers involved in a pan gesture on the top-level UIScrollView. We can infer this by looking at whether the
1180         adjusted content offset, after accounting for the permitted touch actions, is different from the original content offset.
1181         * UIProcess/PageClient.h: Expose a new virtual cancelPointersForGestureRecognizer() method which will allow the iOS implementation to
1182         forward the call to WKContentViewInteraction.
1183         (WebKit::PageClient::cancelPointersForGestureRecognizer):
1184         * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h: Expose the WebPageProxy such that we may access it to cancel pointers for
1185         a given gesture recognizer from within ScrollingTreeScrollingNodeDelegateIOS.
1186         (WebKit::RemoteScrollingCoordinatorProxy::webPageProxy const):
1187         * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h:
1188         * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
1189         (-[WKScrollingNodeScrollViewDelegate _scrollView:adjustedOffsetForOffset:translation:startPoint:locationInView:horizontalVelocity:verticalVelocity:]):
1190         Dispatch touchcancel events for all pointers involved in a pan gesture on a nested UIScrollView. We can infer this by looking at
1191         whether the adjusted content offset, after accounting for the permitted touch actions, is different from the original content offset.
1192         (-[WKScrollingNodeScrollViewDelegate scrollViewWillBeginZooming:withView:]): Dispatch touchcancel events for all pointers involved in a
1193         pinch gesture on a nested UIScrollView.
1194         (-[WKScrollingNodeScrollViewDelegate cancelPointersForGestureRecognizer:]):
1195         (WebKit::ScrollingTreeScrollingNodeDelegateIOS::cancelPointersForGestureRecognizer):
1196         * UIProcess/WebPageProxy.cpp:
1197         (WebKit::WebPageProxy::cancelPointer):
1198         * UIProcess/WebPageProxy.h:
1199         * UIProcess/ios/PageClientImplIOS.h:
1200         * UIProcess/ios/PageClientImplIOS.mm:
1201         (WebKit::PageClientImpl::cancelPointersForGestureRecognizer):
1202         * UIProcess/ios/WKContentViewInteraction.h:
1203         * UIProcess/ios/WKContentViewInteraction.mm:
1204         (-[WKContentView cancelPointersForGestureRecognizer:]): Obtain all active UITouch objects for the view and dispatch a pointercancel event,
1205         through the WebPageProxy, for all touches associated with the provided gesture recognizer.
1206         * WebProcess/WebPage/WebPage.cpp:
1207         (WebKit::WebPage::cancelPointer):
1208         * WebProcess/WebPage/WebPage.h:
1209         * WebProcess/WebPage/WebPage.messages.in:
1210
1211 2019-02-01  Jer Noble  <jer.noble@apple.com>
1212
1213         Make the WebKit default for media source based on the WebCore default.
1214         https://bugs.webkit.org/show_bug.cgi?id=194172
1215
1216         Reviewed by Eric Carlson.
1217
1218         * Shared/WebPreferences.yaml:
1219         * UIProcess/API/Cocoa/WKPreferences.mm:
1220         (-[WKPreferences _setMediaSourceEnabled:]):
1221         (-[WKPreferences _mediaSourceEnabled]):
1222         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1223
1224 2019-02-01  Simon Fraser  <simon.fraser@apple.com>
1225
1226         Force settings.acceleratedCompositingEnabled() to true for WebKit
1227         https://bugs.webkit.org/show_bug.cgi?id=194166
1228         rdar://problem/47694328
1229
1230         Reviewed by Tim Horton.
1231
1232         WebKit relies on accelerated compositing for its drawing areas to function correctly,
1233         and sometimes clients (*cough* Safari *cough*) have bugs where they clobber the settings,
1234         so force this setting to be always on (and release log if this happens).
1235
1236         * WebProcess/WebPage/WebPage.cpp:
1237         (WebKit::WebPage::updatePreferences):
1238
1239 2019-02-01  Antti Koivisto  <antti@apple.com>
1240
1241         Don't use base layer() as the scroll layer in scrolling tree.
1242         https://bugs.webkit.org/show_bug.cgi?id=194160
1243
1244         Reviewed by Simon Fraser.
1245
1246         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
1247         (ArgumentCoder<ScrollingStateNode>::encode):
1248         (ArgumentCoder<ScrollingStateNode>::decode):
1249         (ArgumentCoder<ScrollingStateScrollingNode>::encode):
1250         (ArgumentCoder<ScrollingStateScrollingNode>::decode):
1251         (WebKit::dump):
1252         * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
1253         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
1254         * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
1255         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
1256         * UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm:
1257         (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateBeforeChildren):
1258         * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
1259         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateBeforeChildren):
1260         * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
1261         (WebKit::ScrollingTreeScrollingNodeDelegateIOS::commitStateBeforeChildren):
1262         (WebKit::ScrollingTreeScrollingNodeDelegateIOS::commitStateAfterChildren):
1263
1264 2019-02-01  Michael Catanzaro  <mcatanzaro@igalia.com>
1265
1266         [SOUP] Improve use of SoupCookiePersistentStorageType
1267         https://bugs.webkit.org/show_bug.cgi?id=194103
1268
1269         Reviewed by Carlos Garcia Campos.
1270
1271         Turn it into an enum class, and stop casting it to and from uint32_t.
1272
1273         * NetworkProcess/Cookies/WebCookieManager.h:
1274         * NetworkProcess/Cookies/WebCookieManager.messages.in:
1275         * NetworkProcess/Cookies/soup/WebCookieManagerSoup.cpp:
1276         (WebKit::WebCookieManager::setCookiePersistentStorage):
1277         * NetworkProcess/NetworkSessionCreationParameters.cpp:
1278         (WebKit::NetworkSessionCreationParameters::privateSessionParameters):
1279         (WebKit::NetworkSessionCreationParameters::decode):
1280         * NetworkProcess/NetworkSessionCreationParameters.h:
1281         * Shared/soup/SoupCookiePersistentStorageType.h:
1282         (): Deleted.
1283         * UIProcess/API/glib/WebKitCookieManager.cpp:
1284         * UIProcess/WebCookieManagerProxy.h:
1285         * UIProcess/soup/WebCookieManagerProxySoup.cpp:
1286         (WebKit::WebCookieManagerProxy::setCookiePersistentStorage):
1287         (WebKit::WebCookieManagerProxy::getCookiePersistentStorage const):
1288
1289 2019-02-01  Per Arne Vollan  <pvollan@apple.com>
1290
1291         [macOS] Revert parts of r240811, since it causes kernel panics.
1292         https://bugs.webkit.org/show_bug.cgi?id=194061
1293
1294         Unreviewed crash fix.
1295
1296         * WebProcess/com.apple.WebProcess.sb.in:
1297
1298 2019-02-01  Michael Catanzaro  <mcatanzaro@igalia.com>
1299
1300         [SOUP] Improve use of PAL::SessionID in WebKitCookieManager
1301         https://bugs.webkit.org/show_bug.cgi?id=194092
1302
1303         Reviewed by Carlos Garcia Campos.
1304
1305         Always get it from the data store instead of assuming the default session ID, and add a
1306         helper function for this.
1307
1308         * UIProcess/API/glib/WebKitCookieManager.cpp:
1309         (_WebKitCookieManagerPrivate::sessionID const):
1310         (_WebKitCookieManagerPrivate::~_WebKitCookieManagerPrivate):
1311         (webkitCookieManagerCreate):
1312         (webkit_cookie_manager_set_persistent_storage):
1313         (webkit_cookie_manager_set_accept_policy):
1314         (webkit_cookie_manager_get_accept_policy):
1315         (webkit_cookie_manager_add_cookie):
1316         (webkit_cookie_manager_get_cookies):
1317         (webkit_cookie_manager_delete_cookie):
1318
1319 2019-01-31  Takashi Komori  <Takashi.Komori@sony.com>
1320
1321         [Curl] Remove unnecessary member from NetworkStorageSession.
1322         https://bugs.webkit.org/show_bug.cgi?id=194137
1323
1324         Reviewed by Don Olmstead.
1325
1326         * NetworkProcess/curl/NetworkProcessCurl.cpp:
1327         (WebKit::NetworkProcess::platformCreateDefaultStorageSession const):
1328
1329 2019-01-31  Jiewen Tan  <jiewen_tan@apple.com>
1330
1331         Unreviewed, build fix after r240805
1332
1333         This patch reverts the BlockPtr change since it breaks iOS builds.
1334
1335         * UIProcess/Cocoa/NavigationState.mm:
1336         (WebKit::tryInterceptNavigation):
1337
1338 2019-01-31  Chris Dumez  <cdumez@apple.com>
1339
1340         Page zoom level is lost after a process swap or a crash
1341         https://bugs.webkit.org/show_bug.cgi?id=194105
1342         <rdar://problem/47610781>
1343
1344         Reviewed by Alex Christensen.
1345
1346         Previously, when the client would call setPageAndTextZoomFactors() on the WebPageProxy,
1347         we would update the WebPageProxy's corresponding data members and send an IPC to the
1348         WebProcess to apply the zoom factors.
1349
1350         The issue is that on process crash or process-swap, we never communicate those zoom factors
1351         to the new WebProcess. Even if the client were to call setPageAndTextZoomFactors() with
1352         the same factors again, it would be a no-op since the WebPageProxy's data members already
1353         reflect the expected values.
1354
1355         To address the issue, pass both the page zoom and the text zoom factors to the WebProcess
1356         via WebPageCreationParameters. This way, there is no need to send an extra IPC and we're
1357         sure the WebPageProxy's factors are properly applied to the WebPage on WebContent process
1358         side upon creation (whether after a crash or a process swap).
1359
1360         * Shared/WebPageCreationParameters.cpp:
1361         (WebKit::WebPageCreationParameters::encode const):
1362         (WebKit::WebPageCreationParameters::decode):
1363         * Shared/WebPageCreationParameters.h:
1364         * UIProcess/WebPageProxy.cpp:
1365         (WebKit::WebPageProxy::creationParameters):
1366         * WebProcess/WebPage/WebPage.cpp:
1367
1368 2019-01-31  Per Arne Vollan  <pvollan@apple.com>
1369
1370         [macOS] Disable permissive call logging in sandbox
1371         https://bugs.webkit.org/show_bug.cgi?id=194061
1372
1373         Reviewed by Alexey Proskuryakov.
1374
1375         Strict call filtering should be reenabled.
1376
1377         * WebProcess/com.apple.WebProcess.sb.in:
1378
1379 2019-01-31  Per Arne Vollan  <pvollan@apple.com>
1380
1381         [macOS] Crash when control-clicking or copying text rendered with a web font
1382         https://bugs.webkit.org/show_bug.cgi?id=193913
1383         <rdar://problem/47541039>
1384
1385         Reviewed by Brent Fulgham.
1386
1387         On older versions of macOS, allowing mach lookup to com.apple.FontObjectsServer is needed.
1388
1389         * WebProcess/com.apple.WebProcess.sb.in:
1390
1391 2019-01-31  Benjamin Poulain  <benjamin@webkit.org>
1392
1393         Remove WKPageIsWebProcessResponsive
1394         https://bugs.webkit.org/show_bug.cgi?id=194096
1395
1396         Reviewed by Alex Christensen.
1397
1398         It is not used by any client.
1399
1400         It is also bad API. It is better to let WebKit track
1401         responsiveness and tell the client with processDidBecomeResponsive.
1402
1403         * UIProcess/API/C/WKPage.cpp:
1404         (WKPageIsWebProcessResponsive): Deleted.
1405         * UIProcess/API/C/WKPagePrivate.h:
1406         * UIProcess/WebPageProxy.cpp:
1407         (WebKit::WebPageProxy::isWebProcessResponsive): Deleted.
1408         * UIProcess/WebPageProxy.h:
1409
1410 2019-01-31  Alex Christensen  <achristensen@webkit.org>
1411
1412         Revert r238819 which is unneeded and caused a performance regression.
1413         https://bugs.webkit.org/show_bug.cgi?id=192272
1414         <rdar://problem/46664625>
1415
1416         * WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h:
1417         (API::InjectedBundle::PageLoaderClient::didStartProvisionalLoadForFrame):
1418         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
1419         * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
1420         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1421         (PageLoaderClient::didStartProvisionalLoadForFrame):
1422         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1423         (WebKit::InjectedBundlePageLoaderClient::didStartProvisionalLoadForFrame):
1424         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
1425         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1426         (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
1427         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1428
1429 2019-01-31  Jiewen Tan  <jiewen_tan@apple.com>
1430
1431         Formalize WebKitAdditions mechanism of LoadOptimizer
1432         https://bugs.webkit.org/show_bug.cgi?id=193886
1433         <rdar://problem/47696809>
1434
1435         Reviewed by Brent Fulgham.
1436
1437         This patch does the following few things:
1438         1) formalizes WebKitAdditions mechanism of LoadOptimizer;
1439         2) modernizes AppLinks code in tryInterceptNavigation to use BlockPtr;
1440         3) lets AppLinks have higher precedence than LoadOptimizer.
1441
1442         * SourcesCocoa.txt:
1443         * UIProcess/Cocoa/LoadOptimizer.h: Removed.
1444         * UIProcess/Cocoa/LoadOptimizer.mm: Removed.
1445         * UIProcess/Cocoa/NavigationState.mm:
1446         (WebKit::tryOptimizingLoad):
1447         (WebKit::tryInterceptNavigation):
1448         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1449         (WebKit::WebsiteDataStore::WebsiteDataStore):
1450         * UIProcess/WebsiteData/WebsiteDataStore.h:
1451         (WebKit::WebsiteDataStore::loadOptimizer): Deleted.
1452         * WebKit.xcodeproj/project.pbxproj:
1453
1454 2019-01-31  Chris Dumez  <cdumez@apple.com>
1455
1456         Regression(PSON) Crash under WebProcessProxy::canTerminateChildProcess()
1457         https://bugs.webkit.org/show_bug.cgi?id=194094
1458         <rdar://problem/47580753>
1459
1460         Reviewed by Ryosuke Niwa.
1461
1462         If a SuspendedPageProxy gets destroyed while a WebPageProxy is waiting for its to finish to suspend,
1463         call the "failure to suspend" completion handler asynchronously instead of synchronouly to make sure
1464         the completion handler cannot try and use the suspended page proxy while it is being destroyed.
1465
1466         * UIProcess/SuspendedPageProxy.cpp:
1467         (WebKit::SuspendedPageProxy::~SuspendedPageProxy):
1468
1469 2019-01-31  Timothy Hatcher  <timothy@apple.com>
1470
1471         Fix LSAppLink deprecation warnings.
1472         https://bugs.webkit.org/show_bug.cgi?id=194097
1473
1474         Unreviewed build fix.
1475
1476         * UIProcess/ios/WKActionSheetAssistant.mm:
1477         (-[WKActionSheetAssistant _appendOpenActionsForURL:actions:elementInfo:]):
1478
1479 2019-01-30  Simon Fraser  <simon.fraser@apple.com>
1480
1481         [Mac] Implement basic hit testing in the scrolling tree
1482         https://bugs.webkit.org/show_bug.cgi?id=172917
1483         <rdar://problem/34215516>
1484
1485         Reviewed by Antti Koivisto.
1486
1487         Changed return types, "using namespace WebCore" in ScrollingTreeFrameScrollingNodeRemoteMac.cpp.
1488
1489         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
1490         (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
1491         * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
1492         * UIProcess/RemoteLayerTree/mac/ScrollerPairMac.h:
1493         * UIProcess/RemoteLayerTree/mac/ScrollerPairMac.mm:
1494         (WebKit::ScrollerPairMac::handleWheelEvent):
1495         (WebKit::ScrollerPairMac::handleMouseEvent):
1496         * UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.cpp:
1497         (WebKit::ScrollingTreeFrameScrollingNodeRemoteMac::handleWheelEvent):
1498         (WebKit::ScrollingTreeFrameScrollingNodeRemoteMac::handleMouseEvent):
1499         * UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.h:
1500
1501 2019-01-31  Michael Catanzaro  <mcatanzaro@igalia.com>
1502
1503         [SOUP] Move cookiePersistentStoragePath and cookiePersistentStorageType from NetworkProcess to NetworkSession
1504         https://bugs.webkit.org/show_bug.cgi?id=194075
1505
1506         Reviewed by Alex Christensen.
1507
1508         Move cookiePersistentStoragePath and cookiePersistentStorageType from NetworkProcess to
1509         NetworkSession to reduce globals. This removes two of the six soup-specific variables in
1510         NetworkProcessCreationParameters
1511
1512         * NetworkProcess/Cookies/WebCookieManager.h:
1513         * NetworkProcess/Cookies/WebCookieManager.messages.in:
1514         * NetworkProcess/Cookies/soup/WebCookieManagerSoup.cpp:
1515         (WebKit::WebCookieManager::setCookiePersistentStorage):
1516         * NetworkProcess/NetworkProcessCreationParameters.cpp:
1517         (WebKit::NetworkProcessCreationParameters::encode const):
1518         (WebKit::NetworkProcessCreationParameters::decode):
1519         * NetworkProcess/NetworkProcessCreationParameters.h:
1520         * NetworkProcess/NetworkSessionCreationParameters.cpp:
1521         (WebKit::NetworkSessionCreationParameters::privateSessionParameters):
1522         (WebKit::NetworkSessionCreationParameters::encode const):
1523         (WebKit::NetworkSessionCreationParameters::decode):
1524         * NetworkProcess/NetworkSessionCreationParameters.h:
1525         * NetworkProcess/soup/NetworkProcessSoup.cpp:
1526         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
1527         * NetworkProcess/soup/NetworkSessionSoup.cpp:
1528         (WebKit::NetworkSessionSoup::NetworkSessionSoup):
1529         * SourcesGTK.txt:
1530         * SourcesWPE.txt:
1531         * UIProcess/API/glib/WebKitCookieManager.cpp:
1532         (webkit_cookie_manager_set_persistent_storage):
1533         * UIProcess/WebCookieManagerProxy.cpp:
1534         (WebKit::WebCookieManagerProxy::WebCookieManagerProxy):
1535         * UIProcess/WebCookieManagerProxy.h:
1536         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1537         (WebKit::WebsiteDataStore::parameters):
1538         * UIProcess/WebsiteData/WebsiteDataStore.h:
1539         * UIProcess/WebsiteData/curl/WebsiteDataStoreCurl.cpp:
1540         (WebKit::WebsiteDataStore::platformSetNetworkParameters):
1541         (WebKit::WebsiteDataStore::platformSetParameters): Deleted.
1542         * UIProcess/soup/WebCookieManagerProxySoup.cpp:
1543         (WebKit::WebCookieManagerProxy::setCookiePersistentStorage):
1544         (WebKit::WebCookieManagerProxy::getCookiePersistentStorage const):
1545         * UIProcess/soup/WebProcessPoolSoup.cpp:
1546         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
1547
1548 2019-01-31  Ryosuke Niwa  <rniwa@webkit.org>
1549
1550         iOS: Crash in InteractiveUpdateHandler set by ViewGestureController::beginSwipeGesture
1551         https://bugs.webkit.org/show_bug.cgi?id=194083
1552
1553         Reviewed by Tim Horton.
1554
1555         We think this crash is a regression from r236966. Prior to r236966, we could only called
1556         removeSwipeSnapshot() only when m_provisionalOrSameDocumentLoadCallback was set but now
1557         we can call it either when m_snapshotRemovalTracker::start was called, or it had been reset.
1558         This can result in m_webPageProxyForBackForwardListForCurrentSwipe getting cleared before
1559         InteractiveUpdateHandler is called by UIGestureRecognizer, resulting in the crash.
1560
1561         This patch tries to restore the behavior prior to r236966 by only invoking removeSwipeSnapshot()
1562         when SnapshotRemovalTracker has a valid removal callback set.
1563
1564         Unfortunately no new tests since there is no reproducible test case, and neither API tests
1565         nor layout tests seem to have the capability to trigger swipe gestures via UIGestureRecognizer,
1566         which is required for this crash to occur. Notably, back-forward swipe tests I enabled in
1567         r240765 bypass UIKit and emulates the action instead.
1568
1569         * UIProcess/Cocoa/ViewGestureController.cpp:
1570         (WebKit::ViewGestureController::didReachMainFrameLoadTerminalState):
1571         * UIProcess/Cocoa/ViewGestureController.h:
1572         (WebKit::ViewGestureController::SnapshotRemovalTracker::hasRemovalCallback const):
1573
1574 2019-01-30  Benjamin Poulain  <benjamin@webkit.org>
1575
1576         <rdar://problem/47570443> Responsiveness timers are too expensive for frequent events
1577         https://bugs.webkit.org/show_bug.cgi?id=194003
1578
1579         Reviewed by Geoffrey Garen.
1580
1581         The problem here is specific to wheel events.
1582
1583         For every wheel event, we start a responsiveness timer and send
1584         a ping to the WebProcess. When the WebProcess respond, we stop the timer.
1585
1586         The cost of setting up the timers adds up since we get many events.
1587
1588         The first step to improve the situation was to switch ResponsivenessTimer
1589         to WebCore::Timer. Since WebCore::Timer reuse the same CFRunLoopTimerRef,
1590         we save the allocation/deallocation, insertion in the event loop, etc.
1591
1592         Using WebCore::Timer saves some instructions but we were still hitting
1593         the kernel at 120hz to set up then kill each timer.
1594         The second improvement of the patch is to avoid that by not killing the timer
1595         when we hear back from the WebProcess.
1596
1597         Instead of killing the timer, we let it run and ignore the result.
1598         When the next event comes, we reschedule the existing timer.
1599         This brings down the timers to 60Hz, the same rate as the events.
1600
1601         The very last event does time out. In that case, we have a bad idle wake up:
1602         we wake up a sleeping CPU do do nothing.
1603         In the case of wheel events, this is fine since we saved a bunch of CPU already.
1604         For all the other cases, I kept the normal operating mode to avoid the idle wake.
1605
1606         * UIProcess/ResponsivenessTimer.cpp:
1607         (WebKit::ResponsivenessTimer::ResponsivenessTimer):
1608         (WebKit::ResponsivenessTimer::invalidate):
1609         (WebKit::ResponsivenessTimer::timerFired):
1610         (WebKit::ResponsivenessTimer::start):
1611         (WebKit::ResponsivenessTimer::startWithLazyStop):
1612         (WebKit::ResponsivenessTimer::stop):
1613         (WebKit::ResponsivenessTimer::processTerminated):
1614         (WebKit::ResponsivenessTimer::~ResponsivenessTimer): Deleted.
1615         * UIProcess/ResponsivenessTimer.h:
1616         * UIProcess/WebPageProxy.cpp:
1617         (WebKit::WebPageProxy::sendWheelEvent):
1618         * UIProcess/WebProcessProxy.cpp:
1619         (WebKit::WebProcessProxy::isResponsiveWithLazyStop):
1620         * UIProcess/WebProcessProxy.h:
1621
1622 2019-01-30  Daniel Bates  <dabates@apple.com>
1623
1624         [iOS] REGRESSION (r238635): Text area fails to re-focus after dismissal of keyboard on support.apple.com
1625         https://bugs.webkit.org/show_bug.cgi?id=193987
1626         <rdar://problem/47230785>
1627
1628         Reviewed by Tim Horton.
1629
1630         It is unnecessary to relinquish first responder status when a user explicitly dismissing
1631         the keyboard. Moreover, doing so prevents key commands from being intercepted when a
1632         hardware keyboard is subsequently attached.
1633         
1634         Following r238635 a page becomes focused (accepting of keyboard input) and defocused
1635         when the WKContentView becomes first responder and resigns first responder, respectively.
1636         When a user explicitly dismisses the keyboard by tapping Done (iPhone) or the hide keyboard
1637         button (iPad) then UIKit tells WKContentView to resign its first responder status only
1638         to make its superview, WKWebView, first responder. When a person subsequently taps on the
1639         page again, the WKContentView requests to become the first responder. However changes to
1640         page focus are not guaranteed to be sent to the WebProcess immediately (WebPageProxy::activityStateDidChange()
1641         will schedule an update). In particular, they are not guaranteed to be sent before the
1642         WebProcess is told about a tap. Therefore, the WebProcess has out-of-date information on
1643         focus state of the page. Instead we should detect when WKWebView is being asked to resign
1644         as a result of the keyboard dismissal and refuse the request, taking care to end the current
1645         editing session, blur the focused element, and dismiss the on-screen keyboard.
1646
1647         * Platform/spi/ios/UIKitSPI.h: Expose some SPI.
1648         * UIProcess/ios/WKContentViewInteraction.h:
1649         * UIProcess/ios/WKContentViewInteraction.mm:
1650         (-[WKContentView setupInteraction]): Register to receive notifications whenever a user
1651         explicitly dismisses the keyboard.
1652         (-[WKContentView resignFirstResponderForWebView]): If we are being asked to resign as a
1653         result of a user explicitly dismissing the keyboard then refuse to resign.
1654         (-[WKContentView _keyboardDidRequestDismissal:]): Update state, if applicable.
1655
1656 2019-01-30  Keith Rollin  <krollin@apple.com>
1657
1658         Add default constructor for NetworkActivityTracker
1659         https://bugs.webkit.org/show_bug.cgi?id=194058
1660         <rdar://problem/47685457>
1661
1662         Reviewed by Chris Dumez.
1663
1664         ResourceNetworkActivityTracker has a default constructor. It also has
1665         a NetworkActivityTracker data member, which does not have a default
1666         constructor. This will cause some compilers to complain -- they can't
1667         default-create a ResourceNetworkActivityTracker because they can't
1668         default-create its data members. Address this by adding a default
1669         constructor for NetworkActivityTracker.
1670
1671         * NetworkProcess/NetworkActivityTracker.h:
1672
1673 2019-01-30  Daniel Steffen  <dsteffen@apple.com>
1674
1675         <rdar://problem/29471922> Safari should switch from the legacy denap SPI to handling vouchers
1676         https://bugs.webkit.org/show_bug.cgi?id=193992
1677
1678         Reviewed by Geoffrey Garen.
1679
1680         The denap SPI is deprecated.
1681         The new way of staying out of AppNap is through a voucher.
1682
1683         * Platform/IPC/mac/ConnectionMac.mm:
1684         (IPC::readFromMachPort):
1685         * Platform/IPC/mac/ImportanceAssertion.h:
1686         (IPC::ImportanceAssertion::ImportanceAssertion):
1687         (IPC::ImportanceAssertion::~ImportanceAssertion):
1688
1689 2019-01-30  Chris Dumez  <cdumez@apple.com>
1690
1691         Fix crashes when trying to ref the CallbackAggregator in NetworkProcess
1692         https://bugs.webkit.org/show_bug.cgi?id=194054
1693
1694         Reviewed by Brent Fulgham.
1695
1696         The callback aggregators should be ThreadSafeRefCounted since they are passed to other threads.
1697
1698         * NetworkProcess/NetworkProcess.cpp:
1699         (WebKit::NetworkProcess::fetchWebsiteData):
1700         (WebKit::NetworkProcess::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores):
1701         (WebKit::NetworkProcess::topPrivatelyControlledDomainsWithWebsiteData):
1702
1703 2019-01-30  Daniel Bates  <dabates@apple.com>
1704
1705         [iOS] Keyups for non-modifier keys identified as "Dead" when not focused in a content-editable element
1706         https://bugs.webkit.org/show_bug.cgi?id=192824
1707         <rdar://problem/47100332>
1708
1709         Reviewed by Wenson Hsieh.
1710
1711         Use the same code path for key events to editable elements and non-editable elements.
1712
1713         Currently we have different code paths for hardware key events depending on whether the active element
1714         is editable or non-editable. Historically to support dispatching DOM keyboard events for hardware key
1715         presses this differentiation was a necessary workaround for UIKit's event processing precedence of
1716         interpreting key events for system text editing commands and app commands before dispatching unhandled
1717         key events to WebKit. This workaround intercepted raw key UIEvents and manually reconstructed a
1718         WebEvent from it. However there is not enough information in an UIEvent to reconstruct a WebEvent that
1719         is identical to the WebEvent that UIKit would have dispatched. In particular, keyup UIEvents always have
1720         empty modified and unmodified input strings. The UIKit keyboard machinery maintains additional state
1721         that is necessary to manufacture the correct WebEvent corresponding to a UIEvent.
1722
1723         As a side benefit of this change, with the exception of modifier flag changes, both hardware and software
1724         key events use the same code path.
1725
1726         * UIProcess/ios/WKContentViewInteraction.h:
1727         * UIProcess/ios/WKContentViewInteraction.mm:
1728         (-[WKContentView shouldShowAutomaticKeyboardUI]): Extracted code from _requiresKeyboardWhenFirstResponder
1729         (-[WKContentView _disableAutomaticKeyboardUI]): Implement UIKit SPI to prevent showing the keyboard UI
1730         when there is no focused element now that we are no longer intercepting key UIEvents. Formerly the
1731         keyboard UI was disabled as a side effect of not becoming first responder when there was no focused
1732         element (by returning NO in -_requiresKeyboardWhenFirstResponder).
1733         (-[WKContentView _requiresKeyboardWhenFirstResponder]): Always return YES when building with USE(UIKIT_KEYBOARD_ADDITIONS)
1734         so that we always accept key events. Instead of selectively replying to create a keyboard as a means of
1735         hiding the automatic keyboard UI we now implement _disableAutomaticKeyboardUI to selectively hide the
1736         automatic keyboard UI.
1737         (-[WKContentView textInputTraits]): Do not update traits when the keyboard is going to be dismissed
1738         now that we require a keyboard when first responder even if the focused element is non-editable.
1739         (-[WKContentView _didHandleKeyEvent:eventWasHandled:]): Skip logic for re-sending UIEvents to UIKit
1740         as UIKit now processes the event first. This logic was necessary in order to finally allow UIKit
1741         its chance to interpret the UIEvent, we intercepted, for app key commands.
1742         (-[WKContentView _elementDidBlur]): Call [self _endEditing] so that we dismiss any open form controls
1743         (e.g. a <select> popover menu). Currently this happens either by -_requiresKeyboardWhenFirstResponder
1744         responding NO when switching to another field or pressing Tab or Shift + Tab key command, which we will
1745         no longer use when building with USE(UIKIT_KEYBOARD_ADDITIONS) once I land <https://bugs.webkit.org/show_bug.cgi?id=193048>.
1746         * UIProcess/ios/forms/WKFormSelectPopover.mm:
1747         (-[WKSelectPopover initWithView:hasGroups:]): Do not assign ourself as the keyboard delegate. Otherwise,
1748         type ahead and tab cycling will not work. Currently type ahead and tab cycling work by using the non-
1749         editable code path via -_handleKeyUIEvent. Now that we no longer differentiate between key events for
1750         editable and non-editable elements we need to ensure that the WKContentView is the keyboard delegate
1751         when the popover is presented.
1752
1753 2019-01-30  Per Arne Vollan  <pvollan@apple.com>
1754
1755         [macOS] Sandbox fails to compile on 10.12
1756         https://bugs.webkit.org/show_bug.cgi?id=194035
1757         <rdar://problem/47651260>
1758
1759         Reviewed by Brent Fulgham.
1760
1761         This was caused by the commit <https://trac.webkit.org/changeset/239994>, which is only valid for
1762         10.14 and later.
1763
1764         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
1765         * WebProcess/com.apple.WebProcess.sb.in:
1766
1767 2019-01-29  Conrad Shultz  <conrad_shultz@apple.com>
1768
1769         Ensure image picker sourceType is set before cameraDevice
1770         https://bugs.webkit.org/show_bug.cgi?id=193998
1771
1772         Reviewed by Beth Dakin.
1773
1774         * UIProcess/ios/forms/WKFileUploadPanel.mm:
1775         (-[WKFileUploadPanel _showPhotoPickerWithSourceType:]):
1776
1777 2019-01-30  Chris Dumez  <cdumez@apple.com>
1778
1779         Regression(PSON) Load hang can occur on history navigation
1780         https://bugs.webkit.org/show_bug.cgi?id=194030
1781         <rdar://problem/47656939>
1782
1783         Reviewed by Antti Koivisto.
1784
1785         We do not support having more than one WebPage in a WebProcess with the same page ID. As a result,
1786         if we decide to reuse an existing process on process-swap, we need to make sure that we either use
1787         its suspended page (when possible, meaning that it is for the right HistoryItem / page) or we need
1788         make sure we drop the existing suspended page for this process / pagePID combination, so that the
1789         WebPage on WebProcess side gets closed before we attempt to do the new load.
1790
1791         We were doing this correctly in 2 places in WebProcessPool::processForNavigationInternal() but failed
1792         to do so in a third place, when doing back to a HistoryItem which does not have a SuspendedPage but
1793         whose process is still alive (presumably because it is kept alive by another suspended page). This
1794         patch fixes this third place to remove any suspended page in the process for the current page before
1795         reusing the process. An assertion was also added to the call site in
1796         WebPageProxy::receivedNavigationPolicyDecision() to make sure we catch this more easily in the
1797         future.
1798
1799         * UIProcess/WebPageProxy.cpp:
1800         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
1801         * UIProcess/WebProcessPool.cpp:
1802         (WebKit::WebProcessPool::processForNavigationInternal):
1803         (WebKit::WebProcessPool::removeAllSuspendedPagesForPage):
1804         (WebKit::WebProcessPool::hasSuspendedPageFor const):
1805         * UIProcess/WebProcessPool.h:
1806
1807 2019-01-30  Carlos Garcia Campos  <cgarcia@igalia.com>
1808
1809         [GTK][Wayland] REGRESSION(r240712): Clear the GL context if it's the current one on dispose
1810         https://bugs.webkit.org/show_bug.cgi?id=194024
1811
1812         Reviewed by Michael Catanzaro.
1813
1814         Fixes a crash in gdk_gl_context_dispose().
1815
1816         * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
1817         (WebKit::AcceleratedBackingStoreWayland::~AcceleratedBackingStoreWayland):
1818
1819 2019-01-30  Antti Koivisto  <antti@apple.com>
1820
1821         Crash in WebKit::RemoteLayerTreePropertyApplier::updateChildren
1822         https://bugs.webkit.org/show_bug.cgi?id=193897
1823         <rdar://problem/47427750>
1824
1825         Reviewed by Simon Fraser.
1826
1827         There has been some null pointer crashes where we fail to find a remote layer tree node that matches
1828         the transaction properties.
1829
1830         * Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
1831         (WebKit::RemoteLayerTreePropertyApplier::updateChildren):
1832
1833         Null check the nodes.
1834
1835 2019-01-30  Simon Fraser  <simon.fraser@apple.com>
1836
1837         Add some basic geometry information to the scrolling tree
1838         https://bugs.webkit.org/show_bug.cgi?id=194002
1839
1840         Reviewed by Antti Koivisto.
1841
1842         Add a comment explaining why we don't need to encode/decode ParentRelativeScrollableRect.
1843
1844         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
1845         (ArgumentCoder<ScrollingStateFrameHostingNode>::encode):
1846
1847 2019-01-30  Carlos Garcia Campos  <cgarcia@igalia.com>
1848
1849         [GTK] gdk_cairo_draw_from_gl() in AcceleratedBackingStoreWayland fails in GtkInspector's magnifier
1850         https://bugs.webkit.org/show_bug.cgi?id=193903
1851
1852         Reviewed by Michael Catanzaro.
1853
1854         The problem is that the GL context used by WaylandCompositor can't share resources with the one used by GTK+
1855         when painting with gdk_cairo_draw_from_gl(). Accelerated compositing in Wayland works only because
1856         WaylandCompositor makes the context current only once on initialization. So, when we render the first frame on
1857         accelerated compositing mode, GTK+ is rendering in non-GL mode, and switches to the GL mode when
1858         gdk_cairo_draw_from_gl() is called. Since GTK+ didn't have a GL context yet, the first frame is always rendered
1859         by GTK+ using the software fallback (glReadPixels). The thing is that the first time gdk_cairo_draw_from_gl() is
1860         called, GTK+ creates a GL context for painting that is made current, and it will remain the current one
1861         forever. The first frame fails to render with "GL_INVALID_OPERATION in glBindTexture(non-gen name)" because the
1862         texture created in WaylandCompositor GL context can't be accessed from GTK+ GL context. The following frames are
1863         handled with the GTK+ GL context. I would say this works by casuality and it could be the cause of other
1864         accelerated compositing issues in Wayland.
1865
1866         We need to create our own GdkGLContext for the WebView, and use that in the WaylandCompositor. When the
1867         GdkGLContext is created, the GTK+ GL context for painting is used as a shared context, ensuring that resources
1868         created in the new context will be accessible from the painting one.
1869
1870         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1871         (webkitWebViewBaseMakeGLContextCurrent): Call AcceleratedBackingStore::makeContextCurrent().
1872         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
1873         * UIProcess/WebPageProxy.h:
1874         * UIProcess/gtk/AcceleratedBackingStore.h:
1875         (WebKit::AcceleratedBackingStore::makeContextCurrent): New virtual method only implemented by Wayland backend.
1876         * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
1877         (WebKit::AcceleratedBackingStoreWayland::tryEnsureGLContext): Try to create a GL context with
1878         gdk_window_create_gl_context(), falling back to a WebCore::GLContext if it fails or GTK+ version is not new enough.
1879         (WebKit::AcceleratedBackingStoreWayland::makeContextCurrent): Make the GL context current.
1880         (WebKit::AcceleratedBackingStoreWayland::paint): Check if we have a GdkGLContext before trying to use gdk_cairo_draw_from_gl().
1881         (WebKit::AcceleratedBackingStoreWayland::canGdkUseGL const): Deleted.
1882         * UIProcess/gtk/AcceleratedBackingStoreWayland.h:
1883         * UIProcess/gtk/WaylandCompositor.cpp:
1884         (WebKit::WaylandCompositor::Surface::Surface): Move the texture creation to setWebPage(), since we need the
1885         WebView GL context.
1886         (WebKit::WaylandCompositor::Surface::~Surface): Move the code to destroy GL resources to setWebPage().
1887         (WebKit::WaylandCompositor::Surface::setWebPage): Create the texture when a new page is set and destroy GL
1888         resources when unset.
1889         (WebKit::WaylandCompositor::Surface::prepareTextureForPainting): Make WebView GL context current.
1890         (WebKit::WaylandCompositor::Surface::commit): Ditto.
1891         (WebKit::WaylandCompositor::initializeEGL): Use a temporary GLContext.
1892         * UIProcess/gtk/WaylandCompositor.h:
1893         * UIProcess/gtk/WebPageProxyGtk.cpp:
1894         (WebKit::WebPageProxy::makeGLContextCurrent): Call webkitWebViewBaseMakeGLContextCurrent().
1895
1896 2019-01-29  Ryosuke Niwa  <rniwa@webkit.org>
1897
1898         iOS: Nullptr crash in WebPage::getPositionInformation dereferencing an input element for data list
1899         https://bugs.webkit.org/show_bug.cgi?id=193996
1900
1901         Reviewed by Wenson Hsieh.
1902
1903         Added a missing nullptr check.
1904
1905         * WebProcess/WebPage/ios/WebPageIOS.mm:
1906         (WebKit::WebPage::getPositionInformation):
1907
1908 2019-01-29  Simon Fraser  <simon.fraser@apple.com>
1909
1910         Add nodes to the scrolling tree in z-index order.
1911         https://bugs.webkit.org/show_bug.cgi?id=192529
1912         <rdar://problem/47402708>
1913
1914         Reviewed by Dean Jackson.
1915
1916         FrameHosting nodes have layers, so need to update them.
1917
1918         * Platform/Logging.cpp:
1919         (WebKit::initializeLogChannelsIfNecessary):
1920         * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
1921         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
1922
1923 2019-01-29  Alex Christensen  <achristensen@webkit.org>
1924
1925         Change NetworkConnectionToWebProcess* to NetworkConnectionToWebProcess& where possible
1926         https://bugs.webkit.org/show_bug.cgi?id=193974
1927
1928         Reviewed by Tim Horton.
1929
1930         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
1931         (WebKit::NetworkBlobRegistry::registerFileBlobURL):
1932         (WebKit::NetworkBlobRegistry::registerBlobURL):
1933         (WebKit::NetworkBlobRegistry::registerBlobURLOptionallyFileBacked):
1934         (WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
1935         (WebKit::NetworkBlobRegistry::unregisterBlobURL):
1936         (WebKit::NetworkBlobRegistry::blobSize):
1937         (WebKit::NetworkBlobRegistry::connectionToWebProcessDidClose):
1938         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
1939         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1940         (WebKit::NetworkConnectionToWebProcess::didClose):
1941         (WebKit::NetworkConnectionToWebProcess::registerFileBlobURL):
1942         (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
1943         (WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL):
1944         (WebKit::NetworkConnectionToWebProcess::registerBlobURLOptionallyFileBacked):
1945         (WebKit::NetworkConnectionToWebProcess::registerBlobURLForSlice):
1946         (WebKit::NetworkConnectionToWebProcess::unregisterBlobURL):
1947         (WebKit::NetworkConnectionToWebProcess::blobSize):
1948         * NetworkProcess/NetworkProcess.cpp:
1949         (WebKit::NetworkProcess::removeNetworkConnectionToWebProcess):
1950         * NetworkProcess/NetworkProcess.h:
1951
1952 2019-01-29  Youenn Fablet  <youenn@apple.com>
1953
1954         Adopt new SPI to evaluate server certificate trust
1955         https://bugs.webkit.org/show_bug.cgi?id=193355
1956
1957         Reviewed by Alex Christensen.
1958
1959         Use new SPI provided in NSURLSession to evaluate server certificates.
1960         If successful, let loading proceed as usual.
1961         Otherwise, go to the UIProcess to ask for a decision on continuing the load or not.
1962
1963         * NetworkProcess/cocoa/NetworkSessionCocoa.h:
1964         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1965         (canNSURLSessionTrustEvaluate):
1966         (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
1967         (WebKit::NetworkSessionCocoa::continueDidReceiveChallenge):
1968
1969 2019-01-29  Tim Horton  <timothy_horton@apple.com>
1970
1971         Fix the build
1972
1973         * UIProcess/ios/WKDrawingCoordinator.h:
1974         * UIProcess/ios/WKDrawingCoordinator.mm:
1975         * UIProcess/ios/WKDrawingView.mm:
1976
1977 2019-01-29  Alex Christensen  <achristensen@webkit.org>
1978
1979         Remove unused NetworkProcessProxy::writeBlobToFilePath
1980         https://bugs.webkit.org/show_bug.cgi?id=193990
1981
1982         Reviewed by Wenson Hsieh.
1983
1984         This code was only used in code that was introduced in r235202
1985         but that has since been refactored to not use blobs.  Its tests still pass.
1986         This removes the only UIProcess-controlled code that uses NetworkBlobRegistry::singleton.
1987
1988         * NetworkProcess/NetworkProcess.cpp:
1989         (WebKit::NetworkProcess::writeBlobToFilePath): Deleted.
1990         * NetworkProcess/NetworkProcess.h:
1991         * NetworkProcess/NetworkProcess.messages.in:
1992         * UIProcess/Cocoa/WebViewImpl.mm:
1993         (WebKit::WebViewImpl::writeToURLForFilePromiseProvider):
1994         * UIProcess/Network/NetworkProcessProxy.cpp:
1995         (WebKit::NetworkProcessProxy::writeBlobToFilePath): Deleted.
1996         * UIProcess/Network/NetworkProcessProxy.h:
1997         * UIProcess/WebPageProxy.cpp:
1998         (WebKit::WebPageProxy::writeBlobToFilePath): Deleted.
1999         * UIProcess/WebPageProxy.h:
2000
2001 2019-01-29  Devin Rousso  <drousso@apple.com>
2002
2003         Web Inspector: expose a way of determining if a detached frontend is for a remote target
2004         https://bugs.webkit.org/show_bug.cgi?id=193951
2005         <rdar://problem/47621366>
2006
2007         Reviewed by Joseph Pecoraro.
2008
2009         * UIProcess/WebInspectorProxy.h:
2010         (WebKit::WebInspectorProxy::InspectionTargetType): Added.
2011         (WebKit::WebInspectorProxy::createFrontendWindow):
2012         * UIProcess/mac/WebInspectorProxyMac.mm:
2013         (WebKit::WebInspectorProxy::createFrontendWindow):
2014         (WebKit::WebInspectorProxy::platformCreateFrontendWindow):
2015         * UIProcess/mac/RemoteWebInspectorProxyMac.mm:
2016         (WebKit::RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow):
2017
2018         * UIProcess/API/Cocoa/_WKInspectorWindow.h: Moved from UIProcess/mac/WKInspectorWindow.h.
2019         * UIProcess/API/Cocoa/_WKInspectorWindow.mm: Moved from UIProcess/mac/WKInspectorWindow.mm.
2020         (-[WKInspectorWindow isRemote]): Added.
2021
2022         * Shared/API/Cocoa/_WKNSWindowExtras.mm:
2023         (-[NSWindow _web_isWebInspectorWindow]):
2024
2025         * PlatformMac.cmake:
2026         * SourcesCocoa.txt:
2027         * UnifiedSources-input.xcfilelist:
2028         * WebKit.xcodeproj/project.pbxproj:
2029
2030 2019-01-29  Alex Christensen  <achristensen@webkit.org>
2031
2032         Rename ChildProcess to AuxiliaryProcess
2033         https://bugs.webkit.org/show_bug.cgi?id=193943
2034
2035         Reviewed by Andy Estes.
2036
2037         "Child" implies that there is a parent, but I'm about to introduce a type of NetworkProcess that
2038         doesn't always have a parent, and may have many UIProcesses that it is the auxiliary for.
2039
2040         * CMakeLists.txt:
2041         * DerivedSources-input.xcfilelist:
2042         * DerivedSources-output.xcfilelist:
2043         * DerivedSources.make:
2044         * NetworkProcess/Cookies/WebCookieManager.cpp:
2045         * NetworkProcess/Cookies/soup/WebCookieManagerSoup.cpp:
2046         * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
2047         (WebKit::initializeAuxiliaryProcess<NetworkProcess>):
2048         (WebKit::initializeChildProcess<NetworkProcess>): Deleted.
2049         * NetworkProcess/NetworkProcess.cpp:
2050         (WebKit::callExitSoon):
2051         (WebKit::NetworkProcess::NetworkProcess):
2052         (WebKit::NetworkProcess::didReceiveMessage):
2053         (WebKit::NetworkProcess::initializeConnection):
2054         (WebKit::NetworkProcess::terminate):
2055         (WebKit::NetworkProcess::initializeProcess):
2056         (WebKit::NetworkProcess::initializeProcessName):
2057         (WebKit::NetworkProcess::initializeSandbox):
2058         * NetworkProcess/NetworkProcess.h:
2059         * NetworkProcess/NetworkProcessSupplement.h:
2060         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2061         (WebKit::NetworkCache::Storage::deleteOldVersions):
2062         * NetworkProcess/ios/NetworkProcessIOS.mm:
2063         (WebKit::NetworkProcess::initializeProcess):
2064         (WebKit::NetworkProcess::initializeProcessName):
2065         (WebKit::NetworkProcess::initializeSandbox):
2066         * NetworkProcess/mac/NetworkProcessMac.mm:
2067         (WebKit::NetworkProcess::initializeProcess):
2068         (WebKit::NetworkProcess::initializeProcessName):
2069         (WebKit::NetworkProcess::initializeSandbox):
2070         * NetworkProcess/soup/NetworkProcessMainSoup.cpp:
2071         (WebKit::initializeAuxiliaryProcess<NetworkProcess>):
2072         (WebKit::NetworkProcessMainUnix):
2073         (WebKit::initializeChildProcess<NetworkProcess>): Deleted.
2074         * NetworkProcess/watchos/NetworkProximityManager.h:
2075         * NetworkProcess/watchos/NetworkProximityManager.mm:
2076         (WebKit::NetworkProximityManager::NetworkProximityManager):
2077         * NetworkProcess/win/NetworkProcessMainWin.cpp:
2078         (WebKit::initializeAuxiliaryProcess<NetworkProcess>):
2079         (WebKit::NetworkProcessMainWin):
2080         (WebKit::initializeChildProcess<NetworkProcess>): Deleted.
2081         * PlatformGTK.cmake:
2082         * PlatformMac.cmake:
2083         * PlatformWin.cmake:
2084         * PluginProcess/PluginProcess.cpp:
2085         (WebKit::PluginProcess::initializeProcess):
2086         (WebKit::PluginProcess::initializeConnection):
2087         (WebKit::PluginProcess::didReceiveMessage):
2088         (WebKit::PluginProcess::initializeProcessName):
2089         (WebKit::PluginProcess::initializeSandbox):
2090         * PluginProcess/PluginProcess.h:
2091         * PluginProcess/mac/PluginProcessMac.mm:
2092         (WebKit::PluginProcess::platformInitializeProcess):
2093         (WebKit::PluginProcess::initializeProcessName):
2094         (WebKit::PluginProcess::initializeSandbox):
2095         (WebKit::PluginProcess::stopRunLoop):
2096         * PluginProcess/unix/PluginProcessMainUnix.cpp:
2097         (WebKit::PluginProcessMainUnix):
2098         * PluginProcess/unix/PluginProcessUnix.cpp:
2099         (WebKit::PluginProcess::platformInitializeProcess):
2100         * Shared/Authentication/AuthenticationManager.cpp:
2101         (WebKit::AuthenticationManager::AuthenticationManager):
2102         * Shared/Authentication/AuthenticationManager.h:
2103         * Shared/AuxiliaryProcess.cpp: Copied from Source/WebKit/Shared/ChildProcess.cpp.
2104         (WebKit::AuxiliaryProcess::AuxiliaryProcess):
2105         (WebKit::AuxiliaryProcess::~AuxiliaryProcess):
2106         (WebKit::AuxiliaryProcess::didClose):
2107         (WebKit::AuxiliaryProcess::initialize):
2108         (WebKit::AuxiliaryProcess::setProcessSuppressionEnabled):
2109         (WebKit::AuxiliaryProcess::initializeProcess):
2110         (WebKit::AuxiliaryProcess::initializeProcessName):
2111         (WebKit::AuxiliaryProcess::initializeConnection):
2112         (WebKit::AuxiliaryProcess::addMessageReceiver):
2113         (WebKit::AuxiliaryProcess::removeMessageReceiver):
2114         (WebKit::AuxiliaryProcess::disableTermination):
2115         (WebKit::AuxiliaryProcess::enableTermination):
2116         (WebKit::AuxiliaryProcess::messageSenderConnection):
2117         (WebKit::AuxiliaryProcess::messageSenderDestinationID):
2118         (WebKit::AuxiliaryProcess::terminationTimerFired):
2119         (WebKit::AuxiliaryProcess::stopRunLoop):
2120         (WebKit::AuxiliaryProcess::platformStopRunLoop):
2121         (WebKit::AuxiliaryProcess::terminate):
2122         (WebKit::AuxiliaryProcess::shutDown):
2123         (WebKit::AuxiliaryProcess::registerURLSchemeServiceWorkersCanHandle const):
2124         (WebKit::AuxiliaryProcess::platformInitialize):
2125         (WebKit::AuxiliaryProcess::initializeSandbox):
2126         (WebKit::AuxiliaryProcess::didReceiveInvalidMessage):
2127         (WebKit::AuxiliaryProcess::didReceiveMemoryPressureEvent):
2128         (WebKit::ChildProcess::ChildProcess): Deleted.
2129         (WebKit::ChildProcess::~ChildProcess): Deleted.
2130         (WebKit::ChildProcess::didClose): Deleted.
2131         (WebKit::ChildProcess::initialize): Deleted.
2132         (WebKit::ChildProcess::setProcessSuppressionEnabled): Deleted.
2133         (WebKit::ChildProcess::initializeProcess): Deleted.
2134         (WebKit::ChildProcess::initializeProcessName): Deleted.
2135         (WebKit::ChildProcess::initializeConnection): Deleted.
2136         (WebKit::ChildProcess::addMessageReceiver): Deleted.
2137         (WebKit::ChildProcess::removeMessageReceiver): Deleted.
2138         (WebKit::ChildProcess::disableTermination): Deleted.
2139         (WebKit::ChildProcess::enableTermination): Deleted.
2140         (WebKit::ChildProcess::messageSenderConnection): Deleted.
2141         (WebKit::ChildProcess::messageSenderDestinationID): Deleted.
2142         (WebKit::ChildProcess::terminationTimerFired): Deleted.
2143         (WebKit::ChildProcess::stopRunLoop): Deleted.
2144         (WebKit::ChildProcess::platformStopRunLoop): Deleted.
2145         (WebKit::ChildProcess::terminate): Deleted.
2146         (WebKit::ChildProcess::shutDown): Deleted.
2147         (WebKit::ChildProcess::registerURLSchemeServiceWorkersCanHandle const): Deleted.
2148         (WebKit::ChildProcess::platformInitialize): Deleted.
2149         (WebKit::ChildProcess::initializeSandbox): Deleted.
2150         (WebKit::ChildProcess::didReceiveInvalidMessage): Deleted.
2151         (WebKit::ChildProcess::didReceiveMemoryPressureEvent): Deleted.
2152         * Shared/AuxiliaryProcess.h: Copied from Source/WebKit/Shared/ChildProcess.h.
2153         (WebKit::ChildProcess::parentProcessConnection const): Deleted.
2154         (WebKit::ChildProcess::messageReceiverMap): Deleted.
2155         (WebKit::ChildProcess::setTerminationTimeout): Deleted.
2156         (WebKit::ChildProcess::shouldOverrideQuarantine): Deleted.
2157         * Shared/AuxiliaryProcess.messages.in: Copied from Source/WebKit/Shared/ChildProcess.messages.in.
2158         * Shared/AuxiliaryProcessSupplement.h: Copied from Source/WebKit/Shared/ChildProcessSupplement.h.
2159         (WebKit::AuxiliaryProcessSupplement::~AuxiliaryProcessSupplement):
2160         (WebKit::ChildProcessSupplement::~ChildProcessSupplement): Deleted.
2161         (WebKit::ChildProcessSupplement::initializeConnection): Deleted.
2162         * Shared/ChildProcess.cpp: Removed.
2163         * Shared/ChildProcess.h: Removed.
2164         * Shared/ChildProcess.messages.in: Removed.
2165         * Shared/ChildProcessSupplement.h: Removed.
2166         * Shared/Cocoa/AuxiliaryProcessCocoa.mm: Copied from Source/WebKit/Shared/Cocoa/ChildProcessCocoa.mm.
2167         (WebKit::AuxiliaryProcess::didReceiveInvalidMessage):
2168         (WebKit::ChildProcess::didReceiveInvalidMessage): Deleted.
2169         * Shared/Cocoa/ChildProcessCocoa.mm: Removed.
2170         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
2171         (WebKit::initializeAuxiliaryProcess):
2172         (WebKit::XPCServiceInitializer):
2173         (WebKit::initializeChildProcess): Deleted.
2174         * Shared/WebSQLiteDatabaseTracker.cpp:
2175         (WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker):
2176         (WebKit::WebSQLiteDatabaseTracker::hysteresisUpdated):
2177         (WebKit::m_childProcessType): Deleted.
2178         * Shared/WebSQLiteDatabaseTracker.h:
2179         * Shared/ios/AuxiliaryProcessIOS.mm: Copied from Source/WebKit/Shared/ios/ChildProcessIOS.mm.
2180         (WebKit::AuxiliaryProcess::platformInitialize):
2181         (WebKit::AuxiliaryProcess::initializeSandbox):
2182         (WebKit::AuxiliaryProcess::setQOS):
2183         (WebKit::AuxiliaryProcess::platformStopRunLoop):
2184         (WebKit::ChildProcess::platformInitialize): Deleted.
2185         (WebKit::ChildProcess::initializeSandbox): Deleted.
2186         (WebKit::ChildProcess::setQOS): Deleted.
2187         (WebKit::ChildProcess::platformStopRunLoop): Deleted.
2188         * Shared/ios/ChildProcessIOS.mm: Removed.
2189         * Shared/mac/AuxiliaryProcessMac.mm: Copied from Source/WebKit/Shared/mac/ChildProcessMac.mm.
2190         (WebKit::SandboxInfo::SandboxInfo):
2191         (WebKit::AuxiliaryProcess::launchServicesCheckIn):
2192         (WebKit::AuxiliaryProcess::platformInitialize):
2193         (WebKit::processStorageClass):
2194         (WebKit::sandboxDirectory):
2195         (WebKit::applySandbox):
2196         (WebKit::initializeSandboxParameters):
2197         (WebKit::AuxiliaryProcess::initializeSandbox):
2198         (WebKit::AuxiliaryProcess::stopNSAppRunLoop):
2199         (WebKit::AuxiliaryProcess::stopNSRunLoop):
2200         (WebKit::AuxiliaryProcess::platformStopRunLoop):
2201         (WebKit::AuxiliaryProcess::setQOS):
2202         (WebKit::AuxiliaryProcess::isSystemWebKit):
2203         (WebKit::ChildProcess::launchServicesCheckIn): Deleted.
2204         (WebKit::ChildProcess::platformInitialize): Deleted.
2205         (WebKit::ChildProcess::initializeSandbox): Deleted.
2206         (WebKit::ChildProcess::stopNSAppRunLoop): Deleted.
2207         (WebKit::ChildProcess::stopNSRunLoop): Deleted.
2208         (WebKit::ChildProcess::platformStopRunLoop): Deleted.
2209         (WebKit::ChildProcess::setQOS): Deleted.
2210         (WebKit::ChildProcess::isSystemWebKit): Deleted.
2211         * Shared/mac/ChildProcessMac.mm: Removed.
2212         * Shared/mac/SecItemShim.cpp:
2213         (WebKit::globalNetworkProcess):
2214         (WebKit::sendSecItemRequest):
2215         (WebKit::initializeSecItemShim):
2216         * Shared/mac/SecItemShim.h:
2217         * Shared/unix/AuxiliaryProcessMain.cpp: Copied from Source/WebKit/Shared/unix/ChildProcessMain.cpp.
2218         (WebKit::AuxiliaryProcessMainBase::parseCommandLine):
2219         (WebKit::ChildProcessMainBase::parseCommandLine): Deleted.
2220         * Shared/unix/AuxiliaryProcessMain.h: Copied from Source/WebKit/Shared/unix/ChildProcessMain.h.
2221         (WebKit::AuxiliaryProcessMainBase::takeInitializationParameters):
2222         (WebKit::initializeAuxiliaryProcess):
2223         (WebKit::AuxiliaryProcessMain):
2224         (WebKit::ChildProcessMainBase::platformInitialize): Deleted.
2225         (WebKit::ChildProcessMainBase::platformFinalize): Deleted.
2226         (WebKit::ChildProcessMainBase::takeInitializationParameters): Deleted.
2227         (WebKit::initializeChildProcess): Deleted.
2228         (WebKit::ChildProcessMain): Deleted.
2229         * Shared/unix/ChildProcessMain.cpp: Removed.
2230         * Shared/unix/ChildProcessMain.h: Removed.
2231         * Shared/win/AuxiliaryProcessMainWin.cpp: Copied from Source/WebKit/Shared/win/ChildProcessMainWin.cpp.
2232         (WebKit::AuxiliaryProcessMainBase::parseCommandLine):
2233         (WebKit::ChildProcessMainBase::parseCommandLine): Deleted.
2234         * Shared/win/ChildProcessMainWin.cpp: Removed.
2235         * Sources.txt:
2236         * SourcesCocoa.txt:
2237         * SourcesGTK.txt:
2238         * SourcesWPE.txt:
2239         * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
2240         * UIProcess/Authentication/AuthenticationChallengeProxy.h:
2241         * UIProcess/AuxiliaryProcessProxy.cpp: Copied from Source/WebKit/UIProcess/ChildProcessProxy.cpp.
2242         (WebKit::AuxiliaryProcessProxy::AuxiliaryProcessProxy):
2243         (WebKit::AuxiliaryProcessProxy::~AuxiliaryProcessProxy):
2244         (WebKit::AuxiliaryProcessProxy::getLaunchOptions):
2245         (WebKit::AuxiliaryProcessProxy::connect):
2246         (WebKit::AuxiliaryProcessProxy::terminate):
2247         (WebKit::AuxiliaryProcessProxy::state const):
2248         (WebKit::AuxiliaryProcessProxy::sendMessage):
2249         (WebKit::AuxiliaryProcessProxy::addMessageReceiver):
2250         (WebKit::AuxiliaryProcessProxy::removeMessageReceiver):
2251         (WebKit::AuxiliaryProcessProxy::dispatchMessage):
2252         (WebKit::AuxiliaryProcessProxy::dispatchSyncMessage):
2253         (WebKit::AuxiliaryProcessProxy::didFinishLaunching):
2254         (WebKit::AuxiliaryProcessProxy::shutDownProcess):
2255         (WebKit::AuxiliaryProcessProxy::setProcessSuppressionEnabled):
2256         (WebKit::AuxiliaryProcessProxy::connectionWillOpen):
2257         (WebKit::ChildProcessProxy::ChildProcessProxy): Deleted.
2258         (WebKit::ChildProcessProxy::~ChildProcessProxy): Deleted.
2259         (WebKit::ChildProcessProxy::getLaunchOptions): Deleted.
2260         (WebKit::ChildProcessProxy::connect): Deleted.
2261         (WebKit::ChildProcessProxy::terminate): Deleted.
2262         (WebKit::ChildProcessProxy::state const): Deleted.
2263         (WebKit::ChildProcessProxy::sendMessage): Deleted.
2264         (WebKit::ChildProcessProxy::addMessageReceiver): Deleted.
2265         (WebKit::ChildProcessProxy::removeMessageReceiver): Deleted.
2266         (WebKit::ChildProcessProxy::dispatchMessage): Deleted.
2267         (WebKit::ChildProcessProxy::dispatchSyncMessage): Deleted.
2268         (WebKit::ChildProcessProxy::didFinishLaunching): Deleted.
2269         (WebKit::ChildProcessProxy::shutDownProcess): Deleted.
2270         (WebKit::ChildProcessProxy::setProcessSuppressionEnabled): Deleted.
2271         (WebKit::ChildProcessProxy::connectionWillOpen): Deleted.
2272         * UIProcess/AuxiliaryProcessProxy.h: Copied from Source/WebKit/UIProcess/ChildProcessProxy.h.
2273         (WebKit::AuxiliaryProcessProxy::send):
2274         (WebKit::AuxiliaryProcessProxy::sendSync):
2275         (WebKit::AuxiliaryProcessProxy::sendWithAsyncReply):
2276         (WebKit::ChildProcessProxy::send): Deleted.
2277         (WebKit::ChildProcessProxy::sendSync): Deleted.
2278         (WebKit::ChildProcessProxy::connection const): Deleted.
2279         (WebKit::ChildProcessProxy::hasConnection const): Deleted.
2280         (WebKit::ChildProcessProxy::processIdentifier const): Deleted.
2281         (WebKit::ChildProcessProxy::canSendMessage const): Deleted.
2282         (WebKit::ChildProcessProxy::coreProcessIdentifier const): Deleted.
2283         (WebKit::ChildProcessProxy::platformGetLaunchOptions): Deleted.
2284         (WebKit::ChildProcessProxy::sendWithAsyncReply): Deleted.
2285         * UIProcess/ChildProcessProxy.cpp: Removed.
2286         * UIProcess/ChildProcessProxy.h: Removed.
2287         * UIProcess/Downloads/DownloadProxyMap.cpp:
2288         (WebKit::DownloadProxyMap::DownloadProxyMap):
2289         * UIProcess/Downloads/DownloadProxyMap.h:
2290         * UIProcess/Network/NetworkProcessProxy.cpp:
2291         (WebKit::NetworkProcessProxy::NetworkProcessProxy):
2292         (WebKit::NetworkProcessProxy::getLaunchOptions):
2293         (WebKit::NetworkProcessProxy::createDownloadProxy):
2294         (WebKit::NetworkProcessProxy::didFinishLaunching):
2295         * UIProcess/Network/NetworkProcessProxy.h:
2296         * UIProcess/Plugins/PluginProcessProxy.cpp:
2297         (WebKit::PluginProcessProxy::getLaunchOptions):
2298         (WebKit::PluginProcessProxy::sendMemoryPressureEvent):
2299         * UIProcess/Plugins/PluginProcessProxy.h:
2300         * UIProcess/ServiceWorkerProcessProxy.h:
2301         * UIProcess/WebPageProxy.cpp:
2302         (WebKit::WebPageProxy::finishAttachingToWebProcess):
2303         * UIProcess/WebProcessPool.cpp:
2304         (WebKit::WebProcessPool::sendMemoryPressureEvent):
2305         (WebKit::WebProcessPool::registerURLSchemeServiceWorkersCanHandle):
2306         * UIProcess/WebProcessProxy.cpp:
2307         (WebKit::WebProcessProxy::WebProcessProxy):
2308         (WebKit::WebProcessProxy::getLaunchOptions):
2309         (WebKit::WebProcessProxy::didFinishLaunching):
2310         (WebKit::WebProcessProxy::maybeShutDown):
2311         (WebKit::WebProcessProxy::canTerminateAuxiliaryProcess):
2312         (WebKit::WebProcessProxy::shouldTerminate):
2313         (WebKit::WebProcessProxy::requestTermination):
2314         (WebKit::WebProcessProxy::canTerminateChildProcess): Deleted.
2315         * UIProcess/WebProcessProxy.h:
2316         * UnifiedSources-input.xcfilelist:
2317         * WebKit.xcodeproj/project.pbxproj:
2318         * WebProcess/WebProcess.cpp:
2319         (WebKit::WebProcess::initializeProcess):
2320         (WebKit::WebProcess::initializeConnection):
2321         (WebKit::WebProcess::terminate):
2322         (WebKit::WebProcess::didReceiveMessage):
2323         (WebKit::WebProcess::initializeProcessName):
2324         (WebKit::WebProcess::initializeSandbox):
2325         (WebKit::WebProcess::platformInitializeProcess):
2326         * WebProcess/WebProcess.h:
2327         * WebProcess/WebProcessSupplement.h:
2328         * WebProcess/cocoa/WebProcessCocoa.mm:
2329         (WebKit::WebProcess::initializeProcessName):
2330         (WebKit::WebProcess::platformInitializeProcess):
2331         (WebKit::WebProcess::stopRunLoop):
2332         (WebKit::WebProcess::initializeSandbox):
2333         * WebProcess/gtk/WebProcessMainGtk.cpp:
2334         (WebKit::WebProcessMainUnix):
2335         * WebProcess/win/WebProcessMainWin.cpp:
2336         (WebKit::WebProcessMainWin):
2337         * WebProcess/wpe/WebProcessMainWPE.cpp:
2338         (WebKit::WebProcessMainUnix):
2339
2340 2019-01-29  Simon Fraser  <simon.fraser@apple.com>
2341
2342         REGRESSION(r240553): [iOS] Crash in ScrollingTree::updateTreeFromStateNode when attempting to log in to icloud.com
2343         https://bugs.webkit.org/show_bug.cgi?id=193907
2344
2345         Reviewed by Frédéric Wang.
2346
2347         Remove encode/decode of removedNodes.
2348
2349         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
2350         (WebKit::RemoteScrollingCoordinatorTransaction::encode const):
2351         (WebKit::RemoteScrollingCoordinatorTransaction::decode):
2352         (WebKit::dump):
2353
2354 2019-01-29  Brent Fulgham  <bfulgham@apple.com>
2355
2356         StorageAccess API calls should be direct to the Network Process
2357         https://bugs.webkit.org/show_bug.cgi?id=193924
2358         <rdar://problem/47611249>
2359
2360         Reviewed by Alex Christensen.
2361
2362         Now that the ResourceLoadStatistics data lives in the Network Process, calls to Storage Access
2363         API should happen directly between the WebContent and Network processes.
2364
2365         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
2366         (WebKit::WebResourceLoadStatisticsStore::requestStorageAccessGranted):
2367         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
2368         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2369         (WebKit::NetworkConnectionToWebProcess::removeStorageAccessForFrame):
2370         (WebKit::NetworkConnectionToWebProcess::removeStorageAccessForAllFramesOnPage):
2371         (WebKit::NetworkConnectionToWebProcess::logUserInteraction):
2372         (WebKit::NetworkConnectionToWebProcess::logWebSocketLoading):
2373         (WebKit::NetworkConnectionToWebProcess::logSubresourceLoading):
2374         (WebKit::NetworkConnectionToWebProcess::logSubresourceRedirect):
2375         (WebKit::NetworkConnectionToWebProcess::requestResourceLoadStatisticsUpdate):
2376         (WebKit::NetworkConnectionToWebProcess::hasStorageAccess):
2377         (WebKit::NetworkConnectionToWebProcess::requestStorageAccess):
2378         * NetworkProcess/NetworkConnectionToWebProcess.h:
2379         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
2380         * NetworkProcess/NetworkProcess.cpp:
2381         (WebKit::NetworkProcess::requestStorageAccess):
2382         (WebKit::NetworkProcess::requestStorageAccessGranted):
2383         * NetworkProcess/NetworkProcess.h:
2384         * UIProcess/Network/NetworkProcessProxy.cpp:
2385         (WebKit::NetworkProcessProxy::requestStorageAccessConfirm):
2386         * UIProcess/Network/NetworkProcessProxy.h:
2387         * UIProcess/Network/NetworkProcessProxy.messages.in:
2388         * UIProcess/WebPageProxy.cpp:
2389         (WebKit::WebPageProxy::requestStorageAccessConfirm):
2390         (WebKit::WebPageProxy::hasStorageAccess): Deleted.
2391         (WebKit::WebPageProxy::requestStorageAccess): Deleted.
2392         * UIProcess/WebPageProxy.h:
2393         * UIProcess/WebPageProxy.messages.in:
2394         * WebProcess/WebPage/WebPage.cpp:
2395         (WebKit::WebPage::hasStorageAccess):
2396         (WebKit::WebPage::requestStorageAccess):
2397         (WebKit::nextRequestStorageAccessContextId): Deleted.
2398         (WebKit::WebPage::storageAccessResponse): Deleted.
2399         * WebProcess/WebPage/WebPage.h:
2400         * WebProcess/WebPage/WebPage.messages.in:
2401
2402 2019-01-29  Chris Dumez  <cdumez@apple.com>
2403
2404         Regression (r240046): [PSON] Spurious changes to [WKWebView url] and [WKWebView loading] after [WKWebView loadRequest]
2405         https://bugs.webkit.org/show_bug.cgi?id=193967
2406         <rdar://problem/47635348>
2407
2408         Reviewed by Alex Christensen.
2409
2410         Update WebPageProxy::receivedPolicyDecision() to no longer clear the pending URL when we send PolicyAction::Ignore to
2411         the old process when the load is continuing in a new process due to PSON.
2412
2413         * UIProcess/WebPageProxy.cpp:
2414         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
2415         (WebKit::WebPageProxy::receivedPolicyDecision):
2416         * UIProcess/WebPageProxy.h:
2417
2418 2019-01-29  Keith Rollin  <krollin@apple.com>
2419
2420         Add .xcfilelists to Run Script build phases
2421         https://bugs.webkit.org/show_bug.cgi?id=193792
2422         <rdar://problem/47201785>
2423
2424         Reviewed by Alex Christensen.
2425
2426         As part of supporting XCBuild, update the necessary Run Script build
2427         phases in their Xcode projects to refer to their associated
2428         .xcfilelist files.
2429
2430         Note that the addition of these files bumps the Xcode project version
2431         number to something that's Xcode 10 compatible. This change means that
2432         older versions of the Xcode IDE can't read these projects. Nor can it
2433         fully load workspaces that refer to these projects (the updated
2434         projects are shown as non-expandable placeholders). `xcodebuild` can
2435         still build these projects; it's just that the IDE can't open them.
2436
2437         Make special accommodations for incorporating .xcfilelists from
2438         WebKitAdditions.
2439
2440         * Configurations/Base.xcconfig:
2441         * Configurations/DebugRelease.xcconfig:
2442         * WebKit.xcodeproj/project.pbxproj:
2443
2444 2019-01-29  Antti Koivisto  <antti@apple.com>
2445
2446         REGRESSION (PSON): Flash on link navigation on Mac
2447         https://bugs.webkit.org/show_bug.cgi?id=193961
2448         <rdar://problem/47482507>
2449
2450         Reviewed by Chris Dumez.
2451
2452         The target page sends EnterAcceleratedCompositingMode message too early, before we have a valid layer tree.
2453
2454         * WebProcess/WebPage/DrawingArea.h:
2455         (WebKit::DrawingArea::attach): Deleted.
2456
2457         Not needed anymore.
2458
2459         * WebProcess/WebPage/WebPage.cpp:
2460         (WebKit::WebPage::reinitializeWebPage):
2461         (WebKit::WebPage::didCompletePageTransition):
2462         (WebKit::m_shouldAttachDrawingAreaOnPageTransition): Deleted.
2463
2464         Move message sending logic fully to TiledCoreAnimationDrawingArea.
2465         Unfreezing the layer tree is sufficient to trigger the message.
2466
2467         * WebProcess/WebPage/WebPage.h:
2468         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2469         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2470         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
2471
2472         There is no need to treat process swap case differently.
2473
2474         (WebKit::TiledCoreAnimationDrawingArea::sendEnterAcceleratedCompositingModeIfNeeded):
2475
2476         Send this after the first successful layer flush with the root layer set.
2477
2478         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2479         (WebKit::TiledCoreAnimationDrawingArea::attach): Deleted.
2480
2481 2019-01-29  Timothy Hatcher  <timothy@apple.com>
2482
2483         Add back some includes that got removed at some point.
2484         https://bugs.webkit.org/show_bug.cgi?id=193942
2485
2486         Reviewed by Tim Horton.
2487
2488         * UIProcess/API/Cocoa/WKWebView.mm:
2489         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2490         * UIProcess/ios/PageClientImplIOS.h:
2491         * UIProcess/ios/PageClientImplIOS.mm:
2492
2493 2019-01-29  Chris Dumez  <cdumez@apple.com>
2494
2495         Make sure WTF::generateObjectIdentifier() internal counter does not get duplicated
2496         https://bugs.webkit.org/show_bug.cgi?id=193848
2497
2498         Reviewed by Youenn Fablet.
2499
2500         * Platform/IPC/Connection.cpp:
2501         (IPC::Connection::Connection):
2502         * UIProcess/ChildProcessProxy.h:
2503         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
2504         (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
2505         * UIProcess/WebBackForwardList.cpp:
2506         (WebKit::WebBackForwardList::restoreFromState):
2507         * UIProcess/WebProcessPool.cpp:
2508         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
2509         (WebKit::UserMediaPermissionRequestManager::addDeviceChangeObserver):
2510
2511 2019-01-29  Chris Dumez  <cdumez@apple.com>
2512
2513         REGRESSION (PSON): Twitter link gets stuck at t.co after navigating back in tab
2514         https://bugs.webkit.org/show_bug.cgi?id=193932
2515         <rdar://problem/47598947>
2516
2517         Reviewed by Brady Eidson.
2518
2519         When doing a client side redirect from origin A to origin B, we would swap process and
2520         create a SuspendedPageProxy and save it on the source BackForwardListItem. The issue is
2521         that the BackForwardList is locked for such redirect so we end up updating the current
2522         BackForwardListItem with origin B's URL while origin A's suspended page remained on
2523         the item. When going to another URL in the same origin A, we would not create a suspended
2524         page since no process-swap would occur. When pressing the back button, we would go back
2525         to the previous BackForwardListItem and use its SuspendedPageProxy, which is for the
2526         wrong URL (The pre-client redirect one).
2527
2528         To address the issue, we no longer create a SuspendedPageProxy for cross-site client side
2529         redirects. There will be no way no go back to this suspended page anyway since the
2530         back/forward list item will be updated with the redirection URL.
2531
2532         * UIProcess/WebPageProxy.cpp:
2533         (WebKit::WebPageProxy::suspendCurrentPageIfPossible):
2534
2535 2019-01-29  Chris Dumez  <cdumez@apple.com>
2536
2537         Regression(r240046) VoiceOver is no longer working after a process swap
2538         https://bugs.webkit.org/show_bug.cgi?id=193953
2539         <rdar://problem/47612398>
2540
2541         Reviewed by Alex Christensen.
2542
2543         ProvisionalPageProxy used to forward the RegisterWebProcessAccessibilityToken IPC from
2544         the provisional WebProcess to the WebPageProxy right away. This in turn would notify
2545         the PageClient whose logic would rely on WebPageProxy::process(), which returns the
2546         committed process instead of the provisional one.
2547
2548         To address the issue, the ProvisionalPageProxy now stores the token sent by the
2549         provisional WebProcess and we only call registerWebProcessAccessibilityToken()
2550         on the WebPageProxy *after* we've swapped to the provisional process.
2551
2552         * UIProcess/ProvisionalPageProxy.cpp:
2553         (WebKit::ProvisionalPageProxy::registerWebProcessAccessibilityToken):
2554         (WebKit::ProvisionalPageProxy::didReceiveMessage):
2555         * UIProcess/ProvisionalPageProxy.h:
2556         (WebKit::ProvisionalPageProxy::takeAccessibilityToken):
2557         * UIProcess/WebPageProxy.cpp:
2558         (WebKit::WebPageProxy::commitProvisionalPage):
2559
2560 2019-01-28  Ryosuke Niwa  <rniwa@webkit.org>
2561
2562         User agent string override for navigator.userAgent should be site specific quirks
2563         https://bugs.webkit.org/show_bug.cgi?id=193950
2564
2565         Reviewed by Brent Fulgham.
2566
2567         Renamed the various member variables, functions, properties and selectors.
2568
2569         * Shared/WebsitePoliciesData.cpp:
2570         (WebKit::WebsitePoliciesData::encode const):
2571         (WebKit::WebsitePoliciesData::decode):
2572         (WebKit::WebsitePoliciesData::applyToDocumentLoader):
2573         * Shared/WebsitePoliciesData.h:
2574         * UIProcess/API/APIWebsitePolicies.cpp:
2575         (API::WebsitePolicies::data):
2576         * UIProcess/API/APIWebsitePolicies.h:
2577         * UIProcess/API/Cocoa/_WKWebsitePolicies.h:
2578         * UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
2579         (-[_WKWebsitePolicies setCustomJavaScriptUserAgentAsSiteSpecificQuirks:]): Renamed from setCustomJavaScriptUserAgent.
2580         (-[_WKWebsitePolicies customJavaScriptUserAgentAsSiteSpecificQuirks]): Renamed from customJavaScriptUserAgent.
2581
2582 2019-01-28  Commit Queue  <commit-queue@webkit.org>
2583
2584         Unreviewed, rolling out r240630.
2585         https://bugs.webkit.org/show_bug.cgi?id=193958
2586
2587         Broke Apple internal builds (Requested by rniwa on #webkit).
2588
2589         Reverted changeset:
2590
2591         "Add back some includes that got removed at some point."
2592         https://bugs.webkit.org/show_bug.cgi?id=193942
2593         https://trac.webkit.org/changeset/240630
2594
2595 2019-01-28  Devin Rousso  <drousso@apple.com>
2596
2597         Web Inspector: provide a way to edit page WebRTC settings on a remote target
2598         https://bugs.webkit.org/show_bug.cgi?id=193863
2599         <rdar://problem/47572764>
2600
2601         Reviewed by Joseph Pecoraro.
2602
2603         * Shared/WebPreferences.yaml:
2604         Add page-level settings for WebRTC preferences.
2605
2606 2019-01-28  Ross Kirsling  <ross.kirsling@sony.com>
2607
2608         Remove unnecessary `using namespace WTF`s (or at least restrict their scope).
2609         https://bugs.webkit.org/show_bug.cgi?id=193941
2610
2611         Reviewed by Alex Christensen.
2612
2613         * Shared/linux/WebMemorySamplerLinux.cpp:
2614
2615 2019-01-28  Fujii Hironori  <Hironori.Fujii@sony.com>
2616
2617         [Win] WebCore/platform/Process.h is conflicting with process.h
2618         https://bugs.webkit.org/show_bug.cgi?id=193944
2619
2620         Reviewed by Ross Kirsling.
2621
2622         * Shared/ChildProcess.h:
2623         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
2624         * Shared/unix/ChildProcessMain.cpp:
2625         * UIProcess/API/APINavigation.h:
2626         * UIProcess/ChildProcessProxy.h:
2627         * UIProcess/Launcher/ProcessLauncher.h:
2628         * UIProcess/WebProcessPool.cpp:
2629         * UIProcess/WebProcessProxy.h:
2630
2631 2019-01-28  Jon Lee  <jonlee@apple.com>
2632
2633         Update Screen Capture preference
2634         https://bugs.webkit.org/show_bug.cgi?id=193947
2635         rdar://problem/47620199
2636
2637         Reviewed by Youenn Fablet.
2638
2639         * Shared/WebPreferences.yaml:
2640
2641 2019-01-28  Andy Estes  <aestes@apple.com>
2642
2643         [watchOS] Enable Parental Controls content filtering
2644         https://bugs.webkit.org/show_bug.cgi?id=193939
2645         <rdar://problem/46641912>
2646
2647         Reviewed by Ryosuke Niwa.
2648
2649         * Configurations/FeatureDefines.xcconfig:
2650
2651 2019-01-28  David Kilzer  <ddkilzer@apple.com>
2652
2653         REGRESSION (r236481): Move soft-linking of LocalAuthentication.framework out of LocalAuthenticationSoftLink.h
2654         <https://webkit.org/b/193884>
2655
2656         Reviewed by Jiewen Tan.
2657
2658         * SourcesCocoa.txt:
2659         * UnifiedSources-input.xcfilelist:
2660         * WebKit.xcodeproj/project.pbxproj:
2661         - Add LocalAuthenticationSoftLink.mm to the project.
2662
2663         * UIProcess/WebAuthentication/Cocoa/LocalAuthenticationSoftLink.h:
2664         * UIProcess/WebAuthentication/Cocoa/LocalAuthenticationSoftLink.mm: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticationSoftLink.h.
2665         - Move soft-linking implementation to
2666           LocalAuthenticationSoftLink.mm.
2667
2668 2019-01-28  Timothy Hatcher  <timothy@apple.com>
2669
2670         Add back some includes that got removed at some point.
2671         https://bugs.webkit.org/show_bug.cgi?id=193942
2672
2673         Reviewed by Tim Horton.
2674
2675         * UIProcess/API/Cocoa/WKWebView.mm:
2676         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2677         * UIProcess/ios/PageClientImplIOS.h:
2678         * UIProcess/ios/PageClientImplIOS.mm:
2679
2680 2019-01-28  Timothy Hatcher  <timothy@apple.com>
2681
2682         Make it easier for non-Apple ports to enable dark mode CSS support.
2683         https://bugs.webkit.org/show_bug.cgi?id=193882
2684
2685         Reviewed by Megan Gardner.
2686
2687         Make modern WebKit code for dark mode usable by other ports, to match
2688         the WebCore parts that have been cross-platform all along.
2689
2690         * Shared/WebPageCreationParameters.cpp:
2691         (WebKit::WebPageCreationParameters::encode const):
2692         (WebKit::WebPageCreationParameters::decode):
2693         * Shared/WebPageCreationParameters.h:
2694         * UIProcess/PageClient.h:
2695         (WebKit::PageClient::effectiveAppearanceIsDark const):
2696         * UIProcess/WebPageProxy.cpp:
2697         (WebKit::WebPageProxy::creationParameters):
2698         (WebKit::WebPageProxy::useDarkAppearance const):
2699         (WebKit::WebPageProxy::effectiveAppearanceDidChange):
2700         * UIProcess/WebPageProxy.h:
2701         * WebProcess/WebPage/WebPage.cpp:
2702         (WebKit::m_shouldAttachDrawingAreaOnPageTransition):
2703         (WebKit::WebPage::setUseDarkAppearance):
2704         * WebProcess/WebPage/WebPage.h:
2705         * WebProcess/WebPage/WebPage.messages.in:
2706
2707 2019-01-28  Andy Estes  <aestes@apple.com>
2708
2709         [Cocoa] Add SPI to _WKUserContentExtensionStore to retrieve its underlying WKContentRuleListStore
2710         https://bugs.webkit.org/show_bug.cgi?id=193927
2711
2712         Reviewed by Tim Horton.
2713
2714         This is useful for clients migrating from _WKUserContentExtensionStore to the modern
2715         WKContentRuleList* APIs.
2716
2717         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
2718         (-[_WKUserContentExtensionStore _contentRuleListStore]):
2719         * UIProcess/API/Cocoa/_WKUserContentExtensionStorePrivate.h:
2720
2721 2019-01-28  David Kilzer  <ddkilzer@apple.com>
2722
2723         Move soft-linking of ManagedConfiguration.framework out of ManagedConfigurationSPI.h
2724         <https://webkit.org/b/193868>
2725
2726         Reviewed by Daniel Bates.
2727
2728         * Platform/spi/ios/ManagedConfigurationSPI.h:
2729         - Remove soft-linking code from header.
2730         - Add PLATFORM(IOS_FAMILY) && !PLATFORM(IOSMAC) guard.
2731
2732         * UIProcess/ios/WKContentViewInteraction.mm:
2733         (-[WKContentView canPerformActionForWebView:withSender:]):
2734         (-[WKContentView _defineForWebView:]):
2735         - Add soft-linking code formerly in ManagedConfigurationSPI.h.
2736         - Change MCFeatureDefinitionLookupAllowed to use soft-link
2737           function getMCFeatureDefinitionLookupAllowed() to remove the
2738           #define.
2739
2740 2019-01-28  Per Arne Vollan  <pvollan@apple.com>
2741
2742         REGRESSION (r240348): Loading netflix home page panics device
2743         https://bugs.webkit.org/show_bug.cgi?id=193936
2744
2745         Reviewed by Alexey Proskuryakov.
2746
2747         Temporarily enable permissive call filtering.
2748
2749         * WebProcess/com.apple.WebProcess.sb.in:
2750
2751 2019-01-28  Joseph Pecoraro  <pecoraro@apple.com>
2752
2753         [iOS] Attempting to open a Keynote document to iCloud.com from iCloud Files causes crash
2754         https://bugs.webkit.org/show_bug.cgi?id=193456
2755         <rdar://problem/47275642>
2756
2757         Reviewed by Brent Fulgham.
2758
2759         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2760         Allow access to iconservices.
2761
2762 2019-01-28  Daniel Bates  <dabates@apple.com>
2763
2764         [iOS] Make Window virtual key code computation match Mac
2765         https://bugs.webkit.org/show_bug.cgi?id=193452
2766
2767         Reviewed by Ryosuke Niwa.
2768
2769         Compute the Windows virtual key code from the WebEvent.
2770
2771         * Shared/ios/WebIOSEventFactory.mm:
2772         (WebIOSEventFactory::createWebKeyboardEvent):
2773
2774 2019-01-28  Brent Fulgham  <bfulgham@apple.com>
2775
2776         REGRESSION (r240498): Storage Access API prompts result is not remembered
2777         https://bugs.webkit.org/show_bug.cgi?id=193922
2778         <rdar://problem/47608767>
2779
2780         Reviewed by Chris Dumez.
2781
2782         The refactoring in r240498 bypassed bookkeeping in ResourceLoadStatisticsMemoryStore
2783         that kept track of whether a successful user prompt had been encountered. This
2784         patch corrects this codepath so the user is not prompted repeatedly after approving
2785         use of the Storage Access API.
2786
2787         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
2788         (WebKit::WebResourceLoadStatisticsStore::grantStorageAccess): Switch from Move operator to
2789         const reference to allow the method to be called by the NetworkProcess.
2790         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
2791         * NetworkProcess/NetworkProcess.cpp:
2792         (WebKit::NetworkProcess::grantStorageAccess): Request access through the WebResourceLoadStatistics
2793         object, rather than jumping directly to the NetworkStorageSession.
2794
2795 2019-01-28  Chris Dumez  <cdumez@apple.com>
2796
2797         Regression(PSON) Crash under WebPageProxy::didStartProgress()
2798         https://bugs.webkit.org/show_bug.cgi?id=193915
2799         <rdar://problem/47560907>
2800
2801         Reviewed by Alex Christensen.
2802
2803         * UIProcess/WebPageProxy.cpp:
2804         (WebKit::WebPageProxy::close):
2805         Make sure we destroy the ProvisionalPageProxy if the page gets closed as we do not want to keep receiving
2806         IPC after this or even worse, commit the provisional page.
2807
2808         (WebKit::WebPageProxy::didStartProgress):
2809         Add an assertion in didStartProgress() to make sure we do not receive this IPC after the page has been
2810         closed.
2811
2812 2019-01-28  Antoine Quint  <graouts@apple.com>
2813
2814         Limit user-agent interactions based on the touch-action property on iOS
2815         https://bugs.webkit.org/show_bug.cgi?id=193447
2816
2817         Unreviewed build fix.
2818
2819         * UIProcess/API/Cocoa/WKWebView.mm:
2820
2821 2019-01-28  Antoine Quint  <graouts@apple.com>
2822
2823         Limit user-agent interactions based on the touch-action property on iOS
2824         https://bugs.webkit.org/show_bug.cgi?id=193447
2825
2826         Unreviewed build fix.
2827
2828         * UIProcess/ios/WKContentViewInteraction.mm:
2829
2830 2019-01-28  Brent Fulgham  <bfulgham@apple.com>
2831
2832         Remove the UIProcess components of the ResourceLoadStatistics code
2833         https://bugs.webkit.org/show_bug.cgi?id=193303
2834         <rdar://problem/47160073>
2835
2836         Reviewed by Chris Dumez.
2837
2838         Now that the ResourceLoadStatistics code is running in the NetworkProcess, we can get rid
2839         of the UIProcess copies of these routines.
2840
2841         Tested by existing ResourceLoadStatistics and StorageAccess tests.
2842
2843         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
2844         (WebKit::ResourceLoadStatisticsMemoryStore::updateClientSideCookiesAgeCap):
2845         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
2846         (WebKit::WebResourceLoadStatisticsStore::callHasStorageAccessForFrameHandler):
2847         (WebKit::WebResourceLoadStatisticsStore::callGrantStorageAccessHandler):
2848         (WebKit::WebResourceLoadStatisticsStore::removeAllStorageAccess):
2849         (WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCap):
2850         (WebKit::WebResourceLoadStatisticsStore::callUpdatePrevalentDomainsToBlockCookiesForHandler):
2851         (WebKit::WebResourceLoadStatisticsStore::callRemoveDomainsHandler):
2852         (WebKit::WebResourceLoadStatisticsStore::logTestingEvent):
2853         (WebKit::WebResourceLoadStatisticsStore::notifyResourceLoadStatisticsProcessed):
2854         (WebKit::WebResourceLoadStatisticsStore::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores):
2855         (WebKit::WebResourceLoadStatisticsStore::topPrivatelyControlledDomainsWithWebsiteData):
2856         (WebKit::WebResourceLoadStatisticsStore::sendDiagnosticMessageWithValue const):
2857         (WebKit::WebResourceLoadStatisticsStore::notifyPageStatisticsTelemetryFinished const):
2858         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
2859         * UIProcess/WebProcessProxy.cpp:
2860         (WebKit::WebProcessProxy::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores): Deleted.
2861         (WebKit::WebProcessProxy::topPrivatelyControlledDomainsWithWebsiteData): Deleted.
2862         * UIProcess/WebProcessProxy.h:
2863         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2864         (WebKit::WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains):
2865         (WebKit::WebsiteDataStore::removeData):
2866         (WebKit::WebsiteDataStore::setMaxStatisticsEntries):
2867         (WebKit::WebsiteDataStore::setPruneEntriesDownTo):
2868         (WebKit::WebsiteDataStore::setGrandfatheringTime):
2869         (WebKit::WebsiteDataStore::setMinimumTimeBetweenDataRecordsRemoval):
2870         (WebKit::WebsiteDataStore::dumpResourceLoadStatistics):
2871         (WebKit::WebsiteDataStore::isPrevalentResource):
2872         (WebKit::WebsiteDataStore::setPrevalentResource):
2873         (WebKit::WebsiteDataStore::setPrevalentResourceForDebugMode):
2874         (WebKit::WebsiteDataStore::isVeryPrevalentResource):
2875         (WebKit::WebsiteDataStore::setVeryPrevalentResource):
2876         (WebKit::WebsiteDataStore::setShouldClassifyResourcesBeforeDataRecordsRemoval):
2877         (WebKit::WebsiteDataStore::setSubframeUnderTopFrameOrigin):
2878         (WebKit::WebsiteDataStore::isRegisteredAsSubFrameUnder):
2879         (WebKit::WebsiteDataStore::setSubresourceUnderTopFrameOrigin):
2880         (WebKit::WebsiteDataStore::isRegisteredAsSubresourceUnder):
2881         (WebKit::WebsiteDataStore::setSubresourceUniqueRedirectTo):
2882         (WebKit::WebsiteDataStore::setSubresourceUniqueRedirectFrom):
2883         (WebKit::WebsiteDataStore::setTopFrameUniqueRedirectTo):
2884         (WebKit::WebsiteDataStore::setTopFrameUniqueRedirectFrom):
2885         (WebKit::WebsiteDataStore::isRegisteredAsRedirectingTo):
2886         (WebKit::WebsiteDataStore::clearPrevalentResource):
2887         (WebKit::WebsiteDataStore::resetParametersToDefaultValues):
2888         (WebKit::WebsiteDataStore::submitTelemetry):
2889         (WebKit::WebsiteDataStore::scheduleClearInMemoryAndPersistent):
2890         (WebKit::WebsiteDataStore::scheduleCookieBlockingUpdate):
2891         (WebKit::WebsiteDataStore::scheduleStatisticsAndDataRecordsProcessing):
2892         (WebKit::WebsiteDataStore::setLastSeen):
2893         (WebKit::WebsiteDataStore::setNotifyPagesWhenDataRecordsWereScanned):
2894         (WebKit::WebsiteDataStore::setNotifyPagesWhenTelemetryWasCaptured):
2895         (WebKit::WebsiteDataStore::hasStorageAccess):
2896         (WebKit::WebsiteDataStore::requestStorageAccess):
2897         (WebKit::WebsiteDataStore::grantStorageAccess):
2898         (WebKit::WebsiteDataStore::setTimeToLiveUserInteraction):
2899         (WebKit::WebsiteDataStore::logUserInteraction):
2900         (WebKit::WebsiteDataStore::hasHadUserInteraction):
2901         (WebKit::WebsiteDataStore::clearUserInteraction):
2902         (WebKit::WebsiteDataStore::setGrandfathered):
2903         (WebKit::WebsiteDataStore::webProcessWillOpenConnection):
2904         (WebKit::WebsiteDataStore::webProcessDidCloseConnection):
2905         (WebKit::WebsiteDataStore::setResourceLoadStatisticsDebugMode):
2906         (WebKit::WebsiteDataStore::didCreateNetworkProcess):
2907         (WebKit::WebsiteDataStore::topPrivatelyControlledDomainsWithWebsiteData): Deleted.
2908         (WebKit::WebsiteDataStore::removeDataForTopPrivatelyControlledDomains): Deleted.
2909         (WebKit::WebsiteDataStore::setCacheMaxAgeCap): Deleted.
2910         (WebKit::WebsiteDataStore::updatePrevalentDomainsToBlockCookiesFor): Deleted.
2911         (WebKit::WebsiteDataStore::setAgeCapForClientSideCookies): Deleted.
2912         (WebKit::WebsiteDataStore::hasStorageAccessForFrameHandler): Deleted.
2913         (WebKit::WebsiteDataStore::grantStorageAccessHandler): Deleted.
2914         (WebKit::WebsiteDataStore::removeAllStorageAccessHandler): Deleted.
2915         (WebKit::WebsiteDataStore::removePrevalentDomains): Deleted.
2916         (WebKit::WebsiteDataStore::isGrandfathered): Deleted.
2917         * UIProcess/WebsiteData/WebsiteDataStore.h:
2918
2919 2019-01-28  Antoine Quint  <graouts@apple.com>
2920
2921         Limit user-agent interactions based on the touch-action property on iOS
2922         https://bugs.webkit.org/show_bug.cgi?id=193447
2923         <rdar://problem/47283874>
2924
2925         Reviewed by Antti Koivisto and Simon Fraser.
2926
2927         Handle the "none", "pan-x", "pan-y" and "pinch-zoom" values for the touch-action property by querying the scrolling tree whenever a touch begins
2928         to identify whether its point is contained within the region of an element with a non-auto touch-action property. If it is, we use the list of
2929         permitted touch actions such to then customize the behavior of the nearest scroll view to pan or zoom only as instructed.
2930
2931         * Shared/WebCoreArgumentCoders.cpp:
2932         (IPC::ArgumentCoder<TouchActionData>::encode):
2933         (IPC::ArgumentCoder<TouchActionData>::decode):
2934         (IPC::ArgumentCoder<EventTrackingRegions>::encode):
2935         (IPC::ArgumentCoder<EventTrackingRegions>::decode):
2936         (IPC::ArgumentCoder<Region>::decode):
2937         * Shared/WebCoreArgumentCoders.h:
2938         * UIProcess/API/Cocoa/WKWebView.mm:
2939         (-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]): Account for panning constraints set on the content view to prevent deceleration
2940         to pan the view if it ought not.
2941         (-[WKWebView _scrollView:adjustedOffsetForOffset:translation:startPoint:locationInView:horizontalVelocity:verticalVelocity:]): Implement an additional
2942         UIScrollView delegation method to apply the panning constraints set on the content view while panning.
2943         * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
2944         (WebKit::RemoteScrollingCoordinatorProxy::touchActionDataAtPoint const):
2945         (WebKit::RemoteScrollingCoordinatorProxy::touchActionDataForScrollNodeID const):
2946         (WebKit::RemoteScrollingCoordinatorProxy::setTouchDataForTouchIdentifier):
2947         (WebKit::RemoteScrollingCoordinatorProxy::clearTouchDataForTouchIdentifier):
2948         * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
2949         * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h:
2950         * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
2951         (-[WKScrollingNodeScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]): Apply the same logic as in WKWebView.
2952         (-[WKScrollingNodeScrollViewDelegate _scrollView:adjustedOffsetForOffset:translation:startPoint:locationInView:horizontalVelocity:verticalVelocity:]): Apply
2953         the same logic as in WKWebView.
2954         (WebKit::ScrollingTreeScrollingNodeDelegateIOS::touchActionData const):
2955         * UIProcess/WebPageProxy.h:
2956         (WebKit::WebPageProxy::isScrollingOrZooming const):
2957         * UIProcess/ios/WKContentViewInteraction.h:
2958         * UIProcess/ios/WKContentViewInteraction.mm:
2959         (-[WKContentView preventsPanningInXAxis]):
2960         (-[WKContentView preventsPanningInYAxis]):
2961         (-[WKContentView cleanupInteraction]):
2962         (-[WKContentView _webTouchEventsRecognized:]):
2963         (-[WKContentView _handleTouchActionsForTouchEvent:]): As we process touches, check whether there are touch actions set for this touch's points' locations. Based
2964         on those touch actions, either setDefaultPrevented on the _touchEventGestureRecognizer if the touch action is "none" or selectively disable panning and zooming.
2965         (-[WKContentView _resetPanningPreventionFlags]):
2966         (-[WKContentView _didEndScrollingOrZooming]):
2967
2968 2019-01-28  Antti Koivisto  <antti@apple.com>
2969
2970         WebUserContentController::removeUserScriptMessageHandlerInternal may deref and delete itself
2971         https://bugs.webkit.org/show_bug.cgi?id=193901
2972         <rdar://problem/47338669>
2973
2974         Reviewed by David Kilzer.
2975
2976         Don't know how to repro.
2977
2978         * WebProcess/UserContent/WebUserContentController.cpp:
2979         (WebKit::WebUserContentController::removeUserScriptMessageHandlerInternal):
2980
2981         Calling userMessageHandlers.removeFirstMatching() may remove the last ref to this
2982         (because WebUserMessageHandlerDescriptorProxy refs WebUserContentController).
2983         Fix by protecting this over the function.
2984
2985 2018-12-15  Darin Adler  <darin@apple.com>
2986
2987         Replace many uses of String::format with more type-safe alternatives
2988         https://bugs.webkit.org/show_bug.cgi?id=192742
2989
2990         Reviewed by Mark Lam.
2991
2992         * Shared/WebMemorySampler.cpp:
2993         (WebKit::WebMemorySampler::writeHeaders): Use makeString.
2994
2995         * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
2996         (WebKit::LocalAuthenticator::makeCredential): Use string concatentation.
2997
2998         * UIProcess/WebInspectorUtilities.cpp:
2999         (WebKit::inspectorPageGroupIdentifierForPage): Use makeString.
3000         * UIProcess/WebProcessPool.cpp:
3001         (WebKit::WebProcessPool::processDidFinishLaunching): Ditto.
3002         (WebKit::WebProcessPool::startMemorySampler): Ditto.
3003
3004 2019-01-27  Jiewen Tan  <jiewen_tan@apple.com>
3005
3006         Use a load optimizer for some sites
3007         https://bugs.webkit.org/show_bug.cgi?id=193881
3008         <rdar://problem/46325455>
3009
3010         Reviewed by Brent Fulgham.
3011
3012         We will try to speed up some sites with a dedicated load optimizer. The load optimizer lives
3013         within the WebsiteDataStore as one client instance should have only one and it should live
3014         as long as the client lives. How does the load optimizer work? It intercepts every load in
3015         the navigation state. If a request meets some requirements, it will then fetch the request
3016         from its own cache. Once the fetch succeeds, the original load will be ignored and the
3017         optimizer will display the cached content.
3018
3019         Covered by API tests.
3020
3021         * SourcesCocoa.txt:
3022         * UIProcess/Cocoa/LoadOptimizer.h: Added.
3023         * UIProcess/Cocoa/LoadOptimizer.mm: Added.
3024         * UIProcess/Cocoa/MediaCaptureUtilities.h:
3025         * UIProcess/Cocoa/NavigationState.mm:
3026         (WebKit::tryInterceptNavigation):
3027         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
3028         (WebKit::tryAppLink): Deleted.
3029         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3030         (WebKit::WebsiteDataStore::WebsiteDataStore):
3031         * UIProcess/WebsiteData/WebsiteDataStore.h:
3032         (WebKit::WebsiteDataStore::loadOptimizer):
3033         * WebKit.xcodeproj/project.pbxproj:
3034
3035 2019-01-25  Brian Burg  <bburg@apple.com>
3036
3037         Web Automation: add support for simulating single touches to Automation.performInteractionSequence
3038         https://bugs.webkit.org/show_bug.cgi?id=193852
3039         <rdar://problem/28360781>
3040
3041         Reviewed by Joseph Pecoraro and Simon Fraser.
3042
3043         This patch makes it possible to simulate touches via the Actions API. The approach is to
3044         use a stripped down version of HIDEventGenerator to send HID events to the UIWindow.
3045         The initial version supports a single touch point; this may be expanded if needed, but
3046         so far it hasn't been an impediment when running desktop-oriented WebDriver test suites.
3047
3048         As part of implementing this support, I went through and added [somewhat obnoxious] ENABLE()
3049         guards so that we don't mistakenly compile mouse support on iOS and touch on Mac,
3050         and vice versa. Each of the interaction methods---touch, mouse, keyboard---can be independently
3051         compiled out. If none is supported (i.e., Windows), then we don't even try to compile
3052         platformSimulate*Interaction methods or SimulatedInputDispatcher. This allows WebAutomationSession
3053         to not include members and code that are never going to be used on a particular platform.
3054
3055         This functionality is covered by existing WebDriver test suites that use Element Click command.
3056         Additional tests that explicitly include 'touch' pointerType will be submitted to WPT later.
3057
3058         * UIProcess/Automation/Automation.json: Update comment.
3059
3060         * UIProcess/Automation/SimulatedInputDispatcher.h:
3061         * UIProcess/Automation/SimulatedInputDispatcher.cpp:
3062         (WebKit::SimulatedInputDispatcher::transitionInputSourceToState):
3063         - Add appropriate guards for code specific to each interaction type.
3064         - Handle SimulatedInputSourceType::Touch and call out to dispatch events.
3065
3066         * UIProcess/Automation/WebAutomationSession.h:
3067         * UIProcess/Automation/WebAutomationSession.cpp:
3068         (WebKit::WebAutomationSession::WebAutomationSession):
3069         (WebKit::WebAutomationSession::terminate):
3070         (WebKit::WebAutomationSession::willShowJavaScriptDialog):
3071         (WebKit::WebAutomationSession::mouseEventsFlushedForPage):
3072         (WebKit::WebAutomationSession::keyboardEventsFlushedForPage):
3073         (WebKit::WebAutomationSession::willClosePage):
3074         Add appropriate guards for code specific to each interaction type.
3075
3076         (WebKit::WebAutomationSession::isSimulatingUserInteraction const):
3077         Add new hook so that we can detect when a touch simulation is in progress.
3078         We don't rely on checking WebKit's event queue, so use a flag.
3079
3080         (WebKit::WebAutomationSession::simulateTouchInteraction):
3081         (WebKit::WebAutomationSession::performMouseInteraction):
3082         (WebKit::WebAutomationSession::performKeyboardInteractions):
3083         (WebKit::WebAutomationSession::cancelInteractionSequence):
3084         (WebKit::WebAutomationSession::performInteractionSequence):
3085         - Add appropriate guards for code specific to each interaction type.
3086         - Bail out immediately if a requested interaction type is not supported.
3087         - Shim Touch input type to Mouse if mouse is not supported but touches are.
3088         Nearly all WebDriver tests in the wild will be requesting a 'mouse' pointerType,
3089         so this is necessary for compatibility. It's easier to shim at this level than try
3090         to implement platformSimulateMouseInteraction for iOS because
3091         platformSimulateMouseinteraction does not use a completion handler but the iOS
3092         implementation would require that.
3093
3094         (WebKit::WebAutomationSession::platformSimulateMouseInteraction): Deleted.
3095         (WebKit::WebAutomationSession::platformSimulateKeyboardInteraction): Deleted.
3096         - Remove these stubs. Platform methods of this class are no longer being filled
3097         with stubs on unsupported platforms because we expect the command to fail earlier.
3098
3099         * UIProcess/Automation/ios/WebAutomationSessionIOS.mm:
3100         (WebKit::WebAutomationSession::platformSimulateTouchInteraction):
3101         - Add appropriate guards for code specific to each interaction type.
3102         - Implement new platform method to simulate touches. This uses _WKTouchEventGenerator.
3103
3104         * UIProcess/Automation/mac/WebAutomationSessionMac.mm:
3105         Add appropriate guards for code specific to each interaction type.
3106
3107         * UIProcess/_WKTouchEventGenerator.h: Added.
3108         * UIProcess/_WKTouchEventGenerator.mm: Added.
3109         (simpleCurveInterpolation):
3110         (calculateNextCurveLocation):
3111         (delayBetweenMove):
3112         (+[_WKTouchEventGenerator sharedTouchEventGenerator]):
3113         (+[_WKTouchEventGenerator nextEventCallbackID]):
3114         (-[_WKTouchEventGenerator init]):
3115         (-[_WKTouchEventGenerator dealloc]):
3116         (-[_WKTouchEventGenerator _createIOHIDEventType:]):
3117         (-[_WKTouchEventGenerator _sendHIDEvent:]):
3118         (-[_WKTouchEventGenerator _sendMarkerHIDEventWithCompletionBlock:]):
3119         (-[_WKTouchEventGenerator _updateTouchPoints:count:]):
3120         (-[_WKTouchEventGenerator touchDownAtPoints:touchCount:]):
3121         (-[_WKTouchEventGenerator touchDown:touchCount:]):
3122         (-[_WKTouchEventGenerator touchDown:]):
3123         (-[_WKTouchEventGenerator liftUpAtPoints:touchCount:]):
3124         (-[_WKTouchEventGenerator liftUp:touchCount:]):
3125         (-[_WKTouchEventGenerator liftUp:]):
3126         (-[_WKTouchEventGenerator moveToPoints:touchCount:duration:]):
3127         (-[_WKTouchEventGenerator touchDown:completionBlock:]):
3128         (-[_WKTouchEventGenerator liftUp:completionBlock:]):
3129         (-[_WKTouchEventGenerator moveToPoint:duration:completionBlock:]):
3130         (-[_WKTouchEventGenerator receivedHIDEvent:]):
3131         Copied and simplified from HIDEventGenerator in WebKitTestRunner.
3132
3133         * WebKit.xcodeproj/project.pbxproj:
3134         Add _WKTouchEventGenerator.{h,mm} and make it a private header. The client needs to
3135         route received HID events to -receivedHIDEvent: in order to detect when the marker
3136         HID event has been processed (and thus the interaction is completed).
3137
3138         * config.h: Add ENABLE(WEBDRIVER_*_INTERACTIONS) macros here.
3139
3140 2019-01-26  Simon Fraser  <simon.fraser@apple.com>
3141
3142         Have composited RenderIFrame layers make FrameHosting scrolling tree nodes to parent the iframe's scrolling node
3143         https://bugs.webkit.org/show_bug.cgi?id=193879
3144
3145         Reviewed by Antti Koivisto.
3146
3147         Need a specialization of dump() for ScrollingStateFrameHostingNode to avoid infinite recursion.
3148
3149         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
3150         (WebKit::dump):
3151
3152 2019-01-27  Chris Fleizach  <cfleizach@apple.com>
3153
3154         AX: Introduce a static accessibility tree
3155         https://bugs.webkit.org/show_bug.cgi?id=193348
3156         <rdar://problem/47203295>
3157
3158         Reviewed by Ryosuke Niwa.
3159
3160         * Configurations/FeatureDefines.xcconfig:
3161         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
3162         (-[WKAccessibilityWebPageObjectBase accessibilityRootObjectWrapper]):
3163
3164 2019-01-26  Simon Fraser  <simon.fraser@apple.com>
3165
3166         Allow scrolling tree nodes to exist in a detached state
3167         https://bugs.webkit.org/show_bug.cgi?id=193754
3168
3169         Reviewed by Zalan Bujtas.
3170
3171         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
3172         (WebKit::RemoteScrollingCoordinatorTransaction::decode):
3173
3174 2019-01-25  Tim Horton  <timothy_horton@apple.com>
3175
3176         REGRESSION (r238818): Snapshot is removed too late after swiping back on Twitter
3177         https://bugs.webkit.org/show_bug.cgi?id=193860
3178         <rdar://problem/47535022>
3179
3180         Reviewed by Antti Koivisto.
3181
3182         * UIProcess/Cocoa/ViewGestureController.cpp:
3183         (WebKit::ViewGestureController::didStartProvisionalOrSameDocumentLoadForMainFrame):
3184         (WebKit::ViewGestureController::didStartProvisionalLoadForMainFrame):
3185         (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
3186         * UIProcess/Cocoa/ViewGestureController.h:
3187         Treat provisional load and same document load the same: they already both
3188         unpause the snapshot removal tracker, request render tree size notifications,
3189         but same-document navigation was missing the call to dispatchAfterEnsuringDrawing
3190         and thus would get stuck waiting for RepaintAfterNavigation.
3191
3192 2019-01-25  Ryosuke Niwa  <rniwa@webkit.org>
3193
3194         Need a mechanism to override navigator.userAgent
3195         https://bugs.webkit.org/show_bug.cgi?id=193762
3196         <rdar://problem/47504939>
3197
3198         Reviewed by Brent Fulgham.
3199
3200         This patch adds a new _WKWebsitePolicies SPI to specify the user agent string returned by
3201         navigator.userAgent without affecting the user agent string used to send network requests.
3202
3203         Tests: WebKit.WebsitePoliciesCustomJavaScriptUserAgent
3204                WebKit.WebsitePoliciesCustomUserAgents
3205
3206         * Shared/WebsitePoliciesData.cpp:
3207         (WebKit::WebsitePoliciesData::encode const):
3208         (WebKit::WebsitePoliciesData::decode):
3209         (WebKit::WebsitePoliciesData::applyToDocumentLoader):
3210         * Shared/WebsitePoliciesData.h:
3211         * UIProcess/API/APIWebsitePolicies.cpp:
3212         (API::WebsitePolicies::data):
3213         * UIProcess/API/APIWebsitePolicies.h:
3214         * UIProcess/API/Cocoa/_WKWebsitePolicies.h:
3215         * UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
3216         (-[_WKWebsitePolicies setCustomJavaScriptUserAgent:]):
3217         (-[_WKWebsitePolicies customJavaScriptUserAgent]):
3218
3219 2019-01-25  Devin Rousso  <drousso@apple.com>
3220
3221         Web Inspector: provide a way to edit page settings on a remote target
3222         https://bugs.webkit.org/show_bug.cgi?id=193813
3223         <rdar://problem/47359510>
3224
3225         Reviewed by Joseph Pecoraro.
3226
3227         * WebProcess/WebPage/WebInspectorUI.h:
3228         (WebKit::WebInspectorUI::isRemote() const): Added.
3229         * WebProcess/WebPage/RemoteWebInspectorUI.h:
3230         (WebKit::RemoteWebInspectorUI::isRemote() const): Added.
3231
3232 2019-01-25  Dean Jackson  <dino@apple.com>
3233
3234         REGRESSION: Some USDz from 3rd party websites don't go directly to AR QL
3235         https://bugs.webkit.org/show_bug.cgi?id=193831
3236         <rdar://problem/47399263>
3237
3238         Reviewed by Chris Dumez.
3239
3240         A System Preview (<a rel="ar">) displays in a modal and doesn't trigger
3241         a navigation. If the link was cross origin, it was causing a process swap,
3242         which meant that the response defaulted back to a navigation.
3243
3244         The fix is to not cause a PSON when the navigation is a system preview.
3245
3246         * UIProcess/API/APINavigation.h:
3247         (API::Navigation::shouldForceDownload const): This is now just tracking
3248         the "download" attribute, and not including System Preview.
3249         (API::Navigation::isSystemPreview const): New method to check for a
3250         navigation triggered as a System Preview.
3251         * UIProcess/WebPageProxy.cpp: Move the code from receivedPolicyDecision to
3252         receivedNavigationPolicyDecision, so that downloads and System Previews are
3253         detected before we decide to change process.
3254         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
3255         (WebKit::WebPageProxy::receivedPolicyDecision):
3256
3257 2019-01-25  Tim Horton  <timothy_horton@apple.com>
3258
3259         Find-in-page on nyt.com scrolls around without touching the screen when find holes are visible
3260         https://bugs.webkit.org/show_bug.cgi?id=193853
3261
3262         Reviewed by Simon Fraser.
3263
3264         * WebProcess/WebPage/ios/FindControllerIOS.mm:
3265         (WebKit::FindController::updateFindIndicator):
3266         There is no reason to scroll/zoom to the find indicator just because the
3267         holes are up, we should only do it on initial indicator presentation.
3268         This was a mistake in r178755 that was previously never exercised because
3269         isShowingOverlay was always false.
3270
3271 2019-01-25  Keith Rollin  <krollin@apple.com>
3272
3273         Update Xcode projects with "Check .xcfilelists" build phase
3274         https://bugs.webkit.org/show_bug.cgi?id=193790
3275         <rdar://problem/47201374>
3276
3277         Reviewed by Alex Christensen.
3278
3279         Support for XCBuild includes specifying inputs and outputs to various
3280         Run Script build phases. These inputs and outputs are specified as
3281         .xcfilelist files. Once created, these .xcfilelist files need to be
3282         kept up-to-date. In order to check that they are up-to-date or not,
3283         add an Xcode build step that invokes an external script that performs
3284         the checking. If the .xcfilelists are found to be out-of-date, update
3285         them, halt the build, and instruct the developer to restart the build
3286         with up-to-date files.
3287
3288         At this time, the checking and regenerating is performed only if the
3289         WK_ENABLE_CHECK_XCFILELISTS environment variable is set to 1. People
3290         who want to use this facility can set this variable and test out the
3291         checking/regenerating. Once it seems like there are no egregious
3292         issues that upset a developer's workflow, we'll unconditionally enable
3293         this facility.
3294
3295         * Scripts/check-xcfilelists.sh: Added.
3296         * WebKit.xcodeproj/project.pbxproj:
3297
3298 2019-01-25  Alex Christensen  <achristensen@webkit.org>
3299
3300         Move logic from ChildProcess::setApplicationIsDaemon to NetworkProcess::initializeProcess
3301         https://bugs.webkit.org/show_bug.cgi?id=193844
3302
3303         Reviewed by Andy Estes.
3304
3305         This simplifies ChildProcess and removes NetworkProcess-specific code from this generic abstraction.
3306
3307         * NetworkProcess/mac/NetworkProcessMac.mm:
3308         (WebKit::NetworkProcess::initializeProcess):
3309         * Shared/ios/ChildProcessIOS.mm:
3310         (WebKit::ChildProcess::setApplicationIsDaemon): Deleted.
3311         * Shared/mac/ChildProcessMac.mm:
3312         (WebKit::ChildProcess::setApplicationIsDaemon): Deleted.
3313
3314 2019-01-25  Keith Rollin  <krollin@apple.com>
3315
3316         Update Xcode projects with "Apply Configuration to XCFileLists" build target
3317         https://bugs.webkit.org/show_bug.cgi?id=193781
3318         <rdar://problem/47201153>
3319
3320         Reviewed by Alex Christensen.
3321
3322         Part of generating the .xcfilelists used as part of adopting XCBuild
3323         includes running `make DerivedSources.make` from a standalone script.
3324         It’s important for this invocation to have the same environment as
3325         when the actual build invokes `make DerivedSources.make`. If the
3326         environments are different, then the two invocations will provide
3327         different results. In order to get the same environment in the
3328         standalone script, have the script launch xcodebuild targeting the
3329         "Apply Configuration to XCFileLists" build target, which will then
3330         re-invoke our standalone script. The script is now running again, this
3331         time in an environment with all workspace, project, target, xcconfig
3332         and other environment variables established.
3333
3334         The "Apply Configuration to XCFileLists" build target accomplishes
3335         this task via a small embedded shell script that consists only of:
3336
3337             eval "${WK_SUBLAUNCH_SCRIPT_PARAMETERS[@]}"
3338
3339         The process that invokes "Apply Configuration to XCFileLists" first
3340         sets WK_SUBLAUNCH_SCRIPT_PARAMETERS to an array of commands to be
3341         evaluated and exports it into the shell environment. When xcodebuild
3342         is invoked, it inherits the value of this variable and can `eval` the
3343         contents of that variable. Our external standalone script can then set
3344         WK_SUBLAUNCH_SCRIPT_PARAMETERS to the path to itself, along with a set
3345         of command-line parameters needed to restart itself in the appropriate
3346         state.
3347
3348         * WebKit.xcodeproj/project.pbxproj:
3349
3350 2019-01-25  Alex Christensen  <achristensen@webkit.org>
3351
3352         Add SPI to inform an application that "Go Back" has been clicked from a safe browsing warning
3353         https://bugs.webkit.org/show_bug.cgi?id=193802
3354         <rdar://problem/46010580>
3355
3356         Reviewed by Andy Estes.
3357
3358         * UIProcess/API/APIUIClient.h:
3359         (API::UIClient::didClickGoBackFromSafeBrowsingWarning):
3360         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
3361         * UIProcess/Cocoa/UIDelegate.h:
3362         * UIProcess/Cocoa/UIDelegate.mm:
3363         (WebKit::UIDelegate::setDelegate):
3364         (WebKit::UIDelegate::UIClient::didClickGoBackFromSafeBrowsingWarning):
3365         * UIProcess/WebPageProxy.cpp:
3366         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
3367
3368 2019-01-25  Daniel Bates  <dabates@apple.com>
3369
3370         [iOS] Pressing Tab key doesn't move to next cell with Google Sheets
3371         https://bugs.webkit.org/show_bug.cgi?id=193048
3372         <rdar://problem/46433836>
3373
3374         Reviewed by Brent Fulgham.
3375
3376         WebCore knows how interpret the Tab and Shift + Tab keys. When building with UIKit keyboard additions
3377         we do not need to register key commands for handling them from the UIProcess code. Instead UIKit will
3378         sends key events for these commands to us. This will make the behavior of these key commands when executed
3379         in an editable field match the behavior of these command when executed in a non-editable field since
3380         both code paths will now go through WebCore.
3381
3382         * UIProcess/ios/WKContentViewInteraction.mm:
3383         (-[WKContentView keyCommands]): Only compile when building with !USE(UIKIT_KEYBOARD_ADDITIONS).
3384
3385 2019-01-25  Alex Christensen  <achristensen@webkit.org>
3386
3387         Fix Linux build.
3388
3389         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3390         (WebKit::NetworkConnectionToWebProcess::requestResourceLoadStatisticsUpdate):
3391
3392 2019-01-25  Keith Rollin  <krollin@apple.com>
3393
3394         Update WebKitAdditions.xcconfig with correct order of variable definitions
3395         https://bugs.webkit.org/show_bug.cgi?id=193793
3396         <rdar://problem/47532439>
3397
3398         Reviewed by Alex Christensen.
3399
3400         XCBuild changes the way xcconfig variables are evaluated. In short,
3401         all config file assignments are now considered in part of the
3402         evaluation. When using the new build system and an .xcconfig file
3403         contains multiple assignments of the same build setting:
3404
3405         - Later assignments using $(inherited) will inherit from earlier
3406           assignments in the xcconfig file.
3407         - Later assignments not using $(inherited) will take precedence over
3408           earlier assignments. An assignment to a more general setting will
3409           mask an earlier assignment to a less general setting. For example,
3410           an assignment without a condition ('FOO = bar') will completely mask
3411           an earlier assignment with a condition ('FOO[sdk=macos*] = quux').
3412
3413         This affects some of our .xcconfig files, in that sometimes platform-
3414         or sdk-specific definitions appear before the general definitions.
3415         Under the new evaluations rules, the general definitions alway take
3416         effect because they always overwrite the more-specific definitions. The
3417         solution is to swap the order, so that the general definitions are
3418         established first, and then conditionally overwritten by the
3419         more-specific definitions.
3420
3421         * Configurations/BaseTarget.xcconfig:
3422         * Configurations/Version.xcconfig:
3423         * Configurations/WebKit.xcconfig:
3424
3425 2019-01-25  Keith Rollin  <krollin@apple.com>
3426
3427         Update existing .xcfilelists
3428         https://bugs.webkit.org/show_bug.cgi?id=193791
3429         <rdar://problem/47201706>
3430
3431         Reviewed by Alex Christensen.
3432
3433         Many .xcfilelist files were added in r238824 in order to support
3434         XCBuild. Update these with recent changes to the set of build files
3435         and with the current generate-xcfilelist script.
3436
3437         * DerivedSources-input.xcfilelist:
3438         * DerivedSources-output.xcfilelist:
3439         * UnifiedSources-input.xcfilelist:
3440         * UnifiedSources-output.xcfilelist:
3441
3442 2019-01-25  Per Arne Vollan  <pvollan@apple.com>
3443
3444         [iOS] Deny mach lookups to services not used.
3445         https://bugs.webkit.org/show_bug.cgi?id=193828
3446
3447         Reviewed by Brent Fulgham.
3448
3449         Start denying mach lookups to iOS services, which were previously allowed with reporting.
3450         Living-on has indicated that these services are not used.
3451
3452         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
3453
3454 2019-01-25  Brent Fulgham  <bfulgham@apple.com>
3455
3456         Activate the WebResourceLoadStatisticsStore in the NetworkProcess and deactivate it in the UIProcess.
3457         https://bugs.webkit.org/show_bug.cgi?id=193297
3458         <rdar://problem/47158841>
3459
3460         Reviewed by Alex Christensen.
3461
3462         This patch activates the ResourceLoadStatistics code in the NetworkProcess, and turns
3463         it off in the UIProcess. It also updates test infrastructure to work with this change
3464         in architecture.
3465
3466         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
3467         (WebKit::ResourceLoadStatisticsMemoryStore::logSubresourceLoading): Added.
3468         (WebKit::ResourceLoadStatisticsMemoryStore::logSubresourceRedirect): Added.
3469         (WebKit::ResourceLoadStatisticsMemoryStore::logWebSocketLoading): Added.
3470         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
3471         (WebKit::WebResourceLoadStatisticsStore::logSubresourceLoading): Added.
3472         (WebKit::WebResourceLoadStatisticsStore::logSubresourceRedirect): Added.
3473         (WebKit::WebResourceLoadStatisticsStore::logWebSocketLoading): Added.
3474         (WebKit::WebResourceLoadStatisticsStore::removeAllStorageAccess):
3475         (WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCap):
3476         (WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCapForPrevalentResources): Deleted.
3477         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
3478         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3479         (WebKit::NetworkConnectionToWebProcess::logSubresourceLoading): Added.
3480         (WebKit::NetworkConnectionToWebProcess::logSubresourceRedirect): Added.
3481         (WebKit::NetworkConnectionToWebProcess::logWebSocketLoading): Added.
3482         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
3483         * NetworkProcess/NetworkSession.cpp:
3484         (WebKit::NetworkSession::setResourceLoadStatisticsEnabled):
3485         * UIProcess/WebProcessPool.cpp:
3486         (WebKit::WebProcessPool::ensureNetworkProcess):
3487         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
3488         (WebKit::WebsiteDataStore::parameters):
3489         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3490         (WebKit::WebsiteDataStore::removeData):
3491         (WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):
3492         (WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):
3493         * Webprocess/WebProcess.cpp:
3494         (WebKit::WebProcess::initializeWebProcess): Register new ResourceLoadObserver callbacks.
3495
3496 2019-01-25  Ryosuke Niwa  <rniwa@webkit.org>
3497
3498         iOS: inputmode="none" disables hardware keyboard's globe key
3499         https://bugs.webkit.org/show_bug.cgi?id=193811
3500         <rdar://problem/47406553>
3501
3502         Reviewed by Wenson Hsieh.
3503
3504         Removed the support for inputmode="none" for now since we need a new SPI from UIKit
3505         to properly implement this feature some time in the future.
3506
3507         * UIProcess/ios/WKContentViewInteraction.mm:
3508         (-[WKContentView _zoomToRevealFocusedElement]):
3509         (-[WKContentView inputView]):
3510         (-[WKContentView requiresAccessoryView]):
3511         (-[WKContentView textInputTraits]):
3512
3513 2019-01-25  David Kilzer  <ddkilzer@apple.com>
3514
3515         Move soft-linking of Lookup.framework out of LookupSPI.h
3516         <https://webkit.org/b/193815>
3517
3518         Reviewed by Tim Horton.
3519
3520         * UIProcess/Cocoa/WebViewImpl.mm:
3521         (-[WKWindowVisibilityObserver dealloc]):
3522         (-[WKWindowVisibilityObserver startObservingLookupDismissalIfNeeded]):
3523         - Move soft-linking to LookupSoftLink.{h,mm}.
3524
3525 2019-01-25  Antti Koivisto  <antti@apple.com>
3526
3527         REGRESSION (PSON): After swipe back, first few attempts to swipe forward not recognized as swipe gestures
3528         https://bugs.webkit.org/show_bug.cgi?id=193818
3529         <rdar://problem/47456584>
3530
3531         Reviewed by Tim Horton.
3532
3533         We don't hit the RenderTreeSizeThreshold milestone to remove the snapshot and allow interaction because we request it
3534         from a wrong process (the one we are leaving behind).
3535
3536         * UIProcess/Cocoa/ViewGestureController.cpp:
3537         (WebKit::ViewGestureController::didStartProvisionalLoadForMainFrame):
3538
3539         Request the RenderTreeSizeThreshold notification when the load has started and we know the process to use.
3540
3541         (WebKit::ViewGestureController::SnapshotRemovalTracker::hasOutstandingEvent):
3542         * UIProcess/Cocoa/ViewGestureController.h:
3543         (WebKit::ViewGestureController::SnapshotRemovalTracker::renderTreeSizeThreshold const):
3544         (WebKit::ViewGestureController::SnapshotRemovalTracker::setRenderTreeSizeThreshold):
3545         * UIProcess/mac/ViewGestureControllerMac.mm:
3546         (WebKit::ViewGestureController::endSwipeGesture):
3547
3548         Don't request immediately, save the threshold to SnapshotRemovalTracker.
3549
3550         (WebKit::ViewGestureController::requestRenderTreeSizeNotificationIfNeeded):
3551
3552         Do the request to the right process.
3553
3554         * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
3555         (WebKit::ViewGestureGeometryCollector::setRenderTreeSizeNotificationThreshold):
3556
3557         Ensure we send the notification even if we reached the threshold before it was requested.
3558
3559         (WebKit::ViewGestureGeometryCollector::sendDidHitRenderTreeSizeThresholdIfNeeded):
3560         (WebKit::ViewGestureGeometryCollector::mainFrameDidLayout):
3561         * WebProcess/WebPage/ViewGestureGeometryCollector.h:
3562         (WebKit::ViewGestureGeometryCollector::setRenderTreeSizeNotificationThreshold): Deleted.
3563
3564 2019-01-25  Wenson Hsieh  <wenson_hsieh@apple.com>
3565
3566         [iOS] Rename some WebKit-internal functions and variables that reference "data interaction"
3567         https://bugs.webkit.org/show_bug.cgi?id=193829
3568
3569         Reviewed by Tim Horton.
3570
3571         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
3572         (WebKit::WebPageProxy::setDragCaretRect):
3573         * UIProcess/PageClient.h:
3574         * UIProcess/WebPageProxy.h:
3575         * UIProcess/WebPageProxy.messages.in:
3576         * UIProcess/ios/PageClientImplIOS.h:
3577         * UIProcess/ios/PageClientImplIOS.mm:
3578         (WebKit::PageClientImpl::didHandleDragStartRequest):
3579         (WebKit::PageClientImpl::didConcludeEditDrag):
3580         (WebKit::PageClientImpl::didChangeDragCaretRect):
3581         (WebKit::PageClientImpl::didHandleStartDataInteractionRequest): Deleted.
3582         (WebKit::PageClientImpl::didConcludeEditDataInteraction): Deleted.
3583         (WebKit::PageClientImpl::didChangeDataInteractionCaretRect): Deleted.
3584         * UIProcess/ios/WKContentViewInteraction.h:
3585         * UIProcess/ios/WKContentViewInteraction.mm:
3586         (-[WKContentView setupInteraction]):
3587         (-[WKContentView cleanupInteraction]):
3588         (-[WKContentView setupDragAndDropInteractions]):
3589         (-[WKContentView teardownDragAndDropInteractions]):
3590         (-[WKContentView _didHandleDragStartRequest:]):
3591         (-[WKContentView _didConcludeEditDrag:]):
3592         (-[WKContentView _didChangeDragCaretRect:currentRect:]):
3593         (-[WKContentView _dragInteraction:prepareForSession:completion:]):
3594         (-[WKContentView setupDataInteractionDelegates]): Deleted.
3595         (-[WKContentView teardownDataInteractionDelegates]): Deleted.
3596         (-[WKContentView _didHandleStartDataInteractionRequest:]): Deleted.
3597         (-[WKContentView _didConcludeEditDataInteraction:]): Deleted.
3598         (-[WKContentView _didChangeDataInteractionCaretRect:currentRect:]): Deleted.
3599         * UIProcess/ios/WebPageProxyIOS.mm:
3600         (WebKit::WebPageProxy::didHandleDragStartRequest):
3601         (WebKit::WebPageProxy::requestDragStart):
3602         (WebKit::WebPageProxy::didConcludeEditDrag):
3603         (WebKit::WebPageProxy::didHandleStartDataInteractionRequest): Deleted.
3604         (WebKit::WebPageProxy::requestStartDataInteraction): Deleted.
3605         (WebKit::WebPageProxy::didConcludeEditDataInteraction): Deleted.
3606         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
3607         (WebKit::WebDragClient::didConcludeEditDrag):
3608         * WebProcess/WebPage/WebPage.h:
3609         * WebProcess/WebPage/WebPage.messages.in:
3610         * WebProcess/WebPage/ios/WebPageIOS.mm:
3611         (WebKit::WebPage::requestDragStart):
3612         (WebKit::WebPage::requestAdditionalItemsForDragSession):
3613         (WebKit::WebPage::didConcludeEditDrag):
3614         (WebKit::WebPage::requestStartDataInteraction): Deleted.
3615         (WebKit::WebPage::didConcludeEditDataInteraction): Deleted.
3616
3617 2019-01-25  Alex Christensen  <achristensen@webkit.org>
3618
3619         WKWebView.goBack should reload if there is a safe browsing warning
3620         https://bugs.webkit.org/show_bug.cgi?id=193805
3621         <rdar://problem/46908216>
3622
3623         Reviewed by Geoff Garen.
3624
3625         If a WKWebView is showing a safe browsing warning and the user clicks a back button
3626         in the app which calls WKWebView.goBack, the WKWebView is in a state where it has not navigated yet,
3627         so actually going back will appear to the user to go back twice.  We can't just do nothing because the
3628         app is in a state where it is expecting a navigation to happen.  Reloading achieves what the user expects
3629         and makes the app work like the app expects.
3630
3631         * UIProcess/API/C/WKPage.cpp:
3632         (WKPageGoBack):
3633         * UIProcess/API/Cocoa/WKWebView.mm:
3634         (-[WKWebView goBack]):
3635         * UIProcess/PageClient.h:
3636         (WebKit::PageClient::hasSafeBrowsingWarning const):
3637         * UIProcess/mac/PageClientImplMac.h:
3638         * UIProcess/mac/PageClientImplMac.mm:
3639         (WebKit::PageClientImpl::hasSafeBrowsingWarning const):
3640
3641 2019-01-25  Chris Dumez  <cdumez@apple.com>
3642
3643         Regression(PSON) cross-site provisional page is not canceled if a new same-site one is started
3644         https://bugs.webkit.org/show_bug.cgi?id=193788
3645         <rdar://problem/47531231>
3646
3647         Reviewed by Alex Christensen.
3648
3649         When the page starts a new provisional load, make sure we cancel any pending one in the provisional
3650         process, as it would have happened in the first provisional load happened in the same process.
3651         Without this, we could have 2 parallel loads happening, one in the committed process and another
3652         in the provisional one, leading to assertion failures in debug.
3653
3654         * UIProcess/WebPageProxy.cpp:
3655         (WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
3656
3657 2019-01-25  Chris Dumez  <cdumez@apple.com>
3658
3659         Drop WebKit::WebKitPolicyAction type as it is no longer needed
3660         https://bugs.webkit.org/show_bug.cgi?id=193827
3661
3662         Reviewed by Antti Koivisto.
3663
3664         Drop WebKit::WebKitPolicyAction type as it is no longer needed. It is now identical to
3665         WebCore::PolicyAction.
3666
3667         * Shared/WebPolicyAction.h: Removed.
3668         * UIProcess/WebFramePolicyListenerProxy.cpp:
3669         (WebKit::WebFramePolicyListenerProxy::didReceiveSafeBrowsingResults):
3670         (WebKit::WebFramePolicyListenerProxy::use):
3671         (WebKit::WebFramePolicyListenerProxy::download):
3672         (WebKit::WebFramePolicyListenerProxy::ignore):
3673         * UIProcess/WebFramePolicyListenerProxy.h:
3674         * UIProcess/WebFrameProxy.cpp:
3675         (WebKit::WebFrameProxy::setUpPolicyListenerProxy):
3676         * UIProcess/WebFrameProxy.h:
3677         * UIProcess/WebPageProxy.cpp:
3678         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
3679         (WebKit::WebPageProxy::receivedPolicyDecision):
3680         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
3681         (WebKit::WebPageProxy::decidePolicyForNavigationActionSync):
3682         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
3683         (WebKit::WebPageProxy::decidePolicyForResponseShared):
3684         * UIProcess/WebPageProxy.h:
3685         * WebKit.xcodeproj/project.pbxproj:
3686         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3687         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
3688         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
3689         * WebProcess/WebPage/WebFrame.cpp:
3690         (WebKit::WebFrame::didReceivePolicyDecision):
3691         (WebKit::toPolicyAction): Deleted.
3692         * WebProcess/WebPage/WebFrame.h:
3693         * WebProcess/WebPage/WebPage.cpp:
3694         (WebKit::WebPage::didReceivePolicyDecision):
3695         * WebProcess/WebPage/WebPage.h:
3696
3697 2019-01-25  Per Arne Vollan  <pvollan@apple.com>
3698
3699         [iOS] Add logging of calls
3700         https://bugs.webkit.org/show_bug.cgi?id=193784
3701
3702         Reviewed by Brent Fulgham.
3703
3704         Add permissive logging of calls on iOS.
3705
3706         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
3707
3708 2019-01-25  Chris Dumez  <cdumez@apple.com>
3709
3710         Regression(PSON?) Crash under NavigationState::NavigationClient::decidePolicyForNavigationAction()
3711         https://bugs.webkit.org/show_bug.cgi?id=193779
3712         <rdar://problem/46170903>
3713
3714         Reviewed by Antti Koivisto.
3715
3716         * UIProcess/Cocoa/NavigationState.mm:
3717         (WebKit::tryAppLink):
3718         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
3719         We were crashing when trying to get the URL of the main frame, which was sad because we never
3720         ended up using the main frame URL. Therefore, this patch drops the code in question.
3721
3722         * UIProcess/ProvisionalPageProxy.cpp:
3723         (WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionAsync):
3724         Add assertion to make sure that the DecidePolicyForNavigationActionAsync IPC it is getting
3725         from the process is related to its main frame.
3726
3727 2019-01-25  Wenson Hsieh  <wenson_hsieh@apple.com>
3728
3729         Need a way for JavaScript (or bundle) code to participate in undo
3730         https://bugs.webkit.org/show_bug.cgi?id=190009
3731         <rdar://problem/44807048>
3732
3733         Reviewed by Ryosuke Niwa.
3734
3735         Invalidate undo steps when removing them from WebPage. Invalidation is a no-op for editing actions that come
3736         from the UA, but for custom undo steps backed by an UndoItem, we clear out the custom undo step's pointer to its
3737         UndoItem and additionally disconnect the UndoItem from its UndoManager.
3738
3739         * WebProcess/WebPage/WebPage.cpp:
3740         (WebKit::WebPage::addWebUndoStep):
3741         (WebKit::WebPage::removeWebEditCommand):
3742         * WebProcess/WebPage/WebUndoStep.h:
3743         (WebKit::WebUndoStep::invalidate):
3744
3745 2019-01-25  Patrick Griffis  <pgriffis@igalia.com>
3746
3747         [GTK][WPE] Add API to add paths to sandbox
3748         https://bugs.webkit.org/show_bug.cgi?id=193571
3749
3750         This allows applications to add paths to the web process
3751         if required by web extensions.
3752
3753         Reviewed by Michael Catanzaro.
3754
3755         * UIProcess/API/glib/WebKitWebContext.cpp:
3756         (webkit_web_context_add_path_to_sandbox):
3757         * UIProcess/API/gtk/WebKitWebContext.h:
3758         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
3759         * UIProcess/API/wpe/docs/wpe-0.1-sections.txt:
3760         * UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
3761         (WebKit::bubblewrapSpawn):
3762         * UIProcess/WebProcessPool.h:
3763         * UIProcess/glib/WebProcessProxyGLib.cpp:
3764         (WebKit::WebProcessProxy::platformGetLaunchOptions):
3765
3766 2019-01-24  Ryosuke Niwa  <rniwa@webkit.org>
3767
3768         iOS: Split keyboard should not shrink visualViewport.height
3769         https://bugs.webkit.org/show_bug.cgi?id=193798
3770
3771         Reviewed by Tim Horton.
3772
3773         Treat a split keyboard like a floating keyboard and don't consider its input view bounds in computing the visible content rects.
3774
3775         No new tests since while it's possible to transition between split and merged keyboard using some SPI,
3776         there isn't a reliable mechanism to reset the keyboard state. e.g. we need to wait for a hard-coded amount of time.
3777
3778         * Platform/spi/ios/UIKitSPI.h:
3779         * UIProcess/API/Cocoa/WKWebView.mm:
3780         (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
3781
3782 2019-01-24  Eric Carlson  <eric.carlson@apple.com>
3783
3784         [iOS] Silence MediaPlayer compile warnings
3785         https://bugs.webkit.org/show_bug.cgi?id=193780
3786         <rdar://problem/47518428>
3787
3788         Reviewed by Jer Noble.
3789
3790         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
3791
3792 2019-01-24  Truitt Savell  <tsavell@apple.com>
3793
3794         Unreviewed, rolling out r240446.
3795
3796         Casued 5 API failures
3797
3798         Reverted changeset:
3799
3800         "Activate the WebResourceLoadStatisticsStore in the
3801         NetworkProcess and deactivate it in the UIProcess."
3802         https://bugs.webkit.org/show_bug.cgi?id=193297
3803         https://trac.webkit.org/changeset/240446
3804
3805 2019-01-24  Brent Fulgham  <bfulgham@apple.com>
3806
3807         Activate the WebResourceLoadStatisticsStore in the NetworkProcess and deactivate it in the UIProcess.
3808         https://bugs.webkit.org/show_bug.cgi?id=193297
3809         <rdar://problem/47158841>
3810
3811         Reviewed by Alex Christensen.
3812
3813         This patch activates the ResourceLoadStatistics code in the NetworkProcess, and turns
3814         it off in the UIProcess. It also updates test infrastructure to work with this change
3815         in architecture.
3816
3817         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
3818         (WebKit::ResourceLoadStatisticsMemoryStore::logSubresourceLoading): Added.
3819         (WebKit::ResourceLoadStatisticsMemoryStore::logSubresourceRedirect): Added.
3820         (WebKit::ResourceLoadStatisticsMemoryStore::logWebSocketLoading): Added.
3821         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
3822         (WebKit::WebResourceLoadStatisticsStore::logSubresourceLoading): Added.
3823         (WebKit::WebResourceLoadStatisticsStore::logSubresourceRedirect): Added.
3824         (WebKit::WebResourceLoadStatisticsStore::logWebSocketLoading): Added.
3825         (WebKit::WebResourceLoadStatisticsStore::removeAllStorageAccess):
3826         (WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCap):
3827         (WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCapForPrevalentResources): Deleted.
3828         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
3829         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3830         (WebKit::NetworkConnectionToWebProcess::logSubresourceLoading): Added.
3831         (WebKit::NetworkConnectionToWebProcess::logSubresourceRedirect): Added.
3832         (WebKit::NetworkConnectionToWebProcess::logWebSocketLoading): Added.
3833         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
3834         * NetworkProcess/NetworkSession.cpp:
3835         (WebKit::NetworkSession::setResourceLoadStatisticsEnabled):
3836         * UIProcess/WebProcessPool.cpp:
3837         (WebKit::WebProcessPool::ensureNetworkProcess):
3838         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
3839         (WebKit::WebsiteDataStore::parameters):
3840         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3841         (WebKit::WebsiteDataStore::removeData):
3842         (WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):
3843         (WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):
3844         * Webprocess/WebProcess.cpp:
3845         (WebKit::WebProcess::initializeWebProcess): Register new ResourceLoadObserver callbacks.
3846
3847 2019-01-24  John Wilander  <wilander@apple.com>
3848
3849         Add Ad Click Attribution as an internal/experimental feature
3850         https://bugs.webkit.org/show_bug.cgi?id=193685
3851         <rdar://problem/47450399>
3852
3853         Reviewed by Brent Fulgham.
3854
3855         * Shared/WebPreferences.yaml:
3856             Added AdClickAttributionEnabled as a runtime enabled feature, off by default.
3857
3858 2019-01-24  Antti Koivisto  <antti@apple.com>
3859
3860         [PSON] Flash on back navigation on Mac
3861         https://bugs.webkit.org/show_bug.cgi?id=193716
3862         <rdar://problem/47148458>
3863
3864         Reviewed by Chris Dumez.
3865
3866         We close the page immediately if we fail to suspend. Layers disappear and we get a flash.
3867
3868         * UIProcess/SuspendedPageProxy.cpp:
3869         (WebKit::SuspendedPageProxy::~SuspendedPageProxy):
3870         (WebKit::SuspendedPageProxy::close):
3871
3872         Track closed state so we don't send the message twice, causing unhandled message errors in web process.
3873
3874         (WebKit::SuspendedPageProxy::didProcessRequestToSuspend):
3875
3876         Close the suspended page if the suspension fails.
3877         Skip this if we are using web process side compositing on Mac.
3878
3879         * UIProcess/SuspendedPageProxy.h:
3880         * UIProcess/WebPageProxy.cpp:
3881         (WebKit::WebPageProxy::enterAcceleratedCompositingMode):
3882
3883         On Mac, close the failed SuspendedPageProxy when entering compositing mode. At this point we don't need it to keep layers alive.
3884
3885         * UIProcess/WebProcessPool.cpp:
3886         (WebKit::WebProcessPool::closeFailedSuspendedPagesForPage):
3887         * UIProcess/WebProcessPool.h:
3888         * WebProcess/WebPage/WebPage.cpp:
3889         (WebKit::WebPage::suspendForProcessSwap):
3890
3891         Don't close the page on suspension failure. This is now managed by the UI process.
3892
3893 2019-01-24  Chris Dumez  <cdumez@apple.com>
3894
3895         Regression(PSON) Back/Forward list items' URL sometimes gets replaced with the URL of a subframe
3896         https://bugs.webkit.org/show_bug.cgi?id=193761
3897         <rdar://problem/47456405>
3898
3899         Reviewed by Alex Christensen.
3900
3901         When doing a history navigation cross-process, the UIProcess would first send the back/forward list items
3902         to the destination WebProcess via WebPage::updateBackForwardListForReattach(), then ask the process to
3903         navigate to the expected back/forward list item.
3904
3905         WebPage::updateBackForwardListForReattach() would call restoreSessionInternal(), which would call
3906         toHistoryItem() on each BackForwardListItem. This may end up creating more than one HistoryItem for each
3907         BackForwardListItem because HistoryItems are part of a tree (each frame has its own list of history items).
3908
3909         Note that BackForwardListItems and HistoryItem share a BackForwardItemIdentifier which is a
3910         (processIdentifier, itemIdentifier) pair. We normally generate the HistoryItem's identifier from inside
3911         its constructor like so:
3912         `{ Process::identifier(), generateObjectIdentifier<BackForwardItemIdentifier::ItemIdentifierType>() }`
3913
3914         However, when calling updateBackForwardListForReattach() and constructing children HistoryItem,
3915         applyFrameState() would generate the identifier by itself and passing it to the HistoryItem constructor.
3916         Its genegates the ID the exact same way so this would in theory not be a problem. Unfortunately, both
3917         calls to generateObjectIdentifier() get inlined and both call sites end up with their own static counter
3918         to generate ids. As a result, we may end up with conflicts as HistoryItems for child frames (restored
3919         by restoreSessionInternal()) can end up with the same identifier as HistoryItems for top frames.
3920
3921         This confusion would lead to the WebContent process sending the UIProcess bad information and the URL
3922         of subframes could end up as the WebBackForwardListItem's mainframe URL.
3923
3924         * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
3925         (WebKit::applyFrameState):
3926         Stop calling generateObjectIdentifier() explicitly and let the HistoryItem constructor take care of it.
3927         Calling generateObjectIdentifier() for the same type from different places is not safe due to inlining.
3928
3929 2019-01-24  Ross Kirsling  <ross.kirsling@sony.com>
3930
3931         Move FileSystem to WTF
3932         https://bugs.webkit.org/show_bug.cgi?id=193602
3933
3934         Reviewed by Yusuke Suzuki.
3935
3936         * NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.cpp:
3937         * NetworkProcess/NetworkDataTaskBlob.h:
3938         * NetworkProcess/NetworkProcess.cpp:
3939         * NetworkProcess/cache/CacheStorageEngine.cpp:
3940         * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
3941         * NetworkProcess/cache/NetworkCache.cpp:
3942         * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
3943         * NetworkProcess/cache/NetworkCacheData.cpp:
3944         * NetworkProcess/cache/NetworkCacheFileSystem.cpp:
3945         * NetworkProcess/cache/NetworkCacheFileSystem.h:
3946         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
3947         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
3948         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
3949         * NetworkProcess/cache/NetworkCacheStorage.cpp:
3950         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
3951         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
3952         * NetworkProcess/mac/NetworkProcessMac.mm:
3953         * NetworkProcess/soup/NetworkProcessSoup.cpp:
3954         * PluginProcess/unix/PluginProcessMainUnix.cpp:
3955         * Shared/PersistencyUtils.cpp:
3956         * Shared/Plugins/Netscape/unix/NetscapePluginModuleUnix.cpp:
3957         * Shared/Plugins/unix/PluginSearchPath.cpp:
3958         * Shared/WebMemorySampler.h:
3959         * Shared/glib/ProcessExecutablePathGLib.cpp:
3960         * Shared/ios/ChildProcessIOS.mm:
3961         * Shared/mac/ChildProcessMac.mm:
3962         * Shared/mac/SandboxExtensionMac.mm: