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