Removed some empty directories that were left behind
[WebKit-https.git] / Source / WebKit / ChangeLog
1 2018-01-09  Dan Bernstein  <mitz@apple.com>
2
3         Removed some empty directories that were left behind
4
5         * WebProcess/Cookies/cf: Removed.
6         * WebProcess/ios: Removed.
7
8 2018-01-09  Paul Knight  <pknight@apple.com>
9
10         Don't record dynamic spelling corrections while in an ephemeral browsing session
11         https://bugs.webkit.org/show_bug.cgi?id=181417
12         <rdar://problem/33309104>
13
14         Dynamic spelling correction responses are kept on disk. Avoid recording
15         these responses when in an ephemeral session.
16
17         Reviewed by Tim Horton and Wenson Hsieh.
18
19         * UIProcess/mac/CorrectionPanel.h:
20         * UIProcess/mac/CorrectionPanel.mm:
21         (WebKit::CorrectionPanel::recordAutocorrectionResponse):
22             Add a WebViewImpl parameter so we can query the current session.
23             Return early before recording the response if the session is
24             ephemeral.
25         (WebKit::CorrectionPanel::handleAcceptedReplacement):
26             Update a caller to include the new parameter.
27         * UIProcess/mac/PageClientImplMac.mm:
28         (WebKit::PageClientImpl::recordAutocorrectionResponse):
29             Ditto.
30
31 2018-01-09  Carlos Garcia Campos  <cgarcia@igalia.com>
32
33         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.19.5 release.
34
35         * gtk/NEWS: Add release notes for 2.19.5.
36
37 2018-01-09  Carlos Garcia Campos  <cgarcia@igalia.com>
38
39         [GTK] Missing symbols exported in 2.19.4
40         https://bugs.webkit.org/show_bug.cgi?id=181433
41
42         Reviewed by Michael Catanzaro.
43
44         Add missing WEBKIT_API to webkit_dom_dom_window_webkit_message_handlers_post_message().
45
46         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.h:
47         * webkitglib-symbols.map: Remove webkit_media_player_debug from local.
48
49 2018-01-09  Youenn Fablet  <youenn@apple.com>
50
51         SWClientConnection should not keep references to service worker jobs
52         https://bugs.webkit.org/show_bug.cgi?id=181381
53
54         Reviewed by Chris Dumez.
55
56         Updated IPC handling based on WebCore refactoring.
57
58         * Scripts/webkit/messages.py:
59         (forward_declarations_and_headers):
60         (headers_for_type):
61         * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
62         (WebKit::WebSWServerConnection::rejectJobInClient):
63         (WebKit::WebSWServerConnection::resolveRegistrationJobInClient):
64         (WebKit::WebSWServerConnection::resolveUnregistrationJobInClient):
65         (WebKit::WebSWServerConnection::startScriptFetchInClient):
66         * StorageProcess/ServiceWorker/WebSWServerConnection.h:
67         * WebProcess/Storage/WebSWClientConnection.messages.in:
68
69 2018-01-09  Carlos Garcia Campos  <cgarcia@igalia.com>
70
71         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.19.4 release.
72
73         * gtk/NEWS: Add release notes for 2.19.4.
74
75 2018-01-09  Ali Juma  <ajuma@chromium.org>
76
77         Implement VisualViewport API events
78         https://bugs.webkit.org/show_bug.cgi?id=179386
79
80         Reviewed by Frédéric Wang.
81
82         Change the default value of the VisualViewportAPI experimental feature flag to
83         DEFAULT_EXPERIMENTAL_FEATURES_ENABLED. This patch completes the implementation
84         of this feature as specified by https://wicg.github.io/visual-viewport/, so this
85         feature is now ready for wider testing.
86
87         * Shared/WebPreferences.yaml:
88
89 2018-01-08  Alex Christensen  <achristensen@webkit.org>
90
91         Add WKNavigationDelegate SPI exposing WebProcess crash reason
92         https://bugs.webkit.org/show_bug.cgi?id=181410
93         <rdar://problem/36167199>
94
95         Reviewed by Wenson Hsieh.
96
97         We exposed it in the C SPI.
98
99         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
100         * UIProcess/Cocoa/NavigationState.h:
101         * UIProcess/Cocoa/NavigationState.mm:
102         (WebKit::NavigationState::setNavigationDelegate):
103         (WebKit::toWKProcessTerminationReason):
104         (WebKit::NavigationState::NavigationClient::processDidTerminate):
105
106 2018-01-08  Alex Christensen  <achristensen@webkit.org>
107
108         Make ObjC SPI equivalent to WKPageNavigationClient.decidePolicyForPluginLoad
109         https://bugs.webkit.org/show_bug.cgi?id=181413
110         <rdar://problem/36169005>
111
112         Reviewed by Wenson Hsieh.
113
114         * UIProcess/API/APINavigationClient.h:
115         (API::NavigationClient::decidePolicyForPluginLoad):
116         * UIProcess/API/C/WKPage.cpp:
117         (WKPageSetPageNavigationClient):
118         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
119         * UIProcess/Cocoa/NavigationState.h:
120         * UIProcess/Cocoa/NavigationState.mm:
121         (WebKit::NavigationState::setNavigationDelegate):
122         (WebKit::toPluginModuleLoadPolicy):
123         (WebKit::toWKPluginModuleLoadPolicy):
124         (WebKit::NavigationState::NavigationClient::decidePolicyForPluginLoad):
125         * UIProcess/WebPageProxy.cpp:
126         (WebKit::WebPageProxy::findPlugin):
127
128 2018-01-08  Ryosuke Niwa  <rniwa@webkit.org>
129
130         iOS build fix attempt after r226602.
131
132         * UIProcess/API/C/WKContextMenuListener.cpp:
133         (WKContextMenuListenerUseContextMenuItems):
134
135 2018-01-08  Alex Christensen  <achristensen@webkit.org>
136
137         Add SPI for WKOpenPanelParameters._acceptedMIMETypes and _acceptedFileExtensions
138         https://bugs.webkit.org/show_bug.cgi?id=181408
139         <rdar://problem/35884960>
140
141         Reviewed by Tim Horton.
142
143         * UIProcess/API/Cocoa/WKOpenPanelParameters.mm:
144         (-[WKOpenPanelParameters _acceptedMIMETypes]):
145         (-[WKOpenPanelParameters _acceptedFileExtensions]):
146         * UIProcess/API/Cocoa/WKOpenPanelParametersInternal.h:
147         * UIProcess/API/Cocoa/WKOpenPanelParametersPrivate.h: Added.
148         * WebKit.xcodeproj/project.pbxproj:
149
150 2018-01-08  Commit Queue  <commit-queue@webkit.org>
151
152         Unreviewed, rolling out r226532 and r226540.
153         https://bugs.webkit.org/show_bug.cgi?id=181422
154
155         jessie says basic browsing does not seem to work (Requested by
156         alexchristensen on #webkit).
157
158         Reverted changesets:
159
160         "Add CSP support to service workers"
161         https://bugs.webkit.org/show_bug.cgi?id=181385
162         https://trac.webkit.org/changeset/226532
163
164         "SWClientConnection should not keep references to service
165         worker jobs"
166         https://bugs.webkit.org/show_bug.cgi?id=181381
167         https://trac.webkit.org/changeset/226540
168
169 2018-01-08  Wenson Hsieh  <wenson_hsieh@apple.com>
170
171         [Attachment Support] Expose file name and content type of WKAttachment
172         https://bugs.webkit.org/show_bug.cgi?id=181390
173         <rdar://problem/36336837>
174
175         Reviewed by Tim Horton.
176
177         Add support for -[_WKAttachment requestInfo:], which fetches a snapshot of the attachment's state. This API is
178         meant to be a replacement for -requestData: that provides additional metadata about the attachment.
179
180         * Scripts/webkit/messages.py:
181         (headers_for_type):
182         * Shared/WebCoreArgumentCoders.cpp:
183         (IPC::ArgumentCoder<AttachmentInfo>::encode):
184         (IPC::ArgumentCoder<AttachmentInfo>::decode):
185         * Shared/WebCoreArgumentCoders.h:
186
187         Add IPC support for AttachmentInfo. Note that instead of using (encode|decode)SharedBuffer, we send and receive
188         data references to the shared buffer.
189
190         * UIProcess/API/APIAttachment.cpp:
191         (API::Attachment::requestInfo):
192         (API::Attachment::requestData): Deleted.
193         * UIProcess/API/APIAttachment.h:
194
195         Change requestData to requestInfo.
196
197         * UIProcess/API/Cocoa/_WKAttachment.h:
198         * UIProcess/API/Cocoa/_WKAttachment.mm:
199         (-[_WKAttachmentInfo initWithInfo:]):
200         (-[_WKAttachmentInfo data]):
201         (-[_WKAttachmentInfo name]):
202         (-[_WKAttachmentInfo filePath]):
203         (-[_WKAttachmentInfo contentType]):
204         (-[_WKAttachment requestInfo:]):
205         (-[_WKAttachment requestData:]):
206
207         Implement -requestInfo: by calling into APIAttachment, and reimplement -requestData: in terms of -requestInfo:.
208
209         * UIProcess/WebPageProxy.cpp:
210         (WebKit::WebPageProxy::attachmentInfoCallback):
211         (WebKit::WebPageProxy::requestAttachmentInfo):
212         (WebKit::WebPageProxy::sharedBufferCallback): Deleted.
213         (WebKit::WebPageProxy::requestAttachmentData): Deleted.
214         * UIProcess/WebPageProxy.h:
215         * UIProcess/WebPageProxy.messages.in:
216
217         Rename the SharedBufferCallback IPC message to AttachmentInfoCallback, and make it conditional on
218         ATTACHMENT_ELEMENT. Rename requestAttachmentData to requestAttachmentInfo.
219
220         * WebProcess/WebPage/WebPage.cpp:
221         (WebKit::WebPage::requestAttachmentInfo):
222         (WebKit::WebPage::invokeSharedBufferCallback): Deleted.
223         (WebKit::WebPage::requestAttachmentData): Deleted.
224
225         Rename requestAttachmentData to requestAttachmentInfo and adopt HTMLAttachmentElement::requestInfo.
226
227         * WebProcess/WebPage/WebPage.h:
228         * WebProcess/WebPage/WebPage.messages.in:
229
230 2018-01-08  Alex Christensen  <achristensen@webkit.org>
231
232         Pass around Vector<Ref<WebContextMenuItem>> instead of WKArrayRef or Vector<WebContextMenuItemData>
233         https://bugs.webkit.org/show_bug.cgi?id=181419
234
235         Reviewed by Tim Horton.
236
237         Passing a WKArrayRef to an API object is messy and was preventing me from moving things around and making ObjC SPI.
238         No change in behavior.  Just using different layering abstractions for the same data.
239
240         * UIProcess/API/C/WKContextMenuListener.cpp:
241         (WKContextMenuListenerUseContextMenuItems):
242         * UIProcess/WebContextMenuListenerProxy.cpp:
243         (WebKit::WebContextMenuListenerProxy::useContextMenuItems):
244         * UIProcess/WebContextMenuListenerProxy.h:
245         * UIProcess/WebContextMenuProxy.h:
246         * UIProcess/mac/WebContextMenuProxyMac.h:
247         * UIProcess/mac/WebContextMenuProxyMac.mm:
248         (WebKit::WebContextMenuProxyMac::showContextMenuWithItems):
249         (WebKit::WebContextMenuProxyMac::showContextMenu):
250
251 2018-01-08  John Wilander  <wilander@apple.com>
252
253         Storage Access API: Remove access for all frames under a page when the page is closed
254         https://bugs.webkit.org/show_bug.cgi?id=181398
255         <rdar://problem/36357879>
256
257         Reviewed by Alex Christensen.
258
259         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
260         (WebKit::NetworkConnectionToWebProcess::removeStorageAccessForAllFramesOnPage):
261         * NetworkProcess/NetworkConnectionToWebProcess.h:
262         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
263         * WebProcess/WebPage/WebPage.cpp:
264         (WebKit::WebPage::close):
265
266 2018-01-08  Youenn Fablet  <youenn@apple.com>
267
268         SWClientConnection should not keep references to service worker jobs
269         https://bugs.webkit.org/show_bug.cgi?id=181381
270
271         Reviewed by Chris Dumez.
272
273         Updated IPC handling based on WebCore refactoring.
274
275         * Scripts/webkit/messages.py:
276         (forward_declarations_and_headers):
277         (headers_for_type):
278         * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
279         (WebKit::WebSWServerConnection::rejectJobInClient):
280         (WebKit::WebSWServerConnection::resolveRegistrationJobInClient):
281         (WebKit::WebSWServerConnection::resolveUnregistrationJobInClient):
282         (WebKit::WebSWServerConnection::startScriptFetchInClient):
283         * StorageProcess/ServiceWorker/WebSWServerConnection.h:
284         * WebProcess/Storage/WebSWClientConnection.messages.in:
285
286 2018-01-08  Joseph Pecoraro  <pecoraro@apple.com>
287
288         [Cocoa] Web Inspector: Provide a way for clients to check if an NSWindow is a Web Inspector window
289         https://bugs.webkit.org/show_bug.cgi?id=181361
290         <rdar://problem/36332865>
291
292         Reviewed by Darin Adler.
293
294         * WebKit.xcodeproj/project.pbxproj:
295         New files.
296
297         * Shared/API/Cocoa/_WKNSWindowExtras.h: Added.
298         * Shared/API/Cocoa/_WKNSWindowExtras.mm: Added.
299         (-[NSWindow _web_isWebInspectorWindow]):
300         Method to determing if a window is being used for Web Inspector content.
301
302         * UIProcess/mac/WKInspectorWindow.h: Added.
303         * UIProcess/mac/WKInspectorWindow.mm: Added.
304         Named subclass so we can use isKindOfClass.
305
306         * UIProcess/mac/WebInspectorProxyMac.mm:
307         (WebKit::WebInspectorProxy::createFrontendWindow):
308         Use the named subclass.
309
310 2018-01-08  Tim Horton  <timothy_horton@apple.com>
311
312         Build fix for WKPDFView
313         https://bugs.webkit.org/show_bug.cgi?id=181399
314         <rdar://problem/36311915>
315
316         Reviewed by Simon Fraser.
317
318         * UIProcess/ios/WKPDFView.mm:
319         Disable deprecation warnings in this whole file.
320
321 2018-01-08  Youenn Fablet  <youenn@apple.com>
322
323         Caches::writeCachesToDisk should assert that it is initialized
324         https://bugs.webkit.org/show_bug.cgi?id=181383
325
326         Reviewed by Alex Christensen.
327
328         Add assertion to ensure caches is initialized
329
330         * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
331         (WebKit::CacheStorage::Caches::writeCachesToDisk):
332
333 2018-01-08  Youenn Fablet  <youenn@apple.com>
334
335         WebProcessPool::terminateServiceWorkerProcess should protect itself in debug builds
336         https://bugs.webkit.org/show_bug.cgi?id=181384
337
338         Reviewed by Chris Dumez.
339
340         * UIProcess/WebProcessPool.cpp:
341         (WebKit::WebProcessPool::terminateServiceWorkerProcess):
342
343 2018-01-08  Frederic Wang  <fwang@igalia.com>
344
345         Unreviewed build fix after r226211.
346
347         * UIProcess/API/Cocoa/WKPreferencesPrivate.h: Use WK_IOS_TBA for iOS.
348
349 2018-01-08  Youenn Fablet  <youenn@apple.com>
350
351         navigator.onLine does not work inside service workers
352         https://bugs.webkit.org/show_bug.cgi?id=181079
353         <rdar://problem/36178606>
354
355         Reviewed by Darin Adler.
356
357         Added support for a callback called for each service worker proxy creation.
358         Callback is used by WTR to inject a self.internals object used for testing.
359
360         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
361         (WKBundleSetServiceWorkerProxyCreationCallback):
362         * WebProcess/InjectedBundle/API/c/WKBundle.h:
363         * WebProcess/InjectedBundle/InjectedBundle.cpp:
364         (WebKit::InjectedBundle::setServiceWorkerProxyCreationCallback):
365         * WebProcess/InjectedBundle/InjectedBundle.h:
366
367 2018-01-07  David Kilzer  <ddkilzer@apple.com>
368
369         Enable -Wcast-qual for WebInspectorUI, WebKitLegacy, WebKit projects
370         <https://webkit.org/b/181256>
371         <rdar://problem/36281730>
372
373         Reviewed by Darin Adler.
374
375         * Configurations/Base.xcconfig:
376         (WARNING_CFLAGS): Add -Wcast-qual.
377         * NetworkProcess/cache/NetworkCacheCodersCocoa.cpp:
378         (WTF::Persistence::encodeCertificateChain): Include
379         TypeCastsCF.h from WTF, and use
380         checked_cf_cast<SecCertificateRef>() to fix warning.
381         * Platform/cocoa/WKCrashReporter.mm:
382         (WebKit::setCrashReportApplicationSpecificInformation):
383         - Move `oldMessage` check above nullptr check to fix a leak when
384           passing in nullptr after previously setting the crash string.
385         - Change C-style cast to const_cast<char*>() to fix warning.
386         * PluginProcess/mac/PluginProcessShim.mm:
387         (WebKit::shim_shmat): Change C-style cast to
388         const_cast<void*>() to fix warning.
389         * Shared/Authentication/mac/AuthenticationManager.mac.mm:
390         (WebKit::leafCertificate): Include TypeCastsCF.h from
391         WTF, and use checked_cf_cast<SecCertificateRef>() to fix
392         warning.
393         * Shared/cf/ArgumentCodersCF.cpp:
394         (IPC::encode): Use static_cast<>(const_cast<void*>() to
395         fix warnings since the CFTypeID has already been
396         checked.
397         * Shared/mac/WebCoreArgumentCodersMac.mm:
398         (IPC::decodeNSError): Use an `auto` variable to hold the
399         CFMutableDictionaryRef, then WTFMove() to assign it back to
400         `userInfo`.
401         * UIProcess/Cocoa/WebViewImpl.mm:
402         (WebKit::takeWindowSnapshot): Include TypeCastsCF.h from
403         WTF, and use checked_cf_cast<CGImageRef>() to fix
404         warning.
405
406 2018-01-07  Konstantin Tokarev  <annulen@yandex.ru>
407
408         [cmake] Unset CMAKE_REQUIRED_LIBRARIES after check_function_exists test
409         https://bugs.webkit.org/show_bug.cgi?id=181371
410
411         Reviewed by Michael Catanzaro.
412
413         This variable is used by check_function_exists internally, its value
414         should be never used for anything else.
415
416         * CMakeLists.txt:
417
418 2018-01-05  Dan Bernstein  <mitz@apple.com>
419
420         REGRESSION (r226218): iOS-only assets are installed on macOS
421         https://bugs.webkit.org/show_bug.cgi?id=181362
422
423         Reviewed by Anders Carlsson.
424
425         * Configurations/WebKit.xcconfig: Exclude everything under Resources/ios when not targeting
426           iOS.
427
428         * Resources/ios: Added.
429         * Resources/ios/iOS.xcassets: Moved from Source/WebKit/WebKit.xcassets.
430         * Resources/ios/iOS.xcassets/LockMini.imageset/NavigationBarLockMini@2x.pdf: Set the
431           svn:mime-type property.
432         * Resources/ios/iOS.xcassets/LockMini.imageset/NavigationBarLockMini@3x.pdf: Ditto.
433
434         * Resources/mac: Added.
435         * Resources/mac/mediaIcon.pdf: Moved here…
436         * Resources/mediaIcon.pdf: …from here.
437
438         * WebKit.xcassets: Moved under Resources/ios.
439
440         * WebKit.xcodeproj/project.pbxproj: Created an ios group under the Resources group, and
441           cleaned up the mac group. Removed the Recovered References group.
442
443 2018-01-05  John Wilander  <wilander@apple.com>
444
445         Storage Access API: Refactor to make naming accurate and explicit, simplify access table, and prepare for access removal for page
446         https://bugs.webkit.org/show_bug.cgi?id=181357
447         <rdar://problem/36331031>
448
449         Reviewed by Alex Christensen.
450
451         This change does the following:
452         - Changes function and message names to reflect how this feature
453           was eventually implemented, i.e. access per frame.
454         - Makes it explicit that the UI process is only involved in
455           granting storage access and not removing storage access.
456           The latter is done directly by the web process.
457         - Simplifies the network process' entry map since only needs to
458           be able to give access to one domain in one frame at a time.
459           Access goes away on frame navigation so there can only be one
460           domain at a time per frame. Also, the map now uses pageIDs as
461           main keys to prepare for efficient access removal for all
462           frames under a page.
463         - Fixes a bug in so that a cross-origin iframe with the same
464           partition as the top frame correctly is handled as already
465           having access.
466
467         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
468         (WebKit::NetworkConnectionToWebProcess::removeStorageAccessForFrame):
469         (WebKit::NetworkConnectionToWebProcess::removeStorageAccess): Deleted.
470         * NetworkProcess/NetworkConnectionToWebProcess.h:
471         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
472         * NetworkProcess/NetworkProcess.cpp:
473         (WebKit::NetworkProcess::hasStorageAccessForFrame):
474         (WebKit::NetworkProcess::grantStorageAccessForFrame):
475         (WebKit::NetworkProcess::hasStorageAccessForPrevalentDomains): Deleted.
476         (WebKit::NetworkProcess::updateStorageAccessForPrevalentDomains): Deleted.
477         * NetworkProcess/NetworkProcess.h:
478         * NetworkProcess/NetworkProcess.messages.in:
479         * UIProcess/Network/NetworkProcessProxy.cpp:
480         (WebKit::NetworkProcessProxy::hasStorageAccessForFrame):
481         (WebKit::NetworkProcessProxy::grantStorageAccessForFrame):
482         (WebKit::NetworkProcessProxy::hasStorageAccessForPrevalentDomains): Deleted.
483         (WebKit::NetworkProcessProxy::updateStorageAccessForPrevalentDomains): Deleted.
484         * UIProcess/Network/NetworkProcessProxy.h:
485         * UIProcess/WebResourceLoadStatisticsStore.cpp:
486         (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
487         (WebKit::WebResourceLoadStatisticsStore::hasStorageAccess):
488         (WebKit::WebResourceLoadStatisticsStore::requestStorageAccess):
489         * UIProcess/WebResourceLoadStatisticsStore.h:
490         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
491         (WebKit::WebsiteDataStore::hasStorageAccessForFrameHandler):
492         (WebKit::WebsiteDataStore::grantStorageAccessForFrameHandler):
493         (WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):
494         (WebKit::WebsiteDataStore::hasStorageAccessForPrevalentDomainsHandler): Deleted.
495         (WebKit::WebsiteDataStore::updateStorageAccessForPrevalentDomainsHandler): Deleted.
496         * UIProcess/WebsiteData/WebsiteDataStore.h:
497         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
498         (WebKit::WebFrameLoaderClient::detachedFromParent2):
499         (WebKit::WebFrameLoaderClient::dispatchWillChangeDocument):
500
501 2018-01-05  Youenn Fablet  <youenn@apple.com>
502
503         Implement Cache API partitioning based on ClientOrigin
504         https://bugs.webkit.org/show_bug.cgi?id=181240
505
506         Reviewed by Alex Christensen.
507
508         open and retrieveCaches now take a ClientOrigin instead of a String.
509         Updated cache filesystem path computation to take both client origin and top origin.
510
511         When clearing an origin, caches whose client origin or top origin matches the origin are cleared.
512         Caches are added to the web site data of their client origin with their corresponding cache size.
513         Caches are added to the web site data of their top origin with a size equal to 0.
514
515         Updated memory representation dumping used for test to include both top and client origins.
516
517         * NetworkProcess/NetworkProcess.cpp:
518         (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
519         * NetworkProcess/cache/CacheStorageEngine.cpp:
520         (WebKit::CacheStorage::Engine::cachesRootPath):
521         (WebKit::CacheStorage::Engine::open):
522         (WebKit::CacheStorage::Engine::remove):
523         (WebKit::CacheStorage::Engine::retrieveCaches):
524         (WebKit::CacheStorage::Engine::readCachesFromDisk):
525         (WebKit::CacheStorage::Engine::removeCaches):
526         (WebKit::CacheStorage::Engine::fetchEntries):
527         (WebKit::CacheStorage::Engine::clearCachesForOrigin):
528         (WebKit::CacheStorage::Engine::clearMemoryRepresentation):
529         (WebKit::CacheStorage::Engine::representation):
530         * NetworkProcess/cache/CacheStorageEngine.h:
531         * NetworkProcess/cache/CacheStorageEngineCache.cpp:
532         (WebKit::CacheStorage::Cache::Cache):
533         * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
534         (WebKit::CacheStorage::Caches::retrieveOriginFromDirectory):
535         (WebKit::CacheStorage::Caches::Caches):
536         (WebKit::CacheStorage::Caches::storeOrigin):
537         (WebKit::CacheStorage::Caches::readOrigin):
538         (WebKit::CacheStorage::Caches::open):
539         * NetworkProcess/cache/CacheStorageEngineCaches.h:
540         (WebKit::CacheStorage::Caches::create):
541         (WebKit::CacheStorage::Caches::origin const):
542         * NetworkProcess/cache/CacheStorageEngineConnection.cpp:
543         (WebKit::CacheStorageEngineConnection::open):
544         (WebKit::CacheStorageEngineConnection::caches):
545         (WebKit::CacheStorageEngineConnection::clearMemoryRepresentation):
546         * NetworkProcess/cache/CacheStorageEngineConnection.h:
547         * NetworkProcess/cache/CacheStorageEngineConnection.messages.in:
548         * WebProcess/Cache/WebCacheStorageConnection.cpp:
549         (WebKit::WebCacheStorageConnection::doOpen):
550         (WebKit::WebCacheStorageConnection::doRetrieveCaches):
551         (WebKit::WebCacheStorageConnection::clearMemoryRepresentation):
552         * WebProcess/Cache/WebCacheStorageConnection.h:
553
554 2018-01-05  Megan Gardner  <megan_gardner@apple.com>
555
556         Show Keyboard when re-launching WKWebView with a previously focused element
557         https://bugs.webkit.org/show_bug.cgi?id=181353
558
559         Reviewed by Tim Horton.
560
561         When relaunching an app with a WKWebView, restore the keyboard if there was a previously
562         focused element that was being assisted. The element was already being tracked, we just
563         needed to not bail on showing the keyboard for instances where it was a state change that
564         caused the element to be refocused.
565
566         * UIProcess/PageClient.h:
567         * UIProcess/WebPageProxy.h:
568         * UIProcess/WebPageProxy.messages.in:
569         * UIProcess/ios/PageClientImplIOS.h:
570         * UIProcess/ios/PageClientImplIOS.mm:
571         (WebKit::PageClientImpl::startAssistingNode):
572         * UIProcess/ios/WKContentView.h:
573         * UIProcess/ios/WKContentViewInteraction.h:
574         * UIProcess/ios/WKContentViewInteraction.mm:
575         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
576         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]): Deleted.
577         * UIProcess/ios/WebPageProxyIOS.mm:
578         (WebKit::WebPageProxy::startAutoscrollAtPosition):
579         (WebKit::WebPageProxy::startAssistingNode):
580         * WebProcess/WebPage/WebPage.cpp:
581         (WebKit::WebPage::setActivityState):
582         (WebKit::WebPage::elementDidFocus):
583         * WebProcess/WebPage/WebPage.h:
584
585 2018-01-05  Alex Christensen  <achristensen@webkit.org>
586
587         Restrict navigation-time WKWebsiteDataStore swapping to main frame navigations
588         https://bugs.webkit.org/show_bug.cgi?id=181217
589
590         Reviewed by Tim Horton.
591
592         If we swap during an iframe navigation, then we get a page in a strange state.
593         The intent of the main frame navigation WKWebsiteDataStore swap is that
594         that is a time when we can change storages without a page in an inconsistent state.
595
596         * UIProcess/Cocoa/NavigationState.mm:
597         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
598
599 2018-01-05  Alex Christensen  <achristensen@webkit.org>
600
601         Add WKBundleFrameCreateFrameHandle
602         https://bugs.webkit.org/show_bug.cgi?id=181232
603         <rdar://problem/35926696>
604
605         Reviewed by Tim Horton.
606
607         InjectedBundle clients wanting to sent a _WKFrameHandle cannot without this function.
608         Before, they would just send the WKBundleFrameRef which would be changed into a WKFrameRef
609         in the UIProcess by WebProcessProxy::transformHandlesToObjects, but there is no ObjC equivalent
610         of WKFrameRef, so we were just getting a WKObject when we wanted a _WKFrameHandle.
611         We can't change WebProcessProxy::transformHandlesToObjects without being incompatible with the 
612         existing C API, so let's add a way for clients to say "I want a _WKFrameHandle".
613
614         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
615         (WKBundleFrameCreateFrameHandle):
616         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
617
618 2018-01-05  Wenson Hsieh  <wenson_hsieh@apple.com>
619
620         [Attachment Support] Add a way to write blob data to a file URL from the UI process
621         https://bugs.webkit.org/show_bug.cgi?id=181236
622
623         Reviewed by Brady Eidson.
624
625         Add support for writing a blob to a designated file path. In WebKit, this is mainly plumbing writeBlobToFilePath
626         through WebPageProxy to the network process.
627
628         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
629         (WebKit::NetworkBlobRegistry::writeBlobToFilePath):
630
631         Call out to the BlobRegistryImpl to write blobs to the file path. Additionally grant sandbox extensions for any
632         file-backed blob parts corresponding to the given blob URL.
633
634         (WebKit::NetworkBlobRegistry::filesInBlob):
635
636         Introduce a version of filesInBlob that doesn't check against the NetworkConnectionToWebProcess. This is used
637         when the UI process is the driver for writing a blob.
638
639         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
640         * NetworkProcess/NetworkProcess.cpp:
641         (WebKit::NetworkProcess::writeBlobToFilePath):
642
643         Temporarily grant sandbox access to the given file path.
644
645         * NetworkProcess/NetworkProcess.h:
646         * NetworkProcess/NetworkProcess.messages.in:
647         * Shared/WebCoreArgumentCoders.cpp:
648         (IPC::ArgumentCoder<PromisedBlobInfo>::encode):
649         (IPC::ArgumentCoder<PromisedBlobInfo>::decode):
650         (IPC::ArgumentCoder<PromisedBlobData>::encode): Deleted.
651         (IPC::ArgumentCoder<PromisedBlobData>::decode): Deleted.
652
653         Remove PromisedBlobData (see WebCore/ChangeLog for more information).
654
655         * Shared/WebCoreArgumentCoders.h:
656         * UIProcess/Network/NetworkProcessProxy.cpp:
657         (WebKit::NetworkProcessProxy::didClose):
658
659         If the network process is terminated, flush any pending callbacks in m_writeBlobToFilePathCallbackMap, passing
660         in a failure result (success := false) and clearing the callback map.
661
662         (WebKit::NetworkProcessProxy::writeBlobToFilePath):
663         (WebKit::NetworkProcessProxy::didWriteBlobToFilePath):
664         * UIProcess/Network/NetworkProcessProxy.h:
665         * UIProcess/Network/NetworkProcessProxy.messages.in:
666         * UIProcess/WebPageProxy.cpp:
667         (WebKit::WebPageProxy::writeBlobToFilePath):
668         * UIProcess/WebPageProxy.h:
669
670 2018-01-05  Dan Bernstein  <mitz@apple.com>
671
672         Add injected bundle equivalents of DOMHTMLDocument (DOMHTMLDocumentExtensions)
673         https://bugs.webkit.org/show_bug.cgi?id=181345
674
675         Reviewed by Tim Horton.
676
677         * WebProcess/InjectedBundle/API/mac/WKDOMDocument.h: Declared new methods.
678         * WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm:
679         (-[WKDOMDocument createDocumentFragmentWithMarkupString:baseURL:]): Added. Calls WebCore’s
680           createFragmentFromMarkup.
681         (-[WKDOMDocument createDocumentFragmentWithText:]): Added. Calls WebCore’s
682           createFragmentFromText.
683
684 2018-01-05  Don Olmstead  <don.olmstead@sony.com>
685
686         [Curl] Add implementation stubs for Network Cache
687         https://bugs.webkit.org/show_bug.cgi?id=181343
688
689         Reviewed by Alex Christensen.
690
691         * NetworkProcess/cache/NetworkCacheCodersCurl.cpp: Added.
692         (WTF::Persistence::Coder<WebCore::CertificateInfo>::encode):
693         (WTF::Persistence::Coder<WebCore::CertificateInfo>::decode):
694         * NetworkProcess/cache/NetworkCacheDataCurl.cpp: Added.
695         (WebKit::NetworkCache::Data::Data):
696         (WebKit::NetworkCache::Data::empty):
697         (WebKit::NetworkCache::Data::data const):
698         (WebKit::NetworkCache::Data::isNull const):
699         (WebKit::NetworkCache::Data::apply const):
700         (WebKit::NetworkCache::Data::subrange const):
701         (WebKit::NetworkCache::concatenate):
702         (WebKit::NetworkCache::Data::adoptMap):
703         * NetworkProcess/cache/NetworkCacheIOChannelCurl.cpp: Added.
704         (WebKit::NetworkCache::IOChannel::IOChannel):
705         (WebKit::NetworkCache::IOChannel::~IOChannel):
706         (WebKit::NetworkCache::IOChannel::open):
707         (WebKit::NetworkCache::IOChannel::read):
708         (WebKit::NetworkCache::IOChannel::write):
709         * PlatformWin.cmake:
710
711 2018-01-05  Don Olmstead  <don.olmstead@sony.com>
712
713         [Curl] Update method declarations in WebKit
714         https://bugs.webkit.org/show_bug.cgi?id=181342
715
716         Reviewed by Alex Christensen.
717
718         * NetworkProcess/Downloads/curl/DownloadCurl.cpp:
719         (WebKit::Download::resume):
720         * NetworkProcess/curl/RemoteNetworkingContextCurl.cpp:
721         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession): Deleted.
722         (WebKit::RemoteNetworkingContext::blockedError const): Deleted.
723
724 2018-01-05  Don Olmstead  <don.olmstead@sony.com>
725
726         WebFullScreenManager should compile when ENABLE(VIDEO) is off
727         https://bugs.webkit.org/show_bug.cgi?id=181338
728
729         Reviewed by Alex Christensen.
730
731         * WebProcess/FullScreen/WebFullScreenManager.cpp:
732         (WebKit::WebFullScreenManager::didEnterFullScreen):
733         (WebKit::WebFullScreenManager::willExitFullScreen):
734         * WebProcess/FullScreen/WebFullScreenManager.h:
735
736 2018-01-05  Andy Estes  <aestes@apple.com>
737
738         [Apple Pay] Disable Apple Pay on platforms that don't have PassKit.framework
739         https://bugs.webkit.org/show_bug.cgi?id=181335
740         <rdar://problem/36311296>
741
742         Reviewed by Brady Eidson.
743
744         When Safari is running in the macOS Base System, PassKit.framework is not available.
745         If we fail to dlopen PassKit, we should disable Apple Pay.
746
747         * UIProcess/API/C/WKPreferences.cpp:
748         (WKPreferencesSetApplePayEnabled):
749         * UIProcess/API/Cocoa/WKWebView.mm:
750         (-[WKWebView _initializeWithConfiguration:]):
751         * UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
752         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
753         (WebKit::WebPaymentCoordinatorProxy::availablePaymentNetworks):
754         (WebKit::WebPaymentCoordinatorProxy::platformSupportsPayments):
755
756 2018-01-05  Dan Bernstein  <mitz@apple.com>
757
758         Fixed the build following AppKit API deprecations in a recent SDKs
759
760         * UIProcess/mac/WKFullScreenWindowController.mm:
761         (-[WKFullScreenWindowController enterFullScreen:]): Suppressed deprecation warnings.
762         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Ditto.
763         (-[WKFullScreenWindowController exitFullScreen]): Ditto.
764         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Ditto.
765         (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]): Ditto.
766         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]): Ditto.
767         (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]): Ditto.
768         * UIProcess/mac/WKPrintingView.mm:
769         (-[WKPrintingView _setAutodisplay:]): Ditto.
770
771 2018-01-05  Matt Lewis  <jlewis3@apple.com>
772
773         Unreviewed, rolling out r226401.
774
775         This caused timeouts on multiple platforms.
776
777         Reverted changeset:
778
779         "Implement Cache API partitioning based on ClientOrigin"
780         https://bugs.webkit.org/show_bug.cgi?id=181240
781         https://trac.webkit.org/changeset/226401
782
783 2018-01-05  Joseph Pecoraro  <pecoraro@apple.com>
784
785         ServiceWorkers: Enable UserTiming / ResourceTiming
786         https://bugs.webkit.org/show_bug.cgi?id=181297
787         <rdar://problem/36307306>
788
789         Reviewed by Youenn Fablet.
790
791         * WebProcess/Storage/WebSWContextManagerConnection.cpp:
792         (WebKit::WebSWContextManagerConnection::updatePreferencesStore):
793         Enable Resource Timing / User Timing for the ServiceWorker process.
794
795 2018-01-04  Zan Dobersek  <zdobersek@igalia.com>
796
797         Unreviewed GTK+ build fix.
798
799         * UIProcess/API/glib/WebKitUserMediaPermissionRequest.cpp:
800         (webkit_user_media_permission_is_for_audio_device):
801         Call UserMediaPermissionRequestProxy::requiresAudioCapture().
802         (webkit_user_media_permission_is_for_video_device):
803         Call UserMediaPermissionRequestProxy::requiresVideoCapture().
804
805 2018-01-04  Don Olmstead  <don.olmstead@sony.com>
806
807         [Curl] Fix compilation error in WebFrameNetworkingContext
808         https://bugs.webkit.org/show_bug.cgi?id=181312
809
810         Reviewed by Alex Christensen.
811
812         * WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.cpp:
813         (WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession):
814
815 2018-01-04  Tim Horton  <timothy_horton@apple.com>
816
817         WKWebView loses minimum layout size overrides that happen while the process is terminated
818         https://bugs.webkit.org/show_bug.cgi?id=181306
819         <rdar://problem/34398288>
820
821         Reviewed by Dan Bernstein.
822
823         * Shared/WebPageCreationParameters.cpp:
824         (WebKit::WebPageCreationParameters::encode const):
825         (WebKit::WebPageCreationParameters::decode):
826         * Shared/WebPageCreationParameters.h:
827         * UIProcess/API/Cocoa/WKWebView.mm:
828         (-[WKWebView _didRelaunchProcess]): Deleted.
829         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
830         * UIProcess/WebPageProxy.cpp:
831         (WebKit::WebPageProxy::creationParameters):
832         * UIProcess/WebPageProxy.h:
833         * UIProcess/ios/PageClientImplIOS.mm:
834         (WebKit::PageClientImpl::didRelaunchProcess):
835         * UIProcess/ios/WebPageProxyIOS.mm:
836         (WebKit::WebPageProxy::setViewportConfigurationMinimumLayoutSize):
837         (WebKit::WebPageProxy::setForceAlwaysUserScalable):
838         (WebKit::WebPageProxy::setMaximumUnobscuredSize):
839         * WebProcess/WebPage/WebPage.cpp:
840         (WebKit::WebPage::WebPage):
841         Pass the current viewport minimum layout size and maximum unobscured size
842         in the WebPageCreationParameters instead of re-sending them in _didRelaunchProcess.
843
844         The previous approach was problematic when _dispatchSetMinimumLayoutSize:
845         was changed to not re-send identical updates, because if the client calls 
846         _overrideLayoutParametersWithMinimumLayoutSize before the Web Content process
847         is re-launched (after terminating), we would cache the size, attempt to send it,
848         fail silently (because the process is not launched), and then in _didRelaunchProcess
849         we would choose not to re-send (after the process is successfully relaunched)
850         because we think we already sent the new value.
851
852         Add isValid() checks to our message sends. Ideally send() would assert
853         if the process is not alive to avoid problems like this, but it doesn't (yet).
854
855         Get rid of WKWebView's _didRelaunchProcess, because it does nothing now.
856
857 2018-01-04  Stephan Szabo  <stephan.szabo@sony.com>
858
859         NetworkProcess cache files use functions from unistd.h without explicitly including it
860         https://bugs.webkit.org/show_bug.cgi?id=181261
861
862         Reviewed by Alex Christensen.
863
864         * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
865         * NetworkProcess/cache/NetworkCacheData.cpp:
866
867 2018-01-04  Keith Rollin  <krollin@apple.com>
868
869         Add commas
870         https://bugs.webkit.org/show_bug.cgi?id=181295
871         <rdar://problem/35802295>
872
873         Reviewed by Brent Fulgham.
874
875         Fix a problem introduced in r226226 where the emitted JSON didn't
876         include some required commas.
877
878         * NetworkProcess/NetworkResourceLoader.cpp:
879         (WebKit::NetworkResourceLoader::logCookieInformation const):
880
881 2018-01-04  Eric Carlson  <eric.carlson@apple.com>
882
883         [MediaStream] Add Mock screen capture source
884         https://bugs.webkit.org/show_bug.cgi?id=181291
885         <rdar://problem/36298164>
886
887         Reviewed by Dean Jackson.
888
889         * Shared/WebCoreArgumentCoders.cpp:
890         (IPC::ArgumentCoder<MediaConstraints>::decode):
891         (IPC::ArgumentCoder<CaptureDevice>::encode): Deleted, moved to CaptureDevice.h
892         (IPC::ArgumentCoder<CaptureDevice>::decode): Ditto.
893         * Shared/WebCoreArgumentCoders.h:
894
895         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Add _WKCaptureDeviceDisplay.
896         * UIProcess/Cocoa/UIDelegate.mm:
897         (WebKit::requestUserMediaAuthorizationForDevices): Deal with display capture.
898         (WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest): Ditto.
899
900         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
901         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasDenied): requiresAudio -> requiresAudioCapture.
902         (WebKit::UserMediaPermissionRequestManagerProxy::searchForGrantedRequest const): Never reuse
903         a previously granted display capture request.
904
905         * UIProcess/UserMediaPermissionRequestProxy.cpp:
906         (WebKit::UserMediaPermissionRequestProxy::allow): Search the eligible devices instead of asking
907         the source center to find devices.
908         * UIProcess/UserMediaPermissionRequestProxy.h:
909         (WebKit::UserMediaPermissionRequestProxy::requiresAudioCapture const): Renamed.
910         (WebKit::UserMediaPermissionRequestProxy::requiresVideoCapture const): Ditto.
911         (WebKit::UserMediaPermissionRequestProxy::requiresDisplayCapture const): New.
912         (WebKit::UserMediaPermissionRequestProxy::requiresAudio const): Deleted.
913         (WebKit::UserMediaPermissionRequestProxy::requiresVideo const): Deleted.
914
915 2018-01-04  Youenn Fablet  <youenn@apple.com>
916
917         FetchResponse should set its internal response text encoding name
918         https://bugs.webkit.org/show_bug.cgi?id=181284
919
920         Reviewed by Alex Christensen.
921
922         * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
923         (WebKit::ServiceWorkerClientFetch::didReceiveResponse): Set default encoding to UTF-8.
924
925 2018-01-04  Youenn Fablet  <youenn@apple.com>
926
927         Implement Cache API partitioning based on ClientOrigin
928         https://bugs.webkit.org/show_bug.cgi?id=181240
929
930         Reviewed by Alex Christensen.
931
932         open and retrieveCaches now take a ClientOrigin instead of a String.
933         Updated cache filesystem path computation to take both client origin and top origin.
934
935         When clearing an origin, caches whose client origin or top origin matches the origin are cleared.
936         Caches are added to the web site data of their client origin with their corresponding cache size.
937         Caches are added to the web site data of their top origin with a size equal to 0.
938
939         Updated memory representation dumping used for test to include both top and client origins.
940
941         * NetworkProcess/NetworkProcess.cpp:
942         (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
943         * NetworkProcess/cache/CacheStorageEngine.cpp:
944         (WebKit::CacheStorage::Engine::cachesRootPath):
945         (WebKit::CacheStorage::Engine::open):
946         (WebKit::CacheStorage::Engine::remove):
947         (WebKit::CacheStorage::Engine::retrieveCaches):
948         (WebKit::CacheStorage::Engine::readCachesFromDisk):
949         (WebKit::CacheStorage::Engine::removeCaches):
950         (WebKit::CacheStorage::Engine::fetchEntries):
951         (WebKit::CacheStorage::Engine::clearCachesForOrigin):
952         (WebKit::CacheStorage::Engine::clearMemoryRepresentation):
953         (WebKit::CacheStorage::Engine::representation):
954         * NetworkProcess/cache/CacheStorageEngine.h:
955         * NetworkProcess/cache/CacheStorageEngineCache.cpp:
956         (WebKit::CacheStorage::Cache::Cache):
957         * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
958         (WebKit::CacheStorage::Caches::retrieveOriginFromDirectory):
959         (WebKit::CacheStorage::Caches::Caches):
960         (WebKit::CacheStorage::Caches::storeOrigin):
961         (WebKit::CacheStorage::Caches::readOrigin):
962         (WebKit::CacheStorage::Caches::open):
963         * NetworkProcess/cache/CacheStorageEngineCaches.h:
964         (WebKit::CacheStorage::Caches::create):
965         (WebKit::CacheStorage::Caches::origin const):
966         * NetworkProcess/cache/CacheStorageEngineConnection.cpp:
967         (WebKit::CacheStorageEngineConnection::open):
968         (WebKit::CacheStorageEngineConnection::caches):
969         (WebKit::CacheStorageEngineConnection::clearMemoryRepresentation):
970         * NetworkProcess/cache/CacheStorageEngineConnection.h:
971         * NetworkProcess/cache/CacheStorageEngineConnection.messages.in:
972         * WebProcess/Cache/WebCacheStorageConnection.cpp:
973         (WebKit::WebCacheStorageConnection::doOpen):
974         (WebKit::WebCacheStorageConnection::doRetrieveCaches):
975         (WebKit::WebCacheStorageConnection::clearMemoryRepresentation):
976         * WebProcess/Cache/WebCacheStorageConnection.h:
977
978 2018-01-04  Youenn Fablet  <youenn@apple.com>
979
980         Service Worker should expose redirect mode for navigation loads as manual
981         https://bugs.webkit.org/show_bug.cgi?id=181067
982
983         Reviewed by Alex Christensen.
984
985         * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
986         (WebKit::ServiceWorkerClientFetch::didReceiveResponse):
987
988 2018-01-03  Wenson Hsieh  <wenson_hsieh@apple.com>
989
990         [Attachment Support] Create attachment elements when dropping files on iOS
991         https://bugs.webkit.org/show_bug.cgi?id=181192
992         <rdar://problem/36280945>
993
994         Reviewed by Tim Horton.
995
996         Make some minor adjustments for changes to the pasteboard in WebCore. See WebCore/ChangeLog for more detail.
997         Teaches WebPasteboardProxy et. al. to plumb PasteboardItemInfo from the UI process to the web process via the
998         new `InformationForItemAtIndex` codepath.
999
1000         * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
1001         (WebKit::WebPasteboardProxy::informationForItemAtIndex):
1002         (WebKit::WebPasteboardProxy::getFilenamesForDataInteraction): Deleted.
1003         * UIProcess/WebPasteboardProxy.h:
1004         * UIProcess/WebPasteboardProxy.messages.in:
1005         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1006         (WebKit::WebPlatformStrategies::informationForItemAtIndex):
1007         (WebKit::WebPlatformStrategies::getFilenamesForDataInteraction): Deleted.
1008         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1009
1010 2018-01-03  Ting-Wei Lan  <lantw44@gmail.com>
1011
1012         Replace hard-coded paths in shebangs with #!/usr/bin/env
1013         https://bugs.webkit.org/show_bug.cgi?id=181040
1014
1015         Reviewed by Alex Christensen.
1016
1017         * Scripts/generate-forwarding-headers.pl:
1018
1019 2018-01-03  Wenson Hsieh  <wenson_hsieh@apple.com>
1020
1021         [Attachment Support] Add plumbing for starting a drag with promised blob data
1022         https://bugs.webkit.org/show_bug.cgi?id=181201
1023
1024         Reviewed by Tim Horton.
1025
1026         Add boilerplate plumbing for PrepareToDragPromisedBlob, which delivers blob promises to the UI process when
1027         dragging, respectively.
1028
1029         * Scripts/webkit/messages.py:
1030         (headers_for_type):
1031         * Shared/WebCoreArgumentCoders.cpp:
1032         (IPC::encodeTypesAndData):
1033         (IPC::decodeTypesAndData):
1034         (IPC::ArgumentCoder<PasteboardWebContent>::encode):
1035         (IPC::ArgumentCoder<PasteboardWebContent>::decode):
1036         (IPC::ArgumentCoder<PasteboardImage>::encode):
1037         (IPC::ArgumentCoder<PasteboardImage>::decode):
1038         (IPC::ArgumentCoder<PromisedBlobInfo>::encode):
1039         (IPC::ArgumentCoder<PromisedBlobInfo>::decode):
1040
1041         Add IPC support PromisedBlobInfo's additionalTypes and additionalData.
1042
1043         (IPC::encodeClientTypesAndData): Deleted.
1044         (IPC::decodeClientTypesAndData): Deleted.
1045
1046         Rename these helper functions and move them to the top of the file.
1047
1048         * UIProcess/Cocoa/WebViewImpl.h:
1049         * UIProcess/Cocoa/WebViewImpl.mm:
1050         (WebKit::WebViewImpl::prepareToDragPromisedBlob):
1051         * UIProcess/PageClient.h:
1052         (WebKit::PageClient::prepareToDragPromisedBlob):
1053         * UIProcess/WebPageProxy.cpp:
1054         (WebKit::WebPageProxy::prepareToDragPromisedBlob):
1055         * UIProcess/WebPageProxy.h:
1056         * UIProcess/WebPageProxy.messages.in:
1057         * UIProcess/ios/PageClientImplIOS.h:
1058         * UIProcess/ios/PageClientImplIOS.mm:
1059         (WebKit::PageClientImpl::prepareToDragPromisedBlob):
1060         * UIProcess/ios/WKContentViewInteraction.h:
1061         * UIProcess/ios/WKContentViewInteraction.mm:
1062         (-[WKContentView _prepareToDragPromisedBlob:]):
1063         * UIProcess/mac/PageClientImplMac.h:
1064         * UIProcess/mac/PageClientImplMac.mm:
1065         (WebKit::PageClientImpl::prepareToDragPromisedBlob):
1066         * WebProcess/WebCoreSupport/WebDragClient.cpp:
1067         (WebKit::WebDragClient::prepareToDragPromisedBlob):
1068         * WebProcess/WebCoreSupport/WebDragClient.h:
1069         * WebProcess/WebPage/WebPage.cpp:
1070         (WebKit::WebPage::prepareToDragPromisedBlob):
1071         * WebProcess/WebPage/WebPage.h:
1072
1073 2018-01-03  David Kilzer  <ddkilzer@apple.com>
1074
1075         REGRESSION (r212929): WKSnapshotConfiguration may leak an NSNumber when deallocated
1076         <https://webkit.org/b/181274>
1077
1078         Reviewed by Joseph Pecoraro.
1079
1080         * UIProcess/API/Cocoa/WKSnapshotConfiguration.mm:
1081         (-[WKSnapshotConfiguration dealloc]): Implement method and
1082         release _snapshotWidth.
1083
1084 2018-01-03  John Wilander  <wilander@apple.com>
1085
1086         Storage Access API: Refactor XPC for access removal to go straight from the web process to the network process
1087         https://bugs.webkit.org/show_bug.cgi?id=181270
1088         <rdar://problem/36289544>
1089
1090         Reviewed by Alex Christensen.
1091
1092         This change refactors how the web process tells the network process
1093         to remove storage access. Previously, this was done over the UI process
1094         just like requests for storage access. But since no further reasoning
1095         is needed, the message should go straight from the web process to the
1096         network process for performance reasons and to minimize the risk of a
1097         race.
1098
1099         As a consequence, the XPC code for storage access removal in the UI
1100         process is deleted.
1101
1102         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1103         (WebKit::NetworkConnectionToWebProcess::removeStorageAccess):
1104         * NetworkProcess/NetworkConnectionToWebProcess.h:
1105         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1106         * NetworkProcess/NetworkProcess.cpp:
1107         (WebKit::NetworkProcess::removeStorageAccess): Deleted.
1108         * NetworkProcess/NetworkProcess.h:
1109         * NetworkProcess/NetworkProcess.messages.in:
1110         * UIProcess/Network/NetworkProcessProxy.cpp:
1111         (WebKit::NetworkProcessProxy::removeStorageAccess): Deleted.
1112         * UIProcess/Network/NetworkProcessProxy.h:
1113         * UIProcess/WebPageProxy.cpp:
1114         (WebKit::WebPageProxy::requestStorageAccess):
1115         (WebKit::WebPageProxy::removeStorageAccess): Deleted.
1116         * UIProcess/WebPageProxy.h:
1117         * UIProcess/WebPageProxy.messages.in:
1118         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1119         (WebKit::WebsiteDataStore::requestStorageAccess):
1120         (WebKit::WebsiteDataStore::removeStorageAccess): Deleted.
1121         * UIProcess/WebsiteData/WebsiteDataStore.h:
1122         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1123         (WebKit::WebFrameLoaderClient::detachedFromParent2):
1124         (WebKit::WebFrameLoaderClient::dispatchWillChangeDocument):
1125
1126 2018-01-03  David Kilzer  <ddkilzer@apple.com>
1127
1128         com.apple.WebKit.Networking crash in com.apple.Foundation: -[__NSOperationInternal _start:]
1129         <https://webkit.org/b/181272>
1130         <rdar://problem/35657310>
1131
1132         Reviewed by Alex Christensen.
1133
1134         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1135         (downgradeRequest): Remove unnecessary -autorelease.
1136
1137 2018-01-03  Brent Fulgham  <bfulgham@apple.com>
1138
1139         [macOS] Constant frame dropping during Flash video playback
1140         https://bugs.webkit.org/show_bug.cgi?id=181249
1141         <rdar://problem/34843448>
1142
1143         Reviewed by Eric Carlson.
1144
1145         Review of logs during jerky flash video playback shows a few IOKit properties are being blocked by the sandbox,
1146         which prevents some high-efficiency codecs from being used. Add 'AppleGVAKeyDoesNotExist', 'IODVDBundleName', and
1147         'IOGVA*Encode' to the whitelist.
1148
1149         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
1150
1151 2018-01-03  Michael Catanzaro  <mcatanzaro@igalia.com>
1152
1153         [GTK] Add web process API to detect when form is submitted via JavaScript
1154         https://bugs.webkit.org/show_bug.cgi?id=173915
1155
1156         Reviewed by Carlos Garcia Campos.
1157
1158         Epiphany relies on the DOM submit event to detect when a form has been submitted. However,
1159         for historical reasons, the submit event is not emitted when a form is submitted by
1160         JavaScript. It is therefore not currently possible for a web browser to reliably detect form
1161         submission and not possible to implement a robust password storage feature. In order to
1162         avoid this problem, this patch adds a new WebKitWebPage signal, will-submit-form, that
1163         browsers can use in preference to a DOM event listener.
1164
1165         Unfortunately, this signal is not available for WPE because it depends on the DOM API.
1166
1167         There are two submission events, WEBKIT_FORM_SUBMISSION_WILL_SEND_DOM_EVENT and
1168         WEBKIT_FORM_SUBMISSION_WILL_COMPLETE. WEBKIT_FORM_SUBMISSION_WILL_SEND_DOM_EVENT
1169         occurs earlier than WEBKIT_FORM_SUBMISSION_WILL_COMPLETE and can be used to retrieve form
1170         values before websites receive the DOM submit event. This is useful as some websites like
1171         to delete form values right before a submit would normally happen in order to attempt to
1172         defeat browser password managers. There are two tricks to note: JavaScript can cancel form
1173         submission immediately after this event occurs (by returning false in an onsubmit handler),
1174         and, for historical reasons, this event will not occur at all when form submission is
1175         triggered by JavaScript. WEBKIT_FORM_SUBMISSION_WILL_COMPLETE occurs next, and is more
1176         straightforward: it is always emitted when a form is about to be submitted, when it is too
1177         late to cancel.
1178
1179         The recommended way to reliably retrieve password form values would be to watch for both
1180         events, use the form value detected in WEBKIT_FORM_SUBMISSION_WILL_SEND_DOM_EVENT
1181         if that event is emitted, and use the value detected later in
1182         WEBKIT_FORM_SUBMISSION_WILL_COMPLETE otherwise.
1183
1184         Since one of the signal arguments is an enum, we now have to run glib-mkenums for the web
1185         process API. And that has resulted in this patch also adding GType goo for
1186         WebKitConsoleMessageLevel and WebKitConsoleMessageSource that was previously missing. Any
1187         applications that for some unlikely reason want to use these enums in properties or signals
1188         will be happy.
1189
1190         * PlatformGTK.cmake:
1191         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
1192         * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
1193         (webkit_web_page_class_init):
1194         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h:
1195         * WebProcess/InjectedBundle/API/gtk/WebKitWebProcessEnumTypes.cpp.template: Added.
1196         * WebProcess/InjectedBundle/API/gtk/WebKitWebProcessEnumTypes.h.template: Added.
1197
1198 2018-01-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1199
1200         Unreviewed. Really fix plugin process after r226327.
1201
1202         * PluginProcess/unix/PluginProcessMainUnix.cpp:
1203
1204 2018-01-02  Brent Fulgham  <bfulgham@apple.com>
1205
1206         [macOS, iOS] Adopt new secure coding APIs in WebKit
1207         https://bugs.webkit.org/show_bug.cgi?id=181085
1208         <rdar://problem/34837397>
1209
1210         Reviewed by Tim Horton.
1211
1212         Update WebKit code to use NSSecureCoding when the underlying operating system supports it. Use new
1213         wrapper functions so the same code can be built on all supported OS releases, while enabling
1214         seure coding when possible.
1215
1216         Note that NSView-based classes cannot be migrated at present due to AppKit not supporting NSSecureCoding
1217         in its class hierarchy.
1218
1219         Tested by exising TestWebKitAPI tests for Coding and data transfer.
1220
1221         * Platform/ios/AccessibilityIOS.mm:
1222         (WebKit::newAccessibilityRemoteToken): Encode using NSSecureCoding.
1223         * UIProcess/API/Cocoa/WKPreferences.h:
1224         * UIProcess/API/Cocoa/WKPreferences.mm:
1225         (+[WKPreferences supportsSecureCoding]): Added to enable NSSecureCoding.
1226         * UIProcess/API/Cocoa/WKProcessPool.h:
1227         * UIProcess/API/Cocoa/WKProcessPool.mm:
1228         (+[WKProcessPool supportsSecureCoding]): Ditto.
1229         * UIProcess/API/Cocoa/WKUserContentController.h:
1230         * UIProcess/API/Cocoa/WKUserContentController.mm:
1231         (+[WKUserContentController supportsSecureCoding]): Ditto.
1232         * UIProcess/API/Cocoa/WKWebView.mm:
1233         (-[WKWebView initWithCoder:]): Use coding initialization that supports secure coding if
1234         it is available in the supplied class.
1235         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
1236         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1237         (+[WKWebViewConfiguration supportsSecureCoding]): Added to enable NSSecureCoding.
1238         (-[WKWebViewConfiguration initWithCoder:]): Use secure coding when possible.
1239         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
1240         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1241         (+[WKWebsiteDataStore supportsSecureCoding]): Added to enable NSSecureCoding.
1242         * UIProcess/API/Cocoa/_WKApplicationManifest.h:
1243         * UIProcess/API/Cocoa/_WKApplicationManifest.mm:
1244         (+[_WKApplicationManifest supportsSecureCoding]): Added to enable NSSecureCoding.
1245         (-[_WKApplicationManifest initWithCoder:]): Use secure coding when possible.
1246
1247 2017-12-28  Yusuke Suzuki  <utatane.tea@gmail.com>
1248
1249         Remove std::chrono completely
1250         https://bugs.webkit.org/show_bug.cgi?id=181186
1251
1252         Reviewed by Alex Christensen.
1253
1254         Use MonotonicTime, WallTime, and Seconds instead.
1255         Changes are mechanical ones.
1256
1257         * NetworkProcess/NetworkProcess.cpp:
1258         (WebKit::NetworkProcess::deleteWebsiteData):
1259         * NetworkProcess/NetworkProcess.h:
1260         * NetworkProcess/NetworkProcess.messages.in:
1261         * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
1262         (WebKit::CacheStorage::Caches::clear):
1263         * NetworkProcess/cache/NetworkCache.cpp:
1264         (WebKit::NetworkCache::responseHasExpired):
1265         (WebKit::NetworkCache::responseNeedsRevalidation):
1266         (WebKit::NetworkCache::makeStoreDecision):
1267         (WebKit::NetworkCache::Cache::clear):
1268         (WebKit::NetworkCache::Cache::storeData):
1269         * NetworkProcess/cache/NetworkCache.h:
1270         * NetworkProcess/cache/NetworkCacheEntry.cpp:
1271         (WebKit::NetworkCache::Entry::Entry):
1272         (WebKit::NetworkCache::Entry::asJSON const):
1273         * NetworkProcess/cache/NetworkCacheEntry.h:
1274         (WebKit::NetworkCache::Entry::timeStamp const):
1275         * NetworkProcess/cache/NetworkCacheFileSystem.cpp:
1276         (WebKit::NetworkCache::fileTimes):
1277         (WebKit::NetworkCache::updateFileModificationTimeIfNeeded):
1278         * NetworkProcess/cache/NetworkCacheFileSystem.h:
1279         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
1280         (WebKit::NetworkCache::IOChannel::IOChannel):
1281         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
1282         (WebKit::NetworkCache::responseNeedsRevalidation):
1283         (WebKit::NetworkCache::canRevalidate):
1284         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1285         (WebKit::NetworkCache::Storage::readRecord):
1286         (WebKit::NetworkCache::Storage::clear):
1287         (WebKit::NetworkCache::computeRecordWorth):
1288         * NetworkProcess/cache/NetworkCacheStorage.h:
1289         Bump the cache version. We now change the data in persistent cache.
1290         * NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:
1291         (WebKit::NetworkCache::SubresourceInfo::SubresourceInfo):
1292         (WebKit::NetworkCache::SubresourcesEntry::SubresourcesEntry):
1293         * NetworkProcess/cache/NetworkCacheSubresourcesEntry.h:
1294         (WebKit::NetworkCache::SubresourceInfo::lastSeen const):
1295         (WebKit::NetworkCache::SubresourceInfo::firstSeen const):
1296         (WebKit::NetworkCache::SubresourcesEntry::timeStamp const):
1297         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1298         (WebKit::NetworkProcess::clearHSTSCache):
1299         (WebKit::clearNSURLCache):
1300         (WebKit::NetworkProcess::clearDiskCache):
1301         * NetworkProcess/curl/NetworkProcessCurl.cpp:
1302         (WebKit::NetworkProcess::clearDiskCache):
1303         * NetworkProcess/mac/NetworkProcessMac.mm:
1304         (WebKit::NetworkProcess::clearCacheForAllOrigins):
1305         * NetworkProcess/soup/NetworkProcessSoup.cpp:
1306         (WebKit::NetworkProcess::clearCacheForAllOrigins):
1307         (WebKit::NetworkProcess::clearDiskCache):
1308         * Platform/IPC/ArgumentCoders.cpp:
1309         (IPC::ArgumentCoder<WallTime>::encode):
1310         (IPC::ArgumentCoder<WallTime>::decode):
1311         (IPC::ArgumentCoder<std::chrono::system_clock::time_point>::encode): Deleted.
1312         (IPC::ArgumentCoder<std::chrono::system_clock::time_point>::decode): Deleted.
1313         * Platform/IPC/ArgumentCoders.h:
1314         * PluginProcess/PluginProcess.cpp:
1315         (WebKit::PluginProcess::deleteWebsiteData):
1316         * PluginProcess/PluginProcess.h:
1317         * PluginProcess/PluginProcess.messages.in:
1318         * Scripts/webkit/messages.py:
1319         (headers_for_type):
1320         * Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
1321         (WebKit::RemoteLayerBackingStore::lastDisplayTime const):
1322         * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
1323         (WebKit::RemoteLayerBackingStore::RemoteLayerBackingStore):
1324         (WebKit::RemoteLayerBackingStore::display):
1325         * Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.h:
1326         * Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.mm:
1327         (WebKit::RemoteLayerBackingStoreCollection::markBackingStoreVolatile):
1328         (WebKit::RemoteLayerBackingStoreCollection::volatilityTimerFired):
1329         * Shared/WebCoreArgumentCoders.cpp:
1330         (IPC::ArgumentCoder<RecentSearch>::decode):
1331         (IPC::ArgumentCoder<WallTime>::encode): Deleted.
1332         (IPC::ArgumentCoder<WallTime>::decode): Deleted.
1333         * Shared/WebCoreArgumentCoders.h:
1334         * StorageProcess/StorageProcess.cpp:
1335         (WebKit::StorageProcess::deleteWebsiteData):
1336         * StorageProcess/StorageProcess.h:
1337         * StorageProcess/StorageProcess.messages.in:
1338         * UIProcess/API/C/WKApplicationCacheManager.cpp:
1339         (WKApplicationCacheManagerDeleteAllEntries):
1340         * UIProcess/API/C/WKCookieManager.cpp:
1341         (WKCookieManagerDeleteAllCookiesModifiedAfterDate):
1342         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
1343         (WKKeyValueStorageManagerDeleteAllEntries):
1344         * UIProcess/API/C/WKResourceCacheManager.cpp:
1345         (WKResourceCacheManagerClearCacheForAllOrigins):
1346         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
1347         (WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
1348         (WKWebsiteDataStoreStatisticsClearThroughWebsiteDataRemoval):
1349         (WKWebsiteDataStoreRemoveAllFetchCaches):
1350         (WKWebsiteDataStoreRemoveAllIndexedDatabases):
1351         (WKWebsiteDataStoreRemoveAllServiceWorkerRegistrations):
1352         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1353         (toSystemClockTime):
1354         (-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours:]):
1355         * UIProcess/API/glib/WebKitWebContext.cpp:
1356         (webkit_web_context_clear_cache):
1357         * UIProcess/API/glib/WebKitWebsiteDataManager.cpp:
1358         (webkit_website_data_manager_clear):
1359         * UIProcess/DrawingAreaProxy.h:
1360         * UIProcess/Network/NetworkProcessProxy.cpp:
1361         (WebKit::NetworkProcessProxy::deleteWebsiteData):
1362         * UIProcess/Network/NetworkProcessProxy.h:
1363         * UIProcess/Plugins/PluginProcessManager.cpp:
1364         (WebKit::PluginProcessManager::deleteWebsiteData):
1365         * UIProcess/Plugins/PluginProcessManager.h:
1366         * UIProcess/Plugins/PluginProcessProxy.cpp:
1367         (WebKit::PluginProcessProxy::deleteWebsiteData):
1368         * UIProcess/Plugins/PluginProcessProxy.h:
1369         * UIProcess/Storage/StorageProcessProxy.cpp:
1370         (WebKit::StorageProcessProxy::deleteWebsiteData):
1371         * UIProcess/Storage/StorageProcessProxy.h:
1372         * UIProcess/WebCookieManagerProxy.cpp:
1373         (WebKit::WebCookieManagerProxy::deleteAllCookiesModifiedSince):
1374         * UIProcess/WebCookieManagerProxy.h:
1375         * UIProcess/WebProcessProxy.cpp:
1376         (WebKit::WebProcessProxy::deleteWebsiteData):
1377         * UIProcess/WebProcessProxy.h:
1378         * UIProcess/WebResourceLoadStatisticsStore.cpp:
1379         (WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent):
1380         * UIProcess/WebResourceLoadStatisticsStore.h:
1381         * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp:
1382         (WebKit::LocalStorageDatabaseTracker::deleteDatabasesModifiedSince):
1383         * UIProcess/WebStorage/LocalStorageDatabaseTracker.h:
1384         * UIProcess/WebStorage/StorageManager.cpp:
1385         (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
1386         * UIProcess/WebStorage/StorageManager.h:
1387         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
1388         (WebKit::WebsiteDataStore::platformRemoveRecentSearches):
1389         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1390         (WebKit::WebsiteDataStore::removeData):
1391         (WebKit::WebsiteDataStore::removeMediaKeys):
1392         * UIProcess/WebsiteData/WebsiteDataStore.h:
1393         * UIProcess/gtk/WebPageProxyGtk.cpp:
1394         (WebKit::WebsiteDataStore::platformRemoveRecentSearches):
1395         * UIProcess/wpe/WebPageProxyWPE.cpp:
1396         (WebKit::WebsiteDataStore::platformRemoveRecentSearches):
1397         * WebProcess/Cookies/WebCookieManager.cpp:
1398         (WebKit::WebCookieManager::deleteAllCookiesModifiedSince):
1399         * WebProcess/Cookies/WebCookieManager.h:
1400         * WebProcess/Cookies/WebCookieManager.messages.in:
1401         * WebProcess/Plugins/PluginView.cpp:
1402         (WebKit::lastModifiedDateMS):
1403         * WebProcess/WebProcess.cpp:
1404         (WebKit::WebProcess::deleteWebsiteData):
1405         * WebProcess/WebProcess.h:
1406         * WebProcess/WebProcess.messages.in:
1407
1408 2018-01-02  Wenson Hsieh  <wenson_hsieh@apple.com>
1409
1410         [Attachment Support] Introduce data structures and IPC support for writing promised blobs
1411         https://bugs.webkit.org/show_bug.cgi?id=181189
1412
1413         Reviewed by Tim Horton.
1414
1415         Add IPC support for PromisedBlobInfo and PromisedBlobData. See WebCore/ChangeLog for more detail.
1416
1417         * Shared/WebCoreArgumentCoders.cpp:
1418         (IPC::ArgumentCoder<PromisedBlobData>::encode):
1419         (IPC::ArgumentCoder<PromisedBlobData>::decode):
1420         (IPC::ArgumentCoder<PromisedBlobInfo>::encode):
1421         (IPC::ArgumentCoder<PromisedBlobInfo>::decode):
1422         * Shared/WebCoreArgumentCoders.h:
1423
1424 2018-01-02  Michael Catanzaro  <mcatanzaro@igalia.com>
1425
1426         REGRESSION(r223253): Broke ResourceLoadStatistics layout tests for non-Cocoa ports
1427         https://bugs.webkit.org/show_bug.cgi?id=181231
1428
1429         Reviewed by Alex Christensen.
1430
1431         Add new C API for use by WebKitTestRunner.
1432
1433         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
1434         (WKWebsiteDataStoreIsStatisticsRegisteredAsSubFrameUnder):
1435         (WKWebsiteDataStoreIsStatisticsRegisteredAsRedirectingTo):
1436         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
1437
1438 2018-01-02  Jiewen Tan  <jiewen_tan@apple.com>
1439
1440         Add a WebAuthentication runtime feature flag
1441         https://bugs.webkit.org/show_bug.cgi?id=181220
1442         <rdar://problem/36055305>
1443
1444         Reviewed by Brent Fulgham.
1445
1446         Renames the CredentialManagement runtime feature flag into WebAuthentication.
1447
1448         * Shared/WebPreferences.yaml:
1449         * UIProcess/API/C/WKPreferences.cpp:
1450         (WKPreferencesSetWebAuthenticationEnabled):
1451         (WKPreferencesGetWebAuthenticationEnabled):
1452         (WKPreferencesSetCredentialManagementEnabled): Deleted.
1453         (WKPreferencesGetCredentialManagementEnabled): Deleted.
1454         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1455         * WebProcess/WebPage/WebPage.cpp:
1456         (WebKit::WebPage::updatePreferences):
1457
1458 2018-01-02  Michael Catanzaro  <mcatanzaro@igalia.com>
1459
1460         REGRESSION(r226327): [GTK] Plugin process is broken
1461         https://bugs.webkit.org/show_bug.cgi?id=181187
1462
1463         Unreviewed, fix PluginProcessMainUnix after r226327.
1464
1465         * PluginProcess/unix/PluginProcessMainUnix.cpp:
1466
1467 2018-01-02  Tim Horton  <timothy_horton@apple.com>
1468
1469         Fix the build on platforms where UICurrentUserInterfaceIdiomIsPad is defined to false
1470         https://bugs.webkit.org/show_bug.cgi?id=181218
1471
1472         Reviewed by Alex Christensen.
1473
1474         * Platform/spi/ios/UIKitSPI.h:
1475         (currentUserInterfaceIdiomIsPad):
1476         * UIProcess/ios/SmartMagnificationController.mm:
1477         (WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
1478         * UIProcess/ios/WKContentViewInteraction.mm:
1479         (-[WKFormInputSession setAccessoryViewCustomButtonTitle:]):
1480         (-[WKContentView _requiresKeyboardWhenFirstResponder]):
1481         (-[WKContentView _displayFormNodeInputView]):
1482         (-[WKContentView requiresAccessoryView]):
1483         (-[WKContentView _updateAccessory]):
1484         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
1485         (-[WKAirPlayRoutePicker show:fromRect:]):
1486         * UIProcess/ios/forms/WKFileUploadPanel.mm:
1487         (-[WKFileUploadPanel _showPhotoPickerWithSourceType:]):
1488         (-[WKFileUploadPanel _presentMenuOptionForCurrentInterfaceIdiom:]):
1489         * UIProcess/ios/forms/WKFormInputControl.mm:
1490         (-[WKDateTimePicker initWithView:datePickerMode:]):
1491         (-[WKFormInputControl initWithView:]):
1492         * UIProcess/ios/forms/WKFormSelectControl.mm:
1493         (-[WKFormSelectControl initWithView:]):
1494         On platforms where UICurrentUserInterfaceIdiomIsPad is defined to false,
1495         blocks that conditionally execute based on its value are unreachable.
1496         This causes the compiler to complain. Hide it away inside an inline function
1497         and make use of that everywhere we used to use the macro.
1498
1499 2018-01-02  Alex Christensen  <achristensen@webkit.org>
1500
1501         Remove SVN file accidentally added in r226160
1502         https://bugs.webkit.org/show_bug.cgi?id=180934
1503
1504         * UIProcess/WebPageProxy.cpp.orig: Removed.
1505
1506 2018-01-02  Alex Christensen  <achristensen@webkit.org>
1507
1508         Use BlockPtrs and lambdas instead of new/delete to pass parameters to blocks in WebViewImpl::performDragOperation
1509         https://bugs.webkit.org/show_bug.cgi?id=180795
1510
1511         Reviewed by Brent Fulgham.
1512
1513         * UIProcess/Cocoa/WebViewImpl.mm:
1514         (WebKit::WebViewImpl::performDragOperation):
1515
1516 2018-01-02  Michael Catanzaro  <mcatanzaro@igalia.com>
1517
1518         [WPE][GTK] Implement the assignment of ProcessIdentifiers to child processes
1519         https://bugs.webkit.org/show_bug.cgi?id=181187
1520
1521         Reviewed by Brady Eidson.
1522
1523         * Shared/ChildProcess.cpp: Make the ProcessIdentifier mandatory.
1524         (WebKit::ChildProcess::initialize):
1525         * Shared/unix/ChildProcessMain.cpp: Initialize ChildProcessInitializationParameters with the
1526         ProcessIdentifier.
1527         (WebKit::ChildProcessMainBase::parseCommandLine):
1528         * UIProcess/Launcher/glib/ProcessLauncherGLib.cpp: Copy the ProcessIdentifier from
1529         LaunchOptions into argv.
1530         (WebKit::ProcessLauncher::launchProcess):
1531         * WebProcess/wpe/WebProcessMainWPE.cpp: Expect the WPE socket ID later in the command line.
1532
1533 2018-01-02  Alex Christensen  <achristensen@webkit.org>
1534
1535         Use new WebsiteDataStore passed in through decidePolicyForNavigation SPI
1536         https://bugs.webkit.org/show_bug.cgi?id=180897
1537         <rdar://problem/35535328>
1538
1539         Reviewed by Brent Fulgham.
1540
1541         * Shared/WebsitePoliciesData.cpp:
1542         (WebKit::WebsitePoliciesData::applyToDocumentLoader):
1543         * UIProcess/Cocoa/NavigationState.mm:
1544         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
1545         * UIProcess/WebPageProxy.cpp:
1546         (WebKit::WebPageProxy::changeWebsiteDataStore):
1547         * UIProcess/WebPageProxy.h:
1548         * UIProcess/WebProcessPool.cpp:
1549         (WebKit::WebProcessPool::pageBeginUsingWebsiteDataStore):
1550         (WebKit::WebProcessPool::pageEndUsingWebsiteDataStore):
1551         (WebKit::WebProcessPool::pageAddedToProcess): Deleted.
1552         (WebKit::WebProcessPool::pageRemovedFromProcess): Deleted.
1553         * UIProcess/WebProcessPool.h:
1554         * UIProcess/WebProcessProxy.cpp:
1555         (WebKit::WebProcessProxy::addExistingWebPage):
1556         (WebKit::WebProcessProxy::removeWebPage):
1557         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
1558         (WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession):
1559
1560 2018-01-02  Alex Christensen  <achristensen@webkit.org>
1561
1562         Only use CookieStorageShim when we aren't using NetworkSession
1563         https://bugs.webkit.org/show_bug.cgi?id=180766
1564
1565         Reviewed by Brent Fulgham.
1566
1567         * Shared/mac/CookieStorageShim.h:
1568         * Shared/mac/CookieStorageShim.mm:
1569         * WebProcess/WebProcess.cpp:
1570         (WebKit::WebProcess::initializeWebProcess):
1571
1572 2018-01-02  Alex Christensen  <achristensen@webkit.org>
1573
1574         Clean up context menu code
1575         https://bugs.webkit.org/show_bug.cgi?id=181074
1576
1577         Reviewed by Brent Fulgham.
1578
1579         Use Ref instead of RefPtr where possible.
1580         Use move semantics instead of copying from const references when possible.
1581         Remove dead iOS code.  Reduce allocations.  Add stub for WPE.
1582
1583         * UIProcess/API/APIContextMenuClient.h:
1584         (API::ContextMenuClient::getContextMenuFromProposedMenu):
1585         (API::ContextMenuClient::getContextMenuFromProposedMenuAsync):
1586         (API::ContextMenuClient::showContextMenu):
1587         * UIProcess/API/C/WKPage.cpp:
1588         (WKPageSetPageContextMenuClient):
1589         * UIProcess/API/gtk/PageClientImpl.cpp:
1590         (WebKit::PageClientImpl::createContextMenuProxy):
1591         * UIProcess/API/gtk/PageClientImpl.h:
1592         * UIProcess/PageClient.h:
1593         * UIProcess/WebContextMenuListenerProxy.cpp:
1594         (WebKit::WebContextMenuListenerProxy::useContextMenuItems):
1595         * UIProcess/WebContextMenuProxy.cpp:
1596         (WebKit::WebContextMenuProxy::WebContextMenuProxy):
1597         * UIProcess/WebContextMenuProxy.h:
1598         * UIProcess/WebPageProxy.cpp:
1599         (WebKit::WebPageProxy::showContextMenu):
1600         (WebKit::WebPageProxy::internalShowContextMenu): Deleted.
1601         * UIProcess/WebPageProxy.h:
1602         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
1603         (WebKit::WebContextMenuProxyGtk::showContextMenuWithItems):
1604         (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
1605         * UIProcess/gtk/WebContextMenuProxyGtk.h:
1606         (WebKit::WebContextMenuProxyGtk::create):
1607         * UIProcess/ios/PageClientImplIOS.h:
1608         * UIProcess/ios/PageClientImplIOS.mm:
1609         (WebKit::PageClientImpl::createContextMenuProxy): Deleted.
1610         * UIProcess/mac/PageClientImplMac.h:
1611         * UIProcess/mac/PageClientImplMac.mm:
1612         (WebKit::PageClientImpl::createContextMenuProxy):
1613         * UIProcess/mac/WebContextMenuProxyMac.h:
1614         (WebKit::WebContextMenuProxyMac::create):
1615         * UIProcess/mac/WebContextMenuProxyMac.mm:
1616         (WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
1617         (WebKit::WebContextMenuProxyMac::showContextMenuWithItems):
1618         (WebKit::WebContextMenuProxyMac::showContextMenu):
1619
1620 == Rolled over to ChangeLog-2018-01-01 ==