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