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