133960649b90d176259f689760aecead461fb566
[WebKit-https.git] / Source / WebKit / ChangeLog
1 2017-08-22  Chris Dumez  <cdumez@apple.com>
2
3         Clean up PingLoad::processContentExtensionRulesForLoad()
4         https://bugs.webkit.org/show_bug.cgi?id=175834
5
6         Reviewed by Alex Christensen.
7
8         * NetworkProcess/PingLoad.cpp:
9         (WebKit::PingLoad::willPerformHTTPRedirection):
10         (WebKit::PingLoad::processContentExtensionRulesForLoad):
11         * NetworkProcess/PingLoad.h:
12
13 2017-08-22  Alex Christensen  <achristensen@webkit.org>
14
15         Remove ChromeClient::scrollbarsModeDidChange
16         https://bugs.webkit.org/show_bug.cgi?id=175805
17
18         Reviewed by Daniel Bates.
19
20         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
21         (WebKit::WebChromeClient::scrollbarsModeDidChange const): Deleted.
22         * WebProcess/WebCoreSupport/WebChromeClient.h:
23
24 2017-08-22  Chris Dumez  <cdumez@apple.com>
25
26         Add sanity check for source origin in WebLoaderStrategy::startPingLoad()
27         https://bugs.webkit.org/show_bug.cgi?id=175827
28
29         Reviewed by Geoffrey Garen.
30
31         * WebProcess/Network/WebLoaderStrategy.cpp:
32         (WebKit::WebLoaderStrategy::startPingLoad):
33
34 2017-08-22  Alex Christensen  <achristensen@webkit.org>
35
36         Add UIDelegatePrivate SPI corresponding to WKPageUIClient.showPage
37         https://bugs.webkit.org/show_bug.cgi?id=175797
38         <rdar://problem/29270035>
39
40         Reviewed by Geoffrey Garen.
41
42         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
43         * UIProcess/Cocoa/UIDelegate.h:
44         * UIProcess/Cocoa/UIDelegate.mm:
45         (WebKit::UIDelegate::setDelegate):
46         (WebKit::UIDelegate::UIClient::showPage):
47         * WebProcess/WebPage/WebPage.cpp:
48         (WebKit::WebPage::registerURLSchemeHandler):
49         window.open, createWebViewWithConfiguration, and WKURLSchemeHandlers all used together
50         make it so that URLSchemeHandlers are added to WebPages that already have them.  The
51         assertions are no longer valid.
52
53 2017-08-22  Youenn Fablet  <youenn@apple.com>
54
55         [Cache API] Add support for overwriting responses with put on an existing record
56         https://bugs.webkit.org/show_bug.cgi?id=175825
57
58         Reviewed by Geoffrey Garen.
59
60         Add support for encoding/decoding the update counter.
61         Incrementing it when overwriting an existing response.
62         Storing the new body in addition to the new response.
63
64         * NetworkProcess/cache/CacheStorageEngine.cpp:
65         (WebKit::CacheStorageEngine::putRecords):
66         * Shared/WebCoreArgumentCoders.cpp:
67         (IPC::ArgumentCoder<CacheStorageConnection::Record>::encode):
68         (IPC::ArgumentCoder<CacheStorageConnection::Record>::decode):
69
70 2017-08-22  Alex Christensen  <achristensen@webkit.org>
71
72         Remove ChromeClient::hasOpenedPopup
73         https://bugs.webkit.org/show_bug.cgi?id=175804
74
75         Reviewed by Sam Weinig.
76
77         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
78         (WebKit::WebChromeClient::hasOpenedPopup const): Deleted.
79         * WebProcess/WebCoreSupport/WebChromeClient.h:
80
81 2017-08-22  Brent Fulgham  <bfulgham@apple.com> and Pranjal Jumde  <pjumde@apple.com>
82
83         Disable access to secure cookies if an HTTPS site loads mixed content
84         https://bugs.webkit.org/show_bug.cgi?id=157053
85         <rdar://problem/11290808>
86
87         Reviewed by Dan Bates.
88
89         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
90         (WebKit::NetworkConnectionToWebProcess::cookiesForDOM): Pass new arguments needed by WebCore.
91         * NetworkProcess/NetworkConnectionToWebProcess.h:
92         * NetworkProcess/NetworkConnectionToWebProcess.messages.in: Updated the CookiesForDOM message with the new foundMixedContent
93         argument and the new didAccessSecureCookies reply.
94         * Shared/mac/CookieStorageShim.mm:
95         (WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL): Drive-by fix to use the right message.
96         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
97         (WebKit::WebPlatformStrategies::cookiesForDOM): Check and return whether secure cookies were accessed. Accept a new argument
98         indicating whether secure cookies should be included in the response.
99         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
100
101 2017-08-22  Zan Dobersek  <zdobersek@igalia.com>
102
103         [GTK][WPE] Rename StorageProcessMainGtk.cpp to StorageProcessMainGLib.cpp
104         https://bugs.webkit.org/show_bug.cgi?id=175814
105
106         Reviewed by Gyuyoung Kim.
107
108         Both GTK+ and WPE ports already compile the StorageProcessMainGtk.cpp
109         file, but it should be renamed to StorageProcessMainGLib and moved into
110         the StorageProcess/glib/ directory.
111
112         * PlatformGTK.cmake:
113         * PlatformWPE.cmake:
114         * StorageProcess/glib/StorageProcessMainGLib.cpp: Renamed from Source/WebKit/StorageProcess/gtk/StorageProcessMainGtk.cpp.
115
116 2017-08-21  Zan Dobersek  <zdobersek@igalia.com>
117
118         [WK] Add missing ENABLE(NETWORK_CACHE) build guards
119         https://bugs.webkit.org/show_bug.cgi?id=175769
120
121         Reviewed by Carlos Alberto Lopez Perez.
122
123         Given that the build guard exists, it should be possible to
124         compile the WebKit layer with the feature disabled. Missing
125         guards are added in order to achieve that.
126
127         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
128         * NetworkProcess/NetworkConnectionToWebProcess.h:
129         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
130         * NetworkProcess/NetworkProcess.h:
131         * NetworkProcess/NetworkResourceLoader.cpp:
132         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
133         * NetworkProcess/soup/NetworkProcessSoup.cpp:
134         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
135         (WebKit::NetworkProcess::clearDiskCache):
136         * UIProcess/soup/WebProcessPoolSoup.cpp:
137         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
138         * WebProcess/Network/WebLoaderStrategy.cpp:
139         (WebKit::WebLoaderStrategy::storeDerivedDataToCache):
140
141 2017-08-21  Chris Dumez  <cdumez@apple.com>
142
143         [Beacon] Content extensions should be able to intercept Beacon / Ping redirects
144         https://bugs.webkit.org/show_bug.cgi?id=175746
145         <rdar://problem/33946050>
146
147         Reviewed by Alex Christensen.
148
149         Update PingLoad to process content extension rules upon redirect. This allows content
150         extensions to block and upgrade to HTTPS beacon / ping loads.
151
152         Because ping loads can outlive the WebProcess, the content extensions rules are passed
153         to the NetworkProcess when starting the Ping load. The PingLoad can then consult those
154         rules upon redirect, on the NetworkProcess side.
155
156         * NetworkProcess/NetworkResourceLoadParameters.cpp:
157         (WebKit::NetworkResourceLoadParameters::encode const):
158         (WebKit::NetworkResourceLoadParameters::decode):
159         * NetworkProcess/NetworkResourceLoadParameters.h:
160         * NetworkProcess/PingLoad.cpp:
161         (WebKit::PingLoad::willPerformHTTPRedirection):
162         (WebKit::PingLoad::contentExtensionsBackend):
163         (WebKit::PingLoad::processContentExtensionRulesForLoad):
164         * NetworkProcess/PingLoad.h:
165         * WebProcess/Network/WebLoaderStrategy.cpp:
166         (WebKit::WebLoaderStrategy::startPingLoad):
167
168 2017-08-21  Adrian Perez de Castro  <aperez@igalia.com>
169
170         [WPE][GTK] Unused variables in UserMediaProcessManager.cpp
171         https://bugs.webkit.org/show_bug.cgi?id=175799
172
173         Reviewed by Alex Christensen.
174
175         The code which uses the "audioExtensionPath" and "videoExtensionPath" variables is guarded
176         with "#if ENABLE(SANDBOX_EXTENSIONS)”, so do the same for the variables themselves.
177
178         * UIProcess/UserMediaProcessManager.cpp: Add missing guards.
179
180 2017-08-21  Yoshiaki Jitsukawa  <Yoshiaki.Jitsukawa@sony.com>
181
182         [PAL] Move spi/mac directory into PAL
183         https://bugs.webkit.org/show_bug.cgi?id=175649
184
185         Reviewed by Myles C. Maxfield.
186
187         * Platform/mac/MenuUtilities.mm:
188         * Shared/mac/WebCoreArgumentCodersMac.mm:
189         * Shared/mac/WebEventFactory.mm:
190         * Shared/mac/WebHitTestResultData.mm:
191         * UIProcess/API/Cocoa/WKWebView.mm:
192         * UIProcess/Cocoa/WebViewImpl.mm:
193         * UIProcess/mac/ServicesController.mm:
194         * UIProcess/mac/TextCheckerMac.mm:
195         * UIProcess/mac/ViewGestureControllerMac.mm:
196         * UIProcess/mac/WKImmediateActionController.h:
197         * UIProcess/mac/WKImmediateActionController.mm:
198         * UIProcess/mac/WKSharingServicePickerDelegate.mm:
199         * UIProcess/mac/WKTextFinderClient.mm:
200         * UIProcess/mac/WebContextMenuProxyMac.mm:
201         * UIProcess/mac/WebPageProxyMac.mm:
202         * WebProcess/cocoa/WebProcessCocoa.mm:
203
204 2017-08-21  Brady Eidson  <beidson@apple.com>
205
206         Split the one SWServer::Connection into SWClientConnection and SWServer::Connection.
207         https://bugs.webkit.org/show_bug.cgi?id=175745
208
209         Reviewed by Andy Estes.
210
211         * CMakeLists.txt:
212         * DerivedSources.make:
213         * WebKit.xcodeproj/project.pbxproj:
214
215         * StorageProcess/ServiceWorker/WebSWServerConnection.cpp: Renamed from Source/WebKit/WebProcess/Storage/WebSWServerConnection.cpp.
216         (WebKit::WebSWServerConnection::WebSWServerConnection):
217         (WebKit::WebSWServerConnection::~WebSWServerConnection):
218         (WebKit::WebSWServerConnection::disconnectedFromWebProcess):
219         (WebKit::WebSWServerConnection::rejectJobInClient):
220         * StorageProcess/ServiceWorker/WebSWServerConnection.h: Copied from Source/WebKit/WebProcess/Storage/WebSWServerConnection.h.
221         (WebKit::WebSWServerConnection::identifier const):
222         * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in: Copied from Source/WebKit/WebProcess/Storage/WebSWServerConnection.messages.in.
223
224         * StorageProcess/StorageToWebProcessConnection.cpp:
225         (WebKit::StorageToWebProcessConnection::didReceiveMessage):
226         (WebKit::StorageToWebProcessConnection::didClose):
227         (WebKit::StorageToWebProcessConnection::establishSWServerConnection):
228         (WebKit::StorageToWebProcessConnection::removeSWServerConnection):
229         * StorageProcess/StorageToWebProcessConnection.h:
230
231         * WebProcess/Storage/WebSWClientConnection.cpp: Copied from Source/WebKit/WebProcess/Storage/WebServiceWorkerProvider.cpp.
232         (WebKit::WebSWClientConnection::WebSWClientConnection):
233         (WebKit::WebSWClientConnection::~WebSWClientConnection):
234         (WebKit::WebSWClientConnection::scheduleJobInServer):
235         * WebProcess/Storage/WebSWClientConnection.h: Renamed from Source/WebKit/WebProcess/Storage/WebSWServerConnection.h.
236         (WebKit::WebSWClientConnection::identifier const):
237         * WebProcess/Storage/WebSWClientConnection.messages.in: Renamed from Source/WebKit/WebProcess/Storage/WebSWServerConnection.messages.in.
238
239         * WebProcess/Storage/WebServiceWorkerProvider.cpp:
240         (WebKit::WebServiceWorkerProvider::serviceWorkerConnectionForSession):
241         * WebProcess/Storage/WebServiceWorkerProvider.h:
242
243         * WebProcess/Storage/WebToStorageProcessConnection.cpp:
244         (WebKit::WebToStorageProcessConnection::didReceiveMessage):
245         (WebKit::WebToStorageProcessConnection::serviceWorkerConnectionForSession):
246         * WebProcess/Storage/WebToStorageProcessConnection.h:
247
248 2017-08-21  Charlie Turner  <cturner@igalia.com>
249
250         MemoryCache::setCapacities assertion failure maxDeadBytes <= totalBytes
251         https://bugs.webkit.org/show_bug.cgi?id=175571
252
253         Reviewed by Antti Koivisto.
254
255         * Shared/CacheModel.cpp:
256         (WebKit::calculateMemoryCacheSizes): Ensure cacheTotalCapacity is
257         set to a reasonable value even in low-memory environments.
258
259 2017-08-20  Chris Dumez  <cdumez@apple.com>
260
261         Simplify calls to LoaderStrategy::startPingLoad()
262         https://bugs.webkit.org/show_bug.cgi?id=175756
263
264         Reviewed by Sam Weinig.
265
266         * WebProcess/Network/WebLoaderStrategy.cpp:
267         (WebKit::WebLoaderStrategy::startPingLoad):
268         * WebProcess/Network/WebLoaderStrategy.h:
269
270 2017-08-18  Chris Dumez  <cdumez@apple.com>
271
272         [Beacon] Improve error reporting
273         https://bugs.webkit.org/show_bug.cgi?id=175723
274
275         Reviewed by Darin Adler.
276
277         Have Ping loads such as beacons report errors via their completion handler.
278         The Beacon API is using this error to log a console message when beacon loads
279         fail, provided that the page is still alive.
280
281         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
282         (WebKit::NetworkConnectionToWebProcess::loadPing):
283         (WebKit::NetworkConnectionToWebProcess::didFinishPingLoad):
284         * NetworkProcess/NetworkConnectionToWebProcess.h:
285         * NetworkProcess/PingLoad.cpp:
286         (WebKit::PingLoad::~PingLoad):
287         (WebKit::PingLoad::didFinish):
288         (WebKit::PingLoad::willPerformHTTPRedirection):
289         (WebKit::PingLoad::didReceiveChallenge):
290         (WebKit::PingLoad::didReceiveResponseNetworkSession):
291         (WebKit::PingLoad::didCompleteWithError):
292         (WebKit::PingLoad::wasBlocked):
293         (WebKit::PingLoad::cannotShowURL):
294         (WebKit::PingLoad::timeoutTimerFired):
295         (WebKit::PingLoad::currentRequest const):
296         (WebKit::PingLoad::makeCrossOriginAccessRequestWithPreflight):
297         * NetworkProcess/PingLoad.h:
298         * WebProcess/Network/NetworkProcessConnection.cpp:
299         (WebKit::NetworkProcessConnection::didFinishPingLoad):
300         * WebProcess/Network/NetworkProcessConnection.h:
301         * WebProcess/Network/NetworkProcessConnection.messages.in:
302         * WebProcess/Network/WebLoaderStrategy.cpp:
303         (WebKit::WebLoaderStrategy::networkProcessCrashed):
304         (WebKit::WebLoaderStrategy::startPingLoad):
305         (WebKit::WebLoaderStrategy::didFinishPingLoad):
306         * WebProcess/Network/WebLoaderStrategy.h:
307
308 2017-08-18  Chris Dumez  <cdumez@apple.com>
309
310         REGRESSION (r220601): Crash when closing google doc after switching the order of tabs in safari
311         https://bugs.webkit.org/show_bug.cgi?id=175721
312         <rdar://problem/33928369>
313
314         Reviewed by Geoffrey Garen.
315
316         Make sure WebProcess::markAllLayersVolatile() does not call WTFMove() multiple times
317         on the same completion handler. Use a RefCounter to hold on to the completion handler
318         and make sure the handler gets called when the RefCounter's value becomes 0.
319
320         * WebProcess/WebProcess.cpp:
321         (WebKit::WebProcess::cancelPrepareToSuspend):
322         (WebKit::WebProcess::markAllLayersVolatile):
323         (WebKit::WebProcess::cancelMarkAllLayersVolatile):
324         * WebProcess/WebProcess.h:
325
326 2017-08-18  Youenn Fablet  <youenn@apple.com>
327
328         [Cache API] Add response body storage
329         https://bugs.webkit.org/show_bug.cgi?id=175658
330
331         Reviewed by Alex Christensen.
332
333         Added IPC serialization of Record response body.
334         Updated CacheStorageEngine implementation as Record has no longer a copy constructor.
335
336         * NetworkProcess/cache/CacheStorageEngine.cpp:
337         (WebKit::CacheStorageEngine::retrieveRecords):
338         (WebKit::CacheStorageEngine::deleteMatchingRecords):
339         * Shared/WebCoreArgumentCoders.cpp:
340         (IPC::encodeSharedBuffer):
341         (IPC::decodeSharedBuffer):
342         (IPC::ArgumentCoder<CacheStorageConnection::Record>::encode):
343         (IPC::ArgumentCoder<CacheStorageConnection::Record>::decode):
344
345 2017-08-18  Brady Eidson  <beidson@apple.com>
346
347         Bounce ServiceWorker jobs to the Storage Process.
348         https://bugs.webkit.org/show_bug.cgi?id=175650
349
350         Reviewed by Andy Estes.
351
352         * CMakeLists.txt:
353         * DerivedSources.make:
354         * WebKit.xcodeproj/project.pbxproj:
355
356         * Platform/Logging.h:
357
358         * StorageProcess/StorageToWebProcessConnection.cpp:
359         (WebKit::StorageToWebProcessConnection::didReceiveMessage):
360         (WebKit::StorageToWebProcessConnection::didClose):
361         (WebKit::StorageToWebProcessConnection::establishSWServerConnection):
362         (WebKit::StorageToWebProcessConnection::removeSWServerConnection):
363         (WebKit::StorageToWebProcessConnection::establishIDBConnectionToServer):
364         * StorageProcess/StorageToWebProcessConnection.h:
365         * StorageProcess/StorageToWebProcessConnection.messages.in:
366
367         * WebProcess/Storage/WebSWServerConnection.cpp: Added.
368         (WebKit::WebSWServerConnection::WebSWServerConnection):
369         (WebKit::WebSWServerConnection::~WebSWServerConnection):
370         (WebKit::WebSWServerConnection::disconnectedFromWebProcess):
371         (WebKit::WebSWServerConnection::scheduleJob):
372         (WebKit::WebSWServerConnection::scheduleStorageJob):
373         * WebProcess/Storage/WebSWServerConnection.h: Copied from Source/WebCore/workers/service/ServiceWorkerJob.h.
374         (WebKit::WebSWServerConnection::create):
375         (WebKit::WebSWServerConnection::identifier const):
376         * WebProcess/Storage/WebSWServerConnection.messages.in: Copied from Source/WebKit/StorageProcess/StorageToWebProcessConnection.messages.in.
377
378         * WebProcess/Storage/WebServiceWorkerProvider.cpp:
379         (WebKit::WebServiceWorkerProvider::serviceWorkerConnectionForSession):
380         (WebKit::WebServiceWorkerProvider::scheduleJob): Deleted.
381         * WebProcess/Storage/WebServiceWorkerProvider.h:
382
383         * WebProcess/Storage/WebToStorageProcessConnection.cpp:
384         (WebKit::WebToStorageProcessConnection::didReceiveMessage):
385         (WebKit::WebToStorageProcessConnection::serviceWorkerConnectionForSession):
386         * WebProcess/Storage/WebToStorageProcessConnection.h:
387
388 2017-08-18  Chris Dumez  <cdumez@apple.com>
389
390         [Beacon] Add support for quota limitation
391         https://bugs.webkit.org/show_bug.cgi?id=175443
392         <rdar://problem/33729002>
393
394         Reviewed by Youenn Fablet.
395
396         WebLoaderStrategy now generates an identifier for ping loads and keep
397         the completion handler in a local HashMap. Once the ping load is done,
398         the network process sends an IPC message back to the WebContent process
399         so that WebLoaderStrategy can look up the completion handler for the
400         ping load and call it.
401
402         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
403         (WebKit::NetworkConnectionToWebProcess::loadPing):
404         (WebKit::NetworkConnectionToWebProcess::didFinishPingLoad):
405         * NetworkProcess/NetworkConnectionToWebProcess.h:
406         * NetworkProcess/PingLoad.cpp:
407         (WebKit::PingLoad::PingLoad):
408         (WebKit::PingLoad::~PingLoad):
409         * NetworkProcess/PingLoad.h:
410         * WebProcess/Network/NetworkProcessConnection.cpp:
411         (WebKit::NetworkProcessConnection::didFinishPingLoad):
412         * WebProcess/Network/NetworkProcessConnection.h:
413         * WebProcess/Network/NetworkProcessConnection.messages.in:
414         * WebProcess/Network/WebLoaderStrategy.cpp:
415         (WebKit::generatePingLoadIdentifier):
416         (WebKit::WebLoaderStrategy::startPingLoad):
417         (WebKit::WebLoaderStrategy::didFinishPingLoad):
418         * WebProcess/Network/WebLoaderStrategy.h:
419
420 2017-08-18  Youenn Fablet  <youenn@apple.com>
421
422         [Cache API] Add a WK2 implementation of CacheStorageConnection
423         https://bugs.webkit.org/show_bug.cgi?id=175640
424
425         Reviewed by Alex Christensen & Chris Dumez.
426
427         Adding WebCacheStorageConnection as an implementation of CacheStorageConnection.
428         Making WebCacheStorageProvider instantiates such class.
429         One WebCacheStorageConnection is created for each session of a given WebProcess.
430
431         WebCacheStorageConnection is sending IPC calls to the network process.
432         Main implementation of the cache API is done in the network process by CacheStorageEngineConnection and CacheStorageEngine.
433         There is one WebCacheStorageConnection per session.
434         WebCacheStorageConnection is passing the session ID for each call to the network process to ensure the right cache storage engine is used.
435
436         CacheStorageEngineConnection mirrors WebCacheStorageConnection on the network process.
437         There is one CacheStorageEngine per session and CacheStorageEngineConnection will select the right CacheStorageEngine using the given session ID.
438
439         CacheStorageEngine is responsible of storing and matching cache API records.
440         Current implementation only keeps in memory the cached objects.
441
442         CacheStorageEngine is keeping (for each different origin) caches and records as a Vector as the order of insertion is important as per spec.
443         It also keeps a list of removed caches. These caches should remain functional until the last web page having access to these is gone.
444         The mechanism to fully remove these caches is not implemented yet.
445
446         Adding IPC encodings for WTF::Expected, CacheQueryOptions, FetchOptions, CacheStorageConnection Record and CacheInfo.
447
448         * CMakeLists.txt:
449         * DerivedSources.make:
450         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
451         (WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
452         (WebKit::generateCacheStorageConnectionIdentifier):
453         (WebKit::NetworkConnectionToWebProcess::createCacheStorageConnection):
454         (WebKit::NetworkConnectionToWebProcess::closeCacheStorageConnection):
455         * NetworkProcess/NetworkConnectionToWebProcess.h:
456         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
457         * NetworkProcess/cache/CacheStorageEngine.cpp: Added.
458         (WebKit::defaultCacheStorageEngine):
459         (WebKit::globalEngineMap):
460         (WebKit::CacheStorageEngine::from):
461         (WebKit::CacheStorageEngine::destroyEngine):
462         (WebKit::CacheStorageEngine::defaultEngine):
463         (WebKit::CacheStorageEngine::open):
464         (WebKit::CacheStorageEngine::remove):
465         (WebKit::CacheStorageEngine::retrieveCaches):
466         (WebKit::CacheStorageEngine::retrieveRecords):
467         (WebKit::CacheStorageEngine::putRecords):
468         (WebKit::CacheStorageEngine::deleteMatchingRecords):
469         (WebKit::CacheStorageEngine::writeCachesToDisk):
470         (WebKit::CacheStorageEngine::readCachesFromDisk):
471         (WebKit::CacheStorageEngine::readCache):
472         (WebKit::CacheStorageEngine::writeCacheRecords):
473         (WebKit::CacheStorageEngine::removeCacheRecords):
474         (WebKit::CacheStorageEngine::cache):
475         (WebKit::CacheStorageEngine::caches const):
476         (WebKit::CacheStorageEngine::records):
477         (WebKit::CacheStorageEngine::queryCache):
478         * NetworkProcess/cache/CacheStorageEngine.h: Added.
479         * NetworkProcess/cache/CacheStorageEngineConnection.cpp: Added.
480         (WebKit::CacheStorageEngineConnection::CacheStorageEngineConnection):
481         (WebKit::CacheStorageEngineConnection::open):
482         (WebKit::CacheStorageEngineConnection::remove):
483         (WebKit::CacheStorageEngineConnection::caches):
484         (WebKit::CacheStorageEngineConnection::records):
485         (WebKit::CacheStorageEngineConnection::deleteMatchingRecords):
486         (WebKit::CacheStorageEngineConnection::putRecords):
487         * NetworkProcess/cache/CacheStorageEngineConnection.h: Added.
488         (WebKit::CacheStorageEngineConnection::create):
489         * NetworkProcess/cache/CacheStorageEngineConnection.messages.in: Added.
490         * Platform/IPC/ArgumentCoders.h:
491         * Shared/WebCoreArgumentCoders.cpp:
492         (IPC::ArgumentCoder<CacheQueryOptions>::encode):
493         (IPC::ArgumentCoder<CacheQueryOptions>::decode):
494         (IPC::ArgumentCoder<FetchOptions>::encode):
495         (IPC::ArgumentCoder<FetchOptions>::decode):
496         (IPC::ArgumentCoder<CacheStorageConnection::CacheInfo>::encode):
497         (IPC::ArgumentCoder<CacheStorageConnection::CacheInfo>::decode):
498         (IPC::ArgumentCoder<CacheStorageConnection::Record>::encode):
499         (IPC::ArgumentCoder<CacheStorageConnection::Record>::decode):
500         * Shared/WebCoreArgumentCoders.h:
501         * WebKit.xcodeproj/project.pbxproj:
502         * WebProcess/Cache/WebCacheStorageConnection.cpp: Added.
503         (WebKit::WebCacheStorageConnection::WebCacheStorageConnection):
504         (WebKit::WebCacheStorageConnection::~WebCacheStorageConnection):
505         (WebKit::WebCacheStorageConnection::messageSenderConnection):
506         (WebKit::WebCacheStorageConnection::doOpen):
507         (WebKit::WebCacheStorageConnection::doRemove):
508         (WebKit::WebCacheStorageConnection::doRetrieveCaches):
509         (WebKit::WebCacheStorageConnection::doRetrieveRecords):
510         (WebKit::WebCacheStorageConnection::doBatchDeleteOperation):
511         (WebKit::WebCacheStorageConnection::doBatchPutOperation):
512         (WebKit::WebCacheStorageConnection::openCompleted):
513         (WebKit::WebCacheStorageConnection::removeCompleted):
514         (WebKit::WebCacheStorageConnection::updateCaches):
515         (WebKit::WebCacheStorageConnection::updateRecords):
516         (WebKit::WebCacheStorageConnection::deleteRecordsCompleted):
517         (WebKit::WebCacheStorageConnection::putRecordsCompleted):
518         * WebProcess/Cache/WebCacheStorageConnection.h: Added.
519         * WebProcess/Cache/WebCacheStorageConnection.messages.in: Added.
520         * WebProcess/Cache/WebCacheStorageProvider.cpp: Copied from Source/WebKit/WebProcess/Cache/WebCacheStorageProvider.h.
521         (WebKit::WebCacheStorageProvider::createCacheStorageConnection):
522         * WebProcess/Cache/WebCacheStorageProvider.h:
523         * WebProcess/Network/NetworkProcessConnection.cpp:
524         (WebKit::NetworkProcessConnection::didReceiveMessage):
525
526 2017-08-18  Commit Queue  <commit-queue@webkit.org>
527
528         Unreviewed, rolling out r220854.
529         https://bugs.webkit.org/show_bug.cgi?id=175716
530
531         I'm not sure we really need this (Requested by KaL on
532         #webkit).
533
534         Reverted changeset:
535
536         "[GTK][WPE] Add NTLM authentication enabled API"
537         https://bugs.webkit.org/show_bug.cgi?id=122952
538         http://trac.webkit.org/changeset/220854
539
540 2017-08-15  Megan Gardner  <megan_gardner@apple.com>
541
542         Update to changeSelectionWithTouchAt:baseIsStart:withFlags:
543         https://bugs.webkit.org/show_bug.cgi?id=175615
544
545         Update calls to use the flag versions, as they are used for passing state.
546         Leave old calls, but set them up to be removed next cycle.
547
548         Reviewed by Tim Horton.
549
550         * Platform/spi/ios/UIKitSPI.h:
551         * UIProcess/ios/WKContentViewInteraction.mm:
552         (selectionChangedWithTouch):
553         (-[WKContentView changeSelectionWithGestureAt:withGesture:withState:]):
554         (-[WKContentView changeSelectionWithGestureAt:withGesture:withState:withFlags:]):
555         (-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:]):
556         (-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:withFlags:]):
557
558 2017-08-17  Chris Dumez  <cdumez@apple.com>
559
560         Regression(r220817): We should only copy the original request headers for Ping loads
561         https://bugs.webkit.org/show_bug.cgi?id=175679
562
563         Reviewed by Youenn Fablet.
564
565         For performance reason, we should only copy the original request headers for Ping loads
566         (Beacon at the moment), not for all CachedResourceRequests.
567
568         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
569         (WebKit::NetworkConnectionToWebProcess::loadPing):
570         * NetworkProcess/NetworkConnectionToWebProcess.h:
571         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
572         * NetworkProcess/NetworkResourceLoadParameters.cpp:
573         (WebKit::NetworkResourceLoadParameters::encode const):
574         (WebKit::NetworkResourceLoadParameters::decode):
575         * NetworkProcess/NetworkResourceLoadParameters.h:
576         * NetworkProcess/PingLoad.cpp:
577         (WebKit::PingLoad::PingLoad):
578         (WebKit::PingLoad::willPerformHTTPRedirection):
579         (WebKit::PingLoad::makeCrossOriginAccessRequest):
580         (WebKit::PingLoad::makeSimpleCrossOriginAccessRequest):
581         (WebKit::PingLoad::originalRequestHeaders const): Deleted.
582         * NetworkProcess/PingLoad.h:
583         * WebProcess/Network/WebLoaderStrategy.cpp:
584         (WebKit::WebLoaderStrategy::createPingHandle):
585         * WebProcess/Network/WebLoaderStrategy.h:
586
587 2017-08-17  Don Olmstead  <don.olmstead@sony.com>
588
589         [PAL] Relocate SessionID to root
590         https://bugs.webkit.org/show_bug.cgi?id=175684
591
592         Reviewed by Alex Christensen.
593
594         * NetworkProcess/Downloads/Download.h:
595         * NetworkProcess/Downloads/DownloadManager.cpp:
596         * NetworkProcess/NetworkCORSPreflightChecker.h:
597         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
598         * NetworkProcess/NetworkLoad.cpp:
599         * NetworkProcess/NetworkLoadParameters.h:
600         * NetworkProcess/NetworkProcess.cpp:
601         * NetworkProcess/NetworkProcess.h:
602         * NetworkProcess/NetworkResourceLoadParameters.h:
603         * NetworkProcess/NetworkSession.h:
604         * NetworkProcess/NetworkSocketStream.h:
605         * NetworkProcess/RemoteNetworkingContext.h:
606         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
607         * Scripts/webkit/messages.py:
608         (forward_declarations_and_headers.templates): Deleted.
609         (class_template_headers.template): Deleted.
610         * Shared/ChildProcess.cpp:
611         * Shared/SessionTracker.h:
612         * Shared/Storage/StorageProcessCreationParameters.h:
613         * Shared/WebCoreArgumentCoders.cpp:
614         * Shared/WebPageCreationParameters.h:
615         * Shared/WebProcessCreationParameters.h:
616         * Shared/WebsiteDataStoreParameters.h:
617         * Shared/mac/CookieStorageShim.mm:
618         * StorageProcess/IndexedDB/WebIDBConnectionToClient.h:
619         * StorageProcess/StorageProcess.cpp:
620         * StorageProcess/StorageProcess.h:
621         * StorageProcess/StorageToWebProcessConnection.h:
622         * UIProcess/API/APIPageConfiguration.h:
623         * UIProcess/API/APIWebsiteDataStore.h:
624         * UIProcess/API/glib/WebKitCookieManager.cpp:
625         * UIProcess/Plugins/PlugInAutoStartProvider.h:
626         * UIProcess/WebCookieManagerProxy.h:
627         * UIProcess/WebProcessPool.cpp:
628         * UIProcess/WebProcessPool.h:
629         * UIProcess/WebProcessProxy.h:
630         * UIProcess/WebsiteData/WebsiteDataStore.h:
631         * WebProcess/Cookies/WebCookieManager.h:
632         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
633         * WebProcess/Databases/WebDatabaseProvider.cpp:
634         * WebProcess/InjectedBundle/InjectedBundle.cpp:
635         * WebProcess/Network/NetworkProcessConnection.cpp:
636         * WebProcess/Network/WebLoaderStrategy.cpp:
637         * WebProcess/Network/WebSocketStream.cpp:
638         * WebProcess/Network/WebSocketStream.h:
639         * WebProcess/Storage/WebToStorageProcessConnection.h:
640         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
641         * WebProcess/WebCoreSupport/WebPlugInClient.h:
642         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
643         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
644         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
645         * WebProcess/WebPage/WebPage.cpp:
646         * WebProcess/WebProcess.h:
647
648 2017-08-17  Chris Dumez  <cdumez@apple.com>
649
650         REGRESSION (r220601): Crash under ProcessAssertion::markAsInvalidated()
651         https://bugs.webkit.org/show_bug.cgi?id=175685
652         <rdar://problem/33868623>
653
654         Reviewed by Sam Weinig.
655
656         After r220601, it is no longer safe to call a default-initialized WTF::Function.
657
658         * UIProcess/ios/ProcessAssertionIOS.mm:
659         (WebKit::ProcessAssertion::markAsInvalidated):
660
661 2017-08-17  Andreas Kling  <akling@apple.com>
662
663         Disable CSS regions at compile time
664         https://bugs.webkit.org/show_bug.cgi?id=175630
665
666         Reviewed by Antti Koivisto.
667
668         * Configurations/FeatureDefines.xcconfig:
669
670 2017-08-17  Wenson Hsieh  <wenson_hsieh@apple.com>
671
672         [iOS] Respect type fidelities when copying image elements to the pasteboard
673         https://bugs.webkit.org/show_bug.cgi?id=175638
674         <rdar://problem/26556043>
675
676         Reviewed by Ryosuke Niwa.
677
678         Currently, we treat the case when copying an image enclosed by a link by only writing a URL to the pasteboard.
679         This patch tweaks logic in WebPage::performActionOnElement to write both an image and a link to the pasteboard
680         if the hit-tested image element is enclosed by an anchor.
681
682         * Platform/spi/ios/UIKitSPI.h:
683         * WebProcess/WebPage/ios/WebPageIOS.mm:
684         (WebKit::containingLinkElement):
685
686         Tweak this helper to be more restrictive when finding an enclosing 'link' -- only return an element if isLink()
687         is true, and it is an HTMLAnchorElement. Currently, the isLink() also matches HTMLLinkElements, but this isn't
688         the intention here.
689
690         (WebKit::WebPage::performActionOnElement):
691
692 2017-08-17  Jacobo Aragunde Pérez  <jaragunde@igalia.com>
693
694         [WPE][GTK] Ensure proper casting of data in gvariants
695         https://bugs.webkit.org/show_bug.cgi?id=175667
696
697         Reviewed by Michael Catanzaro.
698
699         g_variant_builder_add requires data to have the correct width for their types, using
700         casting if necessary. Corrected a call where a single precision float was being put
701         into a double precision parameter without a cast.
702
703         * UIProcess/API/glib/WebKitWebViewSessionState.cpp:
704         (encodeFrameState):
705
706 2017-08-17  Don Olmstead  <don.olmstead@sony.com>
707
708         [PAL] Move SessionID into PAL
709         https://bugs.webkit.org/show_bug.cgi?id=174192
710
711         Reviewed by Antti Koivisto.
712
713         * NetworkProcess/Downloads/Download.cpp:
714         (WebKit::Download::Download):
715         * NetworkProcess/Downloads/Download.h:
716         (WebKit::Download::Download):
717         * NetworkProcess/Downloads/DownloadManager.cpp:
718         (WebKit::DownloadManager::startDownload):
719         (WebKit::DownloadManager::resumeDownload):
720         * NetworkProcess/Downloads/DownloadManager.h:
721         (WebKit::DownloadManager::startDownload):
722         * NetworkProcess/NetworkCORSPreflightChecker.h:
723         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
724         (WebKit::NetworkConnectionToWebProcess::createSocketStream):
725         (WebKit::storageSession):
726         (WebKit::NetworkConnectionToWebProcess::startDownload):
727         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
728         (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
729         (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
730         (WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
731         (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
732         (WebKit::NetworkConnectionToWebProcess::getRawCookies):
733         (WebKit::NetworkConnectionToWebProcess::deleteCookie):
734         (WebKit::NetworkConnectionToWebProcess::ensureLegacyPrivateBrowsingSession):
735         * NetworkProcess/NetworkConnectionToWebProcess.h:
736         (WebKit::NetworkConnectionToWebProcess::startDownload):
737         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
738         * NetworkProcess/NetworkLoad.cpp:
739         * NetworkProcess/NetworkLoadParameters.h:
740         * NetworkProcess/NetworkProcess.cpp:
741         (WebKit::NetworkProcess::initializeNetworkProcess):
742         (WebKit::NetworkProcess::destroySession):
743         (WebKit::fetchDiskCacheEntries):
744         (WebKit::NetworkProcess::fetchWebsiteData):
745         (WebKit::NetworkProcess::deleteWebsiteData):
746         (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
747         (WebKit::NetworkProcess::downloadRequest):
748         (WebKit::NetworkProcess::resumeDownload):
749         * NetworkProcess/NetworkProcess.h:
750         * NetworkProcess/NetworkProcess.messages.in:
751         * NetworkProcess/NetworkResourceLoadParameters.h:
752         * NetworkProcess/NetworkResourceLoader.h:
753         * NetworkProcess/NetworkSession.cpp:
754         (WebKit::NetworkSession::create):
755         (WebKit::NetworkSession::defaultSession):
756         (WebKit::NetworkSession::NetworkSession):
757         * NetworkProcess/NetworkSession.h:
758         (WebKit::NetworkSession::sessionID const):
759         * NetworkProcess/NetworkSocketStream.cpp:
760         (WebKit::NetworkSocketStream::create):
761         (WebKit::NetworkSocketStream::NetworkSocketStream):
762         * NetworkProcess/NetworkSocketStream.h:
763         * NetworkProcess/RemoteNetworkingContext.h:
764         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
765         (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
766         * NetworkProcess/cocoa/NetworkSessionCocoa.h:
767         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
768         (WebKit::configurationForSessionID):
769         (WebKit::NetworkSessionCocoa::create):
770         (WebKit::NetworkSessionCocoa::defaultSession):
771         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
772         * NetworkProcess/soup/NetworkSessionSoup.cpp:
773         (WebKit::NetworkSessionSoup::NetworkSessionSoup):
774         * NetworkProcess/soup/NetworkSessionSoup.h:
775         * Scripts/webkit/messages.py:
776         (forward_declarations_and_headers.templates): Deleted.
777         (class_template_headers.template): Deleted.
778         * Shared/ChildProcess.cpp:
779         (WebKit::ChildProcess::initialize):
780         * Shared/SessionTracker.cpp:
781         (WebKit::staticSessionMap):
782         (WebKit::SessionTracker::networkSession):
783         (WebKit::SessionTracker::setSession):
784         (WebKit::SessionTracker::destroySession):
785         * Shared/SessionTracker.h:
786         * Shared/Storage/StorageProcessCreationParameters.h:
787         * Shared/WebCoreArgumentCoders.cpp:
788         * Shared/WebCoreArgumentCoders.h:
789         * Shared/WebPageCreationParameters.h:
790         * Shared/WebProcessCreationParameters.h:
791         * Shared/WebsiteDataStoreParameters.h:
792         * Shared/mac/CookieStorageShim.mm:
793         (WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL):
794         * StorageProcess/IndexedDB/WebIDBConnectionToClient.cpp:
795         (WebKit::WebIDBConnectionToClient::create):
796         (WebKit::WebIDBConnectionToClient::WebIDBConnectionToClient):
797         * StorageProcess/IndexedDB/WebIDBConnectionToClient.h:
798         * StorageProcess/StorageProcess.cpp:
799         (WebKit::StorageProcess::idbServer):
800         (WebKit::StorageProcess::fetchWebsiteData):
801         (WebKit::StorageProcess::deleteWebsiteData):
802         (WebKit::StorageProcess::deleteWebsiteDataForOrigins):
803         * StorageProcess/StorageProcess.h:
804         * StorageProcess/StorageProcess.messages.in:
805         * StorageProcess/StorageToWebProcessConnection.cpp:
806         (WebKit::StorageToWebProcessConnection::establishIDBConnectionToServer):
807         * StorageProcess/StorageToWebProcessConnection.h:
808         * StorageProcess/StorageToWebProcessConnection.messages.in:
809         * UIProcess/API/APIPageConfiguration.cpp:
810         (API::PageConfiguration::setWebsiteDataStore):
811         (API::PageConfiguration::sessionID):
812         (API::PageConfiguration::setSessionID):
813         * UIProcess/API/APIPageConfiguration.h:
814         * UIProcess/API/APIWebsiteDataStore.cpp:
815         (API::WebsiteDataStore::defaultDataStore):
816         (API::WebsiteDataStore::createLegacy):
817         (API::WebsiteDataStore::WebsiteDataStore):
818         * UIProcess/API/APIWebsiteDataStore.h:
819         * UIProcess/API/C/WKCookieManager.cpp:
820         (WKCookieManagerGetHostnamesWithCookies):
821         (WKCookieManagerDeleteCookiesForHostname):
822         (WKCookieManagerDeleteAllCookies):
823         (WKCookieManagerDeleteAllCookiesModifiedAfterDate):
824         (WKCookieManagerSetHTTPCookieAcceptPolicy):
825         (WKCookieManagerGetHTTPCookieAcceptPolicy):
826         (WKCookieManagerStartObservingCookieChanges):
827         (WKCookieManagerStopObservingCookieChanges):
828         * UIProcess/API/Cocoa/WKProcessPool.mm:
829         (-[WKProcessPool _setCookieAcceptPolicy:]):
830         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
831         (-[WKWebsiteDataStore _initWithConfiguration:]):
832         * UIProcess/API/glib/WebKitCookieManager.cpp:
833         (webkit_cookie_manager_set_accept_policy):
834         (webkit_cookie_manager_get_accept_policy):
835         * UIProcess/Network/NetworkProcessProxy.cpp:
836         (WebKit::NetworkProcessProxy::fetchWebsiteData):
837         (WebKit::NetworkProcessProxy::deleteWebsiteData):
838         (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
839         * UIProcess/Network/NetworkProcessProxy.h:
840         * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
841         (WebKit::PlugInAutoStartProvider::PlugInAutoStartProvider):
842         (WebKit::PlugInAutoStartProvider::addAutoStartOriginHash):
843         (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy const):
844         (WebKit::PlugInAutoStartProvider::setAutoStartOriginsTableWithItemsPassingTest):
845         (WebKit::PlugInAutoStartProvider::didReceiveUserInteraction):
846         * UIProcess/Plugins/PlugInAutoStartProvider.h:
847         * UIProcess/Storage/StorageProcessProxy.cpp:
848         (WebKit::StorageProcessProxy::fetchWebsiteData):
849         (WebKit::StorageProcessProxy::deleteWebsiteData):
850         (WebKit::StorageProcessProxy::deleteWebsiteDataForOrigins):
851         * UIProcess/Storage/StorageProcessProxy.h:
852         * UIProcess/WebCookieManagerProxy.cpp:
853         (WebKit::WebCookieManagerProxy::getHostnamesWithCookies):
854         (WebKit::WebCookieManagerProxy::deleteCookiesForHostname):
855         (WebKit::WebCookieManagerProxy::deleteAllCookies):
856         (WebKit::WebCookieManagerProxy::deleteCookie):
857         (WebKit::WebCookieManagerProxy::deleteAllCookiesModifiedSince):
858         (WebKit::WebCookieManagerProxy::setCookie):
859         (WebKit::WebCookieManagerProxy::setCookies):
860         (WebKit::WebCookieManagerProxy::getAllCookies):
861         (WebKit::WebCookieManagerProxy::getCookies):
862         (WebKit::WebCookieManagerProxy::startObservingCookieChanges):
863         (WebKit::WebCookieManagerProxy::stopObservingCookieChanges):
864         (WebKit::WebCookieManagerProxy::setCookieObserverCallback):
865         (WebKit::WebCookieManagerProxy::registerObserver):
866         (WebKit::WebCookieManagerProxy::unregisterObserver):
867         (WebKit::WebCookieManagerProxy::cookiesDidChange):
868         (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
869         (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
870         * UIProcess/WebCookieManagerProxy.h:
871         * UIProcess/WebCookieManagerProxy.messages.in:
872         * UIProcess/WebPageProxy.h:
873         (WebKit::WebPageProxy::sessionID const):
874         * UIProcess/WebProcessPool.cpp:
875         (WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled):
876         (WebKit::WebProcessPool::createNewWebProcess):
877         (WebKit::WebProcessPool::createWebPage):
878         (WebKit::WebProcessPool::pageAddedToProcess):
879         (WebKit::WebProcessPool::pageRemovedFromProcess):
880         (WebKit::WebProcessPool::download):
881         (WebKit::WebProcessPool::resumeDownload):
882         (WebKit::WebProcessPool::addPlugInAutoStartOriginHash):
883         (WebKit::WebProcessPool::plugInDidReceiveUserInteraction):
884         * UIProcess/WebProcessPool.h:
885         * UIProcess/WebProcessPool.messages.in:
886         * UIProcess/WebProcessProxy.cpp:
887         (WebKit::WebProcessProxy::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores):
888         (WebKit::WebProcessProxy::topPrivatelyControlledDomainsWithWebsiteData):
889         (WebKit::WebProcessProxy::fetchWebsiteData):
890         (WebKit::WebProcessProxy::deleteWebsiteData):
891         (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
892         * UIProcess/WebProcessProxy.h:
893         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
894         (WebKit::WebsiteDataStore::createNonPersistent):
895         (WebKit::WebsiteDataStore::create):
896         (WebKit::WebsiteDataStore::WebsiteDataStore):
897         (WebKit::WebsiteDataStore::~WebsiteDataStore):
898         * UIProcess/WebsiteData/WebsiteDataStore.h:
899         (WebKit::WebsiteDataStore::sessionID const):
900         * WebProcess/Cookies/WebCookieManager.cpp:
901         (WebKit::WebCookieManager::getHostnamesWithCookies):
902         (WebKit::WebCookieManager::deleteCookiesForHostname):
903         (WebKit::WebCookieManager::deleteAllCookies):
904         (WebKit::WebCookieManager::deleteCookie):
905         (WebKit::WebCookieManager::deleteAllCookiesModifiedSince):
906         (WebKit::WebCookieManager::getAllCookies):
907         (WebKit::WebCookieManager::getCookies):
908         (WebKit::WebCookieManager::setCookie):
909         (WebKit::WebCookieManager::setCookies):
910         (WebKit::WebCookieManager::notifyCookiesDidChange):
911         (WebKit::WebCookieManager::startObservingCookieChanges):
912         (WebKit::WebCookieManager::stopObservingCookieChanges):
913         * WebProcess/Cookies/WebCookieManager.h:
914         * WebProcess/Cookies/WebCookieManager.messages.in:
915         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
916         (WebKit::WebIDBConnectionToServer::create):
917         (WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer):
918         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
919         * WebProcess/Databases/WebDatabaseProvider.cpp:
920         (WebKit::WebDatabaseProvider::idbConnectionToServerForSession):
921         * WebProcess/Databases/WebDatabaseProvider.h:
922         * WebProcess/InjectedBundle/InjectedBundle.cpp:
923         (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
924         * WebProcess/Network/NetworkProcessConnection.cpp:
925         (WebKit::NetworkProcessConnection::didCacheResource):
926         * WebProcess/Network/NetworkProcessConnection.h:
927         * WebProcess/Network/NetworkProcessConnection.messages.in:
928         * WebProcess/Network/WebLoaderStrategy.cpp:
929         (WebKit::WebLoaderStrategy::scheduleLoad):
930         (WebKit::WebLoaderStrategy::loadResourceSynchronously):
931         (WebKit::WebLoaderStrategy::createPingHandle):
932         * WebProcess/Network/WebSocketProvider.cpp:
933         (WebKit::WebSocketProvider::createSocketStreamHandle):
934         * WebProcess/Network/WebSocketProvider.h:
935         * WebProcess/Network/WebSocketStream.cpp:
936         (WebKit::WebSocketStream::create):
937         (WebKit::WebSocketStream::WebSocketStream):
938         * WebProcess/Network/WebSocketStream.h:
939         * WebProcess/Storage/WebToStorageProcessConnection.cpp:
940         (WebKit::WebToStorageProcessConnection::idbConnectionToServerForSession):
941         * WebProcess/Storage/WebToStorageProcessConnection.h:
942         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
943         (WebKit::WebFrameLoaderClient::convertMainResourceLoadToDownload):
944         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
945         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
946         (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
947         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
948         * WebProcess/WebCoreSupport/WebPlugInClient.cpp:
949         (WebKit::WebPlugInClient::didStartFromOrigin):
950         * WebProcess/WebCoreSupport/WebPlugInClient.h:
951         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
952         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
953         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
954         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
955         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
956         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
957         * WebProcess/WebPage/WebFrame.cpp:
958         (WebKit::WebFrame::startDownload):
959         (WebKit::WebFrame::convertMainResourceLoadToDownload):
960         * WebProcess/WebPage/WebFrame.h:
961         * WebProcess/WebPage/WebPage.cpp:
962         (WebKit::WebPage::setSessionID):
963         (WebKit::WebPage::updatePreferences):
964         * WebProcess/WebPage/WebPage.h:
965         (WebKit::WebPage::sessionID const):
966         * WebProcess/WebProcess.cpp:
967         (WebKit::m_webSQLiteDatabaseTracker):
968         (WebKit::WebProcess::ensurePrivateBrowsingSession):
969         (WebKit::WebProcess::destroySession):
970         (WebKit::WebProcess::isPlugInAutoStartOriginHash):
971         (WebKit::WebProcess::plugInDidStartFromOrigin):
972         (WebKit::WebProcess::didAddPlugInAutoStartOriginHash):
973         (WebKit::WebProcess::resetPlugInAutoStartOriginDefaultHashes):
974         (WebKit::WebProcess::resetPlugInAutoStartOriginHashes):
975         (WebKit::WebProcess::plugInDidReceiveUserInteraction):
976         (WebKit::WebProcess::fetchWebsiteData):
977         (WebKit::WebProcess::deleteWebsiteData):
978         (WebKit::WebProcess::deleteWebsiteDataForOrigins):
979         * WebProcess/WebProcess.h:
980         * WebProcess/WebProcess.messages.in:
981
982 2017-08-17  Joseph Pecoraro  <pecoraro@apple.com>
983
984         Fix typo: setUpInectedBundleClient
985         https://bugs.webkit.org/show_bug.cgi?id=175655
986
987         Reviewed by Andreas Kling.
988
989         * UIProcess/API/Cocoa/WKProcessGroup.mm:
990         (setUpInjectedBundleClient):
991         (-[WKProcessGroup initWithInjectedBundleURL:]):
992
993 2017-08-17  Carlos Garcia Campos  <cgarcia@igalia.com>
994
995         [GTK][WPE] Add NTLM authentication enabled API
996         https://bugs.webkit.org/show_bug.cgi?id=122952
997
998         Reviewed by Michael Catanzaro.
999
1000         Add API to WebKitWebContext to enable/disable NTLM authentication.
1001
1002         * NetworkProcess/NetworkProcess.h:
1003         * NetworkProcess/NetworkProcess.messages.in:
1004         * NetworkProcess/NetworkProcessCreationParameters.cpp:
1005         (WebKit::NetworkProcessCreationParameters::encode const):
1006         (WebKit::NetworkProcessCreationParameters::decode):
1007         * NetworkProcess/NetworkProcessCreationParameters.h:
1008         * NetworkProcess/soup/NetworkProcessSoup.cpp:
1009         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
1010         (WebKit::NetworkProcess::setNTLMAuthenticationEnabled):
1011         * UIProcess/API/glib/WebKitWebContext.cpp:
1012         (webkit_web_context_get_ntlm_authentication_enabled):
1013         (webkit_web_context_set_ntlm_authentication_enabled):
1014         * UIProcess/API/gtk/WebKitWebContext.h:
1015         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
1016         * UIProcess/API/wpe/WebKitWebContext.h:
1017         * UIProcess/WebProcessPool.h:
1018         * UIProcess/soup/WebProcessPoolSoup.cpp:
1019         (WebKit::WebProcessPool::setNTLMAuthenticationEnabled):
1020
1021 2017-08-16  Andy Estes  <aestes@apple.com>
1022
1023         [Apple Pay] Rename PaymentRequest to ApplePaySessionPaymentRequest
1024         https://bugs.webkit.org/show_bug.cgi?id=175648
1025
1026         Reviewed by Tim Horton.
1027
1028         * Scripts/webkit/messages.py:
1029         (headers_for_type):
1030         * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
1031         (IPC::ArgumentCoder<ApplePaySessionPaymentRequest>::encode):
1032         (IPC::ArgumentCoder<ApplePaySessionPaymentRequest>::decode):
1033         (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::ContactFields>::encode):
1034         (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::ContactFields>::decode):
1035         (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::LineItem>::encode):
1036         (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::LineItem>::decode):
1037         (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::MerchantCapabilities>::encode):
1038         (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::MerchantCapabilities>::decode):
1039         (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::ShippingMethod>::encode):
1040         (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::ShippingMethod>::decode):
1041         (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::TotalAndLineItems>::encode):
1042         (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::TotalAndLineItems>::decode):
1043         (IPC::ArgumentCoder<PaymentRequest>::encode): Deleted.
1044         (IPC::ArgumentCoder<PaymentRequest>::decode): Deleted.
1045         (IPC::ArgumentCoder<PaymentRequest::ContactFields>::encode): Deleted.
1046         (IPC::ArgumentCoder<PaymentRequest::ContactFields>::decode): Deleted.
1047         (IPC::ArgumentCoder<PaymentRequest::LineItem>::encode): Deleted.
1048         (IPC::ArgumentCoder<PaymentRequest::LineItem>::decode): Deleted.
1049         (IPC::ArgumentCoder<PaymentRequest::MerchantCapabilities>::encode): Deleted.
1050         (IPC::ArgumentCoder<PaymentRequest::MerchantCapabilities>::decode): Deleted.
1051         (IPC::ArgumentCoder<PaymentRequest::ShippingMethod>::encode): Deleted.
1052         (IPC::ArgumentCoder<PaymentRequest::ShippingMethod>::decode): Deleted.
1053         (IPC::ArgumentCoder<PaymentRequest::TotalAndLineItems>::encode): Deleted.
1054         (IPC::ArgumentCoder<PaymentRequest::TotalAndLineItems>::decode): Deleted.
1055         * Shared/WebCoreArgumentCoders.h:
1056         * UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:
1057         (WebKit::WebPaymentCoordinatorProxy::showPaymentUI):
1058         (WebKit::WebPaymentCoordinatorProxy::didSelectShippingMethod):
1059         * UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
1060         * UIProcess/ApplePay/WebPaymentCoordinatorProxy.messages.in:
1061         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h:
1062         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
1063         (toShippingMethod):
1064         (WebKit::toPKContactFields):
1065         (WebKit::toPKAddressField):
1066         (WebKit::toPKPaymentSummaryItemType):
1067         (WebKit::toPKPaymentSummaryItem):
1068         (WebKit::toPKPaymentSummaryItems):
1069         (WebKit::toPKMerchantCapabilities):
1070         (WebKit::toPKShippingType):
1071         (WebKit::toPKShippingMethod):
1072         (WebKit::toPKPaymentRequest):
1073         * UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm:
1074         (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
1075         * UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
1076         (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
1077         * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
1078         (WebKit::WebPaymentCoordinator::showPaymentUI):
1079         (WebKit::WebPaymentCoordinator::didSelectShippingMethod):
1080         * WebProcess/ApplePay/WebPaymentCoordinator.h:
1081         * WebProcess/ApplePay/WebPaymentCoordinator.messages.in:
1082
1083 2017-08-16  Chris Dumez  <cdumez@apple.com>
1084
1085         Cross origin Beacon requests with a ArrayBuffer / ArrayBufferView payload should not do a CORS preflight
1086         https://bugs.webkit.org/show_bug.cgi?id=175628
1087         <rdar://problem/33919278>
1088
1089         Reviewed by Geoffrey Garen.
1090
1091         Cross origin Beacon requests with a ArrayBuffer / ArrayBufferView payload should not do a CORS preflight.
1092         To achieve this, the following changes were made:
1093         1. Revert r220779 which caused us to use a non CORS-safelisted Content-Type header for such payload
1094         2. Teach PingLoad how to deal with "simple" cross origin requests (i.e. Don't assume we need a CORS
1095            preflight merely because the fetch mode is set to "cors").
1096
1097         * NetworkProcess/NetworkCORSPreflightChecker.cpp:
1098         (WebKit::NetworkCORSPreflightChecker::startPreflight):
1099         * NetworkProcess/NetworkResourceLoadParameters.cpp:
1100         (WebKit::NetworkResourceLoadParameters::encode const):
1101         (WebKit::NetworkResourceLoadParameters::decode):
1102         * NetworkProcess/NetworkResourceLoadParameters.h:
1103         * NetworkProcess/PingLoad.cpp:
1104         (WebKit::PingLoad::PingLoad):
1105         (WebKit::PingLoad::loadRequest):
1106         (WebKit::PingLoad::originalRequestHeaders const):
1107         (WebKit::PingLoad::willPerformHTTPRedirection):
1108         (WebKit::PingLoad::isAllowedRedirect const):
1109         (WebKit::PingLoad::makeCrossOriginAccessRequest):
1110         (WebKit::PingLoad::makeSimpleCrossOriginAccessRequest):
1111         (WebKit::PingLoad::makeCrossOriginAccessRequestWithPreflight):
1112         (WebKit::PingLoad::preflightSuccess):
1113         * NetworkProcess/PingLoad.h:
1114         * WebProcess/Network/WebLoaderStrategy.cpp:
1115         (WebKit::WebLoaderStrategy::createPingHandle):
1116         * WebProcess/Network/WebLoaderStrategy.h:
1117
1118 2017-08-16  Yoshiaki Jitsukawa  <Yoshiaki.Jitsukawa@sony.com>
1119
1120         [PAL] Move spi/ios and spi/win directories into PAL
1121         https://bugs.webkit.org/show_bug.cgi?id=175171
1122
1123         Reviewed by Antti Koivisto.
1124
1125         * UIProcess/Cocoa/NavigationState.mm:
1126         * UIProcess/ios/WKActionSheetAssistant.h:
1127         * UIProcess/ios/WKActionSheetAssistant.mm:
1128         * UIProcess/ios/WKContentViewInteraction.mm:
1129         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
1130         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
1131         * WebProcess/cocoa/WebProcessCocoa.mm:
1132
1133 2017-08-16  Miguel Gomez  <magomez@igalia.com>
1134
1135         [GTK] Crash of WebProcess with on-demand AC
1136         https://bugs.webkit.org/show_bug.cgi?id=171161
1137
1138         Reviewed by Carlos Garcia Campos.
1139
1140         Set the viewOverlayRootLayer to the previous layerTreeHost if it exists. This avoids a
1141         crash when reusing the previous layerTreeHost, because it would keep a reference to an
1142         already destroyed viewOverlayRootLayer.
1143
1144         * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
1145         (WebKit::AcceleratedDrawingArea::attachViewOverlayGraphicsLayer):
1146
1147 2017-08-16  Zan Dobersek  <zdobersek@igalia.com>
1148
1149         [CoordGraphics] Simplify CoordinatedGraphicsScene state updates
1150         https://bugs.webkit.org/show_bug.cgi?id=175528
1151         <rdar://problem/33876795>
1152
1153         Reviewed by Carlos Garcia Campos.
1154
1155         Hold the information about state updates in ThreadedCompositor, in the
1156         m_attributes struct. This way we don't need to store the updates in
1157         functors and accumulate them in the CoordinatedGraphicsScene class, but
1158         instead just apply any pending state update or atlas removal before the
1159         scene is rendered.
1160
1161         This removes the need to update the CoordinatedGraphicsScene object from
1162         the main thread with data that ultimately has to be handled on the
1163         composition thread. Similarly, when updating CoordinatedGraphicsScene, we
1164         only need to synchronize on the m_attributes lock object once in order to
1165         retrieve the scene update information, instead of having each functor do
1166         that repeatedly.
1167
1168         Outside of CoordinatedGraphicsScene and ThreadedCompositor classes, the
1169         CompositingCoordinator class now passes the atlases-to-remove Vector by
1170         a const lvalue reference down to ThreadedCompositor, and then manually
1171         clears the Vector. Before the Vector was passed as an rvalue reference,
1172         depending on the ThreadedCompositor code to clear out the original Vector
1173         object by moving its resources into the functor object. This doesn't occur
1174         anymore because the Vector object is now appended to another Vector.
1175
1176         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
1177         (WebKit::CoordinatedGraphicsScene::applyStateChanges):
1178         (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
1179         (WebKit::CoordinatedGraphicsScene::detach):
1180         (WebKit::CoordinatedGraphicsScene::setActive):
1181         (WebKit::CoordinatedGraphicsScene::syncRemoteContent): Deleted.
1182         (WebKit::CoordinatedGraphicsScene::appendUpdate): Deleted.
1183         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
1184         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
1185         (WebKit::ThreadedCompositor::renderLayerTree):
1186         (WebKit::ThreadedCompositor::updateSceneState):
1187         (WebKit::ThreadedCompositor::releaseUpdateAtlases):
1188         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
1189         * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
1190         (WebKit::CompositingCoordinator::flushPendingLayerChanges):
1191         (WebKit::CompositingCoordinator::releaseAtlases):
1192         (WebKit::CompositingCoordinator::clearUpdateAtlases):
1193         * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
1194         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
1195         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
1196         (WebKit::ThreadedCoordinatedLayerTreeHost::releaseUpdateAtlases):
1197         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
1198
1199 2017-08-16  Andy Estes  <aestes@apple.com>
1200
1201         [Payment Request] Add an ENABLE flag and an experimental feature preference
1202         https://bugs.webkit.org/show_bug.cgi?id=175622
1203
1204         Reviewed by Tim Horton.
1205
1206         * Configurations/FeatureDefines.xcconfig:
1207         * Shared/WebPreferencesDefinitions.h:
1208         * UIProcess/API/C/WKPreferences.cpp:
1209         (WKPreferencesSetPaymentRequestEnabled):
1210         (WKPreferencesGetPaymentRequestEnabled):
1211         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1212         * WebProcess/WebPage/WebPage.cpp:
1213         (WebKit::WebPage::updatePreferences):
1214
1215 2017-08-15  Carlos Garcia Campos  <cgarcia@igalia.com>
1216
1217         [GTK][WPE] WebKitAutomationSession should set session client to nullptr on dispose
1218         https://bugs.webkit.org/show_bug.cgi?id=175564
1219
1220         Reviewed by Carlos Alberto Lopez Perez.
1221
1222         WebAutomationSession expects its client to be nullptr in the destructor.
1223
1224         * UIProcess/API/glib/WebKitAutomationSession.cpp:
1225         (webkitAutomationSessionDispose):
1226
1227 2017-08-15  Tim Horton  <timothy_horton@apple.com>
1228
1229         WKSnapshotConfiguration is missing from the WebKit umbrella header
1230         https://bugs.webkit.org/show_bug.cgi?id=175614
1231         <rdar://problem/33812691>
1232
1233         Reviewed by Dan Bernstein.
1234
1235         * Shared/API/Cocoa/WebKit.h:
1236         Add WKSnapshotConfiguration, which is a public header.
1237
1238 2017-08-15  Simon Fraser  <simon.fraser@apple.com>
1239
1240         Allow WebCore logging channels to be set from the UI process
1241         https://bugs.webkit.org/show_bug.cgi?id=175608
1242
1243         Reviewed by Tim Horton.
1244
1245         The UI process can now read the "WebCoreLogging" default, and pass it to the web process
1246         via WebProcessCreationParameters, where WebProcess::platformInitializeWebProcess() uses
1247         it to set up WebCore logging channels. Note that these will override channels read from
1248         the web process user defaults domain (but those are hard to set anyway).
1249
1250         * Shared/WebProcessCreationParameters.cpp:
1251         (WebKit::WebProcessCreationParameters::encode const):
1252         (WebKit::WebProcessCreationParameters::decode):
1253         * Shared/WebProcessCreationParameters.h:
1254         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1255         (WebKit::WebProcessPool::platformInitializeWebProcess):
1256         * WebProcess/cocoa/WebProcessCocoa.mm:
1257         (WebKit::WebProcess::platformInitializeWebProcess):
1258
1259 2017-08-15  Don Olmstead  <don.olmstead@sony.com>
1260
1261         [PAL] Move Sleep classes into PAL
1262         https://bugs.webkit.org/show_bug.cgi?id=175456
1263
1264         Reviewed by Ryosuke Niwa.
1265
1266         * UIProcess/mac/WKFullScreenWindowController.h:
1267         * UIProcess/mac/WKFullScreenWindowController.mm:
1268
1269 2017-08-15  Youenn Fablet  <youenn@apple.com>
1270
1271         [Cache API] Adding generic support for CacheStorage and Cache methods
1272         https://bugs.webkit.org/show_bug.cgi?id=175455
1273
1274         Reviewed by Chris Dumez.
1275
1276         * WebKit.xcodeproj/project.pbxproj:
1277         * WebProcess/Cache/WebCacheStorageProvider.h: Added.
1278         * WebProcess/WebPage/WebPage.cpp:
1279         (WebKit::m_cpuLimit):
1280         * WebProcess/WebProcess.cpp:
1281         (WebKit::WebProcess::WebProcess):
1282         * WebProcess/WebProcess.h:
1283         (WebKit::WebProcess::cacheStorageProvider):
1284
1285 2017-08-15  Michael Catanzaro  <mcatanzaro@igalia.com>
1286
1287         Unreviewed, rolling out r220700.
1288
1289         Broke debug bot
1290
1291         Reverted changeset:
1292
1293         "[CoordGraphics] Simplify CoordinatedGraphicsScene state
1294         updates"
1295         https://bugs.webkit.org/show_bug.cgi?id=175528
1296         http://trac.webkit.org/changeset/220700
1297
1298 2017-08-15  Carlos Garcia Campos  <cgarcia@igalia.com>
1299
1300         WebDriver: timeout when JavaScript alert is shown in onload handler
1301         https://bugs.webkit.org/show_bug.cgi?id=175315
1302         <rdar://problem/33788294>
1303
1304         Reviewed by Brian Burg.
1305
1306         When a JavaScript alert is shown in an onload handler, the alert prevents the load from finishing in case of
1307         normal page load strategy, so navigation commands or any other command for which we wait for navigation to
1308         complete end up timing out. There are two selenium tests covering this that are currently timing out:
1309         testShouldHandleAlertOnPageLoad and testShouldHandleAlertOnPageLoadUsingGet. The spec says that in case of page
1310         load timeout we should only fail with timeout error when there isn't an active alert dialog. If the next command
1311         expects an alert it will just work, otherwise it will fail with UnexpectedAlertOpen error when trying to handle
1312         user prompts.
1313
1314         9 Navigation.
1315         https://w3c.github.io/webdriver/webdriver-spec.html#dfn-wait-for-navigation-to-complete
1316
1317         * UIProcess/Automation/WebAutomationSession.cpp:
1318         (WebKit::WebAutomationSession::waitForNavigationToComplete): Do not wait for the timeout when the page is
1319         loading and there's an active alert in case of normal page load strategy.
1320         (WebKit::WebAutomationSession::respondToPendingPageNavigationCallbacksWithTimeout): Respond with timeout unless
1321         the page is showing a JavaScript dialog.
1322         (WebKit::WebAutomationSession::respondToPendingFrameNavigationCallbacksWithTimeout): Ditto.
1323         (WebKit::WebAutomationSession::loadTimerFired): Use respondToPendingPageNavigationCallbacksWithTimeout() and
1324         respondToPendingFrameNavigationCallbacksWithTimeout().
1325         (WebKit::WebAutomationSession::willShowJavaScriptDialog): The page is about to show a JavaScript dialog, so
1326         we wait until the next run loop iteration to give time for the client to show the dialog, then check if page is
1327         loading and the dialog is still present. If that's the case we finish all normal strategy pending navigations.
1328         * UIProcess/Automation/WebAutomationSession.h:
1329         * UIProcess/WebPageProxy.cpp:
1330         (WebKit::WebPageProxy::runJavaScriptAlert): If controlled by automation, notify the session.
1331         (WebKit::WebPageProxy::runJavaScriptConfirm): Ditto.
1332         (WebKit::WebPageProxy::runJavaScriptPrompt): Ditto.
1333         (WebKit::WebPageProxy::runBeforeUnloadConfirmPanel): Ditto.
1334
1335 2017-08-14  Carlos Garcia Campos  <cgarcia@igalia.com>
1336
1337         WebDriver: handle click events on option elements
1338         https://bugs.webkit.org/show_bug.cgi?id=174710
1339         <rdar://problem/33459305>
1340
1341         Reviewed by Brian Burg.
1342
1343         Add selectOptionElement method to automation to select an option element according to the WebDriver
1344         specification.
1345
1346         14.1 Element Click.
1347         https://w3c.github.io/webdriver/webdriver-spec.html#element-click
1348
1349         * UIProcess/Automation/Automation.json: Add selectOptionElement method and ElementNotSelectable error.
1350         * UIProcess/Automation/WebAutomationSession.cpp:
1351         (WebKit::WebAutomationSession::selectOptionElement):Send SelectOptionElement message to the web process.
1352         (WebKit::WebAutomationSession::didSelectOptionElement): Notify the driver.
1353         * UIProcess/Automation/WebAutomationSession.h:
1354         * UIProcess/Automation/WebAutomationSession.messages.in: Add DidSelectOptionElement message.
1355         * WebProcess/Automation/WebAutomationSessionProxy.cpp:
1356         (WebKit::elementContainer): Helper to get the container of an element according to the spec.
1357         (WebKit::WebAutomationSessionProxy::computeElementLayout): Use the container element to scroll the view and
1358         compute the in-view center point.
1359         (WebKit::WebAutomationSessionProxy::selectOptionElement): Use HTMLSelectElement::optionSelectedByUser().
1360         * WebProcess/Automation/WebAutomationSessionProxy.h:
1361         * WebProcess/Automation/WebAutomationSessionProxy.messages.in: Add SelectOptionElement message.
1362
1363 2017-08-14  Simon Fraser  <simon.fraser@apple.com>
1364
1365         Remove Proximity Events and related code
1366         https://bugs.webkit.org/show_bug.cgi?id=175545
1367
1368         Reviewed by Daniel Bates.
1369
1370         No platform enables Proximity Events, so remove code inside ENABLE(PROXIMITY_EVENTS)
1371         and other related code.
1372
1373         * CMakeLists.txt:
1374         * Configurations/FeatureDefines.xcconfig:
1375         * WebProcess/WebCoreSupport/WebDeviceProximityClient.cpp: Removed.
1376         * WebProcess/WebCoreSupport/WebDeviceProximityClient.h: Removed.
1377         * WebProcess/WebPage/WebPage.cpp:
1378         (WebKit::m_cpuLimit):
1379
1380 2017-08-14  Simon Fraser  <simon.fraser@apple.com>
1381
1382         Remove ENABLE(REQUEST_AUTOCOMPLETE) code, which was disabled everywhere
1383         https://bugs.webkit.org/show_bug.cgi?id=175504
1384
1385         Reviewed by Sam Weinig.
1386
1387         * Configurations/FeatureDefines.xcconfig:
1388         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1389         (WebKit::WebFrameLoaderClient::didRequestAutocomplete): Deleted.
1390         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1391
1392 2017-08-14  Simon Fraser  <simon.fraser@apple.com>
1393
1394         Remove ENABLE_VIEW_MODE_CSS_MEDIA and related code
1395         https://bugs.webkit.org/show_bug.cgi?id=175557
1396
1397         Reviewed by Jon Lee.
1398
1399         No port cares about the ENABLE(VIEW_MODE_CSS_MEDIA) feature, so remove it.
1400
1401         * Configurations/FeatureDefines.xcconfig:
1402
1403 2017-08-14  Andy Estes  <aestes@apple.com>
1404
1405         [Apple Pay] Add support for phonetic contact names
1406         https://bugs.webkit.org/show_bug.cgi?id=175537
1407         <rdar://problem/32002644>
1408
1409         Reviewed by Tim Horton.
1410
1411         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm: Soft-linked PKContactFieldPhoneticName.
1412         (WebKit::toPKContactFields): Added code to append PKContactFieldPhoneticName to result if
1413         contactFields.phoneticName is true.
1414         (WebKit::toNSError): Specified PKContactFieldPhoneticName as the contact field for
1415         PaymentError::ContactField::PhoneticName.
1416
1417 2017-08-14  Tim Horton  <timothy_horton@apple.com>
1418
1419         Only create directory and sandbox extension handle for storage directories if they are set
1420         https://bugs.webkit.org/show_bug.cgi?id=175522
1421
1422         Reviewed by Brady Eidson.
1423
1424         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1425         (WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary):
1426         If using a non-persistent WebsiteDataStore, all the storage directories
1427         are unset, but we still try to create them and make sandbox extensions
1428         for them. This has no effect except a ton of noisy logging, but that
1429         is reason enough to stop.
1430
1431         This is similar to r216053, but for more directories.
1432
1433 2017-08-14  Zan Dobersek  <zdobersek@igalia.com>
1434
1435         [CoordGraphics] Simplify CoordinatedGraphicsScene state updates
1436         https://bugs.webkit.org/show_bug.cgi?id=175528
1437
1438         Reviewed by Carlos Garcia Campos.
1439
1440         Hold the information about state updates in ThreadedCompositor, in the
1441         m_attributes struct. This way we don't need to store the updates in
1442         functors and accumulate them in the CoordinatedGraphicsScene class, but
1443         instead just apply any pending state update or atlas removal before the
1444         scene is rendered.
1445
1446         This removes the need to update the CoordinatedGraphicsScene object from
1447         the main thread with data that ultimately has to be handled on the
1448         composition thread. Similarly, when updating CoordinatedGraphicsScene, we
1449         only need to synchronize on the m_attributes lock object once in order to
1450         retrieve the scene update information, instead of having each functor do
1451         that repeatedly.
1452
1453         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
1454         (WebKit::CoordinatedGraphicsScene::applyStateChanges):
1455         (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
1456         (WebKit::CoordinatedGraphicsScene::detach):
1457         (WebKit::CoordinatedGraphicsScene::setActive):
1458         (WebKit::CoordinatedGraphicsScene::syncRemoteContent): Deleted.
1459         (WebKit::CoordinatedGraphicsScene::appendUpdate): Deleted.
1460         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
1461         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
1462         (WebKit::ThreadedCompositor::renderLayerTree):
1463         (WebKit::ThreadedCompositor::updateSceneState):
1464         (WebKit::ThreadedCompositor::releaseUpdateAtlases):
1465         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
1466
1467 2017-08-14  Carlos Garcia Campos  <cgarcia@igalia.com>
1468
1469         [GTK][WPE] Avoid emitting WebKitFaviconDatabase::favicon-changed multiple times while setting an icon
1470         https://bugs.webkit.org/show_bug.cgi?id=175531
1471
1472         Reviewed by Michael Catanzaro.
1473
1474         When webkitFaviconDatabaseSetIconForPageURL() is called, both setIconURLForPageURL() and setIconDataForIconURL()
1475         might notify the client, which ends up emitting the WebKitFaviconDatabase::favicon-changed signal and calling
1476         webkitFaviconDatabaseSetIconURLForPageURL(). Both things are already done by
1477         webkitFaviconDatabaseSetIconForPageURL() itself, so we can just ignore the client notification while setting a
1478         new icon.
1479
1480         * UIProcess/API/glib/WebKitFaviconDatabase.cpp:
1481         (webkitFaviconDatabaseSetIconURLForPageURL): Return early if isSettingIcon is true.
1482         (webkitFaviconDatabaseSetIconForPageURL): Set isSettingIcon to true for the scope.
1483
1484 2017-08-14  Carlos Garcia Campos  <cgarcia@igalia.com>
1485
1486         [GTK][WPE] Crash in IconDatabase::IconRecord::setImageData()
1487         https://bugs.webkit.org/show_bug.cgi?id=175527
1488
1489         Reviewed by Žan Doberšek.
1490
1491         The problem is that when setImageData() is called from IconDatabase::readFromDatabase() the shared buffer might
1492         be nullptr, because getImageDataForIconURLFromSQLDatabase() returns nullptr if the icon data is not in the database.
1493
1494         * UIProcess/API/glib/IconDatabase.cpp:
1495         (WebKit::IconDatabase::IconRecord::setImageData): Return early if passed in buffer is nullptr.
1496
1497 2017-08-14  Zan Dobersek  <zdobersek@igalia.com>
1498
1499         [ThreadedCompositor] Improve composition and update state handling
1500         https://bugs.webkit.org/show_bug.cgi?id=172448
1501
1502         Reviewed by Carlos Garcia Campos.
1503
1504         In the ThreadedCompositor and related classes, we now track composition
1505         and scene update states separately. This enables properly piping in the
1506         DisplayRefreshMonitor object, leveraging it for both display refresh
1507         notifications and signalling to the client that the scene update is
1508         completed.
1509
1510         In CompositingRunLoop, two separate states are now used, one for
1511         compositing and the other for scene update. Access to both should be done
1512         while the related Lock object is held. The pending update state is also
1513         tracked in order to schedule any required updates as soon as the current
1514         state update is completed.
1515
1516         In ThreadedCompositor, the information about client notification and
1517         update completion coordination is now also kept under a Lock object,
1518         moving away from atomics. DisplayRefreshMonitor can now utilize just
1519         two methods in order to either schedule an update or report that update
1520         as finished.
1521
1522         * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
1523         (WebKit::CompositingRunLoop::CompositingRunLoop):
1524         (WebKit::CompositingRunLoop::scheduleUpdate):
1525         (WebKit::CompositingRunLoop::stopUpdates):
1526         (WebKit::CompositingRunLoop::compositionCompleted):
1527         (WebKit::CompositingRunLoop::updateCompleted):
1528         (WebKit::CompositingRunLoop::updateTimerFired):
1529         (WebKit::CompositingRunLoop::isActive): Deleted.
1530         * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:
1531         (WebKit::CompositingRunLoop::stateLock):
1532         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
1533         (WebKit::m_displayRefreshMonitor):
1534         (WebKit::ThreadedCompositor::sceneUpdateFinished):
1535         (WebKit::ThreadedCompositor::updateSceneState):
1536         (WebKit::ThreadedCompositor::requestDisplayRefreshMonitorUpdate):
1537         (WebKit::ThreadedCompositor::handleDisplayRefreshMonitorUpdate):
1538         (WebKit::ThreadedCompositor::renderNextFrameIfNeeded): Deleted.
1539         (WebKit::ThreadedCompositor::completeCoordinatedUpdateIfNeeded): Deleted.
1540         (WebKit::ThreadedCompositor::coordinateUpdateCompletionWithClient): Deleted.
1541         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
1542         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.cpp:
1543         (WebKit::ThreadedDisplayRefreshMonitor::requestRefreshCallback):
1544         (WebKit::ThreadedDisplayRefreshMonitor::displayRefreshCallback):
1545
1546 2017-08-13  Manuel Rego Casasnovas  <rego@igalia.com>
1547
1548         Composition underline color is always black
1549         https://bugs.webkit.org/show_bug.cgi?id=174675
1550
1551         Reviewed by Ryosuke Niwa.
1552
1553         This patch uses the current color of the text instead of black
1554         for the composition underline marker.
1555         This makes it visible in the case we have a black/dark background.
1556
1557         * UIProcess/Cocoa/WebViewImpl.mm:
1558         (WebKit::extractUnderlines): If NSUnderlineColorAttributeName
1559         is not present use text color for composition underline.
1560         (WebKit::WebViewImpl::setMarkedText): Use text color
1561         for composition underline in the plain text case.
1562         * UIProcess/gtk/InputMethodFilter.cpp:
1563         (WebKit::InputMethodFilter::handleKeyboardEventWithCompositionResults):
1564         Use text color for composition underline.
1565         (WebKit::InputMethodFilter::updatePreedit): Ditto.
1566         * WebProcess/WebPage/WebPage.cpp:
1567         (WebKit::WebPage::setCompositionForTesting): Ditto.
1568
1569 2017-08-13  Adrian Perez de Castro  <aperez@igalia.com>
1570
1571         [WPE] Implement WebCore::standardUserAgent()
1572         https://bugs.webkit.org/show_bug.cgi?id=175507
1573
1574         Reviewed by Carlos Alberto Lopez Perez.
1575
1576         Implement missing User-Agent handling for the WPE port by sharing the code with the GTK+ port.
1577
1578         * UIProcess/API/glib/WebKitSettings.cpp: Remove preprocessor conditionals for the WPE port.
1579         (webkit_settings_set_user_agent):
1580         (webkit_settings_set_user_agent_with_application_details):
1581         * UIProcess/wpe/WebPageProxyWPE.cpp:
1582         (WebKit::WebPageProxy::standardUserAgent): Remove hardcoded value and make use of WebCore::standardUserAgent().
1583
1584 2017-08-11  Ryosuke Niwa  <rniwa@webkit.org>
1585
1586         Replace DATA_TRANSFER_ITEMS by a runtime flag and add a stub implementation
1587         https://bugs.webkit.org/show_bug.cgi?id=175474
1588         <rdar://problem/33844628>
1589
1590         Reviewed by Wenson Hsieh.
1591
1592         Replaced the build flag by a runtime flag and disabled the feature by default.
1593
1594         * Configurations/FeatureDefines.xcconfig:
1595         * Shared/WebPreferencesDefinitions.h:
1596         * UIProcess/API/C/WKPreferences.cpp:
1597         (WKPreferencesSetDataTransferItemsEnabled): Added to be used by WebKitTestRunner.
1598         (WKPreferencesGetDataTransferItemsEnabled): Ditto.
1599         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1600         * WebProcess/WebPage/WebPage.cpp:
1601         (WebKit::WebPage::updatePreferences):
1602
1603 2017-08-10  Sam Weinig  <sam@webkit.org>
1604
1605         WTF::Function does not allow for reference / non-default constructible return types
1606         https://bugs.webkit.org/show_bug.cgi?id=175244
1607
1608         Reviewed by Chris Dumez.
1609
1610         * UIProcess/WebResourceLoadStatisticsStore.h:
1611         Update the default value for the updateCookiePartitioningForDomainsHandler parameter to be an 
1612         empty lambda, rather than default initialization, which leads to a null WTF::Function. This allows
1613         us to remove support for calling null WTF::Function. No change in behavior.
1614
1615 2017-08-11  Adrian Perez de Castro  <aperez@igalia.com>
1616
1617         [WPE] Build failure with Clang 4.0.1: no matching conversion for functional-style cast from 'pointer' (aka 'unsigned short *') to 'WTF::String'
1618         https://bugs.webkit.org/show_bug.cgi?id=175477
1619
1620         Reviewed by Žan Doberšek.
1621
1622         * Shared/wpe/WebEventFactory.cpp:
1623         (WebKit::singleCharacterStringForKeyEvent): Cast to UChar* to make
1624         compiler choose the correct WTF::String constructor.
1625
1626 2017-08-11  Carlos Garcia Campos  <cgarcia@igalia.com>
1627
1628         [Soup] Cannot access HTTPS sites using a HTTP proxy that requires authentication
1629         https://bugs.webkit.org/show_bug.cgi?id=175378
1630
1631         Reviewed by Sergio Villar Senin.
1632
1633         In case of HTTPS resource with a proxy, libsoup uses a tunnel internally, that uses its own SoupMessage during
1634         the proxy authentication. We were ignoring authentication requests for other messages.
1635
1636         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
1637         (WebKit::NetworkDataTaskSoup::authenticateCallback): Only return early if the message does't match and it's not
1638         HTTPS resource over a proxy.
1639         (WebKit::NetworkDataTaskSoup::authenticate): Use the soup message from the authentication challenge.
1640         (WebKit::NetworkDataTaskSoup::continueAuthenticate): Ditto.
1641
1642 2017-08-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1643
1644         [Soup] Do not spawn the network process to setup cookie persistent storage
1645         https://bugs.webkit.org/show_bug.cgi?id=175424
1646
1647         Reviewed by Sergio Villar Senin.
1648
1649         The persistent storage configuration is saved and passed to network process as creation parameters, so we don't
1650         need to spawn the network process to configure it, when it's created eventually it will use the configuration.
1651
1652         * UIProcess/soup/WebCookieManagerProxySoup.cpp:
1653         (WebKit::WebCookieManagerProxy::setCookiePersistentStorage): Use sendToNetworkingProcess() instead of
1654         endToNetworkingProcessRelaunchingIfNecessary().
1655
1656 2017-08-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1657
1658         [GTK][WPE] Assertion failure in TimerBase inside WebCore::IconRecord::setImageData
1659         https://bugs.webkit.org/show_bug.cgi?id=173866
1660         <rdar://problem/33122050>
1661
1662         Reviewed by Michael Catanzaro.
1663
1664         IconDatabase creates and destroys IconRecord objects in both database and main thread. If the IconRecord has a
1665         valid icon, its Image could be created in one thread and destroyed in another, something that is not expected to
1666         happen, because Image has a Timer member. Since we have all the data and we are decoding it right after creating
1667         the Image, we don't really need to keep the Image object around, we could simply take a reference of the encoded
1668         data and the decoded native image to be returned by synchronousIconForPageURL().
1669
1670         * UIProcess/API/glib/IconDatabase.cpp:
1671         (WebKit::IconDatabase::IconRecord::image): Return NativeImagePtr now.
1672         (WebKit::IconDatabase::IconRecord::setImageData): Create a BitmapImage to decode it and keep a reference to the
1673         encoded data and decoded native image.
1674         (WebKit::IconDatabase::IconRecord::snapshot const): Use m_imageData to get the encoded data.
1675         (WebKit::IconDatabase::synchronousIconForPageURL): Return the native image and whether the icon is known or not.
1676         (WebKit::IconDatabase::IconRecord::loadImageFromResource): Deleted.
1677         * UIProcess/API/glib/IconDatabase.h:
1678         * UIProcess/API/glib/WebKitFaviconDatabase.cpp:
1679         (getIconSurfaceSynchronously): Use new API.
1680
1681 2017-08-10  Dan Bernstein  <mitz@apple.com>
1682
1683         Restored svn:ignore values that went missing when the project got renamed.
1684
1685         * WebKit.xcodeproj: Added property svn:ignore.
1686
1687 2017-08-10  Brady Eidson  <beidson@apple.com>
1688
1689         Rename the source files for the WTF persistent coders.
1690         https://bugs.webkit.org/show_bug.cgi?id=175441
1691
1692         Reviewed by Tim Horton.
1693
1694         * NetworkProcess/cache/NetworkCacheCoders.h:
1695         * NetworkProcess/cache/NetworkCacheKey.cpp:
1696         * NetworkProcess/cache/NetworkCacheKey.h:
1697         * UIProcess/API/APIContentRuleListStore.cpp:
1698
1699 2017-08-10  John Wilander  <wilander@apple.com>
1700
1701         Resource Load Statistics: Increase grandfathering time to 7 days
1702         https://bugs.webkit.org/show_bug.cgi?id=175414
1703         <rdar://problem/33818046>
1704
1705         Reviewed by Brent Fulgham.
1706
1707         * UIProcess/WebResourceLoadStatisticsStore.h:
1708
1709 2017-08-10  John Wilander  <wilander@apple.com>
1710
1711         Resource Load Statistics: Add significant figures to telemetry calls
1712         https://bugs.webkit.org/show_bug.cgi?id=175442
1713         <rdar://problem/33834834>
1714
1715         Reviewed by Brent Fulgham.
1716
1717         With this change, logged values are allowed to have 3 significant figures
1718         as opposed to today's 0 which is wrong.
1719
1720         * UIProcess/WebResourceLoadStatisticsTelemetry.cpp:
1721         (WebKit::submitTopList):
1722         (WebKit::WebResourceLoadStatisticsTelemetry::calculateAndSubmit):
1723
1724 2017-08-10  Mark Lam  <mark.lam@apple.com>
1725
1726         Apply the UNLIKELY macro to some unlikely things.
1727         https://bugs.webkit.org/show_bug.cgi?id=175440
1728         <rdar://problem/33834767>
1729
1730         Reviewed by Yusuke Suzuki.
1731
1732         * WebProcess/WebPage/WebPage.cpp:
1733         (WebKit::WebPage::getBytecodeProfile):
1734
1735 2017-08-10  Chris Dumez  <cdumez@apple.com>
1736
1737         Turn on support for Beacon API by default in STP
1738         https://bugs.webkit.org/show_bug.cgi?id=175445
1739         <rdar://problem/33836379>
1740
1741         Reviewed by Youenn Fablet.
1742
1743         * Shared/WebPreferencesDefinitions.h:
1744
1745 2017-08-10  Ross Kirsling  <ross.kirsling@sony.com>
1746
1747         Fix iOS simulator build after change "[WTF] Move TextStream into WTF"
1748         https://bugs.webkit.org/show_bug.cgi?id=175211
1749
1750         Reviewed by Myles C. Maxfield.
1751
1752         * UIProcess/API/Cocoa/WKWebView.mm:
1753         (-[WKWebView _scrollByContentOffset:]):
1754         (-[WKWebView _navigationGestureDidBegin]):
1755
1756 2017-08-10  Chris Dumez  <cdumez@apple.com>
1757
1758         [Beacon] Do connect-src CSP check on redirects as well
1759         https://bugs.webkit.org/show_bug.cgi?id=175410
1760         <rdar://problem/33815470>
1761
1762         Reviewed by Youenn Fablet.
1763
1764         Pass CSP Response headers to the NetworkProcess via NetworkResourceLoadParameters
1765         when doing a PingLoad. This allows PingLoad to do CSP checks (in particular
1766         connect-src ones) in case the ping load gets redirected. Those checks need to be
1767         done on the NetworkProcess side at this point because there is no guarantee the
1768         WebContent process is still around.
1769
1770         To do the CSP checks, PingLoad lazily reconstructs a ContentSecurityPolicy object
1771         from the CSP response headers.
1772
1773         * NetworkProcess/NetworkResourceLoadParameters.cpp:
1774         (WebKit::NetworkResourceLoadParameters::encode const):
1775         (WebKit::NetworkResourceLoadParameters::decode):
1776         * NetworkProcess/NetworkResourceLoadParameters.h:
1777         * NetworkProcess/PingLoad.cpp:
1778         (WebKit::PingLoad::willPerformHTTPRedirection):
1779         (WebKit::PingLoad::contentSecurityPolicy):
1780         * NetworkProcess/PingLoad.h:
1781         * WebProcess/Network/WebLoaderStrategy.cpp:
1782         (WebKit::WebLoaderStrategy::createPingHandle):
1783         * WebProcess/Network/WebLoaderStrategy.h:
1784
1785 2017-08-10  Brian Burg  <bburg@apple.com>
1786
1787         WKPreferences should conform to NSCopying
1788         https://bugs.webkit.org/show_bug.cgi?id=175303
1789         <rdar://problem/33764939>
1790
1791         Reviewed by Dan Bernstein.
1792
1793         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1794         Add conformance in the private header, as there is not consensus that this
1795         needs to be API.
1796
1797         * UIProcess/API/Cocoa/WKPreferences.mm:
1798         (-[WKPreferences copyWithZone:]):
1799         Copy the wrapped WebPreferences instance and return its wrapper.
1800
1801 2017-08-10  Michael Catanzaro  <mcatanzaro@igalia.com>
1802
1803         REGRESSION(r220515) [GTK][CMake] Build with ENABLE_GEOLOCATION fails on Debian Jessie
1804         https://bugs.webkit.org/show_bug.cgi?id=175426
1805
1806         Reviewed by Carlos Alberto Lopez Perez.
1807
1808         * PlatformGTK.cmake:
1809
1810 2017-08-10  Brady Eidson  <beidson@apple.com>
1811
1812         Add ServiceWorkerJob.
1813         https://bugs.webkit.org/show_bug.cgi?id=175241
1814
1815         Reviewed by Tim Horton.
1816
1817         * CMakeLists.txt:
1818         * WebKit.xcodeproj/project.pbxproj:
1819
1820         * WebProcess/Storage/WebServiceWorkerProvider.cpp: Added.
1821         (WebKit::WebServiceWorkerProvider::singleton):
1822         (WebKit::WebServiceWorkerProvider::WebServiceWorkerProvider):
1823         (WebKit::WebServiceWorkerProvider::scheduleJob):
1824         * WebProcess/Storage/WebServiceWorkerProvider.h: Added.
1825
1826         * WebProcess/WebProcess.cpp:
1827         (WebKit::WebProcess::initializeWebProcess):
1828
1829 2017-08-10  Tim Horton  <timothy_horton@apple.com>
1830
1831         Remove some unused lambda captures so that WebKit builds with -Wunused-lambda-capture
1832         https://bugs.webkit.org/show_bug.cgi?id=175436
1833         <rdar://problem/33667497>
1834
1835         Reviewed by Simon Fraser.
1836
1837         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
1838         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
1839         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1840         (WebKit::WebsiteDataStore::topPrivatelyControlledDomainsWithWebsiteData):
1841
1842 2017-08-10  Michael Catanzaro  <mcatanzaro@igalia.com>
1843
1844         Remove ENABLE_GAMEPAD_DEPRECATED
1845         https://bugs.webkit.org/show_bug.cgi?id=175361
1846
1847         Reviewed by Carlos Garcia Campos.
1848
1849         * Configurations/FeatureDefines.xcconfig:
1850
1851 2017-08-10  Zan Dobersek  <zdobersek@igalia.com>
1852
1853         [GTK] Don't use --whole-archive linking flags for the WebKit2 target libraries
1854         https://bugs.webkit.org/show_bug.cgi?id=175416
1855
1856         Reviewed by Carlos Garcia Campos.
1857
1858         * PlatformGTK.cmake: Drop the ADD_WHOLE_ARCHIVE_TO_LIBRARIES instruction
1859         for the WebKit2 target. This unnecessarily bundles complete archive
1860         files both into the main .so library as well as single executables that
1861         are linked against the WebKit2 target.
1862
1863 2017-08-09  Chris Dumez  <cdumez@apple.com>
1864
1865         Disable Beacon API on WK1 DRT and WK2 when not using NETWORK_SESSION
1866         https://bugs.webkit.org/show_bug.cgi?id=175401
1867
1868         Reviewed by Brady Eidson.
1869
1870         * UIProcess/API/C/WKPreferences.cpp:
1871         (WKPreferencesSetBeaconAPIEnabled):
1872         (WKPreferencesGetBeaconAPIEnabled):
1873         * WebProcess/WebPage/WebPage.cpp:
1874         (WebKit::WebPage::updatePreferences):
1875         * config.h:
1876
1877 2017-08-09  Yoshiaki Jitsukawa  <Yoshiaki.Jitsukawa@sony.com>
1878
1879         [PAL] Move spi/cocoa and spi/cg directories into PAL
1880         https://bugs.webkit.org/show_bug.cgi?id=175175
1881
1882         Reviewed by Myles C. Maxfield.
1883
1884         * NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm:
1885         * NetworkProcess/Downloads/mac/DownloadMac.mm:
1886         * Platform/cocoa/SharedMemoryCocoa.cpp:
1887         * Platform/mac/LayerHostingContext.mm:
1888         * Shared/Cocoa/DataDetectionResult.mm:
1889         * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
1890         * Shared/cf/CookieStorageUtilsCF.mm:
1891         * Shared/ios/InteractionInformationAtPosition.mm:
1892         * Shared/mac/HangDetectionDisablerMac.mm:
1893         * Shared/mac/RemoteLayerBackingStore.mm:
1894         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
1895         * UIProcess/API/Cocoa/WKWebView.mm:
1896         * UIProcess/API/mac/WKView.mm:
1897         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h:
1898         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
1899         * UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
1900         * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
1901         * UIProcess/Cocoa/WebViewImpl.h:
1902         * UIProcess/Cocoa/WebViewImpl.mm:
1903         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1904         * UIProcess/ios/ViewGestureControllerIOS.mm:
1905         * UIProcess/ios/WKContentView.mm:
1906         * UIProcess/ios/WKContentViewInteraction.mm:
1907         * UIProcess/ios/WKPDFPageNumberIndicator.mm:
1908         * UIProcess/ios/WKScrollView.mm:
1909         * UIProcess/mac/RemoteLayerTreeHost.mm:
1910         * UIProcess/mac/ServicesController.mm:
1911         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
1912         * UIProcess/mac/ViewGestureControllerMac.mm:
1913         * UIProcess/mac/ViewSnapshotStore.mm:
1914         * UIProcess/mac/WKViewLayoutStrategy.mm:
1915         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1916         * WebProcess/WebPage/WebPage.cpp:
1917         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
1918         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1919         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1920         * WebProcess/cocoa/WebProcessCocoa.mm:
1921
1922 2017-08-09  John Wilander  <wilander@apple.com>
1923
1924         Resource Load Statistics: Increase grandfathering time to 3 days
1925         https://bugs.webkit.org/show_bug.cgi?id=175414
1926         <rdar://problem/33818046>
1927
1928         Reviewed by Brent Fulgham.
1929
1930         * UIProcess/WebResourceLoadStatisticsStore.h:
1931
1932 2017-08-09  Jeremy Jones  <jeremyj@apple.com>
1933
1934         Invalidate PlaybackSessionManager in same fashion as VideoFullscreenManager.
1935         https://bugs.webkit.org/show_bug.cgi?id=175399
1936         rdar://problem/33663344
1937
1938         Reviewed by Eric Carlson.
1939
1940         Invalidate PlaybackSessionManager when WebPage is destructed.
1941
1942         * WebProcess/WebPage/WebPage.cpp:
1943         (WebKit::WebPage::~WebPage):
1944         * WebProcess/cocoa/PlaybackSessionManager.h:
1945         * WebProcess/cocoa/PlaybackSessionManager.mm:
1946         (WebKit::PlaybackSessionManager::~PlaybackSessionManager):
1947         (WebKit::PlaybackSessionManager::invalidate):
1948
1949 2017-08-09  Don Olmstead  <don.olmstead@sony.com>
1950
1951         [WTF] Move TextStream into WTF
1952         https://bugs.webkit.org/show_bug.cgi?id=175211
1953
1954         Reviewed by Myles C. Maxfield.
1955
1956         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
1957         * Shared/VisibleContentRectUpdateInfo.cpp:
1958         * Shared/VisibleContentRectUpdateInfo.h:
1959         * Shared/mac/RemoteLayerTreeTransaction.mm:
1960         * UIProcess/API/Cocoa/WKWebView.mm:
1961         * UIProcess/ios/WKContentView.mm:
1962         * UIProcess/ios/WKContentViewInteraction.h:
1963         * UIProcess/ios/WKContentViewInteraction.mm:
1964         (WebKit::operator<<):
1965         * UIProcess/ios/WebPageProxyIOS.mm:
1966         * WebProcess/WebPage/ios/WebPageIOS.mm:
1967         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
1968         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
1969
1970 2017-08-09  Andy Estes  <aestes@apple.com>
1971
1972         Part 3 of: Rename DatabaseProcess to StorageProcess
1973         https://bugs.webkit.org/show_bug.cgi?id=175034
1974
1975         Reviewed by Brady Eidson.
1976
1977         We tried renaming com.apple.WebKit.Databases to com.apple.WebKit.Storage in r219986, but
1978         this prevented trunk WebKit from running on iOS 11 devices. This is because launchd keeps a
1979         codesigned cache of XPC services, and refuses to launch services that aren't in the cache.
1980
1981         It's not possibe for us to rebuild the cache with the new service name (only Apple's
1982         production build system can do this), and disabling the cache or opting WebKit's XPC
1983         services out of the cache might have a negative impact on our performance testing.
1984
1985         For now we'll retain the name "com.apple.WebKit.Databases" on iOS 11 devices to work around
1986         this issue. If we find a way to allow the new service to run without impacting performance,
1987         we can revert this change.
1988
1989         We will rename the service to "com.apple.WebKit.Storage" on macOS and iOS Simulator, and in
1990         a follow-up patch we'll use the new service name on post-iOS 11 device builds.
1991
1992         * Configurations/BaseTarget.xcconfig: Defined WK_STORAGE_SERVICE_PRODUCT_NAME to be
1993         com.apple.WebKit.Databases by default, and overrode it to com.apple.WebKit.Storage on macOS
1994         and iOS Simulator.
1995         * Configurations/StorageService.xcconfig: Changed PRODUCT_NAME to $(WK_STORAGE_SERVICE_PRODUCT_NAME).
1996         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1997         (WebKit::serviceName): Changed to return "com.apple.WebKit.Storage" on macOS and
1998         iOS Simulator platforms.
1999         * WebKit.xcodeproj/project.pbxproj: Updated the "Copy XPC services for engineering builds"
2000         build phase to use WK_STORAGE_SERVICE_PRODUCT_NAME.
2001
2002 2017-08-09  Commit Queue  <commit-queue@webkit.org>
2003
2004         Unreviewed, rolling out r220466, r220477, and r220487.
2005         https://bugs.webkit.org/show_bug.cgi?id=175411
2006
2007         This change broke existing API tests and follow up fixes did
2008         not resolve all the issues. (Requested by ryanhaddad on
2009         #webkit).
2010
2011         Reverted changesets:
2012
2013         https://bugs.webkit.org/show_bug.cgi?id=175244
2014         http://trac.webkit.org/changeset/220466
2015
2016         "WTF::Function does not allow for reference / non-default
2017         constructible return types"
2018         https://bugs.webkit.org/show_bug.cgi?id=175244
2019         http://trac.webkit.org/changeset/220477
2020
2021         https://bugs.webkit.org/show_bug.cgi?id=175244
2022         http://trac.webkit.org/changeset/220487
2023
2024 2017-08-09  Chris Dumez  <cdumez@apple.com>
2025
2026         [Beacon][NetworkSession] Support CORS-preflighting on redirects
2027         https://bugs.webkit.org/show_bug.cgi?id=175386
2028         <rdar://problem/33801370>
2029
2030         Reviewed by Youenn Fablet.
2031
2032         Add support to Beacon for doing CORS-preflighting upon redirect to a different
2033         domain.
2034
2035         * NetworkProcess/NetworkCORSPreflightChecker.h:
2036         * NetworkProcess/PingLoad.cpp:
2037         (WebKit::PingLoad::PingLoad):
2038         (WebKit::PingLoad::~PingLoad):
2039         (WebKit::PingLoad::loadRequest):
2040         (WebKit::PingLoad::securityOrigin const):
2041         (WebKit::PingLoad::willPerformHTTPRedirection):
2042         (WebKit::PingLoad::didReceiveResponseNetworkSession):
2043         (WebKit::PingLoad::needsCORSPreflight const):
2044         (WebKit::PingLoad::doCORSPreflight):
2045         * NetworkProcess/PingLoad.h:
2046
2047 2017-08-09  Jeremy Jones  <jeremyj@apple.com>
2048
2049         Use MPAVRoutingController instead of deprecated versions.
2050         https://bugs.webkit.org/show_bug.cgi?id=175063
2051         rdar://problem/33301230
2052
2053         Reviewed by Tim Horton.
2054
2055         Remove dependence on deprecated classes MPAVRoutingSheet and MPAudioVideoRoutingPopoverController.
2056
2057         * UIProcess/ios/forms/WKAirPlayRoutePicker.h:
2058         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
2059         (-[WKAirPlayRoutePicker dealloc]):
2060         (-[WKAirPlayRoutePicker show:fromRect:]):
2061         (-[WKAirPlayRoutePicker popoverControllerDidDismissPopover:]): Deleted.
2062         (-[WKAirPlayRoutePicker _presentAirPlayPopoverAnimated:fromRect:]): Deleted.
2063         (-[WKAirPlayRoutePicker _windowWillRotate:]): Deleted.
2064         (-[WKAirPlayRoutePicker _windowDidRotate:]): Deleted.
2065         (-[WKAirPlayRoutePicker _dismissAirPlayRoutePickerIPad]): Deleted.
2066         (-[WKAirPlayRoutePicker showAirPlayPickerIPad:fromRect:]): Deleted.
2067         (-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]): Deleted.
2068
2069 2017-08-09  Sam Weinig  <sam@webkit.org>
2070
2071         WTF::Function does not allow for reference / non-default constructible return types
2072         https://bugs.webkit.org/show_bug.cgi?id=175244
2073
2074         Reviewed by Chris Dumez.
2075
2076         * UIProcess/WebResourceLoadStatisticsStore.h:
2077         Update the default value for the updateCookiePartitioningForDomainsHandler parameter to be an 
2078         empty lambda, rather than default initialization, which leads to a null WTF::Function. This allows
2079         us to remove support for calling null WTF::Function. No change in behavior.
2080
2081 2017-08-09  Wenson Hsieh  <wenson_hsieh@apple.com>
2082
2083         [iOS DnD] ENABLE_DRAG_SUPPORT should be turned off for iOS 10 and enabled by default
2084         https://bugs.webkit.org/show_bug.cgi?id=175392
2085         <rdar://problem/33783207>
2086
2087         Reviewed by Tim Horton and Megan Gardner.
2088
2089         Tweak FeatureDefines to enable drag and drop by default, and disable only on unsupported platforms (i.e. iOS 10).
2090
2091         * Configurations/FeatureDefines.xcconfig:
2092
2093 2017-08-09  Brady Eidson  <beidson@apple.com>
2094
2095         ServiceWorker experimental feature should not be on by default (definitely not ready).
2096         https://bugs.webkit.org/show_bug.cgi?id=175389
2097
2098         Rubberstamped by Andy Estes.
2099
2100         * Shared/WebPreferencesDefinitions.h: false, not DEFAULT_EXPERIMENTAL_FEATURES_ENABLED
2101
2102 2017-08-09  Ryan Haddad  <ryanhaddad@apple.com>
2103
2104         Unreviewed, rolling out r220457.
2105
2106         This change introduced API test failures.
2107
2108         Reverted changeset:
2109
2110         "WTF::Function does not allow for reference / non-default
2111         constructible return types"
2112         https://bugs.webkit.org/show_bug.cgi?id=175244
2113         http://trac.webkit.org/changeset/220457
2114
2115 2017-08-09  Daniel Bates  <dabates@apple.com>
2116
2117         REGRESSION (r219013): OAuth flows are broken when redirecting back to application after authentication
2118         https://bugs.webkit.org/show_bug.cgi?id=175247
2119         <rdar://problem/33679804>
2120
2121         Reviewed by Brady Eidson.
2122
2123         Add SPI WKNavigationAction._isRedirect to query whether the navigation was in response to receiving
2124         a redirect response. The majority of the WebKit change is plumbing this knowledge through to connect
2125         it with the SPI.
2126
2127         * Shared/NavigationActionData.cpp:
2128         (WebKit::NavigationActionData::encode const):
2129         (WebKit::NavigationActionData::decode):
2130         Encode and decode the boolean NavigationActionData::isRedirect.
2131         * Shared/NavigationActionData.h:
2132         * UIProcess/API/APINavigationAction.h:
2133         * UIProcess/API/Cocoa/WKNavigationAction.mm:
2134         (-[WKNavigationAction _isRedirect]): Added.
2135         * UIProcess/API/Cocoa/WKNavigationActionPrivate.h:
2136         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2137         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Set NavigationActionData::isRedirect
2138         depending on whether the navigation is in response to receiving a redirect response.
2139         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2140
2141 2017-08-09  Sam Weinig  <sam@webkit.org>
2142
2143         WTF::Function does not allow for reference / non-default constructible return types
2144         https://bugs.webkit.org/show_bug.cgi?id=175244
2145
2146         Reviewed by Chris Dumez.
2147
2148         * UIProcess/WebResourceLoadStatisticsStore.h:
2149         Update the default value for the updateCookiePartitioningForDomainsHandler parameter to be an 
2150         empty lambda, rather than default initialization, which leads to a null WTF::Function. This allows
2151         us to remove support for calling null WTF::Function. No change in behavior.
2152
2153 2017-08-08  Wenson Hsieh  <wenson_hsieh@apple.com>
2154
2155         Unreviewed, rolling out r220393.
2156
2157         This patch regresses the performance of WebPage::editorState.
2158
2159         Reverted changeset:
2160
2161         "[iOS WK2] WKWebView schedules nonstop layout after pressing
2162         cmb+b,i,u inside a contenteditable div"
2163         https://bugs.webkit.org/show_bug.cgi?id=175116
2164         http://trac.webkit.org/changeset/220393
2165
2166 2017-08-08  Chris Dumez  <cdumez@apple.com>
2167
2168         [Beacon] Add support for CORS-preflighting for WK2 / NETWORK_SESSION
2169         https://bugs.webkit.org/show_bug.cgi?id=175264
2170         <rdar://problem/33547793>
2171
2172         Reviewed by Youenn Fablet.
2173
2174         Implement CORS-preflighting for beacons with a payload that has a non
2175         safelisted MIME type, as per:
2176         - https://w3c.github.io/beacon/#privacy
2177         - https://www.w3.org/TR/beacon/#sec-processing-model
2178
2179         CORS-preflighting is completely handled on Network Process side because
2180         a beacon request can outlive its page and therefore its WebContent
2181         process. This requires us to pass a little more information to the
2182         Network process, in particular the source origin and the corsMode.
2183
2184         The current implementation does not currently deal with CORS preflights
2185         needed upon a redirect. This will be added in a follow-up.
2186
2187         * CMakeLists.txt:
2188         * NetworkProcess/NetworkCORSPreflightChecker.cpp: Added.
2189         (WebKit::NetworkCORSPreflightChecker::NetworkCORSPreflightChecker):
2190         (WebKit::NetworkCORSPreflightChecker::~NetworkCORSPreflightChecker):
2191         (WebKit::NetworkCORSPreflightChecker::startPreflight):
2192         (WebKit::NetworkCORSPreflightChecker::willPerformHTTPRedirection):
2193         (WebKit::NetworkCORSPreflightChecker::didReceiveChallenge):
2194         (WebKit::NetworkCORSPreflightChecker::didReceiveResponseNetworkSession):
2195         (WebKit::NetworkCORSPreflightChecker::didReceiveData):
2196         (WebKit::NetworkCORSPreflightChecker::didCompleteWithError):
2197         (WebKit::NetworkCORSPreflightChecker::didSendData):
2198         (WebKit::NetworkCORSPreflightChecker::wasBlocked):
2199         (WebKit::NetworkCORSPreflightChecker::cannotShowURL):
2200         * NetworkProcess/NetworkCORSPreflightChecker.h: Added.
2201         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2202         (WebKit::NetworkConnectionToWebProcess::loadPing):
2203         * NetworkProcess/NetworkConnectionToWebProcess.h:
2204         * NetworkProcess/NetworkResourceLoadParameters.cpp:
2205         (WebKit::NetworkResourceLoadParameters::encode const):
2206         (WebKit::NetworkResourceLoadParameters::decode):
2207         * NetworkProcess/NetworkResourceLoadParameters.h:
2208         * NetworkProcess/PingLoad.cpp: Added.
2209         (WebKit::PingLoad::PingLoad):
2210         (WebKit::PingLoad::~PingLoad):
2211         (WebKit::PingLoad::startNetworkLoad):
2212         (WebKit::PingLoad::willPerformHTTPRedirection):
2213         (WebKit::PingLoad::didReceiveChallenge):
2214         (WebKit::PingLoad::didReceiveResponseNetworkSession):
2215         (WebKit::PingLoad::didReceiveData):
2216         (WebKit::PingLoad::didCompleteWithError):
2217         (WebKit::PingLoad::didSendData):
2218         (WebKit::PingLoad::wasBlocked):
2219         (WebKit::PingLoad::cannotShowURL):
2220         (WebKit::PingLoad::timeoutTimerFired):
2221         (WebKit::PingLoad::needsCORSPreflight const):
2222         (WebKit::PingLoad::doCORSPreflight):
2223         * NetworkProcess/PingLoad.h:
2224         * WebKit.xcodeproj/project.pbxproj:
2225         * WebProcess/Network/WebLoaderStrategy.cpp:
2226         (WebKit::WebLoaderStrategy::createPingHandle):
2227         * WebProcess/Network/WebLoaderStrategy.h:
2228
2229 2017-08-08  Megan Gardner  <megan_gardner@apple.com>
2230
2231         Remove old and unused pointIsInAssistedNode definition
2232         https://bugs.webkit.org/show_bug.cgi?id=175335
2233
2234         Stage removal here to allow removal from UIKit.
2235         Replaced by textInteractionGesture:shouldBeginAtPoint:
2236
2237         Reviewed by Tim Horton.
2238
2239         * Platform/spi/ios/UIKitSPI.h:
2240         * UIProcess/ios/WKContentViewInteraction.mm:
2241         (-[WKContentView pointIsInAssistedNode:]): Deleted.
2242
2243 2017-08-08  Michael Catanzaro  <mcatanzaro@igalia.com>
2244
2245         Unreviewed, fix Ubuntu LTS build
2246         https://bugs.webkit.org/show_bug.cgi?id=174490
2247
2248         * UIProcess/glib/RemoteInspectorClient.cpp:
2249         (WebKit::RemoteInspectorClient::RemoteInspectorClient):
2250
2251 2017-08-08  Wenson Hsieh  <wenson_hsieh@apple.com>
2252
2253         Unreviewed, fix the Mac debug build after r220418.
2254
2255         * UIProcess/Cocoa/WebViewImpl.mm:
2256         (WebKit::WebViewImpl::prepareForMoveToWindow):
2257
2258 2017-08-08  Wenson Hsieh  <wenson_hsieh@apple.com>
2259
2260         [Mac WK2] WebViewImpl should hold a weak pointer to its WKWebView or WKView
2261         https://bugs.webkit.org/show_bug.cgi?id=175302
2262         <rdar://problem/33762116>
2263
2264         Reviewed by Tim Horton.
2265
2266         Refactor WebViewImpl's m_view from a raw pointer to a WeakObjCPtr to ensure that it is automatically cleared out
2267         when the WKWebView or WKView are destroyed, and also changes several places where we implicitly block capture
2268         the WebViewImpl to only capture a WeakPtr to the WebViewImpl. Most of the changes here are boilerplate
2269         adjustments for how m_view is now a weak pointer.
2270
2271         Test: WKWebViewMacEditingTests.DoNotCrashWhenInterpretingKeyEventWhileDeallocatingView.
2272
2273         * Shared/mac/WeakObjCPtr.h:
2274         (WebKit::WeakObjCPtr::operator ValueType * const):
2275         * UIProcess/Cocoa/WebViewImpl.h:
2276         * UIProcess/Cocoa/WebViewImpl.mm:
2277         (WebKit::WebViewImpl::updateTouchBar):
2278         (WebKit::WebViewImpl::updateMediaTouchBar):
2279         (WebKit::WebViewImpl::WebViewImpl):
2280         (WebKit::WebViewImpl::~WebViewImpl):
2281         (WebKit::WebViewImpl::window):
2282         (WebKit::WebViewImpl::resignFirstResponder):
2283         (WebKit::WebViewImpl::isFocused const):
2284         (WebKit::WebViewImpl::renewGState):
2285         (WebKit::WebViewImpl::setFrameAndScrollBy):
2286         (WebKit::WebViewImpl::updateWindowAndViewFrames):
2287         (WebKit::WebViewImpl::updateLayer):
2288         (WebKit::WebViewImpl::printOperationWithPrintInfo):
2289         (WebKit::WebViewImpl::updateContentInsetsIfAutomatic):
2290         (WebKit::WebViewImpl::setLayoutMode):
2291         (WebKit::WebViewImpl::intrinsicDeviceScaleFactor const):
2292         (WebKit::WebViewImpl::windowDidBecomeKey):
2293         (WebKit::WebViewImpl::windowDidResignKey):
2294         (WebKit::WebViewImpl::windowDidChangeScreen):
2295         (WebKit::WebViewImpl::mightBeginDragWhileInactive):
2296         (WebKit::WebViewImpl::acceptsFirstMouse):
2297         (WebKit::WebViewImpl::shouldDelayWindowOrderingForEvent):
2298         (WebKit::WebViewImpl::windowResizeMouseLocationIsInVisibleScrollerThumb):
2299         (WebKit::WebViewImpl::viewWillMoveToWindow):
2300         (WebKit::WebViewImpl::viewDidMoveToWindow):
2301         (WebKit::WebViewImpl::viewDidChangeBackingProperties):
2302         (WebKit::WebViewImpl::hitTest):
2303         (WebKit::WebViewImpl::postFakeMouseMovedEventForFlagsChangedEvent):
2304         (WebKit::WebViewImpl::colorSpace):
2305         (WebKit::WebViewImpl::prepareForMoveToWindow):
2306         (WebKit::WebViewImpl::notifyInputContextAboutDiscardedComposition):
2307         (WebKit::WebViewImpl::pressureChangeWithEvent):
2308         (WebKit::WebViewImpl::fullScreenWindowController):
2309         (WebKit::WebViewImpl::executeSavedCommandBySelector):
2310         (WebKit::WebViewImpl::validRequestorForSendAndReturnTypes):
2311         (WebKit::WebViewImpl::handleRequestedCandidates):
2312         (WebKit::WebViewImpl::preferencesDidChange):
2313         (WebKit::WebViewImpl::setTextIndicator):
2314         (WebKit::WebViewImpl::dismissContentRelativeChildWindowsFromViewOnly):
2315         (WebKit::WebViewImpl::accessibilityRegisterUIProcessTokens):
2316         (WebKit::WebViewImpl::sendToolTipMouseExited):
2317         (WebKit::WebViewImpl::sendToolTipMouseEntered):
2318         (WebKit::WebViewImpl::toolTipChanged):
2319         (WebKit::WebViewImpl::setAcceleratedCompositingRootLayer):
2320         (WebKit::WebViewImpl::updateThumbnailViewLayer):
2321         (WebKit::WebViewImpl::setInspectorAttachmentView):
2322         (WebKit::WebViewImpl::inspectorAttachmentView):
2323         (WebKit::WebViewImpl::draggedImage):
2324         (WebKit::WebViewImpl::draggingEntered):
2325         (WebKit::WebViewImpl::draggingUpdated):
2326         (WebKit::WebViewImpl::draggingExited):
2327         (WebKit::WebViewImpl::performDragOperation):
2328         (WebKit::WebViewImpl::hitTestForDragTypes):
2329         (WebKit::WebViewImpl::startWindowDrag):
2330         (WebKit::WebViewImpl::dragImageForView):
2331         (WebKit::WebViewImpl::setPromisedDataForImage):
2332         (WebKit::WebViewImpl::setPromisedDataForAttachment):
2333         (WebKit::WebViewImpl::takeViewSnapshot):
2334         (WebKit::WebViewImpl::scrollWheel):
2335         (WebKit::WebViewImpl::magnifyWithEvent):
2336         (WebKit::WebViewImpl::rotateWithEvent):
2337         (WebKit::WebViewImpl::doneWithKeyEvent):
2338         (WebKit::WebViewImpl::interpretKeyEvent):
2339         (WebKit::WebViewImpl::firstRectForCharacterRange):
2340         (WebKit::WebViewImpl::characterIndexForPoint):
2341         (WebKit::WebViewImpl::performKeyEquivalent):
2342         (WebKit::WebViewImpl::keyUp):
2343         (WebKit::WebViewImpl::keyDown):
2344         (WebKit::WebViewImpl::mouseMoved):
2345         (WebKit::WebViewImpl::windowIsFrontWindowUnderMouse):
2346         (WebKit::WebViewImpl::userInterfaceLayoutDirection):
2347
2348 2017-08-08  Filip Pizlo  <fpizlo@apple.com>
2349
2350         Baseline JIT should do caging
2351         https://bugs.webkit.org/show_bug.cgi?id=175037
2352
2353         Reviewed by Mark Lam.
2354         
2355         Use a better API to disable disabling the primitive gigacage.
2356
2357         * WebProcess/WebProcess.cpp:
2358         (WebKit::m_webSQLiteDatabaseTracker):
2359         (WebKit::primitiveGigacageDisabled): Deleted.
2360
2361 2017-08-08  John Wilander  <wilander@apple.com>
2362
2363         Resource Load Statistics: Clear web processes' state on history removal
2364         https://bugs.webkit.org/show_bug.cgi?id=175271
2365         <rdar://problem/33756560>
2366
2367         Reviewed by Chris Dumez.
2368
2369         https://bugs.webkit.org/show_bug.cgi?id=175090 introduced state
2370         in the web process and that state needs to be cleared when the
2371         UI process' statistics are cleared as part of history removal.
2372
2373         * UIProcess/WebProcessPool.cpp:
2374         (WebKit::WebProcessPool::clearResourceLoadStatistics):
2375         * UIProcess/WebProcessPool.h:
2376         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2377         (WebKit::WebsiteDataStore::removeData):
2378         (WebKit::WebsiteDataStore::clearResourceLoadStatisticsInWebProcesses):
2379         * UIProcess/WebsiteData/WebsiteDataStore.h:
2380         * WebProcess/WebProcess.cpp:
2381         (WebKit::WebProcess::clearResourceLoadStatistics):
2382         * WebProcess/WebProcess.h:
2383         * WebProcess/WebProcess.messages.in:
2384
2385 2017-08-08  Adrian Perez de Castro  <aperez@igalia.com>
2386
2387         [WPE] Implement WebsiteDataStore::defaultApplicationCacheDirectory() and friends
2388         https://bugs.webkit.org/show_bug.cgi?id=175322
2389
2390         Reviewed by Carlos Garcia Campos.
2391
2392         This makes WPE use the same implementation as the GTK+ port, with a preprocessor switch to choose the name of
2393         the base directory inside the user XDG cache directory.
2394
2395         * PlatformGTK.cmake: Add APIWebsiteDataStoreGLib.cpp to the build sources and remove APIWebsiteDataStoreGtk.cpp.
2396         * PlatformWPE.cmake: Add APIWebsiteDataStoreGLib.cpp to the built sources.
2397         * UIProcess/API/APIWebsiteDataStore.cpp: Remove now dead code.
2398         * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp: Renamed from Source/WebKit/UIProcess/API/gtk/APIWebsiteDataStoreGtk.cpp.
2399         (API::WebsiteDataStore::defaultApplicationCacheDirectory):
2400         (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
2401         (API::WebsiteDataStore::defaultLocalStorageDirectory):
2402         (API::WebsiteDataStore::defaultMediaKeysStorageDirectory):
2403         (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory):
2404         (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory):
2405
2406 2017-08-08  Ryan Haddad  <ryanhaddad@apple.com>
2407
2408         Unreviewed, rolling out r220368.
2409
2410         This change caused WK1 tests to exit early with crashes.
2411
2412         Reverted changeset:
2413
2414         "Baseline JIT should do caging"
2415         https://bugs.webkit.org/show_bug.cgi?id=175037
2416         http://trac.webkit.org/changeset/220368
2417
2418 2017-08-08  Michael Catanzaro  <mcatanzaro@igalia.com>
2419
2420         [CMake] Properly test if compiler supports compiler flags
2421         https://bugs.webkit.org/show_bug.cgi?id=174490
2422
2423         Reviewed by Konstantin Tokarev.
2424
2425         * CMakeLists.txt:
2426         * PlatformGTK.cmake:
2427
2428 2017-08-07  Carlos Garcia Campos  <cgarcia@igalia.com>
2429
2430         Web Automation: setUserInputForCurrentJavaScriptPrompt should fail if current dialog is not a prompt
2431         https://bugs.webkit.org/show_bug.cgi?id=175261
2432
2433         Reviewed by Brian Burg.
2434
2435         According to the spec, send alert text command should fail if the current dialog is not a prompt. This patch
2436         adds JavaScriptDialogType enum to API::AutomationSessionClient and a new virtual method to ask the client about
2437         the type of the current dialog. WebAutomationSession::setUserInputForCurrentJavaScriptPrompt() uses the new
2438         client method to check the type of the current dialog and fail in case it's not a prompt. Cocoa needs an
2439         implementation, for now it always returns Prompt as the type to keep compatibility.
2440
2441         18.4 Send Alert Text.
2442         https://w3c.github.io/webdriver/webdriver-spec.html#send-alert-text
2443
2444         This fixes selenium test testSettingTheValueOfAnAlertThrows.
2445
2446         * UIProcess/API/APIAutomationSessionClient.h:
2447         (API::AutomationSessionClient::typeOfCurrentJavaScriptDialogOnPage):
2448         * UIProcess/API/glib/WebKitAutomationSession.cpp:
2449         * UIProcess/API/glib/WebKitWebView.cpp:
2450         (webkitWebViewGetCurrentScriptDialogType):
2451         * UIProcess/API/glib/WebKitWebViewPrivate.h:
2452         * UIProcess/Automation/Automation.json:
2453         * UIProcess/Automation/WebAutomationSession.cpp:
2454         (WebKit::WebAutomationSession::setUserInputForCurrentJavaScriptPrompt):
2455         * UIProcess/Cocoa/AutomationSessionClient.h:
2456         * UIProcess/Cocoa/AutomationSessionClient.mm:
2457         (WebKit::AutomationSessionClient::typeOfCurrentJavaScriptDialogOnPage):
2458
2459 2017-08-08  Wenson Hsieh  <wenson_hsieh@apple.com>
2460
2461         [iOS WK2] WKWebView schedules nonstop layout after pressing cmb+b,i,u inside a contenteditable div
2462         https://bugs.webkit.org/show_bug.cgi?id=175116
2463         <rdar://problem/28279301>
2464
2465         Reviewed by Darin Adler and Ryosuke Niwa.
2466
2467         Refactors WebPage::editorState to only use the StyleProperties derived from EditingStyle, instead of inserting
2468         and removing a temporary node to figure out the style. Also adds hooks to notify the UI delegate of EditorState
2469         changes.
2470
2471         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
2472         * UIProcess/API/Cocoa/WKWebView.mm:
2473         (nsTextAlignment):
2474         (dictionaryRepresentationForEditorState):
2475         (-[WKWebView _didChangeEditorState]):
2476
2477         Alerts the private UI delegate of UI-side EditorState updates.
2478
2479         (-[WKWebView _web_editorStateDidChange]):
2480         (-[WKWebView _executeEditCommand:argument:completion:]):
2481         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2482         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2483         * UIProcess/API/mac/WKView.mm:
2484         (-[WKView _web_editorStateDidChange]):
2485         * UIProcess/Cocoa/WebViewImpl.h:
2486         * UIProcess/Cocoa/WebViewImpl.mm:
2487         (WebKit::WebViewImpl::selectionDidChange):
2488         * UIProcess/WebPageProxy.cpp:
2489         (WebKit::WebPageProxy::executeEditCommand):
2490
2491         Change executeEditCommand(name, callback) to executeEditCommand(name, argument, callback) and lift out of iOS
2492         platform code and into WebPage.cpp.
2493
2494         * UIProcess/WebPageProxy.h:
2495         * UIProcess/ios/WKContentViewInteraction.mm:
2496         (-[WKContentView executeEditCommandWithCallback:]):
2497         (-[WKContentView _selectionChanged]):
2498         * UIProcess/ios/WebPageProxyIOS.mm:
2499         (WebKit::WebPageProxy::executeEditCommand): Deleted.
2500
2501         Move the iOS-specific implementation of executeEditCommand that invokes a callback when the web process responds
2502         out of WebPageProxyIOS, and into cross-platform WebPageProxy code. Additionally, add a parameter for the edit
2503         command's argument.
2504
2505         * WebProcess/WebPage/WebPage.cpp:
2506         (WebKit::WebPage::editorState const):
2507
2508         Use EditingStyle::styleAtSelectionStart instead of Editor::styleForSelectionStart when computing an EditorState.
2509         Tweak bold, italic and underline to use EditingStyle TriStates.
2510
2511         (WebKit::shouldEnsureEditorStateUpdateAfterExecutingCommand):
2512         (WebKit::WebPage::executeEditCommandWithCallback):
2513         * WebProcess/WebPage/WebPage.h:
2514         * WebProcess/WebPage/WebPage.messages.in:
2515         * WebProcess/WebPage/ios/WebPageIOS.mm:
2516         (WebKit::WebPage::executeEditCommandWithCallback): Deleted.
2517
2518 2017-08-08  Zan Dobersek  <zdobersek@igalia.com>
2519
2520         [TexMap] Don't expose GraphicsContext3D object
2521         https://bugs.webkit.org/show_bug.cgi?id=175310
2522
2523         Reviewed by Carlos Garcia Campos.
2524
2525         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
2526         (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
2527         Stop using GraphicsContext3D directly and instead use the
2528         TextureMapper::clearColor() method to achieve the same result.
2529
2530 2017-08-07  Carlos Garcia Campos  <cgarcia@igalia.com>
2531
2532         [GTK] Implement JavaScript dialog methods of API::AutomationSessionClient
2533         https://bugs.webkit.org/show_bug.cgi?id=175259
2534
2535         Reviewed by Michael Catanzaro.
2536
2537         Move the default implementation of WebKitScriptDialog from WebKitWebView platform specific files to their own
2538         files. Implement all JavaScript dialog methods of API::AutomationSessionClient in WebKitAutomationSession. For
2539         now it only works when the user doesn't override WebKitWebView::script-dialog signal and default implementation
2540         is used.
2541
2542         * PlatformGTK.cmake: Add new files to compilation.
2543         * PlatformWPE.cmake: Ditto.
2544         * UIProcess/API/glib/WebKitAutomationSession.cpp:
2545         (webkitAutomationSessionCreate): Pass the WebKitWebContext to the constructor and keep a pointer to it in session.
2546         * UIProcess/API/glib/WebKitAutomationSessionPrivate.h:
2547         * UIProcess/API/glib/WebKitScriptDialogPrivate.h:
2548         * UIProcess/API/glib/WebKitWebContext.cpp:
2549         * UIProcess/API/glib/WebKitWebView.cpp:
2550         (webkitWebViewRunJavaScriptAlert): Set the currently script dialog for the scope of the function.
2551         (webkitWebViewRunJavaScriptConfirm): Ditto.
2552         (webkitWebViewRunJavaScriptPrompt): Ditto.
2553         (webkitWebViewRunJavaScriptBeforeUnloadConfirm): Ditto.
2554         (webkitWebViewIsShowingScriptDialog): Ask current dialog if there's one.
2555         (webkitWebViewGetCurrentScriptDialogMessage): Ditto.
2556         (webkitWebViewSetCurrentScriptDialogUserInput): Ditto.
2557         (webkitWebViewAcceptCurrentScriptDialog): Ditto.
2558         (webkitWebViewDismissCurrentScriptDialog): Ditto.
2559         * UIProcess/API/glib/WebKitWebViewPrivate.h:
2560         * UIProcess/API/gtk/WebKitScriptDialogGtk.cpp: Added.
2561         (webkitWebViewCreateJavaScriptDialog): Moved from WebKitWebViewGtk.cpp.
2562         (webkitScriptDialogRun): Run the dialog, this code is moved from WebKitWebViewGtk.cpp.
2563         (webkitScriptDialogIsRunning): Return true if the script dialog has a native dialog running.
2564         (webkitScriptDialogAccept): Send Ok or Close response to the native dialog depending on the dialog type.
2565         (webkitScriptDialogDismiss): Send Close response to the native dialog.
2566         (webkitScriptDialogSetUserInput): Set the given text on the prompt dialog entry.
2567         * UIProcess/API/gtk/WebKitWebViewGtk.cpp:
2568         (webkitWebViewScriptDialog): Simply call webkitScriptDialogRun() now.
2569         * UIProcess/API/wpe/WebKitScriptDialogWPE.cpp: Copied from Source/WebKit/UIProcess/API/glib/WebKitAutomationSessionPrivate.h.
2570         (webkitScriptDialogRun):
2571         (webkitScriptDialogIsRunning):
2572         (webkitScriptDialogAccept):
2573         (webkitScriptDialogDismiss):
2574         (webkitScriptDialogSetUserInput):
2575
2576 2017-08-07  Devin Rousso  <drousso@apple.com>
2577
2578         Web Inspector: Preview Canvas path when viewing a recording
2579         https://bugs.webkit.org/show_bug.cgi?id=174967
2580
2581         Reviewed by Brian Burg.
2582
2583         * Shared/WebPreferencesDefinitions.h:
2584         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2585         * UIProcess/API/C/WKPreferences.cpp:
2586         (WKPreferencesSetInspectorAdditionsEnabled):
2587         (WKPreferencesGetInspectorAdditionsEnabled):
2588         * WebProcess/WebPage/WebPage.cpp:
2589         (WebKit::WebPage::updatePreferences):
2590         Add plumbing for new InspectorAdditions runtime flag.
2591
2592         * WebProcess/WebPage/WebInspectorUI.cpp:
2593         (WebKit::WebInspectorUI::WebInspectorUI):
2594         Enable InspectorAdditions by default in the WebInspector page.
2595
2596 2017-08-07  Filip Pizlo  <fpizlo@apple.com>
2597
2598         Baseline JIT should do caging
2599         https://bugs.webkit.org/show_bug.cgi?id=175037
2600
2601         Reviewed by Mark Lam.
2602         
2603         Use a better API to disable disabling the primitive gigacage.
2604
2605         * WebProcess/WebProcess.cpp:
2606         (WebKit::m_webSQLiteDatabaseTracker):
2607         (WebKit::primitiveGigacageDisabled): Deleted.
2608
2609 2017-08-06  Filip Pizlo  <fpizlo@apple.com>
2610
2611         Primitive auxiliaries and JSValue auxiliaries should have separate gigacages
2612         https://bugs.webkit.org/show_bug.cgi?id=174919
2613
2614         Reviewed by Keith Miller.
2615         
2616         The disable callback is all about the primitive gigacage.
2617
2618         * WebProcess/WebProcess.cpp:
2619         (WebKit::primitiveGigacageDisabled):
2620         (WebKit::m_webSQLiteDatabaseTracker):
2621         (WebKit::gigacageDisabled): Deleted.
2622
2623 2017-08-07  Brian Burg  <bburg@apple.com>
2624
2625         Remove CANVAS_PATH compilation guard
2626         https://bugs.webkit.org/show_bug.cgi?id=175207
2627
2628         Reviewed by Sam Weinig.
2629
2630         * Configurations/FeatureDefines.xcconfig:
2631
2632 2017-08-07  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2633
2634         [WPE][CMake] Only pass pkg-config CFLAGS from (E)GL when not using libepoxy.
2635         https://bugs.webkit.org/show_bug.cgi?id=175125
2636
2637         Reviewed by Michael Catanzaro.
2638
2639         * CMakeLists.txt: When using libepoxy avoid passing the CFLAGS from (E)GL,
2640         and instead pass the libepoxy ones.
2641
2642 2017-08-07  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2643
2644         [GTK][WPE] CFLAGS from pkg-config for (E)GL are not passed to WebKit
2645         https://bugs.webkit.org/show_bug.cgi?id=175125
2646
2647         Unreviewed follow-up fix after r220326.
2648
2649         * CMakeLists.txt: Move the block appending to WebKit2_LIBRARIES
2650         below where the list itself is created.
2651
2652 2017-08-05  Carlos Garcia Campos  <cgarcia@igalia.com>
2653
2654         [GTK][WPE] Add API to provide browser information required by automation
2655         https://bugs.webkit.org/show_bug.cgi?id=175130
2656
2657         Reviewed by Michael Catanzaro.
2658
2659         When a new automation session is started, the web driver receives some required capabilities from the client,
2660         like browser name and version. The session should be rejected if those required capabilities don't match with
2661         the actual browser that is launched. We don't know that information in WebKit, so we need to add API so that
2662         users can provide it when a new session request is made. This patch adds boxed object WebKitApplicationInfo that
2663         can be used to set the application name and version. This object can be set to a WebKitAutomationSession when
2664         WebKitWebContext::automation-started signal is emitted.
2665
2666         * PlatformGTK.cmake:
2667         * PlatformWPE.cmake:
2668         * UIProcess/API/glib/WebKitApplicationInfo.cpp: Added.
2669         (webkit_application_info_new):
2670         (webkit_application_info_ref):
2671         (webkit_application_info_unref):
2672         (webkit_application_info_set_name):
2673         (webkit_application_info_get_name):
2674         (webkit_application_info_set_version):
2675         (webkit_application_info_get_version):
2676         * UIProcess/API/glib/WebKitAutomationSession.cpp:
2677         (webkitAutomationSessionDispose):
2678         (webkit_automation_session_class_init):
2679         (webkitAutomationSessionGetBrowserName):
2680         (webkitAutomationSessionGetBrowserVersion):
2681         (webkit_automation_session_set_application_info):
2682         (webkit_automation_session_get_application_info):
2683         * UIProcess/API/glib/WebKitAutomationSessionPrivate.h:
2684         * UIProcess/API/glib/WebKitWebContext.cpp:
2685         * UIProcess/API/gtk/WebKitApplicationInfo.h: Added.
2686         * UIProcess/API/gtk/WebKitAutomationSession.h:
2687         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
2688         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
2689         * UIProcess/API/gtk/webkit2.h:
2690         * UIProcess/API/wpe/WebKitApplicationInfo.h: Added.
2691         * UIProcess/API/wpe/WebKitAutomationSession.h:
2692         * UIProcess/API/wpe/webkit.h:
2693
2694 2017-08-06  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2695
2696         [GTK][WPE] CFLAGS from pkg-config for (E)GL are not passed to WebKit
2697         https://bugs.webkit.org/show_bug.cgi?id=175125
2698
2699         Reviewed by Michael Catanzaro.
2700
2701         Some platforms define cflags on the (E)GL pkg-config files that we
2702         need to pass to the build system when including the (E)GL headers.
2703         And we are already doing this when building WebCore (after r184954).
2704
2705         But now we need to do this also on WebKit (former WebKit2) because
2706         we include (E)GL headers (and make use of them) on the UIProcess.
2707
2708         * CMakeLists.txt:
2709
2710 2017-08-05  Carlos Garcia Campos  <cgarcia@igalia.com>
2711
2712         WebDriver: Implement page load strategy
2713         https://bugs.webkit.org/show_bug.cgi?id=175183
2714
2715         Reviewed by Brian Burg.
2716
2717         Split pending navigation maps into normal and eager, and use one or the other depending on the received page
2718         load strategy. We need to keep different maps for every page load strategy because every command could use a
2719         different strategy.
2720
2721         * UIProcess/Automation/WebAutomationSession.cpp:
2722         (WebKit::WebAutomationSession::waitForNavigationToComplete): Extract page load strategy from parameter and pass
2723         it to waitForNavigationToCompleteOnPage() and waitForNavigationToCompleteOnFrame().
2724         (WebKit::WebAutomationSession::waitForNavigationToCompleteOnPage): Return early if page load strategy is
2725         none. Otherwise at the pening callback to the normal or eager map depeding on the page load straegy.
2726         (WebKit::WebAutomationSession::waitForNavigationToCompleteOnFrame): Ditto.
2727         (WebKit::respondToPendingNavigationCallbacksWithTimeout): Helper to send pening navigation callback in case of
2728         timeout failure.
2729         (WebKit::WebAutomationSession::loadTimerFired): Call finishPendingNavigationsWithTimeoutFailure() with all the maps.
2730         (WebKit::WebAutomationSession::navigateBrowsingContext): Extract page load strategy from parameter and pass it
2731         to waitForNavigationToCompleteOnPage().
2732         (WebKit::WebAutomationSession::goBackInBrowsingContext): Ditto.
2733         (WebKit::WebAutomationSession::goForwardInBrowsingContext): Ditto.
2734         (WebKit::WebAutomationSession::reloadBrowsingContext): Ditto.
2735         (WebKit::WebAutomationSession::navigationOccurredForFrame): Use the normal maps.
2736         (WebKit::WebAutomationSession::documentLoadedForFrame): Stop timeout timer and dispatch eager pending navigations.
2737         * UIProcess/Automation/WebAutomationSession.h:
2738         * UIProcess/WebPageProxy.cpp:
2739         (WebKit::WebPageProxy::didFinishDocumentLoadForFrame): Notify the automation session.
2740
2741 2017-08-05  Carlos Garcia Campos  <cgarcia@igalia.com>
2742
2743         WebDriver: use in-view center point for clicks instead of bounding box center point
2744         https://bugs.webkit.org/show_bug.cgi?id=174863
2745
2746         Reviewed by Simon Fraser.
2747
2748         Change computeElementLayout to also return the in-view center point and whether it's obscured by another
2749         element.
2750
2751         * UIProcess/Automation/Automation.json: Add optional inViewCenterPoint to the result and isObscured.
2752         * UIProcess/Automation/WebAutomationSession.cpp:
2753         (WebKit::WebAutomationSession::didComputeElementLayout): Handle inViewCenterPoint and isObscured.
2754         * UIProcess/Automation/WebAutomationSession.h:
2755         * UIProcess/Automation/WebAutomationSession.messages.in:
2756         * WebProcess/Automation/WebAutomationSessionProxy.cpp:
2757         (WebKit::elementInViewClientCenterPoint): Get the client in-view center point and whether it's obscured
2758         according to the spec.
2759         (WebKit::WebAutomationSessionProxy::computeElementLayout): Pass inViewCenterPoint and isObscured to
2760         DidComputeElementLayout message.
2761
2762 2017-08-05  Brian Burg  <bburg@apple.com>
2763
2764         Web Automation: files selected for upload should be matched against 'accept' attribute values case-insensitively
2765         https://bugs.webkit.org/show_bug.cgi?id=175191
2766         <rdar://problem/33725790>
2767
2768         Reviewed by Carlos Garcia Campos.
2769
2770         Values of the "accept" attribute are to be compared in a case-insensitive manner, per
2771         https://html.spec.whatwg.org/multipage/input.html#file-upload-state-(type=file)
2772
2773         Except for converting MIME types and extensions to lowercase, most of these changes
2774         were lost in a rebase prior to landing the patch.
2775
2776         * UIProcess/Automation/WebAutomationSession.cpp:
2777         (WebKit::fileCanBeAcceptedForUpload): Fix some issues:
2778         - Handle a file ending in a period.
2779         - Handle MIME type inference failing.
2780         - Convert extensions and MIMEs to lower case, per specification.
2781
2782         (WebKit::WebAutomationSession::handleRunOpenPanel):
2783         - Strip the leading period from file extensions.
2784         - These range converters crash unless the API::Array is retained by a local variable.
2785
2786 2017-08-04  Youenn Fablet  <youenn@apple.com>
2787
2788         [Cache API] Add Cache and CacheStorage IDL definitions
2789         https://bugs.webkit.org/show_bug.cgi?id=175201
2790
2791         Reviewed by Brady Eidson.
2792
2793         * Shared/WebPreferencesDefinitions.h:
2794         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2795         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2796         * WebProcess/WebPage/WebPage.cpp:
2797         (WebKit::WebPage::updatePreferences):
2798
2799 2017-08-04  Brian Burg  <bburg@apple.com>
2800
2801         Expose WKPreferences SPI for toggling mock capture devices prompt
2802         https://bugs.webkit.org/show_bug.cgi?id=175227
2803         <rdar://problem/33734528>
2804
2805         Reviewed by Youenn Fablet.
2806
2807         * UIProcess/API/Cocoa/WKPreferences.mm:
2808         (-[WKPreferences _mockCaptureDevicesPromptEnabled]):
2809         (-[WKPreferences _setMockCaptureDevicesPromptEnabled:]):
2810         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2811
2812 2017-08-04  Brian Burg  <bburg@apple.com>
2813
2814         Fix typo in WKPreferences _iceCandidateFiltertingEnabled property
2815         https://bugs.webkit.org/show_bug.cgi?id=175224
2816
2817         Reviewed by Tim Horton.
2818
2819         * UIProcess/API/Cocoa/WKPreferences.mm:
2820         (-[WKPreferences _iceCandidateFilteringEnabled]):
2821         (-[WKPreferences _iceCandidateFiltertingEnabled]): Deleted.
2822         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2823
2824 2017-08-04  Chris Dumez  <cdumez@apple.com>
2825
2826         [Beacon] Update sendBeacon to use the CachedResourceLoader
2827         https://bugs.webkit.org/show_bug.cgi?id=175192
2828         <rdar://problem/33725923>
2829
2830         Reviewed by Youenn Fablet.
2831
2832         Deal with new Beacon CachedResource type.
2833
2834         * WebProcess/Network/WebLoaderStrategy.cpp:
2835         (WebKit::maximumBufferingTime):
2836
2837 2017-08-04  John Wilander  <wilander@apple.com>
2838
2839         Resource Load Statistics: Report user interaction immediately, but only when needed
2840         https://bugs.webkit.org/show_bug.cgi?id=175090
2841         <rdar://problem/33685546>
2842
2843         Reviewed by Chris Dumez.
2844
2845         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
2846         (WKBundleClearResourceLoadStatistics):
2847             Test infrastructure. Ends up calling
2848             WebCore::ResourceLoadObserver::clearState().
2849         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
2850
2851 2017-08-04  Matt Lewis  <jlewis3@apple.com>
2852
2853         Unreviewed, rolling out r220288.
2854
2855         This broke multiple builds.
2856
2857         Reverted changeset:
2858
2859         "Use MPAVRoutingController instead of deprecated versions."
2860         https://bugs.webkit.org/show_bug.cgi?id=175063
2861         http://trac.webkit.org/changeset/220288
2862
2863 2017-08-04  Jeremy Jones  <jeremyj@apple.com>
2864
2865         Use MPAVRoutingController instead of deprecated versions.
2866         https://bugs.webkit.org/show_bug.cgi?id=175063
2867         rdar://problem/33301230
2868
2869         Reviewed by Tim Horton.
2870
2871         Remove dependence on deprecated classes MPAVRoutingSheet and MPAudioVideoRoutingPopoverController.
2872
2873         * UIProcess/ios/forms/WKAirPlayRoutePicker.h:
2874         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
2875         (-[WKAirPlayRoutePicker dealloc]):
2876         (-[WKAirPlayRoutePicker show:fromRect:]):
2877         (-[WKAirPlayRoutePicker popoverControllerDidDismissPopover:]): Deleted.
2878         (-[WKAirPlayRoutePicker _presentAirPlayPopoverAnimated:fromRect:]): Deleted.
2879         (-[WKAirPlayRoutePicker _windowWillRotate:]): Deleted.
2880         (-[WKAirPlayRoutePicker _windowDidRotate:]): Deleted.
2881         (-[WKAirPlayRoutePicker _dismissAirPlayRoutePickerIPad]): Deleted.
2882         (-[WKAirPlayRoutePicker showAirPlayPickerIPad:fromRect:]): Deleted.
2883         (-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]): Deleted.
2884
2885 2017-08-04  Tim Horton  <timothy_horton@apple.com>
2886
2887         viewport-fit changes during animated resize can cause layout size to get stuck
2888         https://bugs.webkit.org/show_bug.cgi?id=175169
2889         <rdar://problem/33684697>
2890
2891         Reviewed by Simon Fraser.
2892
2893         If we get a commit that changes viewport-fit state while an animated
2894         resize is underway, and that change causes the client to push a new
2895         minimumLayoutSizeOverride, the new size will be lost forever, and we
2896         will get stuck laying out at the wrong size.
2897
2898         This is because we unconditionally apply avoidsUnsafeArea for every commit,
2899         while most other changes that come in from a commit are ignored if we're
2900         inside animated resize. To fix, also ignore avoidsUnsafeArea changes during
2901         animated resize, by moving the code that keeps track of it into WKWebView
2902         like all of the rest, and read it out of the commit in didCommitLayerTree
2903         *after* the animated-resize early-return.
2904
2905         Also, fix the associated layout tests by adding a missing assignment
2906         in _computedContentInset, which was broken in r220138.
2907
2908         * UIProcess/API/Cocoa/WKWebView.mm:
2909         (-[WKWebView _initializeWithConfiguration:]):
2910         (-[WKWebView _setHasCustomContentView:loadedMIMEType:]):
2911         (-[WKWebView _processDidExit]):
2912         (-[WKWebView _didCommitLayerTree:]):
2913         (-[WKWebView _setAvoidsUnsafeArea:]):
2914         (-[WKWebView _safeAreaShouldAffectObscuredInsets]):
2915         (-[WKWebView _didChangeAvoidsUnsafeArea:]): Deleted.
2916         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2917         * UIProcess/PageClient.h:
2918         * UIProcess/WebPageProxy.cpp:
2919         (WebKit::WebPageProxy::resetState):
2920         (WebKit::WebPageProxy::setAvoidsUnsafeArea): Deleted.
2921         * UIProcess/WebPageProxy.h:
2922         (WebKit::WebPageProxy::avoidsUnsafeArea const): Deleted.
2923         * UIProcess/ios/PageClientImplIOS.h:
2924         * UIProcess/ios/PageClientImplIOS.mm:
2925         (WebKit::PageClientImpl::didChangeAvoidsUnsafeArea): Deleted.
2926         * UIProcess/ios/WebPageProxyIOS.mm:
2927         (WebKit::WebPageProxy::didCommitLayerTree):
2928
2929 2017-08-04  Matt Lewis  <jlewis3@apple.com>
2930
2931         Unreviewed, rolling out r220271.
2932
2933         Rolling out due to Layout Test failing on iOS Simulator.
2934
2935         Reverted changeset:
2936
2937         "Remove STREAMS_API compilation guard"
2938         https://bugs.webkit.org/show_bug.cgi?id=175165
2939         http://trac.webkit.org/changeset/220271
2940
2941 2017-08-03  Sam Weinig  <sam@webkit.org>
2942
2943         [Cleanup] Remove ScriptGlobalObject
2944         https://bugs.webkit.org/show_bug.cgi?id=175173
2945
2946         Reviewed by Darin Adler.
2947
2948         * WebProcess/WebPage/RemoteWebInspectorUI.cpp:
2949         (WebKit::RemoteWebInspectorUI::windowObjectCleared):
2950         * WebProcess/WebPage/WebInspectorUI.cpp:
2951         (WebKit::WebInspectorUI::windowObjectCleared):
2952         Remove call to ScriptGlobalObject::set and use addSelfToGlobalObjectInWorld instead.
2953
2954 2017-08-03  Brian Burg  <bburg@apple.com>
2955
2956         [Cocoa] Web Automation: copy JavaScript atoms to WebKit.framework private headers
2957         https://bugs.webkit.org/show_bug.cgi?id=175088
2958         <rdar://problem/33685818>
2959
2960         Reviewed by Joseph Pecoraro.
2961
2962         * WebKit.xcodeproj/project.pbxproj:
2963         - Add a Copy Files phase to WebKit.framework.
2964         - Copy atoms to the atoms/ directory in WebKit.framework/PrivateHeaders/.
2965
2966 2017-08-04  Ryan Haddad  <ryanhaddad@apple.com>
2967
2968         Unreviewed, rolling out r220268.
2969
2970         This change caused assertion failures on macOS and iOS Debug
2971         WK2.
2972
2973         Reverted changeset:
2974
2975         "Resource Load Statistics: Report user interaction
2976         immediately, but only when needed"
2977         https://bugs.webkit.org/show_bug.cgi?id=175090
2978         http://trac.webkit.org/changeset/220268
2979
2980 2017-08-04  Andreas Kling  <akling@apple.com>
2981
2982         NetworkLoad should always invoke its redirect completion handler
2983         https://bugs.webkit.org/show_bug.cgi?id=175179
2984         <rdar://problem/33464999>
2985
2986         Reviewed by Chris Dumez.
2987
2988         Make sure the redirect completion handler is always invoked,
2989         just like we already did for the response completion handler.
2990
2991         * NetworkProcess/NetworkLoad.cpp:
2992         (WebKit::NetworkLoad::~NetworkLoad):
2993
2994 2017-08-04  Youenn Fablet  <youenn@apple.com>
2995
2996         Remove STREAMS_API compilation guard
2997         https://bugs.webkit.org/show_bug.cgi?id=175165
2998
2999         Reviewed by Darin Adler.
3000
3001         * Configurations/FeatureDefines.xcconfig:
3002         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3003         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
3004
3005 2017-08-04  Brady Eidson  <beidson@apple.com>
3006
3007         Enable ServiceWorkers at runtime for WebKitTestRunner.
3008         https://bugs.webkit.org/show_bug.cgi?id=175174
3009
3010         Reviewed by Youenn Fablet.
3011
3012         * UIProcess/WebPreferences.cpp:
3013         (WebKit::WebPreferences::enableAllExperimentalFeatures):
3014
3015 2017-08-04  John Wilander  <wilander@apple.com>
3016
3017         Resource Load Statistics: Report user interaction immediately, but only when needed
3018         https://bugs.webkit.org/show_bug.cgi?id=175090
3019         <rdar://problem/33685546>
3020
3021         Reviewed by Chris Dumez.
3022
3023         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
3024         (WKBundleClearResourceLoadStatistics):
3025             Test infrastructure. Ends up calling
3026             WebCore::ResourceLoadObserver::clearState().
3027         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
3028
3029 2017-08-04  Antti Koivisto  <antti@apple.com>
3030
3031         Network cache should be usable as non-singleton
3032         https://bugs.webkit.org/show_bug.cgi?id=175139
3033
3034         Reviewed by Sam Weinig.
3035
3036         We might want to use it as a non-singleton in the future (for example as a backend for the cache API).
3037
3038         This patch makes NetworkCache::Cache and NetworkCache::Storage refcounted objects and takes
3039         care to ref them properly during asynchronous operations.
3040
3041         The patch doesn't actually create any non-shared instances, it just adds the capability.
3042
3043         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3044         (WebKit::NetworkConnectionToWebProcess::storeDerivedDataToCache):
3045         * NetworkProcess/NetworkProcess.cpp:
3046         (WebKit::fetchDiskCacheEntries):
3047         (WebKit::clearDiskCacheEntries):
3048         (WebKit::NetworkProcess::setCacheModel):
3049         * NetworkProcess/NetworkProcess.h:
3050         (WebKit::NetworkProcess::cache):
3051
3052             Move the shared cache instance to the network process singleton.
3053
3054         * NetworkProcess/NetworkResourceLoader.cpp:
3055         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
3056
3057             Include shared cache as a reffed member for non-ephemeral instances.
3058
3059         (WebKit::NetworkResourceLoader::canUseCache const):
3060         (WebKit::NetworkResourceLoader::retrieveCacheEntry):
3061         (WebKit::NetworkResourceLoader::abort):
3062         (WebKit::NetworkResourceLoader::didReceiveResponse):
3063         (WebKit::NetworkResourceLoader::willSendRedirectedRequest):
3064         (WebKit::NetworkResourceLoader::tryStoreAsCacheEntry):
3065         (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
3066         * NetworkProcess/NetworkResourceLoader.h:
3067         * NetworkProcess/cache/NetworkCache.cpp:
3068         (WebKit::NetworkCache::Cache::open):
3069
3070             Open now returns null if it fails.
3071             Add RegisterNotify option to set up notify trigger for the shared instance.
3072
3073         (WebKit::NetworkCache::Cache::Cache):
3074         (WebKit::NetworkCache::Cache::~Cache):
3075
3076             Add destructor.
3077
3078         (WebKit::NetworkCache::dumpFileChanged):
3079         (WebKit::NetworkCache::Cache::setCapacity):
3080         (WebKit::NetworkCache::Cache::retrieve):
3081
3082             Protect the cache instance during asynchronous operations.
3083
3084         (WebKit::NetworkCache::Cache::store):
3085         (WebKit::NetworkCache::Cache::storeRedirect):
3086         (WebKit::NetworkCache::Cache::remove):
3087         (WebKit::NetworkCache::Cache::traverse):
3088         (WebKit::NetworkCache::Cache::dumpContentsToFile):
3089         (WebKit::NetworkCache::Cache::clear):
3090         (WebKit::NetworkCache::Cache::recordsPath const):
3091         (WebKit::NetworkCache::Cache::retrieveData):
3092         (WebKit::NetworkCache::Cache::storeData):
3093         (WebKit::NetworkCache::singleton): Deleted.
3094         (WebKit::NetworkCache::Cache::initialize): Deleted.
3095         * NetworkProcess/cache/NetworkCache.h:
3096         (WebKit::NetworkCache::Cache::canUseSharedMemoryForBodyData const):
3097         (WebKit::NetworkCache::Cache::isEnabled const): Deleted.
3098
3099             Remove isEnabled() state as a cache object now always represents an enabled cache.
3100
3101         * NetworkProcess/cache/NetworkCacheEntry.cpp:
3102         (WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord const):
3103         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
3104         (WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):
3105         (WebKit::NetworkCache::SpeculativeLoad::didReceiveResponse):
3106         (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
3107         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
3108         (WebKit::NetworkCache::Statistics::initialize):
3109         (WebKit::NetworkCache::Statistics::shrinkIfNeeded):
3110         * NetworkProcess/cache/NetworkCacheStorage.cpp:
3111         (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation):
3112         (WebKit::NetworkCache::Storage::WriteOperation::WriteOperation):
3113         (WebKit::NetworkCache::Storage::TraverseOperation::TraverseOperation):
3114
3115             Operations now ref the storage. They are already deleted in the main thread so
3116             proper destruction is taken care of.
3117
3118         (WebKit::NetworkCache::Storage::open):
3119         (WebKit::NetworkCache::Storage::~Storage):
3120         (WebKit::NetworkCache::Storage::synchronize):
3121
3122             This and other asynchronous methods now protect the Storage instance.
3123
3124         (WebKit::NetworkCache::Storage::remove):
3125         (WebKit::NetworkCache::Storage::retrieve):
3126         (WebKit::NetworkCache::Storage::store):
3127         (WebKit::NetworkCache::Storage::traverse):
3128         (WebKit::NetworkCache::Storage::clear):
3129         (WebKit::NetworkCache::Storage::shrink):
3130         (WebKit::NetworkCache::Storage::deleteOldVersions):
3131         * NetworkProcess/cache/NetworkCacheStorage.h:
3132         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3133         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
3134         (WebKit::NetworkProcess::clearDiskCache):
3135         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
3136         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
3137         * NetworkProcess/soup/NetworkProcessSoup.cpp:
3138         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
3139         (WebKit::NetworkProcess::clearDiskCache):
3140
3141 2017-08-04  Frederic Wang  <fwang@igalia.com>
3142
3143         ScrollingTreeOverflowScrollingNodeIOS uses the wrong fixed position rectangle
3144         https://bugs.webkit.org/show_bug.cgi?id=175135
3145
3146         Reviewed by Simon Fraser.
3147
3148         This patch modifies ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll so
3149         that it uses the fixed position rectangle relative of the first frame ancestor instead of
3150         the one of the main frame. This makes it consistent with ScrollingTreeFrameScrollingNodeIOS
3151         and RenderLayerCompositor. This fixes some flickering issues on iOS.
3152
3153         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
3154         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll): Use the fixed
3155         position rect of a non-main frame if there is one.
3156
3157 2017-08-03  Brian Burg  <bburg@apple.com>
3158
3159         Remove ENABLE(WEB_SOCKET) guards
3160         https://bugs.webkit.org/show_bug.cgi?id=167044
3161
3162         Reviewed by Joseph Pecoraro.
3163
3164         * Configurations/FeatureDefines.xcconfig:
3165         * WebProcess/Network/WebSocketProvider.cpp:
3166         * WebProcess/Network/WebSocketProvider.h:
3167
3168 2017-08-03  Chris Dumez  <cdumez@apple.com>
3169
3170         Multiple Layout tests from web-platform-tests/beacon/ are timing out.
3171         https://bugs.webkit.org/show_bug.cgi?id=175076
3172         <rdar://problem/33704752>
3173
3174         Reviewed by Alexey Proskuryakov.
3175
3176         * NetworkProcess/NetworkLoad.cpp:
3177         (WebKit::NetworkLoad::completeAuthenticationChallenge):
3178         In the NETWORK_SESSION code path, we did not ask the client about server trust evaluation
3179         when the clientCredentialPolicy was CannotAskClientForCredentials. This is because the
3180         same delegate is used for HTTP authentication and server trust evaluation in the
3181         NETWORK_SESSION code path. To align both code paths, we now ask the client about server
3182         trust evaluation even if the policy CannotAskClientForCredentials. This allows WKTR
3183         to trust certificates for localhost / 127.0.0.1 unconditionally and consistently.
3184
3185 2017-08-03  Yoshiaki Jitsukawa  <jitsu@rd.scei.sony.co.jp>
3186
3187         [PAL] Move spi/cf directory into PAL
3188         https://bugs.webkit.org/show_bug.cgi?id=175057
3189
3190         Reviewed by Antti Koivisto.
3191
3192         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
3193         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3194         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
3195         * NetworkProcess/ios/NetworkProcessIOS.mm:
3196         * NetworkProcess/mac/NetworkLoadMac.mm:
3197         * NetworkProcess/mac/NetworkProcessMac.mm:
3198         * Shared/cf/CookieStorageUtilsCF.h:
3199         * Shared/mac/ChildProcessMac.mm:
3200         * Shared/mac/CookieStorageShim.mm:
3201         * UIProcess/API/Cocoa/WKHTTPCookieStore.mm:
3202         * UIProcess/API/Cocoa/WKProcessPool.mm:
3203         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3204         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
3205         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
3206         * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
3207         * UIProcess/WebsiteData/WebsiteDataStore.h:
3208         * UIProcess/mac/WebCookieManagerProxyMac.mm:
3209         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
3210         * WebProcess/cocoa/WebProcessCocoa.mm:
3211
3212 2017-08-03  Youenn Fablet  <youenn@apple.com>
3213
3214         Remove FETCH_API compilation guard
3215         https://bugs.webkit.org/show_bug.cgi?id=175154
3216
3217         Reviewed by Chris Dumez.
3218
3219         * Configurations/FeatureDefines.xcconfig:
3220         * WebProcess/WebPage/WebPage.cpp:
3221         (WebKit::WebPage::updatePreferences):
3222
3223 2017-08-03  Matt Lewis  <jlewis3@apple.com>
3224
3225         Unreviewed, rolling out r220209.
3226
3227         This caused internal build failures.
3228
3229         Reverted changeset:
3230
3231         "Use MPAVRoutingController instead of deprecated versions."
3232         https://bugs.webkit.org/show_bug.cgi?id=175063
3233         http://trac.webkit.org/changeset/220209
3234
3235 2017-08-02  Brian Burg  <bburg@apple.com>
3236
3237         Web Automation: consider file extensions in the "accept" attribute when deciding if a file can be uploaded
3238         https://bugs.webkit.org/show_bug.cgi?id=175081
3239
3240         Reviewed by Joseph Pecoraro.
3241
3242         * UIProcess/Automation/WebAutomationSession.cpp:
3243         (WebKit::fileCanBeAcceptedForUpload):
3244         (WebKit::WebAutomationSession::handleRunOpenPanel):
3245         In cases where a file has an extension, try to match it against the
3246         accepted extensions list. Give up if there's no extension. Otherwise,
3247         proceed as normal to infer a MIME type based on the extension.
3248         In cases where extension-less files are inside hidden folders, the MIME
3249         inference will fail as well.
3250
3251 2017-08-03  Brady Eidson  <beidson@apple.com>
3252
3253         Add SW IDLs and stub out basic functionality.
3254         https://bugs.webkit.org/show_bug.cgi?id=175115
3255
3256         Reviewed by Chris Dumez.
3257
3258         * Configurations/FeatureDefines.xcconfig:
3259         
3260         * Shared/WebPreferencesDefinitions.h:
3261         
3262         * UIProcess/WebPreferences.cpp:
3263         (WebKit::WebPreferences::enableAllExperimentalFeatures): Explicitly skip SW for now.
3264           The ramifications to layouttests are complicated, and we'd like to follow up in a
3265           separate patch.
3266         
3267         * WebProcess/WebPage/WebPage.cpp:
3268         (WebKit::WebPage::updatePreferences):
3269
3270 2017-08-03  Yoshiaki Jitsukawa  <jitsu@rd.scei.sony.co.jp>
3271
3272         [WebKit] Sort Xcode project file
3273         https://bugs.webkit.org/show_bug.cgi?id=175122
3274
3275         Reviewed by Antti Koivisto.
3276
3277         * WebKit.xcodeproj/project.pbxproj:
3278
3279 2017-08-02  Sam Weinig  <sam@webkit.org>
3280
3281         [WebIDL] Convert MutationCallback to be a normal generated callback
3282         https://bugs.webkit.org/show_bug.cgi?id=174140
3283
3284         Reviewed by Darin Adler.
3285
3286         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
3287         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeFilter.cpp:
3288         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeFilterPrivate.h:
3289         Pass, now necessary, Document to NativeNodeFilter constructor.
3290
3291 2017-08-03  Jeremy Jones  <jeremyj@apple.com>
3292
3293         Use MPAVRoutingController instead of deprecated versions.
3294         https://bugs.webkit.org/show_bug.cgi?id=175063
3295         rdar://problem/33301230
3296
3297         Reviewed by Tim Horton.
3298
3299         Remove dependence on deprecated classes MPAVRoutingSheet and MPAudioVideoRoutingPopoverController.
3300
3301         * UIProcess/ios/forms/WKAirPlayRoutePicker.h:
3302         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
3303         (-[WKAirPlayRoutePicker dealloc]):
3304         (-[WKAirPlayRoutePicker show:fromRect:]):
3305         (-[WKAirPlayRoutePicker popoverControllerDidDismissPopover:]): Deleted.
3306         (-[WKAirPlayRoutePicker _presentAirPlayPopoverAnimated:fromRect:]): Deleted.
3307         (-[WKAirPlayRoutePicker _windowWillRotate:]): Deleted.
3308         (-[WKAirPlayRoutePicker _windowDidRotate:]): Deleted.
3309         (-[WKAirPlayRoutePicker _dismissAirPlayRoutePickerIPad]): Deleted.
3310         (-[WKAirPlayRoutePicker showAirPlayPickerIPad:fromRect:]): Deleted.
3311         (-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]): Deleted.
3312
3313 2017-08-03  Chris Dumez  <cdumez@apple.com>
3314
3315         Improve our support for referrer policies
3316         https://bugs.webkit.org/show_bug.cgi?id=175069
3317         <rdar://problem/33677313>
3318
3319         Reviewed by Darin Adler.
3320
3321         * WebProcess/Network/WebLoaderStrategy.cpp:
3322         (WebKit::WebLoaderStrategy::loadResource):
3323         (WebKit::WebLoaderStrategy::schedulePluginStreamLoad):
3324
3325 2017-08-02  Chris Dumez  <cdumez@apple.com>
3326
3327         NetworkResourceLoader::setDefersLoading() may cause start() to be called multiple times
3328         https://bugs.webkit.org/show_bug.cgi?id=175109
3329         <rdar://problem/33363169>
3330
3331         Reviewed by Brady Eidson.
3332
3333         If NetworkResourceLoader::setDefersLoading(false) is called by the client while m_networkLoad is null
3334         then we call NetworkResourceLoader::start() to start the load. This is needed in the case where
3335         a NetworkResourceLoader is constructed in deferred mode so that the load can later be started via
3336         setDefersLoading(). However, it is possible for setDefersLoading(false) to be called when start()
3337         has already been called, which causes start() to be called multiple times and leads to an assertion
3338         hit in debug.
3339
3340         Normally, setDefersLoading(false) returns without calling start() if m_networkLoad is not null. It
3341         relies on m_networkLoad being non-null to determine if start() should be called. This is bad because
3342         start() checks the disk cache asynchronously *before* calling startNetworkLoad() and initializing
3343         m_networkLoad. Therefore, if setDefersLoading(false) is called *while* we are checking the cache,
3344         then we will call incorrectly call start() again.
3345
3346         In the case of the radar, this happens when we:
3347         1. Call start() and check the disk cache
3348         2. Retrieve a cached redirect from the cache, which causes a WillSendRequest IPC to be sent to the
3349            WebProcess
3350         3. The WebProcess calls setDefersLoading(true), sends the ContinueWillSendRequest IPC back and
3351            then calls setDefersLoading(false)
3352
3353         The call to continueWillSendRequest() causes us to retrieve the redirected entry from the cache,
3354         asynchronously, which will return no entry and start a load.
3355         The later call to setDefersLoading(false) causes us to call start() again and we end up back to step 1.
3356
3357         * NetworkProcess/NetworkResourceLoader.cpp:
3358         (WebKit::NetworkResourceLoader::start):
3359         (WebKit::NetworkResourceLoader::setDefersLoading):
3360         * NetworkProcess/NetworkResourceLoader.h:
3361
3362 2017-08-02  Andreas Kling  <akling@apple.com>
3363
3364         NetworkRTCProvider::createResolver() leaks CFHost objects
3365         https://bugs.webkit.org/show_bug.cgi?id=175103
3366         <rdar://problem/33690347>
3367
3368         Reviewed by Youenn Fablet.
3369
3370         Add a missing adoptCF() so we don't leak the CFHost.
3371
3372         * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
3373         (WebKit::NetworkRTCProvider::createResolver):
3374
3375 2017-08-02  Jeremy Jones  <jeremyj@apple.com>
3376
3377         Remove unused and obsolete setting mediaDocumentEntersFullscreenAutomatically
3378         https://bugs.webkit.org/show_bug.cgi?id=175080
3379
3380         Reviewed by Jon Lee.
3381
3382         This is obsolete because of the alternate solution in
3383         https://bugs.webkit.org/show_bug.cgi?id=174850
3384
3385         * Shared/WebPreferencesDefinitions.h:
3386         * UIProcess/API/Cocoa/WKPreferences.mm:
3387         (-[WKPreferences _setMediaDocumentEntersFullscreenAutomatically:]): Deleted.
3388         (-[WKPreferences _mediaDocumentEntersFullscreenAutomatically]): Deleted.
3389         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
3390         * WebProcess/WebPage/WebPage.cpp:
3391         (WebKit::WebPage::updatePreferences):
3392
3393 2017-08-02  Filip Pizlo  <fpizlo@apple.com>
3394
3395         We should be OK with the gigacage being disabled on gmalloc
3396         https://bugs.webkit.org/show_bug.cgi?id=175082
3397
3398         Reviewed by Michael Saboff.
3399
3400         * WebProcess/WebProcess.cpp:
3401         (WebKit::m_webSQLiteDatabaseTracker):
3402
3403 2017-08-02  Brian Burg  <bburg@apple.com>
3404
3405         Web Automation: files selected for upload should be checked against values of the 'accept' attribute
3406         https://bugs.webkit.org/show_bug.cgi?id=174803
3407         <rdar://problem/33514190>
3408
3409         Reviewed by Carlos Garcia Campos.
3410
3411         Use the parsed values of the file input element's "accept" attribute to reject
3412         files that don't match the specified values. This is normally done by Safari
3413         using NSOpenPanel, but since a real open panel isn't shown during automation,
3414         it needs to be done here.
3415
3416         Support for limiting accepted files by file extensions will be added when the
3417         same is implemented in the normal code path for the C and Objective-C APIs.
3418
3419         This change is covered by internal WebDriver tests that will be rewritten for the
3420         public Webdriver W3C test suite someday, when safaridriver runs those tests itself.
3421
3422         * UIProcess/Automation/WebAutomationSession.cpp:
3423         (WebKit::WebAutomationSession::handleRunOpenPanel):
3424         Since we already have the proposed files, there's no need to compute a list of
3425         supported extensions based on wildcard MIME types. First check the extension,
3426         then the inferred MIME type for the extension, and then the wildcard MIME type
3427         if the inferred type is not an exact match.
3428
3429 2017-08-02  Tim Horton  <timothy_horton@apple.com>
3430
3431         WKPDFView doesn't respect safe area insets
3432         https://bugs.webkit.org/show_bug.cgi?id=175046
3433         <rdar://problem/33558386>
3434
3435         Reviewed by Wenson Hsieh.
3436
3437         * Platform/spi/ios/UIKitSPI.h:
3438         Add some SPI.
3439
3440         * UIProcess/API/Cocoa/WKWebView.mm:
3441         (-[WKWebView _setHasCustomContentView:loadedMIMEType:]):
3442         Drive-by fix two small custom content view issues:
3443
3444         - Reset _scrollViewBackgroundColor; it is used to early-return from
3445         updating the background color if it hasn't changed, but if you go from a
3446         site with (for example) a white background, to a PDF, to another site
3447         with a white background, we will early-return and not reset the background
3448         color from the grey WKPDFView background.
3449
3450         - When installing a custom content view, scroll to the origin. We miss
3451         the usual mechanism for scrolling to the origin when custom content views
3452         are installed, so do it here.
3453
3454         (-[WKWebView _effectiveObscuredInsetEdgesAffectedBySafeArea]):
3455         Ignore _obscuredInsetEdgesAffectedBySafeArea for custom content views.
3456         This is fairly arbitrary, and we should find a different way to
3457         express different edge sets for different kinds of content (perhaps
3458         bake this into default viewports?), but for now this works.
3459
3460         (-[WKWebView _computedContentInset]):
3461         Use _effectiveObscuredInsetEdgesAffectedBySafeArea instead of the ivar directly.
3462
3463         (-[WKWebView _safeAreaShouldAffectObscuredInsets]):
3464         Force safe areas to not affect obscured insets for custom content views,
3465         so that it's up to every custom content view to take safe areas into
3466         account themselves.
3467
3468         * UIProcess/API/Cocoa/WKWebViewInternal.h:
3469         Expose _computedUnobscuredSafeAreaInset for WKPDFView's use.
3470
3471         * UIProcess/ios/WKPDFView.mm:
3472         (-[WKPDFView web_setMinimumSize:]):
3473         Avoid rebuilding the WKPDFView if the minimum size didn't change.
3474
3475         (-[WKPDFView _offsetForPageNumberIndicator]):
3476         Take unobscured safe area insets into account when insetting
3477         the page number indicator.
3478
3479         (-[WKPDFView web_computedContentInsetDidChange]):
3480         Watch for unobscured safe area inset changes, and apply them to the
3481         layout of the WKPDFView.
3482
3483         (-[WKPDFView _computePageAndDocumentFrames]):
3484         Make it possible to only update the WKPDFView's size and position, without
3485         rebuilding its subviews, if the width did not change. This prevents lots
3486         of flashing of the child UIPDFPageViews when the unobscured safe area
3487         insets change dynamically.
3488
3489         Take the safe area insets into account when determining what width
3490         to lay out to.
3491
3492         (-[WKPDFView _updateDocumentFrame]):
3493         Take the safe area insets into account when positioning the WKPDFView
3494         inside the WKScrollView.
3495
3496 2017-08-02  John Wilander  <wilander@apple.com>
3497
3498         ResourceLoadStatisticsClassifierCocoa::singletonPredictionModel() should check the return value of storagePath()
3499         https://bugs.webkit.org/show_bug.cgi?id=175055
3500         <rdar://problem/32671352>
3501
3502         Reviewed by David Kilzer.
3503
3504         * Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.cpp:
3505         (WebKit::ResourceLoadStatisticsClassifierCocoa::singletonPredictionModel):
3506             Now uses dispatch_once() instead of NeverDestroyed and checks the
3507             return value of storagePath() before using it to load the model.
3508
3509 2017-08-01  Brian Burg  <bburg@apple.com>
3510
3511         HTML file input elements do not support file extensions in the "accept" attribute
3512         https://bugs.webkit.org/show_bug.cgi?id=95698
3513         <rdar://problem/12231850>
3514
3515         Reviewed by Darin Adler.
3516
3517         Plumb accepted file extensions out to the C API.
3518         The Cocoa API will be improved in a later patch.
3519
3520         * Shared/WebCoreArgumentCoders.cpp:
3521         (IPC::ArgumentCoder<FileChooserSettings>::encode):
3522         (IPC::ArgumentCoder<FileChooserSettings>::decode):
3523         * UIProcess/API/APIOpenPanelParameters.cpp:
3524         (API::OpenPanelParameters::acceptFileExtensions const):
3525         * UIProcess/API/APIOpenPanelParameters.h:
3526         * UIProcess/API/C/WKOpenPanelParametersRef.cpp:
3527         (WKOpenPanelParametersCopyAcceptedFileExtensions):
3528         * UIProcess/API/C/WKOpenPanelParametersRef.h:
3529
3530 2017-08-02  Fujii Hironori  <Hironori.Fujii@sony.com>
3531
3532         Use LazyNeverDestroyed instead of DEFINE_GLOBAL for QualifiedName
3533         https://bugs.webkit.org/show_bug.cgi?id=175010
3534         <rdar://problem/33647818>
3535
3536         Reviewed by Alex Christensen.
3537
3538         * UIProcess/API/APIContentRuleListStore.cpp:
3539         (API::ContentRuleListStore::compileContentRuleList):
3540         Call QualifiedName::init().
3541
3542 2017-08-01  Chris Dumez  <cdumez@apple.com>
3543
3544         Add initial support for navigator.sendBeacon
3545         https://bugs.webkit.org/show_bug.cgi?id=175007
3546         <rdar://problem/33547728>
3547
3548         Reviewed by Sam Weinig.
3549
3550         Add experimental feature flag for the Beacon API, disabled by default.
3551
3552         * Shared/WebPreferencesDefinitions.h:
3553         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3554         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
3555         * WebProcess/WebPage/WebPage.cpp:
3556         (WebKit::WebPage::updatePreferences):
3557
3558 2017-08-01  Filip Pizlo  <fpizlo@apple.com>
3559
3560         Bmalloc and GC should put auxiliaries (butterflies, typed array backing stores) in a gigacage (separate multi-GB VM region)
3561         https://bugs.webkit.org/show_bug.cgi?id=174727
3562
3563         Reviewed by Mark Lam.
3564         
3565         The WebProcess should never disable the Gigacage by allocating typed arrays outside the Gigacage. So,
3566         we add a callback that crashes the process.
3567
3568         * WebProcess/WebProcess.cpp:
3569         (WebKit::gigacageDisabled):
3570         (WebKit::m_webSQLiteDatabaseTracker):
3571
3572 2017-08-01  Brian Burg  <bburg@apple.com>
3573
3574         Web Automation: add event to notify service when a page's main frame window object has cleared
3575         https://bugs.webkit.org/show_bug.cgi?id=174987
3576         <rdar://problem/36602634>
3577
3578         Reviewed by Carlos Garcia Campos.
3579
3580         * UIProcess/Automation/Automation.json: Add new event.
3581
3582         * UIProcess/Automation/WebAutomationSession.h:
3583         * UIProcess/Automation/WebAutomationSession.cpp:
3584         (WebKit::WebAutomationSession::navigationOccurredForFrame):
3585         (WebKit::WebAutomationSession::willClosePage):
3586         When a WebPage navigates or closes, send the browsingContextCleared event.
3587         Any element handles for elements in the browsing context are no longer valid.
3588
3589         * UIProcess/WebPageProxy.cpp:
3590         (WebKit::WebPageProxy::close):
3591         Add a new hook into the active automation session so it is notified when a page closes.
3592
3593 2017-08-01  Brady Eidson  <beidson@apple.com>
3594
3595         API test URLSchemeHandler.Exceptions is Exiting out early on macOS Debug..
3596         https://bugs.webkit.org/show_bug.cgi?id=175030
3597
3598         Reviewed by Andy Estes.
3599
3600         * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm:
3601         (WebKit::WebURLSchemeHandlerCocoa::platformTaskCompleted): Release the API wrapped on the next
3602           spin of the runloop.
3603
3604 2017-08-01  Brady Eidson  <beidson@apple.com>
3605
3606         Part 2 of: Rename DatabaseProcess to StorageProcess.
3607         https://bugs.webkit.org/show_bug.cgi?id=174880
3608
3609         Reviewed by Andy Estes.
3610
3611         Rename some more variables, classes, etc. to reflect the change.
3612
3613         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3614         (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
3615
3616         * NetworkProcess/NetworkProcess.cpp:
3617         (WebKit::NetworkProcess::grantSandboxExtensionsToStorageProcessForBlobs):
3618         (WebKit::NetworkProcess::didGrantSandboxExtensionsToStorageProcessForBlobs):
3619         (WebKit::NetworkProcess::grantSandboxExtensionsToDatabaseProcessForBlobs): Deleted.
3620         (WebKit::NetworkProcess::didGrantSandboxExtensionsToDatabaseProcessForBlobs): Deleted.
3621         * NetworkProcess/NetworkProcess.h:
3622         * NetworkProcess/NetworkProcess.messages.in:
3623
3624         * Shared/ProcessExecutablePath.h:
3625         * Shared/gtk/ProcessExecutablePathGtk.cpp:
3626         (WebKit::executablePathOfStorageProcess):
3627         (WebKit::executablePathOfDatabaseProcess): Deleted.
3628         * Shared/wpe/ProcessExecutablePathWPE.cpp:
3629         (WebKit::executablePathOfStorageProcess):
3630         (WebKit::executablePathOfDatabaseProcess): Deleted.
3631
3632         * StorageProcess/IndexedDB/WebIDBConnectionToClient.cpp:
3633         (WebKit::WebIDBConnectionToClient::putOrAdd):
3634
3635         * StorageProcess/StorageProcess.cpp:
3636         (WebKit::StorageProcess::initializeWebsiteDataStore):
3637         (WebKit::StorageProcess::postStorageTask):
3638         (WebKit::StorageProcess::performNextStorageTask):
3639         (WebKit::StorageProcess::createStorageToWebProcessConnection):
3640         (WebKit::StorageProcess::fetchWebsiteData):
3641         (WebKit::StorageProcess::postDatabaseTask): Deleted.
3642         (WebKit::StorageProcess::performNextDatabaseTask): Deleted.
3643         (WebKit::StorageProcess::createDatabaseToWebProcessConnection): Deleted.
3644         * StorageProcess/StorageProcess.h:
3645         * StorageProcess/StorageProcess.messages.in:
3646         * StorageProcess/mac/StorageProcessMac.mm:
3647         (WebKit::StorageProcess::initializeProcessName):
3648
3649         * UIProcess/API/C/WKContext.cpp:
3650         (WKContextGetDatabaseProcessIdentifier):
3651
3652         * UIProcess/API/Cocoa/WKProcessPool.mm:
3653         (-[WKProcessPool _terminateStorageProcess]):
3654         (-[WKProcessPool _storageProcessIdentifier]):
3655         (-[WKProcessPool _terminateDatabaseProcess]): Deleted.
3656         (-[WKProcessPool _databaseProcessIdentifier]): Deleted.
3657         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
3658
3659         * UIProcess/ChildProcessProxy.cpp:
3660         (WebKit::ChildProcessProxy::getLaunchOptions):
3661
3662         * UIProcess/Launcher/ProcessLauncher.h:
3663         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
3664         (WebKit::ProcessLauncher::launchProcess):
3665         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3666         (WebKit::serviceName):
3667         * UIProcess/Launcher/wpe/ProcessLauncherWPE.cpp:
3668         (WebKit::ProcessLauncher::launchProcess):
3669
3670         * UIProcess/Network/NetworkProcessProxy.cpp:
3671         (WebKit::NetworkProcessProxy::grantSandboxExtensionsToStorageProcessForBlobs):
3672         (WebKit::NetworkProcessProxy::grantSandboxExtensionsToDatabaseProcessForBlobs): Deleted.
3673         * UIProcess/Network/NetworkProcessProxy.h:
3674         * UIProcess/Network/NetworkProcessProxy.messages.in:
3675
3676         * UIProcess/Storage/StorageProcessProxy.cpp:
3677         (WebKit::StorageProcessProxy::getLaunchOptions):
3678         (WebKit::StorageProcessProxy::getStorageProcessConnection):
3679         (WebKit::StorageProcessProxy::didClose):
3680         (WebKit::StorageProcessProxy::didCreateStorageToWebProcessConnection):
3681         (WebKit::StorageProcessProxy::didFinishLaunching):
3682         (WebKit::StorageProcessProxy::getDatabaseProcessConnection): Deleted.
3683         (WebKit::StorageProcessProxy::didCreateDatabaseToWebProcessConnection): Deleted.
3684         * UIProcess/Storage/StorageProcessProxy.h:
3685         * UIProcess/Storage/StorageProcessProxy.messages.in:
3686
3687         * UIProcess/WebContextClient.cpp:
3688         (WebKit::WebContextClient::storageProcessDidCrash):
3689         (WebKit::WebContextClient::databaseProcessDidCrash): Deleted.
3690         * UIProcess/WebContextClient.h:
3691
3692         * UIProcess/WebProcessPool.cpp:
3693         (WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore):
3694         (WebKit::WebProcessPool::getStorageProcessConnection):
3695         (WebKit::WebProcessPool::storageProcessCrashed):
3696         (WebKit::WebProcessPool::pageAddedToProcess):
3697         (WebKit::WebProcessPool::storageProcessIdentifier):
3698         (WebKit::WebProcessPool::terminateStorageProcess):
3699         (WebKit::WebProcessPool::ensureDatabaseProcessAndWebsiteDataStore): Deleted.
3700         (WebKit::WebProcessPool::getDatabaseProcessConnection): Deleted.
3701         (WebKit::WebProcessPool::databaseProcessCrashed): Deleted.
3702         (WebKit::WebProcessPool::databaseProcessIdentifier): Deleted.
3703         (WebKit::WebProcessPool::terminateDatabaseProcess): Deleted.
3704         * UIProcess/WebProcessPool.h:
3705         (WebKit::WebProcessPool::sendToStorageProcessRelaunchingIfNecessary):
3706         (WebKit::WebProcessPool::sendToDatabaseProcessRelaunchingIfNecessary): Deleted.
3707
3708         * UIProcess/WebProcessProxy.cpp:
3709         (WebKit::WebProcessProxy::getStorageProcessConnection):
3710         (WebKit::WebProcessProxy::getDatabaseProcessConnection): Deleted.
3711         * UIProcess/WebProcessProxy.h:
3712         * UIProcess/WebProcessProxy.messages.in:
3713
3714         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3715         (WebKit::WebsiteDataStore::fetchDataAndApply):
3716         (WebKit::WebsiteDataStore::removeData):
3717         (WebKit::WebsiteDataStore::storageProcessParameters):
3718         (WebKit::WebsiteDataStore::databaseProcessParameters): Deleted.
3719         * UIProcess/WebsiteData/WebsiteDataStore.h:
3720
3721         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
3722         (WebKit::WebIDBConnectionToServer::messageSenderConnection):
3723         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
3724
3725         * WebProcess/Databases/WebDatabaseProvider.cpp:
3726         (WebKit::WebDatabaseProvider::idbConnectionToServerForSession):
3727
3728         * WebProcess/Storage/WebToStorageProcessConnection.cpp:
3729         (WebKit::WebToStorageProcessConnection::WebToStorageProcessConnection):
3730         (WebKit::WebToStorageProcessConnection::~WebToStorageProcessConnection):
3731         (WebKit::WebToStorageProcessConnection::didReceiveMessage):
3732         (WebKit::WebToStorageProcessConnection::didClose):
3733         (WebKit::WebToStorageProcessConnection::didReceiveInvalidMessage):
3734         (WebKit::WebToStorageProcessConnection::idbConnectionToServerForSession):
3735         (WebKit::WebToDatabaseProcessConnection::WebToDatabaseProcessConnection): Deleted.
3736         (WebKit::WebToDatabaseProcessConnection::~WebToDatabaseProcessConnection): Deleted.
3737         (WebKit::WebToDatabaseProcessConnection::didReceiveMessage): Deleted.
3738         (WebKit::WebToDatabaseProcessConnection::didClose): Deleted.
3739         (WebKit::WebToDatabaseProcessConnection::didReceiveInvalidMessage): Deleted.
3740         (WebKit::WebToDatabaseProcessConnection::idbConnectionToServerForSession): Deleted.
3741         * WebProcess/Storage/WebToStorageProcessConnection.h:
3742         (WebKit::WebToStorageProcessConnection::create):
3743         (WebKit::WebToDatabaseProcessConnection::create): Deleted.
3744         (WebKit::WebToDatabaseProcessConnection::connection): Deleted.
3745
3746         * WebProcess/WebProcess.cpp:
3747         (WebKit::WebProcess::webToStorageProcessConnectionClosed):
3748         (WebKit::WebProcess::webToStorageProcessConnection):
3749         (WebKit::WebProcess::ensureWebToStorageProcessConnection):
3750         (WebKit::WebProcess::webToDatabaseProcessConnectionClosed): Deleted.
3751         (WebKit::WebProcess::webToDatabaseProcessConnection): Deleted.
3752         (WebKit::WebProcess::ensureWebToDatabaseProcessConnection): Deleted.
3753         * WebProcess/WebProcess.h:
3754
3755 2017-08-01  Brady Eidson  <beidson@apple.com>
3756
3757         Part 1 of: Rename DatabaseProcess to StorageProcess.
3758         https://bugs.webkit.org/show_bug.cgi?id=174879
3759
3760         Reviewed by Andy Estes.
3761
3762         This patch is all about renaming source files and renaming the process itself (touching build system files, etc etc).
3763
3764         Some renaming in actual code did result (Some class/struct names, method names, etc)
3765
3766         Part 2 (174880) will go through and update all references in code itself from "Database" to "Storage"
3767
3768         * CMakeLists.txt:
3769         * DerivedSources.make:
3770         * PlatformGTK.cmake:
3771         * PlatformMac.cmake:
3772         * PlatformWPE.cmake:
3773         * WebKit.xcodeproj/project.pbxproj:
3774
3775         * Configurations/StorageService.xcconfig: Renamed from Source/WebKit/Configurations/DatabaseService.xcconfig.
3776         * StorageProcess/EntryPoint/mac/XPCService/StorageService/Info.plist: Renamed from Source/WebKit/DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService/Info.plist.
3777         * StorageProcess/mac/com.apple.WebKit.Databases.sb.in: Renamed from Source/WebKit/DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in.
3778
3779         * Shared/Storage/StorageProcessCreationParameters.cpp: Renamed from Source/WebKit/Shared/Databases/DatabaseProcessCreationParameters.cpp.
3780         * Shared/Storage/StorageProcessCreationParameters.h: Renamed from Source/WebKit/Shared/Databases/DatabaseProcessCreationParameters.h.
3781
3782         * StorageProcess/EntryPoint/mac/XPCService/StorageServiceEntryPoint.mm: Renamed from Source/WebKit/DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm.
3783         * StorageProcess/EntryPoint/unix/StorageProcessMain.cpp: Renamed from Source/WebKit/DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp.
3784
3785         * StorageProcess/IndexedDB/WebIDBConnectionToClient.cpp: Renamed from Source/WebKit/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp.
3786         * StorageProcess/IndexedDB/WebIDBConnectionToClient.h: Renamed from Source/WebKit/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h.
3787         * StorageProcess/IndexedDB/WebIDBConnectionToClient.messages.in: Renamed from Source/WebKit/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in.
3788
3789         * StorageProcess/StorageProcess.cpp: Renamed from Source/WebKit/DatabaseProcess/DatabaseProcess.cpp.
3790         * StorageProcess/StorageProcess.h: Renamed from Source/WebKit/DatabaseProcess/DatabaseProcess.h.
3791         * StorageProcess/StorageProcess.messages.in: Renamed from Source/WebKit/DatabaseProcess/DatabaseProcess.messages.in.
3792
3793         * StorageProcess/StorageToWebProcessConnection.cpp: Renamed from Source/WebKit/DatabaseProcess/DatabaseToWebProcessConnection.cpp.
3794         * StorageProcess/StorageToWebProcessConnection.h: Renamed from Source/WebKit/DatabaseProcess/DatabaseToWebProcessConnection.h.
3795         * StorageProcess/StorageToWebProcessConnection.messages.in: Renamed from Source/WebKit/DatabaseProcess/DatabaseToWebProcessConnection.messages.in.
3796
3797         * StorageProcess/gtk/StorageProcessMainGtk.cpp: Renamed from Source/WebKit/DatabaseProcess/gtk/DatabaseProcessMainGtk.cpp.
3798         * StorageProcess/ios/StorageProcessIOS.mm: Renamed from Source/WebKit/DatabaseProcess/ios/DatabaseProcessIOS.mm.
3799         * StorageProcess/mac/StorageProcessMac.mm: Renamed from Source/WebKit/DatabaseProcess/mac/DatabaseProcessMac.mm.
3800         * StorageProcess/unix/StorageProcessMainUnix.h: Renamed from Source/WebKit/DatabaseProcess/unix/DatabaseProcessMainUnix.h.
3801         * UIProcess/Network/NetworkProcessProxy.cpp:
3802
3803         * UIProcess/Storage/StorageProcessProxy.cpp: Renamed from Source/WebKit/UIProcess/Databases/DatabaseProcessProxy.cpp.
3804         * UIProcess/Storage/StorageProcessProxy.h: Renamed from Source/WebKit/UIProcess/Databases/DatabaseProcessProxy.h.
3805         * UIProcess/Storage/StorageProcessProxy.messages.in: Renamed from Source/WebKit/UIProcess/Databases/DatabaseProcessProxy.messages.in.
3806
3807         * UIProcess/WebContextSupplement.h:
3808         * UIProcess/WebProcessPool.cpp:
3809         * UIProcess/WebProcessPool.h:
3810         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3811         * UIProcess/WebsiteData/WebsiteDataStore.h:
3812         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
3813         * WebProcess/Databases/WebDatabaseProvider.cpp:
3814
3815         * WebProcess/Storage/WebToStorageProcessConnection.cpp: Renamed from Source/WebKit/WebProcess/Databases/WebToDatabaseProcessConnection.cpp.
3816         * WebProcess/Storage/WebToStorageProcessConnection.h: Renamed from Source/WebKit/WebProcess/Databases/WebToDatabaseProcessConnection.h.
3817
3818         * WebProcess/WebProcess.cpp:
3819
3820 2017-08-01  Michael Catanzaro  <mcatanzaro@igalia.com>
3821
3822         [CMake] WebKitFS.cmake depends on options set in Option cmake files that are included later
3823         https://bugs.webkit.org/show_bug.cgi?id=174855
3824
3825         Reviewed by Carlos Garcia Campos.
3826
3827         Don't create derived sources directory here anymore.
3828
3829         * PlatformGTK.cmake:
3830         * PlatformMac.cmake:
3831         * PlatformWPE.cmake:
3832
3833 2017-07-31  Daniel Bates  <dabates@apple.com>
3834
3835         WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction() may not be able to
3836         determine page that initiated navigation
3837         https://bugs.webkit.org/show_bug.cgi?id=174531
3838
3839         Remove a comment from WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction()
3840         about determining the originating page independently from the originating frame. There
3841         does not seem to be much value to fixing this. We can always revisit this issue if we
3842         discover a strong motivating example. See <https://bugs.webkit.org/show_bug.cgi?id=174531#c1>
3843         for more details.
3844
3845         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3846         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
3847
3848 2017-07-31  Sam Weinig  <sam@webkit.org>
3849
3850         Remove unnecessary exceptions from storage code
3851         https://bugs.webkit.org/show_bug.cgi?id=174572
3852
3853         Reviewed by Chris Dumez.
3854
3855         * WebProcess/Storage/StorageAreaImpl.cpp:
3856         (WebKit::StorageAreaImpl::canAccessStorage): Deleted.
3857         * WebProcess/Storage/StorageAreaImpl.h:
3858         * WebProcess/Storage/StorageNamespaceImpl.cpp:
3859         Remove canAccessStorage. It is no longer called.
3860
3861 2017-07-30  Brady Eidson  <beidson@apple.com>
3862
3863         Add URLSchemeHandler API tests that verify the lack of URLSchemeTask object leaks.
3864         https://bugs.webkit.org/show_bug.cgi?id=174958
3865
3866         Reviewed by Darin Adler.
3867
3868         * UIProcess/API/APIURLSchemeTask.h:
3869
3870         * UIProcess/API/C/WKTestingSupport.cpp:
3871         (WKGetAPIURLSchemeTaskInstanceCount):
3872         (WKGetWebURLSchemeTaskInstanceCount):
3873         * UIProcess/API/C/WKTestingSupport.h:
3874
3875         * UIProcess/WebURLSchemeTask.h:
3876
3877         * WebKit.xcodeproj/project.pbxproj:
3878
3879 2017-07-29  Yusuke Suzuki  <utatane.tea@gmail.com>
3880
3881         Unreviewed, build fix for GTK and WPE about StorageProcess renaming
3882
3883         * CMakeLists.txt:
3884         * PlatformGTK.cmake:
3885         * PlatformMac.cmake:
3886         * PlatformWPE.cmake:
3887
3888 2017-07-28  Brent Fulgham  <bfulgham@apple.com>
3889
3890         [Mac][WebKit2] WebKit sandbox errors while streaming Netflix
3891         https://bugs.webkit.org/show_bug.cgi?id=174955
3892         <rdar://problem/33583994>
3893
3894         Reviewed by Alex Christensen.
3895
3896         Wider testing with the stricter sandboxing rules identified three more IOKit properties we need to expose:
3897         - CEAModeID
3898         - CEAPixelRepetition
3899         - IOFBHDMIDongleROM
3900
3901         * WebProcess/com.apple.WebProcess.sb.in:
3902
3903 2017-07-28  Commit Queue  <commit-queue@webkit.org>
3904
3905         Unreviewed, rolling out r219986.
3906         https://bugs.webkit.org/show_bug.cgi?id=174962
3907
3908         "broke PLT on iOS (rdar://problem/33602751)" (Requested by
3909         estes on #webkit).
3910
3911         Reverted changeset:
3912
3913         "Part 1 of: Rename DatabaseProcess to StorageProcess."
3914         https://bugs.webkit.org/show_bug.cgi?id=174879
3915         http://trac.webkit.org/changeset/219986
3916
3917 2017-07-28  Commit Queue  <commit-queue@webkit.org>
3918
3919         Unreviewed, rolling out r219990.
3920         https://bugs.webkit.org/show_bug.cgi?id=174961
3921
3922         "broke PLT on iOS (rdar://problem/33602751)" (Requested by
3923         estes on #webkit).
3924
3925         Reverted changeset:
3926
3927         "Part 2 of: Rename DatabaseProcess to StorageProcess."
3928         https://bugs.webkit.org/show_bug.cgi?id=174880
3929         http://trac.webkit.org/changeset/219990
3930
3931 2017-07-28  Brady Eidson  <beidson@apple.com>
3932
3933         API tests that use URLSchemeHandler are failing.
3934         https://bugs.webkit.org/show_bug.cgi?id=174950
3935
3936         Reviewed by Alex Christensen.
3937
3938         Make sure that in all cases where we remove the last task from the page->task map...
3939         ...We also remove the map itself.
3940
3941         * UIProcess/WebURLSchemeHandler.cpp:
3942         (WebKit::WebURLSchemeHandler::stopTask):
3943         (WebKit::WebURLSchemeHandler::taskCompleted):
3944         (WebKit::WebURLSchemeHandler::removeTaskFromPageMap):
3945         * UIProcess/WebURLSchemeHandler.h:
3946
3947 2017-07-28  Brady Eidson  <beidson@apple.com>
3948
3949         WKURLSchemeTaskImpl instances are being abandoned (except if the task is stopped).
3950         <rdar://problem/33568276> and https://bugs.webkit.org/show_bug.cgi?id=174895
3951
3952         Reviewed by Alex Christensen.
3953
3954         There was a lot going on here:
3955         - There was an unbroken cycle between URLSchemeHandlers and URLSchemeTasks 
3956         - WKURLSchemeTasks were not destroying their API::URLSchemeTask implementation object
3957         - When a WKWebView was dealloc'ed, it was not cleaning up the related UIProcess tasks
3958         - If the NetworkingProcess crashed, WebProcesses were not cleaning up their tasks
3959           (and therefore the UIProcess tasks were also not getting cleaned up)
3960         - If a WebProcess crashed, the UIProcess was not cleaning up the related tasks
3961         
3962         * UIProcess/API/Cocoa/WKURLSchemeTask.mm:
3963         (-[WKURLSchemeTaskImpl dealloc]): Call API::~URLSchemeTask
3964         
3965         * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.h:
3966         * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm:
3967         (WebKit::WebURLSchemeHandlerCocoa::platformTaskCompleted): Clear out the API wrapper map
3968           so the wrapper and implementation object can both be destroyed.
3969         
3970         * UIProcess/WebPageProxy.cpp:
3971         (WebKit::WebPageProxy::close): Call stopAllURLSchemeTasks.
3972         (WebKit::WebPageProxy::processDidTerminate): Call stopAllURLSchemeTasks.
3973         (WebKit::WebPageProxy::stopAllURLSchemeTasks):
3974         * UIProcess/WebPageProxy.h:
3975         
3976         * UIProcess/WebURLSchemeHandler.cpp:
3977         (WebKit::WebURLSchemeHandler::startTask):
3978         (WebKit::WebURLSchemeHandler::stopAllTasksForPage):
3979         (WebKit::WebURLSchemeHandler::stopTask):
3980         (WebKit::WebURLSchemeHandler::taskCompleted):
3981         * UIProcess/WebURLSchemeHandler.h:
3982         
3983         * UIProcess/WebURLSchemeTask.cpp:
3984         (WebKit::WebURLSchemeTask::WebURLSchemeTask):
3985         * UIProcess/WebURLSchemeTask.h:
3986         (WebKit::WebURLSchemeTask::pageID): Store separate from the WebPage so messaging
3987           is possible even after the WebPage* has been cleared.
3988         
3989         * WebProcess/WebPage/WebPage.cpp:
3990         (WebKit::WebPage::stopAllURLSchemeTasks):
3991         * WebProcess/WebPage/WebPage.h:
3992         
3993         * WebProcess/WebPage/WebURLSchemeHandlerProxy.cpp:
3994         (WebKit::WebURLSchemeHandlerProxy::stopAllTasks):
3995         (WebKit::WebURLSchemeHandlerProxy::taskDidComplete):
3996         (WebKit::WebURLSchemeHandlerProxy::taskDidStopLoading):
3997         (WebKit::WebURLSchemeHandlerProxy::removeTask):
3998         * WebProcess/WebPage/WebURLSchemeHandlerProxy.h:
3999         
4000         * WebProcess/WebProcess.cpp:
4001         (WebKit::WebProcess::networkProcessConnectionClosed): Call stopAllURLSchemeTasks 
4002           for each WebPage.
4003
4004 2017-07-28  Frederic Wang  <fwang@igalia.cpm>
4005
4006         Fix typo in scrollPositionChangedViaDelegatedScrolling
4007         https://bugs.webkit.org/show_bug.cgi?id=174937
4008
4009         Reviewed by Wenson Hsieh.
4010
4011         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
4012         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
4013         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollViewDidScroll):
4014
4015 2017-07-28  Jeremy Jones  <jeremyj@apple.com>
4016
4017         Remove Web prefix from WebVideoFullscreen and WebPlaybackSession classes.
4018         https://bugs.webkit.org/show_bug.cgi?id=174437
4019
4020         Reviewed by Darin Adler.
4021
4022         Remove redundant Web- prefix from classes in WebKit namespace.
4023
4024         * DerivedSources.make:
4025         * UIProcess/API/Cocoa/WKWebView.mm:
4026         * UIProcess/Cocoa/PlaybackSessionManagerProxy.h: Renamed from Source/WebKit/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h.
4027         * UIProcess/Cocoa/PlaybackSessionManagerProxy.messages.in: Renamed from Source/WebKit/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in.
4028         * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm: Added.
4029         * UIProcess/Cocoa/VideoFullscreenManagerProxy.h: Renamed from Source/WebKit/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h.
4030         * UIProcess/Cocoa/VideoFullscreenManagerProxy.messages.in: Renamed from Source/WebKit/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.messages.in.
4031         * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: Renamed from Source/WebKit/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm.
4032         * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm: Removed.
4033         * UIProcess/Cocoa/WebViewImpl.mm:
4034         (WebKit::WebViewImpl::updateMediaTouchBar):
4035         * UIProcess/WebPageProxy.cpp:
4036         (WebKit::m_weakPtrFactory):
4037         (WebKit::WebPageProxy::reattachToWebProcess):
4038         (WebKit::WebPageProxy::playbackSessionManager):
4039         (WebKit::WebPageProxy::videoFullscreenManager):
4040         * UIProcess/WebPageProxy.h:
4041         * UIProcess/ios/WebPageProxyIOS.mm:
4042         * WebKit.xcodeproj/project.pbxproj:
4043         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
4044         * WebProcess/WebPage/WebPage.cpp:
4045         (WebKit::WebPage::playbackSessionManager):
4046         (WebKit::WebPage::videoFullscreenManager):
4047         * WebProcess/WebPage/WebPage.h:
4048         * WebProcess/cocoa/PlaybackSessionManager.h: Renamed from Source/WebKit/WebProcess/cocoa/WebPlaybackSessionManager.h.
4049         * WebProcess/cocoa/PlaybackSessionManager.messages.in: Renamed from Source/WebKit/WebProcess/cocoa/WebPlaybackSessionManager.messages.in.