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