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