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