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