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