Change NetworkConnectionToWebProcess* to NetworkConnectionToWebProcess& where possible
[WebKit-https.git] / Source / WebKit / ChangeLog
1 2019-01-29  Alex Christensen  <achristensen@webkit.org>
2
3         Change NetworkConnectionToWebProcess* to NetworkConnectionToWebProcess& where possible
4         https://bugs.webkit.org/show_bug.cgi?id=193974
5
6         Reviewed by Tim Horton.
7
8         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
9         (WebKit::NetworkBlobRegistry::registerFileBlobURL):
10         (WebKit::NetworkBlobRegistry::registerBlobURL):
11         (WebKit::NetworkBlobRegistry::registerBlobURLOptionallyFileBacked):
12         (WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
13         (WebKit::NetworkBlobRegistry::unregisterBlobURL):
14         (WebKit::NetworkBlobRegistry::blobSize):
15         (WebKit::NetworkBlobRegistry::connectionToWebProcessDidClose):
16         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
17         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
18         (WebKit::NetworkConnectionToWebProcess::didClose):
19         (WebKit::NetworkConnectionToWebProcess::registerFileBlobURL):
20         (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
21         (WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL):
22         (WebKit::NetworkConnectionToWebProcess::registerBlobURLOptionallyFileBacked):
23         (WebKit::NetworkConnectionToWebProcess::registerBlobURLForSlice):
24         (WebKit::NetworkConnectionToWebProcess::unregisterBlobURL):
25         (WebKit::NetworkConnectionToWebProcess::blobSize):
26         * NetworkProcess/NetworkProcess.cpp:
27         (WebKit::NetworkProcess::removeNetworkConnectionToWebProcess):
28         * NetworkProcess/NetworkProcess.h:
29
30 2019-01-29  Youenn Fablet  <youenn@apple.com>
31
32         Adopt new SPI to evaluate server certificate trust
33         https://bugs.webkit.org/show_bug.cgi?id=193355
34
35         Reviewed by Alex Christensen.
36
37         Use new SPI provided in NSURLSession to evaluate server certificates.
38         If successful, let loading proceed as usual.
39         Otherwise, go to the UIProcess to ask for a decision on continuing the load or not.
40
41         * NetworkProcess/cocoa/NetworkSessionCocoa.h:
42         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
43         (canNSURLSessionTrustEvaluate):
44         (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
45         (WebKit::NetworkSessionCocoa::continueDidReceiveChallenge):
46
47 2019-01-29  Tim Horton  <timothy_horton@apple.com>
48
49         Fix the build
50
51         * UIProcess/ios/WKDrawingCoordinator.h:
52         * UIProcess/ios/WKDrawingCoordinator.mm:
53         * UIProcess/ios/WKDrawingView.mm:
54
55 2019-01-29  Alex Christensen  <achristensen@webkit.org>
56
57         Remove unused NetworkProcessProxy::writeBlobToFilePath
58         https://bugs.webkit.org/show_bug.cgi?id=193990
59
60         Reviewed by Wenson Hsieh.
61
62         This code was only used in code that was introduced in r235202
63         but that has since been refactored to not use blobs.  Its tests still pass.
64         This removes the only UIProcess-controlled code that uses NetworkBlobRegistry::singleton.
65
66         * NetworkProcess/NetworkProcess.cpp:
67         (WebKit::NetworkProcess::writeBlobToFilePath): Deleted.
68         * NetworkProcess/NetworkProcess.h:
69         * NetworkProcess/NetworkProcess.messages.in:
70         * UIProcess/Cocoa/WebViewImpl.mm:
71         (WebKit::WebViewImpl::writeToURLForFilePromiseProvider):
72         * UIProcess/Network/NetworkProcessProxy.cpp:
73         (WebKit::NetworkProcessProxy::writeBlobToFilePath): Deleted.
74         * UIProcess/Network/NetworkProcessProxy.h:
75         * UIProcess/WebPageProxy.cpp:
76         (WebKit::WebPageProxy::writeBlobToFilePath): Deleted.
77         * UIProcess/WebPageProxy.h:
78
79 2019-01-29  Devin Rousso  <drousso@apple.com>
80
81         Web Inspector: expose a way of determining if a detached frontend is for a remote target
82         https://bugs.webkit.org/show_bug.cgi?id=193951
83         <rdar://problem/47621366>
84
85         Reviewed by Joseph Pecoraro.
86
87         * UIProcess/WebInspectorProxy.h:
88         (WebKit::WebInspectorProxy::InspectionTargetType): Added.
89         (WebKit::WebInspectorProxy::createFrontendWindow):
90         * UIProcess/mac/WebInspectorProxyMac.mm:
91         (WebKit::WebInspectorProxy::createFrontendWindow):
92         (WebKit::WebInspectorProxy::platformCreateFrontendWindow):
93         * UIProcess/mac/RemoteWebInspectorProxyMac.mm:
94         (WebKit::RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow):
95
96         * UIProcess/API/Cocoa/_WKInspectorWindow.h: Moved from UIProcess/mac/WKInspectorWindow.h.
97         * UIProcess/API/Cocoa/_WKInspectorWindow.mm: Moved from UIProcess/mac/WKInspectorWindow.mm.
98         (-[WKInspectorWindow isRemote]): Added.
99
100         * Shared/API/Cocoa/_WKNSWindowExtras.mm:
101         (-[NSWindow _web_isWebInspectorWindow]):
102
103         * PlatformMac.cmake:
104         * SourcesCocoa.txt:
105         * UnifiedSources-input.xcfilelist:
106         * WebKit.xcodeproj/project.pbxproj:
107
108 2019-01-29  Alex Christensen  <achristensen@webkit.org>
109
110         Rename ChildProcess to AuxiliaryProcess
111         https://bugs.webkit.org/show_bug.cgi?id=193943
112
113         Reviewed by Andy Estes.
114
115         "Child" implies that there is a parent, but I'm about to introduce a type of NetworkProcess that
116         doesn't always have a parent, and may have many UIProcesses that it is the auxiliary for.
117
118         * CMakeLists.txt:
119         * DerivedSources-input.xcfilelist:
120         * DerivedSources-output.xcfilelist:
121         * DerivedSources.make:
122         * NetworkProcess/Cookies/WebCookieManager.cpp:
123         * NetworkProcess/Cookies/soup/WebCookieManagerSoup.cpp:
124         * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
125         (WebKit::initializeAuxiliaryProcess<NetworkProcess>):
126         (WebKit::initializeChildProcess<NetworkProcess>): Deleted.
127         * NetworkProcess/NetworkProcess.cpp:
128         (WebKit::callExitSoon):
129         (WebKit::NetworkProcess::NetworkProcess):
130         (WebKit::NetworkProcess::didReceiveMessage):
131         (WebKit::NetworkProcess::initializeConnection):
132         (WebKit::NetworkProcess::terminate):
133         (WebKit::NetworkProcess::initializeProcess):
134         (WebKit::NetworkProcess::initializeProcessName):
135         (WebKit::NetworkProcess::initializeSandbox):
136         * NetworkProcess/NetworkProcess.h:
137         * NetworkProcess/NetworkProcessSupplement.h:
138         * NetworkProcess/cache/NetworkCacheStorage.cpp:
139         (WebKit::NetworkCache::Storage::deleteOldVersions):
140         * NetworkProcess/ios/NetworkProcessIOS.mm:
141         (WebKit::NetworkProcess::initializeProcess):
142         (WebKit::NetworkProcess::initializeProcessName):
143         (WebKit::NetworkProcess::initializeSandbox):
144         * NetworkProcess/mac/NetworkProcessMac.mm:
145         (WebKit::NetworkProcess::initializeProcess):
146         (WebKit::NetworkProcess::initializeProcessName):
147         (WebKit::NetworkProcess::initializeSandbox):
148         * NetworkProcess/soup/NetworkProcessMainSoup.cpp:
149         (WebKit::initializeAuxiliaryProcess<NetworkProcess>):
150         (WebKit::NetworkProcessMainUnix):
151         (WebKit::initializeChildProcess<NetworkProcess>): Deleted.
152         * NetworkProcess/watchos/NetworkProximityManager.h:
153         * NetworkProcess/watchos/NetworkProximityManager.mm:
154         (WebKit::NetworkProximityManager::NetworkProximityManager):
155         * NetworkProcess/win/NetworkProcessMainWin.cpp:
156         (WebKit::initializeAuxiliaryProcess<NetworkProcess>):
157         (WebKit::NetworkProcessMainWin):
158         (WebKit::initializeChildProcess<NetworkProcess>): Deleted.
159         * PlatformGTK.cmake:
160         * PlatformMac.cmake:
161         * PlatformWin.cmake:
162         * PluginProcess/PluginProcess.cpp:
163         (WebKit::PluginProcess::initializeProcess):
164         (WebKit::PluginProcess::initializeConnection):
165         (WebKit::PluginProcess::didReceiveMessage):
166         (WebKit::PluginProcess::initializeProcessName):
167         (WebKit::PluginProcess::initializeSandbox):
168         * PluginProcess/PluginProcess.h:
169         * PluginProcess/mac/PluginProcessMac.mm:
170         (WebKit::PluginProcess::platformInitializeProcess):
171         (WebKit::PluginProcess::initializeProcessName):
172         (WebKit::PluginProcess::initializeSandbox):
173         (WebKit::PluginProcess::stopRunLoop):
174         * PluginProcess/unix/PluginProcessMainUnix.cpp:
175         (WebKit::PluginProcessMainUnix):
176         * PluginProcess/unix/PluginProcessUnix.cpp:
177         (WebKit::PluginProcess::platformInitializeProcess):
178         * Shared/Authentication/AuthenticationManager.cpp:
179         (WebKit::AuthenticationManager::AuthenticationManager):
180         * Shared/Authentication/AuthenticationManager.h:
181         * Shared/AuxiliaryProcess.cpp: Copied from Source/WebKit/Shared/ChildProcess.cpp.
182         (WebKit::AuxiliaryProcess::AuxiliaryProcess):
183         (WebKit::AuxiliaryProcess::~AuxiliaryProcess):
184         (WebKit::AuxiliaryProcess::didClose):
185         (WebKit::AuxiliaryProcess::initialize):
186         (WebKit::AuxiliaryProcess::setProcessSuppressionEnabled):
187         (WebKit::AuxiliaryProcess::initializeProcess):
188         (WebKit::AuxiliaryProcess::initializeProcessName):
189         (WebKit::AuxiliaryProcess::initializeConnection):
190         (WebKit::AuxiliaryProcess::addMessageReceiver):
191         (WebKit::AuxiliaryProcess::removeMessageReceiver):
192         (WebKit::AuxiliaryProcess::disableTermination):
193         (WebKit::AuxiliaryProcess::enableTermination):
194         (WebKit::AuxiliaryProcess::messageSenderConnection):
195         (WebKit::AuxiliaryProcess::messageSenderDestinationID):
196         (WebKit::AuxiliaryProcess::terminationTimerFired):
197         (WebKit::AuxiliaryProcess::stopRunLoop):
198         (WebKit::AuxiliaryProcess::platformStopRunLoop):
199         (WebKit::AuxiliaryProcess::terminate):
200         (WebKit::AuxiliaryProcess::shutDown):
201         (WebKit::AuxiliaryProcess::registerURLSchemeServiceWorkersCanHandle const):
202         (WebKit::AuxiliaryProcess::platformInitialize):
203         (WebKit::AuxiliaryProcess::initializeSandbox):
204         (WebKit::AuxiliaryProcess::didReceiveInvalidMessage):
205         (WebKit::AuxiliaryProcess::didReceiveMemoryPressureEvent):
206         (WebKit::ChildProcess::ChildProcess): Deleted.
207         (WebKit::ChildProcess::~ChildProcess): Deleted.
208         (WebKit::ChildProcess::didClose): Deleted.
209         (WebKit::ChildProcess::initialize): Deleted.
210         (WebKit::ChildProcess::setProcessSuppressionEnabled): Deleted.
211         (WebKit::ChildProcess::initializeProcess): Deleted.
212         (WebKit::ChildProcess::initializeProcessName): Deleted.
213         (WebKit::ChildProcess::initializeConnection): Deleted.
214         (WebKit::ChildProcess::addMessageReceiver): Deleted.
215         (WebKit::ChildProcess::removeMessageReceiver): Deleted.
216         (WebKit::ChildProcess::disableTermination): Deleted.
217         (WebKit::ChildProcess::enableTermination): Deleted.
218         (WebKit::ChildProcess::messageSenderConnection): Deleted.
219         (WebKit::ChildProcess::messageSenderDestinationID): Deleted.
220         (WebKit::ChildProcess::terminationTimerFired): Deleted.
221         (WebKit::ChildProcess::stopRunLoop): Deleted.
222         (WebKit::ChildProcess::platformStopRunLoop): Deleted.
223         (WebKit::ChildProcess::terminate): Deleted.
224         (WebKit::ChildProcess::shutDown): Deleted.
225         (WebKit::ChildProcess::registerURLSchemeServiceWorkersCanHandle const): Deleted.
226         (WebKit::ChildProcess::platformInitialize): Deleted.
227         (WebKit::ChildProcess::initializeSandbox): Deleted.
228         (WebKit::ChildProcess::didReceiveInvalidMessage): Deleted.
229         (WebKit::ChildProcess::didReceiveMemoryPressureEvent): Deleted.
230         * Shared/AuxiliaryProcess.h: Copied from Source/WebKit/Shared/ChildProcess.h.
231         (WebKit::ChildProcess::parentProcessConnection const): Deleted.
232         (WebKit::ChildProcess::messageReceiverMap): Deleted.
233         (WebKit::ChildProcess::setTerminationTimeout): Deleted.
234         (WebKit::ChildProcess::shouldOverrideQuarantine): Deleted.
235         * Shared/AuxiliaryProcess.messages.in: Copied from Source/WebKit/Shared/ChildProcess.messages.in.
236         * Shared/AuxiliaryProcessSupplement.h: Copied from Source/WebKit/Shared/ChildProcessSupplement.h.
237         (WebKit::AuxiliaryProcessSupplement::~AuxiliaryProcessSupplement):
238         (WebKit::ChildProcessSupplement::~ChildProcessSupplement): Deleted.
239         (WebKit::ChildProcessSupplement::initializeConnection): Deleted.
240         * Shared/ChildProcess.cpp: Removed.
241         * Shared/ChildProcess.h: Removed.
242         * Shared/ChildProcess.messages.in: Removed.
243         * Shared/ChildProcessSupplement.h: Removed.
244         * Shared/Cocoa/AuxiliaryProcessCocoa.mm: Copied from Source/WebKit/Shared/Cocoa/ChildProcessCocoa.mm.
245         (WebKit::AuxiliaryProcess::didReceiveInvalidMessage):
246         (WebKit::ChildProcess::didReceiveInvalidMessage): Deleted.
247         * Shared/Cocoa/ChildProcessCocoa.mm: Removed.
248         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
249         (WebKit::initializeAuxiliaryProcess):
250         (WebKit::XPCServiceInitializer):
251         (WebKit::initializeChildProcess): Deleted.
252         * Shared/WebSQLiteDatabaseTracker.cpp:
253         (WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker):
254         (WebKit::WebSQLiteDatabaseTracker::hysteresisUpdated):
255         (WebKit::m_childProcessType): Deleted.
256         * Shared/WebSQLiteDatabaseTracker.h:
257         * Shared/ios/AuxiliaryProcessIOS.mm: Copied from Source/WebKit/Shared/ios/ChildProcessIOS.mm.
258         (WebKit::AuxiliaryProcess::platformInitialize):
259         (WebKit::AuxiliaryProcess::initializeSandbox):
260         (WebKit::AuxiliaryProcess::setQOS):
261         (WebKit::AuxiliaryProcess::platformStopRunLoop):
262         (WebKit::ChildProcess::platformInitialize): Deleted.
263         (WebKit::ChildProcess::initializeSandbox): Deleted.
264         (WebKit::ChildProcess::setQOS): Deleted.
265         (WebKit::ChildProcess::platformStopRunLoop): Deleted.
266         * Shared/ios/ChildProcessIOS.mm: Removed.
267         * Shared/mac/AuxiliaryProcessMac.mm: Copied from Source/WebKit/Shared/mac/ChildProcessMac.mm.
268         (WebKit::SandboxInfo::SandboxInfo):
269         (WebKit::AuxiliaryProcess::launchServicesCheckIn):
270         (WebKit::AuxiliaryProcess::platformInitialize):
271         (WebKit::processStorageClass):
272         (WebKit::sandboxDirectory):
273         (WebKit::applySandbox):
274         (WebKit::initializeSandboxParameters):
275         (WebKit::AuxiliaryProcess::initializeSandbox):
276         (WebKit::AuxiliaryProcess::stopNSAppRunLoop):
277         (WebKit::AuxiliaryProcess::stopNSRunLoop):
278         (WebKit::AuxiliaryProcess::platformStopRunLoop):
279         (WebKit::AuxiliaryProcess::setQOS):
280         (WebKit::AuxiliaryProcess::isSystemWebKit):
281         (WebKit::ChildProcess::launchServicesCheckIn): Deleted.
282         (WebKit::ChildProcess::platformInitialize): Deleted.
283         (WebKit::ChildProcess::initializeSandbox): Deleted.
284         (WebKit::ChildProcess::stopNSAppRunLoop): Deleted.
285         (WebKit::ChildProcess::stopNSRunLoop): Deleted.
286         (WebKit::ChildProcess::platformStopRunLoop): Deleted.
287         (WebKit::ChildProcess::setQOS): Deleted.
288         (WebKit::ChildProcess::isSystemWebKit): Deleted.
289         * Shared/mac/ChildProcessMac.mm: Removed.
290         * Shared/mac/SecItemShim.cpp:
291         (WebKit::globalNetworkProcess):
292         (WebKit::sendSecItemRequest):
293         (WebKit::initializeSecItemShim):
294         * Shared/mac/SecItemShim.h:
295         * Shared/unix/AuxiliaryProcessMain.cpp: Copied from Source/WebKit/Shared/unix/ChildProcessMain.cpp.
296         (WebKit::AuxiliaryProcessMainBase::parseCommandLine):
297         (WebKit::ChildProcessMainBase::parseCommandLine): Deleted.
298         * Shared/unix/AuxiliaryProcessMain.h: Copied from Source/WebKit/Shared/unix/ChildProcessMain.h.
299         (WebKit::AuxiliaryProcessMainBase::takeInitializationParameters):
300         (WebKit::initializeAuxiliaryProcess):
301         (WebKit::AuxiliaryProcessMain):
302         (WebKit::ChildProcessMainBase::platformInitialize): Deleted.
303         (WebKit::ChildProcessMainBase::platformFinalize): Deleted.
304         (WebKit::ChildProcessMainBase::takeInitializationParameters): Deleted.
305         (WebKit::initializeChildProcess): Deleted.
306         (WebKit::ChildProcessMain): Deleted.
307         * Shared/unix/ChildProcessMain.cpp: Removed.
308         * Shared/unix/ChildProcessMain.h: Removed.
309         * Shared/win/AuxiliaryProcessMainWin.cpp: Copied from Source/WebKit/Shared/win/ChildProcessMainWin.cpp.
310         (WebKit::AuxiliaryProcessMainBase::parseCommandLine):
311         (WebKit::ChildProcessMainBase::parseCommandLine): Deleted.
312         * Shared/win/ChildProcessMainWin.cpp: Removed.
313         * Sources.txt:
314         * SourcesCocoa.txt:
315         * SourcesGTK.txt:
316         * SourcesWPE.txt:
317         * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
318         * UIProcess/Authentication/AuthenticationChallengeProxy.h:
319         * UIProcess/AuxiliaryProcessProxy.cpp: Copied from Source/WebKit/UIProcess/ChildProcessProxy.cpp.
320         (WebKit::AuxiliaryProcessProxy::AuxiliaryProcessProxy):
321         (WebKit::AuxiliaryProcessProxy::~AuxiliaryProcessProxy):
322         (WebKit::AuxiliaryProcessProxy::getLaunchOptions):
323         (WebKit::AuxiliaryProcessProxy::connect):
324         (WebKit::AuxiliaryProcessProxy::terminate):
325         (WebKit::AuxiliaryProcessProxy::state const):
326         (WebKit::AuxiliaryProcessProxy::sendMessage):
327         (WebKit::AuxiliaryProcessProxy::addMessageReceiver):
328         (WebKit::AuxiliaryProcessProxy::removeMessageReceiver):
329         (WebKit::AuxiliaryProcessProxy::dispatchMessage):
330         (WebKit::AuxiliaryProcessProxy::dispatchSyncMessage):
331         (WebKit::AuxiliaryProcessProxy::didFinishLaunching):
332         (WebKit::AuxiliaryProcessProxy::shutDownProcess):
333         (WebKit::AuxiliaryProcessProxy::setProcessSuppressionEnabled):
334         (WebKit::AuxiliaryProcessProxy::connectionWillOpen):
335         (WebKit::ChildProcessProxy::ChildProcessProxy): Deleted.
336         (WebKit::ChildProcessProxy::~ChildProcessProxy): Deleted.
337         (WebKit::ChildProcessProxy::getLaunchOptions): Deleted.
338         (WebKit::ChildProcessProxy::connect): Deleted.
339         (WebKit::ChildProcessProxy::terminate): Deleted.
340         (WebKit::ChildProcessProxy::state const): Deleted.
341         (WebKit::ChildProcessProxy::sendMessage): Deleted.
342         (WebKit::ChildProcessProxy::addMessageReceiver): Deleted.
343         (WebKit::ChildProcessProxy::removeMessageReceiver): Deleted.
344         (WebKit::ChildProcessProxy::dispatchMessage): Deleted.
345         (WebKit::ChildProcessProxy::dispatchSyncMessage): Deleted.
346         (WebKit::ChildProcessProxy::didFinishLaunching): Deleted.
347         (WebKit::ChildProcessProxy::shutDownProcess): Deleted.
348         (WebKit::ChildProcessProxy::setProcessSuppressionEnabled): Deleted.
349         (WebKit::ChildProcessProxy::connectionWillOpen): Deleted.
350         * UIProcess/AuxiliaryProcessProxy.h: Copied from Source/WebKit/UIProcess/ChildProcessProxy.h.
351         (WebKit::AuxiliaryProcessProxy::send):
352         (WebKit::AuxiliaryProcessProxy::sendSync):
353         (WebKit::AuxiliaryProcessProxy::sendWithAsyncReply):
354         (WebKit::ChildProcessProxy::send): Deleted.
355         (WebKit::ChildProcessProxy::sendSync): Deleted.
356         (WebKit::ChildProcessProxy::connection const): Deleted.
357         (WebKit::ChildProcessProxy::hasConnection const): Deleted.
358         (WebKit::ChildProcessProxy::processIdentifier const): Deleted.
359         (WebKit::ChildProcessProxy::canSendMessage const): Deleted.
360         (WebKit::ChildProcessProxy::coreProcessIdentifier const): Deleted.
361         (WebKit::ChildProcessProxy::platformGetLaunchOptions): Deleted.
362         (WebKit::ChildProcessProxy::sendWithAsyncReply): Deleted.
363         * UIProcess/ChildProcessProxy.cpp: Removed.
364         * UIProcess/ChildProcessProxy.h: Removed.
365         * UIProcess/Downloads/DownloadProxyMap.cpp:
366         (WebKit::DownloadProxyMap::DownloadProxyMap):
367         * UIProcess/Downloads/DownloadProxyMap.h:
368         * UIProcess/Network/NetworkProcessProxy.cpp:
369         (WebKit::NetworkProcessProxy::NetworkProcessProxy):
370         (WebKit::NetworkProcessProxy::getLaunchOptions):
371         (WebKit::NetworkProcessProxy::createDownloadProxy):
372         (WebKit::NetworkProcessProxy::didFinishLaunching):
373         * UIProcess/Network/NetworkProcessProxy.h:
374         * UIProcess/Plugins/PluginProcessProxy.cpp:
375         (WebKit::PluginProcessProxy::getLaunchOptions):
376         (WebKit::PluginProcessProxy::sendMemoryPressureEvent):
377         * UIProcess/Plugins/PluginProcessProxy.h:
378         * UIProcess/ServiceWorkerProcessProxy.h:
379         * UIProcess/WebPageProxy.cpp:
380         (WebKit::WebPageProxy::finishAttachingToWebProcess):
381         * UIProcess/WebProcessPool.cpp:
382         (WebKit::WebProcessPool::sendMemoryPressureEvent):
383         (WebKit::WebProcessPool::registerURLSchemeServiceWorkersCanHandle):
384         * UIProcess/WebProcessProxy.cpp:
385         (WebKit::WebProcessProxy::WebProcessProxy):
386         (WebKit::WebProcessProxy::getLaunchOptions):
387         (WebKit::WebProcessProxy::didFinishLaunching):
388         (WebKit::WebProcessProxy::maybeShutDown):
389         (WebKit::WebProcessProxy::canTerminateAuxiliaryProcess):
390         (WebKit::WebProcessProxy::shouldTerminate):
391         (WebKit::WebProcessProxy::requestTermination):
392         (WebKit::WebProcessProxy::canTerminateChildProcess): Deleted.
393         * UIProcess/WebProcessProxy.h:
394         * UnifiedSources-input.xcfilelist:
395         * WebKit.xcodeproj/project.pbxproj:
396         * WebProcess/WebProcess.cpp:
397         (WebKit::WebProcess::initializeProcess):
398         (WebKit::WebProcess::initializeConnection):
399         (WebKit::WebProcess::terminate):
400         (WebKit::WebProcess::didReceiveMessage):
401         (WebKit::WebProcess::initializeProcessName):
402         (WebKit::WebProcess::initializeSandbox):
403         (WebKit::WebProcess::platformInitializeProcess):
404         * WebProcess/WebProcess.h:
405         * WebProcess/WebProcessSupplement.h:
406         * WebProcess/cocoa/WebProcessCocoa.mm:
407         (WebKit::WebProcess::initializeProcessName):
408         (WebKit::WebProcess::platformInitializeProcess):
409         (WebKit::WebProcess::stopRunLoop):
410         (WebKit::WebProcess::initializeSandbox):
411         * WebProcess/gtk/WebProcessMainGtk.cpp:
412         (WebKit::WebProcessMainUnix):
413         * WebProcess/win/WebProcessMainWin.cpp:
414         (WebKit::WebProcessMainWin):
415         * WebProcess/wpe/WebProcessMainWPE.cpp:
416         (WebKit::WebProcessMainUnix):
417
418 2019-01-29  Simon Fraser  <simon.fraser@apple.com>
419
420         REGRESSION(r240553): [iOS] Crash in ScrollingTree::updateTreeFromStateNode when attempting to log in to icloud.com
421         https://bugs.webkit.org/show_bug.cgi?id=193907
422
423         Reviewed by Frédéric Wang.
424
425         Remove encode/decode of removedNodes.
426
427         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
428         (WebKit::RemoteScrollingCoordinatorTransaction::encode const):
429         (WebKit::RemoteScrollingCoordinatorTransaction::decode):
430         (WebKit::dump):
431
432 2019-01-29  Brent Fulgham  <bfulgham@apple.com>
433
434         StorageAccess API calls should be direct to the Network Process
435         https://bugs.webkit.org/show_bug.cgi?id=193924
436         <rdar://problem/47611249>
437
438         Reviewed by Alex Christensen.
439
440         Now that the ResourceLoadStatistics data lives in the Network Process, calls to Storage Access
441         API should happen directly between the WebContent and Network processes.
442
443         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
444         (WebKit::WebResourceLoadStatisticsStore::requestStorageAccessGranted):
445         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
446         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
447         (WebKit::NetworkConnectionToWebProcess::removeStorageAccessForFrame):
448         (WebKit::NetworkConnectionToWebProcess::removeStorageAccessForAllFramesOnPage):
449         (WebKit::NetworkConnectionToWebProcess::logUserInteraction):
450         (WebKit::NetworkConnectionToWebProcess::logWebSocketLoading):
451         (WebKit::NetworkConnectionToWebProcess::logSubresourceLoading):
452         (WebKit::NetworkConnectionToWebProcess::logSubresourceRedirect):
453         (WebKit::NetworkConnectionToWebProcess::requestResourceLoadStatisticsUpdate):
454         (WebKit::NetworkConnectionToWebProcess::hasStorageAccess):
455         (WebKit::NetworkConnectionToWebProcess::requestStorageAccess):
456         * NetworkProcess/NetworkConnectionToWebProcess.h:
457         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
458         * NetworkProcess/NetworkProcess.cpp:
459         (WebKit::NetworkProcess::requestStorageAccess):
460         (WebKit::NetworkProcess::requestStorageAccessGranted):
461         * NetworkProcess/NetworkProcess.h:
462         * UIProcess/Network/NetworkProcessProxy.cpp:
463         (WebKit::NetworkProcessProxy::requestStorageAccessConfirm):
464         * UIProcess/Network/NetworkProcessProxy.h:
465         * UIProcess/Network/NetworkProcessProxy.messages.in:
466         * UIProcess/WebPageProxy.cpp:
467         (WebKit::WebPageProxy::requestStorageAccessConfirm):
468         (WebKit::WebPageProxy::hasStorageAccess): Deleted.
469         (WebKit::WebPageProxy::requestStorageAccess): Deleted.
470         * UIProcess/WebPageProxy.h:
471         * UIProcess/WebPageProxy.messages.in:
472         * WebProcess/WebPage/WebPage.cpp:
473         (WebKit::WebPage::hasStorageAccess):
474         (WebKit::WebPage::requestStorageAccess):
475         (WebKit::nextRequestStorageAccessContextId): Deleted.
476         (WebKit::WebPage::storageAccessResponse): Deleted.
477         * WebProcess/WebPage/WebPage.h:
478         * WebProcess/WebPage/WebPage.messages.in:
479
480 2019-01-29  Chris Dumez  <cdumez@apple.com>
481
482         Regression (r240046): [PSON] Spurious changes to [WKWebView url] and [WKWebView loading] after [WKWebView loadRequest]
483         https://bugs.webkit.org/show_bug.cgi?id=193967
484         <rdar://problem/47635348>
485
486         Reviewed by Alex Christensen.
487
488         Update WebPageProxy::receivedPolicyDecision() to no longer clear the pending URL when we send PolicyAction::Ignore to
489         the old process when the load is continuing in a new process due to PSON.
490
491         * UIProcess/WebPageProxy.cpp:
492         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
493         (WebKit::WebPageProxy::receivedPolicyDecision):
494         * UIProcess/WebPageProxy.h:
495
496 2019-01-29  Keith Rollin  <krollin@apple.com>
497
498         Add .xcfilelists to Run Script build phases
499         https://bugs.webkit.org/show_bug.cgi?id=193792
500         <rdar://problem/47201785>
501
502         Reviewed by Alex Christensen.
503
504         As part of supporting XCBuild, update the necessary Run Script build
505         phases in their Xcode projects to refer to their associated
506         .xcfilelist files.
507
508         Note that the addition of these files bumps the Xcode project version
509         number to something that's Xcode 10 compatible. This change means that
510         older versions of the Xcode IDE can't read these projects. Nor can it
511         fully load workspaces that refer to these projects (the updated
512         projects are shown as non-expandable placeholders). `xcodebuild` can
513         still build these projects; it's just that the IDE can't open them.
514
515         Make special accommodations for incorporating .xcfilelists from
516         WebKitAdditions.
517
518         * Configurations/Base.xcconfig:
519         * Configurations/DebugRelease.xcconfig:
520         * WebKit.xcodeproj/project.pbxproj:
521
522 2019-01-29  Antti Koivisto  <antti@apple.com>
523
524         REGRESSION (PSON): Flash on link navigation on Mac
525         https://bugs.webkit.org/show_bug.cgi?id=193961
526         <rdar://problem/47482507>
527
528         Reviewed by Chris Dumez.
529
530         The target page sends EnterAcceleratedCompositingMode message too early, before we have a valid layer tree.
531
532         * WebProcess/WebPage/DrawingArea.h:
533         (WebKit::DrawingArea::attach): Deleted.
534
535         Not needed anymore.
536
537         * WebProcess/WebPage/WebPage.cpp:
538         (WebKit::WebPage::reinitializeWebPage):
539         (WebKit::WebPage::didCompletePageTransition):
540         (WebKit::m_shouldAttachDrawingAreaOnPageTransition): Deleted.
541
542         Move message sending logic fully to TiledCoreAnimationDrawingArea.
543         Unfreezing the layer tree is sufficient to trigger the message.
544
545         * WebProcess/WebPage/WebPage.h:
546         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
547         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
548         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
549
550         There is no need to treat process swap case differently.
551
552         (WebKit::TiledCoreAnimationDrawingArea::sendEnterAcceleratedCompositingModeIfNeeded):
553
554         Send this after the first successful layer flush with the root layer set.
555
556         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
557         (WebKit::TiledCoreAnimationDrawingArea::attach): Deleted.
558
559 2019-01-29  Timothy Hatcher  <timothy@apple.com>
560
561         Add back some includes that got removed at some point.
562         https://bugs.webkit.org/show_bug.cgi?id=193942
563
564         Reviewed by Tim Horton.
565
566         * UIProcess/API/Cocoa/WKWebView.mm:
567         * UIProcess/API/Cocoa/WKWebViewInternal.h:
568         * UIProcess/ios/PageClientImplIOS.h:
569         * UIProcess/ios/PageClientImplIOS.mm:
570
571 2019-01-29  Chris Dumez  <cdumez@apple.com>
572
573         Make sure WTF::generateObjectIdentifier() internal counter does not get duplicated
574         https://bugs.webkit.org/show_bug.cgi?id=193848
575
576         Reviewed by Youenn Fablet.
577
578         * Platform/IPC/Connection.cpp:
579         (IPC::Connection::Connection):
580         * UIProcess/ChildProcessProxy.h:
581         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
582         (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
583         * UIProcess/WebBackForwardList.cpp:
584         (WebKit::WebBackForwardList::restoreFromState):
585         * UIProcess/WebProcessPool.cpp:
586         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
587         (WebKit::UserMediaPermissionRequestManager::addDeviceChangeObserver):
588
589 2019-01-29  Chris Dumez  <cdumez@apple.com>
590
591         REGRESSION (PSON): Twitter link gets stuck at t.co after navigating back in tab
592         https://bugs.webkit.org/show_bug.cgi?id=193932
593         <rdar://problem/47598947>
594
595         Reviewed by Brady Eidson.
596
597         When doing a client side redirect from origin A to origin B, we would swap process and
598         create a SuspendedPageProxy and save it on the source BackForwardListItem. The issue is
599         that the BackForwardList is locked for such redirect so we end up updating the current
600         BackForwardListItem with origin B's URL while origin A's suspended page remained on
601         the item. When going to another URL in the same origin A, we would not create a suspended
602         page since no process-swap would occur. When pressing the back button, we would go back
603         to the previous BackForwardListItem and use its SuspendedPageProxy, which is for the
604         wrong URL (The pre-client redirect one).
605
606         To address the issue, we no longer create a SuspendedPageProxy for cross-site client side
607         redirects. There will be no way no go back to this suspended page anyway since the
608         back/forward list item will be updated with the redirection URL.
609
610         * UIProcess/WebPageProxy.cpp:
611         (WebKit::WebPageProxy::suspendCurrentPageIfPossible):
612
613 2019-01-29  Chris Dumez  <cdumez@apple.com>
614
615         Regression(r240046) VoiceOver is no longer working after a process swap
616         https://bugs.webkit.org/show_bug.cgi?id=193953
617         <rdar://problem/47612398>
618
619         Reviewed by Alex Christensen.
620
621         ProvisionalPageProxy used to forward the RegisterWebProcessAccessibilityToken IPC from
622         the provisional WebProcess to the WebPageProxy right away. This in turn would notify
623         the PageClient whose logic would rely on WebPageProxy::process(), which returns the
624         committed process instead of the provisional one.
625
626         To address the issue, the ProvisionalPageProxy now stores the token sent by the
627         provisional WebProcess and we only call registerWebProcessAccessibilityToken()
628         on the WebPageProxy *after* we've swapped to the provisional process.
629
630         * UIProcess/ProvisionalPageProxy.cpp:
631         (WebKit::ProvisionalPageProxy::registerWebProcessAccessibilityToken):
632         (WebKit::ProvisionalPageProxy::didReceiveMessage):
633         * UIProcess/ProvisionalPageProxy.h:
634         (WebKit::ProvisionalPageProxy::takeAccessibilityToken):
635         * UIProcess/WebPageProxy.cpp:
636         (WebKit::WebPageProxy::commitProvisionalPage):
637
638 2019-01-28  Ryosuke Niwa  <rniwa@webkit.org>
639
640         User agent string override for navigator.userAgent should be site specific quirks
641         https://bugs.webkit.org/show_bug.cgi?id=193950
642
643         Reviewed by Brent Fulgham.
644
645         Renamed the various member variables, functions, properties and selectors.
646
647         * Shared/WebsitePoliciesData.cpp:
648         (WebKit::WebsitePoliciesData::encode const):
649         (WebKit::WebsitePoliciesData::decode):
650         (WebKit::WebsitePoliciesData::applyToDocumentLoader):
651         * Shared/WebsitePoliciesData.h:
652         * UIProcess/API/APIWebsitePolicies.cpp:
653         (API::WebsitePolicies::data):
654         * UIProcess/API/APIWebsitePolicies.h:
655         * UIProcess/API/Cocoa/_WKWebsitePolicies.h:
656         * UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
657         (-[_WKWebsitePolicies setCustomJavaScriptUserAgentAsSiteSpecificQuirks:]): Renamed from setCustomJavaScriptUserAgent.
658         (-[_WKWebsitePolicies customJavaScriptUserAgentAsSiteSpecificQuirks]): Renamed from customJavaScriptUserAgent.
659
660 2019-01-28  Commit Queue  <commit-queue@webkit.org>
661
662         Unreviewed, rolling out r240630.
663         https://bugs.webkit.org/show_bug.cgi?id=193958
664
665         Broke Apple internal builds (Requested by rniwa on #webkit).
666
667         Reverted changeset:
668
669         "Add back some includes that got removed at some point."
670         https://bugs.webkit.org/show_bug.cgi?id=193942
671         https://trac.webkit.org/changeset/240630
672
673 2019-01-28  Devin Rousso  <drousso@apple.com>
674
675         Web Inspector: provide a way to edit page WebRTC settings on a remote target
676         https://bugs.webkit.org/show_bug.cgi?id=193863
677         <rdar://problem/47572764>
678
679         Reviewed by Joseph Pecoraro.
680
681         * Shared/WebPreferences.yaml:
682         Add page-level settings for WebRTC preferences.
683
684 2019-01-28  Ross Kirsling  <ross.kirsling@sony.com>
685
686         Remove unnecessary `using namespace WTF`s (or at least restrict their scope).
687         https://bugs.webkit.org/show_bug.cgi?id=193941
688
689         Reviewed by Alex Christensen.
690
691         * Shared/linux/WebMemorySamplerLinux.cpp:
692
693 2019-01-28  Fujii Hironori  <Hironori.Fujii@sony.com>
694
695         [Win] WebCore/platform/Process.h is conflicting with process.h
696         https://bugs.webkit.org/show_bug.cgi?id=193944
697
698         Reviewed by Ross Kirsling.
699
700         * Shared/ChildProcess.h:
701         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
702         * Shared/unix/ChildProcessMain.cpp:
703         * UIProcess/API/APINavigation.h:
704         * UIProcess/ChildProcessProxy.h:
705         * UIProcess/Launcher/ProcessLauncher.h:
706         * UIProcess/WebProcessPool.cpp:
707         * UIProcess/WebProcessProxy.h:
708
709 2019-01-28  Jon Lee  <jonlee@apple.com>
710
711         Update Screen Capture preference
712         https://bugs.webkit.org/show_bug.cgi?id=193947
713         rdar://problem/47620199
714
715         Reviewed by Youenn Fablet.
716
717         * Shared/WebPreferences.yaml:
718
719 2019-01-28  Andy Estes  <aestes@apple.com>
720
721         [watchOS] Enable Parental Controls content filtering
722         https://bugs.webkit.org/show_bug.cgi?id=193939
723         <rdar://problem/46641912>
724
725         Reviewed by Ryosuke Niwa.
726
727         * Configurations/FeatureDefines.xcconfig:
728
729 2019-01-28  David Kilzer  <ddkilzer@apple.com>
730
731         REGRESSION (r236481): Move soft-linking of LocalAuthentication.framework out of LocalAuthenticationSoftLink.h
732         <https://webkit.org/b/193884>
733
734         Reviewed by Jiewen Tan.
735
736         * SourcesCocoa.txt:
737         * UnifiedSources-input.xcfilelist:
738         * WebKit.xcodeproj/project.pbxproj:
739         - Add LocalAuthenticationSoftLink.mm to the project.
740
741         * UIProcess/WebAuthentication/Cocoa/LocalAuthenticationSoftLink.h:
742         * UIProcess/WebAuthentication/Cocoa/LocalAuthenticationSoftLink.mm: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticationSoftLink.h.
743         - Move soft-linking implementation to
744           LocalAuthenticationSoftLink.mm.
745
746 2019-01-28  Timothy Hatcher  <timothy@apple.com>
747
748         Add back some includes that got removed at some point.
749         https://bugs.webkit.org/show_bug.cgi?id=193942
750
751         Reviewed by Tim Horton.
752
753         * UIProcess/API/Cocoa/WKWebView.mm:
754         * UIProcess/API/Cocoa/WKWebViewInternal.h:
755         * UIProcess/ios/PageClientImplIOS.h:
756         * UIProcess/ios/PageClientImplIOS.mm:
757
758 2019-01-28  Timothy Hatcher  <timothy@apple.com>
759
760         Make it easier for non-Apple ports to enable dark mode CSS support.
761         https://bugs.webkit.org/show_bug.cgi?id=193882
762
763         Reviewed by Megan Gardner.
764
765         Make modern WebKit code for dark mode usable by other ports, to match
766         the WebCore parts that have been cross-platform all along.
767
768         * Shared/WebPageCreationParameters.cpp:
769         (WebKit::WebPageCreationParameters::encode const):
770         (WebKit::WebPageCreationParameters::decode):
771         * Shared/WebPageCreationParameters.h:
772         * UIProcess/PageClient.h:
773         (WebKit::PageClient::effectiveAppearanceIsDark const):
774         * UIProcess/WebPageProxy.cpp:
775         (WebKit::WebPageProxy::creationParameters):
776         (WebKit::WebPageProxy::useDarkAppearance const):
777         (WebKit::WebPageProxy::effectiveAppearanceDidChange):
778         * UIProcess/WebPageProxy.h:
779         * WebProcess/WebPage/WebPage.cpp:
780         (WebKit::m_shouldAttachDrawingAreaOnPageTransition):
781         (WebKit::WebPage::setUseDarkAppearance):
782         * WebProcess/WebPage/WebPage.h:
783         * WebProcess/WebPage/WebPage.messages.in:
784
785 2019-01-28  Andy Estes  <aestes@apple.com>
786
787         [Cocoa] Add SPI to _WKUserContentExtensionStore to retrieve its underlying WKContentRuleListStore
788         https://bugs.webkit.org/show_bug.cgi?id=193927
789
790         Reviewed by Tim Horton.
791
792         This is useful for clients migrating from _WKUserContentExtensionStore to the modern
793         WKContentRuleList* APIs.
794
795         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
796         (-[_WKUserContentExtensionStore _contentRuleListStore]):
797         * UIProcess/API/Cocoa/_WKUserContentExtensionStorePrivate.h:
798
799 2019-01-28  David Kilzer  <ddkilzer@apple.com>
800
801         Move soft-linking of ManagedConfiguration.framework out of ManagedConfigurationSPI.h
802         <https://webkit.org/b/193868>
803
804         Reviewed by Daniel Bates.
805
806         * Platform/spi/ios/ManagedConfigurationSPI.h:
807         - Remove soft-linking code from header.
808         - Add PLATFORM(IOS_FAMILY) && !PLATFORM(IOSMAC) guard.
809
810         * UIProcess/ios/WKContentViewInteraction.mm:
811         (-[WKContentView canPerformActionForWebView:withSender:]):
812         (-[WKContentView _defineForWebView:]):
813         - Add soft-linking code formerly in ManagedConfigurationSPI.h.
814         - Change MCFeatureDefinitionLookupAllowed to use soft-link
815           function getMCFeatureDefinitionLookupAllowed() to remove the
816           #define.
817
818 2019-01-28  Per Arne Vollan  <pvollan@apple.com>
819
820         REGRESSION (r240348): Loading netflix home page panics device
821         https://bugs.webkit.org/show_bug.cgi?id=193936
822
823         Reviewed by Alexey Proskuryakov.
824
825         Temporarily enable permissive call filtering.
826
827         * WebProcess/com.apple.WebProcess.sb.in:
828
829 2019-01-28  Joseph Pecoraro  <pecoraro@apple.com>
830
831         [iOS] Attempting to open a Keynote document to iCloud.com from iCloud Files causes crash
832         https://bugs.webkit.org/show_bug.cgi?id=193456
833         <rdar://problem/47275642>
834
835         Reviewed by Brent Fulgham.
836
837         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
838         Allow access to iconservices.
839
840 2019-01-28  Daniel Bates  <dabates@apple.com>
841
842         [iOS] Make Window virtual key code computation match Mac
843         https://bugs.webkit.org/show_bug.cgi?id=193452
844
845         Reviewed by Ryosuke Niwa.
846
847         Compute the Windows virtual key code from the WebEvent.
848
849         * Shared/ios/WebIOSEventFactory.mm:
850         (WebIOSEventFactory::createWebKeyboardEvent):
851
852 2019-01-28  Brent Fulgham  <bfulgham@apple.com>
853
854         REGRESSION (r240498): Storage Access API prompts result is not remembered
855         https://bugs.webkit.org/show_bug.cgi?id=193922
856         <rdar://problem/47608767>
857
858         Reviewed by Chris Dumez.
859
860         The refactoring in r240498 bypassed bookkeeping in ResourceLoadStatisticsMemoryStore
861         that kept track of whether a successful user prompt had been encountered. This
862         patch corrects this codepath so the user is not prompted repeatedly after approving
863         use of the Storage Access API.
864
865         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
866         (WebKit::WebResourceLoadStatisticsStore::grantStorageAccess): Switch from Move operator to
867         const reference to allow the method to be called by the NetworkProcess.
868         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
869         * NetworkProcess/NetworkProcess.cpp:
870         (WebKit::NetworkProcess::grantStorageAccess): Request access through the WebResourceLoadStatistics
871         object, rather than jumping directly to the NetworkStorageSession.
872
873 2019-01-28  Chris Dumez  <cdumez@apple.com>
874
875         Regression(PSON) Crash under WebPageProxy::didStartProgress()
876         https://bugs.webkit.org/show_bug.cgi?id=193915
877         <rdar://problem/47560907>
878
879         Reviewed by Alex Christensen.
880
881         * UIProcess/WebPageProxy.cpp:
882         (WebKit::WebPageProxy::close):
883         Make sure we destroy the ProvisionalPageProxy if the page gets closed as we do not want to keep receiving
884         IPC after this or even worse, commit the provisional page.
885
886         (WebKit::WebPageProxy::didStartProgress):
887         Add an assertion in didStartProgress() to make sure we do not receive this IPC after the page has been
888         closed.
889
890 2019-01-28  Antoine Quint  <graouts@apple.com>
891
892         Limit user-agent interactions based on the touch-action property on iOS
893         https://bugs.webkit.org/show_bug.cgi?id=193447
894
895         Unreviewed build fix.
896
897         * UIProcess/API/Cocoa/WKWebView.mm:
898
899 2019-01-28  Antoine Quint  <graouts@apple.com>
900
901         Limit user-agent interactions based on the touch-action property on iOS
902         https://bugs.webkit.org/show_bug.cgi?id=193447
903
904         Unreviewed build fix.
905
906         * UIProcess/ios/WKContentViewInteraction.mm:
907
908 2019-01-28  Brent Fulgham  <bfulgham@apple.com>
909
910         Remove the UIProcess components of the ResourceLoadStatistics code
911         https://bugs.webkit.org/show_bug.cgi?id=193303
912         <rdar://problem/47160073>
913
914         Reviewed by Chris Dumez.
915
916         Now that the ResourceLoadStatistics code is running in the NetworkProcess, we can get rid
917         of the UIProcess copies of these routines.
918
919         Tested by existing ResourceLoadStatistics and StorageAccess tests.
920
921         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
922         (WebKit::ResourceLoadStatisticsMemoryStore::updateClientSideCookiesAgeCap):
923         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
924         (WebKit::WebResourceLoadStatisticsStore::callHasStorageAccessForFrameHandler):
925         (WebKit::WebResourceLoadStatisticsStore::callGrantStorageAccessHandler):
926         (WebKit::WebResourceLoadStatisticsStore::removeAllStorageAccess):
927         (WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCap):
928         (WebKit::WebResourceLoadStatisticsStore::callUpdatePrevalentDomainsToBlockCookiesForHandler):
929         (WebKit::WebResourceLoadStatisticsStore::callRemoveDomainsHandler):
930         (WebKit::WebResourceLoadStatisticsStore::logTestingEvent):
931         (WebKit::WebResourceLoadStatisticsStore::notifyResourceLoadStatisticsProcessed):
932         (WebKit::WebResourceLoadStatisticsStore::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores):
933         (WebKit::WebResourceLoadStatisticsStore::topPrivatelyControlledDomainsWithWebsiteData):
934         (WebKit::WebResourceLoadStatisticsStore::sendDiagnosticMessageWithValue const):
935         (WebKit::WebResourceLoadStatisticsStore::notifyPageStatisticsTelemetryFinished const):
936         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
937         * UIProcess/WebProcessProxy.cpp:
938         (WebKit::WebProcessProxy::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores): Deleted.
939         (WebKit::WebProcessProxy::topPrivatelyControlledDomainsWithWebsiteData): Deleted.
940         * UIProcess/WebProcessProxy.h:
941         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
942         (WebKit::WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains):
943         (WebKit::WebsiteDataStore::removeData):
944         (WebKit::WebsiteDataStore::setMaxStatisticsEntries):
945         (WebKit::WebsiteDataStore::setPruneEntriesDownTo):
946         (WebKit::WebsiteDataStore::setGrandfatheringTime):
947         (WebKit::WebsiteDataStore::setMinimumTimeBetweenDataRecordsRemoval):
948         (WebKit::WebsiteDataStore::dumpResourceLoadStatistics):
949         (WebKit::WebsiteDataStore::isPrevalentResource):
950         (WebKit::WebsiteDataStore::setPrevalentResource):
951         (WebKit::WebsiteDataStore::setPrevalentResourceForDebugMode):
952         (WebKit::WebsiteDataStore::isVeryPrevalentResource):
953         (WebKit::WebsiteDataStore::setVeryPrevalentResource):
954         (WebKit::WebsiteDataStore::setShouldClassifyResourcesBeforeDataRecordsRemoval):
955         (WebKit::WebsiteDataStore::setSubframeUnderTopFrameOrigin):
956         (WebKit::WebsiteDataStore::isRegisteredAsSubFrameUnder):
957         (WebKit::WebsiteDataStore::setSubresourceUnderTopFrameOrigin):
958         (WebKit::WebsiteDataStore::isRegisteredAsSubresourceUnder):
959         (WebKit::WebsiteDataStore::setSubresourceUniqueRedirectTo):
960         (WebKit::WebsiteDataStore::setSubresourceUniqueRedirectFrom):
961         (WebKit::WebsiteDataStore::setTopFrameUniqueRedirectTo):
962         (WebKit::WebsiteDataStore::setTopFrameUniqueRedirectFrom):
963         (WebKit::WebsiteDataStore::isRegisteredAsRedirectingTo):
964         (WebKit::WebsiteDataStore::clearPrevalentResource):
965         (WebKit::WebsiteDataStore::resetParametersToDefaultValues):
966         (WebKit::WebsiteDataStore::submitTelemetry):
967         (WebKit::WebsiteDataStore::scheduleClearInMemoryAndPersistent):
968         (WebKit::WebsiteDataStore::scheduleCookieBlockingUpdate):
969         (WebKit::WebsiteDataStore::scheduleStatisticsAndDataRecordsProcessing):
970         (WebKit::WebsiteDataStore::setLastSeen):
971         (WebKit::WebsiteDataStore::setNotifyPagesWhenDataRecordsWereScanned):
972         (WebKit::WebsiteDataStore::setNotifyPagesWhenTelemetryWasCaptured):
973         (WebKit::WebsiteDataStore::hasStorageAccess):
974         (WebKit::WebsiteDataStore::requestStorageAccess):
975         (WebKit::WebsiteDataStore::grantStorageAccess):
976         (WebKit::WebsiteDataStore::setTimeToLiveUserInteraction):
977         (WebKit::WebsiteDataStore::logUserInteraction):
978         (WebKit::WebsiteDataStore::hasHadUserInteraction):
979         (WebKit::WebsiteDataStore::clearUserInteraction):
980         (WebKit::WebsiteDataStore::setGrandfathered):
981         (WebKit::WebsiteDataStore::webProcessWillOpenConnection):
982         (WebKit::WebsiteDataStore::webProcessDidCloseConnection):
983         (WebKit::WebsiteDataStore::setResourceLoadStatisticsDebugMode):
984         (WebKit::WebsiteDataStore::didCreateNetworkProcess):
985         (WebKit::WebsiteDataStore::topPrivatelyControlledDomainsWithWebsiteData): Deleted.
986         (WebKit::WebsiteDataStore::removeDataForTopPrivatelyControlledDomains): Deleted.
987         (WebKit::WebsiteDataStore::setCacheMaxAgeCap): Deleted.
988         (WebKit::WebsiteDataStore::updatePrevalentDomainsToBlockCookiesFor): Deleted.
989         (WebKit::WebsiteDataStore::setAgeCapForClientSideCookies): Deleted.
990         (WebKit::WebsiteDataStore::hasStorageAccessForFrameHandler): Deleted.
991         (WebKit::WebsiteDataStore::grantStorageAccessHandler): Deleted.
992         (WebKit::WebsiteDataStore::removeAllStorageAccessHandler): Deleted.
993         (WebKit::WebsiteDataStore::removePrevalentDomains): Deleted.
994         (WebKit::WebsiteDataStore::isGrandfathered): Deleted.
995         * UIProcess/WebsiteData/WebsiteDataStore.h:
996
997 2019-01-28  Antoine Quint  <graouts@apple.com>
998
999         Limit user-agent interactions based on the touch-action property on iOS
1000         https://bugs.webkit.org/show_bug.cgi?id=193447
1001         <rdar://problem/47283874>
1002
1003         Reviewed by Antti Koivisto and Simon Fraser.
1004
1005         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
1006         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
1007         permitted touch actions such to then customize the behavior of the nearest scroll view to pan or zoom only as instructed.
1008
1009         * Shared/WebCoreArgumentCoders.cpp:
1010         (IPC::ArgumentCoder<TouchActionData>::encode):
1011         (IPC::ArgumentCoder<TouchActionData>::decode):
1012         (IPC::ArgumentCoder<EventTrackingRegions>::encode):
1013         (IPC::ArgumentCoder<EventTrackingRegions>::decode):
1014         (IPC::ArgumentCoder<Region>::decode):
1015         * Shared/WebCoreArgumentCoders.h:
1016         * UIProcess/API/Cocoa/WKWebView.mm:
1017         (-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]): Account for panning constraints set on the content view to prevent deceleration
1018         to pan the view if it ought not.
1019         (-[WKWebView _scrollView:adjustedOffsetForOffset:translation:startPoint:locationInView:horizontalVelocity:verticalVelocity:]): Implement an additional
1020         UIScrollView delegation method to apply the panning constraints set on the content view while panning.
1021         * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
1022         (WebKit::RemoteScrollingCoordinatorProxy::touchActionDataAtPoint const):
1023         (WebKit::RemoteScrollingCoordinatorProxy::touchActionDataForScrollNodeID const):
1024         (WebKit::RemoteScrollingCoordinatorProxy::setTouchDataForTouchIdentifier):
1025         (WebKit::RemoteScrollingCoordinatorProxy::clearTouchDataForTouchIdentifier):
1026         * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
1027         * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h:
1028         * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
1029         (-[WKScrollingNodeScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]): Apply the same logic as in WKWebView.
1030         (-[WKScrollingNodeScrollViewDelegate _scrollView:adjustedOffsetForOffset:translation:startPoint:locationInView:horizontalVelocity:verticalVelocity:]): Apply
1031         the same logic as in WKWebView.
1032         (WebKit::ScrollingTreeScrollingNodeDelegateIOS::touchActionData const):
1033         * UIProcess/WebPageProxy.h:
1034         (WebKit::WebPageProxy::isScrollingOrZooming const):
1035         * UIProcess/ios/WKContentViewInteraction.h:
1036         * UIProcess/ios/WKContentViewInteraction.mm:
1037         (-[WKContentView preventsPanningInXAxis]):
1038         (-[WKContentView preventsPanningInYAxis]):
1039         (-[WKContentView cleanupInteraction]):
1040         (-[WKContentView _webTouchEventsRecognized:]):
1041         (-[WKContentView _handleTouchActionsForTouchEvent:]): As we process touches, check whether there are touch actions set for this touch's points' locations. Based
1042         on those touch actions, either setDefaultPrevented on the _touchEventGestureRecognizer if the touch action is "none" or selectively disable panning and zooming.
1043         (-[WKContentView _resetPanningPreventionFlags]):
1044         (-[WKContentView _didEndScrollingOrZooming]):
1045
1046 2019-01-28  Antti Koivisto  <antti@apple.com>
1047
1048         WebUserContentController::removeUserScriptMessageHandlerInternal may deref and delete itself
1049         https://bugs.webkit.org/show_bug.cgi?id=193901
1050         <rdar://problem/47338669>
1051
1052         Reviewed by David Kilzer.
1053
1054         Don't know how to repro.
1055
1056         * WebProcess/UserContent/WebUserContentController.cpp:
1057         (WebKit::WebUserContentController::removeUserScriptMessageHandlerInternal):
1058
1059         Calling userMessageHandlers.removeFirstMatching() may remove the last ref to this
1060         (because WebUserMessageHandlerDescriptorProxy refs WebUserContentController).
1061         Fix by protecting this over the function.
1062
1063 2018-12-15  Darin Adler  <darin@apple.com>
1064
1065         Replace many uses of String::format with more type-safe alternatives
1066         https://bugs.webkit.org/show_bug.cgi?id=192742
1067
1068         Reviewed by Mark Lam.
1069
1070         * Shared/WebMemorySampler.cpp:
1071         (WebKit::WebMemorySampler::writeHeaders): Use makeString.
1072
1073         * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
1074         (WebKit::LocalAuthenticator::makeCredential): Use string concatentation.
1075
1076         * UIProcess/WebInspectorUtilities.cpp:
1077         (WebKit::inspectorPageGroupIdentifierForPage): Use makeString.
1078         * UIProcess/WebProcessPool.cpp:
1079         (WebKit::WebProcessPool::processDidFinishLaunching): Ditto.
1080         (WebKit::WebProcessPool::startMemorySampler): Ditto.
1081
1082 2019-01-27  Jiewen Tan  <jiewen_tan@apple.com>
1083
1084         Use a load optimizer for some sites
1085         https://bugs.webkit.org/show_bug.cgi?id=193881
1086         <rdar://problem/46325455>
1087
1088         Reviewed by Brent Fulgham.
1089
1090         We will try to speed up some sites with a dedicated load optimizer. The load optimizer lives
1091         within the WebsiteDataStore as one client instance should have only one and it should live
1092         as long as the client lives. How does the load optimizer work? It intercepts every load in
1093         the navigation state. If a request meets some requirements, it will then fetch the request
1094         from its own cache. Once the fetch succeeds, the original load will be ignored and the
1095         optimizer will display the cached content.
1096
1097         Covered by API tests.
1098
1099         * SourcesCocoa.txt:
1100         * UIProcess/Cocoa/LoadOptimizer.h: Added.
1101         * UIProcess/Cocoa/LoadOptimizer.mm: Added.
1102         * UIProcess/Cocoa/MediaCaptureUtilities.h:
1103         * UIProcess/Cocoa/NavigationState.mm:
1104         (WebKit::tryInterceptNavigation):
1105         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
1106         (WebKit::tryAppLink): Deleted.
1107         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1108         (WebKit::WebsiteDataStore::WebsiteDataStore):
1109         * UIProcess/WebsiteData/WebsiteDataStore.h:
1110         (WebKit::WebsiteDataStore::loadOptimizer):
1111         * WebKit.xcodeproj/project.pbxproj:
1112
1113 2019-01-25  Brian Burg  <bburg@apple.com>
1114
1115         Web Automation: add support for simulating single touches to Automation.performInteractionSequence
1116         https://bugs.webkit.org/show_bug.cgi?id=193852
1117         <rdar://problem/28360781>
1118
1119         Reviewed by Joseph Pecoraro and Simon Fraser.
1120
1121         This patch makes it possible to simulate touches via the Actions API. The approach is to
1122         use a stripped down version of HIDEventGenerator to send HID events to the UIWindow.
1123         The initial version supports a single touch point; this may be expanded if needed, but
1124         so far it hasn't been an impediment when running desktop-oriented WebDriver test suites.
1125
1126         As part of implementing this support, I went through and added [somewhat obnoxious] ENABLE()
1127         guards so that we don't mistakenly compile mouse support on iOS and touch on Mac,
1128         and vice versa. Each of the interaction methods---touch, mouse, keyboard---can be independently
1129         compiled out. If none is supported (i.e., Windows), then we don't even try to compile
1130         platformSimulate*Interaction methods or SimulatedInputDispatcher. This allows WebAutomationSession
1131         to not include members and code that are never going to be used on a particular platform.
1132
1133         This functionality is covered by existing WebDriver test suites that use Element Click command.
1134         Additional tests that explicitly include 'touch' pointerType will be submitted to WPT later.
1135
1136         * UIProcess/Automation/Automation.json: Update comment.
1137
1138         * UIProcess/Automation/SimulatedInputDispatcher.h:
1139         * UIProcess/Automation/SimulatedInputDispatcher.cpp:
1140         (WebKit::SimulatedInputDispatcher::transitionInputSourceToState):
1141         - Add appropriate guards for code specific to each interaction type.
1142         - Handle SimulatedInputSourceType::Touch and call out to dispatch events.
1143
1144         * UIProcess/Automation/WebAutomationSession.h:
1145         * UIProcess/Automation/WebAutomationSession.cpp:
1146         (WebKit::WebAutomationSession::WebAutomationSession):
1147         (WebKit::WebAutomationSession::terminate):
1148         (WebKit::WebAutomationSession::willShowJavaScriptDialog):
1149         (WebKit::WebAutomationSession::mouseEventsFlushedForPage):
1150         (WebKit::WebAutomationSession::keyboardEventsFlushedForPage):
1151         (WebKit::WebAutomationSession::willClosePage):
1152         Add appropriate guards for code specific to each interaction type.
1153
1154         (WebKit::WebAutomationSession::isSimulatingUserInteraction const):
1155         Add new hook so that we can detect when a touch simulation is in progress.
1156         We don't rely on checking WebKit's event queue, so use a flag.
1157
1158         (WebKit::WebAutomationSession::simulateTouchInteraction):
1159         (WebKit::WebAutomationSession::performMouseInteraction):
1160         (WebKit::WebAutomationSession::performKeyboardInteractions):
1161         (WebKit::WebAutomationSession::cancelInteractionSequence):
1162         (WebKit::WebAutomationSession::performInteractionSequence):
1163         - Add appropriate guards for code specific to each interaction type.
1164         - Bail out immediately if a requested interaction type is not supported.
1165         - Shim Touch input type to Mouse if mouse is not supported but touches are.
1166         Nearly all WebDriver tests in the wild will be requesting a 'mouse' pointerType,
1167         so this is necessary for compatibility. It's easier to shim at this level than try
1168         to implement platformSimulateMouseInteraction for iOS because
1169         platformSimulateMouseinteraction does not use a completion handler but the iOS
1170         implementation would require that.
1171
1172         (WebKit::WebAutomationSession::platformSimulateMouseInteraction): Deleted.
1173         (WebKit::WebAutomationSession::platformSimulateKeyboardInteraction): Deleted.
1174         - Remove these stubs. Platform methods of this class are no longer being filled
1175         with stubs on unsupported platforms because we expect the command to fail earlier.
1176
1177         * UIProcess/Automation/ios/WebAutomationSessionIOS.mm:
1178         (WebKit::WebAutomationSession::platformSimulateTouchInteraction):
1179         - Add appropriate guards for code specific to each interaction type.
1180         - Implement new platform method to simulate touches. This uses _WKTouchEventGenerator.
1181
1182         * UIProcess/Automation/mac/WebAutomationSessionMac.mm:
1183         Add appropriate guards for code specific to each interaction type.
1184
1185         * UIProcess/_WKTouchEventGenerator.h: Added.
1186         * UIProcess/_WKTouchEventGenerator.mm: Added.
1187         (simpleCurveInterpolation):
1188         (calculateNextCurveLocation):
1189         (delayBetweenMove):
1190         (+[_WKTouchEventGenerator sharedTouchEventGenerator]):
1191         (+[_WKTouchEventGenerator nextEventCallbackID]):
1192         (-[_WKTouchEventGenerator init]):
1193         (-[_WKTouchEventGenerator dealloc]):
1194         (-[_WKTouchEventGenerator _createIOHIDEventType:]):
1195         (-[_WKTouchEventGenerator _sendHIDEvent:]):
1196         (-[_WKTouchEventGenerator _sendMarkerHIDEventWithCompletionBlock:]):
1197         (-[_WKTouchEventGenerator _updateTouchPoints:count:]):
1198         (-[_WKTouchEventGenerator touchDownAtPoints:touchCount:]):
1199         (-[_WKTouchEventGenerator touchDown:touchCount:]):
1200         (-[_WKTouchEventGenerator touchDown:]):
1201         (-[_WKTouchEventGenerator liftUpAtPoints:touchCount:]):
1202         (-[_WKTouchEventGenerator liftUp:touchCount:]):
1203         (-[_WKTouchEventGenerator liftUp:]):
1204         (-[_WKTouchEventGenerator moveToPoints:touchCount:duration:]):
1205         (-[_WKTouchEventGenerator touchDown:completionBlock:]):
1206         (-[_WKTouchEventGenerator liftUp:completionBlock:]):
1207         (-[_WKTouchEventGenerator moveToPoint:duration:completionBlock:]):
1208         (-[_WKTouchEventGenerator receivedHIDEvent:]):
1209         Copied and simplified from HIDEventGenerator in WebKitTestRunner.
1210
1211         * WebKit.xcodeproj/project.pbxproj:
1212         Add _WKTouchEventGenerator.{h,mm} and make it a private header. The client needs to
1213         route received HID events to -receivedHIDEvent: in order to detect when the marker
1214         HID event has been processed (and thus the interaction is completed).
1215
1216         * config.h: Add ENABLE(WEBDRIVER_*_INTERACTIONS) macros here.
1217
1218 2019-01-26  Simon Fraser  <simon.fraser@apple.com>
1219
1220         Have composited RenderIFrame layers make FrameHosting scrolling tree nodes to parent the iframe's scrolling node
1221         https://bugs.webkit.org/show_bug.cgi?id=193879
1222
1223         Reviewed by Antti Koivisto.
1224
1225         Need a specialization of dump() for ScrollingStateFrameHostingNode to avoid infinite recursion.
1226
1227         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
1228         (WebKit::dump):
1229
1230 2019-01-27  Chris Fleizach  <cfleizach@apple.com>
1231
1232         AX: Introduce a static accessibility tree
1233         https://bugs.webkit.org/show_bug.cgi?id=193348
1234         <rdar://problem/47203295>
1235
1236         Reviewed by Ryosuke Niwa.
1237
1238         * Configurations/FeatureDefines.xcconfig:
1239         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
1240         (-[WKAccessibilityWebPageObjectBase accessibilityRootObjectWrapper]):
1241
1242 2019-01-26  Simon Fraser  <simon.fraser@apple.com>
1243
1244         Allow scrolling tree nodes to exist in a detached state
1245         https://bugs.webkit.org/show_bug.cgi?id=193754
1246
1247         Reviewed by Zalan Bujtas.
1248
1249         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
1250         (WebKit::RemoteScrollingCoordinatorTransaction::decode):
1251
1252 2019-01-25  Tim Horton  <timothy_horton@apple.com>
1253
1254         REGRESSION (r238818): Snapshot is removed too late after swiping back on Twitter
1255         https://bugs.webkit.org/show_bug.cgi?id=193860
1256         <rdar://problem/47535022>
1257
1258         Reviewed by Antti Koivisto.
1259
1260         * UIProcess/Cocoa/ViewGestureController.cpp:
1261         (WebKit::ViewGestureController::didStartProvisionalOrSameDocumentLoadForMainFrame):
1262         (WebKit::ViewGestureController::didStartProvisionalLoadForMainFrame):
1263         (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
1264         * UIProcess/Cocoa/ViewGestureController.h:
1265         Treat provisional load and same document load the same: they already both
1266         unpause the snapshot removal tracker, request render tree size notifications,
1267         but same-document navigation was missing the call to dispatchAfterEnsuringDrawing
1268         and thus would get stuck waiting for RepaintAfterNavigation.
1269
1270 2019-01-25  Ryosuke Niwa  <rniwa@webkit.org>
1271
1272         Need a mechanism to override navigator.userAgent
1273         https://bugs.webkit.org/show_bug.cgi?id=193762
1274         <rdar://problem/47504939>
1275
1276         Reviewed by Brent Fulgham.
1277
1278         This patch adds a new _WKWebsitePolicies SPI to specify the user agent string returned by
1279         navigator.userAgent without affecting the user agent string used to send network requests.
1280
1281         Tests: WebKit.WebsitePoliciesCustomJavaScriptUserAgent
1282                WebKit.WebsitePoliciesCustomUserAgents
1283
1284         * Shared/WebsitePoliciesData.cpp:
1285         (WebKit::WebsitePoliciesData::encode const):
1286         (WebKit::WebsitePoliciesData::decode):
1287         (WebKit::WebsitePoliciesData::applyToDocumentLoader):
1288         * Shared/WebsitePoliciesData.h:
1289         * UIProcess/API/APIWebsitePolicies.cpp:
1290         (API::WebsitePolicies::data):
1291         * UIProcess/API/APIWebsitePolicies.h:
1292         * UIProcess/API/Cocoa/_WKWebsitePolicies.h:
1293         * UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
1294         (-[_WKWebsitePolicies setCustomJavaScriptUserAgent:]):
1295         (-[_WKWebsitePolicies customJavaScriptUserAgent]):
1296
1297 2019-01-25  Devin Rousso  <drousso@apple.com>
1298
1299         Web Inspector: provide a way to edit page settings on a remote target
1300         https://bugs.webkit.org/show_bug.cgi?id=193813
1301         <rdar://problem/47359510>
1302
1303         Reviewed by Joseph Pecoraro.
1304
1305         * WebProcess/WebPage/WebInspectorUI.h:
1306         (WebKit::WebInspectorUI::isRemote() const): Added.
1307         * WebProcess/WebPage/RemoteWebInspectorUI.h:
1308         (WebKit::RemoteWebInspectorUI::isRemote() const): Added.
1309
1310 2019-01-25  Dean Jackson  <dino@apple.com>
1311
1312         REGRESSION: Some USDz from 3rd party websites don't go directly to AR QL
1313         https://bugs.webkit.org/show_bug.cgi?id=193831
1314         <rdar://problem/47399263>
1315
1316         Reviewed by Chris Dumez.
1317
1318         A System Preview (<a rel="ar">) displays in a modal and doesn't trigger
1319         a navigation. If the link was cross origin, it was causing a process swap,
1320         which meant that the response defaulted back to a navigation.
1321
1322         The fix is to not cause a PSON when the navigation is a system preview.
1323
1324         * UIProcess/API/APINavigation.h:
1325         (API::Navigation::shouldForceDownload const): This is now just tracking
1326         the "download" attribute, and not including System Preview.
1327         (API::Navigation::isSystemPreview const): New method to check for a
1328         navigation triggered as a System Preview.
1329         * UIProcess/WebPageProxy.cpp: Move the code from receivedPolicyDecision to
1330         receivedNavigationPolicyDecision, so that downloads and System Previews are
1331         detected before we decide to change process.
1332         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
1333         (WebKit::WebPageProxy::receivedPolicyDecision):
1334
1335 2019-01-25  Tim Horton  <timothy_horton@apple.com>
1336
1337         Find-in-page on nyt.com scrolls around without touching the screen when find holes are visible
1338         https://bugs.webkit.org/show_bug.cgi?id=193853
1339
1340         Reviewed by Simon Fraser.
1341
1342         * WebProcess/WebPage/ios/FindControllerIOS.mm:
1343         (WebKit::FindController::updateFindIndicator):
1344         There is no reason to scroll/zoom to the find indicator just because the
1345         holes are up, we should only do it on initial indicator presentation.
1346         This was a mistake in r178755 that was previously never exercised because
1347         isShowingOverlay was always false.
1348
1349 2019-01-25  Keith Rollin  <krollin@apple.com>
1350
1351         Update Xcode projects with "Check .xcfilelists" build phase
1352         https://bugs.webkit.org/show_bug.cgi?id=193790
1353         <rdar://problem/47201374>
1354
1355         Reviewed by Alex Christensen.
1356
1357         Support for XCBuild includes specifying inputs and outputs to various
1358         Run Script build phases. These inputs and outputs are specified as
1359         .xcfilelist files. Once created, these .xcfilelist files need to be
1360         kept up-to-date. In order to check that they are up-to-date or not,
1361         add an Xcode build step that invokes an external script that performs
1362         the checking. If the .xcfilelists are found to be out-of-date, update
1363         them, halt the build, and instruct the developer to restart the build
1364         with up-to-date files.
1365
1366         At this time, the checking and regenerating is performed only if the
1367         WK_ENABLE_CHECK_XCFILELISTS environment variable is set to 1. People
1368         who want to use this facility can set this variable and test out the
1369         checking/regenerating. Once it seems like there are no egregious
1370         issues that upset a developer's workflow, we'll unconditionally enable
1371         this facility.
1372
1373         * Scripts/check-xcfilelists.sh: Added.
1374         * WebKit.xcodeproj/project.pbxproj:
1375
1376 2019-01-25  Alex Christensen  <achristensen@webkit.org>
1377
1378         Move logic from ChildProcess::setApplicationIsDaemon to NetworkProcess::initializeProcess
1379         https://bugs.webkit.org/show_bug.cgi?id=193844
1380
1381         Reviewed by Andy Estes.
1382
1383         This simplifies ChildProcess and removes NetworkProcess-specific code from this generic abstraction.
1384
1385         * NetworkProcess/mac/NetworkProcessMac.mm:
1386         (WebKit::NetworkProcess::initializeProcess):
1387         * Shared/ios/ChildProcessIOS.mm:
1388         (WebKit::ChildProcess::setApplicationIsDaemon): Deleted.
1389         * Shared/mac/ChildProcessMac.mm:
1390         (WebKit::ChildProcess::setApplicationIsDaemon): Deleted.
1391
1392 2019-01-25  Keith Rollin  <krollin@apple.com>
1393
1394         Update Xcode projects with "Apply Configuration to XCFileLists" build target
1395         https://bugs.webkit.org/show_bug.cgi?id=193781
1396         <rdar://problem/47201153>
1397
1398         Reviewed by Alex Christensen.
1399
1400         Part of generating the .xcfilelists used as part of adopting XCBuild
1401         includes running `make DerivedSources.make` from a standalone script.
1402         It’s important for this invocation to have the same environment as
1403         when the actual build invokes `make DerivedSources.make`. If the
1404         environments are different, then the two invocations will provide
1405         different results. In order to get the same environment in the
1406         standalone script, have the script launch xcodebuild targeting the
1407         "Apply Configuration to XCFileLists" build target, which will then
1408         re-invoke our standalone script. The script is now running again, this
1409         time in an environment with all workspace, project, target, xcconfig
1410         and other environment variables established.
1411
1412         The "Apply Configuration to XCFileLists" build target accomplishes
1413         this task via a small embedded shell script that consists only of:
1414
1415             eval "${WK_SUBLAUNCH_SCRIPT_PARAMETERS[@]}"
1416
1417         The process that invokes "Apply Configuration to XCFileLists" first
1418         sets WK_SUBLAUNCH_SCRIPT_PARAMETERS to an array of commands to be
1419         evaluated and exports it into the shell environment. When xcodebuild
1420         is invoked, it inherits the value of this variable and can `eval` the
1421         contents of that variable. Our external standalone script can then set
1422         WK_SUBLAUNCH_SCRIPT_PARAMETERS to the path to itself, along with a set
1423         of command-line parameters needed to restart itself in the appropriate
1424         state.
1425
1426         * WebKit.xcodeproj/project.pbxproj:
1427
1428 2019-01-25  Alex Christensen  <achristensen@webkit.org>
1429
1430         Add SPI to inform an application that "Go Back" has been clicked from a safe browsing warning
1431         https://bugs.webkit.org/show_bug.cgi?id=193802
1432         <rdar://problem/46010580>
1433
1434         Reviewed by Andy Estes.
1435
1436         * UIProcess/API/APIUIClient.h:
1437         (API::UIClient::didClickGoBackFromSafeBrowsingWarning):
1438         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1439         * UIProcess/Cocoa/UIDelegate.h:
1440         * UIProcess/Cocoa/UIDelegate.mm:
1441         (WebKit::UIDelegate::setDelegate):
1442         (WebKit::UIDelegate::UIClient::didClickGoBackFromSafeBrowsingWarning):
1443         * UIProcess/WebPageProxy.cpp:
1444         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1445
1446 2019-01-25  Daniel Bates  <dabates@apple.com>
1447
1448         [iOS] Pressing Tab key doesn't move to next cell with Google Sheets
1449         https://bugs.webkit.org/show_bug.cgi?id=193048
1450         <rdar://problem/46433836>
1451
1452         Reviewed by Brent Fulgham.
1453
1454         WebCore knows how interpret the Tab and Shift + Tab keys. When building with UIKit keyboard additions
1455         we do not need to register key commands for handling them from the UIProcess code. Instead UIKit will
1456         sends key events for these commands to us. This will make the behavior of these key commands when executed
1457         in an editable field match the behavior of these command when executed in a non-editable field since
1458         both code paths will now go through WebCore.
1459
1460         * UIProcess/ios/WKContentViewInteraction.mm:
1461         (-[WKContentView keyCommands]): Only compile when building with !USE(UIKIT_KEYBOARD_ADDITIONS).
1462
1463 2019-01-25  Alex Christensen  <achristensen@webkit.org>
1464
1465         Fix Linux build.
1466
1467         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1468         (WebKit::NetworkConnectionToWebProcess::requestResourceLoadStatisticsUpdate):
1469
1470 2019-01-25  Keith Rollin  <krollin@apple.com>
1471
1472         Update WebKitAdditions.xcconfig with correct order of variable definitions
1473         https://bugs.webkit.org/show_bug.cgi?id=193793
1474         <rdar://problem/47532439>
1475
1476         Reviewed by Alex Christensen.
1477
1478         XCBuild changes the way xcconfig variables are evaluated. In short,
1479         all config file assignments are now considered in part of the
1480         evaluation. When using the new build system and an .xcconfig file
1481         contains multiple assignments of the same build setting:
1482
1483         - Later assignments using $(inherited) will inherit from earlier
1484           assignments in the xcconfig file.
1485         - Later assignments not using $(inherited) will take precedence over
1486           earlier assignments. An assignment to a more general setting will
1487           mask an earlier assignment to a less general setting. For example,
1488           an assignment without a condition ('FOO = bar') will completely mask
1489           an earlier assignment with a condition ('FOO[sdk=macos*] = quux').
1490
1491         This affects some of our .xcconfig files, in that sometimes platform-
1492         or sdk-specific definitions appear before the general definitions.
1493         Under the new evaluations rules, the general definitions alway take
1494         effect because they always overwrite the more-specific definitions. The
1495         solution is to swap the order, so that the general definitions are
1496         established first, and then conditionally overwritten by the
1497         more-specific definitions.
1498
1499         * Configurations/BaseTarget.xcconfig:
1500         * Configurations/Version.xcconfig:
1501         * Configurations/WebKit.xcconfig:
1502
1503 2019-01-25  Keith Rollin  <krollin@apple.com>
1504
1505         Update existing .xcfilelists
1506         https://bugs.webkit.org/show_bug.cgi?id=193791
1507         <rdar://problem/47201706>
1508
1509         Reviewed by Alex Christensen.
1510
1511         Many .xcfilelist files were added in r238824 in order to support
1512         XCBuild. Update these with recent changes to the set of build files
1513         and with the current generate-xcfilelist script.
1514
1515         * DerivedSources-input.xcfilelist:
1516         * DerivedSources-output.xcfilelist:
1517         * UnifiedSources-input.xcfilelist:
1518         * UnifiedSources-output.xcfilelist:
1519
1520 2019-01-25  Per Arne Vollan  <pvollan@apple.com>
1521
1522         [iOS] Deny mach lookups to services not used.
1523         https://bugs.webkit.org/show_bug.cgi?id=193828
1524
1525         Reviewed by Brent Fulgham.
1526
1527         Start denying mach lookups to iOS services, which were previously allowed with reporting.
1528         Living-on has indicated that these services are not used.
1529
1530         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1531
1532 2019-01-25  Brent Fulgham  <bfulgham@apple.com>
1533
1534         Activate the WebResourceLoadStatisticsStore in the NetworkProcess and deactivate it in the UIProcess.
1535         https://bugs.webkit.org/show_bug.cgi?id=193297
1536         <rdar://problem/47158841>
1537
1538         Reviewed by Alex Christensen.
1539
1540         This patch activates the ResourceLoadStatistics code in the NetworkProcess, and turns
1541         it off in the UIProcess. It also updates test infrastructure to work with this change
1542         in architecture.
1543
1544         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
1545         (WebKit::ResourceLoadStatisticsMemoryStore::logSubresourceLoading): Added.
1546         (WebKit::ResourceLoadStatisticsMemoryStore::logSubresourceRedirect): Added.
1547         (WebKit::ResourceLoadStatisticsMemoryStore::logWebSocketLoading): Added.
1548         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
1549         (WebKit::WebResourceLoadStatisticsStore::logSubresourceLoading): Added.
1550         (WebKit::WebResourceLoadStatisticsStore::logSubresourceRedirect): Added.
1551         (WebKit::WebResourceLoadStatisticsStore::logWebSocketLoading): Added.
1552         (WebKit::WebResourceLoadStatisticsStore::removeAllStorageAccess):
1553         (WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCap):
1554         (WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCapForPrevalentResources): Deleted.
1555         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
1556         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1557         (WebKit::NetworkConnectionToWebProcess::logSubresourceLoading): Added.
1558         (WebKit::NetworkConnectionToWebProcess::logSubresourceRedirect): Added.
1559         (WebKit::NetworkConnectionToWebProcess::logWebSocketLoading): Added.
1560         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1561         * NetworkProcess/NetworkSession.cpp:
1562         (WebKit::NetworkSession::setResourceLoadStatisticsEnabled):
1563         * UIProcess/WebProcessPool.cpp:
1564         (WebKit::WebProcessPool::ensureNetworkProcess):
1565         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
1566         (WebKit::WebsiteDataStore::parameters):
1567         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1568         (WebKit::WebsiteDataStore::removeData):
1569         (WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):
1570         (WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):
1571         * Webprocess/WebProcess.cpp:
1572         (WebKit::WebProcess::initializeWebProcess): Register new ResourceLoadObserver callbacks.
1573
1574 2019-01-25  Ryosuke Niwa  <rniwa@webkit.org>
1575
1576         iOS: inputmode="none" disables hardware keyboard's globe key
1577         https://bugs.webkit.org/show_bug.cgi?id=193811
1578         <rdar://problem/47406553>
1579
1580         Reviewed by Wenson Hsieh.
1581
1582         Removed the support for inputmode="none" for now since we need a new SPI from UIKit
1583         to properly implement this feature some time in the future.
1584
1585         * UIProcess/ios/WKContentViewInteraction.mm:
1586         (-[WKContentView _zoomToRevealFocusedElement]):
1587         (-[WKContentView inputView]):
1588         (-[WKContentView requiresAccessoryView]):
1589         (-[WKContentView textInputTraits]):
1590
1591 2019-01-25  David Kilzer  <ddkilzer@apple.com>
1592
1593         Move soft-linking of Lookup.framework out of LookupSPI.h
1594         <https://webkit.org/b/193815>
1595
1596         Reviewed by Tim Horton.
1597
1598         * UIProcess/Cocoa/WebViewImpl.mm:
1599         (-[WKWindowVisibilityObserver dealloc]):
1600         (-[WKWindowVisibilityObserver startObservingLookupDismissalIfNeeded]):
1601         - Move soft-linking to LookupSoftLink.{h,mm}.
1602
1603 2019-01-25  Antti Koivisto  <antti@apple.com>
1604
1605         REGRESSION (PSON): After swipe back, first few attempts to swipe forward not recognized as swipe gestures
1606         https://bugs.webkit.org/show_bug.cgi?id=193818
1607         <rdar://problem/47456584>
1608
1609         Reviewed by Tim Horton.
1610
1611         We don't hit the RenderTreeSizeThreshold milestone to remove the snapshot and allow interaction because we request it
1612         from a wrong process (the one we are leaving behind).
1613
1614         * UIProcess/Cocoa/ViewGestureController.cpp:
1615         (WebKit::ViewGestureController::didStartProvisionalLoadForMainFrame):
1616
1617         Request the RenderTreeSizeThreshold notification when the load has started and we know the process to use.
1618
1619         (WebKit::ViewGestureController::SnapshotRemovalTracker::hasOutstandingEvent):
1620         * UIProcess/Cocoa/ViewGestureController.h:
1621         (WebKit::ViewGestureController::SnapshotRemovalTracker::renderTreeSizeThreshold const):
1622         (WebKit::ViewGestureController::SnapshotRemovalTracker::setRenderTreeSizeThreshold):
1623         * UIProcess/mac/ViewGestureControllerMac.mm:
1624         (WebKit::ViewGestureController::endSwipeGesture):
1625
1626         Don't request immediately, save the threshold to SnapshotRemovalTracker.
1627
1628         (WebKit::ViewGestureController::requestRenderTreeSizeNotificationIfNeeded):
1629
1630         Do the request to the right process.
1631
1632         * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
1633         (WebKit::ViewGestureGeometryCollector::setRenderTreeSizeNotificationThreshold):
1634
1635         Ensure we send the notification even if we reached the threshold before it was requested.
1636
1637         (WebKit::ViewGestureGeometryCollector::sendDidHitRenderTreeSizeThresholdIfNeeded):
1638         (WebKit::ViewGestureGeometryCollector::mainFrameDidLayout):
1639         * WebProcess/WebPage/ViewGestureGeometryCollector.h:
1640         (WebKit::ViewGestureGeometryCollector::setRenderTreeSizeNotificationThreshold): Deleted.
1641
1642 2019-01-25  Wenson Hsieh  <wenson_hsieh@apple.com>
1643
1644         [iOS] Rename some WebKit-internal functions and variables that reference "data interaction"
1645         https://bugs.webkit.org/show_bug.cgi?id=193829
1646
1647         Reviewed by Tim Horton.
1648
1649         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
1650         (WebKit::WebPageProxy::setDragCaretRect):
1651         * UIProcess/PageClient.h:
1652         * UIProcess/WebPageProxy.h:
1653         * UIProcess/WebPageProxy.messages.in:
1654         * UIProcess/ios/PageClientImplIOS.h:
1655         * UIProcess/ios/PageClientImplIOS.mm:
1656         (WebKit::PageClientImpl::didHandleDragStartRequest):
1657         (WebKit::PageClientImpl::didConcludeEditDrag):
1658         (WebKit::PageClientImpl::didChangeDragCaretRect):
1659         (WebKit::PageClientImpl::didHandleStartDataInteractionRequest): Deleted.
1660         (WebKit::PageClientImpl::didConcludeEditDataInteraction): Deleted.
1661         (WebKit::PageClientImpl::didChangeDataInteractionCaretRect): Deleted.
1662         * UIProcess/ios/WKContentViewInteraction.h:
1663         * UIProcess/ios/WKContentViewInteraction.mm:
1664         (-[WKContentView setupInteraction]):
1665         (-[WKContentView cleanupInteraction]):
1666         (-[WKContentView setupDragAndDropInteractions]):
1667         (-[WKContentView teardownDragAndDropInteractions]):
1668         (-[WKContentView _didHandleDragStartRequest:]):
1669         (-[WKContentView _didConcludeEditDrag:]):
1670         (-[WKContentView _didChangeDragCaretRect:currentRect:]):
1671         (-[WKContentView _dragInteraction:prepareForSession:completion:]):
1672         (-[WKContentView setupDataInteractionDelegates]): Deleted.
1673         (-[WKContentView teardownDataInteractionDelegates]): Deleted.
1674         (-[WKContentView _didHandleStartDataInteractionRequest:]): Deleted.
1675         (-[WKContentView _didConcludeEditDataInteraction:]): Deleted.
1676         (-[WKContentView _didChangeDataInteractionCaretRect:currentRect:]): Deleted.
1677         * UIProcess/ios/WebPageProxyIOS.mm:
1678         (WebKit::WebPageProxy::didHandleDragStartRequest):
1679         (WebKit::WebPageProxy::requestDragStart):
1680         (WebKit::WebPageProxy::didConcludeEditDrag):
1681         (WebKit::WebPageProxy::didHandleStartDataInteractionRequest): Deleted.
1682         (WebKit::WebPageProxy::requestStartDataInteraction): Deleted.
1683         (WebKit::WebPageProxy::didConcludeEditDataInteraction): Deleted.
1684         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1685         (WebKit::WebDragClient::didConcludeEditDrag):
1686         * WebProcess/WebPage/WebPage.h:
1687         * WebProcess/WebPage/WebPage.messages.in:
1688         * WebProcess/WebPage/ios/WebPageIOS.mm:
1689         (WebKit::WebPage::requestDragStart):
1690         (WebKit::WebPage::requestAdditionalItemsForDragSession):
1691         (WebKit::WebPage::didConcludeEditDrag):
1692         (WebKit::WebPage::requestStartDataInteraction): Deleted.
1693         (WebKit::WebPage::didConcludeEditDataInteraction): Deleted.
1694
1695 2019-01-25  Alex Christensen  <achristensen@webkit.org>
1696
1697         WKWebView.goBack should reload if there is a safe browsing warning
1698         https://bugs.webkit.org/show_bug.cgi?id=193805
1699         <rdar://problem/46908216>
1700
1701         Reviewed by Geoff Garen.
1702
1703         If a WKWebView is showing a safe browsing warning and the user clicks a back button
1704         in the app which calls WKWebView.goBack, the WKWebView is in a state where it has not navigated yet,
1705         so actually going back will appear to the user to go back twice.  We can't just do nothing because the
1706         app is in a state where it is expecting a navigation to happen.  Reloading achieves what the user expects
1707         and makes the app work like the app expects.
1708
1709         * UIProcess/API/C/WKPage.cpp:
1710         (WKPageGoBack):
1711         * UIProcess/API/Cocoa/WKWebView.mm:
1712         (-[WKWebView goBack]):
1713         * UIProcess/PageClient.h:
1714         (WebKit::PageClient::hasSafeBrowsingWarning const):
1715         * UIProcess/mac/PageClientImplMac.h:
1716         * UIProcess/mac/PageClientImplMac.mm:
1717         (WebKit::PageClientImpl::hasSafeBrowsingWarning const):
1718
1719 2019-01-25  Chris Dumez  <cdumez@apple.com>
1720
1721         Regression(PSON) cross-site provisional page is not canceled if a new same-site one is started
1722         https://bugs.webkit.org/show_bug.cgi?id=193788
1723         <rdar://problem/47531231>
1724
1725         Reviewed by Alex Christensen.
1726
1727         When the page starts a new provisional load, make sure we cancel any pending one in the provisional
1728         process, as it would have happened in the first provisional load happened in the same process.
1729         Without this, we could have 2 parallel loads happening, one in the committed process and another
1730         in the provisional one, leading to assertion failures in debug.
1731
1732         * UIProcess/WebPageProxy.cpp:
1733         (WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
1734
1735 2019-01-25  Chris Dumez  <cdumez@apple.com>
1736
1737         Drop WebKit::WebKitPolicyAction type as it is no longer needed
1738         https://bugs.webkit.org/show_bug.cgi?id=193827
1739
1740         Reviewed by Antti Koivisto.
1741
1742         Drop WebKit::WebKitPolicyAction type as it is no longer needed. It is now identical to
1743         WebCore::PolicyAction.
1744
1745         * Shared/WebPolicyAction.h: Removed.
1746         * UIProcess/WebFramePolicyListenerProxy.cpp:
1747         (WebKit::WebFramePolicyListenerProxy::didReceiveSafeBrowsingResults):
1748         (WebKit::WebFramePolicyListenerProxy::use):
1749         (WebKit::WebFramePolicyListenerProxy::download):
1750         (WebKit::WebFramePolicyListenerProxy::ignore):
1751         * UIProcess/WebFramePolicyListenerProxy.h:
1752         * UIProcess/WebFrameProxy.cpp:
1753         (WebKit::WebFrameProxy::setUpPolicyListenerProxy):
1754         * UIProcess/WebFrameProxy.h:
1755         * UIProcess/WebPageProxy.cpp:
1756         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
1757         (WebKit::WebPageProxy::receivedPolicyDecision):
1758         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1759         (WebKit::WebPageProxy::decidePolicyForNavigationActionSync):
1760         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
1761         (WebKit::WebPageProxy::decidePolicyForResponseShared):
1762         * UIProcess/WebPageProxy.h:
1763         * WebKit.xcodeproj/project.pbxproj:
1764         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1765         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
1766         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1767         * WebProcess/WebPage/WebFrame.cpp:
1768         (WebKit::WebFrame::didReceivePolicyDecision):
1769         (WebKit::toPolicyAction): Deleted.
1770         * WebProcess/WebPage/WebFrame.h:
1771         * WebProcess/WebPage/WebPage.cpp:
1772         (WebKit::WebPage::didReceivePolicyDecision):
1773         * WebProcess/WebPage/WebPage.h:
1774
1775 2019-01-25  Per Arne Vollan  <pvollan@apple.com>
1776
1777         [iOS] Add logging of calls
1778         https://bugs.webkit.org/show_bug.cgi?id=193784
1779
1780         Reviewed by Brent Fulgham.
1781
1782         Add permissive logging of calls on iOS.
1783
1784         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1785
1786 2019-01-25  Chris Dumez  <cdumez@apple.com>
1787
1788         Regression(PSON?) Crash under NavigationState::NavigationClient::decidePolicyForNavigationAction()
1789         https://bugs.webkit.org/show_bug.cgi?id=193779
1790         <rdar://problem/46170903>
1791
1792         Reviewed by Antti Koivisto.
1793
1794         * UIProcess/Cocoa/NavigationState.mm:
1795         (WebKit::tryAppLink):
1796         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
1797         We were crashing when trying to get the URL of the main frame, which was sad because we never
1798         ended up using the main frame URL. Therefore, this patch drops the code in question.
1799
1800         * UIProcess/ProvisionalPageProxy.cpp:
1801         (WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionAsync):
1802         Add assertion to make sure that the DecidePolicyForNavigationActionAsync IPC it is getting
1803         from the process is related to its main frame.
1804
1805 2019-01-25  Wenson Hsieh  <wenson_hsieh@apple.com>
1806
1807         Need a way for JavaScript (or bundle) code to participate in undo
1808         https://bugs.webkit.org/show_bug.cgi?id=190009
1809         <rdar://problem/44807048>
1810
1811         Reviewed by Ryosuke Niwa.
1812
1813         Invalidate undo steps when removing them from WebPage. Invalidation is a no-op for editing actions that come
1814         from the UA, but for custom undo steps backed by an UndoItem, we clear out the custom undo step's pointer to its
1815         UndoItem and additionally disconnect the UndoItem from its UndoManager.
1816
1817         * WebProcess/WebPage/WebPage.cpp:
1818         (WebKit::WebPage::addWebUndoStep):
1819         (WebKit::WebPage::removeWebEditCommand):
1820         * WebProcess/WebPage/WebUndoStep.h:
1821         (WebKit::WebUndoStep::invalidate):
1822
1823 2019-01-25  Patrick Griffis  <pgriffis@igalia.com>
1824
1825         [GTK][WPE] Add API to add paths to sandbox
1826         https://bugs.webkit.org/show_bug.cgi?id=193571
1827
1828         This allows applications to add paths to the web process
1829         if required by web extensions.
1830
1831         Reviewed by Michael Catanzaro.
1832
1833         * UIProcess/API/glib/WebKitWebContext.cpp:
1834         (webkit_web_context_add_path_to_sandbox):
1835         * UIProcess/API/gtk/WebKitWebContext.h:
1836         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
1837         * UIProcess/API/wpe/docs/wpe-0.1-sections.txt:
1838         * UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
1839         (WebKit::bubblewrapSpawn):
1840         * UIProcess/WebProcessPool.h:
1841         * UIProcess/glib/WebProcessProxyGLib.cpp:
1842         (WebKit::WebProcessProxy::platformGetLaunchOptions):
1843
1844 2019-01-24  Ryosuke Niwa  <rniwa@webkit.org>
1845
1846         iOS: Split keyboard should not shrink visualViewport.height
1847         https://bugs.webkit.org/show_bug.cgi?id=193798
1848
1849         Reviewed by Tim Horton.
1850
1851         Treat a split keyboard like a floating keyboard and don't consider its input view bounds in computing the visible content rects.
1852
1853         No new tests since while it's possible to transition between split and merged keyboard using some SPI,
1854         there isn't a reliable mechanism to reset the keyboard state. e.g. we need to wait for a hard-coded amount of time.
1855
1856         * Platform/spi/ios/UIKitSPI.h:
1857         * UIProcess/API/Cocoa/WKWebView.mm:
1858         (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
1859
1860 2019-01-24  Eric Carlson  <eric.carlson@apple.com>
1861
1862         [iOS] Silence MediaPlayer compile warnings
1863         https://bugs.webkit.org/show_bug.cgi?id=193780
1864         <rdar://problem/47518428>
1865
1866         Reviewed by Jer Noble.
1867
1868         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
1869
1870 2019-01-24  Truitt Savell  <tsavell@apple.com>
1871
1872         Unreviewed, rolling out r240446.
1873
1874         Casued 5 API failures
1875
1876         Reverted changeset:
1877
1878         "Activate the WebResourceLoadStatisticsStore in the
1879         NetworkProcess and deactivate it in the UIProcess."
1880         https://bugs.webkit.org/show_bug.cgi?id=193297
1881         https://trac.webkit.org/changeset/240446
1882
1883 2019-01-24  Brent Fulgham  <bfulgham@apple.com>
1884
1885         Activate the WebResourceLoadStatisticsStore in the NetworkProcess and deactivate it in the UIProcess.
1886         https://bugs.webkit.org/show_bug.cgi?id=193297
1887         <rdar://problem/47158841>
1888
1889         Reviewed by Alex Christensen.
1890
1891         This patch activates the ResourceLoadStatistics code in the NetworkProcess, and turns
1892         it off in the UIProcess. It also updates test infrastructure to work with this change
1893         in architecture.
1894
1895         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
1896         (WebKit::ResourceLoadStatisticsMemoryStore::logSubresourceLoading): Added.
1897         (WebKit::ResourceLoadStatisticsMemoryStore::logSubresourceRedirect): Added.
1898         (WebKit::ResourceLoadStatisticsMemoryStore::logWebSocketLoading): Added.
1899         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
1900         (WebKit::WebResourceLoadStatisticsStore::logSubresourceLoading): Added.
1901         (WebKit::WebResourceLoadStatisticsStore::logSubresourceRedirect): Added.
1902         (WebKit::WebResourceLoadStatisticsStore::logWebSocketLoading): Added.
1903         (WebKit::WebResourceLoadStatisticsStore::removeAllStorageAccess):
1904         (WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCap):
1905         (WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCapForPrevalentResources): Deleted.
1906         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
1907         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1908         (WebKit::NetworkConnectionToWebProcess::logSubresourceLoading): Added.
1909         (WebKit::NetworkConnectionToWebProcess::logSubresourceRedirect): Added.
1910         (WebKit::NetworkConnectionToWebProcess::logWebSocketLoading): Added.
1911         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1912         * NetworkProcess/NetworkSession.cpp:
1913         (WebKit::NetworkSession::setResourceLoadStatisticsEnabled):
1914         * UIProcess/WebProcessPool.cpp:
1915         (WebKit::WebProcessPool::ensureNetworkProcess):
1916         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
1917         (WebKit::WebsiteDataStore::parameters):
1918         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1919         (WebKit::WebsiteDataStore::removeData):
1920         (WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):
1921         (WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):
1922         * Webprocess/WebProcess.cpp:
1923         (WebKit::WebProcess::initializeWebProcess): Register new ResourceLoadObserver callbacks.
1924
1925 2019-01-24  John Wilander  <wilander@apple.com>
1926
1927         Add Ad Click Attribution as an internal/experimental feature
1928         https://bugs.webkit.org/show_bug.cgi?id=193685
1929         <rdar://problem/47450399>
1930
1931         Reviewed by Brent Fulgham.
1932
1933         * Shared/WebPreferences.yaml:
1934             Added AdClickAttributionEnabled as a runtime enabled feature, off by default.
1935
1936 2019-01-24  Antti Koivisto  <antti@apple.com>
1937
1938         [PSON] Flash on back navigation on Mac
1939         https://bugs.webkit.org/show_bug.cgi?id=193716
1940         <rdar://problem/47148458>
1941
1942         Reviewed by Chris Dumez.
1943
1944         We close the page immediately if we fail to suspend. Layers disappear and we get a flash.
1945
1946         * UIProcess/SuspendedPageProxy.cpp:
1947         (WebKit::SuspendedPageProxy::~SuspendedPageProxy):
1948         (WebKit::SuspendedPageProxy::close):
1949
1950         Track closed state so we don't send the message twice, causing unhandled message errors in web process.
1951
1952         (WebKit::SuspendedPageProxy::didProcessRequestToSuspend):
1953
1954         Close the suspended page if the suspension fails.
1955         Skip this if we are using web process side compositing on Mac.
1956
1957         * UIProcess/SuspendedPageProxy.h:
1958         * UIProcess/WebPageProxy.cpp:
1959         (WebKit::WebPageProxy::enterAcceleratedCompositingMode):
1960
1961         On Mac, close the failed SuspendedPageProxy when entering compositing mode. At this point we don't need it to keep layers alive.
1962
1963         * UIProcess/WebProcessPool.cpp:
1964         (WebKit::WebProcessPool::closeFailedSuspendedPagesForPage):
1965         * UIProcess/WebProcessPool.h:
1966         * WebProcess/WebPage/WebPage.cpp:
1967         (WebKit::WebPage::suspendForProcessSwap):
1968
1969         Don't close the page on suspension failure. This is now managed by the UI process.
1970
1971 2019-01-24  Chris Dumez  <cdumez@apple.com>
1972
1973         Regression(PSON) Back/Forward list items' URL sometimes gets replaced with the URL of a subframe
1974         https://bugs.webkit.org/show_bug.cgi?id=193761
1975         <rdar://problem/47456405>
1976
1977         Reviewed by Alex Christensen.
1978
1979         When doing a history navigation cross-process, the UIProcess would first send the back/forward list items
1980         to the destination WebProcess via WebPage::updateBackForwardListForReattach(), then ask the process to
1981         navigate to the expected back/forward list item.
1982
1983         WebPage::updateBackForwardListForReattach() would call restoreSessionInternal(), which would call
1984         toHistoryItem() on each BackForwardListItem. This may end up creating more than one HistoryItem for each
1985         BackForwardListItem because HistoryItems are part of a tree (each frame has its own list of history items).
1986
1987         Note that BackForwardListItems and HistoryItem share a BackForwardItemIdentifier which is a
1988         (processIdentifier, itemIdentifier) pair. We normally generate the HistoryItem's identifier from inside
1989         its constructor like so:
1990         `{ Process::identifier(), generateObjectIdentifier<BackForwardItemIdentifier::ItemIdentifierType>() }`
1991
1992         However, when calling updateBackForwardListForReattach() and constructing children HistoryItem,
1993         applyFrameState() would generate the identifier by itself and passing it to the HistoryItem constructor.
1994         Its genegates the ID the exact same way so this would in theory not be a problem. Unfortunately, both
1995         calls to generateObjectIdentifier() get inlined and both call sites end up with their own static counter
1996         to generate ids. As a result, we may end up with conflicts as HistoryItems for child frames (restored
1997         by restoreSessionInternal()) can end up with the same identifier as HistoryItems for top frames.
1998
1999         This confusion would lead to the WebContent process sending the UIProcess bad information and the URL
2000         of subframes could end up as the WebBackForwardListItem's mainframe URL.
2001
2002         * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
2003         (WebKit::applyFrameState):
2004         Stop calling generateObjectIdentifier() explicitly and let the HistoryItem constructor take care of it.
2005         Calling generateObjectIdentifier() for the same type from different places is not safe due to inlining.
2006
2007 2019-01-24  Ross Kirsling  <ross.kirsling@sony.com>
2008
2009         Move FileSystem to WTF
2010         https://bugs.webkit.org/show_bug.cgi?id=193602
2011
2012         Reviewed by Yusuke Suzuki.
2013
2014         * NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.cpp:
2015         * NetworkProcess/NetworkDataTaskBlob.h:
2016         * NetworkProcess/NetworkProcess.cpp:
2017         * NetworkProcess/cache/CacheStorageEngine.cpp:
2018         * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
2019         * NetworkProcess/cache/NetworkCache.cpp:
2020         * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
2021         * NetworkProcess/cache/NetworkCacheData.cpp:
2022         * NetworkProcess/cache/NetworkCacheFileSystem.cpp:
2023         * NetworkProcess/cache/NetworkCacheFileSystem.h:
2024         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
2025         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
2026         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
2027         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2028         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
2029         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2030         * NetworkProcess/mac/NetworkProcessMac.mm:
2031         * NetworkProcess/soup/NetworkProcessSoup.cpp:
2032         * PluginProcess/unix/PluginProcessMainUnix.cpp:
2033         * Shared/PersistencyUtils.cpp:
2034         * Shared/Plugins/Netscape/unix/NetscapePluginModuleUnix.cpp:
2035         * Shared/Plugins/unix/PluginSearchPath.cpp:
2036         * Shared/WebMemorySampler.h:
2037         * Shared/glib/ProcessExecutablePathGLib.cpp:
2038         * Shared/ios/ChildProcessIOS.mm:
2039         * Shared/mac/ChildProcessMac.mm:
2040         * Shared/mac/SandboxExtensionMac.mm:
2041         * UIProcess/API/APIContentRuleListStore.cpp:
2042         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
2043         * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp:
2044         * UIProcess/API/glib/IconDatabase.cpp:
2045         * UIProcess/API/glib/WebKitFaviconDatabase.cpp:
2046         * UIProcess/API/glib/WebKitFileChooserRequest.cpp:
2047         * UIProcess/API/glib/WebKitWebContext.cpp:
2048         * UIProcess/API/glib/WebKitWebsiteDataManager.cpp:
2049         * UIProcess/API/win/APIWebsiteDataStoreWin.cpp:
2050         * UIProcess/Automation/WebAutomationSession.cpp:
2051         * UIProcess/Cocoa/DownloadClient.mm:
2052         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2053         * UIProcess/Cocoa/WebViewImpl.mm:
2054         * UIProcess/DeviceIdHashSaltStorage.cpp:
2055         * UIProcess/Downloads/DownloadProxy.cpp:
2056         * UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
2057         * UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:
2058         * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
2059         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2060         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
2061         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
2062         * UIProcess/ServiceWorkerProcessProxy.cpp:
2063         * UIProcess/WebStorage/LocalStorageDatabase.cpp:
2064         * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp:
2065         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
2066         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2067         * UIProcess/glib/WebProcessProxyGLib.cpp:
2068         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
2069         * UIProcess/gtk/WebProcessPoolGtk.cpp:
2070         * UIProcess/ios/WKContentViewInteraction.mm:
2071         * UIProcess/ios/forms/WKFileUploadPanel.mm:
2072         * UIProcess/mac/WebPageProxyMac.mm:
2073         * UIProcess/win/WebProcessPoolWin.cpp:
2074         * UIProcess/win/WebView.cpp:
2075         * UIProcess/wpe/WebProcessPoolWPE.cpp:
2076         * WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.cpp:
2077         * WebProcess/InjectedBundle/glib/InjectedBundleGlib.cpp:
2078         * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
2079         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
2080         * WebProcess/Plugins/PluginProcessConnection.cpp:
2081         * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
2082         * WebProcess/WebPage/gtk/WebInspectorUIGtk.cpp:
2083         * WebProcess/WebPage/win/WebInspectorUIWin.cpp:
2084         * WebProcess/cocoa/WebProcessCocoa.mm:
2085
2086 2019-01-23  Simon Fraser  <simon.fraser@apple.com>
2087
2088         Create "frame hosting" nodes for the scrolling tree
2089         https://bugs.webkit.org/show_bug.cgi?id=193753
2090
2091         Reviewed by Antti Koivisto.
2092
2093         When the scrolling tree crosses frame boundaries, mutations in the parent frame currently
2094         require the iframe's scrolling node to get reparented in a new ancestor, which requires
2095         a layer tree walk of the parent frame. This is error-prone, and not very future-proof.
2096
2097         Fix this by introducing "frame hosting" scrolling tree nodes. These are mostly inert
2098         nodes that are owned by the RenderIFrame's layer backing in the parent frame, and exist
2099         to provide a consistent parent node for the subframe's scrolling node.
2100
2101         This patch adds the node types, but does not instantiate them yet.
2102
2103         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
2104         (ArgumentCoder<ScrollingStateFrameHostingNode>::encode):
2105         (ArgumentCoder<ScrollingStateFrameHostingNode>::decode):
2106         (WebKit::encodeNodeAndDescendants):
2107         (WebKit::RemoteScrollingCoordinatorTransaction::decode):
2108         (WebKit::dump):
2109         * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
2110         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
2111         * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:
2112         (WebKit::RemoteScrollingTree::createScrollingTreeNode):
2113         * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
2114         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
2115
2116 2019-01-23  Ross Kirsling  <ross.kirsling@sony.com>
2117
2118         [Curl] Unreviewed build fix for r240292 and friends.
2119
2120         WinCairo test stability must be restored in subsequent patch.
2121
2122         * NetworkProcess/curl/NetworkProcessCurl.cpp:
2123         (WebKit::NetworkProcess::platformCreateDefaultStorageSession const):
2124         (WebKit::NetworkProcess::setNetworkProxySettings):
2125
2126 2019-01-23  Commit Queue  <commit-queue@webkit.org>
2127
2128         Unreviewed, rolling out r240403.
2129         https://bugs.webkit.org/show_bug.cgi?id=193757
2130
2131         "Causes multiple crashes on macOS port (probably used wrong
2132         ENABLE macro)" (Requested by ddkilzer on #webkit).
2133
2134         Reverted changeset:
2135
2136         "[Curl] Unreviewed build fix for r240292 and friends."
2137         https://trac.webkit.org/changeset/240403
2138
2139 2019-01-23  Ross Kirsling  <ross.kirsling@sony.com>
2140
2141         [Curl] Unreviewed build fix for r240292 and friends.
2142
2143         WinCairo test stability must be restored in subsequent patch.
2144
2145         * NetworkProcess/curl/NetworkProcessCurl.cpp:
2146         (WebKit::NetworkProcess::platformCreateDefaultStorageSession const):
2147         (WebKit::NetworkProcess::setNetworkProxySettings):
2148
2149 2019-01-23  Alex Christensen  <achristensen@webkit.org>
2150
2151         Stop using NetworkProcess::singleton
2152         https://bugs.webkit.org/show_bug.cgi?id=193700
2153
2154         Reviewed by Don Olmstead.
2155
2156         This replaces it with a NeverDestroyed<NetworkProcess> and paves the way for more interesting things.
2157
2158         * NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp:
2159         * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
2160         (WebKit::initializeChildProcess<WebKit::NetworkProcess>):
2161         * NetworkProcess/NetworkProcess.cpp:
2162         (WebKit::NetworkProcess::NetworkProcess):
2163         (WebKit::NetworkProcess::singleton): Deleted.
2164         * NetworkProcess/NetworkProcess.h:
2165         * NetworkProcess/soup/NetworkProcessMainSoup.cpp:
2166         (WebKit::initializeChildProcess<WebKit::NetworkProcess>):
2167         * NetworkProcess/win/NetworkProcessMainWin.cpp:
2168         (WebKit::initializeChildProcess<WebKit::NetworkProcess>):
2169         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
2170         (WebKit::initializeChildProcess):
2171         (WebKit::XPCServiceInitializer):
2172
2173 2019-01-23  Ryan Haddad  <ryanhaddad@apple.com>
2174
2175         Unreviewed, rolling out r240343.
2176
2177         Caused 4 PSON API test failures.
2178
2179         Reverted changeset:
2180
2181         "[PSON] Flash on back navigation on Mac"
2182         https://bugs.webkit.org/show_bug.cgi?id=193716
2183         https://trac.webkit.org/changeset/240343
2184
2185 2019-01-23  Chris Dumez  <cdumez@apple.com>
2186
2187         Deprecate API to limit the maximum number of WebProcesses
2188         https://bugs.webkit.org/show_bug.cgi?id=193725
2189         <rdar://problem/47464879>
2190
2191         Reviewed by Geoff Garen.
2192
2193         Deprecate API to limit the maximum number of WebProcesses and make it a no-op. It adds
2194         complexity and is not safe (conflicts with PSON).
2195
2196         Add a new usesSingleWebProcess SPI to _WKProcessPoolConfiguration to be used by
2197         Minibrowser / Safari in order to disable process per tab (can be useful for debugging).
2198         Note that enabling the single WebProcess mode will disable PSON and process prewarming.
2199
2200         * UIProcess/API/APIProcessPoolConfiguration.cpp:
2201         (API::ProcessPoolConfiguration::createWithLegacyOptions):
2202         (API::ProcessPoolConfiguration::copy):
2203         * UIProcess/API/APIProcessPoolConfiguration.h:
2204         * UIProcess/API/C/WKContext.cpp:
2205         (WKContextSetMaximumNumberOfProcesses):
2206         (WKContextGetMaximumNumberOfProcesses):
2207         * UIProcess/API/C/WKContext.h:
2208         * UIProcess/API/Cocoa/WKProcessPool.mm:
2209         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2210         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
2211         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
2212         (-[_WKProcessPoolConfiguration maximumProcessCount]):
2213         (-[_WKProcessPoolConfiguration setMaximumProcessCount:]):
2214         (-[_WKProcessPoolConfiguration usesSingleWebProcess]):
2215         (-[_WKProcessPoolConfiguration setUsesSingleWebProcess:]):
2216         (-[_WKProcessPoolConfiguration description]):
2217         * UIProcess/API/glib/WebKitWebContext.cpp:
2218         (webkitWebContextConstructed):
2219         (webkit_web_context_set_process_model):
2220         (webkit_web_context_set_web_process_count_limit):
2221         * UIProcess/WebProcessPool.cpp:
2222         (WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit):
2223         (WebKit::WebProcessPool::didReachGoodTimeToPrewarm):
2224         (WebKit::WebProcessPool::processForNavigationInternal):
2225         * UIProcess/WebProcessPool.h:
2226
2227 2019-01-23  Brent Fulgham  <bfulgham@apple.com>
2228
2229         Switch NetworkStorageSession portions of ResourceLoadStatistics to Async message passing style
2230         https://bugs.webkit.org/show_bug.cgi?id=193659
2231         <rdar://problem/47433290>
2232
2233         Reviewed by Alex Christensen.
2234
2235         Change the implementations of ResourceLoadStatistics code in NetworkStorageSession to use the
2236         'sendWithAsyncReply' so that more of the code is autogenerated. This should make test runs more
2237         consistent, and should reduce the possibility of bookkeeping errors in the message handling
2238         implementations.
2239
2240         Fix the implementation of NetworkProcessProxy::clearCallbackStates to remove the manually constructed
2241         (and incomplete) message callbacks. These errors are a big reason to move to the auto-generated
2242         'sendWithAsyncReply' implementatoin. Ditto for NetworkProcessProxy::didClose.
2243
2244         This patch also moves an initializaton call (WebsiteDataStore::didCreateNetworkProcess) from
2245         'ensureNetworkProcess' to 'processDidFinishLaunching'. In current code, the call happens before
2246         a connection is established to the network process, causing initialization messages to get dropped
2247         leading to test system flakiness.
2248
2249         Finally: The WK API test code was updated to ensure that completion handlers are always called, even
2250         when built without ENABLE_RESOURCE_LOAD_STATISTICS defined.
2251
2252         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
2253         * NetworkProcess/Classifier/ShouldGrandfatherStatistics.h: Added.
2254         * NetworkProcess/Classifier/StorageAccessStatus.h: Added.
2255         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
2256         (WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent):
2257         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
2258         * NetworkProcess/NetworkProcess.cpp:
2259         (WebKit::NetworkProcess::updatePrevalentDomainsToBlockCookiesFor):
2260         (WebKit::NetworkProcess::setAgeCapForClientSideCookies):
2261         (WebKit::NetworkProcess::scheduleClearInMemoryAndPersistent):
2262         (WebKit::NetworkProcess::hasStorageAccessForFrame):
2263         (WebKit::NetworkProcess::requestStorageAccess):
2264         (WebKit::NetworkProcess::grantStorageAccess):
2265         (WebKit::NetworkProcess::removeAllStorageAccess):
2266         (WebKit::NetworkProcess::setCacheMaxAgeCapForPrevalentResources):
2267         (WebKit::NetworkProcess::resetCacheMaxAgeCapForPrevalentResources):
2268         (WebKit::NetworkProcess::deleteWebsiteData):
2269         * NetworkProcess/NetworkProcess.h:
2270         * NetworkProcess/NetworkProcess.messages.in:
2271         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
2272         (WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStore):
2273         (WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
2274         (WKWebsiteDataStoreStatisticsResetToConsistentState):
2275         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2276         * UIProcess/Network/NetworkProcessProxy.cpp:
2277         (WebKit::NetworkProcessProxy::clearCallbackStates): Remove incomplete clean-up code that
2278         is now autogenerated.
2279         (WebKit::NetworkProcessProxy::didClose): Ditto.
2280         (WebKit::NetworkProcessProxy::updatePrevalentDomainsToBlockCookiesFor):
2281         (WebKit::NetworkProcessProxy::scheduleClearInMemoryAndPersistent):
2282         (WebKit::NetworkProcessProxy::setAgeCapForClientSideCookies):
2283         (WebKit::NetworkProcessProxy::hasStorageAccessForFrame):
2284         (WebKit::NetworkProcessProxy::requestStorageAccess):
2285         (WebKit::NetworkProcessProxy::grantStorageAccess):
2286         (WebKit::NetworkProcessProxy::removeAllStorageAccess):
2287         (WebKit::NetworkProcessProxy::setCacheMaxAgeCapForPrevalentResources):
2288         (WebKit::NetworkProcessProxy::setCacheMaxAgeCap):
2289         (WebKit::NetworkProcessProxy::resetCacheMaxAgeCapForPrevalentResources):
2290         (WebKit::NetworkProcessProxy::didUpdateBlockCookies): Deleted.
2291         (WebKit::NetworkProcessProxy::didSetAgeCapForClientSideCookies): Deleted.
2292         (WebKit::NetworkProcessProxy::didUpdateRuntimeSettings): Deleted.
2293         (WebKit::NetworkProcessProxy::storageAccessRequestResult): Deleted.
2294         (WebKit::NetworkProcessProxy::storageAccessOperationResult): Deleted.
2295         (WebKit::NetworkProcessProxy::didRemoveAllStorageAccess): Deleted.
2296         (WebKit::NetworkProcessProxy::didSetCacheMaxAgeCapForPrevalentResources): Deleted.
2297         * UIProcess/Network/NetworkProcessProxy.h:
2298         * UIProcess/Network/NetworkProcessProxy.messages.in:
2299         * UIProcess/WebPageProxy.cpp:
2300         * UIProcess/WebProcessPool.cpp:
2301         (WebKit::WebProcessPool::ensureNetworkProcess): Move WebsiteDataStore 'didCreateNetworkProcess'
2302         to 'processDidFinishLaunching'. Currently the call happens before a connection is established,
2303         causing initialization messages to get dropped.
2304         (WebKit::WebProcessPool::processDidFinishLaunching): Ditto.
2305         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2306         (WebKit::WebsiteDataStore::removeData):
2307         (WebKit::WebsiteDataStore::setMaxStatisticsEntries):
2308         (WebKit::WebsiteDataStore::setPruneEntriesDownTo):
2309         (WebKit::WebsiteDataStore::setGrandfatheringTime):
2310         (WebKit::WebsiteDataStore::setCacheMaxAgeCap):
2311         (WebKit::WebsiteDataStore::setMinimumTimeBetweenDataRecordsRemoval):
2312         (WebKit::WebsiteDataStore::setPrevalentResource):
2313         (WebKit::WebsiteDataStore::setShouldClassifyResourcesBeforeDataRecordsRemoval):
2314         (WebKit::WebsiteDataStore::scheduleClearInMemoryAndPersistent):
2315         (WebKit::WebsiteDataStore::setAgeCapForClientSideCookies):
2316         (WebKit::WebsiteDataStore::setNotifyPagesWhenDataRecordsWereScanned):
2317         (WebKit::WebsiteDataStore::setNotifyPagesWhenTelemetryWasCaptured):
2318         (WebKit::WebsiteDataStore::setTimeToLiveUserInteraction):
2319         (WebKit::WebsiteDataStore::setCacheMaxAgeCapForPrevalentResources):
2320         (WebKit::WebsiteDataStore::setResourceLoadStatisticsDebugMode):
2321         * UIProcess/WebsiteData/WebsiteDataStore.h:
2322         * WebKit.xcodeproj/project.pbxproj:
2323
2324 2019-01-23  Sihui Liu  <sihui_liu@apple.com>
2325
2326         Clean up IndexedDB files between tests
2327         https://bugs.webkit.org/show_bug.cgi?id=192796
2328         <rdar://problem/46824999>
2329
2330         Reviewed by Geoffrey Garen.
2331
2332         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
2333         (WKWebsiteDataStoreRemoveAllIndexedDatabases):
2334         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
2335
2336 2019-01-23  Wenson Hsieh  <wenson_hsieh@apple.com>
2337
2338         [iOS] fast/events/touch/ios/hover-when-style-change-is-async.html times out
2339         https://bugs.webkit.org/show_bug.cgi?id=193182
2340         <rdar://problem/47452154>
2341
2342         Reviewed by Tim Horton.
2343
2344         Fix an existing bug where blurring an element doesn't always un-suppress text interactions.
2345
2346         * UIProcess/ios/WKContentViewInteraction.mm:
2347         (-[WKContentView _elementDidBlur]):
2348
2349 2019-01-23  Michael Catanzaro  <mcatanzaro@igalia.com>
2350
2351         Minor improvements to NetworkProcess
2352         https://bugs.webkit.org/show_bug.cgi?id=193708
2353
2354         Reviewed by Alex Christensen.
2355
2356         * NetworkProcess/NetworkProcess.cpp:
2357         (WebKit::NetworkProcess::switchToNewTestingSession): Fix a spelling error.
2358         (WebKit::NetworkProcess::ensureSession): Add useful assertion.
2359         (WebKit::NetworkProcess::defaultStorageSession const): Split into platform functions.
2360         (WebKit::NetworkProcess::destroySession): Add useful assertion.
2361         * NetworkProcess/NetworkProcess.h:
2362         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2363         (WebKit::NetworkProcess::platformCreateDefaultStorageSession const):
2364         * NetworkProcess/curl/NetworkProcessCurl.cpp:
2365         (WebKit::NetworkProcess::platformCreateDefaultStorageSession const):
2366         * NetworkProcess/soup/NetworkProcessSoup.cpp:
2367         (WebKit::NetworkProcess::platformCreateDefaultStorageSession const):
2368
2369 2019-01-23  Daniel Bates  <dabates@apple.com>
2370
2371         Fix the Apple Internal build. See <rdar://problem/47486758>.
2372
2373         * UIProcess/ios/WKContentViewInteraction.mm:
2374         (-[WKContentView dropInteraction:previewForDroppingItem:withDefault:]):
2375
2376 2019-01-23  Per Arne Vollan  <pvollan@apple.com>
2377
2378         [macOS] Sandbox fails to compile
2379         https://bugs.webkit.org/show_bug.cgi?id=193727
2380         <rdar://problem/47476903>
2381
2382         Reviewed by Brent Fulgham.
2383
2384         Use '(with send-signal SIGKILL)' instead of '(with termination)'.
2385
2386         * WebProcess/com.apple.WebProcess.sb.in:
2387
2388 2019-01-23  Brent Fulgham  <bfulgham@apple.com>
2389
2390         REGRESSION (r240243): CrashTracer: WebKitTestRunnerApp at com.apple.WebKit: WebKit::WebResourceLoadStatisticsStore::sendDiagnosticMessageWithValue const + 32
2391         https://bugs.webkit.org/show_bug.cgi?id=193723
2392         <rdar://problem/47476802>
2393
2394         Reviewed by David Kilzer.
2395
2396         The new code added in r240243 could attempt to submit telemetry after the relevant
2397         WebResourceLoadStatisticsStore was destroyed. We should guard against this possibility.
2398
2399         * NetworkProcess/Classifier/WebResourceLoadStatisticsTelemetry.cpp:
2400         (WebKit::WebResourceLoadStatisticsTelemetry::calculateAndSubmit):
2401
2402 2019-01-23  Antti Koivisto  <antti@apple.com>
2403
2404         [PSON] Flash on back navigation on Mac
2405         https://bugs.webkit.org/show_bug.cgi?id=193716
2406         <rdar://problem/47148458>
2407
2408         Reviewed by Chris Dumez.
2409
2410         We close the page immediately if we fail to suspend. Layers disappear and we get a flash.
2411
2412         * UIProcess/SuspendedPageProxy.cpp:
2413         (WebKit::SuspendedPageProxy::didProcessRequestToSuspend):
2414
2415         Remove the suspended page (so closing it on web process side) if the suspension fails.
2416         Skip this if we are using web process side compositing on Mac.
2417
2418         * UIProcess/WebPageProxy.cpp:
2419         (WebKit::WebPageProxy::enterAcceleratedCompositingMode):
2420
2421         On Mac, remove failed SuspendedPageProxy when entering compositing mode. At this point we don't need it to keep layers alive.
2422
2423         * UIProcess/WebProcessPool.cpp:
2424         (WebKit::WebProcessPool::removeFailedSuspendedPagesForPage):
2425         * UIProcess/WebProcessPool.h:
2426         * WebProcess/WebPage/WebPage.cpp:
2427         (WebKit::WebPage::suspendForProcessSwap):
2428
2429         Don't close the page on suspension failure.
2430
2431 2019-01-23  Wenson Hsieh  <wenson_hsieh@apple.com>
2432
2433         Introduce UndoStep::label() and adopt it in WebKitLegacy and WebKit
2434         https://bugs.webkit.org/show_bug.cgi?id=193706
2435         <rdar://problem/44807048>
2436
2437         Reviewed by Ryosuke Niwa.
2438
2439         * UIProcess/Cocoa/WebViewImpl.mm:
2440         (WebKit::WebViewImpl::registerEditCommand):
2441         * UIProcess/WebEditCommandProxy.cpp:
2442         (WebKit::WebEditCommandProxy::WebEditCommandProxy):
2443         * UIProcess/WebEditCommandProxy.h:
2444
2445         Drive-by tweak: make WebEditCommandProxy's backpointer to its WebPageProxy a WeakPtr instead of a raw pointer.
2446         Additionally, call clear() instead of setting m_page to 0 upon invalidation. Also, turn the WebPageProxy*
2447         argument into a WebPageProxy&, since the WebPageProxy must exist when it creates a new WebEditCommandProxy.
2448
2449         (WebKit::WebEditCommandProxy::create):
2450         (WebKit::WebEditCommandProxy::label const):
2451         (WebKit::WebEditCommandProxy::invalidate):
2452         (WebKit::WebEditCommandProxy::editAction const): Deleted.
2453
2454         Adjust UI-side logic to just handle the undo/redo label, rather than map the edit action to a localized string.
2455
2456         * UIProcess/WebPageProxy.cpp:
2457         (WebKit::WebPageProxy::registerEditCommandForUndo):
2458         (WebKit::WebPageProxy::resetState):
2459
2460         Tweak this to use std::exchange instead of copying all the WebEditCommandProxy RefPtrs into a separate Vector
2461         and then iterating over the Vector.
2462
2463         * UIProcess/WebPageProxy.h:
2464         * UIProcess/WebPageProxy.messages.in:
2465
2466         Adjust this so that we only send the undo/redo label over IPC, rather than the edit action type.
2467
2468         * UIProcess/ios/PageClientImplIOS.mm:
2469         (WebKit::PageClientImpl::registerEditCommand):
2470         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2471         (WebKit::WebEditorClient::registerUndoStep):
2472
2473 2019-01-23  Michael Catanzaro  <mcatanzaro@igalia.com>
2474
2475         [SOUP] Remove libsoup cruft from WebProcess
2476         https://bugs.webkit.org/show_bug.cgi?id=193710
2477
2478         Reviewed by Carlos Garcia Campos.
2479
2480         SoupNetworkSession is no longer accessible from the web process because it's owned
2481         (indirectly) by NetworkProcess after r240292. It doesn't make sense to have any libsoup
2482         code under WebProcess anymore. The current libsoup code consists of (a) unused stuff to be
2483         removed, (b) stuff unrelated to libsoup, which should move to a WebProcessGLib.cpp, and (c)
2484         WebKitSoupRequestInputStream, which is only used by NetworkProcess and should move there
2485
2486         * NetworkProcess/soup/WebKitSoupRequestInputStream.cpp: Renamed from Source/WebKit/WebProcess/soup/WebKitSoupRequestInputStream.cpp.
2487         (AsyncReadData::AsyncReadData):
2488         (webkitSoupRequestInputStreamReadAsyncResultComplete):
2489         (webkitSoupRequestInputStreamPendingReadAsyncComplete):
2490         (webkitSoupRequestInputStreamHasDataToRead):
2491         (webkitSoupRequestInputStreamIsWaitingForData):
2492         (webkitSoupRequestInputStreamReadAsync):
2493         (webkitSoupRequestInputStreamReadFinish):
2494         (webkitSoupRequestInputStreamFinalize):
2495         (webkit_soup_request_input_stream_init):
2496         (webkit_soup_request_input_stream_class_init):
2497         (webkitSoupRequestInputStreamNew):
2498         (webkitSoupRequestInputStreamAddData):
2499         (webkitSoupRequestInputStreamDidFailWithError):
2500         (webkitSoupRequestInputStreamFinished):
2501         * NetworkProcess/soup/WebKitSoupRequestInputStream.h: Renamed from Source/WebKit/WebProcess/soup/WebKitSoupRequestInputStream.h.
2502         * SourcesGTK.txt:
2503         * SourcesWPE.txt:
2504         * UIProcess/soup/WebProcessPoolSoup.cpp:
2505         (WebKit::WebProcessPool::setNetworkProxySettings): Don't send message to web processes.
2506         * WebProcess/WebProcess.h:
2507         * WebProcess/WebProcess.messages.in:
2508         * WebProcess/glib/WebProcessGLib.cpp: Renamed from Source/WebKit/WebProcess/soup/WebProcessSoup.cpp.
2509         (WebKit::WebProcess::platformSetCacheModel):
2510         (WebKit::WebProcess::platformInitializeWebProcess):
2511         (WebKit::WebProcess::platformTerminate):
2512
2513 2019-01-23  Michael Catanzaro  <mcatanzaro@igalia.com>
2514
2515         [SOUP] Clean up NetworkStorageSession
2516         https://bugs.webkit.org/show_bug.cgi?id=193707
2517
2518         Reviewed by Carlos Garcia Campos.
2519
2520         Restore an important call to clearSoupNetworkSession that was removed in r240292. Also,
2521         adapt to NetworkStorageSessions API changes.
2522
2523         * NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp:
2524         (WebKit::LegacyCustomProtocolManager::registerScheme):
2525         * NetworkProcess/soup/NetworkProcessMainSoup.cpp:
2526         * NetworkProcess/soup/NetworkProcessSoup.cpp:
2527         (WebKit::NetworkProcess::userPreferredLanguagesChanged):
2528         (WebKit::NetworkProcess::setNetworkProxySettings):
2529         * NetworkProcess/soup/NetworkSessionSoup.cpp:
2530         (WebKit::NetworkSessionSoup::soupSession const):
2531
2532 2019-01-23  Philippe Normand  <pnormand@igalia.com>
2533
2534         [GTK] Crash when browsing inspector:// uri without port set
2535         https://bugs.webkit.org/show_bug.cgi?id=193721
2536
2537         Reviewed by Michael Catanzaro.
2538
2539         * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
2540         (WebKit::RemoteInspectorProtocolHandler::handleRequest): Return
2541         back to caller after setting the error, if no port was provided
2542         along with the inspector URL.
2543
2544 2019-01-23  David Kilzer  <ddkilzer@apple.com>
2545
2546         Switch remaining CoreMedia soft-linking in WebKit over to CoreMediaSoftLink.{cpp,h}
2547         <https://webkit.org/b/193694>
2548         <rdar://problem/47464025>
2549
2550         Reviewed by Tim Horton.
2551
2552         * Shared/ios/WebIconUtilities.mm:
2553         - Switch to using CoreMediaSoftLink.{h,mm} in PAL.
2554
2555 2019-01-22  Chris Dumez  <cdumez@apple.com>
2556
2557         Regression(r240178) Some API tests are crashing
2558         https://bugs.webkit.org/show_bug.cgi?id=193680
2559
2560         Reviewed by Alex Christensen.
2561
2562         r240178 made sure that userScripts / scriptMessageHandlers / contentExtensions are always
2563         properly populated in the WebPageCreationParameters. This was needed in case we need to
2564         reconstruct the WebUserContentController on the WebProcess side. However, this caused a
2565         regression in the case we reuse a process where the WebUserContentController still exists
2566         (because it was kept alive, e.g. by the WebPageGroup). In that case, we would add duplicate
2567         entries to the existing WebUserContentController instance because its "add" methods did not
2568         have duplicate checks. To address the issue, this patch adds duplicate checks to the
2569         WebUserContentController "add" methods.
2570
2571         * WebProcess/UserContent/WebUserContentController.cpp:
2572         (WebKit::WebUserContentController::addUserScriptMessageHandlerInternal):
2573         (WebKit::WebUserContentController::removeUserScriptMessageHandlerInternal):
2574         (WebKit::WebUserContentController::addUserScriptInternal):
2575         (WebKit::WebUserContentController::removeUserScriptInternal):
2576         (WebKit::WebUserContentController::addUserStyleSheetInternal):
2577         (WebKit::WebUserContentController::removeUserStyleSheetInternal):
2578         (WebKit::WebUserContentController::forEachUserMessageHandler const):
2579         * WebProcess/UserContent/WebUserContentController.h:
2580
2581 2019-01-22  Michael Catanzaro  <mcatanzaro@igalia.com>
2582
2583         Unreviewed attempt to fix GTK/WPE bots
2584         https://bugs.webkit.org/show_bug.cgi?id=193580
2585         <rdar://problem/47457742>
2586
2587         Doesn't make sense to clear the storage session right after creating it. This should fix
2588         network process crash on startup under G_DEBUG=fatal-criticals due to the storage session
2589         not having a cookie jar.
2590
2591         * NetworkProcess/NetworkProcess.cpp:
2592         (WebKit::NetworkProcess::NetworkProcess):
2593
2594 2019-01-22  Megan Gardner  <megan_gardner@apple.com>
2595
2596         Cancel Web Touches Properly so that long presses on YouTube links do not incorrectly trigger a load
2597         https://bugs.webkit.org/show_bug.cgi?id=193687
2598         <rdar://problem/47056717>
2599
2600         Reviewed by Tim Horton.
2601
2602         Cancel web gestures when a long press is recognized.
2603
2604         * Platform/spi/ios/UIKitSPI.h:
2605         * UIProcess/ios/WKContentViewInteraction.mm:
2606         (-[WKContentView _cancelWebGestureRecognizer]):
2607         (-[WKContentView _longPressRecognized:]):
2608
2609 2019-01-22  Alex Christensen  <achristensen@webkit.org>
2610
2611         Fix an internal build failure after r240292
2612         https://bugs.webkit.org/show_bug.cgi?id=193580
2613
2614         Rubber-stamped by Wenson Hsieh.
2615
2616         * SourcesCocoa.txt:
2617         * UIProcess/mac/WebContextMenuProxyMac.mm:
2618         (-[WKMenuTarget forwardContextMenuAction:]):
2619         * WebKit.xcodeproj/project.pbxproj:
2620         It was apparently unclear to the compiler sometimes which "state" selector to use, and this apparently mattered.
2621         Tell the compiler to use the NSMenuItem selector, but at runtime it doesn't matter.
2622
2623 2019-01-22  Michael Catanzaro  <mcatanzaro@igalia.com>
2624
2625         Unreviewed, fix -Wunused-but-set-variable warning
2626         https://bugs.webkit.org/show_bug.cgi?id=193660
2627         <rdar://problem/47433602>
2628
2629         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2630         (WebKit::WebsiteDataStore::removeData):
2631
2632 2019-01-22  Michael Catanzaro  <mcatanzaro@igalia.com>
2633
2634         Unreviewed, further build fixes after r240292
2635         https://bugs.webkit.org/show_bug.cgi?id=193580
2636         <rdar://problem/47457742>
2637
2638         Oops.
2639
2640         * NetworkProcess/NetworkProcess.cpp:
2641         (WebKit::NetworkProcess::defaultStorageSession const):
2642
2643 2019-01-22  Michael Catanzaro  <mcatanzaro@igalia.com>
2644
2645         Unreviewed, further build fixes after r240292
2646         https://bugs.webkit.org/show_bug.cgi?id=193580
2647         <rdar://problem/47457742>
2648
2649         This builds for libsoup. Doesn't work, but at least builds.
2650
2651         Also, speculative fixes for curl.
2652
2653         * NetworkProcess/NetworkProcess.cpp:
2654         (WebKit::NetworkProcess::defaultStorageSession const):
2655
2656 2019-01-22  Michael Catanzaro  <mcatanzaro@igalia.com>
2657
2658         Unreviewed, further build fixes after r240292
2659         https://bugs.webkit.org/show_bug.cgi?id=193580
2660         <rdar://problem/47457742>
2661
2662         Still not working yet.
2663
2664         * NetworkProcess/NetworkProcess.cpp:
2665         (WebKit::NetworkProcess::NetworkProcess):
2666         * UIProcess/API/APIHTTPCookieStore.h:
2667
2668 2019-01-22  Antti Koivisto  <antti@apple.com>
2669
2670         [iOS] Flash when swiping back to Google search result page
2671         https://bugs.webkit.org/show_bug.cgi?id=193668
2672         <rdar://problem/47071684>
2673
2674         Reviewed by Simon Fraser.
2675
2676         If the google page is scrolled, there is sometimes a short flash.
2677
2678         When restoring the page state we also restore exposedContentRect which is used to determine
2679         which part of the page to create layers for. Scroll position is restored by the UI process
2680         later so we rely on this to get the right layers for the initial view update.
2681
2682         A viewport configuration update may sometimes trample over the restored exposedContentRect,
2683         moving it to top left. In this case the initial layer tree unfreeze commit may not have
2684         layers to cover the actual visible view position.
2685
2686         * WebProcess/WebPage/WebPage.cpp:
2687         (WebKit::WebPage::didCommitLoad):
2688         * WebProcess/WebPage/WebPage.h:
2689         * WebProcess/WebPage/ios/WebPageIOS.mm:
2690         (WebKit::WebPage::restorePageState):
2691
2692         Set a bit to indicate we have already restored the exposedContentRect.
2693
2694         (WebKit::WebPage::viewportConfigurationChanged):
2695
2696         Only reset exposedContentRect if wasn't already set by restorePageState.
2697
2698 2019-01-22  Alex Christensen  <achristensen@webkit.org>
2699
2700         Fix more builds.
2701
2702         * SourcesCocoa.txt:
2703         * WebKit.xcodeproj/project.pbxproj:
2704
2705 2019-01-22  Michael Catanzaro  <mcatanzaro@igalia.com>
2706
2707         Another build fix after r240292
2708         https://bugs.webkit.org/show_bug.cgi?id=193580
2709         <rdar://problem/47457742>
2710
2711         Unreviewed, still not enough to fix soup builds, but closer.
2712
2713         * UIProcess/API/APIHTTPCookieStore.h:
2714
2715 2019-01-22  Alex Christensen  <achristensen@webkit.org>
2716
2717         Fix some builds after r240292
2718         https://bugs.webkit.org/show_bug.cgi?id=193580
2719
2720         * NetworkProcess/NetworkProcess.cpp:
2721         (WebKit::NetworkProcess::switchToNewTestingSession):
2722         * NetworkProcess/cache/NetworkCache.cpp:
2723         (WebKit::NetworkCache::Cache::retrieve):
2724
2725 2019-01-22  Brian Burg  <bburg@apple.com>
2726
2727         Automation.computeElementLayout should return visual viewport-aware coordinates
2728         https://bugs.webkit.org/show_bug.cgi?id=193598
2729         <rdar://problem/35325644>
2730
2731         Unreviewed, restore a mistakenly-deleted line whose absence causes hangs.
2732
2733         * Shared/CoordinateSystem.h:
2734
2735 2019-01-22  Alex Christensen  <achristensen@webkit.org>
2736
2737         Move NetworkStorageSession ownership to NetworkProcess
2738         https://bugs.webkit.org/show_bug.cgi?id=193580
2739
2740         Reviewed by Geoff Garen.
2741
2742         * NetworkProcess/Cookies/WebCookieManager.cpp:
2743         (WebKit::WebCookieManager::WebCookieManager):
2744         (WebKit::WebCookieManager::getHostnamesWithCookies):
2745         (WebKit::WebCookieManager::deleteCookiesForHostname):
2746         (WebKit::WebCookieManager::deleteAllCookies):
2747         (WebKit::WebCookieManager::deleteCookie):
2748         (WebKit::WebCookieManager::deleteAllCookiesModifiedSince):
2749         (WebKit::WebCookieManager::getAllCookies):
2750         (WebKit::WebCookieManager::getCookies):
2751         (WebKit::WebCookieManager::setCookie):
2752         (WebKit::WebCookieManager::setCookies):
2753         (WebKit::WebCookieManager::startObservingCookieChanges):
2754         (WebKit::WebCookieManager::stopObservingCookieChanges):
2755         * NetworkProcess/Cookies/WebCookieManager.h:
2756         * NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
2757         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
2758         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2759         (WebKit::storageSession):
2760         (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
2761         (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
2762         (WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
2763         (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
2764         (WebKit::NetworkConnectionToWebProcess::getRawCookies):
2765         (WebKit::NetworkConnectionToWebProcess::deleteCookie):
2766         (WebKit::NetworkConnectionToWebProcess::removeStorageAccessForFrame):
2767         (WebKit::NetworkConnectionToWebProcess::removeStorageAccessForAllFramesOnPage):
2768         * NetworkProcess/NetworkProcess.cpp:
2769         (WebKit::NetworkProcess::initializeNetworkProcess):
2770         (WebKit::NetworkProcess::clearCachedCredentials):
2771         (WebKit::NetworkProcess::switchToNewTestingSession):
2772         (WebKit::NetworkProcess::ensureSession):
2773         (WebKit::NetworkProcess::storageSession const):
2774         (WebKit::NetworkProcess::defaultStorageSession const):
2775         (WebKit::NetworkProcess::forEachNetworkStorageSession):
2776         (WebKit::NetworkProcess::destroySession):
2777         (WebKit::NetworkProcess::updatePrevalentDomainsToBlockCookiesFor):
2778         (WebKit::NetworkProcess::setAgeCapForClientSideCookies):
2779         (WebKit::NetworkProcess::hasStorageAccessForFrame):
2780         (WebKit::NetworkProcess::getAllStorageAccessEntries):
2781         (WebKit::NetworkProcess::grantStorageAccess):
2782         (WebKit::NetworkProcess::removeAllStorageAccess):
2783         (WebKit::NetworkProcess::removePrevalentDomains):
2784         (WebKit::NetworkProcess::setCacheMaxAgeCapForPrevalentResources):
2785         (WebKit::NetworkProcess::resetCacheMaxAgeCapForPrevalentResources):
2786         (WebKit::NetworkProcess::fetchWebsiteData):
2787         (WebKit::NetworkProcess::deleteWebsiteData):
2788         (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
2789         * NetworkProcess/NetworkProcess.h:
2790         * NetworkProcess/NetworkResourceLoader.cpp:
2791         (WebKit::NetworkResourceLoader::validateCacheEntryForMaxAgeCapValidation):
2792         (WebKit::NetworkResourceLoader::logCookieInformation const):
2793         * NetworkProcess/NetworkSession.cpp:
2794         (WebKit::NetworkSession::networkStorageSession const):
2795         * NetworkProcess/NetworkStorageSessionProvider.h:
2796         * NetworkProcess/cache/NetworkCache.cpp:
2797         (WebKit::NetworkCache::makeUseDecision):
2798         (WebKit::NetworkCache::Cache::retrieve):
2799         (WebKit::NetworkCache::Cache::makeEntry):
2800         (WebKit::NetworkCache::Cache::makeRedirectEntry):
2801         (WebKit::NetworkCache::Cache::update):
2802         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
2803         (WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):
2804         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2805         (WebKit::NetworkProcess::platformSyncAllCookies):
2806         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2807         (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
2808         (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
2809         (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
2810         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
2811         * NetworkProcess/mac/RemoteNetworkingContext.mm:
2812         (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):
2813         * SourcesCocoa.txt:
2814         * UIProcess/API/APIHTTPCookieStore.cpp:
2815         (API::HTTPCookieStore::~HTTPCookieStore):
2816         (API::HTTPCookieStore::cookies):
2817         (API::HTTPCookieStore::setCookie):
2818         (API::HTTPCookieStore::deleteCookie):
2819         (API::HTTPCookieStore::registerObserver):
2820         (API::HTTPCookieStore::unregisterObserver):
2821         (API::HTTPCookieStore::registerForNewProcessPoolNotifications):
2822         (API::HTTPCookieStore::flushDefaultUIProcessCookieStore):
2823         (API::HTTPCookieStore::getAllDefaultUIProcessCookieStoreCookies):
2824         (API::HTTPCookieStore::setCookieInDefaultUIProcessCookieStore):
2825         (API::HTTPCookieStore::deleteCookieFromDefaultUIProcessCookieStore):
2826         (API::HTTPCookieStore::startObservingChangesToDefaultUIProcessCookieStore):
2827         (API::HTTPCookieStore::stopObservingChangesToDefaultUIProcessCookieStore):
2828         * UIProcess/API/APIHTTPCookieStore.h:
2829         * UIProcess/API/Cocoa/APIHTTPCookieStoreCocoa.mm: Added.
2830         (API::HTTPCookieStore::flushDefaultUIProcessCookieStore):
2831         (API::HTTPCookieStore::getAllDefaultUIProcessCookieStoreCookies):
2832         (API::HTTPCookieStore::setCookieInDefaultUIProcessCookieStore):
2833         (API::HTTPCookieStore::deleteCookieFromDefaultUIProcessCookieStore):
2834         (API::HTTPCookieStore::startObservingChangesToDefaultUIProcessCookieStore):
2835         (API::HTTPCookieStore::stopObservingChangesToDefaultUIProcessCookieStore):
2836         * UIProcess/WebProcessPool.cpp:
2837         (WebKit::WebProcessPool::clearCachedCredentials):
2838         * WebKit.xcodeproj/project.pbxproj:
2839         * WebProcess/Plugins/PluginView.cpp:
2840         (WebKit::PluginView::getAuthenticationInfo):
2841         * WebProcess/WebProcess.cpp:
2842         (WebKit::WebProcess::deleteWebsiteData):
2843         (WebKit::WebProcess::clearCachedCredentials): Deleted.
2844         * WebProcess/WebProcess.h:
2845         * WebProcess/WebProcess.messages.in:
2846
2847 2019-01-22  Per Arne Vollan  <pvollan@apple.com>
2848
2849         [macOS] Adjust logging policy in WebKit's sandbox
2850         https://bugs.webkit.org/show_bug.cgi?id=193454
2851
2852         Reviewed by Brent Fulgham.
2853
2854         Add a rule to initially deny all calls, since the default is to allow every call.
2855         Later rules allow syscalls that we determined are needed for proper WebKit function.
2856         This reduces the API surface available to attackers.
2857
2858         * WebProcess/com.apple.WebProcess.sb.in:
2859
2860 2019-01-22  Daniel Bates  <dabates@apple.com>
2861
2862         [iOS] WebKit should handle shift state changes when using the software keyboard
2863         https://bugs.webkit.org/show_bug.cgi?id=191475
2864         <rdar://problem/45949246>
2865
2866         Reviewed by Brent Fulgham.
2867
2868         Implement UIKit SPI to be notified of shift state changes to the software keyboard
2869         and dispatch a synthetic keydown or keyup event for either the Shift key or Caps Lock
2870         key.
2871
2872         A side benefit of this change is that we now show and hide the caps lock indicator
2873         in a focused password field when caps lock is enabled or disabled using the software
2874         keyboard, respectively.
2875
2876         * Platform/spi/ios/UIKitSPI.h: Expose more SPI.
2877         * SourcesCocoa.txt:
2878         * UIProcess/ios/WKContentViewInteraction.mm:
2879         (-[WKContentView modifierFlagsDidChangeFrom:to:]): Create a synthetic flags changed
2880         web event based on the state change and dispatch it.
2881         (-[WKContentView _didHandleKeyEvent:eventWasHandled:]): Early return if the event
2882         was a synethic flags change event so that we do not notify UIKit about this event
2883         as it does not know anything about such synthetic events.
2884         * UIProcess/ios/WKSyntheticFlagsChangedWebEvent.h: Added.
2885         * UIProcess/ios/WKSyntheticFlagsChangedWebEvent.mm: Added.
2886         (-[WKSyntheticFlagsChangedWebEvent initWithKeyCode:modifiers:keyDown:]):
2887         (-[WKSyntheticFlagsChangedWebEvent initWithCapsLockState:]):
2888         (-[WKSyntheticFlagsChangedWebEvent initWithShiftState:]):
2889         * WebKit.xcodeproj/project.pbxproj:
2890
2891 2019-01-22  Daniel Bates  <dabates@apple.com>
2892
2893         [iOS] Interpret text key commands on keydown and app key commands on keypress
2894         https://bugs.webkit.org/show_bug.cgi?id=192897
2895         <rdar://problem/46857378>
2896
2897         Reviewed by Brent Fulgham.
2898
2899         Adopt SPI to interpret text key commands and app key commands independently on keydown (isCharEvent
2900         is false) and keypress (isCharEvent is true), respectively.
2901
2902         * Platform/spi/ios/UIKitSPI.h: Add more SPI.
2903         * UIProcess/ios/WKContentViewInteraction.mm:
2904         (-[WKContentView _interpretKeyEvent:isCharEvent:]):
2905
2906 2019-01-22  David Kilzer  <ddkilzer@apple.com>
2907
2908         C strings in ClientCertificateAuthenticationXPCConstants.h are duplicated
2909         <https://webkit.org/b/193607>
2910         <rdar://problem/47334613>
2911
2912         Reviewed by Alex Christensen.
2913
2914         * Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm:
2915         (WebKit::AuthenticationManager::initializeConnection):
2916         * UIProcess/Authentication/cocoa/AuthenticationChallengeProxyCocoa.mm:
2917         (WebKit::AuthenticationChallengeProxy::sendClientCertificateCredentialOverXpc):
2918         - Update name of constants.
2919
2920         * Shared/Authentication/cocoa/ClientCertificateAuthenticationXPCConstants.cpp: Copied from Source/WebKit/Shared/Authentication/cocoa/ClientCertificateAuthenticationXPCConstants.h.
2921         * Shared/Authentication/cocoa/ClientCertificateAuthenticationXPCConstants.h:
2922         - Put constant values in a namespace, and move values to
2923           ClientCertificateAuthenticationXPCConstants.cpp.
2924
2925         * SourcesCocoa.txt:
2926         * UnifiedSources-input.xcfilelist:
2927         * WebKit.xcodeproj/project.pbxproj:
2928         - Add ClientCertificateAuthenticationXPCConstants.cpp.
2929
2930 2019-01-22  David Kilzer  <ddkilzer@apple.com>
2931
2932         Switch remaining QuickLook soft-linking in WebCore, WebKit over to QuickLookSoftLink.{cpp,h}
2933         <https://webkit.org/b/193654>
2934         <rdar://problem/47430290>
2935
2936         Reviewed by Alex Christensen.
2937
2938         - Moves QuickLookSoftLink.{h,mm} to PAL.
2939         - Adds soft-link to 3 classes to consolidate QuickLook.framework
2940           soft-linking.
2941         - Updates existing source to work with above changes.
2942
2943         * UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:
2944         (-[_WKPreviewControllerDataSource previewController:previewItemAtIndex:]):
2945         (WebKit::SystemPreviewController::start):
2946         * UIProcess/ios/WKSystemPreviewView.mm:
2947         (-[WKSystemPreviewView web_setContentProviderData:suggestedFilename:]):
2948         - Switch to using QuickLookSoftLink.{h,mm} in PAL.
2949
2950 2019-01-22  Oriol Brufau  <obrufau@igalia.com>
2951
2952         [css-logical] Implement flow-relative margin, padding and border shorthands
2953         https://bugs.webkit.org/show_bug.cgi?id=188697
2954
2955         Reviewed by Simon Fraser and Antti Koivisto.
2956
2957         Add a CSSLogicalEnabled runtime flag.
2958
2959         * Shared/WebPreferences.yaml:
2960
2961 2019-01-22  Frederic Wang  <fwang@igalia.com>
2962
2963         Enable CSSOMViewScrollingAPI
2964         https://bugs.webkit.org/show_bug.cgi?id=189472
2965
2966         Reviewed by Simon Fraser.
2967
2968         This patch enables the CSSOMViewScrollingAPI option by default. This feature has already been
2969         enabled in tests since r235855. Basically, this change fixes an old compatibility issue
2970         regarding which scrolling element correspond to the viewport in standard mode (WebKit uses
2971         document.body while Gecko/Edge/Chromium use document.documentElement as described in the
2972         CSSOM View specification). WebKit developers writing tests can use document.scrollingElement
2973         for that purpose, so that they work independently of whether the option is enabled.
2974
2975         [1] https://lists.webkit.org/pipermail/webkit-dev/2018-January/029857.html
2976
2977         * Shared/WebPreferences.yaml: Enable by default and remove "experimental" category in
2978         accordance with the new policy. Instead, keep an internal flag only for developers.
2979
2980 2019-01-21  Antti Koivisto  <antti@apple.com>
2981
2982         [iOS] Handle hit testing for subframes
2983         https://bugs.webkit.org/show_bug.cgi?id=192303
2984
2985         Reviewed by Frédéric Wang.
2986
2987         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2988         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
2989
2990         Only set delegatesScrolling for the main frame.
2991
2992 2019-01-21  Brent Fulgham  <bfulgham@apple.com>
2993
2994         Unreviewed test fix after r240243
2995         Nhttps://bugs.webkit.org/show_bug.cgi?id=193660
2996         <rdar://problem/47433602>
2997
2998         The new ResourceLoadStatistics section of 'removeData' was incrementing the
2999         pending callback count before deciding whether to send a message to delete
3000         data. This left the count out-of-balance leading to the operation never
3001         completing.
3002
3003         This patch also prevents sending a second message to the NetworkProcess
3004         requesting data be deleted if the message was already sent in an earlier
3005         section of the method (e.g., as typically happens when all website data
3006         is being deleted).
3007
3008         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3009         (WebKit::WebsiteDataStore::removeData):
3010
3011 2019-01-21  Brent Fulgham  <bfulgham@apple.com>
3012
3013         Implement message handlers for NetworkProcess-based ResourceLoadStatistics
3014         https://bugs.webkit.org/show_bug.cgi?id=193556
3015         <rdar://problem/47368501>
3016
3017         Reviewed by Alex Christensen.
3018
3019         This patch adds a number of sibling methods for tracking ResourceLoadStatistics when the
3020         observations are being handled in the NetworkProcess, rather than the UIProcess. The
3021         original versions of these methods will be removed as part of Bug 193303.
3022
3023         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
3024         (WebKit::ResourceLoadStatisticsMemoryStore::removeDataRecords):
3025         (WebKit::ResourceLoadStatisticsMemoryStore::processStatisticsAndDataRecords):
3026         (WebKit::ResourceLoadStatisticsMemoryStore::grandfatherExistingWebsiteData):
3027         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h:
3028         (WebKit::ResourceLoadStatisticsMemoryStore::store const):
3029         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
3030         (WebKit::WebResourceLoadStatisticsStore::setNotifyPagesWhenDataRecordsWereScanned):
3031         (WebKit::WebResourceLoadStatisticsStore::setNotifyPagesWhenTelemetryWasCaptured):
3032         (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
3033         (WebKit::WebResourceLoadStatisticsStore::setPrevalentResourceForDebugMode):
3034         (WebKit::WebResourceLoadStatisticsStore::scheduleStatisticsAndDataRecordsProcessing):
3035         (WebKit::WebResourceLoadStatisticsStore::hasStorageAccess):
3036         (WebKit::WebResourceLoadStatisticsStore::callHasStorageAccessForFrameHandler):
3037         (WebKit::WebResourceLoadStatisticsStore::requestStorageAccess):
3038         (WebKit::WebResourceLoadStatisticsStore::logUserInteraction):
3039         (WebKit::WebResourceLoadStatisticsStore::clearUserInteraction):
3040         (WebKit::WebResourceLoadStatisticsStore::hasHadUserInteraction):
3041         (WebKit::WebResourceLoadStatisticsStore::setLastSeen):
3042         (WebKit::WebResourceLoadStatisticsStore::setPrevalentResource):
3043         (WebKit::WebResourceLoadStatisticsStore::setVeryPrevalentResource):
3044         (WebKit::WebResourceLoadStatisticsStore::isPrevalentResource):
3045         (WebKit::WebResourceLoadStatisticsStore::isVeryPrevalentResource):
3046         (WebKit::WebResourceLoadStatisticsStore::isRegisteredAsSubresourceUnder):
3047         (WebKit::WebResourceLoadStatisticsStore::isRegisteredAsSubFrameUnder):
3048         (WebKit::WebResourceLoadStatisticsStore::isRegisteredAsRedirectingTo):
3049         (WebKit::WebResourceLoadStatisticsStore::clearPrevalentResource):
3050         (WebKit::WebResourceLoadStatisticsStore::setGrandfathered):
3051         (WebKit::WebResourceLoadStatisticsStore::isGrandfathered):
3052         (WebKit::WebResourceLoadStatisticsStore::setSubframeUnderTopFrameOrigin):
3053         (WebKit::WebResourceLoadStatisticsStore::setSubresourceUnderTopFrameOrigin):
3054         (WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectTo):
3055         (WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectFrom):
3056         (WebKit::WebResourceLoadStatisticsStore::setTopFrameUniqueRedirectTo):
3057         (WebKit::WebResourceLoadStatisticsStore::setTopFrameUniqueRedirectFrom):
3058         (WebKit::WebResourceLoadStatisticsStore::setTimeToLiveUserInteraction):
3059         (WebKit::WebResourceLoadStatisticsStore::logTestingEvent):
3060         (WebKit::WebResourceLoadStatisticsStore::notifyResourceLoadStatisticsProcessed):
3061         (WebKit::WebResourceLoadStatisticsStore::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores):
3062         (WebKit::WebResourceLoadStatisticsStore::topPrivatelyControlledDomainsWithWebsiteData):
3063         (WebKit::WebResourceLoadStatisticsStore::sendDiagnosticMessageWithValue const):
3064         (WebKit::WebResourceLoadStatisticsStore::notifyPageStatisticsTelemetryFinished const):
3065         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
3066         * NetworkProcess/Classifier/WebResourceLoadStatisticsTelemetry.cpp:
3067         (WebKit::submitTopList):
3068         (WebKit::submitTopLists):
3069         (WebKit::notifyPages):
3070         (WebKit::WebResourceLoadStatisticsTelemetry::calculateAndSubmit):
3071         (WebKit::nonEphemeralWebPageProxy): Deleted.
3072         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3073         (WebKit::NetworkConnectionToWebProcess::logUserInteraction):
3074         * NetworkProcess/NetworkConnectionToWebProcess.h:
3075         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
3076         * NetworkProcess/NetworkProcess.cpp:
3077         (WebKit::NetworkProcess::dumpResourceLoadStatistics):
3078         (WebKit::NetworkProcess::isGrandfathered):
3079         (WebKit::NetworkProcess::isPrevalentResource):
3080         (WebKit::NetworkProcess::isVeryPrevalentResource):
3081         (WebKit::NetworkProcess::setGrandfathered):
3082         (WebKit::NetworkProcess::setPrevalentResource):
3083         (WebKit::NetworkProcess::setPrevalentResourceForDebugMode):
3084         (WebKit::NetworkProcess::setVeryPrevalentResource):
3085         (WebKit::NetworkProcess::clearPrevalentResource):
3086         (WebKit::NetworkProcess::submitTelemetry):
3087         (WebKit::NetworkProcess::scheduleCookieBlockingUpdate):
3088         (WebKit::NetworkProcess::scheduleClearInMemoryAndPersistent):
3089         (WebKit::NetworkProcess::resetParametersToDefaultValues):
3090         (WebKit::NetworkProcess::scheduleStatisticsAndDataRecordsProcessing):
3091         (WebKit::NetworkProcess::setNotifyPagesWhenDataRecordsWereScanned):
3092         (WebKit::NetworkProcess::setNotifyPagesWhenTelemetryWasCaptured):
3093         (WebKit::NetworkProcess::setSubframeUnderTopFrameOrigin):
3094         (WebKit::NetworkProcess::isRegisteredAsRedirectingTo):
3095         (WebKit::NetworkProcess::isRegisteredAsSubFrameUnder):
3096         (WebKit::NetworkProcess::setSubresourceUnderTopFrameOrigin):
3097         (WebKit::NetworkProcess::setSubresourceUniqueRedirectTo):
3098         (WebKit::NetworkProcess::setSubresourceUniqueRedirectFrom):
3099         (WebKit::NetworkProcess::isRegisteredAsSubresourceUnder):
3100         (WebKit::NetworkProcess::setTopFrameUniqueRedirectTo):
3101         (WebKit::NetworkProcess::setTopFrameUniqueRedirectFrom):
3102         (WebKit::NetworkProcess::setLastSeen):
3103         (WebKit::NetworkProcess::hasStorageAccess):
3104         (WebKit::NetworkProcess::requestStorageAccess):
3105         (WebKit::NetworkProcess::grantStorageAccess):
3106         (WebKit::NetworkProcess::logUserInteraction):
3107         (WebKit::NetworkProcess::hadUserInteraction):
3108         (WebKit::NetworkProcess::clearUserInteraction):
3109         (WebKit::NetworkProcess::setGrandfatheringTime):
3110         (WebKit::NetworkProcess::setMaxStatisticsEntries):
3111         (WebKit::NetworkProcess::setMinimumTimeBetweenDataRecordsRemoval):
3112         (WebKit::NetworkProcess::setPruneEntriesDownTo):
3113         (WebKit::NetworkProcess::setTimeToLiveUserInteraction):
3114         (WebKit::NetworkProcess::setShouldClassifyResourcesBeforeDataRecordsRemoval):
3115         (WebKit::NetworkProcess::setResourceLoadStatisticsEnabled):
3116         (WebKit::NetworkProcess::setResourceLoadStatisticsDebugMode):
3117         (WebKit::NetworkProcess::resetCacheMaxAgeCapForPrevalentResources):
3118         (WebKit::NetworkProcess::deleteWebsiteData):
3119         (WebKit::filterForTopLevelDomains):
3120         (WebKit::NetworkProcess::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores):
3121         (WebKit::NetworkProcess::topPrivatelyControlledDomainsWithWebsiteData):
3122         * NetworkProcess/NetworkProcess.h:
3123         * NetworkProcess/NetworkProcess.messages.in:
3124         * NetworkProcess/NetworkSession.cpp:
3125         (WebKit::NetworkSession::setResourceLoadStatisticsEnabled):
3126         (WebKit::NetworkSession::notifyResourceLoadStatisticsProcessed):
3127         (WebKit::NetworkSession::logDiagnosticMessageWithValue):
3128         (WebKit::NetworkSession::notifyPageStatisticsTelemetryFinished):
3129         (WebKit::NetworkSession::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores):
3130         (WebKit::NetworkSession::topPrivatelyControlledDomainsWithWebsiteData):
3131         (WebKit::NetworkSession::enableResourceLoadStatistics): Deleted.
3132         * NetworkProcess/NetworkSession.h:
3133         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
3134         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
3135         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
3136         (WKWebsiteDataStoreSetResourceLoadStatisticsDebugModeWithCompletionHandler):
3137         (WKWebsiteDataStoreSetResourceLoadStatisticsPrevalentResourceForDebugMode):
3138         (WKWebsiteDataStoreSetStatisticsLastSeen):
3139         (WKWebsiteDataStoreSetStatisticsPrevalentResource):
3140         (WKWebsiteDataStoreSetStatisticsVeryPrevalentResource):
3141         (WKWebsiteDataStoreDumpResourceLoadStatistics):
3142         (WKWebsiteDataStoreIsStatisticsPrevalentResource):
3143         (WKWebsiteDataStoreIsStatisticsVeryPrevalentResource):
3144         (WKWebsiteDataStoreIsStatisticsRegisteredAsSubresourceUnder):
3145         (WKWebsiteDataStoreIsStatisticsRegisteredAsSubFrameUnder):
3146         (WKWebsiteDataStoreIsStatisticsRegisteredAsRedirectingTo):
3147         (WKWebsiteDataStoreSetStatisticsHasHadUserInteraction):
3148         (WKWebsiteDataStoreIsStatisticsHasHadUserInteraction):
3149         (WKWebsiteDataStoreSetStatisticsGrandfathered):
3150         (WKWebsiteDataStoreIsStatisticsGrandfathered):
3151         (WKWebsiteDataStoreSetStatisticsSubframeUnderTopFrameOrigin):
3152         (WKWebsiteDataStoreSetStatisticsSubresourceUnderTopFrameOrigin):
3153         (WKWebsiteDataStoreSetStatisticsSubresourceUniqueRedirectTo):
3154         (WKWebsiteDataStoreSetStatisticsSubresourceUniqueRedirectFrom):
3155         (WKWebsiteDataStoreSetStatisticsTopFrameUniqueRedirectTo):
3156         (WKWebsiteDataStoreSetStatisticsTopFrameUniqueRedirectFrom):
3157         (WKWebsiteDataStoreSetStatisticsTimeToLiveUserInteraction):
3158         (WKWebsiteDataStoreStatisticsProcessStatisticsAndDataRecords):
3159         (WKWebsiteDataStoreStatisticsUpdateCookieBlocking):
3160         (WKWebsiteDataStoreStatisticsSubmitTelemetry):
3161         (WKWebsiteDataStoreSetStatisticsNotifyPagesWhenDataRecordsWereScanned):
3162         (WKWebsiteDataStoreSetStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval):
3163         (WKWebsiteDataStoreSetStatisticsNotifyPagesWhenTelemetryWasCaptured):
3164         (WKWebsiteDataStoreSetStatisticsMinimumTimeBetweenDataRecordsRemoval):
3165         (WKWebsiteDataStoreSetStatisticsGrandfatheringTime):
3166         (WKWebsiteDataStoreSetStatisticsMaxStatisticsEntries):
3167         (WKWebsiteDataStoreSetStatisticsPruneEntriesDownTo):
3168         (WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStore):
3169         (WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
3170         (WKWebsiteDataStoreStatisticsResetToConsistentState):
3171         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
3172         (-[WKWebsiteDataStore _setResourceLoadStatisticsTestingCallback:]):
3173         * UIProcess/Network/NetworkProcessProxy.cpp:
3174         (WebKit::NetworkProcessProxy::clearCallbackStates):
3175         (WebKit::NetworkProcessProxy::didClose):
3176         (WebKit::nonEphemeralWebPageProxy):
3177         (WebKit::NetworkProcessProxy::logGlobalDiagnosticMessageWithValue):
3178         (WebKit::NetworkProcessProxy::dumpResourceLoadStatistics):
3179         (WebKit::NetworkProcessProxy::didDumpResourceLoadStatistics):
3180         (WebKit::NetworkProcessProxy::updatePrevalentDomainsToBlockCookiesFor):
3181         (WebKit::NetworkProcessProxy::didUpdateBlockCookies):
3182         (WebKit::NetworkProcessProxy::isPrevalentResource):
3183         (WebKit::NetworkProcessProxy::isPrevalentResourceResult):
3184         (WebKit::NetworkProcessProxy::isVeryPrevalentResource):
3185         (WebKit::NetworkProcessProxy::setPrevalentResource):
3186         (WebKit::NetworkProcessProxy::setPrevalentResourceForDebugMode):
3187         (WebKit::NetworkProcessProxy::setVeryPrevalentResource):
3188         (WebKit::NetworkProcessProxy::didSetResourceLoadStatisticData):
3189         (WebKit::NetworkProcessProxy::setLastSeen):
3190         (WebKit::NetworkProcessProxy::clearPrevalentResource):
3191         (WebKit::NetworkProcessProxy::scheduleCookieBlockingUpdate):
3192         (WebKit::NetworkProcessProxy::didScheduleCookieBlockingUpdate):
3193         (WebKit::NetworkProcessProxy::scheduleClearInMemoryAndPersistent):
3194         (WebKit::NetworkProcessProxy::didScheduleStatisticsProcessing):
3195         (WebKit::NetworkProcessProxy::scheduleStatisticsAndDataRecordsProcessing):
3196         (WebKit::NetworkProcessProxy::logUserInteraction):
3197         (WebKit::NetworkProcessProxy::hasHadUserInteraction):
3198         (WebKit::NetworkProcessProxy::didHaveUserInteraction):
3199         (WebKit::NetworkProcessProxy::clearUserInteraction):
3200         (WebKit::NetworkProcessProxy::setAgeCapForClientSideCookies):
3201         (WebKit::NetworkProcessProxy::didSetAgeCapForClientSideCookies):
3202         (WebKit::NetworkProcessProxy::setTimeToLiveUserInteraction):
3203         (WebKit::NetworkProcessProxy::didUpdateRuntimeSettings):
3204         (WebKit::NetworkProcessProxy::setNotifyPagesWhenTelemetryWasCaptured):
3205         (WebKit::NetworkProcessProxy::setNotifyPagesWhenDataRecordsWereScanned):
3206         (WebKit::NetworkProcessProxy::setSubframeUnderTopFrameOrigin):
3207         (WebKit::NetworkProcessProxy::isRegisteredAsRedirectingTo):
3208         (WebKit::NetworkProcessProxy::didIsRegisteredAsRedirectingTo):
3209         (WebKit::NetworkProcessProxy::isRegisteredAsSubFrameUnder):
3210         (WebKit::NetworkProcessProxy::didIsRegisteredAsSubFrameUnder):
3211         (WebKit::NetworkProcessProxy::setSubresourceUnderTopFrameOrigin):
3212         (WebKit::NetworkProcessProxy::isRegisteredAsSubresourceUnder):
3213         (WebKit::NetworkProcessProxy::didIsRegisteredAsSubresourceUnder):
3214         (WebKit::NetworkProcessProxy::setSubresourceUniqueRedirectTo):
3215         (WebKit::NetworkProcessProxy::setSubresourceUniqueRedirectFrom):
3216         (WebKit::NetworkProcessProxy::setTopFrameUniqueRedirectTo):
3217         (WebKit::NetworkProcessProxy::setTopFrameUniqueRedirectFrom):
3218         (WebKit::NetworkProcessProxy::isGrandfathered):
3219         (WebKit::NetworkProcessProxy::didIsGrandfathered):
3220         (WebKit::NetworkProcessProxy::setGrandfathered):
3221         (WebKit::NetworkProcessProxy::hasStorageAccess):
3222         (WebKit::NetworkProcessProxy::requestStorageAccess):
3223         (WebKit::NetworkProcessProxy::grantStorageAccess):
3224         (WebKit::NetworkProcessProxy::storageAccessRequestResult):
3225         (WebKit::NetworkProcessProxy::storageAccessOperationResult):
3226         (WebKit::NetworkProcessProxy::didRemoveAllStorageAccess):
3227         (WebKit::NetworkProcessProxy::didSetCacheMaxAgeCapForPrevalentResources):
3228         (WebKit::NetworkProcessProxy::setCacheMaxAgeCap):
3229         (WebKit::NetworkProcessProxy::setGrandfatheringTime):
3230         (WebKit::NetworkProcessProxy::setMaxStatisticsEntries):
3231         (WebKit::NetworkProcessProxy::setMinimumTimeBetweenDataRecordsRemoval):
3232         (WebKit::NetworkProcessProxy::setPruneEntriesDownTo):
3233         (WebKit::NetworkProcessProxy::setShouldClassifyResourcesBeforeDataRecordsRemoval):
3234         (WebKit::NetworkProcessProxy::setResourceLoadStatisticsDebugMode):
3235         (WebKit::NetworkProcessProxy::resetParametersToDefaultValues):
3236         (WebKit::NetworkProcessProxy::submitTelemetry):
3237         (WebKit::NetworkProcessProxy::notifyResourceLoadStatisticsProcessed):
3238         (WebKit::NetworkProcessProxy::notifyWebsiteDataDeletionForTopPrivatelyOwnedDomainsFinished):
3239         (WebKit::NetworkProcessProxy::notifyWebsiteDataScanForTopPrivatelyControlledDomainsFinished):
3240         (WebKit::NetworkProcessProxy::notifyResourceLoadStatisticsTelemetryFinished):
3241         (WebKit::NetworkProcessProxy::didLogUserInteraction): Deleted.
3242         (WebKit::NetworkProcessProxy::didResetCacheMaxAgeCapForPrevalentResources): Deleted.
3243         * UIProcess/Network/NetworkProcessProxy.h:
3244         * UIProcess/Network/NetworkProcessProxy.messages.in:
3245         * UIProcess/WebPageProxy.cpp:
3246         (WebKit::WebPageProxy::nonEphemeralWebPageProxy):
3247         * UIProcess/WebPageProxy.h:
3248         * UIProcess/WebProcessPool.cpp:
3249         (WebKit::WebProcessPool::ensureNetworkProcess):
3250         * UIProcess/WebProcessProxy.cpp:
3251         (WebKit::WebProcessProxy::notifyWebsiteDataScanForTopPrivatelyControlledDomainsFinished):
3252         (WebKit::WebProcessProxy::notifyWebsiteDataDeletionForTopPrivatelyOwnedDomainsFinished):
3253         * UIProcess/WebProcessProxy.h:
3254         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
3255         (WebKit::WebsiteDataStore::parameters):
3256         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3257         (WebKit::WebsiteDataStore::removeData):
3258         (WebKit::WebsiteDataStore::setMaxStatisticsEntries):
3259         (WebKit::WebsiteDataStore::setPruneEntriesDownTo):
3260         (WebKit::WebsiteDataStore::setGrandfatheringTime):
3261         (WebKit::WebsiteDataStore::setCacheMaxAgeCap):
3262         (WebKit::WebsiteDataStore::setMinimumTimeBetweenDataRecordsRemoval):
3263         (WebKit::WebsiteDataStore::dumpResourceLoadStatistics):
3264         (WebKit::WebsiteDataStore::isPrevalentResource):
3265         (WebKit::WebsiteDataStore::setPrevalentResource):
3266         (WebKit::WebsiteDataStore::setPrevalentResourceForDebugMode):
3267         (WebKit::WebsiteDataStore::isVeryPrevalentResource):
3268         (WebKit::WebsiteDataStore::setVeryPrevalentResource):
3269         (WebKit::WebsiteDataStore::setShouldClassifyResourcesBeforeDataRecordsRemoval):
3270         (WebKit::WebsiteDataStore::setSubframeUnderTopFrameOrigin):
3271         (WebKit::WebsiteDataStore::isRegisteredAsSubFrameUnder):
3272         (WebKit::WebsiteDataStore::setSubresourceUnderTopFrameOrigin):
3273         (WebKit::WebsiteDataStore::isRegisteredAsSubresourceUnder):
3274         (WebKit::WebsiteDataStore::setSubresourceUniqueRedirectTo):
3275         (WebKit::WebsiteDataStore::setSubresourceUniqueRedirectFrom):
3276         (WebKit::WebsiteDataStore::setTopFrameUniqueRedirectTo):
3277         (WebKit::WebsiteDataStore::setTopFrameUniqueRedirectFrom):
3278         (WebKit::WebsiteDataStore::isRegisteredAsRedirectingTo):
3279         (WebKit::WebsiteDataStore::clearPrevalentResource):
3280         (WebKit::WebsiteDataStore::resetParametersToDefaultValues):
3281         (WebKit::WebsiteDataStore::submitTelemetry):
3282         (WebKit::WebsiteDataStore::scheduleClearInMemoryAndPersistent):
3283         (WebKit::WebsiteDataStore::scheduleCookieBlockingUpdate):
3284         (WebKit::WebsiteDataStore::scheduleStatisticsAndDataRecordsProcessing):
3285         (WebKit::WebsiteDataStore::updatePrevalentDomainsToBlockCookiesFor):
3286         (WebKit::WebsiteDataStore::setAgeCapForClientSideCookies):
3287         (WebKit::WebsiteDataStore::setLastSeen):
3288         (WebKit::WebsiteDataStore::setNotifyPagesWhenDataRecordsWereScanned):
3289         (WebKit::WebsiteDataStore::setNotifyPagesWhenTelemetryWasCaptured):
3290         (WebKit::WebsiteDataStore::hasStorageAccessForFrameHandler):
3291         (WebKit::WebsiteDataStore::getAllStorageAccessEntries):
3292         (WebKit::WebsiteDataStore::grantStorageAccessHandler):
3293         (WebKit::WebsiteDataStore::removeAllStorageAccessHandler):
3294         (WebKit::WebsiteDataStore::removePrevalentDomains):
3295         (WebKit::WebsiteDataStore::hasStorageAccess):
3296         (WebKit::WebsiteDataStore::requestStorageAccess):
3297         (WebKit::WebsiteDataStore::grantStorageAccess):
3298         (WebKit::WebsiteDataStore::setTimeToLiveUserInteraction):
3299         (WebKit::WebsiteDataStore::logUserInteraction):
3300         (WebKit::WebsiteDataStore::hasHadUserInteraction):
3301         (WebKit::WebsiteDataStore::clearUserInteraction):
3302         (WebKit::WebsiteDataStore::isGrandfathered):
3303         (WebKit::WebsiteDataStore::setGrandfathered):
3304         (WebKit::WebsiteDataStore::setCacheMaxAgeCapForPrevalentResources):
3305         (WebKit::WebsiteDataStore::resetCacheMaxAgeCapForPrevalentResources):
3306         (WebKit::WebsiteDataStore::webPageWasAdded):
3307         (WebKit::WebsiteDataStore::webPageWasInvalidated):
3308         (WebKit::WebsiteDataStore::webProcessWillOpenConnection):
3309         (WebKit::WebsiteDataStore::webPageWillOpenConnection):
3310         (WebKit::WebsiteDataStore::webPageDidCloseConnection):
3311         (WebKit::WebsiteDataStore::webProcessDidCloseConnection):
3312         (WebKit::WebsiteDataStore::isAssociatedProcessPool const):
3313         (WebKit::WebsiteDataStore::processPools const):
3314         (WebKit::WebsiteDataStore::resourceLoadStatisticsEnabled const):
3315         (WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):
3316         (WebKit::WebsiteDataStore::setResourceLoadStatisticsDebugMode):
3317         (WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):
3318         (WebKit::WebsiteDataStore::logTestingEvent):
3319         * UIProcess/WebsiteData/WebsiteDataStore.h:
3320         (WebKit::WebsiteDataStore::setStatisticsTestingCallback):
3321         * WebProcess/WebProcess.cpp:
3322         (WebKit::WebProcess::initializeWebProcess):
3323
3324 2019-01-15  Darin Adler  <darin@apple.com>
3325
3326         Use references rather than pointers for register/unregister functions, and more
3327         https://bugs.webkit.org/show_bug.cgi?id=175028
3328
3329         Reviewed by Daniel Bates.
3330
3331         * WebProcess/FullScreen/WebFullScreenManager.cpp:
3332         (WebKit::WebFullScreenManager::willEnterFullScreen): Update for change to the
3333         functions in Document; pass a reference.
3334         (WebKit::WebFullScreenManager::didEnterFullScreen): Ditto, don't pass the element.
3335         (WebKit::WebFullScreenManager::willExitFullScreen): Ditto.
3336         (WebKit::WebFullScreenManager::didExitFullScreen): Ditto.
3337
3338         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
3339         (WebKit::UserMediaPermissionRequestManager::startUserMediaRequest): Pass a reference.
3340         (WebKit::UserMediaPermissionRequestManager::mediaCanStart): Ditto.
3341         (WebKit::UserMediaPermissionRequestManager::removeMediaRequestFromMaps): Ditto.
3342         * WebProcess/Plugins/PluginView.cpp:
3343         (WebKit::PluginView::~PluginView): Ditto.
3344         (WebKit::PluginView::initializePlugin): Ditto.
3345
3346 2019-01-20  Michael Catanzaro  <mcatanzaro@igalia.com>
3347
3348         Unreviewed, fix -Wreturn-type warning
3349         https://bugs.webkit.org/show_bug.cgi?id=193333
3350         <rdar://problem/45649489>
3351
3352         * UIProcess/Automation/WebAutomationSession.cpp:
3353         (WebKit::toProtocol):
3354
3355 2019-01-20  chris fleizach  <cfleizach@apple.com>
3356
3357         AX: Support returning relative frames for accessibility
3358         https://bugs.webkit.org/show_bug.cgi?id=193414
3359         <rdar://problem/47268501>
3360
3361         Reviewed by Zalan Bujtas.
3362
3363         * UIProcess/API/Cocoa/WKWebView.mm:
3364         (-[WKWebView accessibilityAttributeValue:forParameter:]):
3365         (-[WKWebView IGNORE_WARNINGS_END]):
3366         * UIProcess/API/mac/WKView.mm:
3367         (-[WKView accessibilityAttributeValue:forParameter:]):
3368         (-[WKView IGNORE_WARNINGS_END]):
3369         * UIProcess/Cocoa/WebViewImpl.h:
3370         * UIProcess/Cocoa/WebViewImpl.mm:
3371         (WebKit::WebViewImpl::accessibilityAttributeValue):
3372         * UIProcess/ios/WKContentView.mm:
3373         (-[WKContentView accessibilityConvertRelativeFrameFromPage:]):
3374
3375 2019-01-20  Michael Catanzaro  <mcatanzaro@igalia.com>
3376
3377         Unreviewed, rolling out r240209.
3378
3379         Broke GTK/WPE injected bundle
3380
3381         Reverted changeset:
3382
3383         "AX: Support returning relative frames for accessibility"
3384         https://bugs.webkit.org/show_bug.cgi?id=193414
3385         https://trac.webkit.org/changeset/240209
3386
3387 2019-01-12  Dan Bernstein  <mitz@apple.com>
3388
3389         [Cocoa] Avoid importing directly from subumbrella frameworks
3390         https://bugs.webkit.org/show_bug.cgi?id=186016
3391         <rdar://problem/40591038>
3392
3393         Reviewed by Sam Weinig.
3394
3395         * Configurations/BaseTarget.xcconfig: Removed -iframework options from OTHER_CFLAGS and
3396           OTHER_CPLUSPLUSFLAGS.
3397         * UIProcess/Automation/mac/WebAutomationSessionMac.mm: Import Carbon.h instead of an
3398           HIToolbox header.
3399         * UIProcess/Cocoa/WebViewImpl.mm: Ditto.
3400         * UIProcess/mac/WKPrintingView.mm: Import Quartz.h instead of a PDFKit header.
3401         * UIProcess/mac/WKTextInputWindowController.mm: Import Carbon.h instead of an HIToolbox
3402           header.
3403         * WebProcess/Plugins/PDF/PDFAnnotationTextWidgetDetails.h: Import Quartz.h instead of a
3404           PDFKit header.
3405         * WebProcess/Plugins/PDF/PDFLayerControllerSPI.h: Ditto.
3406         * WebProcess/Plugins/PDF/PDFPlugin.mm: Ditto.
3407         * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm: Ditto.
3408         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm: Ditto.
3409         * WebProcess/Plugins/PDF/PDFPluginPasswordField.mm: Ditto.
3410         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm: Ditto.