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