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