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