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