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