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