NetworkProcess cache files use functions from unistd.h without explicitly including it
[WebKit-https.git] / Source / WebKit / ChangeLog
1 2018-01-04  Stephan Szabo  <stephan.szabo@sony.com>
2
3         NetworkProcess cache files use functions from unistd.h without explicitly including it
4         https://bugs.webkit.org/show_bug.cgi?id=181261
5
6         Reviewed by Alex Christensen.
7
8         * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
9         * NetworkProcess/cache/NetworkCacheData.cpp:
10
11 2018-01-04  Keith Rollin  <krollin@apple.com>
12
13         Add commas
14         https://bugs.webkit.org/show_bug.cgi?id=181295
15         <rdar://problem/35802295>
16
17         Reviewed by Brent Fulgham.
18
19         Fix a problem introduced in r226226 where the emitted JSON didn't
20         include some required commas.
21
22         * NetworkProcess/NetworkResourceLoader.cpp:
23         (WebKit::NetworkResourceLoader::logCookieInformation const):
24
25 2018-01-04  Eric Carlson  <eric.carlson@apple.com>
26
27         [MediaStream] Add Mock screen capture source
28         https://bugs.webkit.org/show_bug.cgi?id=181291
29         <rdar://problem/36298164>
30
31         Reviewed by Dean Jackson.
32
33         * Shared/WebCoreArgumentCoders.cpp:
34         (IPC::ArgumentCoder<MediaConstraints>::decode):
35         (IPC::ArgumentCoder<CaptureDevice>::encode): Deleted, moved to CaptureDevice.h
36         (IPC::ArgumentCoder<CaptureDevice>::decode): Ditto.
37         * Shared/WebCoreArgumentCoders.h:
38
39         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Add _WKCaptureDeviceDisplay.
40         * UIProcess/Cocoa/UIDelegate.mm:
41         (WebKit::requestUserMediaAuthorizationForDevices): Deal with display capture.
42         (WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest): Ditto.
43
44         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
45         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasDenied): requiresAudio -> requiresAudioCapture.
46         (WebKit::UserMediaPermissionRequestManagerProxy::searchForGrantedRequest const): Never reuse
47         a previously granted display capture request.
48
49         * UIProcess/UserMediaPermissionRequestProxy.cpp:
50         (WebKit::UserMediaPermissionRequestProxy::allow): Search the eligible devices instead of asking
51         the source center to find devices.
52         * UIProcess/UserMediaPermissionRequestProxy.h:
53         (WebKit::UserMediaPermissionRequestProxy::requiresAudioCapture const): Renamed.
54         (WebKit::UserMediaPermissionRequestProxy::requiresVideoCapture const): Ditto.
55         (WebKit::UserMediaPermissionRequestProxy::requiresDisplayCapture const): New.
56         (WebKit::UserMediaPermissionRequestProxy::requiresAudio const): Deleted.
57         (WebKit::UserMediaPermissionRequestProxy::requiresVideo const): Deleted.
58
59 2018-01-04  Youenn Fablet  <youenn@apple.com>
60
61         FetchResponse should set its internal response text encoding name
62         https://bugs.webkit.org/show_bug.cgi?id=181284
63
64         Reviewed by Alex Christensen.
65
66         * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
67         (WebKit::ServiceWorkerClientFetch::didReceiveResponse): Set default encoding to UTF-8.
68
69 2018-01-04  Youenn Fablet  <youenn@apple.com>
70
71         Implement Cache API partitioning based on ClientOrigin
72         https://bugs.webkit.org/show_bug.cgi?id=181240
73
74         Reviewed by Alex Christensen.
75
76         open and retrieveCaches now take a ClientOrigin instead of a String.
77         Updated cache filesystem path computation to take both client origin and top origin.
78
79         When clearing an origin, caches whose client origin or top origin matches the origin are cleared.
80         Caches are added to the web site data of their client origin with their corresponding cache size.
81         Caches are added to the web site data of their top origin with a size equal to 0.
82
83         Updated memory representation dumping used for test to include both top and client origins.
84
85         * NetworkProcess/NetworkProcess.cpp:
86         (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
87         * NetworkProcess/cache/CacheStorageEngine.cpp:
88         (WebKit::CacheStorage::Engine::cachesRootPath):
89         (WebKit::CacheStorage::Engine::open):
90         (WebKit::CacheStorage::Engine::remove):
91         (WebKit::CacheStorage::Engine::retrieveCaches):
92         (WebKit::CacheStorage::Engine::readCachesFromDisk):
93         (WebKit::CacheStorage::Engine::removeCaches):
94         (WebKit::CacheStorage::Engine::fetchEntries):
95         (WebKit::CacheStorage::Engine::clearCachesForOrigin):
96         (WebKit::CacheStorage::Engine::clearMemoryRepresentation):
97         (WebKit::CacheStorage::Engine::representation):
98         * NetworkProcess/cache/CacheStorageEngine.h:
99         * NetworkProcess/cache/CacheStorageEngineCache.cpp:
100         (WebKit::CacheStorage::Cache::Cache):
101         * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
102         (WebKit::CacheStorage::Caches::retrieveOriginFromDirectory):
103         (WebKit::CacheStorage::Caches::Caches):
104         (WebKit::CacheStorage::Caches::storeOrigin):
105         (WebKit::CacheStorage::Caches::readOrigin):
106         (WebKit::CacheStorage::Caches::open):
107         * NetworkProcess/cache/CacheStorageEngineCaches.h:
108         (WebKit::CacheStorage::Caches::create):
109         (WebKit::CacheStorage::Caches::origin const):
110         * NetworkProcess/cache/CacheStorageEngineConnection.cpp:
111         (WebKit::CacheStorageEngineConnection::open):
112         (WebKit::CacheStorageEngineConnection::caches):
113         (WebKit::CacheStorageEngineConnection::clearMemoryRepresentation):
114         * NetworkProcess/cache/CacheStorageEngineConnection.h:
115         * NetworkProcess/cache/CacheStorageEngineConnection.messages.in:
116         * WebProcess/Cache/WebCacheStorageConnection.cpp:
117         (WebKit::WebCacheStorageConnection::doOpen):
118         (WebKit::WebCacheStorageConnection::doRetrieveCaches):
119         (WebKit::WebCacheStorageConnection::clearMemoryRepresentation):
120         * WebProcess/Cache/WebCacheStorageConnection.h:
121
122 2018-01-04  Youenn Fablet  <youenn@apple.com>
123
124         Service Worker should expose redirect mode for navigation loads as manual
125         https://bugs.webkit.org/show_bug.cgi?id=181067
126
127         Reviewed by Alex Christensen.
128
129         * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
130         (WebKit::ServiceWorkerClientFetch::didReceiveResponse):
131
132 2018-01-03  Wenson Hsieh  <wenson_hsieh@apple.com>
133
134         [Attachment Support] Create attachment elements when dropping files on iOS
135         https://bugs.webkit.org/show_bug.cgi?id=181192
136         <rdar://problem/36280945>
137
138         Reviewed by Tim Horton.
139
140         Make some minor adjustments for changes to the pasteboard in WebCore. See WebCore/ChangeLog for more detail.
141         Teaches WebPasteboardProxy et. al. to plumb PasteboardItemInfo from the UI process to the web process via the
142         new `InformationForItemAtIndex` codepath.
143
144         * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
145         (WebKit::WebPasteboardProxy::informationForItemAtIndex):
146         (WebKit::WebPasteboardProxy::getFilenamesForDataInteraction): Deleted.
147         * UIProcess/WebPasteboardProxy.h:
148         * UIProcess/WebPasteboardProxy.messages.in:
149         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
150         (WebKit::WebPlatformStrategies::informationForItemAtIndex):
151         (WebKit::WebPlatformStrategies::getFilenamesForDataInteraction): Deleted.
152         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
153
154 2018-01-03  Ting-Wei Lan  <lantw44@gmail.com>
155
156         Replace hard-coded paths in shebangs with #!/usr/bin/env
157         https://bugs.webkit.org/show_bug.cgi?id=181040
158
159         Reviewed by Alex Christensen.
160
161         * Scripts/generate-forwarding-headers.pl:
162
163 2018-01-03  Wenson Hsieh  <wenson_hsieh@apple.com>
164
165         [Attachment Support] Add plumbing for starting a drag with promised blob data
166         https://bugs.webkit.org/show_bug.cgi?id=181201
167
168         Reviewed by Tim Horton.
169
170         Add boilerplate plumbing for PrepareToDragPromisedBlob, which delivers blob promises to the UI process when
171         dragging, respectively.
172
173         * Scripts/webkit/messages.py:
174         (headers_for_type):
175         * Shared/WebCoreArgumentCoders.cpp:
176         (IPC::encodeTypesAndData):
177         (IPC::decodeTypesAndData):
178         (IPC::ArgumentCoder<PasteboardWebContent>::encode):
179         (IPC::ArgumentCoder<PasteboardWebContent>::decode):
180         (IPC::ArgumentCoder<PasteboardImage>::encode):
181         (IPC::ArgumentCoder<PasteboardImage>::decode):
182         (IPC::ArgumentCoder<PromisedBlobInfo>::encode):
183         (IPC::ArgumentCoder<PromisedBlobInfo>::decode):
184
185         Add IPC support PromisedBlobInfo's additionalTypes and additionalData.
186
187         (IPC::encodeClientTypesAndData): Deleted.
188         (IPC::decodeClientTypesAndData): Deleted.
189
190         Rename these helper functions and move them to the top of the file.
191
192         * UIProcess/Cocoa/WebViewImpl.h:
193         * UIProcess/Cocoa/WebViewImpl.mm:
194         (WebKit::WebViewImpl::prepareToDragPromisedBlob):
195         * UIProcess/PageClient.h:
196         (WebKit::PageClient::prepareToDragPromisedBlob):
197         * UIProcess/WebPageProxy.cpp:
198         (WebKit::WebPageProxy::prepareToDragPromisedBlob):
199         * UIProcess/WebPageProxy.h:
200         * UIProcess/WebPageProxy.messages.in:
201         * UIProcess/ios/PageClientImplIOS.h:
202         * UIProcess/ios/PageClientImplIOS.mm:
203         (WebKit::PageClientImpl::prepareToDragPromisedBlob):
204         * UIProcess/ios/WKContentViewInteraction.h:
205         * UIProcess/ios/WKContentViewInteraction.mm:
206         (-[WKContentView _prepareToDragPromisedBlob:]):
207         * UIProcess/mac/PageClientImplMac.h:
208         * UIProcess/mac/PageClientImplMac.mm:
209         (WebKit::PageClientImpl::prepareToDragPromisedBlob):
210         * WebProcess/WebCoreSupport/WebDragClient.cpp:
211         (WebKit::WebDragClient::prepareToDragPromisedBlob):
212         * WebProcess/WebCoreSupport/WebDragClient.h:
213         * WebProcess/WebPage/WebPage.cpp:
214         (WebKit::WebPage::prepareToDragPromisedBlob):
215         * WebProcess/WebPage/WebPage.h:
216
217 2018-01-03  David Kilzer  <ddkilzer@apple.com>
218
219         REGRESSION (r212929): WKSnapshotConfiguration may leak an NSNumber when deallocated
220         <https://webkit.org/b/181274>
221
222         Reviewed by Joseph Pecoraro.
223
224         * UIProcess/API/Cocoa/WKSnapshotConfiguration.mm:
225         (-[WKSnapshotConfiguration dealloc]): Implement method and
226         release _snapshotWidth.
227
228 2018-01-03  John Wilander  <wilander@apple.com>
229
230         Storage Access API: Refactor XPC for access removal to go straight from the web process to the network process
231         https://bugs.webkit.org/show_bug.cgi?id=181270
232         <rdar://problem/36289544>
233
234         Reviewed by Alex Christensen.
235
236         This change refactors how the web process tells the network process
237         to remove storage access. Previously, this was done over the UI process
238         just like requests for storage access. But since no further reasoning
239         is needed, the message should go straight from the web process to the
240         network process for performance reasons and to minimize the risk of a
241         race.
242
243         As a consequence, the XPC code for storage access removal in the UI
244         process is deleted.
245
246         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
247         (WebKit::NetworkConnectionToWebProcess::removeStorageAccess):
248         * NetworkProcess/NetworkConnectionToWebProcess.h:
249         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
250         * NetworkProcess/NetworkProcess.cpp:
251         (WebKit::NetworkProcess::removeStorageAccess): Deleted.
252         * NetworkProcess/NetworkProcess.h:
253         * NetworkProcess/NetworkProcess.messages.in:
254         * UIProcess/Network/NetworkProcessProxy.cpp:
255         (WebKit::NetworkProcessProxy::removeStorageAccess): Deleted.
256         * UIProcess/Network/NetworkProcessProxy.h:
257         * UIProcess/WebPageProxy.cpp:
258         (WebKit::WebPageProxy::requestStorageAccess):
259         (WebKit::WebPageProxy::removeStorageAccess): Deleted.
260         * UIProcess/WebPageProxy.h:
261         * UIProcess/WebPageProxy.messages.in:
262         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
263         (WebKit::WebsiteDataStore::requestStorageAccess):
264         (WebKit::WebsiteDataStore::removeStorageAccess): Deleted.
265         * UIProcess/WebsiteData/WebsiteDataStore.h:
266         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
267         (WebKit::WebFrameLoaderClient::detachedFromParent2):
268         (WebKit::WebFrameLoaderClient::dispatchWillChangeDocument):
269
270 2018-01-03  David Kilzer  <ddkilzer@apple.com>
271
272         com.apple.WebKit.Networking crash in com.apple.Foundation: -[__NSOperationInternal _start:]
273         <https://webkit.org/b/181272>
274         <rdar://problem/35657310>
275
276         Reviewed by Alex Christensen.
277
278         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
279         (downgradeRequest): Remove unnecessary -autorelease.
280
281 2018-01-03  Brent Fulgham  <bfulgham@apple.com>
282
283         [macOS] Constant frame dropping during Flash video playback
284         https://bugs.webkit.org/show_bug.cgi?id=181249
285         <rdar://problem/34843448>
286
287         Reviewed by Eric Carlson.
288
289         Review of logs during jerky flash video playback shows a few IOKit properties are being blocked by the sandbox,
290         which prevents some high-efficiency codecs from being used. Add 'AppleGVAKeyDoesNotExist', 'IODVDBundleName', and
291         'IOGVA*Encode' to the whitelist.
292
293         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
294
295 2018-01-03  Michael Catanzaro  <mcatanzaro@igalia.com>
296
297         [GTK] Add web process API to detect when form is submitted via JavaScript
298         https://bugs.webkit.org/show_bug.cgi?id=173915
299
300         Reviewed by Carlos Garcia Campos.
301
302         Epiphany relies on the DOM submit event to detect when a form has been submitted. However,
303         for historical reasons, the submit event is not emitted when a form is submitted by
304         JavaScript. It is therefore not currently possible for a web browser to reliably detect form
305         submission and not possible to implement a robust password storage feature. In order to
306         avoid this problem, this patch adds a new WebKitWebPage signal, will-submit-form, that
307         browsers can use in preference to a DOM event listener.
308
309         Unfortunately, this signal is not available for WPE because it depends on the DOM API.
310
311         There are two submission events, WEBKIT_FORM_SUBMISSION_WILL_SEND_DOM_EVENT and
312         WEBKIT_FORM_SUBMISSION_WILL_COMPLETE. WEBKIT_FORM_SUBMISSION_WILL_SEND_DOM_EVENT
313         occurs earlier than WEBKIT_FORM_SUBMISSION_WILL_COMPLETE and can be used to retrieve form
314         values before websites receive the DOM submit event. This is useful as some websites like
315         to delete form values right before a submit would normally happen in order to attempt to
316         defeat browser password managers. There are two tricks to note: JavaScript can cancel form
317         submission immediately after this event occurs (by returning false in an onsubmit handler),
318         and, for historical reasons, this event will not occur at all when form submission is
319         triggered by JavaScript. WEBKIT_FORM_SUBMISSION_WILL_COMPLETE occurs next, and is more
320         straightforward: it is always emitted when a form is about to be submitted, when it is too
321         late to cancel.
322
323         The recommended way to reliably retrieve password form values would be to watch for both
324         events, use the form value detected in WEBKIT_FORM_SUBMISSION_WILL_SEND_DOM_EVENT
325         if that event is emitted, and use the value detected later in
326         WEBKIT_FORM_SUBMISSION_WILL_COMPLETE otherwise.
327
328         Since one of the signal arguments is an enum, we now have to run glib-mkenums for the web
329         process API. And that has resulted in this patch also adding GType goo for
330         WebKitConsoleMessageLevel and WebKitConsoleMessageSource that was previously missing. Any
331         applications that for some unlikely reason want to use these enums in properties or signals
332         will be happy.
333
334         * PlatformGTK.cmake:
335         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
336         * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
337         (webkit_web_page_class_init):
338         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h:
339         * WebProcess/InjectedBundle/API/gtk/WebKitWebProcessEnumTypes.cpp.template: Added.
340         * WebProcess/InjectedBundle/API/gtk/WebKitWebProcessEnumTypes.h.template: Added.
341
342 2018-01-03  Carlos Garcia Campos  <cgarcia@igalia.com>
343
344         Unreviewed. Really fix plugin process after r226327.
345
346         * PluginProcess/unix/PluginProcessMainUnix.cpp:
347
348 2018-01-02  Brent Fulgham  <bfulgham@apple.com>
349
350         [macOS, iOS] Adopt new secure coding APIs in WebKit
351         https://bugs.webkit.org/show_bug.cgi?id=181085
352         <rdar://problem/34837397>
353
354         Reviewed by Tim Horton.
355
356         Update WebKit code to use NSSecureCoding when the underlying operating system supports it. Use new
357         wrapper functions so the same code can be built on all supported OS releases, while enabling
358         seure coding when possible.
359
360         Note that NSView-based classes cannot be migrated at present due to AppKit not supporting NSSecureCoding
361         in its class hierarchy.
362
363         Tested by exising TestWebKitAPI tests for Coding and data transfer.
364
365         * Platform/ios/AccessibilityIOS.mm:
366         (WebKit::newAccessibilityRemoteToken): Encode using NSSecureCoding.
367         * UIProcess/API/Cocoa/WKPreferences.h:
368         * UIProcess/API/Cocoa/WKPreferences.mm:
369         (+[WKPreferences supportsSecureCoding]): Added to enable NSSecureCoding.
370         * UIProcess/API/Cocoa/WKProcessPool.h:
371         * UIProcess/API/Cocoa/WKProcessPool.mm:
372         (+[WKProcessPool supportsSecureCoding]): Ditto.
373         * UIProcess/API/Cocoa/WKUserContentController.h:
374         * UIProcess/API/Cocoa/WKUserContentController.mm:
375         (+[WKUserContentController supportsSecureCoding]): Ditto.
376         * UIProcess/API/Cocoa/WKWebView.mm:
377         (-[WKWebView initWithCoder:]): Use coding initialization that supports secure coding if
378         it is available in the supplied class.
379         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
380         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
381         (+[WKWebViewConfiguration supportsSecureCoding]): Added to enable NSSecureCoding.
382         (-[WKWebViewConfiguration initWithCoder:]): Use secure coding when possible.
383         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
384         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
385         (+[WKWebsiteDataStore supportsSecureCoding]): Added to enable NSSecureCoding.
386         * UIProcess/API/Cocoa/_WKApplicationManifest.h:
387         * UIProcess/API/Cocoa/_WKApplicationManifest.mm:
388         (+[_WKApplicationManifest supportsSecureCoding]): Added to enable NSSecureCoding.
389         (-[_WKApplicationManifest initWithCoder:]): Use secure coding when possible.
390
391 2017-12-28  Yusuke Suzuki  <utatane.tea@gmail.com>
392
393         Remove std::chrono completely
394         https://bugs.webkit.org/show_bug.cgi?id=181186
395
396         Reviewed by Alex Christensen.
397
398         Use MonotonicTime, WallTime, and Seconds instead.
399         Changes are mechanical ones.
400
401         * NetworkProcess/NetworkProcess.cpp:
402         (WebKit::NetworkProcess::deleteWebsiteData):
403         * NetworkProcess/NetworkProcess.h:
404         * NetworkProcess/NetworkProcess.messages.in:
405         * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
406         (WebKit::CacheStorage::Caches::clear):
407         * NetworkProcess/cache/NetworkCache.cpp:
408         (WebKit::NetworkCache::responseHasExpired):
409         (WebKit::NetworkCache::responseNeedsRevalidation):
410         (WebKit::NetworkCache::makeStoreDecision):
411         (WebKit::NetworkCache::Cache::clear):
412         (WebKit::NetworkCache::Cache::storeData):
413         * NetworkProcess/cache/NetworkCache.h:
414         * NetworkProcess/cache/NetworkCacheEntry.cpp:
415         (WebKit::NetworkCache::Entry::Entry):
416         (WebKit::NetworkCache::Entry::asJSON const):
417         * NetworkProcess/cache/NetworkCacheEntry.h:
418         (WebKit::NetworkCache::Entry::timeStamp const):
419         * NetworkProcess/cache/NetworkCacheFileSystem.cpp:
420         (WebKit::NetworkCache::fileTimes):
421         (WebKit::NetworkCache::updateFileModificationTimeIfNeeded):
422         * NetworkProcess/cache/NetworkCacheFileSystem.h:
423         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
424         (WebKit::NetworkCache::IOChannel::IOChannel):
425         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
426         (WebKit::NetworkCache::responseNeedsRevalidation):
427         (WebKit::NetworkCache::canRevalidate):
428         * NetworkProcess/cache/NetworkCacheStorage.cpp:
429         (WebKit::NetworkCache::Storage::readRecord):
430         (WebKit::NetworkCache::Storage::clear):
431         (WebKit::NetworkCache::computeRecordWorth):
432         * NetworkProcess/cache/NetworkCacheStorage.h:
433         Bump the cache version. We now change the data in persistent cache.
434         * NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:
435         (WebKit::NetworkCache::SubresourceInfo::SubresourceInfo):
436         (WebKit::NetworkCache::SubresourcesEntry::SubresourcesEntry):
437         * NetworkProcess/cache/NetworkCacheSubresourcesEntry.h:
438         (WebKit::NetworkCache::SubresourceInfo::lastSeen const):
439         (WebKit::NetworkCache::SubresourceInfo::firstSeen const):
440         (WebKit::NetworkCache::SubresourcesEntry::timeStamp const):
441         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
442         (WebKit::NetworkProcess::clearHSTSCache):
443         (WebKit::clearNSURLCache):
444         (WebKit::NetworkProcess::clearDiskCache):
445         * NetworkProcess/curl/NetworkProcessCurl.cpp:
446         (WebKit::NetworkProcess::clearDiskCache):
447         * NetworkProcess/mac/NetworkProcessMac.mm:
448         (WebKit::NetworkProcess::clearCacheForAllOrigins):
449         * NetworkProcess/soup/NetworkProcessSoup.cpp:
450         (WebKit::NetworkProcess::clearCacheForAllOrigins):
451         (WebKit::NetworkProcess::clearDiskCache):
452         * Platform/IPC/ArgumentCoders.cpp:
453         (IPC::ArgumentCoder<WallTime>::encode):
454         (IPC::ArgumentCoder<WallTime>::decode):
455         (IPC::ArgumentCoder<std::chrono::system_clock::time_point>::encode): Deleted.
456         (IPC::ArgumentCoder<std::chrono::system_clock::time_point>::decode): Deleted.
457         * Platform/IPC/ArgumentCoders.h:
458         * PluginProcess/PluginProcess.cpp:
459         (WebKit::PluginProcess::deleteWebsiteData):
460         * PluginProcess/PluginProcess.h:
461         * PluginProcess/PluginProcess.messages.in:
462         * Scripts/webkit/messages.py:
463         (headers_for_type):
464         * Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
465         (WebKit::RemoteLayerBackingStore::lastDisplayTime const):
466         * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
467         (WebKit::RemoteLayerBackingStore::RemoteLayerBackingStore):
468         (WebKit::RemoteLayerBackingStore::display):
469         * Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.h:
470         * Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.mm:
471         (WebKit::RemoteLayerBackingStoreCollection::markBackingStoreVolatile):
472         (WebKit::RemoteLayerBackingStoreCollection::volatilityTimerFired):
473         * Shared/WebCoreArgumentCoders.cpp:
474         (IPC::ArgumentCoder<RecentSearch>::decode):
475         (IPC::ArgumentCoder<WallTime>::encode): Deleted.
476         (IPC::ArgumentCoder<WallTime>::decode): Deleted.
477         * Shared/WebCoreArgumentCoders.h:
478         * StorageProcess/StorageProcess.cpp:
479         (WebKit::StorageProcess::deleteWebsiteData):
480         * StorageProcess/StorageProcess.h:
481         * StorageProcess/StorageProcess.messages.in:
482         * UIProcess/API/C/WKApplicationCacheManager.cpp:
483         (WKApplicationCacheManagerDeleteAllEntries):
484         * UIProcess/API/C/WKCookieManager.cpp:
485         (WKCookieManagerDeleteAllCookiesModifiedAfterDate):
486         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
487         (WKKeyValueStorageManagerDeleteAllEntries):
488         * UIProcess/API/C/WKResourceCacheManager.cpp:
489         (WKResourceCacheManagerClearCacheForAllOrigins):
490         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
491         (WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
492         (WKWebsiteDataStoreStatisticsClearThroughWebsiteDataRemoval):
493         (WKWebsiteDataStoreRemoveAllFetchCaches):
494         (WKWebsiteDataStoreRemoveAllIndexedDatabases):
495         (WKWebsiteDataStoreRemoveAllServiceWorkerRegistrations):
496         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
497         (toSystemClockTime):
498         (-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours:]):
499         * UIProcess/API/glib/WebKitWebContext.cpp:
500         (webkit_web_context_clear_cache):
501         * UIProcess/API/glib/WebKitWebsiteDataManager.cpp:
502         (webkit_website_data_manager_clear):
503         * UIProcess/DrawingAreaProxy.h:
504         * UIProcess/Network/NetworkProcessProxy.cpp:
505         (WebKit::NetworkProcessProxy::deleteWebsiteData):
506         * UIProcess/Network/NetworkProcessProxy.h:
507         * UIProcess/Plugins/PluginProcessManager.cpp:
508         (WebKit::PluginProcessManager::deleteWebsiteData):
509         * UIProcess/Plugins/PluginProcessManager.h:
510         * UIProcess/Plugins/PluginProcessProxy.cpp:
511         (WebKit::PluginProcessProxy::deleteWebsiteData):
512         * UIProcess/Plugins/PluginProcessProxy.h:
513         * UIProcess/Storage/StorageProcessProxy.cpp:
514         (WebKit::StorageProcessProxy::deleteWebsiteData):
515         * UIProcess/Storage/StorageProcessProxy.h:
516         * UIProcess/WebCookieManagerProxy.cpp:
517         (WebKit::WebCookieManagerProxy::deleteAllCookiesModifiedSince):
518         * UIProcess/WebCookieManagerProxy.h:
519         * UIProcess/WebProcessProxy.cpp:
520         (WebKit::WebProcessProxy::deleteWebsiteData):
521         * UIProcess/WebProcessProxy.h:
522         * UIProcess/WebResourceLoadStatisticsStore.cpp:
523         (WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent):
524         * UIProcess/WebResourceLoadStatisticsStore.h:
525         * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp:
526         (WebKit::LocalStorageDatabaseTracker::deleteDatabasesModifiedSince):
527         * UIProcess/WebStorage/LocalStorageDatabaseTracker.h:
528         * UIProcess/WebStorage/StorageManager.cpp:
529         (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
530         * UIProcess/WebStorage/StorageManager.h:
531         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
532         (WebKit::WebsiteDataStore::platformRemoveRecentSearches):
533         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
534         (WebKit::WebsiteDataStore::removeData):
535         (WebKit::WebsiteDataStore::removeMediaKeys):
536         * UIProcess/WebsiteData/WebsiteDataStore.h:
537         * UIProcess/gtk/WebPageProxyGtk.cpp:
538         (WebKit::WebsiteDataStore::platformRemoveRecentSearches):
539         * UIProcess/wpe/WebPageProxyWPE.cpp:
540         (WebKit::WebsiteDataStore::platformRemoveRecentSearches):
541         * WebProcess/Cookies/WebCookieManager.cpp:
542         (WebKit::WebCookieManager::deleteAllCookiesModifiedSince):
543         * WebProcess/Cookies/WebCookieManager.h:
544         * WebProcess/Cookies/WebCookieManager.messages.in:
545         * WebProcess/Plugins/PluginView.cpp:
546         (WebKit::lastModifiedDateMS):
547         * WebProcess/WebProcess.cpp:
548         (WebKit::WebProcess::deleteWebsiteData):
549         * WebProcess/WebProcess.h:
550         * WebProcess/WebProcess.messages.in:
551
552 2018-01-02  Wenson Hsieh  <wenson_hsieh@apple.com>
553
554         [Attachment Support] Introduce data structures and IPC support for writing promised blobs
555         https://bugs.webkit.org/show_bug.cgi?id=181189
556
557         Reviewed by Tim Horton.
558
559         Add IPC support for PromisedBlobInfo and PromisedBlobData. See WebCore/ChangeLog for more detail.
560
561         * Shared/WebCoreArgumentCoders.cpp:
562         (IPC::ArgumentCoder<PromisedBlobData>::encode):
563         (IPC::ArgumentCoder<PromisedBlobData>::decode):
564         (IPC::ArgumentCoder<PromisedBlobInfo>::encode):
565         (IPC::ArgumentCoder<PromisedBlobInfo>::decode):
566         * Shared/WebCoreArgumentCoders.h:
567
568 2018-01-02  Michael Catanzaro  <mcatanzaro@igalia.com>
569
570         REGRESSION(r223253): Broke ResourceLoadStatistics layout tests for non-Cocoa ports
571         https://bugs.webkit.org/show_bug.cgi?id=181231
572
573         Reviewed by Alex Christensen.
574
575         Add new C API for use by WebKitTestRunner.
576
577         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
578         (WKWebsiteDataStoreIsStatisticsRegisteredAsSubFrameUnder):
579         (WKWebsiteDataStoreIsStatisticsRegisteredAsRedirectingTo):
580         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
581
582 2018-01-02  Jiewen Tan  <jiewen_tan@apple.com>
583
584         Add a WebAuthentication runtime feature flag
585         https://bugs.webkit.org/show_bug.cgi?id=181220
586         <rdar://problem/36055305>
587
588         Reviewed by Brent Fulgham.
589
590         Renames the CredentialManagement runtime feature flag into WebAuthentication.
591
592         * Shared/WebPreferences.yaml:
593         * UIProcess/API/C/WKPreferences.cpp:
594         (WKPreferencesSetWebAuthenticationEnabled):
595         (WKPreferencesGetWebAuthenticationEnabled):
596         (WKPreferencesSetCredentialManagementEnabled): Deleted.
597         (WKPreferencesGetCredentialManagementEnabled): Deleted.
598         * UIProcess/API/C/WKPreferencesRefPrivate.h:
599         * WebProcess/WebPage/WebPage.cpp:
600         (WebKit::WebPage::updatePreferences):
601
602 2018-01-02  Michael Catanzaro  <mcatanzaro@igalia.com>
603
604         REGRESSION(r226327): [GTK] Plugin process is broken
605         https://bugs.webkit.org/show_bug.cgi?id=181187
606
607         Unreviewed, fix PluginProcessMainUnix after r226327.
608
609         * PluginProcess/unix/PluginProcessMainUnix.cpp:
610
611 2018-01-02  Tim Horton  <timothy_horton@apple.com>
612
613         Fix the build on platforms where UICurrentUserInterfaceIdiomIsPad is defined to false
614         https://bugs.webkit.org/show_bug.cgi?id=181218
615
616         Reviewed by Alex Christensen.
617
618         * Platform/spi/ios/UIKitSPI.h:
619         (currentUserInterfaceIdiomIsPad):
620         * UIProcess/ios/SmartMagnificationController.mm:
621         (WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
622         * UIProcess/ios/WKContentViewInteraction.mm:
623         (-[WKFormInputSession setAccessoryViewCustomButtonTitle:]):
624         (-[WKContentView _requiresKeyboardWhenFirstResponder]):
625         (-[WKContentView _displayFormNodeInputView]):
626         (-[WKContentView requiresAccessoryView]):
627         (-[WKContentView _updateAccessory]):
628         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
629         (-[WKAirPlayRoutePicker show:fromRect:]):
630         * UIProcess/ios/forms/WKFileUploadPanel.mm:
631         (-[WKFileUploadPanel _showPhotoPickerWithSourceType:]):
632         (-[WKFileUploadPanel _presentMenuOptionForCurrentInterfaceIdiom:]):
633         * UIProcess/ios/forms/WKFormInputControl.mm:
634         (-[WKDateTimePicker initWithView:datePickerMode:]):
635         (-[WKFormInputControl initWithView:]):
636         * UIProcess/ios/forms/WKFormSelectControl.mm:
637         (-[WKFormSelectControl initWithView:]):
638         On platforms where UICurrentUserInterfaceIdiomIsPad is defined to false,
639         blocks that conditionally execute based on its value are unreachable.
640         This causes the compiler to complain. Hide it away inside an inline function
641         and make use of that everywhere we used to use the macro.
642
643 2018-01-02  Alex Christensen  <achristensen@webkit.org>
644
645         Remove SVN file accidentally added in r226160
646         https://bugs.webkit.org/show_bug.cgi?id=180934
647
648         * UIProcess/WebPageProxy.cpp.orig: Removed.
649
650 2018-01-02  Alex Christensen  <achristensen@webkit.org>
651
652         Use BlockPtrs and lambdas instead of new/delete to pass parameters to blocks in WebViewImpl::performDragOperation
653         https://bugs.webkit.org/show_bug.cgi?id=180795
654
655         Reviewed by Brent Fulgham.
656
657         * UIProcess/Cocoa/WebViewImpl.mm:
658         (WebKit::WebViewImpl::performDragOperation):
659
660 2018-01-02  Michael Catanzaro  <mcatanzaro@igalia.com>
661
662         [WPE][GTK] Implement the assignment of ProcessIdentifiers to child processes
663         https://bugs.webkit.org/show_bug.cgi?id=181187
664
665         Reviewed by Brady Eidson.
666
667         * Shared/ChildProcess.cpp: Make the ProcessIdentifier mandatory.
668         (WebKit::ChildProcess::initialize):
669         * Shared/unix/ChildProcessMain.cpp: Initialize ChildProcessInitializationParameters with the
670         ProcessIdentifier.
671         (WebKit::ChildProcessMainBase::parseCommandLine):
672         * UIProcess/Launcher/glib/ProcessLauncherGLib.cpp: Copy the ProcessIdentifier from
673         LaunchOptions into argv.
674         (WebKit::ProcessLauncher::launchProcess):
675         * WebProcess/wpe/WebProcessMainWPE.cpp: Expect the WPE socket ID later in the command line.
676
677 2018-01-02  Alex Christensen  <achristensen@webkit.org>
678
679         Use new WebsiteDataStore passed in through decidePolicyForNavigation SPI
680         https://bugs.webkit.org/show_bug.cgi?id=180897
681         <rdar://problem/35535328>
682
683         Reviewed by Brent Fulgham.
684
685         * Shared/WebsitePoliciesData.cpp:
686         (WebKit::WebsitePoliciesData::applyToDocumentLoader):
687         * UIProcess/Cocoa/NavigationState.mm:
688         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
689         * UIProcess/WebPageProxy.cpp:
690         (WebKit::WebPageProxy::changeWebsiteDataStore):
691         * UIProcess/WebPageProxy.h:
692         * UIProcess/WebProcessPool.cpp:
693         (WebKit::WebProcessPool::pageBeginUsingWebsiteDataStore):
694         (WebKit::WebProcessPool::pageEndUsingWebsiteDataStore):
695         (WebKit::WebProcessPool::pageAddedToProcess): Deleted.
696         (WebKit::WebProcessPool::pageRemovedFromProcess): Deleted.
697         * UIProcess/WebProcessPool.h:
698         * UIProcess/WebProcessProxy.cpp:
699         (WebKit::WebProcessProxy::addExistingWebPage):
700         (WebKit::WebProcessProxy::removeWebPage):
701         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
702         (WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession):
703
704 2018-01-02  Alex Christensen  <achristensen@webkit.org>
705
706         Only use CookieStorageShim when we aren't using NetworkSession
707         https://bugs.webkit.org/show_bug.cgi?id=180766
708
709         Reviewed by Brent Fulgham.
710
711         * Shared/mac/CookieStorageShim.h:
712         * Shared/mac/CookieStorageShim.mm:
713         * WebProcess/WebProcess.cpp:
714         (WebKit::WebProcess::initializeWebProcess):
715
716 2018-01-02  Alex Christensen  <achristensen@webkit.org>
717
718         Clean up context menu code
719         https://bugs.webkit.org/show_bug.cgi?id=181074
720
721         Reviewed by Brent Fulgham.
722
723         Use Ref instead of RefPtr where possible.
724         Use move semantics instead of copying from const references when possible.
725         Remove dead iOS code.  Reduce allocations.  Add stub for WPE.
726
727         * UIProcess/API/APIContextMenuClient.h:
728         (API::ContextMenuClient::getContextMenuFromProposedMenu):
729         (API::ContextMenuClient::getContextMenuFromProposedMenuAsync):
730         (API::ContextMenuClient::showContextMenu):
731         * UIProcess/API/C/WKPage.cpp:
732         (WKPageSetPageContextMenuClient):
733         * UIProcess/API/gtk/PageClientImpl.cpp:
734         (WebKit::PageClientImpl::createContextMenuProxy):
735         * UIProcess/API/gtk/PageClientImpl.h:
736         * UIProcess/PageClient.h:
737         * UIProcess/WebContextMenuListenerProxy.cpp:
738         (WebKit::WebContextMenuListenerProxy::useContextMenuItems):
739         * UIProcess/WebContextMenuProxy.cpp:
740         (WebKit::WebContextMenuProxy::WebContextMenuProxy):
741         * UIProcess/WebContextMenuProxy.h:
742         * UIProcess/WebPageProxy.cpp:
743         (WebKit::WebPageProxy::showContextMenu):
744         (WebKit::WebPageProxy::internalShowContextMenu): Deleted.
745         * UIProcess/WebPageProxy.h:
746         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
747         (WebKit::WebContextMenuProxyGtk::showContextMenuWithItems):
748         (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
749         * UIProcess/gtk/WebContextMenuProxyGtk.h:
750         (WebKit::WebContextMenuProxyGtk::create):
751         * UIProcess/ios/PageClientImplIOS.h:
752         * UIProcess/ios/PageClientImplIOS.mm:
753         (WebKit::PageClientImpl::createContextMenuProxy): Deleted.
754         * UIProcess/mac/PageClientImplMac.h:
755         * UIProcess/mac/PageClientImplMac.mm:
756         (WebKit::PageClientImpl::createContextMenuProxy):
757         * UIProcess/mac/WebContextMenuProxyMac.h:
758         (WebKit::WebContextMenuProxyMac::create):
759         * UIProcess/mac/WebContextMenuProxyMac.mm:
760         (WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
761         (WebKit::WebContextMenuProxyMac::showContextMenuWithItems):
762         (WebKit::WebContextMenuProxyMac::showContextMenu):
763
764 == Rolled over to ChangeLog-2018-01-01 ==