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