58ebcd7db57c1a247db455957db0988cf46ce4bb
[WebKit-https.git] / Source / WebKit / ChangeLog
1 2017-10-11  Ryosuke Niwa  <rniwa@webkit.org>
2
3         Sanitize URL in pasteboard for other applications and cross origin content
4         https://bugs.webkit.org/show_bug.cgi?id=178060
5         <rdar://problem/34874518>
6
7         Reviewed by Wenson Hsieh.
8
9         Plubmed the origin identifier through IPC from Pasteboard in WebContent process to PlatformPasteboard in UIProcess.
10
11         * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
12         (WebKit::WebPasteboardProxy::typesSafeForDOMToReadAndWrite):
13         * UIProcess/WebPasteboardProxy.cpp:
14         (WebKit::WebPasteboardProxy::typesSafeForDOMToReadAndWrite):
15         * UIProcess/WebPasteboardProxy.h:
16         * UIProcess/WebPasteboardProxy.messages.in:
17         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
18         (WebKit::WebPlatformStrategies::typesSafeForDOMToReadAndWrite):
19         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
20
21 2017-10-11  Chris Dumez  <cdumez@apple.com>
22
23         Modernize Geolocation code
24         https://bugs.webkit.org/show_bug.cgi?id=178148
25
26         Reviewed by Ryosuke Niwa.
27
28         * Shared/WebGeolocationPosition.cpp:
29         (WebKit::WebGeolocationPosition::create):
30         (WebKit::WebGeolocationPosition::~WebGeolocationPosition):
31         * Shared/WebGeolocationPosition.h:
32         (WebKit::WebGeolocationPosition::timestamp const):
33         (WebKit::WebGeolocationPosition::latitude const):
34         (WebKit::WebGeolocationPosition::longitude const):
35         (WebKit::WebGeolocationPosition::accuracy const):
36         (WebKit::WebGeolocationPosition::altitude const):
37         (WebKit::WebGeolocationPosition::altitudeAccuracy const):
38         (WebKit::WebGeolocationPosition::heading const):
39         (WebKit::WebGeolocationPosition::speed const):
40         (WebKit::WebGeolocationPosition::corePosition const):
41         (WebKit::WebGeolocationPosition::WebGeolocationPosition):
42         * UIProcess/API/C/WKGeolocationPosition.cpp:
43         (WKGeolocationPositionCreate_b):
44         * UIProcess/API/Cocoa/_WKGeolocationPosition.mm:
45         (WebKit::wrapper):
46         * UIProcess/API/glib/WebKitGeolocationProvider.cpp:
47         (WebKit::WebKitGeolocationProvider::notifyPositionChanged):
48         * UIProcess/WebGeolocationManagerProxy.cpp:
49         (WebKit::WebGeolocationManagerProxy::providerDidChangePosition):
50         * UIProcess/ios/WKGeolocationProviderIOS.mm:
51         (-[WKLegacyCoreLocationProvider positionChanged:]):
52         * WebProcess/Geolocation/WebGeolocationManager.cpp:
53         (WebKit::WebGeolocationManager::didChangePosition):
54         * WebProcess/Geolocation/WebGeolocationManager.h:
55         * WebProcess/Geolocation/WebGeolocationManager.messages.in:
56         * WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
57         (WebKit::WebGeolocationClient::lastPosition):
58         * WebProcess/WebCoreSupport/WebGeolocationClient.h:
59
60 2017-10-11  Brady Eidson  <beidson@apple.com>
61
62         Add a SW context process (where SW scripts will actually execute).
63         https://bugs.webkit.org/show_bug.cgi?id=178156
64
65         Reviewed by Andy Estes.
66
67         This patch adds an auxiliary "ServiceWorker context" WebProcess to a WebProcessPool.
68
69         This process is where ServiceWorker scripts will execute, separate from the client WebProcess
70         hosting the page(s) they are serving.
71
72         This patch also adds all of the plumbing to pass along a fetched service worker script to this
73         context WebProcess, as well as message back failure to actually start the script so we can test.
74
75         Touches lots of code sites but is basically just a lot of plumbing.
76
77         * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
78         (WebKit::WebSWServerConnection::WebSWServerConnection):
79         (WebKit::WebSWServerConnection::startServiceWorkerContext):
80         (WebKit::WebSWServerConnection::sendToContextProcess):
81         (WebKit::WebSWServerConnection::setContextConnection):
82         * StorageProcess/ServiceWorker/WebSWServerConnection.h:
83
84         * StorageProcess/StorageProcess.cpp:
85         (WebKit::StorageProcess::workerContextProcessConnection):
86         (WebKit::StorageProcess::createWorkerContextProcessConnection):
87         (WebKit::StorageProcess::didGetWorkerContextProcessConnection):
88         (WebKit::StorageProcess::serviceWorkerContextFailedToStart):
89         (WebKit::StorageProcess::registerSWServerConnection):
90         (WebKit::StorageProcess::unregisterSWServerConnection):
91         * StorageProcess/StorageProcess.h:
92         * StorageProcess/StorageProcess.messages.in:
93
94         * StorageProcess/StorageToWebProcessConnection.cpp:
95         (WebKit::StorageToWebProcessConnection::~StorageToWebProcessConnection):
96         (WebKit::StorageToWebProcessConnection::establishSWServerConnection):
97         (WebKit::StorageToWebProcessConnection::removeSWServerConnection):
98         (WebKit::StorageToWebProcessConnection::workerContextProcessConnectionCreated):
99         * StorageProcess/StorageToWebProcessConnection.h:
100
101         * UIProcess/Storage/StorageProcessProxy.cpp:
102         (WebKit::StorageProcessProxy::create):
103         (WebKit::StorageProcessProxy::StorageProcessProxy):
104         (WebKit::StorageProcessProxy::didClose):
105         (WebKit::StorageProcessProxy::getWorkerContextProcessConnection):
106         (WebKit::StorageProcessProxy::didGetWorkerContextProcessConnection):
107         * UIProcess/Storage/StorageProcessProxy.h:
108         * UIProcess/Storage/StorageProcessProxy.messages.in:
109
110         * UIProcess/WebProcessPool.cpp:
111         (WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore):
112         (WebKit::WebProcessPool::getWorkerContextProcessConnection):
113         (WebKit::WebProcessPool::didGetWorkerContextProcessConnection):
114         (WebKit::WebProcessPool::disconnectProcess):
115         (WebKit::WebProcessPool::createWebPage):
116         * UIProcess/WebProcessPool.h:
117
118         * UIProcess/WebProcessProxy.cpp:
119         (WebKit::WebProcessProxy::didGetWorkerContextConnection):
120         * UIProcess/WebProcessProxy.h:
121         * UIProcess/WebProcessProxy.messages.in:
122
123         * WebProcess/WebProcess.cpp:
124         (WebKit::WebProcess::getWorkerContextConnection):
125         (WebKit::WebProcess::startServiceWorkerContext):
126         * WebProcess/WebProcess.h:
127         * WebProcess/WebProcess.messages.in:
128
129 2017-10-11  Don Olmstead  <don.olmstead@sony.com>
130
131         Remove ENABLE_NETWORK_CACHE
132         https://bugs.webkit.org/show_bug.cgi?id=177424
133
134         Reviewed by Antti Koivisto.
135
136         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
137         (WebKit::NetworkConnectionToWebProcess::storeDerivedDataToCache):
138         * NetworkProcess/NetworkConnectionToWebProcess.h:
139         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
140         * NetworkProcess/NetworkProcess.cpp:
141         (WebKit::fetchDiskCacheEntries):
142         (WebKit::clearDiskCacheEntries):
143         (WebKit::NetworkProcess::setCacheModel):
144         * NetworkProcess/NetworkProcess.h:
145         (WebKit::NetworkProcess::cache):
146         * NetworkProcess/NetworkProcessCreationParameters.cpp:
147         (WebKit::NetworkProcessCreationParameters::encode const):
148         (WebKit::NetworkProcessCreationParameters::decode):
149         * NetworkProcess/NetworkProcessCreationParameters.h:
150         * NetworkProcess/NetworkResourceLoader.cpp:
151         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
152         (WebKit::NetworkResourceLoader::canUseCachedRedirect const):
153         (WebKit::NetworkResourceLoader::start):
154         (WebKit::NetworkResourceLoader::retrieveCacheEntry):
155         (WebKit::NetworkResourceLoader::startNetworkLoad):
156         (WebKit::NetworkResourceLoader::abort):
157         (WebKit::NetworkResourceLoader::didReceiveResponse):
158         (WebKit::NetworkResourceLoader::didReceiveBuffer):
159         (WebKit::NetworkResourceLoader::didFinishLoading):
160         (WebKit::NetworkResourceLoader::didFailLoading):
161         (WebKit::NetworkResourceLoader::willSendRedirectedRequest):
162         (WebKit::NetworkResourceLoader::continueWillSendRequest):
163         (WebKit::NetworkResourceLoader::dispatchWillSendRequestForCacheEntry):
164         * NetworkProcess/NetworkResourceLoader.h:
165         * NetworkProcess/cache/NetworkCache.cpp:
166         * NetworkProcess/cache/NetworkCache.h:
167         * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
168         * NetworkProcess/cache/NetworkCacheBlobStorage.h:
169         * NetworkProcess/cache/NetworkCacheCoders.cpp:
170         * NetworkProcess/cache/NetworkCacheCoders.h:
171         * NetworkProcess/cache/NetworkCacheCodersCocoa.cpp:
172         * NetworkProcess/cache/NetworkCacheCodersSoup.cpp:
173         * NetworkProcess/cache/NetworkCacheData.cpp:
174         * NetworkProcess/cache/NetworkCacheData.h:
175         * NetworkProcess/cache/NetworkCacheDataCocoa.mm:
176         * NetworkProcess/cache/NetworkCacheDataSoup.cpp:
177         * NetworkProcess/cache/NetworkCacheEntry.cpp:
178         * NetworkProcess/cache/NetworkCacheEntry.h:
179         * NetworkProcess/cache/NetworkCacheFileSystem.cpp:
180         * NetworkProcess/cache/NetworkCacheFileSystem.h:
181         * NetworkProcess/cache/NetworkCacheIOChannel.h:
182         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
183         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
184         * NetworkProcess/cache/NetworkCacheKey.cpp:
185         * NetworkProcess/cache/NetworkCacheKey.h:
186         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
187         * NetworkProcess/cache/NetworkCacheStatistics.h:
188         * NetworkProcess/cache/NetworkCacheStorage.cpp:
189         * NetworkProcess/cache/NetworkCacheStorage.h:
190         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
191         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
192         (WebKit::NetworkProcess::clearDiskCache):
193         * NetworkProcess/ios/NetworkProcessIOS.mm:
194         (WebKit::NetworkProcess::clearCacheForAllOrigins):
195         * NetworkProcess/soup/NetworkProcessSoup.cpp:
196         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
197         (WebKit::NetworkProcess::clearDiskCache):
198         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
199         (WebKit::registerUserDefaultsIfNeeded):
200         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
201         (WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):
202         (WebKit::WebProcessPool::isNetworkCacheEnabled):
203         * UIProcess/soup/WebProcessPoolSoup.cpp:
204         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
205         * WebProcess/Network/WebLoaderStrategy.cpp:
206         (WebKit::WebLoaderStrategy::storeDerivedDataToCache):
207         * config.h:
208
209 2017-10-11  Michael Catanzaro  <mcatanzaro@igalia.com>
210
211         Unreviewed, rolling out r223146.
212
213         Better to not expose cairo in the WPE API
214
215         Reverted changeset:
216
217         "[WPE] Header cairo.h is used in GLib API headers but cannot
218         be found"
219         https://bugs.webkit.org/show_bug.cgi?id=178100
220         http://trac.webkit.org/changeset/223146
221
222 2017-09-27  Frederic Wang  <fwang@igalia.com>
223
224         [iOS] Do not flatten frames when async frame scrolling is enabled
225         https://bugs.webkit.org/show_bug.cgi?id=173704
226
227         Reviewed by Simon Fraser.
228
229         This patch disables frame flattening when async frame scrolling is enabled on iOS, as
230         otherwise you can not scroll them. Once iframe scrolling is implemented in iOS (bug 149264),
231         developers and beta testers will be able to check it by enabling "Async Frame Scrolling"
232         in the "Experimental WebKit Features" menu of Safari iOS.
233
234         Test: platform/ios/fast/frames/flattening/iframe-flattening-with-async-frame-scrolling.html
235
236         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
237         (WebKit::WebChromeClient::contentsSizeChanged): Use effectiveFrameFlattening() introduced in
238         Source/WebCore.
239
240 2017-10-10  Ryosuke Niwa  <rniwa@webkit.org>
241
242         Enable custom pasteboard data in DumpRenderTree and WebKitTestRunner
243         https://bugs.webkit.org/show_bug.cgi?id=178154
244
245         Reviewed by Wenson Hsieh.
246
247         Plumbed customPasteboardDataEnabled flag to be used in WebKitTestRunner.
248
249         * Shared/WebPreferencesDefinitions.h:
250         * UIProcess/API/C/WKPreferences.cpp:
251         (WKPreferencesSetCustomPasteboardDataEnabled):
252         (WKPreferencesGetCustomPasteboardDataEnabled):
253         * UIProcess/API/C/WKPreferencesRefPrivate.h:
254         * WebProcess/WebPage/WebPage.cpp:
255         (WebKit::WebPage::updatePreferences):
256
257 2017-10-10  Adrian Perez de Castro  <aperez@igalia.com>
258
259         [WPE] Remove the possibility of installing the old WebKit2 C API
260         https://bugs.webkit.org/show_bug.cgi?id=178125
261
262         Reviewed by Michael Catanzaro.
263
264         * PlatformWPE.cmake: Remove support for installing the deprecated C API.
265
266 2017-10-10  Chris Dumez  <cdumez@apple.com>
267
268         [WK2] Add API to clear service worker registrations
269         https://bugs.webkit.org/show_bug.cgi?id=178085
270         <rdar://problem/34866025>
271
272         Reviewed by Ryosuke Niwa.
273
274         Add API to clear service worker registrations. Although the request to
275         clear the registration is passed on to the StorageProcess, it is currently
276         a no-op on StorageProcess side until we actually persist service worker
277         registrations on disk.
278
279         * Shared/WebsiteData/WebsiteDataType.h:
280         * StorageProcess/StorageProcess.cpp:
281         (WebKit::StorageProcess::fetchWebsiteData):
282         (WebKit::StorageProcess::deleteWebsiteData):
283         (WebKit::StorageProcess::deleteWebsiteDataForOrigins):
284         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
285         (WKWebsiteDataStoreRemoveAllServiceWorkerRegistrations):
286         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
287         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
288         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
289         (dataTypesToString):
290         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
291         (WebKit::toWebsiteDataType):
292         (WebKit::toWKWebsiteDataTypes):
293         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
294         (+[WKWebsiteDataStore allWebsiteDataTypes]):
295         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
296         (WebKit::WebsiteDataStore::fetchDataAndApply):
297         (WebKit::WebsiteDataStore::removeData):
298
299 2017-10-10  Commit Queue  <commit-queue@webkit.org>
300
301         Unreviewed, rolling out r223130.
302         https://bugs.webkit.org/show_bug.cgi?id=178147
303
304         Breaks the build when EGLNativeWindowType is a pointer
305         (Requested by aperezdc on #webkit).
306
307         Reverted changeset:
308
309         "[WPE] Build failure due to invalid cast of
310         EGLNativeWindowType when targetting 64-bit ARM"
311         https://bugs.webkit.org/show_bug.cgi?id=178090
312         http://trac.webkit.org/changeset/223130
313
314 2017-10-10  Sam Weinig  <sam@webkit.org>
315
316         Replace copyKeysToVector/copyValuesToVector with copyToVector(map.keys())/copyToVector(map.values())
317         https://bugs.webkit.org/show_bug.cgi?id=178102
318
319         Reviewed by Tim Horton.
320
321         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
322         (WebKit::NetworkConnectionToWebProcess::didClose):
323         * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:
324         (WebKit::dumpChangedLayers):
325         * UIProcess/API/glib/WebKitWebContext.cpp:
326         (webkitWebContextInvalidateCustomProtocolRequests):
327         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
328         (webkitWebViewBaseContainerForall):
329         * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:
330         (-[WKWebViewContentProviderRegistry _mimeTypesWithCustomContentProviders]):
331         * UIProcess/GenericCallback.h:
332         (WebKit::invalidateCallbackMap):
333         * UIProcess/WebProcessProxy.cpp:
334         (WebKit::WebProcessProxy::shutDown):
335         (WebKit::WebProcessProxy::didClose):
336         (WebKit::WebProcessProxy::didBecomeUnresponsive):
337         (WebKit::WebProcessProxy::didBecomeResponsive):
338         (WebKit::WebProcessProxy::willChangeIsResponsive):
339         (WebKit::WebProcessProxy::didChangeIsResponsive):
340         (WebKit::WebProcessProxy::disconnectFramesFromPage):
341         (WebKit::WebProcessProxy::frameCountInPage const):
342         (WebKit::WebProcessProxy::requestTermination):
343         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
344         (WebKit::NPRuntimeObjectMap::invalidate):
345         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
346         (WebKit::NetscapePlugin::stopAllStreams):
347         * WebProcess/Plugins/PluginView.cpp:
348         (WebKit::PluginView::cancelAllStreams):
349         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm:
350         (WebKit::RemoteLayerTreeContext::buildTransaction):
351         * WebProcess/WebProcess.cpp:
352         (WebKit::WebProcess::didClose):
353
354 2017-10-10  Adrian Perez de Castro  <aperez@igalia.com>
355
356         [WPE] Header cairo.h is used in GLib API headers but cannot be found
357         https://bugs.webkit.org/show_bug.cgi?id=178100
358
359         Reviewed by Michael Catanzaro.
360
361         * wpe/wpe-webkit.pc.in: Add Cairo to the "Requires" field, so its flags get pulled
362         in and the "cairo.h", used in the WPE WebKit GLib API headers, can be found.
363
364 2017-10-10  Michael Catanzaro  <mcatanzaro@igalia.com>
365
366         CSS constant properties should not be enabled by default
367         https://bugs.webkit.org/show_bug.cgi?id=177416
368
369         Reviewed by Darin Adler.
370
371         * Shared/WebPreferencesDefinitions.h:
372
373 2017-10-10  Brady Eidson  <beidson@apple.com>
374
375         Random StorageProcess and SWServer cleanup.
376         https://bugs.webkit.org/show_bug.cgi?id=178141
377
378         Reviewed by Andy Estes.
379
380         -StorageProcess should own the set of SWServers
381         -Some renaming and cleanup
382
383         * StorageProcess/StorageProcess.cpp:
384         (WebKit::StorageProcess::createStorageToWebProcessConnection):
385         (WebKit::StorageProcess::swServerForSession):
386         * StorageProcess/StorageProcess.h:
387         (WebKit::StorageProcess::queue):
388
389         * StorageProcess/StorageToWebProcessConnection.cpp:
390         (WebKit::StorageToWebProcessConnection::establishSWServerConnection):
391         * StorageProcess/StorageToWebProcessConnection.h:
392
393 2017-10-10  Michael Catanzaro  <mcatanzaro@igalia.com>
394
395         Unreviewed, rolling out r223136.
396
397         Forgot to update GTK API header
398
399         Reverted changeset:
400
401         "[WPE] Header cairo.h is used in GLib API headers but cannot
402         be found"
403         https://bugs.webkit.org/show_bug.cgi?id=178100
404         http://trac.webkit.org/changeset/223136
405
406 2017-10-10  Adrian Perez de Castro  <aperez@igalia.com>
407
408         [WPE] Header cairo.h is used in GLib API headers but cannot be found
409         https://bugs.webkit.org/show_bug.cgi?id=178100
410
411         Reviewed by Žan Doberšek.
412
413         Instead of including <cairo.h>, it is better to forward-declare cairo_surface_t,
414         which is the one and only Cairo declaration needed by the WPE API header.
415
416         * UIProcess/API/glib/WebKitFaviconDatabase.cpp: Add inclusion of <cairo.h>.
417         * UIProcess/API/glib/WebKitWebView.cpp: Add inclusion of <cairo.h>.
418         * UIProcess/API/wpe/WebKitFaviconDatabase.h: Add forward declaration of cairo_surface_t.
419
420 2017-10-10  Adrian Perez de Castro  <aperez@igalia.com>
421
422         [WPE] Cannot link against libWPEWebkit due to wrong contents of wpe-webkit.pc
423         https://bugs.webkit.org/show_bug.cgi?id=178133
424
425         Reviewed by Žan Doberšek.
426
427         * wpe/wpe-webkit.pc.in: Remove "-lWPE" and replace "Requires.private" with a plain "Requires".
428
429 2017-10-10  Adrian Perez de Castro  <aperez@igalia.com>
430
431         [WPE] Build failure due to invalid cast of EGLNativeWindowType when targetting 64-bit ARM
432         https://bugs.webkit.org/show_bug.cgi?id=178090
433
434         Reviewed by Žan Doberšek.
435
436         * WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.cpp:
437         (WebKit::AcceleratedSurfaceWPE::window const): Use static_cast instead of reinterpret_cast,
438         this way extending values of EGLNativeWindowType to 64 bits is allowed.
439
440 2017-10-10  Adrian Perez de Castro  <aperez@igalia.com>
441
442         [WPE] GLib API headers WebKitScriptDialog.h and WebKitFileChooserRequest.h are not installed
443         https://bugs.webkit.org/show_bug.cgi?id=178104
444
445         Reviewed by Žan Doberšek.
446
447         * PlatformWPE.cmake: Add missing header paths to the WPE_API_INSTALLED_HEADERS variable.
448
449 2017-10-10  Adrian Perez de Castro  <aperez@igalia.com>
450
451         [WPE][CMake] The “install” target should install all public API headers
452         https://bugs.webkit.org/show_bug.cgi?id=176475
453
454         Reviewed by Žan Doberšek.
455
456         Install the WPE port GLib-based API headers. The deprecated C API is still available,
457         but disabled by default behind the "EXPORT_DEPRECATED_WEBKIT2_C_API" CMake option.
458
459         * PlatformWPE.cmake: Always install "wpe-webkit.pc" and the GLib C API for WPE.
460
461 2017-10-09  Jeremy Jones  <jeremyj@apple.com>
462
463         Fix typo of virtual keyword in PageClientImplIOS.h
464         https://bugs.webkit.org/show_bug.cgi?id=178088
465
466         Reviewed by Simon Fraser.
467
468         This compile error happens when FULLSCREEN_API is enabled for iOS.
469         Remove the redundant virtual keyword since function is marked override.
470
471         * UIProcess/ios/PageClientImplIOS.h:
472
473 2017-10-09  Chris Dumez  <cdumez@apple.com>
474
475         [iOS][WK2] Tiles outsides the viewport are sometimes missing after relaunching a crashes WebProcess
476         https://bugs.webkit.org/show_bug.cgi?id=178095
477         <rdar://problem/34415016>
478
479         Reviewed by Simon Fraser.
480
481         Make sure we reset WKWebView._hasScheduledVisibleRectUpdate to NO in WKWebView._processDidExit.
482         _scheduleVisibleContentRectUpdateAfterScrollInView would otherwise return early because
483         WKWebView._hasScheduledVisibleRectUpdate is always YES. Normally,
484         _addUpdateVisibleContentRectPreCommitHandler sets a CATransaction commit handler that
485         resets _hasScheduledVisibleRectUpdate to NO, but it does not do so when ![webView _isValid]
486         (which is true when the WebProcess has crashed.
487
488         Also reset WKWebView._commitDidRestoreScrollPosition to NO in WKWebView._processDidExit even
489         though it does not seem to be the cause of this bug. It seems to make sense to reset this member
490         when the process crashes.
491
492         * UIProcess/API/Cocoa/WKWebView.mm:
493         (-[WKWebView _processDidExit]):
494
495 2017-10-09  Youenn Fablet  <youenn@apple.com>
496
497         Add quota to cache API
498         https://bugs.webkit.org/show_bug.cgi?id=177552
499
500         Reviewed by Alex Christensen.
501
502         Adding support for quota checking in CacheStorage::Caches.
503         It is passed to NetworkProcess at creation time.
504         Default quota size is configured to 400Ko by origin per default.
505         This value is suitable for testing.
506         Future patch should raise this default value and allows configuring it.
507
508         Quota is computed based on the response body size.
509         This size is padded at WebCore for opaque responses.
510         Size is stored persistently as opaque response padded size should remain stable.
511         See https://github.com/whatwg/storage/issues/31 for the rationale about this padding.
512
513         In case of putting several records at the same time, the size of all records
514         is computed so that all records will be written or rejected together.
515
516         Sending QuotaExceeded error when quota is exceeded.
517         Future effort should allow asking UIProcess for quota extension.
518
519         * NetworkProcess/NetworkProcess.cpp:
520         (WebKit::NetworkProcess::cacheStoragePerOriginQuota const):
521         * NetworkProcess/NetworkProcess.h:
522         * NetworkProcess/NetworkProcessCreationParameters.cpp:
523         (WebKit::NetworkProcessCreationParameters::encode const):
524         (WebKit::NetworkProcessCreationParameters::decode):
525         * NetworkProcess/NetworkProcessCreationParameters.h:
526         * NetworkProcess/cache/CacheStorageEngine.cpp:
527         (WebKit::CacheStorage::Engine::readCachesFromDisk):
528         * NetworkProcess/cache/CacheStorageEngineCache.cpp:
529         (WebKit::CacheStorage::Cache::toRecordInformation):
530         (WebKit::CacheStorage::isolatedCopy):
531         (WebKit::CacheStorage::Cache::open):
532         (WebKit::CacheStorage::Cache::storeRecords):
533         (WebKit::CacheStorage::Cache::put):
534         (WebKit::CacheStorage::Cache::writeRecordToDisk):
535         (WebKit::CacheStorage::Cache::updateRecordToDisk):
536         (WebKit::CacheStorage::Cache::removeRecordFromDisk):
537         (WebKit::CacheStorage::Cache::encode):
538         (WebKit::CacheStorage::Cache::decodeRecordHeader):
539         (WebKit::CacheStorage::Cache::decode):
540         * NetworkProcess/cache/CacheStorageEngineCache.h:
541         * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
542         (WebKit::CacheStorage::Caches::Caches):
543         (WebKit::CacheStorage::Caches::initialize):
544         (WebKit::CacheStorage::Caches::initializeSize):
545         (WebKit::CacheStorage::Caches::requestSpace):
546         (WebKit::CacheStorage::Caches::writeRecord):
547         (WebKit::CacheStorage::Caches::removeRecord):
548         (WebKit::CacheStorage::Caches::removeCacheEntry):
549         * NetworkProcess/cache/CacheStorageEngineCaches.h:
550         (WebKit::CacheStorage::Caches::create):
551         (WebKit::CacheStorage::Caches::hasEnoughSpace const):
552         * NetworkProcess/cache/NetworkCacheStorage.cpp:
553         (WebKit::NetworkCache::Storage::traverse):
554         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
555         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
556         * Shared/WebCoreArgumentCoders.cpp:
557         (IPC::ArgumentCoder<DOMCacheEngine::Record>::encode):
558         (IPC::ArgumentCoder<DOMCacheEngine::Record>::decode):
559         * UIProcess/API/APIProcessPoolConfiguration.cpp:
560         (API::ProcessPoolConfiguration::copy):
561         * UIProcess/API/APIProcessPoolConfiguration.h:
562         * UIProcess/WebProcessPool.cpp:
563         (WebKit::WebProcessPool::ensureNetworkProcess):
564
565 2017-10-09  Sam Weinig  <sam@webkit.org>
566
567         Make HashMap::keys() and HashMap::values() work with WTF::map/WTF::copyToVector
568         https://bugs.webkit.org/show_bug.cgi?id=178072
569
570         Reviewed by Darin Adler.
571
572         * Shared/AsyncRequest.h:
573         (WebKit::AsyncRequestMap::values):
574         * UIProcess/WebProcessProxy.h:
575         (WebKit::WebProcessProxy::pages const):
576
577             Update for type change for HashMap::values().
578
579 2017-10-09  Jeremy Jones  <jeremyj@apple.com>
580
581         Incorrect fullscreen animation when element has a transform.
582         https://bugs.webkit.org/show_bug.cgi?id=177558
583         rdar://problem/29603741
584
585         Reviewed by Jer Noble.
586
587         Use a bit of code from element fullscreen to do this correctly for video fullscreen.
588         The key is to get the absolute quad from the renderer. This will work for scaling,
589         But since we still take the bounding box, it won't work for rotations.
590
591         * WebProcess/cocoa/VideoFullscreenManager.mm:
592         (WebKit::inlineVideoFrame):
593
594 2017-10-09  Robin Morisset  <rmorisset@apple.com>
595
596         Make the names of the options consistent
597         https://bugs.webkit.org/show_bug.cgi?id=177933
598
599         Reviewed by Saam Barati.
600
601         * NetworkProcess/capture/json.hpp:
602         * Platform/IPC/Connection.cpp:
603         (IPC::Connection::connectionDidClose):
604         * UIProcess/API/Cocoa/WKWebView.mm:
605         (-[WKWebView _keyboardWillHide:]):
606         * UIProcess/WebPageProxy.cpp:
607         (WebKit::WebPageProxy::runModal):
608         * UIProcess/mac/WebInspectorProxyMac.mm:
609         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
610         * WebProcess/WebPage/ios/WebPageIOS.mm:
611         (WebKit::WebPage::selectWithGesture):
612
613 2017-10-09  Adrian Perez de Castro  <aperez@igalia.com>
614
615         [WPE][GTK] Propagate libepoxy compiler flags obtained from pkg-config
616         https://bugs.webkit.org/show_bug.cgi?id=178081
617
618         Reviewed by Carlos Alberto Lopez Perez.
619
620         * CMakeLists.txt: Use ${LIBEPOXY_DEFINITIONS} for building WebKit.
621
622 2017-10-08  Tim Horton  <timothy_horton@apple.com>
623
624         mediaPlaybackRequiresUserAction API replacement annotation is wrong
625         https://bugs.webkit.org/show_bug.cgi?id=178063
626
627         Reviewed by Dan Bernstein.
628
629         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
630         mediaPlaybackRequiresUserAction suggests that you should use 
631         requiresUserActionForMediaPlayback instead, but that is also deprecated.
632         Instead, follow the chain and suggest mediaTypesRequiringUserActionForPlayback.
633
634 2017-10-06  Wenson Hsieh  <wenson_hsieh@apple.com>
635
636         [iOS WK2] API tests added in r222991 are failing in iOS 11 test runners
637         https://bugs.webkit.org/show_bug.cgi?id=178037
638
639         Reviewed by Tim Horton.
640
641         This patch carries out some minor cleanup around UIKitSPI.h in WebKit2, so that the internal SDK isn't required
642         to implement -[WKContentView insertTextSuggestion:].
643
644         * Platform/spi/ios/UIKitSPI.h:
645         * UIProcess/ios/WKContentViewInteraction.mm:
646         (-[WKContentView insertTextSuggestion:]):
647
648 2017-10-06  Chris Dumez  <cdumez@apple.com>
649
650         [Beacon][Cocoa] Beacon requests with BufferSource payload should not have a Content-Type HTTP header
651         https://bugs.webkit.org/show_bug.cgi?id=178027
652         <rdar://problem/34748470>
653
654         Reviewed by Youenn Fablet.
655
656         Use new NSURLSessionConfiguration._suppressedAutoAddedHTTPHeaders CFNetwork SPI to
657         make sure that CFNetwork never adds a Content-Type HTTP headers to our requests
658         when we did not add one.
659
660         This is covered by the following tests on newer OSes:
661         - imported/w3c/web-platform-tests/beacon/headers/header-content-type.html
662         - http/tests/blink/sendbeacon/beacon-same-origin.html
663
664         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
665         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
666
667 2017-10-06  Aishwarya Nirmal  <anirmal@apple.com>
668
669         [iOS] Respect the "caret-color" CSS property when editing 
670         https://bugs.webkit.org/show_bug.cgi?id=177489
671         <rdar://problem/34600419>
672
673         Reviewed by Tim Horton.
674
675         This change adds support for the caret-color property on iOS.
676
677         * Shared/EditorState.cpp:
678         (WebKit::EditorState::PostLayoutData::encode const):
679         (WebKit::EditorState::PostLayoutData::decode):
680         * Shared/EditorState.h:
681         * UIProcess/ios/WKContentViewInteraction.mm:
682         (-[WKContentView insertionPointColor]):
683         * WebProcess/WebPage/ios/WebPageIOS.mm:
684         (WebKit::WebPage::platformEditorState const):
685
686 2017-10-06  Brian Burg  <bburg@apple.com>
687
688         Web Inspector: clicking in Inspector webview clears the selection in the inspected page
689         https://bugs.webkit.org/show_bug.cgi?id=178014
690         <rdar://problem/12706857>
691
692         Reviewed by Timothy Hatcher.
693
694         If the Inspector is docked to the inspected view, clicking on the Inspector
695         webview will cause selection in the inspected view to be lost. This is because
696         the selection is lost when the web view resigns first responder.
697
698         Add a check in maintainsInactiveSelection to always retain selection if
699         Web Inspector is open. This approach seems simpler than trying to sync a client's
700         usage of WKPageSetMaintainsInactiveSelection with overrides that need to be applied
701         and unapplied when an inspector web view is shown or hidden.
702
703         * UIProcess/WebPageProxy.cpp:
704         (WebKit::WebPageProxy::maintainsInactiveSelection const):
705         (WebKit::WebPageProxy::inspector const): Drive by, use nullptr.
706
707         * UIProcess/WebPageProxy.h:
708         (WebKit::WebPageProxy::maintainsInactiveSelection const): Deleted.
709
710 2017-10-06  Alex Christensen  <achristensen@webkit.org>
711
712         Add more infrastructure to apply custom headers to same-origin requests
713         https://bugs.webkit.org/show_bug.cgi?id=177629
714
715         Reviewed by Ryosuke Niwa.
716
717         * UIProcess/API/C/WKWebsitePolicies.cpp:
718         (WKWebsitePoliciesCopyCustomHeaderFields):
719         (WKWebsitePoliciesSetCustomHeaderFields):
720         * UIProcess/API/C/WKWebsitePolicies.h:
721         * UIProcess/API/Cocoa/_WKWebsitePolicies.h:
722         * UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
723         (-[_WKWebsitePolicies customHeaderFields]):
724         (-[_WKWebsitePolicies setCustomHeaderFields:]):
725
726         Make the SPI for setting custom header fields take a dictionary<String, String>
727         instead of an array of Strings with colons. This matches NSURLRequest and other
728         APIs that deal with header fields.
729
730 2017-10-06  Wenson Hsieh  <wenson_hsieh@apple.com>
731
732         [iOS] Tweak support for classifying form controls (followup to r222487)
733         https://bugs.webkit.org/show_bug.cgi?id=177917
734         <rdar://problem/34820122>
735
736         Reviewed by Dean Jackson.
737
738         This patch follows up with <http://trac.webkit.org/r222487>. It combines the functionality of two SPI hooks
739         implemented on WKContentView into a single method that vends a context dictionary, and additionally addresses an
740         issue with the original implementation, wherein some cached state on WebPageProxy is set upon starting node
741         assistance, but is never unset when stopping node assistance, nor set anywhere else. See per-method comments for
742         more detail.
743
744         * UIProcess/WebPageProxy.h:
745
746         Remove members m_acceptsAutofilledLoginCredentials and m_representingPageURL from WebPageProxy. This state is
747         retrieved from the AssistedNodeInformation struct when starting node assistance, but is never reset anywhere
748         else. Instead of introducing new members to remember this state, we can just use the WKContentView's current
749         assisted node information.
750
751         This also means that programmatically focusing forms (without user gesture) will no longer cause WKContentView
752         to accept autofilled login credentials, since we bail out of node assistance and don't begin an input session.
753
754         * UIProcess/ios/WKContentView.mm:
755         (-[WKContentView acceptsAutofilledLoginCredentials]): Deleted.
756         (-[WKContentView representingPageURL]): Deleted.
757         * UIProcess/ios/WKContentViewInteraction.mm:
758         (-[WKContentView _autofillContext]):
759
760         Merge functionality of the previous two SPI hooks, such that -_autofillContext will return a non-null dictionary
761         containing the URL of the focused element's document if and only if WKContentView accepts autofilled login
762         credentials, and there exists a representing page URL.
763
764         When the page stops assisting the focused node, we set the AssistedNodeInformation's element type to None, so we
765         additionally bail and return nil if the element type is None. As an aside, it seems a more reasonable approach to
766         resetting state upon stopping node assistance is to just completely reset _assistedNodeInformation to its initial
767         value, i.e. via _assistedNodeInformation = { }. It's not clear whether there are behaviors relying on the fact
768         that all members but the element type in the content view's assisted node information could be stale, so this
769         seems worthy of some investigation.
770
771         * UIProcess/ios/WebPageProxyIOS.mm:
772         (WebKit::WebPageProxy::startAssistingNode):
773         (WebKit::WebPageProxy::acceptsAutofilledLoginCredentials): Deleted.
774         (WebKit::WebPageProxy::representingPageURL): Deleted.
775
776 2017-10-06  Yousuke Kimoto  <yousuke.kimoto@sony.com>
777
778         [WinCairo] Add shared curl files
779         https://bugs.webkit.org/show_bug.cgi?id=177999
780
781         Reviewed by Alex Christensen.
782
783         * PlatformWin.cmake:
784         * Shared/Authentication/curl/AuthenticationManagerCurl.cpp: Added.
785         (WebKit::AuthenticationManager::receivedCredential):
786         (WebKit::AuthenticationManager::receivedRequestToContinueWithoutCredential):
787         (WebKit::AuthenticationManager::receivedCancellation):
788         (WebKit::AuthenticationManager::receivedRequestToPerformDefaultHandling):
789         (WebKit::AuthenticationManager::receivedChallengeRejection):
790         * Shared/curl/WebCoreArgumentCodersCurl.cpp: Added.
791         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
792         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
793         (IPC::ArgumentCoder<CertificateInfo>::encode):
794         (IPC::ArgumentCoder<CertificateInfo>::decode):
795         (IPC::ArgumentCoder<ResourceError>::encodePlatformData):
796         (IPC::ArgumentCoder<ResourceError>::decodePlatformData):
797         (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData):
798         (IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData):
799         (IPC::ArgumentCoder<Credential>::encodePlatformData):
800         (IPC::ArgumentCoder<Credential>::decodePlatformData):
801
802 2017-10-06  Brent Fulgham  <bfulgham@apple.com>
803
804         Sandbox rules block PluginProcess using "File Open/Save" dialogs
805         https://bugs.webkit.org/show_bug.cgi?id=177965
806         <rdar://problem/33976846>
807
808         Reviewed by Alexey Proskuryakov.
809
810         Update the PluginProcess sandboxes to allow the same XPC services as
811         the WebContent process. Also allow access to the openAndSavePanelServices.
812
813         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in: 
814
815 2017-10-06  Brady Eidson  <beidson@apple.com>
816
817         Add (entirely incorrect) fetching of ServiceWorker scripts.
818         https://bugs.webkit.org/show_bug.cgi?id=176179
819
820         Reviewed by Andy Estes.
821
822         * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
823         (WebKit::WebSWServerConnection::startScriptFetchInClient):
824         * StorageProcess/ServiceWorker/WebSWServerConnection.h:
825         * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
826
827         * WebProcess/Storage/WebSWClientConnection.cpp:
828         (WebKit::WebSWClientConnection::finishFetchingScriptInServer):
829         * WebProcess/Storage/WebSWClientConnection.h:
830         * WebProcess/Storage/WebSWClientConnection.messages.in:
831
832 2017-10-05  Carlos Garcia Campos  <cgarcia@igalia.com>
833
834         [GTK][WPE] Add API to configure and enable resource load statistics
835         https://bugs.webkit.org/show_bug.cgi?id=177943
836
837         Reviewed by Michael Catanzaro.
838
839         Add new WebKitWebsiteDataManager construct only property to set the directory where the persistent stats are
840         stored, and methods to enable resource load statistics and query whether it's currently enabled. Also add a new
841         Website data type to be able to remove the persistent stats using WebKitWebsiteDataManager existing API.
842
843         * UIProcess/API/glib/WebKitWebContext.cpp:
844         (websiteDataStoreConfigurationForWebProcessPoolConfiguration):
845         (webkitWebContextConstructed):
846         * UIProcess/API/glib/WebKitWebsiteData.cpp:
847         (recordContainsSupportedDataTypes):
848         (toWebKitWebsiteDataTypes):
849         * UIProcess/API/glib/WebKitWebsiteDataManager.cpp:
850         (webkitWebsiteDataManagerGetProperty):
851         (webkitWebsiteDataManagerSetProperty):
852         (webkitWebsiteDataManagerConstructed):
853         (webkit_website_data_manager_class_init):
854         (webkitWebsiteDataManagerGetDataStore):
855         (webkit_website_data_manager_get_resource_load_stats_directory):
856         (webkit_website_data_manager_set_resource_load_stats_enabled):
857         (webkit_website_data_manager_get_resource_load_stats_enabled):
858         (toWebsiteDataTypes):
859         * UIProcess/API/gtk/WebKitWebsiteData.h:
860         * UIProcess/API/gtk/WebKitWebsiteDataManager.h:
861         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
862         * UIProcess/API/wpe/WebKitWebsiteData.h:
863         * UIProcess/API/wpe/WebKitWebsiteDataManager.h:
864
865 2017-10-05  Carlos Garcia Campos  <cgarcia@igalia.com>
866
867         [GTK][WPE] All resource load statistics tests added in r212183 crash in GTK bots, timeout in GTK and WPE bots since r219049
868         https://bugs.webkit.org/show_bug.cgi?id=168171
869
870         Reviewed by Chris Dumez.
871
872         Add C API to handle all resource load statistics requests made by the layout tests.
873
874         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
875         (WKWebsiteDataStoreSetStatisticsLastSeen):
876         (WKWebsiteDataStoreSetStatisticsPrevalentResource):
877         (WKWebsiteDataStoreIsStatisticsPrevalentResource):
878         (WKWebsiteDataStoreSetStatisticsHasHadUserInteraction):
879         (WKWebsiteDataStoreIsStatisticsHasHadUserInteraction):
880         (WKWebsiteDataStoreSetStatisticsGrandfathered):
881         (WKWebsiteDataStoreIsStatisticsGrandfathered):
882         (WKWebsiteDataStoreSetStatisticsSubframeUnderTopFrameOrigin):
883         (WKWebsiteDataStoreSetStatisticsSubresourceUnderTopFrameOrigin):
884         (WKWebsiteDataStoreSetStatisticsSubresourceUniqueRedirectTo):
885         (WKWebsiteDataStoreSetStatisticsTimeToLiveUserInteraction):
886         (WKWebsiteDataStoreSetStatisticsTimeToLiveCookiePartitionFree):
887         (WKWebsiteDataStoreStatisticsProcessStatisticsAndDataRecords):
888         (WKWebsiteDataStoreStatisticsUpdateCookiePartitioning):
889         (WKWebsiteDataStoreSetStatisticsShouldPartitionCookiesForHost):
890         (WKWebsiteDataStoreStatisticsSubmitTelemetry):
891         (WKWebsiteDataStoreSetStatisticsNotifyPagesWhenDataRecordsWereScanned):
892         (WKWebsiteDataStoreSetStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval):
893         (WKWebsiteDataStoreSetStatisticsNotifyPagesWhenTelemetryWasCaptured):
894         (WKWebsiteDataStoreSetStatisticsMinimumTimeBetweenDataRecordsRemoval):
895         (WKWebsiteDataStoreSetStatisticsGrandfatheringTime):
896         (WKWebsiteDataStoreSetStatisticsMaxStatisticsEntries):
897         (WKWebsiteDataStoreSetStatisticsPruneEntriesDownTo):
898         (WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStore):
899         (WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
900         (WKWebsiteDataStoreStatisticsClearThroughWebsiteDataRemoval):
901         (WKWebsiteDataStoreStatisticsResetToConsistentState):
902         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
903
904 2017-10-05  Tim Horton  <timothy_horton@apple.com>
905
906         Fix the Mac CMake build
907         https://bugs.webkit.org/show_bug.cgi?id=177985
908
909         Unreviewed build fix.
910
911         * CMakeLists.txt:
912         * PlatformMac.cmake:
913         After r222917, there's one more piece of WebKitSystemInterface left.
914         And some missing bits of PaymentRequest.
915
916 2017-10-05  Keith Miller  <keith_miller@apple.com>
917
918         Unreviewed, tapi builds without optimization so we should have TAPI passes -DRELEASE_WITHOUT_OPTIMIZATIONS.
919
920         * Configurations/Base.xcconfig:
921
922 2017-10-05  Jer Noble  <jer.noble@apple.com>
923
924         [Cocoa] Enable ENABLE_ENCRYPTED_MEDIA build-time setting
925         https://bugs.webkit.org/show_bug.cgi?id=177261
926
927         Reviewed by Eric Carlson.
928
929         * Configurations/FeatureDefines.xcconfig:
930
931 2017-10-05  Alex Christensen  <achristensen@webkit.org>
932
933         Add ObjC equivalent of WKPageNavigationClient.didChangeBackForwardList
934         https://bugs.webkit.org/show_bug.cgi?id=177966
935         <rdar://problem/22387135>
936
937         Reviewed by Tim Horton.
938
939         * UIProcess/API/APINavigationClient.h:
940         (API::NavigationClient::didChangeBackForwardList):
941         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
942         * UIProcess/Cocoa/NavigationState.h:
943         * UIProcess/Cocoa/NavigationState.mm:
944         (WebKit::NavigationState::setNavigationDelegate):
945         (WebKit::NavigationState::NavigationClient::didFailToInitializePlugIn):
946         (WebKit::NavigationState::NavigationClient::didChangeBackForwardList):
947         (WebKit::NavigationState::NavigationClient::willPerformClientRedirect):
948         (WebKit::NavigationState::NavigationClient::didCancelClientRedirect):
949         (WebKit::NavigationState::NavigationClient::renderingProgressDidChange):
950         (WebKit::NavigationState::NavigationClient::canAuthenticateAgainstProtectionSpace):
951         (WebKit::NavigationState::NavigationClient::processDidTerminate):
952         (WebKit::NavigationState::NavigationClient::processDidBecomeResponsive):
953         (WebKit::NavigationState::NavigationClient::processDidBecomeUnresponsive):
954         (WebKit::NavigationState::NavigationClient::webCryptoMasterKey):
955         (WebKit::NavigationState::NavigationClient::didFinishLoadForQuickLookDocumentInMainFrame):
956         (WebKit::NavigationState::HistoryClient::didNavigateWithNavigationData):
957         (WebKit::NavigationState::HistoryClient::didPerformClientRedirect):
958         (WebKit::NavigationState::HistoryClient::didPerformServerRedirect):
959         (WebKit::NavigationState::HistoryClient::didUpdateHistoryTitle):
960         * UIProcess/WebPageProxy.cpp:
961         (WebKit::WebPageProxy::didChangeBackForwardList):
962
963 2017-10-05  Alex Christensen  <achristensen@webkit.org>
964
965         Add ObjC SPI with userInfo corresponding to WKPageNavigationClient's decidePolicyForNavigationAction, didStartProvisionalNavigation, and didFailNavigation
966         https://bugs.webkit.org/show_bug.cgi?id=177974
967         <rdar://problem/22888802>
968
969         Reviewed by Tim Horton.
970
971         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
972         * UIProcess/Cocoa/NavigationState.h:
973         * UIProcess/Cocoa/NavigationState.mm:
974         (WebKit::NavigationState::setNavigationDelegate):
975         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
976         (WebKit::NavigationState::NavigationClient::didStartProvisionalNavigation):
977         (WebKit::NavigationState::NavigationClient::didFailNavigationWithError):
978         * UIProcess/Cocoa/UIDelegate.mm:
979         (WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
980
981 2017-10-05  John Wilander  <wilander@apple.com>
982
983         Storage Access API: Web process should ask UI process for grant/deny
984         https://bugs.webkit.org/show_bug.cgi?id=176941
985         <rdar://problem/34440036>
986
987         Reviewed by Chris Dumez and Sam Weinig.
988
989         This patch adds infrastructure to let WebCore::Document call
990         WebKit::WebResourceLoadStatisticsStore and ask for storage
991         access on behalf of an iframe. The communication goes through
992         the ChromeClient since we might want to add a native prompt.
993         From the ChromeClient it continues to the WebPage which
994         messages the WebPageProxy. The WebPageProxy calls the
995         WebsiteDataStore which owns the WebResourceLoadStatisticsStore.
996         A uint64_t is used to match the right callback with the boolean
997         result.
998
999         * UIProcess/WebPageProxy.cpp:
1000         (WebKit::WebPageProxy::requestStorageAccess):
1001         * UIProcess/WebPageProxy.h:
1002         * UIProcess/WebPageProxy.messages.in:
1003         * UIProcess/WebResourceLoadStatisticsStore.cpp:
1004         (WebKit::WebResourceLoadStatisticsStore::requestStorageAccess):
1005         * UIProcess/WebResourceLoadStatisticsStore.h:
1006         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1007         (WebKit::WebsiteDataStore::requestStorageAccess):
1008         * UIProcess/WebsiteData/WebsiteDataStore.h:
1009         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1010         (WebKit::WebChromeClient::requestStorageAccess):
1011         * WebProcess/WebCoreSupport/WebChromeClient.h:
1012         * WebProcess/WebPage/WebPage.cpp:
1013         (WebKit::nextRequestStorageAccessContextId):
1014         (WebKit::WebPage::requestStorageAccess):
1015         (WebKit::WebPage::storageAccessResponse):
1016         * WebProcess/WebPage/WebPage.h:
1017         * WebProcess/WebPage/WebPage.messages.in:
1018
1019 2017-10-05  Chris Dumez  <cdumez@apple.com>
1020
1021         Drop unused parameters for CookiesStrategy::cookiesEnabled()
1022         https://bugs.webkit.org/show_bug.cgi?id=177957
1023
1024         Reviewed by Alex Christensen.
1025
1026         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1027         (WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
1028         * NetworkProcess/NetworkConnectionToWebProcess.h:
1029         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1030         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1031         (WebKit::WebPlatformStrategies::cookiesEnabled):
1032         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1033
1034 2017-10-05  Tim Horton  <timothy_horton@apple.com>
1035
1036         Make progress toward properly-formed XPC services in the Mac CMake build
1037         https://bugs.webkit.org/show_bug.cgi?id=177918
1038
1039         Reviewed by Alex Christensen.
1040
1041         * CMakeLists.txt:
1042         * PlatformMac.cmake:
1043         Turn on the storage process on Mac, and fix its build.
1044         Move XPC services to Versions/A/XPCServices and add the toplevel
1045         XPCServices as a symlink of that.
1046         Run the XPC services' Info.plists through configure_file, and substitute
1047         the important variables (most critically the bundle identifier).
1048         Factor out the service setup so we don't keep duplicating it as it
1049         gets more complicated.
1050
1051 2017-10-05  Andy Estes  <aestes@apple.com>
1052
1053         [Payment Request] Add a payment method that supports Apple Pay
1054         https://bugs.webkit.org/show_bug.cgi?id=177850
1055
1056         Reviewed by Youenn Fablet.
1057
1058         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
1059         (toShippingMethod): Converted the NSDecimalNumber amount to a string rather than an integer.
1060         (WebKit::toDecimalNumber): used -decimalNumberWithString:locale: rather than
1061         -initWithMantissa:exponent:isNegative: to create an NSDecimalNumber.
1062         (WebKit::toPKPaymentSummaryItem):
1063         (WebKit::toPKShippingMethod):
1064
1065 2017-10-05  Youenn Fablet  <youenn@apple.com>
1066
1067         Make LibWebRTCProvider port agnostic
1068         https://bugs.webkit.org/show_bug.cgi?id=177747
1069
1070         Reviewed by Alex Christensen & Alex Garcia.
1071
1072         * WebProcess/Network/webrtc/LibWebRTCProvider.h: Making sure Mac/iOS provider creates the codec factories.
1073
1074 2017-10-04  Alex Christensen  <achristensen@webkit.org>
1075
1076         Stop linking with WebKitSystemInterface
1077         https://bugs.webkit.org/show_bug.cgi?id=177915
1078
1079         Reviewed by Antti Koivisto.
1080
1081         * Configurations/DebugRelease.xcconfig:
1082         * WebKit.xcodeproj/project.pbxproj:
1083
1084 2017-10-04  Alex Christensen  <achristensen@webkit.org>
1085
1086         Remove unnecessary includes of WebKitSystemInterface on Cocoa platforms
1087         https://bugs.webkit.org/show_bug.cgi?id=177912
1088
1089         Reviewed by Saam Barati.
1090
1091         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1092         * NetworkProcess/mac/NetworkProcessMac.mm:
1093         * NetworkProcess/mac/RemoteNetworkingContext.mm:
1094         * Platform/IPC/mac/ConnectionMac.mm:
1095         * Platform/mac/LayerHostingContext.mm:
1096         * PluginProcess/mac/PluginProcessMac.mm:
1097         * PluginProcess/mac/PluginProcessShim.mm:
1098         * Shared/ios/ChildProcessIOS.mm:
1099         * Shared/mac/ChildProcessMac.mm:
1100         * Shared/mac/SandboxExtensionMac.mm:
1101         * Shared/mac/WebCoreArgumentCodersMac.mm:
1102         * Shared/mac/WebEventFactory.mm:
1103         * StorageProcess/ios/StorageProcessIOS.mm:
1104         * StorageProcess/mac/StorageProcessMac.mm:
1105         * UIProcess/API/Cocoa/WKWebView.mm:
1106         * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm:
1107         * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
1108         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1109         * UIProcess/Cocoa/WebViewImpl.mm:
1110         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1111         * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
1112         * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
1113         * UIProcess/mac/PageClientImplMac.mm:
1114         * UIProcess/mac/WKTextInputWindowController.mm:
1115         * UIProcess/mac/WebContextMenuProxyMac.mm:
1116         * UIProcess/mac/WebPopupMenuProxyMac.mm:
1117         * UIProcess/mac/WindowServerConnection.mm:
1118         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1119         * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
1120         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1121         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1122         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
1123         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1124         * WebProcess/WebPage/ios/WebPageIOS.mm:
1125         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
1126         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
1127         * WebProcess/WebPage/mac/WebPageMac.mm:
1128         * WebProcess/cocoa/WebProcessCocoa.mm:
1129
1130 2017-10-04  Youenn Fablet  <youenn@apple.com>
1131
1132         rtc::PacketOptions should have its own IPC encoding/decoding routines
1133         https://bugs.webkit.org/show_bug.cgi?id=177812
1134
1135         Reviewed by Alex Christensen.
1136
1137         Replacing rtc::PacketOptions IPC encoding/decoding from passing the structure as individual parameters to the structure as a parameter.
1138         Introducing WebKit::RTCPacketOptions as a wrapper around it for which encode/decode routines are added.
1139         Updating code using rtc::PacketOptions accordingly.
1140
1141         * NetworkProcess/webrtc/NetworkRTCSocket.cpp:
1142         (WebKit::NetworkRTCSocket::sendTo):
1143         * NetworkProcess/webrtc/NetworkRTCSocket.h:
1144         * NetworkProcess/webrtc/NetworkRTCSocket.messages.in:
1145         * Platform/IPC/Decoder.cpp:
1146         (IPC::Decoder::operator>>):
1147         (IPC::Decoder::decode):
1148         * Platform/IPC/Decoder.h:
1149         * Platform/IPC/Encoder.cpp:
1150         (IPC::Encoder::encode):
1151         * Platform/IPC/Encoder.h:
1152         * Shared/RTCPacketOptions.cpp: Added.
1153         (WebKit::RTCPacketOptions::encode const):
1154         (WebKit::RTCPacketOptions::decode):
1155         * Shared/RTCPacketOptions.h: Added.
1156         * WebKit.xcodeproj/project.pbxproj:
1157         * WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
1158         (WebKit::LibWebRTCSocket::SendTo):
1159
1160 2017-10-04  Don Olmstead  <don.olmstead@sony.com>
1161
1162         Include Pasteboard.h for all in WebCoreArgumentCoders
1163         https://bugs.webkit.org/show_bug.cgi?id=177902
1164
1165         Reviewed by Alex Christensen.
1166
1167         * Shared/WebCoreArgumentCoders.cpp:
1168
1169 2017-10-04  David Kilzer  <ddkilzer@apple.com>
1170
1171         Remove unused variables in lambdas for network process cache
1172         <https://webkit.org/b/177878>
1173         <rdar://problem/34038482>
1174
1175         Reviewed by Tim Horton.
1176
1177         * NetworkProcess/cache/CacheStorageEngine.cpp:
1178         (WebKit::CacheStorage::Engine::open):
1179         (WebKit::CacheStorage::Engine::putRecords):
1180         (WebKit::CacheStorage::Engine::deleteMatchingRecords):
1181         * NetworkProcess/cache/CacheStorageEngineConnection.cpp:
1182         (WebKit::CacheStorageEngineConnection::reference):
1183         - Remove unused |this| from lambda captures.
1184
1185 2017-10-04  Stephan Szabo  <stephan.szabo@sony.com>
1186
1187         [WinCairo] add PLATFORM(WIN) configurations to config.h
1188         https://bugs.webkit.org/show_bug.cgi?id=177846
1189
1190         Reviewed by Alex Christensen.
1191
1192         * config.h:
1193
1194 2017-10-04  Adrian Perez de Castro  <aperez@igalia.com>
1195
1196         [GTK] WebKit2GTK+ does not handle touchmove and touchend events correctly
1197         https://bugs.webkit.org/show_bug.cgi?id=158531
1198
1199         Reviewed by Carlos Alberto Lopez Perez.
1200
1201         Do not bypass WebCore event handling when receiving touch events.
1202
1203         Based on a patch by Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>.
1204         Thanks to Carlos Garnacho <carlosg@gnome.org> for helping out reviewing the code.
1205
1206         * UIProcess/API/gtk/PageClientImpl.cpp:
1207         (WebKit::PageClientImpl::doneWithTouchEvent): Make sure touchend reaches gesture controller if touchbegin evet got to it.
1208         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1209         (webkitWebViewBaseTouchEvent): Do not invoke gesture controller directly by bypassing WebCore event handling.
1210         * UIProcess/gtk/GestureController.cpp:
1211         (WebKit::GestureController::reset): Added.
1212         (WebKit::GestureController::handleEvent): Reset gesture controller when touchpadupdate/end is received without touchbegin.
1213         (WebKit::GestureController::Gesture::reset): Added.
1214         * UIProcess/gtk/GestureController.h:
1215
1216 2017-10-04  Michael Catanzaro  <mcatanzaro@igalia.com>
1217
1218         Unreviewed WPE build fix after r222837
1219         https://bugs.webkit.org/show_bug.cgi?id=177449
1220
1221         * Shared/wpe/WebEventFactory.cpp:
1222         (WebKit::wallTimeForEventTime):
1223
1224 2017-10-04  Ryosuke Niwa  <rniwa@webkit.org>
1225
1226         Use blob URL when pasting RTFD instead of overriding DocumentLoader
1227         https://bugs.webkit.org/show_bug.cgi?id=177801
1228         <rdar://problem/34542270>
1229
1230         Reviewed by Wenson Hsieh.
1231
1232         Fixed the assertion failure when RTFD content is empty.
1233
1234         * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
1235         (WebKit::WebPasteboardProxy::getPasteboardBufferForType):
1236
1237 2017-10-04  Michael Catanzaro  <mcatanzaro@igalia.com>
1238
1239         REGRESSION(r222392): [WPE][GTK] Many forms tests are failing due to broken event timestamps
1240         https://bugs.webkit.org/show_bug.cgi?id=177449
1241
1242         Reviewed by Chris Dumez.
1243
1244         * Shared/wpe/WebEventFactory.cpp:
1245         (WebKit::wallTimeForEventTime):
1246
1247 2017-10-03  Brent Fulgham  <bfulgham@apple.com>
1248
1249         Correct nullptr dereference during shutdown
1250         https://bugs.webkit.org/show_bug.cgi?id=177845
1251         <rdar://problem/33651405>
1252
1253         Reviewed by Chris Dumez.
1254
1255         It looks like the ResourceLoadStatisticsPersistentStorage destructor is calling code that attempts
1256         to use member variables in its owning class (WebResourceLoadStatisticsStore). Since these may have
1257         already been destroyed, they are in an invalid state when accessed.
1258
1259         * UIProcess/ResourceLoadStatisticsPersistentStorage.cpp:
1260         (WebKit::ResourceLoadStatisticsPersistentStorage::~ResourceLoadStatisticsPersistentStorage): Do not call
1261         finishAllPendingWorkSynchronously() in the destructor, since it relies on the m_memoryStore to be
1262         a reference to completely valid object.
1263         * UIProcess/WebResourceLoadStatisticsStore.cpp:
1264         (WebKit::WebResourceLoadStatisticsStore::~WebResourceLoadStatisticsStore): Instead, call
1265         'finishAllPendingWorkSynchronously' here, when the object is still in a known valid state.
1266
1267 2017-10-03  Alex Christensen  <achristensen@webkit.org>
1268
1269         Moderize WebKit's back forward list code
1270         https://bugs.webkit.org/show_bug.cgi?id=177843
1271
1272         Reviewed by Tim Horton.
1273
1274         Use Ref instead of RefPtr when possible.
1275         Use references instead of pointers when possible.
1276         Remove unnecessary null checks.
1277         Reduce unnecessary Vector copying.
1278
1279         * Shared/SessionState.h:
1280         * Shared/WebBackForwardListItem.h:
1281         * UIProcess/API/APILoaderClient.h:
1282         (API::LoaderClient::didChangeBackForwardList):
1283         (API::LoaderClient::shouldKeepCurrentBackForwardListItemInList):
1284         * UIProcess/API/C/WKPage.cpp:
1285         (WKPageSetPageLoaderClient):
1286         * UIProcess/WebBackForwardList.cpp:
1287         (WebKit::WebBackForwardList::pageClosed):
1288         (WebKit::WebBackForwardList::addItem):
1289         (WebKit::WebBackForwardList::goToItem):
1290         (WebKit::WebBackForwardList::currentItem const):
1291         (WebKit::WebBackForwardList::backItem const):
1292         (WebKit::WebBackForwardList::forwardItem const):
1293         (WebKit::WebBackForwardList::itemAtIndex const):
1294         (WebKit::WebBackForwardList::backListAsAPIArrayWithLimit const):
1295         (WebKit::WebBackForwardList::forwardListAsAPIArrayWithLimit const):
1296         (WebKit::WebBackForwardList::removeAllItems):
1297         (WebKit::WebBackForwardList::clear):
1298         (WebKit::WebBackForwardList::backForwardListState const):
1299         (WebKit::WebBackForwardList::restoreFromState):
1300         * UIProcess/WebBackForwardList.h:
1301         * UIProcess/WebPageProxy.cpp:
1302         (WebKit::WebPageProxy::reattachToWebProcessWithItem):
1303         (WebKit::WebPageProxy::initializeWebPage):
1304         (WebKit::WebPageProxy::didChangeBackForwardList):
1305         (WebKit::WebPageProxy::shouldKeepCurrentBackForwardListItemInList):
1306         (WebKit::WebPageProxy::backForwardGoToItem):
1307         * UIProcess/WebPageProxy.h:
1308         * UIProcess/WebProcessProxy.cpp:
1309         (WebKit::WebProcessProxy::registerNewWebBackForwardListItem):
1310         * UIProcess/WebProcessProxy.h:
1311         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
1312         (WebKit::WebBackForwardListProxy::itemAtIndex):
1313
1314 2017-10-03  Chris Dumez  <cdumez@apple.com>
1315
1316         SharedStringHashStore should support removing hashes
1317         https://bugs.webkit.org/show_bug.cgi?id=177770
1318
1319         Reviewed by Alex Christensen.
1320
1321         SharedStringHashStore should support removing hashes. It currently only supports adding hashes or
1322         clearing all of them, which is sufficient for the VisitedLinkStore but will not be for Service
1323         Worker purposes.
1324
1325         * Shared/SharedStringHashStore.cpp:
1326         (WebKit::SharedStringHashStore::SharedStringHashStore):
1327         (WebKit::SharedStringHashStore::add):
1328         (WebKit::SharedStringHashStore::remove):
1329         (WebKit::SharedStringHashStore::contains):
1330         (WebKit::SharedStringHashStore::clear):
1331         (WebKit::SharedStringHashStore::resizeTable):
1332         (WebKit::SharedStringHashStore::pendingOperationsTimerFired):
1333         * Shared/SharedStringHashStore.h:
1334         * Shared/SharedStringHashTable.cpp:
1335         (WebKit::SharedStringHashTable::remove):
1336         * Shared/SharedStringHashTable.h:
1337         * UIProcess/API/Cocoa/_WKVisitedLinkStore.h:
1338         * UIProcess/API/Cocoa/_WKVisitedLinkStore.mm:
1339         (-[_WKVisitedLinkStore containsVisitedLinkWithURL:]):
1340         (-[_WKVisitedLinkStore removeVisitedLinkWithURL:]):
1341         * UIProcess/VisitedLinkStore.cpp:
1342         (WebKit::VisitedLinkStore::containsVisitedLinkHash):
1343         (WebKit::VisitedLinkStore::removeVisitedLinkHash):
1344         (WebKit::VisitedLinkStore::didUpdateSharedStringHashes):
1345         * UIProcess/VisitedLinkStore.h:
1346
1347 2017-10-03  Alex Christensen  <achristensen@webkit.org>
1348
1349         Fix API tests after r222794.
1350         https://bugs.webkit.org/show_bug.cgi?id=177825
1351
1352         * UIProcess/WebPageProxy.cpp:
1353         (WebKit::WebPageProxy::willGoToBackForwardListItem):
1354         Sometimes there's no navigation client.
1355
1356 2017-10-03  Alex Christensen  <achristensen@webkit.org>
1357
1358         Add ObjC equivalent of WKPageLoaderClient.pluginDidFail
1359         https://bugs.webkit.org/show_bug.cgi?id=177787
1360         <rdar://problem/22387633>
1361
1362         Reviewed by Tim Horton.
1363
1364         * UIProcess/API/APILoaderClient.h:
1365         (API::LoaderClient::didFailToInitializePlugin):
1366         * UIProcess/API/APINavigationClient.h:
1367         (API::NavigationClient::canHandleDidFailToInitializePlugIn const):
1368         (API::NavigationClient::didFailToInitializePlugIn):
1369         * UIProcess/API/C/WKPage.cpp:
1370         (WKPageSetPageLoaderClient):
1371         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
1372         * UIProcess/Cocoa/NavigationState.h:
1373         * UIProcess/Cocoa/NavigationState.mm:
1374         (WebKit::NavigationState::setNavigationDelegate):
1375         (WebKit::NavigationState::NavigationClient::canHandleDidFailToInitializePlugIn const):
1376         (WebKit::NavigationState::NavigationClient::didFailToInitializePlugIn):
1377         * UIProcess/WebPageProxy.cpp:
1378         (WebKit::WebPageProxy::didFailToInitializePlugin):
1379
1380 2017-10-03  Adrian Perez de Castro  <aperez@igalia.com>
1381
1382         [GTK] Prefer -webkit-system-font
1383         https://bugs.webkit.org/show_bug.cgi?id=177814
1384
1385         Reviewed by Carlos Garcia Campos.
1386
1387         Use "font-family: -webkit-system-font" instead of "font: menu".
1388
1389         * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
1390         (WebKit::RemoteInspectorProtocolHandler::handleRequest): Edited HTML snippet.
1391
1392 2017-10-03  Alex Christensen  <achristensen@webkit.org>
1393
1394         Add ObjC SPI equivalent to WKPageLoaderClient.willGoToBackForwardListItem
1395         https://bugs.webkit.org/show_bug.cgi?id=177825
1396         <rdar://problem/22387505>
1397
1398         Reviewed by Tim Horton.
1399
1400         * UIProcess/API/APILoaderClient.h:
1401         (API::LoaderClient::willGoToBackForwardListItem):
1402         * UIProcess/API/APINavigationClient.h:
1403         (API::NavigationClient::canHandleWillGoToBackForwardListItem const):
1404         (API::NavigationClient::willGoToBackForwardListItem):
1405         * UIProcess/API/C/WKPage.cpp:
1406         (WKPageSetPageLoaderClient):
1407         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
1408         * UIProcess/Cocoa/NavigationState.h:
1409         * UIProcess/Cocoa/NavigationState.mm:
1410         (WebKit::NavigationState::setNavigationDelegate):
1411         (WebKit::NavigationState::NavigationClient::canHandleWillGoToBackForwardListItem const):
1412         (WebKit::NavigationState::NavigationClient::willGoToBackForwardListItem):
1413         * UIProcess/WebPageProxy.cpp:
1414         (WebKit::WebPageProxy::willGoToBackForwardListItem):
1415         * UIProcess/WebPageProxy.h:
1416         * UIProcess/WebPageProxy.messages.in:
1417         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1418         (WebKit::WebFrameLoaderClient::shouldGoToHistoryItem const):
1419
1420 2017-10-03  Michael Catanzaro  <mcatanzaro@igalia.com>
1421
1422         REGRESSION(r222392): [WPE][GTK] Many forms tests are failing due to broken event timestamps
1423         https://bugs.webkit.org/show_bug.cgi?id=177449
1424
1425         Reviewed by Chris Dumez.
1426
1427         * Shared/gtk/WebEventFactory.cpp:
1428         (WebKit::WebEventFactory::createWebMouseEvent):
1429         (WebKit::WebEventFactory::createWebWheelEvent):
1430         (WebKit::WebEventFactory::createWebKeyboardEvent):
1431         (WebKit::WebEventFactory::createWebTouchEvent):
1432         * Shared/wpe/WebEventFactory.cpp:
1433         (WebKit::wallTimeForEventTime):
1434         (WebKit::WebEventFactory::createWebKeyboardEvent):
1435         (WebKit::WebEventFactory::createWebMouseEvent):
1436         (WebKit::WebEventFactory::createWebWheelEvent):
1437         (WebKit::WebEventFactory::createWebTouchEvent):
1438
1439 2017-10-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1440
1441         [GTK][WPE] WebProcess should run cleanup on quit to release resources
1442         https://bugs.webkit.org/show_bug.cgi?id=168126
1443
1444         Reviewed by Michael Catanzaro.
1445
1446         Do not call exit on sync message send failure for GTK and WPE ports.
1447
1448         * WebProcess/WebProcess.cpp:
1449         (WebKit::WebProcess::initializeConnection):
1450
1451 2017-10-02  Ryosuke Niwa  <rniwa@webkit.org>
1452
1453         Move more code into PasteboardCustomData
1454         https://bugs.webkit.org/show_bug.cgi?id=177795
1455
1456         Reviewed by Wenson Hsieh.
1457
1458         Added the support for encoding and decoding the origin string in PasteboardCustomData.
1459
1460         * Shared/WebCoreArgumentCoders.cpp:
1461         (IPC::ArgumentCoder<PasteboardCustomData>::encode):
1462         (IPC::ArgumentCoder<PasteboardCustomData>::decode):
1463
1464 2017-10-02  Adrian Perez de Castro  <aperez@igalia.com>
1465
1466         [GTK] Do not hardcode font family in served remote inspector HTML snippets
1467         https://bugs.webkit.org/show_bug.cgi?id=177742
1468
1469         Reviewed by Carlos Garcia Campos.
1470
1471         Instead of hardcoding Cantarell as the font used for the HTML snippets served
1472         by the remote inspector handler, use "font: menu" to obtain the system UI
1473         font, plus a "font-size" rule for adjusting the size.
1474
1475         * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
1476         (WebKit::RemoteInspectorProtocolHandler::handleRequest): Change the
1477         CSS rules in the served snippet.
1478
1479 2017-10-02  Joseph Pecoraro  <pecoraro@apple.com>
1480
1481         Web Inspector: Include Beacon and Ping requests in Network tab
1482         https://bugs.webkit.org/show_bug.cgi?id=177641
1483         <rdar://problem/33086839>
1484
1485         Reviewed by Chris Dumez.
1486
1487         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1488         (WebKit::NetworkConnectionToWebProcess::loadPing):
1489         (WebKit::NetworkConnectionToWebProcess::didFinishPingLoad):
1490         * NetworkProcess/NetworkConnectionToWebProcess.h:
1491         * NetworkProcess/PingLoad.cpp:
1492         (WebKit::PingLoad::PingLoad):
1493         (WebKit::PingLoad::didFinish):
1494         (WebKit::PingLoad::didReceiveResponseNetworkSession):
1495         * NetworkProcess/PingLoad.h:
1496         * WebProcess/Network/NetworkProcessConnection.cpp:
1497         (WebKit::NetworkProcessConnection::didFinishPingLoad):
1498         * WebProcess/Network/NetworkProcessConnection.h:
1499         * WebProcess/Network/NetworkProcessConnection.messages.in:
1500         * WebProcess/Network/WebLoaderStrategy.cpp:
1501         (WebKit::WebLoaderStrategy::networkProcessCrashed):
1502         (WebKit::WebLoaderStrategy::startPingLoad):
1503         (WebKit::WebLoaderStrategy::didFinishPingLoad):
1504         * WebProcess/Network/WebLoaderStrategy.h:
1505         Pass an optional ResourceResponse back to the ping completion handler.
1506
1507 2017-10-02  Alex Christensen  <achristensen@webkit.org>
1508
1509         REGRESSION: API tests WebKit.ProcessDidTerminateRequestedByClient and WebKit.ProcessDidTerminateWithReasonCrash are timing out
1510         https://bugs.webkit.org/show_bug.cgi?id=177764
1511
1512         Reviewed by Chris Dumez.
1513
1514         * UIProcess/API/C/WKPage.cpp:
1515         (WKPageSetPageNavigationClient):
1516         I shouldn't have reverted the A API telling the listener to continue if there's no client function.
1517
1518 2017-10-02  Carlos Garcia Campos  <cgarcia@igalia.com>
1519
1520         [WPE][GTK] Crash in webkit_web_resource_get_data_finish()
1521         https://bugs.webkit.org/show_bug.cgi?id=177107
1522
1523         Reviewed by Michael Catanzaro.
1524
1525         Handle errors in webkit_web_resource_get_data() callback.
1526
1527         * UIProcess/API/glib/WebKitWebResource.cpp:
1528         (resourceDataCallback):
1529         (webkit_web_resource_get_data):
1530
1531 2017-10-02  Olivier Blin  <olivier.blin@softathome.com>
1532
1533         [WPE] Fix UIProcess build with GStreamer and without VIDEO
1534         https://bugs.webkit.org/show_bug.cgi?id=177753
1535
1536         Reviewed by Michael Catanzaro.
1537
1538         GStreamer builds fail when WebAudio is enabled but VIDEO disabled.
1539         This is the WPE counterpart of bug 153135.
1540
1541         * UIProcess/API/wpe/PageClientImpl.h:
1542
1543 2017-10-02  Alex Christensen  <achristensen@webkit.org>
1544
1545         Expose more WKPreferences SPI to match C SPI
1546         https://bugs.webkit.org/show_bug.cgi?id=177697
1547
1548         * UIProcess/API/Cocoa/WKPreferences.mm:
1549         (-[WKPreferences _javaEnabledForLocalFiles]):
1550         (-[WKPreferences _setPlugInsEnabled:]): Deleted.
1551         (-[WKPreferences _plugInsEnabled]): Deleted.
1552         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1553         _javaEnabledForLocalFiles should return the correct value.
1554         _plugInsEnabled has public API.  This SPI is not needed.
1555
1556 2017-10-02  Alex Christensen  <achristensen@webkit.org>
1557
1558         REGRESSION(r214201): WebProcess hangs during policy decisions
1559         https://bugs.webkit.org/show_bug.cgi?id=177590
1560         <rdar://problem/33362929>
1561
1562         Reviewed by Andy Estes.
1563
1564         This is like r222431 but for trunk instead of a branch.
1565         It includes the same regression API test so I don't make the same mistake again.
1566
1567         * UIProcess/API/C/WKPage.cpp:
1568         (WKPageSetPageNavigationClient):
1569         * UIProcess/WebPageProxy.cpp:
1570         (WebKit::WebPageProxy::receivedPolicyDecision):
1571         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1572         (WebKit::WebPageProxy::decidePolicyForResponseSync):
1573         * UIProcess/WebPageProxy.h:
1574         * UIProcess/WebPageProxy.messages.in:
1575         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1576         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
1577         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
1578         (WebKit::WebFrameLoaderClient::applyToDocumentLoader):
1579         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1580         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1581         * WebProcess/WebPage/WebDocumentLoader.cpp:
1582         (WebKit::WebDocumentLoader::setNavigationID):
1583         * WebProcess/WebPage/WebFrame.cpp:
1584         (WebKit::WebFrame::setUpPolicyListener):
1585         (WebKit::WebFrame::invalidatePolicyListener):
1586         (WebKit::WebFrame::didReceivePolicyDecision):
1587         * WebProcess/WebPage/WebFrame.h:
1588         * WebProcess/WebPage/WebPage.cpp:
1589         (WebKit::WebPage::didReceivePolicyDecision):
1590         * WebProcess/WebPage/WebPage.h:
1591         * WebProcess/WebPage/WebPage.messages.in:
1592
1593 2017-10-02  Alex Christensen  <achristensen@webkit.org>
1594
1595         Remove unnecessary copy of SessionID in WebPageProxy
1596         https://bugs.webkit.org/show_bug.cgi?id=177702
1597
1598         Reviewed by Darin Adler.
1599
1600         * UIProcess/WebPageProxy.cpp:
1601         (WebKit::WebPageProxy::sessionID const):
1602         (WebKit::WebPageProxy::creationParameters):
1603         * UIProcess/WebPageProxy.h:
1604         (WebKit::WebPageProxy::sessionID const): Deleted.
1605
1606 2017-10-02  Alex Christensen  <achristensen@webkit.org>
1607
1608         Expose more WKPreferences SPI to match C SPI
1609         https://bugs.webkit.org/show_bug.cgi?id=177697
1610         <rdar://problem/24110556>
1611
1612         Reviewed by Darin Adler.
1613
1614         * UIProcess/API/Cocoa/WKPreferences.mm:
1615         (-[WKPreferences _setJavaEnabledForLocalFiles:]):
1616         (-[WKPreferences _javaEnabledForLocalFiles]):
1617         (-[WKPreferences _setCanvasUsesAcceleratedDrawing:]):
1618         (-[WKPreferences _canvasUsesAcceleratedDrawing]):
1619         (-[WKPreferences _setAcceleratedCompositingEnabled:]):
1620         (-[WKPreferences _acceleratedCompositingEnabled]):
1621         (-[WKPreferences _setDefaultTextEncodingName:]):
1622         (-[WKPreferences _defaultTextEncodingName]):
1623         (-[WKPreferences _setNeedsSiteSpecificQuirks:]):
1624         (-[WKPreferences _needsSiteSpecificQuirks]):
1625         (-[WKPreferences _setAuthorAndUserStylesEnabled:]):
1626         (-[WKPreferences _authorAndUserStylesEnabled]):
1627         (-[WKPreferences _setDOMTimersThrottlingEnabled:]):
1628         (-[WKPreferences _domTimersThrottlingEnabled]):
1629         (-[WKPreferences _setWebArchiveDebugModeEnabled:]):
1630         (-[WKPreferences _webArchiveDebugModeEnabled]):
1631         (-[WKPreferences _setLocalFileContentSniffingEnabled:]):
1632         (-[WKPreferences _localFileContentSniffingEnabled]):
1633         (-[WKPreferences _setUsesPageCache:]):
1634         (-[WKPreferences _usesPageCache]):
1635         (-[WKPreferences _setPageCacheSupportsPlugins:]):
1636         (-[WKPreferences _pageCacheSupportsPlugins]):
1637         (-[WKPreferences _setShouldPrintBackgrounds:]):
1638         (-[WKPreferences _shouldPrintBackgrounds]):
1639         (-[WKPreferences _setWebSecurityEnabled:]):
1640         (-[WKPreferences _webSecurityEnabled]):
1641         (-[WKPreferences _setUniversalAccessFromFileURLsAllowed:]):
1642         (-[WKPreferences _universalAccessFromFileURLsAllowed]):
1643         (-[WKPreferences _setAVFoundationEnabled:]):
1644         (-[WKPreferences _avFoundationEnabled]):
1645         (-[WKPreferences _setSuppressesIncrementalRendering:]):
1646         (-[WKPreferences _suppressesIncrementalRendering]):
1647         (-[WKPreferences _setAsynchronousPluginInitializationEnabled:]):
1648         (-[WKPreferences _asynchronousPluginInitializationEnabled]):
1649         (-[WKPreferences _setArtificialPluginInitializationDelayEnabled:]):
1650         (-[WKPreferences _artificialPluginInitializationDelayEnabled]):
1651         (-[WKPreferences _setCookieEnabled:]):
1652         (-[WKPreferences _cookieEnabled]):
1653         (-[WKPreferences _setPlugInSnapshottingEnabled:]):
1654         (-[WKPreferences _plugInSnapshottingEnabled]):
1655         (-[WKPreferences _setQTKitEnabled:]):
1656         (-[WKPreferences _qtKitEnabled]):
1657         (-[WKPreferences _setSubpixelCSSOMElementMetricsEnabled:]):
1658         (-[WKPreferences _subpixelCSSOMElementMetricsEnabled]):
1659         (-[WKPreferences _setMediaSourceEnabled:]):
1660         (-[WKPreferences _mediaSourceEnabled]):
1661         (-[WKPreferences _setViewGestureDebuggingEnabled:]):
1662         (-[WKPreferences _viewGestureDebuggingEnabled]):
1663         (-[WKPreferences _setCSSAnimationTriggersEnabled:]):
1664         (-[WKPreferences _cssAnimationTriggersEnabled]):
1665         (-[WKPreferences _setStandardFontFamily:]):
1666         (-[WKPreferences _standardFontFamily]):
1667         (-[WKPreferences _setNotificationsEnabled:]):
1668         (-[WKPreferences _notificationsEnabled]):
1669         (-[WKPreferences _setBackspaceKeyNavigationEnabled:]):
1670         (-[WKPreferences _backspaceKeyNavigationEnabled]):
1671         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1672
1673 2017-10-02  Carlos Garcia Campos  <cgarcia@igalia.com>
1674
1675         [GTK][WPE] Enable interactive forms validation by default
1676         https://bugs.webkit.org/show_bug.cgi?id=177737
1677
1678         Reviewed by Michael Catanzaro.
1679
1680         It's currently disabled for no reason.
1681
1682         * Shared/WebPreferencesDefinitions.h:
1683
1684 2017-10-02  Michael Catanzaro  <mcatanzaro@igalia.com>
1685
1686         Remove ENABLE_CSS_REGIONS
1687         https://bugs.webkit.org/show_bug.cgi?id=177689
1688
1689         Reviewed by Darin Adler.
1690
1691         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp:
1692         (webkit_dom_element_get_webkit_region_overset):
1693         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.h:
1694         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
1695         (webkit_dom_element_get_webkit_region_overset): Deleted.
1696         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.h:
1697
1698 2017-09-30  Darin Adler  <darin@apple.com>
1699
1700         Have IPC::Connection::Client objects consistently invalidate the connection when destroyed
1701         https://bugs.webkit.org/show_bug.cgi?id=177708
1702
1703         Reviewed by Anders Carlsson.
1704
1705         I ran into an intermittent crash when running regression tests. It looked like a connection
1706         client was being called after it was destroyed. I did an audit of the all the connection
1707         clients to make sure they all invalidate their connection before they are destroyed.
1708
1709         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1710         (WebKit::NetworkConnectionToWebProcess::~NetworkConnectionToWebProcess): Invalidate the
1711         connection since this object opened the connection. There is no obvious
1712         guarantee that the connection will already be invalid when this is destroyed.
1713         * StorageProcess/StorageToWebProcessConnection.cpp:
1714         (WebKit::StorageToWebProcessConnection::~StorageToWebProcessConnection): Ditto.
1715         * UIProcess/Plugins/PluginProcessProxy.cpp:
1716         (WebKit::PluginProcessProxy::~PluginProcessProxy): Ditto.
1717         * WebProcess/Network/NetworkProcessConnection.cpp:
1718         (WebKit::NetworkProcessConnection::~NetworkProcessConnection): Ditto.
1719         * WebProcess/Storage/WebToStorageProcessConnection.cpp:
1720         (WebKit::WebToStorageProcessConnection::~WebToStorageProcessConnection): Ditto.
1721
1722         * StorageProcess/StorageToWebProcessConnection.h: Derive privately rather than publicly
1723         from IPC::Connection::Client because we can, and this means we don't have to study quite
1724         as much code to understand how this is used as a connection client.
1725         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h: Ditto.
1726         * WebProcess/Storage/WebToStorageProcessConnection.h: Ditto.
1727         * WebProcess/WebPage/WebInspector.h: Ditto.
1728         * WebProcess/WebPage/WebInspectorUI.h: Ditto.
1729
1730         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
1731         (WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer): Added a comment about a
1732         reference cycle cycle leading to a leak that I believe exists here.
1733
1734 2017-09-29  Alex Christensen  <achristensen@webkit.org>
1735
1736         REGRESSION: ASSERTION FAILED: m_provisionalURL.isEmpty() in WebKit::FrameLoadState::didStartProvisionalLoad
1737         https://bugs.webkit.org/show_bug.cgi?id=177491
1738
1739         Reviewed by Andy Estes.
1740
1741         * WebProcess/WebPage/WebFrame.cpp:
1742         (WebKit::WebFrame::setUpWillSubmitFormListener):
1743         (WebKit::WebFrame::continueWillSubmitForm):
1744         (WebKit::WebFrame::invalidatePolicyListener):
1745         Speculative fix for a flaky assertion.
1746         Restore the clearing of the policy listeners we used to have when form submission was treated as a policy.
1747
1748 2017-09-29  Chris Dumez  <cdumez@apple.com>
1749
1750         http/tests/preconnect/link-rel-preconnect-https.html is flaky
1751         https://bugs.webkit.org/show_bug.cgi?id=177673
1752
1753         Reviewed by Alex Christensen.
1754
1755         Update PreconnectTask to query the client when a certificate needs to be
1756         validated. This allows WebKitTestRunner to ignore invalid certificates
1757         and this causes http/tests/preconnect/link-rel-preconnect-https.html
1758         to pass consistently.
1759
1760         To avoid duplicating code, PreconnectTask now uses NetworkLoad internally
1761         instead of using a NetworkDataTask directly.
1762
1763         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1764         (WebKit::NetworkConnectionToWebProcess::preconnectTo):
1765         * NetworkProcess/NetworkConnectionToWebProcess.h:
1766         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1767         * NetworkProcess/NetworkLoad.h:
1768         * NetworkProcess/NetworkProcess.cpp:
1769         (WebKit::generateCanAuthenticateIdentifier):
1770         (WebKit::NetworkProcess::canAuthenticateAgainstProtectionSpace):
1771         (WebKit::NetworkProcess::continueCanAuthenticateAgainstProtectionSpace):
1772         (WebKit::NetworkProcess::preconnectTo):
1773         * NetworkProcess/NetworkProcess.h:
1774         * NetworkProcess/NetworkResourceLoadParameters.cpp:
1775         (WebKit::NetworkResourceLoadParameters::encode const):
1776         (WebKit::NetworkResourceLoadParameters::decode):
1777         * NetworkProcess/PreconnectTask.cpp:
1778         (WebKit::PreconnectTask::PreconnectTask):
1779         (WebKit::PreconnectTask::~PreconnectTask):
1780         (WebKit::PreconnectTask::willSendRedirectedRequest):
1781         (WebKit::PreconnectTask::didReceiveResponse):
1782         (WebKit::PreconnectTask::didReceiveBuffer):
1783         (WebKit::PreconnectTask::didFinishLoading):
1784         (WebKit::PreconnectTask::didFailLoading):
1785         (WebKit::PreconnectTask::didSendData):
1786         (WebKit::PreconnectTask::canAuthenticateAgainstProtectionSpaceAsync):
1787         (WebKit::PreconnectTask::continueCanAuthenticateAgainstProtectionSpace):
1788         (WebKit::PreconnectTask::frameID const):
1789         (WebKit::PreconnectTask::pageID const):
1790         * NetworkProcess/PreconnectTask.h:
1791         * WebProcess/Network/WebLoaderStrategy.cpp:
1792         (WebKit::WebLoaderStrategy::preconnectTo):
1793         * WebProcess/Network/WebLoaderStrategy.h:
1794
1795 2017-09-29  Alex Christensen  <achristensen@webkit.org>
1796
1797         Expose WebPreferences::webGLEnabled through WKPreferences
1798         https://bugs.webkit.org/show_bug.cgi?id=177692
1799         <rdar://problem/24110556>
1800
1801         Reviewed by Andy Estes.
1802
1803         * UIProcess/API/Cocoa/WKPreferences.mm:
1804         (-[WKPreferences _setWebGLEnabled:]):
1805         (-[WKPreferences _webGLEnabled]):
1806         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1807
1808 2017-09-29  Chris Dumez  <cdumez@apple.com>
1809
1810         [WK2][NETWORK_SESSION] Move some authentication-related code to avoid duplication
1811         https://bugs.webkit.org/show_bug.cgi?id=177667
1812
1813         Reviewed by Alex Christensen.
1814
1815         Move some authentication-related code to avoid duplication.
1816         This is a preparation code supporting Download authentication
1817         as Download uses a NSURLSessionDownloadTask and not a
1818         NetworkDataTask.
1819
1820         * NetworkProcess/NetworkDataTask.h:
1821         (WebKit::NetworkDataTask::setSuggestedFilename):
1822         * NetworkProcess/NetworkLoad.cpp:
1823         (WebKit::NetworkLoad::didReceiveChallenge):
1824         (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
1825         * NetworkProcess/NetworkSession.cpp:
1826         (WebKit::NetworkSession::allowsSpecificHTTPSCertificateForHost):
1827         * NetworkProcess/NetworkSession.h:
1828         * NetworkProcess/PreconnectTask.cpp:
1829         (WebKit::PreconnectTask::didReceiveChallenge):
1830         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
1831         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
1832         (WebKit::NetworkDataTaskCocoa::didReceiveChallenge):
1833         * NetworkProcess/cocoa/NetworkSessionCocoa.h:
1834         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1835         (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
1836         (WebKit::certificatesMatch):
1837         (WebKit::NetworkSessionCocoa::allowsSpecificHTTPSCertificateForHost):
1838
1839 2017-09-29  Alex Christensen  <achristensen@webkit.org>
1840
1841         Fix WKWebViewConfigurationPrivate after r222663
1842         https://bugs.webkit.org/show_bug.cgi?id=177644
1843
1844         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1845         (-[WKWebViewConfiguration init]):
1846         (-[WKWebViewConfiguration copyWithZone:]):
1847         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
1848
1849 2017-09-29  Chris Dumez  <cdumez@apple.com>
1850
1851         Split some logic out of VisitedLinkStore and make it reusable
1852         https://bugs.webkit.org/show_bug.cgi?id=177575
1853
1854         Reviewed by Alex Christensen.
1855
1856         Split some logic out of VisitedLinkStore and make it reusable for other purposes than
1857         visited links and from other processes than the UIProcess.
1858
1859         The plan is to reuse the new SharedStringHashStore for Service Worker registration
1860         on StorageProcess side and querying on WebContent process side.
1861
1862         * CMakeLists.txt:
1863         * Shared/SharedStringHashStore.cpp: Added.
1864         (WebKit::nextPowerOf2):
1865         (WebKit::tableSizeForKeyCount):
1866         (WebKit::SharedStringHashStore::SharedStringHashStore):
1867         (WebKit::SharedStringHashStore::createSharedMemoryHandle):
1868         (WebKit::SharedStringHashStore::add):
1869         (WebKit::SharedStringHashStore::clear):
1870         (WebKit::SharedStringHashStore::resizeTable):
1871         (WebKit::SharedStringHashStore::pendingSharedStringHashesTimerFired):
1872         * Shared/SharedStringHashStore.h: Copied from Source/WebKit/WebProcess/WebPage/VisitedLinkTableController.h.
1873         (WebKit::SharedStringHashStore::Client::~Client):
1874         (WebKit::SharedStringHashStore::isEmpty const):
1875         * Shared/SharedStringHashTable.cpp: Renamed from Source/WebKit/Shared/VisitedLinkTable.cpp.
1876         (WebKit::SharedStringHashTable::SharedStringHashTable):
1877         (WebKit::SharedStringHashTable::~SharedStringHashTable):
1878         (WebKit::SharedStringHashTable::setSharedMemory):
1879         (WebKit::SharedStringHashTable::add):
1880         (WebKit::SharedStringHashTable::contains const):
1881         (WebKit::SharedStringHashTable::clear):
1882         * Shared/SharedStringHashTable.h: Renamed from Source/WebKit/Shared/VisitedLinkTable.h.
1883         * UIProcess/API/C/WKContext.cpp:
1884         (WKContextAddVisitedLink):
1885         * UIProcess/API/Cocoa/_WKVisitedLinkStore.mm:
1886         (-[_WKVisitedLinkStore addVisitedLinkWithURL:]):
1887         * UIProcess/VisitedLinkStore.cpp:
1888         (WebKit::VisitedLinkStore::VisitedLinkStore):
1889         (WebKit::VisitedLinkStore::addProcess):
1890         (WebKit::VisitedLinkStore::addVisitedLinkHash):
1891         (WebKit::VisitedLinkStore::removeAll):
1892         (WebKit::VisitedLinkStore::addVisitedLinkHashFromPage):
1893         (WebKit::VisitedLinkStore::sendStoreHandleToProcess):
1894         (WebKit::VisitedLinkStore::didInvalidateSharedMemory):
1895         (WebKit::VisitedLinkStore::didAddSharedStringHashes):
1896         * UIProcess/VisitedLinkStore.h:
1897         * UIProcess/WebProcessPool.cpp:
1898         * UIProcess/WebProcessPool.h:
1899         * UIProcess/WebProcessProxy.h:
1900         * WebKit.xcodeproj/project.pbxproj:
1901         * WebProcess/WebPage/VisitedLinkTableController.cpp:
1902         (WebKit::VisitedLinkTableController::isLinkVisited):
1903         (WebKit::VisitedLinkTableController::addVisitedLink):
1904         (WebKit::VisitedLinkTableController::visitedLinkStateChanged):
1905         * WebProcess/WebPage/VisitedLinkTableController.h:
1906         * WebProcess/WebPage/VisitedLinkTableController.messages.in:
1907
1908 2017-09-28  Alex Christensen  <achristensen@webkit.org>
1909
1910         Add WKWebViewConfiguration SPI equivalent to WKPageConfigurationSetBackgroundCPULimit
1911         https://bugs.webkit.org/show_bug.cgi?id=177644
1912         <rdar://problem/34338698>
1913
1914         Reviewed by Geoffrey Garen.
1915
1916         WKPageConfigurationSetBackgroundCPULimit is a setter of a std::optional<double> with no accessor.
1917         It's never set to 0 in practice, so I guess the ObjC equivalent is a double that is zero or nonzero.
1918
1919         * UIProcess/API/Cocoa/WKWebView.mm:
1920         (-[WKWebView _initializeWithConfiguration:]):
1921         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1922         (-[WKWebViewConfiguration _setCPULimit:]):
1923         (-[WKWebViewConfiguration _cpuLimit]):
1924         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
1925
1926 2017-09-28  Ryosuke Niwa  <rniwa@webkit.org>
1927
1928         Image pasting is not working on tineye.com / gmail.com / GitHub.com due to lack of support for DataTransfer.items
1929         https://bugs.webkit.org/show_bug.cgi?id=170449
1930         <rdar://problem/31432525>
1931
1932         Reviewed by Wenson Hsieh.
1933
1934         Add sandbox extensions for files in the pasteboard to make copying & pasting image files work.
1935         This is what we do for drag & drop but we should consider adding a mechanism to rekoke the extension in the future.
1936
1937         * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
1938         (WebKit::WebPasteboardProxy::getPasteboardPathnamesForType): Add sandbox extensions to the pasted files.
1939         * UIProcess/WebPasteboardProxy.h:
1940         * UIProcess/WebPasteboardProxy.messages.in:
1941         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1942         (WebKit::WebPlatformStrategies::getPathnamesForType): Consume the sandbox tokens sent by the UI process permanently
1943         since WebCore will now create File objects for these pasted files.
1944
1945 2017-09-29  Wenson Hsieh  <wenson_hsieh@apple.com>
1946
1947         [iOS WK2] Implement -[WKContentView hasText] for compatibility with the UITextInput protocol
1948         https://bugs.webkit.org/show_bug.cgi?id=177662
1949         <rdar://problem/33410373>
1950
1951         Reviewed by Tim Horton.
1952
1953         Implements -[WKContentView hasText] by propagating a flag through post-layout editor state.
1954
1955         * Shared/EditorState.cpp:
1956         (WebKit::EditorState::PostLayoutData::encode const):
1957         (WebKit::EditorState::PostLayoutData::decode):
1958         * Shared/EditorState.h:
1959
1960         Add a new flag to EditorState indicating whether or not the current editable root containing the selection has
1961         any plain text. Add IPC support for this new flag.
1962
1963         * UIProcess/ios/WKContentViewInteraction.mm:
1964         (-[WKContentView hasText]):
1965         * WebProcess/WebPage/ios/WebPageIOS.mm:
1966         (WebKit::computeEditableRootHasContentAndPlainText):
1967
1968         Add a new helper to compute whether or not the editable root has any content, and any plain text. This
1969         is used as the last cached value for -hasText on WKContentView that we will deliver to UIKit. Some important
1970         things to note here:
1971         - If post layout data already indicates that we have selected some plain text, or that there is a plain text
1972           character near the selection, just set the flags to true and bail, since the editable root necessarily has
1973           content that is plain text.
1974         - If hasContent is false, don't even bother computing hasPlainText, because it must also be false.
1975         - Otherwise, use hasAnyPlainText to compute the value of hasPlainText, which is a faster variant of plainText.
1976         These optimizations help us avoid doing extra work at all when running Speedometer, apart from checking the
1977         values of a few PostLayoutData flags. This also fixes the value of hasContent, which was previously always false
1978         if we had a range selection rather than a caret selection even when the editable root has content, because the
1979         logic to compute the value of hasContent only existed in the branch where we have a caret selection.
1980
1981         (WebKit::WebPage::platformEditorState const):
1982
1983 2017-09-28  Timothy Horton  <timothy_horton@apple.com>
1984
1985         Fix the macOS CMake build
1986
1987         * CMakeLists.txt:
1988
1989 2017-09-28  Timothy Horton  <timothy_horton@apple.com>
1990
1991         Revise deployment target macros from r222620
1992
1993         Rubber-stamped by Wenson Hsieh.
1994
1995         * WebProcess/Plugins/PDF/PDFLayerControllerSPI.h:
1996         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1997         (WebKit::PDFPlugin::pdfDocumentDidLoad):
1998
1999 2017-09-28  Aishwarya Nirmal  <anirmal@apple.com>
2000
2001         Request for PDF URL targets for specific pages, sections, etc.
2002         https://bugs.webkit.org/show_bug.cgi?id=177582
2003         <rdar://problem/5692679>
2004
2005         Reviewed by Tim Horton.
2006         
2007         This change sets the URL fragment for scroll anchoring in PDFs.
2008
2009         * WebProcess/Plugins/PDF/PDFLayerControllerSPI.h:
2010         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2011         (WebKit::PDFPlugin::pdfDocumentDidLoad):
2012
2013 2017-09-28  Ross Kirsling  <ross.kirsling@sony.com>
2014
2015         [PAL] Move HysteresisActivity into PAL
2016         https://bugs.webkit.org/show_bug.cgi?id=177516
2017
2018         Reviewed by Alex Christensen.
2019
2020         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
2021         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::PendingFrameLoad):
2022         * Shared/WebSQLiteDatabaseTracker.cpp:
2023         (WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker):
2024         (WebKit::WebSQLiteDatabaseTracker::hysteresisUpdated):
2025         * Shared/WebSQLiteDatabaseTracker.h:
2026         * WebProcess/WebPage/WebPage.cpp:
2027         (WebKit::m_pageScrolledHysteresis):
2028         (WebKit::m_userActivityHysteresis):
2029         (WebKit::WebPage::updateUserActivity):
2030         * WebProcess/WebPage/WebPage.h:
2031         * WebProcess/WebProcess.cpp:
2032         (WebKit::WebProcess::WebProcess):
2033         * WebProcess/WebProcess.h:
2034
2035 2017-09-28  Chris Dumez  <cdumez@apple.com>
2036
2037         Add support for <link rel=preconnect>
2038         https://bugs.webkit.org/show_bug.cgi?id=177474
2039         <rdar://problem/33141380>
2040
2041         Reviewed by Alex Christensen.
2042
2043         Add support for <link rel=preconnect>:
2044         - https://w3c.github.io/resource-hints/#preconnect
2045
2046         Also add corresponding native private API.
2047
2048         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2049         (WebKit::NetworkConnectionToWebProcess::preconnectTo):
2050         (WebKit::NetworkConnectionToWebProcess::didFinishPreconnection):
2051         * NetworkProcess/NetworkConnectionToWebProcess.h:
2052         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
2053         * NetworkProcess/NetworkDataTask.cpp:
2054         (WebKit::NetworkDataTask::create):
2055         * NetworkProcess/NetworkLoadParameters.h:
2056         * NetworkProcess/NetworkProcess.cpp:
2057         (WebKit::NetworkProcess::preconnectTo):
2058         * NetworkProcess/NetworkProcess.h:
2059         * NetworkProcess/NetworkProcess.messages.in:
2060         * NetworkProcess/PreconnectTask.cpp: Added.
2061         (WebKit::PreconnectTask::PreconnectTask):
2062         (WebKit::PreconnectTask::~PreconnectTask):
2063         (WebKit::PreconnectTask::willPerformHTTPRedirection):
2064         (WebKit::PreconnectTask::didReceiveChallenge):
2065         (WebKit::PreconnectTask::didReceiveResponseNetworkSession):
2066         (WebKit::PreconnectTask::didReceiveData):
2067         (WebKit::PreconnectTask::didCompleteWithError):
2068         (WebKit::PreconnectTask::didSendData):
2069         (WebKit::PreconnectTask::wasBlocked):
2070         (WebKit::PreconnectTask::cannotShowURL):
2071         (WebKit::PreconnectTask::didFinish):
2072         * NetworkProcess/PreconnectTask.h: Copied from Source/WebKit/NetworkProcess/NetworkLoadParameters.h.
2073         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
2074         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
2075         (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
2076         * Shared/WebCoreArgumentCoders.h:
2077         * Shared/WebPreferencesDefinitions.h:
2078         * UIProcess/API/C/WKContext.cpp:
2079         (WKContextPreconnectToServer):
2080         * UIProcess/API/C/WKContextPrivate.h:
2081         * UIProcess/API/Cocoa/WKProcessPool.mm:
2082         (-[WKProcessPool _preconnectToServer:]):
2083         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2084         * UIProcess/WebProcessPool.cpp:
2085         (WebKit::WebProcessPool::preconnectToServer):
2086         * UIProcess/WebProcessPool.h:
2087         * WebKit.xcodeproj/project.pbxproj:
2088         * WebProcess/Network/NetworkProcessConnection.cpp:
2089         (WebKit::NetworkProcessConnection::didFinishPreconnection):
2090         * WebProcess/Network/NetworkProcessConnection.h:
2091         * WebProcess/Network/NetworkProcessConnection.messages.in:
2092         * WebProcess/Network/WebLoaderStrategy.cpp:
2093         (WebKit::WebLoaderStrategy::networkProcessCrashed):
2094         (WebKit::generateLoadIdentifier):
2095         (WebKit::WebLoaderStrategy::startPingLoad):
2096         (WebKit::WebLoaderStrategy::preconnectTo):
2097         (WebKit::WebLoaderStrategy::didFinishPreconnection):
2098         * WebProcess/Network/WebLoaderStrategy.h:
2099         * WebProcess/WebPage/WebPage.cpp:
2100         (WebKit::WebPage::updatePreferences):
2101         * config.h:
2102
2103 2017-09-28  Zan Dobersek  <zdobersek@igalia.com>
2104
2105         [Cairo] Remove the cairo_glyph_t complexity from GlyphBuffer
2106         https://bugs.webkit.org/show_bug.cgi?id=177598
2107
2108         Reviewed by Carlos Garcia Campos.
2109
2110         * Shared/API/c/cairo/WKImageCairo.cpp: Explicitly include the <cairo.h>
2111         header here now that it's not included in GlyphBuffer.h.
2112         * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp: Ditto.
2113
2114 2017-09-27  Alex Christensen  <achristensen@webkit.org>
2115
2116         Add WKContentRuleList notify action type
2117         https://bugs.webkit.org/show_bug.cgi?id=177013
2118         <rdar://problem/31073936>
2119
2120         Reviewed by Darin Adler.
2121
2122         * NetworkProcess/PingLoad.cpp:
2123         (WebKit::PingLoad::processContentExtensionRulesForLoad):
2124         * UIProcess/API/APINavigationClient.h:
2125         (API::NavigationClient::contentRuleListNotification):
2126         * UIProcess/API/C/WKPage.cpp:
2127         (WKPageSetPageNavigationClient):
2128         * UIProcess/API/C/WKPageNavigationClient.h:
2129         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
2130         * UIProcess/Cocoa/NavigationState.h:
2131         * UIProcess/Cocoa/NavigationState.mm:
2132         (WebKit::NavigationState::setNavigationDelegate):
2133         (WebKit::NavigationState::NavigationClient::contentRuleListNotification):
2134         * UIProcess/WebPageProxy.cpp:
2135         (WebKit::WebPageProxy::contentRuleListNotification):
2136         * UIProcess/WebPageProxy.h:
2137         * UIProcess/WebPageProxy.messages.in:
2138         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2139         (WebKit::WebChromeClient::contentRuleListNotification):
2140         * WebProcess/WebCoreSupport/WebChromeClient.h:
2141
2142 2017-09-27  Wenson Hsieh  <wenson_hsieh@apple.com>
2143
2144         Drag event DataTransfer has unexpected types "dyn.ah62d4..."
2145         https://bugs.webkit.org/show_bug.cgi?id=172526
2146         <rdar://problem/32396081>
2147
2148         Reviewed by Ryosuke Niwa.
2149
2150         Add boilerplate plumbing and encoder/decoder support for new pasteboard codepaths. See WebCore ChangeLog for
2151         more details.
2152
2153         * Scripts/webkit/messages.py:
2154         (headers_for_type):
2155         * Shared/WebCoreArgumentCoders.cpp:
2156         (IPC::ArgumentCoder<PasteboardCustomData>::encode):
2157         (IPC::ArgumentCoder<PasteboardCustomData>::decode):
2158
2159         Add encoder/decoder support for PasteboardCustomData.
2160
2161         (IPC::ArgumentCoder<PasteboardWebContent>::encode):
2162         (IPC::ArgumentCoder<PasteboardWebContent>::decode):
2163
2164         Encode and decode dataInHTMLFormat.
2165
2166         * Shared/WebCoreArgumentCoders.h:
2167         * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
2168         (WebKit::WebPasteboardProxy::typesSafeForDOMToReadAndWrite):
2169         (WebKit::WebPasteboardProxy::writeCustomData):
2170         * UIProcess/WebPasteboardProxy.cpp:
2171         (WebKit::WebPasteboardProxy::typesSafeForDOMToReadAndWrite):
2172         (WebKit::WebPasteboardProxy::writeCustomData):
2173         * UIProcess/WebPasteboardProxy.h:
2174         * UIProcess/WebPasteboardProxy.messages.in:
2175         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2176         (WebKit::WebPlatformStrategies::typesSafeForDOMToReadAndWrite):
2177         (WebKit::WebPlatformStrategies::writeCustomData):
2178         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2179
2180 2017-09-27  Alex Christensen  <achristensen@webkit.org>
2181
2182         Allow modern decoding of std::optional<T>
2183         https://bugs.webkit.org/show_bug.cgi?id=177519
2184
2185         Reviewed by Tim Horton.
2186
2187         * Platform/IPC/ArgumentCoders.h:
2188         (IPC::ArgumentCoder<std::optional<T>>::decode):
2189         * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
2190         (IPC::ArgumentCoder<WebCore::PaymentAuthorizationResult>::decode):
2191         (IPC::ArgumentCoder<WebCore::PaymentError>::decode):
2192         (IPC::ArgumentCoder<WebCore::PaymentMethodUpdate>::decode):
2193         (IPC::ArgumentCoder<WebCore::ShippingContactUpdate>::decode):
2194         (IPC::ArgumentCoder<WebCore::ShippingMethodUpdate>::decode):
2195         * Shared/WebCoreArgumentCoders.cpp:
2196         (IPC::ArgumentCoder<IntPoint>::decode):
2197         (IPC::ArgumentCoder<IntSize>::decode):
2198         * Shared/WebCoreArgumentCoders.h:
2199         * Shared/WebPageCreationParameters.cpp:
2200         (WebKit::WebPageCreationParameters::decode):
2201
2202 2017-09-27  Commit Queue  <commit-queue@webkit.org>
2203
2204         Unreviewed, rolling out r222541.
2205         https://bugs.webkit.org/show_bug.cgi?id=177580
2206
2207         WebCore isn't ready for the asynchronousness this was going to
2208         enable (Requested by alexchristensen on #webkit).
2209
2210         Reverted changeset:
2211
2212         "Pass a completion handler instead of a
2213         WebFramePolicyListenerProxy during policy decisions"
2214         https://bugs.webkit.org/show_bug.cgi?id=177509
2215         http://trac.webkit.org/changeset/222541
2216
2217 2017-09-27  Tina Liu  <iting_liu@apple.com>
2218
2219         Expose setShouldSuppressFirstResponderChanges() as WKView SPI
2220         https://bugs.webkit.org/show_bug.cgi?id=177513
2221         <rdar://problem/34669220>
2222
2223         Reviewed by Wenson Hsieh.
2224
2225         We already have setShouldSuppressFirstResponderChanges() SPI on WKWebView; Expose it on
2226         WKView as well for clients using legacy WebKit.
2227
2228         * UIProcess/API/Cocoa/WKViewPrivate.h:
2229         * UIProcess/API/mac/WKView.mm:
2230         (-[WKView _setShouldSuppressFirstResponderChanges:]):
2231
2232 2017-09-27  Chris Dumez  <cdumez@apple.com>
2233
2234         Have PingLoad take a CompletionHandler
2235         https://bugs.webkit.org/show_bug.cgi?id=177549
2236
2237         Reviewed by Youenn Fablet.
2238
2239         Have PingLoad take a CompletionHandler instead of relying on it calling on method on the
2240         NetworkConnectionToWebProcess when it is done.
2241
2242         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2243         (WebKit::NetworkConnectionToWebProcess::loadPing):
2244         * NetworkProcess/PingLoad.cpp:
2245         (WebKit::PingLoad::PingLoad):
2246         (WebKit::PingLoad::didFinish):
2247         * NetworkProcess/PingLoad.h:
2248
2249 2017-09-26  Alex Christensen  <achristensen@webkit.org>
2250
2251         Pass a completion handler instead of a WebFramePolicyListenerProxy during policy decisions
2252         https://bugs.webkit.org/show_bug.cgi?id=177509
2253
2254         Reviewed by Tim Horton.
2255
2256         This makes WebFramePolicyListenerProxy just a wrapper around a WTF::Function which is only needed for the C and glib APIs.
2257         This is a step towards making WebPageProxy::DecidePolicyForResponseSync and WebPageProxy::DecidePolicyForNavigationAction asynchronous.
2258
2259         This patch has no change in behavior.
2260
2261         * CMakeLists.txt:
2262         * UIProcess/API/APINavigationClient.h:
2263         (API::NavigationClient::decidePolicyForNavigationAction):
2264         (API::NavigationClient::decidePolicyForNavigationResponse):
2265         * UIProcess/API/APIPolicyClient.h:
2266         (API::PolicyClient::decidePolicyForNavigationAction):
2267         (API::PolicyClient::decidePolicyForNewWindowAction):
2268         (API::PolicyClient::decidePolicyForResponse):
2269         * UIProcess/API/C/WKFramePolicyListener.cpp:
2270         (WKFramePolicyListenerUseWithPolicies):
2271         * UIProcess/API/C/WKPage.cpp:
2272         (WKPageSetPagePolicyClient):
2273         (WKPageSetPageNavigationClient):
2274         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2275         * UIProcess/API/glib/WebKitPolicyClient.cpp:
2276         * UIProcess/Automation/WebAutomationSession.cpp:
2277         * UIProcess/Cocoa/NavigationState.h:
2278         * UIProcess/Cocoa/NavigationState.mm:
2279         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
2280         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationResponse):
2281         * UIProcess/Cocoa/WebViewImpl.mm:
2282         * UIProcess/RemoteWebInspectorProxy.cpp:
2283         * UIProcess/WebFormSubmissionListenerProxy.h:
2284         * UIProcess/WebFrameListenerProxy.cpp: Removed.
2285         * UIProcess/WebFrameListenerProxy.h: Removed.
2286         * UIProcess/WebFramePolicyListenerProxy.cpp:
2287         (WebKit::WebFramePolicyListenerProxy::WebFramePolicyListenerProxy):
2288         (WebKit::WebFramePolicyListenerProxy::~WebFramePolicyListenerProxy):
2289         (WebKit::WebFramePolicyListenerProxy::create):
2290         (WebKit::WebFramePolicyListenerProxy::use):
2291         (WebKit::WebFramePolicyListenerProxy::download):
2292         (WebKit::WebFramePolicyListenerProxy::ignore):
2293         * UIProcess/WebFramePolicyListenerProxy.h:
2294         (WebKit::WebFramePolicyListenerProxy::create): Deleted.
2295         (): Deleted.
2296         (WebKit::WebFramePolicyListenerProxy::operator new): Deleted.
2297         * UIProcess/WebFrameProxy.cpp:
2298         (WebKit::WebFrameProxy::webProcessWillShutDown):
2299         (WebKit::WebFrameProxy::receivedPolicyDecision): Deleted.
2300         (WebKit::WebFrameProxy::setUpPolicyListenerProxy): Deleted.
2301         * UIProcess/WebFrameProxy.h:
2302         * UIProcess/WebInspectorProxy.cpp:
2303         * UIProcess/WebPageProxy.cpp:
2304         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
2305         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
2306         (WebKit::WebPageProxy::decidePolicyForResponseSync):
2307         (WebKit::WebPageProxy::receivedPolicyDecision): Deleted.
2308         (WebKit::WebPageProxy::decidePolicyForResponse): Deleted.
2309         * UIProcess/WebPageProxy.h:
2310         * UIProcess/mac/ViewGestureControllerMac.mm:
2311         * WebKit.xcodeproj/project.pbxproj:
2312
2313 2017-09-26  Brian Burg  <bburg@apple.com>
2314
2315         Web Automation: overflow:hidden elements with no children are mistakenly reported as not visible
2316         https://bugs.webkit.org/show_bug.cgi?id=177514
2317         <rdar://problem/31936291>
2318
2319         Reviewed by Joseph Pecoraro.
2320
2321         * UIProcess/Automation/atoms/ElementDisplayed.js:
2322         (isShown.isElementSubtreeHiddenByOverflow):
2323         Array.prototype.every returns true when passed an empty list, so we need
2324         to check for the case where the element has no children and return 'false'.
2325
2326 2017-09-26  Youenn Fablet  <youenn@apple.com>
2327
2328         [Cocoa] Add a modern WKPreferences switch to disable WebRTC
2329         https://bugs.webkit.org/show_bug.cgi?id=176638
2330         <rdar://problem/34335158>
2331
2332         Reviewed by Alex Christensen.
2333
2334         * UIProcess/API/Cocoa/WKPreferences.mm:
2335         (-[WKPreferences _peerConnectionEnabled]):
2336         (-[WKPreferences _setPeerConnectionEnabled:]):
2337         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2338
2339 2017-09-26  Brent Fulgham  <bfulgham@apple.com>
2340
2341         Harden our access to the vector of URL schemes.
2342         https://bugs.webkit.org/show_bug.cgi?id=177470
2343         <rdar://problem/33881522>
2344
2345         Reviewed by Chris Dumez.
2346
2347         Instead of asserting, use MESSAGE_CHECK so that we actually refuse to access an invalid iterator.
2348
2349         * UIProcess/WebPageProxy.cpp:
2350         (WebKit::WebPageProxy::startURLSchemeTask):
2351         (WebKit::WebPageProxy::stopURLSchemeTask):
2352
2353 2017-09-26  Jer Noble  <jer.noble@apple.com>
2354
2355         Thrown ObjC exception when right clicking on <img> containing mp4 link
2356         https://bugs.webkit.org/show_bug.cgi?id=177370
2357
2358         Reviewed by Darin Adler.
2359
2360         Creating a NSImage from mp4 data will fail and return nil; do a nil-check before attempting
2361         to put the results into a NSMutableArray.
2362
2363         * UIProcess/mac/WebContextMenuProxyMac.mm:
2364         (WebKit::WebContextMenuProxyMac::createShareMenuItem):
2365
2366 2017-09-26  Brian Burg  <bburg@apple.com>
2367
2368         Web Automation: add commands to get and set user permissions for pages in an automation session
2369         https://bugs.webkit.org/show_bug.cgi?id=177405
2370         <rdar://problem/34493846>
2371
2372         Reviewed by Joseph Pecoraro.
2373
2374         To test some Web APIs via WebDriver, it needs to be possible to simulate a user accepting or
2375         denying requests for elevated permissions, such as getUserMedia() or geolocation.
2376
2377         This patch adds a generic way for a test to configure the automation session's
2378         simulated user action that will happen every time a specific permission is requested.
2379         A test can set a "session permission", trigger the permission request via Web API,
2380         and then verify that the page behaves correctly when the user accepted or denied the request.
2381
2382         A proposal will follow shortly to expose this functionality via a new REST API endpoint.
2383
2384         * UIProcess/Automation/Automation.json: Add get/set commands.
2385
2386         * UIProcess/Automation/WebAutomationSession.cpp:
2387         (WebKit::WebAutomationSession::getSessionPermissions):
2388         (WebKit::WebAutomationSession::setSessionPermissions):
2389         For now, store the permission value in a member of the session. The getUserMedia
2390         permission only needs a bool, but there is no reason we couldn't use more complicated
2391         values for permissions (i.e., strings, numbers, arrays, objects) someday.
2392
2393         (WebKit::WebAutomationSession::shouldAllowGetUserMediaForPage const):
2394         Expose the specific decision to be taken based on whether the request is allowed or denied.
2395
2396         * UIProcess/Automation/WebAutomationSession.h:
2397         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2398         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
2399         If the page is under automation, then simulate the user action according to the
2400         current values of permissions set for the session.
2401
2402 2017-09-25  Alex Christensen  <achristensen@webkit.org>
2403
2404         Make PolicyAction an encodable enum class
2405         https://bugs.webkit.org/show_bug.cgi?id=177480
2406
2407         Reviewed by Antti Koivisto.
2408
2409         * NetworkProcess/Downloads/DownloadManager.cpp:
2410         (WebKit::DownloadManager::continueDecidePendingDownloadDestination):
2411         (WebKit::DownloadManager::cancelDownload):
2412         * NetworkProcess/NetworkCORSPreflightChecker.cpp:
2413         (WebKit::NetworkCORSPreflightChecker::didReceiveResponseNetworkSession):
2414         * NetworkProcess/NetworkDataTask.cpp:
2415         (WebKit::NetworkDataTask::didReceiveResponse):
2416         * NetworkProcess/NetworkDataTaskBlob.cpp:
2417         (WebKit::NetworkDataTaskBlob::dispatchDidReceiveResponse):
2418         * NetworkProcess/NetworkLoad.cpp:
2419         (WebKit::NetworkLoad::~NetworkLoad):
2420         (WebKit::NetworkLoad::continueDidReceiveResponse):
2421         (WebKit::NetworkLoad::notifyDidReceiveResponse):
2422         * NetworkProcess/PingLoad.cpp:
2423         (WebKit::PingLoad::didReceiveResponseNetworkSession):
2424         * NetworkProcess/capture/NetworkDataTaskReplay.cpp:
2425         (WebKit::NetworkCapture::NetworkDataTaskReplay::didReceiveResponse):
2426         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2427         (toNSURLSessionResponseDisposition):
2428         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
2429         (WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse):
2430         * Scripts/webkit/messages.py:
2431         (headers_for_type):
2432         * UIProcess/WebFormSubmissionListenerProxy.h:
2433         * UIProcess/WebFrameListenerProxy.h:
2434         (WebKit::WebFrameListenerProxy::navigation): Deleted.
2435         * UIProcess/WebFramePolicyListenerProxy.cpp:
2436         (WebKit::WebFramePolicyListenerProxy::use):
2437         (WebKit::WebFramePolicyListenerProxy::download):
2438         (WebKit::WebFramePolicyListenerProxy::ignore):
2439         * UIProcess/WebPageProxy.cpp:
2440         (WebKit::WebPageProxy::receivedPolicyDecision):
2441         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
2442         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2443         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
2444         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
2445         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2446         * WebProcess/WebPage/WebFrame.cpp:
2447         (WebKit::WebFrame::invalidatePolicyListener):
2448         * WebProcess/WebPage/WebPage.cpp:
2449         (WebKit::WebPage::didReceivePolicyDecision):
2450         * WebProcess/WebPage/WebPage.h:
2451         * WebProcess/WebPage/WebPage.messages.in:
2452
2453 2017-09-25  Yoshiaki Jitsukawa  <Yoshiaki.Jitsukawa@sony.com>
2454
2455         [WinCairo] Share default value of font family preferences among non-cocoa builds
2456         https://bugs.webkit.org/show_bug.cgi?id=177479
2457
2458         Reviewed by Yusuke Suzuki.
2459
2460         * Shared/WebPreferencesDefinitions.h:
2461
2462 2017-09-25  Frederik Riedel  <riedel@apple.com>
2463
2464         Expose way to set values of classified form controls as {Legacy WebKit, WebKit} SPI
2465         https://bugs.webkit.org/show_bug.cgi?id=174394
2466         <rdar://problem/33183504>
2467
2468         Reviewed by Ryosuke Niwa.
2469
2470         * Platform/spi/ios/UIKitSPI.h:
2471         * Shared/AssistedNodeInformation.cpp:
2472         (WebKit::AssistedNodeInformation::encode const):
2473         Encodes additional node information, including if the node is part of a login screen.
2474         (WebKit::AssistedNodeInformation::decode):
2475         Decodes the additional assisted node information.
2476         * Shared/AssistedNodeInformation.h:
2477         * UIProcess/WebPageProxy.h:
2478         * UIProcess/ios/WKContentView.mm:
2479         (-[WKContentView acceptsAutofilledLoginCredentials]):
2480         Determines if the WKContentView shows a login screen.
2481         (-[WKContentView representingPageUrl]):
2482         Returns the URL of the currently displayed web page.
2483         * UIProcess/ios/WKContentViewInteraction.mm:
2484         (-[WKContentView insertTextSuggestion:]):
2485         Inserts the login credentials into the Web View.
2486         * UIProcess/ios/WebPageProxyIOS.mm:
2487         (WebKit::WebPageProxy::startAssistingNode):
2488         Transfer the additional assistednode information (acceptsAutofilledLoginCredentials and representingPageUrl).
2489         (WebKit::WebPageProxy::acceptsAutofilledLoginCredentials):
2490         Returns if the Web View shows a login screen.
2491         (WebKit::WebPageProxy::representingPageUrl):
2492         Returns the Web View's URL.
2493         (WebKit::WebPageProxy::autofillLoginCredentials):
2494         Insert the credentials into the Web View.
2495         * WebProcess/WebPage/WebPage.h:
2496         * WebProcess/WebPage/WebPage.messages.in:
2497         * WebProcess/WebPage/ios/WebPageIOS.mm:
2498         (WebKit::WebPage::getAssistedNodeInformation): Transports the information if the currently
2499         highlighted node accepts autofilled login credentials.
2500         (WebKit::WebPage::autofillLoginCredentials): Fills the login credentials into the
2501         WebPage.
2502
2503 2017-09-25  Youenn Fablet  <youenn@apple.com>
2504
2505         WebRTC video does not resume receiving when switching back to Safari 11 on iOS
2506         https://bugs.webkit.org/show_bug.cgi?id=175472
2507         <rdar://problem/33860863>
2508
2509         Reviewed by Darin Adler.
2510
2511         Notifying LibWebRTC of backgrounding/foregrouding.
2512
2513         * WebProcess/WebPage/ios/WebPageIOS.mm:
2514         (WebKit::WebPage::applicationDidEnterBackground):
2515         (WebKit::WebPage::applicationWillEnterForeground):
2516
2517 2017-09-25  Sam Weinig  <sam@webkit.org>
2518
2519         Remove unused EditorClient functions
2520         https://bugs.webkit.org/show_bug.cgi?id=177463
2521
2522         Reviewed by Alex Christensen.
2523
2524         Remove unused EditorClient functions.
2525
2526         * WebProcess/WebCoreSupport/WebEditorClient.h:
2527         * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
2528         (WebKit::WebEditorClient::canonicalizeURL): Deleted.
2529         (WebKit::WebEditorClient::canonicalizeURLString): Deleted.
2530         (WebKit::WebEditorClient::writeDataToPasteboard): Deleted.
2531         (WebKit::WebEditorClient::supportedPasteboardTypesForCurrentSelection): Deleted.
2532         (WebKit::WebEditorClient::readDataFromPasteboard): Deleted.
2533         (WebKit::WebEditorClient::pasteboardChangeCount): Deleted.
2534         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2535         (WebKit::WebEditorClient::canonicalizeURL): Deleted.
2536         (WebKit::WebEditorClient::canonicalizeURLString): Deleted.
2537
2538 2017-09-25  Alex Christensen  <achristensen@webkit.org>
2539
2540         Make Attribute an enum class
2541         https://bugs.webkit.org/show_bug.cgi?id=177414
2542
2543         Reviewed by Yusuke Suzuki.
2544
2545         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
2546         (WebKit::JSNPObject::getOwnPropertySlot):
2547
2548 2017-09-25  Alex Christensen  <achristensen@webkit.org>
2549
2550         Stop using PolicyCallback
2551         https://bugs.webkit.org/show_bug.cgi?id=176088
2552
2553         Reviewed by Andy Estes.
2554
2555         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2556         * WebProcess/WebPage/WebFrame.cpp:
2557         (WebKit::WebFrame::invalidatePolicyListener):
2558         * WebProcess/WebPage/WebFrame.h:
2559         * WebProcess/WebPage/WebInspector.cpp:
2560
2561 2017-09-25  Chris Dumez  <cdumez@apple.com>
2562
2563         [WK2] Add API to query if a download was user-initiated
2564         https://bugs.webkit.org/show_bug.cgi?id=177435
2565         <rdar://problem/34498422>
2566
2567         Reviewed by Alex Christensen.
2568
2569         Add C and Cocoa private API to query if a download was user-initiated.
2570
2571         For clarity, we now construct navigation object for subframe loads
2572         as well (we used to do so only for main frame loads). This allows us
2573         to store the user-intiated flag and the redirect chain on the navigation
2574         object instead of the WebFrameProxy.
2575
2576         * UIProcess/API/APINavigation.cpp:
2577         (API::Navigation::Navigation):
2578         (API::Navigation::appendRedirectionURL):
2579         * UIProcess/API/APINavigation.h:
2580         (API::Navigation::takeRedirectChain):
2581         (API::Navigation::setWasUserInitiated):
2582         (API::Navigation::wasUserInitiated const):
2583         * UIProcess/API/C/WKDownload.cpp:
2584         (WKDownloadGetWasUserInitiated):
2585         * UIProcess/API/C/WKDownload.h:
2586         * UIProcess/API/Cocoa/_WKDownload.h:
2587         * UIProcess/API/Cocoa/_WKDownload.mm:
2588         (-[_WKDownload wasUserInitiated]):
2589         * UIProcess/Downloads/DownloadProxy.h:
2590         (WebKit::DownloadProxy::setWasUserInitiated):
2591         (WebKit::DownloadProxy::wasUserInitiated const):
2592         * UIProcess/WebFrameProxy.cpp:
2593         (WebKit::WebFrameProxy::didStartProvisionalLoad):
2594         (WebKit::WebFrameProxy::didReceiveServerRedirectForProvisionalLoad):
2595         (WebKit::WebFrameProxy::didFailProvisionalLoad):
2596         (WebKit::WebFrameProxy::didFinishLoad):
2597         (WebKit::WebFrameProxy::didFailLoad):
2598         * UIProcess/WebFrameProxy.h:
2599         (WebKit::WebFrameProxy::title const):
2600         * UIProcess/WebPageProxy.cpp:
2601         (WebKit::WebPageProxy::receivedPolicyDecision):
2602         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
2603         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
2604         (WebKit::WebPageProxy::decidePolicyForResponse):
2605         (WebKit::WebPageProxy::decidePolicyForResponseSync):
2606         * UIProcess/WebPageProxy.h:
2607         * UIProcess/WebPageProxy.messages.in:
2608         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2609         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
2610
2611 2017-09-25  Chris Dumez  <cdumez@apple.com>
2612
2613         Make StoredCredentials an enum class and rename its header
2614         https://bugs.webkit.org/show_bug.cgi?id=177455
2615
2616         Reviewed by Youenn Fablet.
2617
2618         Make StoredCredentials an enum class and rename its header for clarity. This was error-prone because 0 meant
2619         "allow" and and 1 meant "do not allow". It was trivial to convert it to a boolean by mistake and get the
2620         opposite behavior.
2621
2622         * NetworkProcess/Downloads/DownloadManager.cpp:
2623         (WebKit::DownloadManager::startDownload):
2624         * NetworkProcess/NetworkCORSPreflightChecker.cpp:
2625         (WebKit::NetworkCORSPreflightChecker::didCompleteWithError):
2626         * NetworkProcess/NetworkCORSPreflightChecker.h:
2627         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2628         (WebKit::NetworkConnectionToWebProcess::loadPing):
2629         * NetworkProcess/NetworkDataTask.cpp:
2630         (WebKit::NetworkDataTask::create):
2631         (WebKit::NetworkDataTask::NetworkDataTask):
2632         * NetworkProcess/NetworkDataTask.h:
2633         * NetworkProcess/NetworkDataTaskBlob.cpp:
2634         (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
2635         * NetworkProcess/NetworkLoad.cpp:
2636         (WebKit::NetworkLoad::shouldUseCredentialStorage):
2637         * NetworkProcess/NetworkLoadParameters.h:
2638         * NetworkProcess/NetworkResourceLoadParameters.cpp:
2639         (WebKit::NetworkResourceLoadParameters::encode const):
2640         (WebKit::NetworkResourceLoadParameters::decode):
2641         * NetworkProcess/PingLoad.cpp:
2642         (WebKit::PingLoad::willPerformHTTPRedirection):
2643         (WebKit::PingLoad::makeCrossOriginAccessRequest):
2644         (WebKit::PingLoad::makeSimpleCrossOriginAccessRequest):
2645         (WebKit::PingLoad::makeCrossOriginAccessRequestWithPreflight):
2646         (WebKit::PingLoad::preflightSuccess):
2647         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
2648         (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
2649         * NetworkProcess/capture/NetworkDataTaskReplay.cpp:
2650         (WebKit::NetworkCapture::NetworkDataTaskReplay::NetworkDataTaskReplay):
2651         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
2652         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
2653         (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
2654         (WebKit::NetworkDataTaskCocoa::~NetworkDataTaskCocoa):
2655         (WebKit::NetworkDataTaskCocoa::tryPasswordBasedAuthentication):
2656         * NetworkProcess/cocoa/NetworkSessionCocoa.h:
2657         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2658         (-[WKNetworkSessionDelegate existingTask:]):
2659         (WebKit::NetworkSessionCocoa::dataTaskForIdentifier):
2660         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
2661         (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
2662         (WebKit::NetworkDataTaskSoup::createRequest):
2663         (WebKit::NetworkDataTaskSoup::authenticate):
2664         (WebKit::NetworkDataTaskSoup::continueAuthenticate):
2665         (WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
2666         * NetworkProcess/soup/NetworkDataTaskSoup.h:
2667         * WebProcess/Network/WebLoaderStrategy.cpp:
2668         (WebKit::WebLoaderStrategy::scheduleLoad):
2669         (WebKit::WebLoaderStrategy::loadResourceSynchronously):
2670         (WebKit::WebLoaderStrategy::startPingLoad):
2671         * WebProcess/Network/WebLoaderStrategy.h:
2672
2673 2017-09-25  Sam Weinig  <sam@webkit.org>
2674
2675         Remove unnecessary userVisibleString EditorClient function
2676         https://bugs.webkit.org/show_bug.cgi?id=177456
2677
2678         Reviewed by Dan Bernstein.
2679
2680         * WebProcess/WebCoreSupport/WebEditorClient.h:
2681         * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
2682         (WebKit::WebEditorClient::userVisibleString): Deleted.
2683         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2684         (WebKit::WebEditorClient::userVisibleString): Deleted.
2685
2686             Remove userVisibleString client function.
2687
2688 2017-09-25  Commit Queue  <commit-queue@webkit.org>
2689
2690         Unreviewed, rolling out r222455.
2691         https://bugs.webkit.org/show_bug.cgi?id=177460
2692
2693         broke iOS build (Requested by alexchristensen on #webkit).
2694
2695         Reverted changeset:
2696
2697         "Add WKContentRuleList notify action type"
2698         https://bugs.webkit.org/show_bug.cgi?id=177013
2699         http://trac.webkit.org/changeset/222455
2700
2701 2017-09-25  Alex Christensen  <achristensen@webkit.org>
2702
2703         Separate form submission from PolicyChecker infrastructure
2704         https://bugs.webkit.org/show_bug.cgi?id=177396
2705
2706         Reviewed by Geoffrey Garen.
2707
2708         * UIProcess/API/APIFormClient.h:
2709         (API::FormClient::willSubmitForm):
2710         * UIProcess/API/Cocoa/WKWebView.mm:
2711         (-[WKWebView _setInputDelegate:]):
2712         * UIProcess/WebFormClient.cpp:
2713         (WebKit::WebFormClient::willSubmitForm):
2714         * UIProcess/WebFormClient.h:
2715         * UIProcess/WebFormSubmissionListenerProxy.cpp:
2716         (WebKit::WebFormSubmissionListenerProxy::continueSubmission):
2717         (WebKit::WebFormSubmissionListenerProxy::WebFormSubmissionListenerProxy): Deleted.
2718         * UIProcess/WebFormSubmissionListenerProxy.h:
2719         (WebKit::WebFormSubmissionListenerProxy::create):
2720         (WebKit::WebFormSubmissionListenerProxy::WebFormSubmissionListenerProxy):
2721         (): Deleted.
2722         (WebKit::WebFormSubmissionListenerProxy::operator new): Deleted.
2723         * UIProcess/WebFrameProxy.cpp:
2724         (WebKit::WebFrameProxy::setUpFormSubmissionListenerProxy): Deleted.
2725         * UIProcess/WebFrameProxy.h:
2726         * UIProcess/WebPageProxy.cpp:
2727         (WebKit::WebPageProxy::willSubmitForm):
2728         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2729         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
2730         (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
2731         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2732         * WebProcess/WebPage/WebFrame.cpp:
2733         (WebKit::WebFrame::setUpWillSubmitFormListener):
2734         (WebKit::WebFrame::continueWillSubmitForm):
2735         * WebProcess/WebPage/WebFrame.h:
2736         * WebProcess/WebPage/WebPage.cpp:
2737         (WebKit::WebPage::continueWillSubmitForm):
2738         * WebProcess/WebPage/WebPage.h:
2739         * WebProcess/WebPage/WebPage.messages.in:
2740
2741 2017-09-25  Alex Christensen  <achristensen@webkit.org>
2742
2743         Add WKContentRuleList notify action type
2744         https://bugs.webkit.org/show_bug.cgi?id=177013
2745         <rdar://problem/31073936>
2746
2747         Reviewed by Darin Adler.
2748
2749         * NetworkProcess/PingLoad.cpp:
2750         (WebKit::PingLoad::processContentExtensionRulesForLoad):
2751         * UIProcess/API/APINavigationClient.h:
2752         (API::NavigationClient::contentRuleListNotification):
2753         * UIProcess/API/C/WKPage.cpp:
2754         (WKPageSetPageNavigationClient):
2755         * UIProcess/API/C/WKPageNavigationClient.h:
2756         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
2757         * UIProcess/Cocoa/NavigationState.h:
2758         * UIProcess/Cocoa/NavigationState.mm:
2759         (WebKit::NavigationState::setNavigationDelegate):
2760         (WebKit::NavigationState::NavigationClient::contentRuleListNotification):
2761         * UIProcess/WebPageProxy.cpp:
2762         (WebKit::WebPageProxy::contentRuleListNotification):
2763         * UIProcess/WebPageProxy.h:
2764         * UIProcess/WebPageProxy.messages.in:
2765         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2766         (WebKit::WebChromeClient::contentRuleListNotification):
2767         * WebProcess/WebCoreSupport/WebChromeClient.h:
2768
2769 2017-09-25  Timothy Horton  <timothy_horton@apple.com>
2770
2771         Make progress on getting Mac CMake building again
2772         https://bugs.webkit.org/show_bug.cgi?id=177443
2773
2774         Unreviewed, just "fixing" the build.
2775
2776         * PlatformMac.cmake:
2777         Add some missing files and include paths.
2778
2779 2017-09-24  Michael Catanzaro  <mcatanzaro@igalia.com>
2780
2781         Viewport fit is no longer experimental
2782         https://bugs.webkit.org/show_bug.cgi?id=177417
2783
2784         Reviewed by Darin Adler.
2785
2786         * Shared/WebPreferencesDefinitions.h:
2787
2788 2017-09-24  Michael Catanzaro  <mcatanzaro@igalia.com>
2789
2790         [GTK] Unreviewed, move webkit_hit_test_result_context_is_scrollbar in documentation
2791
2792         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
2793
2794 2017-09-24  Michael Catanzaro  <mcatanzaro@igalia.com>
2795
2796         Alphabetize experimental features list
2797         https://bugs.webkit.org/show_bug.cgi?id=177374
2798
2799         Reviewed by Darin Adler.
2800
2801         * Shared/WebPreferencesDefinitions.h:
2802
2803 2017-09-24  Zan Dobersek  <zdobersek@igalia.com>
2804
2805         [WebKit] Changing EME setting through InjectedBundle should update WebPreferencesStore
2806         https://bugs.webkit.org/show_bug.cgi?id=177312
2807
2808         Reviewed by Carlos Garcia Campos.
2809
2810         When enabling EME through the InjectedBundle for testing purposes, it's
2811         only enabled in RuntimeEnabledFeatures, but not in WebPreferencesStore.
2812         This causes failures on imported W3C tests that cover EME persistent
2813         state licenses and perform parts of that test in a new window, where
2814         the original RuntimeEnabledFeatures state doesn't have any effect.
2815
2816         To avoid those failures, when enabling EME feature for testing purposes
2817         through InjectedBundle, the feature should also be enabled in the
2818         WebPreferencesStore.
2819
2820         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2821         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2822
2823 2017-09-22  Zalan Bujtas  <zalan@apple.com>
2824
2825         WeakPtrFactory should populate m_ref lazily.
2826         https://bugs.webkit.org/show_bug.cgi?id=177375
2827
2828         Reviewed by Geoffrey Garen.
2829
2830         * UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:
2831         (WebKit::WebPaymentCoordinatorProxy::WebPaymentCoordinatorProxy):
2832         (WebKit::WebPaymentCoordinatorProxy::canMakePaymentsWithActiveCard):
2833         (WebKit::WebPaymentCoordinatorProxy::openPaymentSetup):
2834         * UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
2835         (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
2836         * UIProcess/ApplicationStateTracker.mm:
2837         (WebKit::ApplicationStateTracker::ApplicationStateTracker):
2838         * UIProcess/Cocoa/WebViewImpl.h:
2839         (WebKit::WebViewImpl::createWeakPtr):
2840         * UIProcess/Cocoa/WebViewImpl.mm:
2841         (WebKit::WebViewImpl::WebViewImpl):
2842         * UIProcess/Launcher/ProcessLauncher.cpp:
2843         (WebKit::ProcessLauncher::ProcessLauncher):
2844         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2845         (WebKit::ProcessLauncher::launchProcess):
2846         * UIProcess/ProcessAssertion.h:
2847         (WebKit::ProcessAssertion::createWeakPtr):
2848         * UIProcess/WebPageProxy.cpp:
2849         (WebKit::m_configurationPreferenceValues):
2850         (WebKit::m_weakPtrFactory): Deleted.
2851         * UIProcess/WebPageProxy.h:
2852         (WebKit::WebPageProxy::createWeakPtr const):
2853         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
2854         (WebKit::RemoteLayerTreeDrawingArea::createWeakPtr):
2855         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
2856         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
2857
2858 2017-09-22  John Wilander  <wilander@apple.com>
2859
2860         Re-enable configuration.HTTPCookieStorage on session without credentials
2861         https://bugs.webkit.org/show_bug.cgi?id=177393
2862
2863         This patch rolls back the crucial change to the network session
2864         without credentials that landed in r221632:
2865         <http://trac.webkit.org/changeset/221632>
2866
2867         Reviewed by Brent Fulgham.
2868
2869         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2870         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
2871             Commented out the disabled cookie jar and added a FIXME
2872             referring to https://bugs.webkit.org/show_bug.cgi?id=177394.
2873
2874 2017-09-22  Chris Dumez  <cdumez@apple.com>
2875
2876         Enable File and Directory Entries API at runtime
2877         https://bugs.webkit.org/show_bug.cgi?id=176616
2878         <rdar://problem/34330942>
2879
2880         Reviewed by Geoffrey Garen.
2881
2882         Enable File and Directory Entries API at runtime on Mac/WebKit2,
2883         now that DataTransfer.items is enabled there.
2884
2885         * Shared/WebPreferencesDefinitions.h:
2886
2887 2017-09-22  Matt Lewis  <jlewis3@apple.com>
2888
2889         Unreviewed, rolling out r222394.
2890
2891         This broke the Windows Debug Build.
2892
2893         Reverted changeset:
2894
2895         "Remove build-webkit's notion of feature flags having a
2896         default value"
2897         https://bugs.webkit.org/show_bug.cgi?id=177338
2898         http://trac.webkit.org/changeset/222394
2899
2900 2017-09-22  John Wilander  <wilander@apple.com>
2901
2902         Non-prevalent resources should be allowed access to existing cookies in a third-party context
2903         https://bugs.webkit.org/show_bug.cgi?id=177336
2904         <rdar://problem/34578257>
2905
2906         Reviewed by Brent Fulgham.
2907
2908         This patch restructures what is communicated to the network process,
2909         from two vectors - with user interaction and without user interaction -
2910         to three vectors - to partition, to block, to neither partition nor block.
2911         The previous two vectors did not allow proper categorization into which
2912         domains should be partitioned, blocked, or left alone. That was the cause
2913         of the regression where non-prevalent third-party domains erroneously had
2914         their cookies blocked when they should fall back to the old behavior of
2915         access but no new cookies allowed to be set.
2916
2917         * NetworkProcess/NetworkProcess.cpp:
2918         (WebKit::NetworkProcess::updatePrevalentDomainsToPartitionOrBlockCookies):
2919         (WebKit::NetworkProcess::updatePrevalentDomainsWithAndWithoutInteraction): Deleted.
2920         * NetworkProcess/NetworkProcess.h:
2921         * NetworkProcess/NetworkProcess.messages.in:
2922         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2923         (-[WKWebsiteDataStore _resourceLoadStatisticsSetShouldPartitionCookies:forHost:]):
2924         * UIProcess/WebResourceLoadStatisticsStore.cpp:
2925         (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
2926         (WebKit::WebResourceLoadStatisticsStore::logUserInteraction):
2927         (WebKit::WebResourceLoadStatisticsStore::scheduleCookiePartitioningUpdateForDomains):
2928         (WebKit::WebResourceLoadStatisticsStore::clearInMemory):
2929         (WebKit::WebResourceLoadStatisticsStore::shouldPartitionCookies const):
2930         (WebKit::WebResourceLoadStatisticsStore::shouldBlockCookies const):
2931         (WebKit::WebResourceLoadStatisticsStore::updateCookiePartitioning):
2932         (WebKit::WebResourceLoadStatisticsStore::updateCookiePartitioningForDomains):
2933         (WebKit::WebResourceLoadStatisticsStore::clearPartitioningStateForDomains):
2934         (WebKit::WebResourceLoadStatisticsStore::resetCookiePartitioningState):
2935         * UIProcess/WebResourceLoadStatisticsStore.h:
2936         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2937         (WebKit::WebsiteDataStore::updatePrevalentDomainsToPartitionOrBlockCookies):
2938         (WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):
2939         (WebKit::WebsiteDataStore::updatePrevalentDomainsWithAndWithoutInteraction): Deleted.
2940         * UIProcess/WebsiteData/WebsiteDataStore.h:
2941
2942 2017-09-22  Tim Horton <timothy_horton@apple.com> and Michael Catanzaro <mcatanzaro@igalia.com>
2943
2944         Remove build-webkit's notion of feature flags having a default value
2945         https://bugs.webkit.org/show_bug.cgi?id=177338
2946
2947         Reviewed by Alex Christensen.
2948
2949         Use ENABLE_EXPERIMENTAL_FEATURES instead of ENABLE_DEVELOPER_MODE to enable runtime
2950         experimental features.
2951
2952         * Shared/WebPreferencesDefinitions.h:
2953
2954 2017-09-22  Chris Dumez  <cdumez@apple.com>
2955
2956         Use high resolution timestamp for event time
2957         https://bugs.webkit.org/show_bug.cgi?id=154246
2958         <rdar://problem/34333304>
2959
2960         Reviewed by Ryosuke Niwa.
2961
2962         Use WallTime / MonotonicTime instead of double type for clarity.
2963
2964         * Shared/WebCoreArgumentCoders.cpp:
2965         (IPC::ArgumentCoder<WallTime>::encode):
2966         (IPC::ArgumentCoder<WallTime>::decode):
2967         * Shared/WebCoreArgumentCoders.h:
2968         * Shared/WebEvent.cpp:
2969         (WebKit::WebEvent::WebEvent):
2970         * Shared/WebEvent.h:
2971         (WebKit::WebEvent::timestamp const):
2972         (WebKit::WebTouchEvent::WebTouchEvent):
2973         * Shared/WebKeyboardEvent.cpp:
2974         (WebKit::WebKeyboardEvent::WebKeyboardEvent):
2975         * Shared/WebMouseEvent.cpp:
2976         (WebKit::WebMouseEvent::WebMouseEvent):
2977         * Shared/WebTouchEvent.cpp:
2978         (WebKit::WebTouchEvent::WebTouchEvent):
2979         * Shared/WebWheelEvent.cpp:
2980         (WebKit::WebWheelEvent::WebWheelEvent):
2981         * Shared/gtk/WebEventFactory.cpp:
2982         (WebKit::WebEventFactory::createWebMouseEvent):
2983         (WebKit::WebEventFactory::createWebWheelEvent):
2984         (WebKit::WebEventFactory::createWebKeyboardEvent):
2985         (WebKit::WebEventFactory::createWebTouchEvent):
2986         * Shared/ios/NativeWebTouchEventIOS.mm:
2987         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
2988         * Shared/ios/WebIOSEventFactory.mm:
2989         (WebIOSEventFactory::createWebKeyboardEvent):
2990         * Shared/mac/NativeWebGestureEventMac.mm:
2991         (WebKit::NativeWebGestureEvent::NativeWebGestureEvent):
2992         * Shared/mac/WebEventFactory.mm:
2993         (WebKit::WebEventFactory::createWebMouseEvent):
2994         (WebKit::WebEventFactory::createWebWheelEvent):
2995         (WebKit::WebEventFactory::createWebKeyboardEvent):
2996         * Shared/mac/WebGestureEvent.h:
2997         (WebKit::WebGestureEvent::WebGestureEvent):
2998         * Shared/wpe/WebEventFactory.cpp:
2999         (WebKit::WebEventFactory::createWebKeyboardEvent):
3000         (WebKit::WebEventFactory::createWebMouseEvent):
3001         (WebKit::WebEventFactory::createWebWheelEvent):
3002         (WebKit::WebEventFactory::createWebTouchEvent):
3003         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3004         (WKBundlePageSimulateMouseDown):
3005         (WKBundlePageSimulateMouseUp):
3006         (WKBundlePageSimulateMouseMotion):
3007         * WebProcess/Plugins/PDF/PDFPlugin.mm:
3008         (WebKit::PDFPlugin::showContextMenuAtPoint):
3009         * WebProcess/Plugins/PluginView.cpp:
3010         (WebKit::PluginView::createWebEvent const):
3011         * WebProcess/WebPage/WebPage.cpp:
3012         (WebKit::WebPage::navigateToPDFLinkWithSimulatedClick):
3013         (WebKit::WebPage::contextMenuAtPointInWindow):
3014         (WebKit::WebPage::dragEnded):
3015         (WebKit::WebPage::simulateMouseDown):
3016         (WebKit::WebPage::simulateMouseUp):
3017         (WebKit::WebPage::simulateMouseMotion):
3018         * WebProcess/WebPage/WebPage.h:
3019         * WebProcess/WebPage/ios/WebPageIOS.mm:
3020         (WebKit::WebPage::handleSyntheticClick):
3021         (WebKit::WebPage::completeSyntheticClick):
3022         (WebKit::WebPage::requestAdditionalItemsForDragSession):
3023         (WebKit::WebPage::inspectorNodeSearchMovedToPosition):
3024
3025 2017-09-22  Fujii Hironori  <Hironori.Fujii@sony.com>
3026
3027         [GTK] Web Inspector: Can't load three.js
3028         https://bugs.webkit.org/show_bug.cgi?id=177340
3029
3030         Reviewed by Carlos Garcia Campos.
3031
3032         * PlatformGTK.cmake: Add JS files of three.js to InspectorFiles variable.
3033         * PlatformWPE.cmake: Ditto.
3034
3035 2017-09-21  Ryosuke Niwa  <rniwa@webkit.org>
3036
3037         Enable dataTransfer.items on macOS and iOS
3038         https://bugs.webkit.org/show_bug.cgi?id=177335
3039
3040         Reviewed by Sam Weinig.
3041
3042         * Shared/WebPreferencesDefinitions.h:
3043
3044 2017-09-21  Dan Bernstein  <mitz@apple.com>
3045
3046         Try to fix Apple internal builds with the iOS 11.0 SDK.
3047
3048         * Configurations/WebKit.xcconfig: Disable framework header postprocessing for iOS 11.0.
3049
3050 2017-09-21  Chris Dumez  <cdumez@apple.com>
3051
3052         Regression(r222308): new API tests are failing for !NETWORK_SESSION
3053         https://bugs.webkit.org/show_bug.cgi?id=177321
3054
3055         Reviewed by Alex Christensen.
3056
3057         When a load is redirected and then converted into a download, CFNetwork
3058         seems to call [NSURLDownloadDelegate willSendRequest:] on the download
3059         with a non-nil redirectResponse, which was unexpected.
3060
3061         To address the issue, we now ignore the willSendRequest call if the
3062         new request's URL is the same as the redirectResponse one.
3063
3064         * NetworkProcess/Downloads/mac/DownloadMac.mm:
3065         (-[WKDownloadAsDelegate download:willSendRequest:redirectResponse:]):
3066
3067 2017-09-21  Chris Dumez  <cdumez@apple.com>
3068
3069         Unreviewed, drop assertion added in r222308.
3070
3071         The assertion is hit by a couple of tests still but there is no bad effect
3072         to the vector not being empty at this point since we clear it right after.
3073
3074         * UIProcess/WebFrameProxy.cpp:
3075         (WebKit::WebFrameProxy::didStartProvisionalLoad):
3076
3077 2017-09-21  Chris Dumez  <cdumez@apple.com>
3078
3079         [WK2] Add API to get the redirect chain of a WKDownload
3080         https://bugs.webkit.org/show_bug.cgi?id=176628
3081         <rdar://problem/34338279>
3082
3083         Reviewed by Alex Christensen.
3084
3085         Re-enable assertion initially added in r222308 and later disabled in
3086         r222320. The assertion was hit because we failed to clear the redirect
3087         chain in WebFrameProxy::didFailProvisionalLoad().
3088
3089         * UIProcess/WebFrameProxy.cpp:
3090         (WebKit::WebFrameProxy::didStartProvisionalLoad):
3091         (WebKit::WebFrameProxy::didFailProvisionalLoad):
3092
3093 2017-09-21  Alex Christensen  <achristensen@webkit.org>
3094
3095         REGRESSION(r221465) WKWebViews without WebGL delegate callbacks crash when WebGL contexts are created
3096         https://bugs.webkit.org/show_bug.cgi?id=177306
3097         <rdar://problem/34351988>
3098
3099         Reviewed by Chris Dumez.
3100
3101         * UIProcess/Cocoa/NavigationState.mm:
3102         (WebKit::NavigationState::NavigationClient::webGLLoadPolicy const):
3103         (WebKit::NavigationState::NavigationClient::resolveWebGLLoadPolicy const):
3104         I forgot to early return after calling the default completion handler if there's no delegate selector.
3105
3106 2017-09-21  Chris Dumez  <cdumez@apple.com>
3107
3108         Unreviewed, temporarily disable assertion added in r222308 while I investigate.
3109
3110         * UIProcess/WebFrameProxy.cpp:
3111         (WebKit::WebFrameProxy::didStartProvisionalLoad):
3112
3113 2017-09-20  Stephan Szabo  <stephan.szabo@sony.com>
3114
3115         [Win] WTF: Add alias for process id to use in place of direct uses of pid_t
3116         https://bugs.webkit.org/show_bug.cgi?id=177017
3117
3118         Reviewed by Alex Christensen.
3119
3120         * NetworkProcess/NetworkProcessCreationParameters.h:
3121         * Shared/WebProcessCreationParameters.h:
3122         * UIProcess/API/APIProcessPoolConfiguration.h:
3123         * UIProcess/API/C/WKContext.cpp:
3124         (WKContextGetNetworkProcessIdentifier):
3125         (WKContextGetDatabaseProcessIdentifier):
3126         * UIProcess/API/C/WKContextPrivate.h:
3127         * UIProcess/API/C/WKPage.cpp:
3128         (WKPageGetProcessIdentifier):
3129         * UIProcess/API/C/WKPagePrivate.h:
3130         * UIProcess/ChildProcessProxy.h:
3131         (WebKit::ChildProcessProxy::processIdentifier const):
3132         * UIProcess/Launcher/ProcessLauncher.cpp:
3133         (WebKit::ProcessLauncher::didFinishLaunchingProcess):
3134         * UIProcess/Launcher/ProcessLauncher.h:
3135         (WebKit::ProcessLauncher::processIdentifier const):
3136         * UIProcess/ProcessAssertion.cpp:
3137         (WebKit::ProcessAssertion::ProcessAssertion):
3138         (WebKit::ProcessAndUIAssertion::ProcessAndUIAssertion):
3139         * UIProcess/ProcessAssertion.h:
3140         (WebKit::ProcessAssertion::ProcessAssertion):
3141         * UIProcess/ProcessThrottler.cpp:
3142         (WebKit::ProcessThrottler::didConnectToProcess):
3143         * UIProcess/ProcessThrottler.h:
3144         * UIProcess/WebPageProxy.cpp:
3145         (WebKit::WebPageProxy::processIdentifier const):
3146         * UIProcess/WebPageProxy.h:
3147         * UIProcess/WebProcessPool.cpp:
3148         (WebKit::WebProcessPool::networkProcessIdentifier):
3149         (WebKit::WebProcessPool::storageProcessIdentifier):
3150         * UIProcess/WebProcessPool.h:
3151
3152 2017-09-20  Chris Dumez  <cdumez@apple.com>
3153
3154         [WK2] Add API to get the redirect chain of a WKDownload
3155         https://bugs.webkit.org/show_bug.cgi?id=176628
3156         <rdar://problem/34338279>
3157
3158         Reviewed by Alex Christensen.
3159
3160         Add API to get the redirect chain of a WKDwnload. The redirect chain includes redirects
3161         that happened during initial load, before the load was converted into a download.
3162
3163         * UIProcess/API/C/WKDownload.cpp:
3164         (WKDownloadCopyRedirectChain):
3165         * UIProcess/API/C/WKDownload.h:
3166         * UIProcess/API/Cocoa/_WKDownload.h:
3167         * UIProcess/API/Cocoa/_WKDownload.mm:
3168         (-[_WKDownload originatingWebView]):
3169         (-[_WKDownload redirectChain]):
3170         * UIProcess/Downloads/DownloadProxy.cpp:
3171         (WebKit::DownloadProxy::willSendRequest):
3172         * UIProcess/Downloads/DownloadProxy.h:
3173         (WebKit::DownloadProxy::setRedirectChain):
3174         (WebKit::DownloadProxy::redirectChain const):
3175         * UIProcess/WebFrameProxy.cpp:
3176         (WebKit::WebFrameProxy::didStartProvisionalLoad):
3177         (WebKit::WebFrameProxy::didReceiveServerRedirectForProvisionalLoad):
3178         * UIProcess/WebFrameProxy.h:
3179         (WebKit::WebFrameProxy::redirectChain const):
3180         * UIProcess/WebPageProxy.cpp:
3181         (WebKit::WebPageProxy::receivedPolicyDecision):
3182
3183 2017-09-20  Alex Christensen  <achristensen@webkit.org>
3184
3185         Add infrastructure for adding custom headers to requests per website
3186         https://bugs.webkit.org/show_bug.cgi?id=177255
3187
3188         Reviewed by Geoffrey Garen.
3189
3190         * Shared/WebsitePolicies.cpp: Added.
3191         * Shared/WebsitePolicies.h:
3192         (WebKit::WebsitePolicies::encode const):
3193         (WebKit::WebsitePolicies::decode):
3194         * UIProcess/API/APIWebsitePolicies.h:
3195         * UIProcess/API/C/WKWebsitePolicies.cpp:
3196         (WKWebsitePoliciesCopyCustomHeaderFields):
3197         (WKWebsitePoliciesSetCustomHeaderFields):
3198         * UIProcess/API/C/WKWebsitePolicies.h:
3199         * UIProcess/API/Cocoa/_WKWebsitePolicies.h:
3200         * UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
3201         (-[_WKWebsitePolicies customHeaderFields]):
3202         (-[_WKWebsitePolicies setCustomHeaderFields:]):
3203         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3204         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
3205
3206 2017-09-20  Michael Catanzaro  <mcatanzaro@igalia.com>
3207
3208         REGRESSION(r222194) [WPE] Library and executable output names broken
3209         https://bugs.webkit.org/show_bug.cgi?id=177273
3210
3211         Reviewed by Carlos Alberto Lopez Perez.
3212
3213         Move the WebKit2 output name variables to here from Source/cmake, since this is a better
3214         place and where they are set on all other ports. Update them for the changes in r222194.
3215
3216         * PlatformWPE.cmake:
3217
3218 2017-09-20  Jonathan Bedard  <jbedard@apple.com>
3219
3220         Removed nullable from UIDragItem property
3221         https://bugs.webkit.org/show_bug.cgi?id=176264
3222         <rdar://problem/31144674>
3223
3224         Unreviewed build fix
3225
3226         When a nullable annotation is used in a header file,
3227         the Objective-C compiler forces annotations on the entire
3228         file. Remove an unneeded annotation in UIKitSPI.h so that
3229         we can build in iOS 11.
3230
3231         * Platform/spi/ios/UIKitSPI.h:
3232
3233 2017-09-20  Antti Koivisto  <antti@apple.com>
3234
3235         Remove DOM and styling support for CSS Regions
3236         https://bugs.webkit.org/show_bug.cgi?id=177221
3237
3238         Reviewed by Andreas Kling.
3239
3240         * Configurations/FeatureDefines.xcconfig:
3241
3242 2017-09-19  Simon Fraser  <simon.fraser@apple.com>
3243
3244         Do more math in terms of FloatSizes and FloatPoints
3245         https://bugs.webkit.org/show_bug.cgi?id=177217
3246
3247         Reviewed by Zalan Bujtas.
3248
3249         Add operator/(const FloatSize&, const FloatSize&), GraphicsContext::translate(const FloatPoint&),
3250         FloatRect.scale(FloatSize) and AffineTransform::translate(const FloatSize&)
3251         and use them in lots of places to do math in terms of points and sizes.
3252
3253         * UIProcess/API/Cocoa/WKWebView.mm:
3254         (-[WKWebView _didCommitLayerTree:]):
3255         * UIProcess/ios/DragDropInteractionState.mm:
3256         (WebKit::createTargetedDragPreview):
3257         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
3258         (WebKit::imageForRect):
3259         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
3260         (WebKit::InjectedBundleRangeHandle::renderedImage):
3261         * WebProcess/WebPage/WebPage.cpp:
3262         (WebKit::paintSnapshotAtSize):
3263         (WebKit::WebPage::snapshotNode):
3264
3265 2017-09-19  Simon Fraser  <simon.fraser@apple.com>
3266
3267         tiled-drawing/tiled-backing-in-window.html fails on Retina displays
3268         https://bugs.webkit.org/show_bug.cgi?id=177113
3269
3270         Reviewed by Tim Horton.
3271
3272         Make m_customDeviceScaleFactor a std::optional<> instead of having the weird "0 is unset"
3273         behavior.
3274
3275         * UIProcess/WebPageProxy.cpp:
3276         (WebKit::WebPageProxy::deviceScaleFactor const):
3277         (WebKit::WebPageProxy::setCustomDeviceScaleFactor):
3278         * UIProcess/WebPageProxy.h:
3279
3280 2017-09-19  Alex Christensen  <achristensen@webkit.org>
3281
3282         Allow modern decoding of Vectors
3283         https://bugs.webkit.org/show_bug.cgi?id=177102
3284
3285         Reviewed by Andy Estes.
3286
3287         Rather than allow modern decoding of Vectors of types that only allow legacy decoding,
3288         I just made modern decoders for all types that we need to decode in Vectors.
3289
3290         * NetworkProcess/NetworkResourceLoadParameters.cpp:
3291         (WebKit::NetworkResourceLoadParameters::decode):
3292         * Platform/IPC/ArgumentCoders.cpp:
3293         (IPC::ArgumentCoder<std::chrono::system_clock::time_point>::decode):
3294         * Platform/IPC/ArgumentCoders.h:
3295         * Shared/AssistedNodeInformation.cpp:
3296         (WebKit::OptionItem::decode):
3297         * Shared/AssistedNodeInformation.h:
3298         * Shared/CallbackID.h:
3299         (WebKit::CallbackID::decode):
3300         * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
3301         (IPC::ArgumentCoder<WebCore::PaymentError>::decode):
3302         (IPC::ArgumentCoder<WebCore::PaymentMethodUpdate>::decode):
3303         (IPC::ArgumentCoder<ApplePaySessionPaymentRequest>::decode):
3304         (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::LineItem>::decode):
3305         (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::ShippingMethod>::decode):
3306         (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::TotalAndLineItems>::decode):
3307         (IPC::ArgumentCoder<WebCore::ShippingContactUpdate>::decode):
3308         (IPC::ArgumentCoder<WebCore::ShippingMethodUpdate>::decode):
3309         * Shared/Databases/IndexedDB/WebIDBResult.cpp:
3310         (WebKit::WebIDBResult::decode):
3311         * Shared/FrameInfoData.cpp:
3312         (WebKit::FrameInfoData::decode):
3313         * Shared/Gamepad/GamepadData.cpp:
3314         (WebKit::GamepadData::decode):
3315         * Shared/Gamepad/GamepadData.h:
3316         * Shared/PlatformPopupMenuData.cpp:
3317         (WebKit::PlatformPopupMenuData::decode):
3318         * Shared/PlatformPopupMenuData.h:
3319         * Shared/Plugins/NPIdentifierData.cpp:
3320         (WebKit::NPIdentifierData::decode):
3321         * Shared/Plugins/NPIdentifierData.h:
3322         * Shared/Plugins/NPVariantData.cpp:
3323         (WebKit::NPVariantData::decode):
3324         * Shared/Plugins/NPVariantData.h:
3325         * Shared/RTCNetwork.cpp:
3326         (WebKit::RTCNetwork::IPAddress::decode):
3327         (WebKit::RTCNetwork::SocketAddress::decode):
3328         (WebKit::RTCNetwork::decode):
3329         * Shared/RTCNetwork.h:
3330         * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:
3331         * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:
3332         (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::decode):
3333         (WebKit::RemoteLayerTreeTransaction::decode):
3334         * Shared/SessionState.cpp:
3335         (WebKit::HTTPBody::Element::decode):
3336         (WebKit::FrameState::decode):
3337         (WebKit::PageState::decode):
3338         (WebKit::BackForwardListItemState::decode):
3339         (WebKit::BackForwardListState::decode):
3340         * Shared/SessionState.h:
3341         * Shared/WebCompiledContentRuleListData.cpp:
3342         (WebKit::WebCompiledContentRuleListData::decode):
3343         * Shared/WebCompiledContentRuleListData.h:
3344         * Shared/WebContextMenuItemData.cpp:
3345         (WebKit::WebContextMenuItemData::decode):
3346         * Shared/WebContextMenuItemData.h:
3347         * Shared/WebCoreArgumentCoders.cpp:
3348         (IPC::ArgumentCoder<DOMCacheEngine::CacheInfo>::decode):
3349         (IPC::ArgumentCoder<DOMCacheEngine::Record>::decode):
3350         (IPC::ArgumentCoder<FloatRect>::decode):
3351         (IPC::ArgumentCoder<FloatQuad>::decode):
3352         (IPC::ArgumentCoder<IntRect>::decode):
3353         (IPC::ArgumentCoder<RecentSearch>::decode):
3354         (IPC::ArgumentCoder<Region::Span>::decode):
3355         (IPC::ArgumentCoder<MimeClassInfo>::decode):
3356         (IPC::ArgumentCoder<PluginInfo>::decode):
3357         (IPC::ArgumentCoder<SelectionRect>::decode):
3358         (IPC::ArgumentCoder<CompositionUnderline>::decode):
3359         (IPC::ArgumentCoder<DictationAlternative>::decode):
3360         (IPC::ArgumentCoder<GrammarDetail>::decode):
3361         (IPC::ArgumentCoder<TextCheckingResult>::decode):
3362         (IPC::ArgumentCoder<BlobPart>::decode):
3363         (IPC::ArgumentCoder<ResourceLoadStatistics>::decode):
3364         (IPC::ArgumentCoder<MediaConstraints>::decode):
3365         (IPC::ArgumentCoder<CaptureDevice>::decode):
3366         (IPC::ArgumentCoder<ScrollOffsetRange<float>>::decode):
3367         (IPC::ArgumentCoder<MediaSelectionOption>::decode):
3368         * Shared/WebCoreArgumentCoders.h:
3369         * Shared/WebEvent.h:
3370         * Shared/WebPageCreationParameters.cpp:
3371         (WebKit::WebPageCreationParameters::decode):
3372         * Shared/WebPlatformTouchPoint.cpp:
3373         (WebKit::WebPlatformTouchPoint::decode):
3374         * Shared/WebPopupItem.cpp:
3375         (WebKit::WebPopupItem::decode):
3376         * Shared/WebPopupItem.h:
3377         * Shared/WebUserContentControllerDataTypes.cpp:
3378         (WebKit::WebUserScriptData::decode):
3379         (WebKit::WebUserStyleSheetData::decode):
3380         (WebKit::WebScriptMessageHandlerData::decode):
3381         * Shared/WebUserContentControllerDataTypes.h:
3382         * Shared/WebsiteData/WebsiteData.cpp:
3383         (WebKit::WebsiteData::Entry::decode):
3384         * Shared/WebsiteData/WebsiteData.h:
3385         * Shared/WebsiteDataStoreParameters.cpp:
3386         (WebKit::WebsiteDataStoreParameters::decode):
3387         * Shared/ios/WebPlatformTouchPointIOS.cpp:
3388         (WebKit::WebPlatformTouchPoint::decode):
3389         * Shared/mac/WebCoreArgumentCodersMac.mm:
3390         (IPC::ArgumentCoder<KeypressCommand>::decode):
3391         * UIProcess/LegacySessionStateCodingNone.cpp:
3392         (WebKit::decodeLegacySessionState):
3393         * WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.h:
3394         * WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:
3395         (WebKit::PlatformCAAnimationRemote::KeyframeValue::decode):
3396         (WebKit::PlatformCAAnimationRemote::Properties::decode):
3397
3398 2017-09-19  Ryosuke Niwa  <rniwa@webkit.org>
3399
3400         On iOS, getData can't get text set by setData during copy event
3401         https://bugs.webkit.org/show_bug.cgi?id=176980
3402         <rdar://problem/34453915>
3403
3404         Reviewed by Darin Adler.
3405
3406         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3407         (WebKit::WebPlatformStrategies::copy): Deleted.
3408         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3409
3410 2017-09-19  Alex Christensen  <achristensen@webkit.org>
3411
3412         Expose WKPageRef as a private property on WKWebView on Mac
3413         https://bugs.webkit.org/show_bug.cgi?id=177022
3414         <rdar://problem/34342762>
3415
3416         Reviewed by Andy Estes.
3417
3418         * UIProcess/API/Cocoa/WKWebView.mm:
3419         (-[WKWebView _pageRefForTransitionToWKWebView]):
3420         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3421
3422 2017-09-19  Alex Christensen  <achristensen@webkit.org>
3423
3424         Make _WKProcessPoolConfiguration.allowsCellularAccess actually work on iOS
3425         https://bugs.webkit.org/show_bug.cgi?id=177124
3426
3427         Reviewed by Andy Estes.
3428
3429         The boolean added in r213747 was getting lost in two places:
3430         1. The API::ProcessPoolConfiguration gets copied before it's used, so we need to set the bool on the copy.
3431         2. The bool was not getting copied from that ProcessPoolConfiguration to the NetworkProcessCreationParameters
3432         to be sent to the NetworkProcess to be given to the NSURLSessionConfiguration in NetworkSessionCocoa.mm.
3433
3434         These two problems were fixed and verified manually with a customized iOS app on my phone.
3435         Unfortunately, this cannot be tested well with our current test infrastructure.
3436
3437         * UIProcess/API/APIProcessPoolConfiguration.cpp:
3438         (API::ProcessPoolConfiguration::copy):
3439         * UIProcess/WebProcessPool.cpp:
3440         (WebKit::WebProcessPool::ensureNetworkProcess):
3441
3442 2017-09-18  Michael Catanzaro  <mcatanzaro@igalia.com>
3443
3444         [CMake] Rename WebKit target to WebKitLegacy and rename WebKit2 target to WebKit
3445         https://bugs.webkit.org/show_bug.cgi?id=174558
3446
3447         Reviewed by Alex Christensen.
3448
3449         * CMakeLists.txt:
3450         * PlatformGTK.cmake:
3451         * PlatformMac.cmake:
3452         * PlatformWPE.cmake:
3453         * PlatformWin.cmake:
3454         * Shared/gtk/WebKitWaylandProtocol.xml: Renamed from Source/WebKit/Shared/gtk/WebKit2WaylandProtocol.xml.
3455         * UIProcess/gtk/WaylandCompositor.cpp:
3456         * WebProcess/gtk/WaylandCompositorDisplay.cpp:
3457
3458 2017-09-18  Andy Estes  <aestes@apple.com>
3459
3460         [Cocoa] Upstream sandbox-related WebKitSystemInterface functions
3461         https://bugs.webkit.org/show_bug.cgi?id=177047
3462
3463         Reviewed by Daniel Bates.
3464
3465         * NetworkProcess/NetworkResourceLoadParameters.cpp:
3466         (WebKit::NetworkResourceLoadParameters::encode const):
3467         * Platform/spi/mac/QuarantineSPI.h: Added.
3468         * Shared/SandboxExtension.h:
3469         (): Deleted.
3470         * Shared/mac/ChildProcessMac.mm:
3471         (WebKit::enableSandboxStyleFileQuarantine):
3472         (WebKit::ChildProcess::initializeSandbox):
3473         * Shared/mac/SandboxExtensionMac.mm:
3474         (WebKit::SandboxExtensionImpl::create):
3475         (WebKit::SandboxExtensionImpl::SandboxExtensionImpl):
3476         (WebKit::SandboxExtensionImpl::~SandboxExtensionImpl):
3477         (WebKit::SandboxExtensionImpl::consume):
3478         (WebKit::SandboxExtensionImpl::invalidate):
3479         (WebKit::SandboxExtensionImpl::getSerializedFormat):
3480         (WebKit::SandboxExtension::Handle::Handle):
3481         (WebKit::SandboxExtension::Handle::~Handle):
3482         (WebKit::SandboxExtension::Handle::encode const):
3483         (WebKit::SandboxExtension::Handle::decode):
3484         (WebKit::SandboxExtension::createHandleWithoutResolvingPath):
3485         (WebKit::SandboxExtension::createHandleForReadWriteDirectory):
3486         (WebKit::SandboxExtension::createHandleForTemporaryFile):
3487         (WebKit::SandboxExtension::createHandleForGenericExtension):
3488         (WebKit::SandboxExtension::SandboxExtension):
3489         (WebKit::SandboxExtension::~SandboxExtension):
3490         (WebKit::SandboxExtension::revoke):
3491         (WebKit::SandboxExtension::consume):
3492         (WebKit::SandboxExtension::consumePermanently):
3493         (WebKit::wkSandboxExtensionType): Deleted.
3494         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
3495         (WebKit::WebPageProxy::createSandboxExtensionsIfNeeded):
3496         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3497         (WebKit::WebProcessPool::platformInitializeWebProcess):
3498         * UIProcess/Downloads/DownloadProxy.cpp:
3499         (WebKit::DownloadProxy::decideDestinationWithSuggestedFilenameAsync):
3500         * UIProcess/Network/NetworkProcessProxy.cpp:
3501         (WebKit::NetworkProcessProxy::grantSandboxExtensionsToStorageProcessForBlobs):
3502         * UIProcess/Storage/StorageProcessProxy.cpp:
3503         (WebKit::StorageProcessProxy::getSandboxExtensionsForBlobFiles):
3504         * UIProcess/WebPageProxy.cpp:
3505         (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
3506         (WebKit::WebPageProxy::loadFile):
3507         (WebKit::WebPageProxy::didChooseFilesForOpenPanel):
3508         * UIProcess/WebProcessPool.cpp:
3509         (WebKit::WebProcessPool::createNewWebProcess):
3510         (WebKit::WebProcessPool::processDidFinishLaunching):
3511         (WebKit::WebProcessPool::resumeDownload):
3512         (WebKit::WebProcessPool::startMemorySampler):
3513         * WebKit.xcodeproj/project.pbxproj:
3514         * WebProcess/FileAPI/BlobRegistryProxy.cpp:
3515         (WebKit::BlobRegistryProxy::registerFileBlobURL):
3516
3517 2017-09-18  Andy Estes  <aestes@apple.com>
3518
3519         [Cocoa] Upstream WKSetCrashReportApplicationSpecificInformation() from WebKitSystemInterface
3520         https://bugs.webkit.org/show_bug.cgi?id=177048
3521
3522         Reviewed by Alex Christensen.
3523
3524         * Platform/IPC/mac/ConnectionMac.mm:
3525         (IPC::Connection::sendMessage):
3526         (IPC::readFromMachPort):
3527         * Platform/cocoa/CrashReporter.h: Copied from Source/WebKit/Shared/Cocoa/ChildProcessCocoa.mm.
3528         * Platform/cocoa/CrashReporter.mm: Copied from Source/WebKit/Shared/Cocoa/ChildProcessCocoa.mm.
3529         (WebKit::setCrashReportApplicationSpecificInformation):
3530         * Platform/spi/Cocoa/CrashReporterClientSPI.h: Copied from Source/WebKit/Shared/Cocoa/ChildProcessCocoa.mm.
3531         * Shared/Cocoa/ChildProcessCocoa.mm:
3532         (WebKit::ChildProcess::didReceiveInvalidMessage):
3533         * WebKit.xcodeproj/project.pbxproj:
3534         * WebProcess/cocoa/WebProcessCocoa.mm:
3535         (WebKit::_WKSetCrashReportApplicationSpecificInformation):
3536
3537 2017-09-18  Andy Estes  <aestes@apple.com>
3538
3539         [Mac] Upstream miscellaneous WebKitSystemInterface functions
3540         https://bugs.webkit.org/show_bug.cgi?id=177029
3541
3542         Reviewed by Alex Christensen.
3543
3544         * NetworkProcess/mac/NetworkProcessMac.mm:
3545         (WebKit::NetworkProcess::initializeProcessName):
3546         * PluginProcess/mac/PluginProcessMac.mm:
3547         (WebKit::PluginProcess::initializeProcessName):
3548         * StorageProcess/mac/StorageProcessMac.mm:
3549         (WebKit::StorageProcess::initializeProcessName):
3550         * UIProcess/Cocoa/WebViewImpl.mm:
3551         (WebKit::trackingAreaOptions):
3552         (WebKit::WebViewImpl::mightBeginScrollWhileInactive):
3553         * UIProcess/mac/WebPopupMenuProxyMac.mm:
3554         (WebKit::WebPopupMenuProxyMac::showPopupMenu):
3555         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3556         (WebKit::NetscapePlugin::popUpContextMenu):
3557         * WebProcess/Plugins/PDF/PDFPlugin.mm:
3558         (WebKit::PDFPlugin::handleContextMenuEvent):
3559         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3560         (InitWebCoreSystemInterface):
3561         * WebProcess/cocoa/WebProcessCocoa.mm:
3562         (WebKit::WebProcess::initializeProcessName):
3563         (WebKit::WebProcess::updateActivePages):
3564
3565 2017-09-17  Michael Catanzaro  <mcatanzaro@igalia.com>
3566
3567         [WPE][GTK] Merge ProcessLauncher[WPE,GTK]
3568         https://bugs.webkit.org/show_bug.cgi?id=177041
3569
3570         Unreviewed fixup, I broke the size of the argv buffer when experimenting with how to respond
3571         to review comments. Not sure why this didn't blow up everything during testing.
3572
3573         * UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:
3574         (WebKit::ProcessLauncher::launchProcess):
3575
3576 2017-09-17  Michael Catanzaro  <mcatanzaro@igalia.com>
3577
3578         [WPE][GTK] Merge ProcessLauncher[WPE,GTK]
3579         https://bugs.webkit.org/show_bug.cgi?id=177041
3580
3581         Reviewed by Carlos Garcia Campos.
3582
3583         * PlatformGTK.cmake:
3584         * PlatformWPE.cmake:
3585         * UIProcess/Launcher/glib/ProcessLauncherGLib.cpp: Renamed from Source/WebKit/UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp.
3586         (WebKit::childSetupFunction):
3587         (WebKit::ProcessLauncher::launchProcess):
3588         (WebKit::ProcessLauncher::terminateProcess):
3589         (WebKit::ProcessLauncher::platformInvalidate):
3590         * UIProcess/Launcher/wpe/ProcessLauncherWPE.cpp: Removed.
3591
3592 2017-09-16  Tim Horton  <timothy_horton@apple.com>
3593
3594         Fix the Tools build with CMake on macOS
3595         https://bugs.webkit.org/show_bug.cgi?id=177030
3596
3597         Reviewed by Geoffrey Garen.
3598
3599         * PlatformMac.cmake:
3600         Add some WebKitLegacy headers to forward (for use by the tools).
3601
3602 2017-09-15  JF Bastien  <jfbastien@apple.com>
3603
3604         WTF: use Forward.h when appropriate instead of Vector.h
3605         https://bugs.webkit.org/show_bug.cgi?id=176984
3606
3607         Reviewed by Saam Barati.
3608
3609         There's no need to include Vector.h when Forward.h will suffice. All we need is to move the template default parameters from Vector, and then the forward declaration can be used in so many new places: if a header only takes Vector by reference, rvalue reference, pointer, returns any of these, or has them as members then the header doesn't need to see the definition because the declaration will suffice.
3610
3611         * Scripts/webkit/LegacyMessages-expected.h:
3612         * Scripts/webkit/Messages-expected.h:
3613         * Shared/API/APIData.h:
3614         * UIProcess/API/APIContextMenuClient.h:
3615         * UIProcess/API/APIFormClient.h:
3616         * UIProcess/API/APIHTTPCookieStore.h:
3617         * UIProcess/API/APINotificationProvider.h:
3618         * UIProcess/API/glib/WebKitNotificationProvider.h:
3619         * UIProcess/Notifications/WebNotificationProvider.h:
3620         * UIProcess/TextCheckerCompletion.h:
3621         * UIProcess/WebCookieManagerProxy.h:
3622         * UIProcess/WebOpenPanelResultListenerProxy.h:
3623         * UIProcess/WebPasteboardProxy.h:
3624         * UIProcess/WebPopupMenuProxy.h:
3625         * UIProcess/WebTextCheckerClient.h:
3626         * WebProcess/Cookies/WebCookieManager.h:
3627         * WebProcess/Gamepad/WebGamepadProvider.h:
3628         * WebProcess/InjectedBundle/API/APIInjectedBundleEditorClient.h:
3629         * WebProcess/InjectedBundle/API/APIInjectedBundlePageContextMenuClient.h:
3630         * WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h:
3631         * WebProcess/InjectedBundle/APIInjectedBundleFormClient.h:
3632         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
3633         * WebProcess/Network/webrtc/WebRTCMonitor.h:
3634         * WebProcess/Network/webrtc/WebRTCResolver.h:
3635         * WebProcess/WebPage/DrawingArea.h:
3636         * WebProcess/WebPage/WebOpenPanelResultListener.h:
3637
3638 2017-09-15  Tim Horton  <timothy_horton@apple.com>
3639
3640         Fix the macOS CMake build
3641         https://bugs.webkit.org/show_bug.cgi?id=177015
3642
3643         Reviewed by Andy Estes.
3644
3645         * CMakeLists.txt:
3646         Add the new RemoteLayerTree directories to the header search path.
3647         Add CookieStorageUtilsCF.mm to Sources.
3648
3649         * PlatformMac.cmake:
3650         Add a few more files, and fix the generated forwarding headers include
3651         path to name "WebKit" instead of "WebKit2".
3652
3653 2017-09-15  Youenn Fablet  <youenn@apple.com>
3654
3655         Add an URL method to remove both query string and fragment identifier
3656         https://bugs.webkit.org/show_bug.cgi?id=176911
3657
3658         Reviewed by Alex Christensen.
3659
3660         * NetworkProcess/cache/CacheStorageEngineCache.cpp:
3661         (WebKit::CacheStorage::computeKeyURL):
3662
3663 2017-09-15  Andy Estes  <aestes@apple.com>
3664
3665         [Cocoa] Upstream MediaRemote and VideoToolbox WebKitSystemInterface functions
3666         https://bugs.webkit.org/show_bug.cgi?id=176953
3667
3668         Reviewed by Eric Carlson.
3669
3670         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3671         (InitWebCoreSystemInterface):
3672
3673 2017-09-15  Ryosuke Niwa  <rniwa@webkit.org>
3674
3675         iOS: WebKitTestRunner hits an assertion in editing/pasteboard/datatransfer-items-copy-plaintext.html
3676         https://bugs.webkit.org/show_bug.cgi?id=176968
3677
3678         Reviewed by Wenson Hsieh.
3679
3680         Don't allocate a SharedMemory of size zero (content was empty) as this would result in a crash inside
3681         a WebContent process in release builds and an assertion failure in debug builds.
3682
3683         * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
3684         (WebKit::WebPasteboardProxy::readBufferFromPasteboard):
3685
3686 2017-09-14  Youenn Fablet  <youenn@apple.com>
3687
3688         Add Cache API support of records persistency
3689         https://bugs.webkit.org/show_bug.cgi?id=176845
3690
3691         Reviewed by Alex Christensen.
3692
3693         Introducing asynchronous opening of Cache objects.
3694         When opening, Cache objects will read the list of records from the disk.
3695         They keep in memory the necessary information to make any match or remove request without reading further information from the disk.
3696         Cache objects thus keep during the opening time a list of callbacks to call when being opened.
3697         Persistent storage is implemented through NetworkCache::Storage.
3698
3699         A Cache object is added a unique name so that records from a Cache cannot be mixed with records from another Cache.
3700         This unique name is stored persistenly in addition to the Cache name.
3701         This unique name is used as the key type given to the storage.
3702
3703         Request, response and responsebody data are no longer kept by the Cache object.
3704         For regular sessions, this information is kept on the disk through NetworkCache::Storage.
3705         Insertion time is also stored persistently so as to keep the ordering of the records consistent.
3706         For private browsing sessions, this information is kept in a map owned by the Caches object.
3707         RecordData is renamed to RecordInformation as it now only contains the information used to handle the different Cache actions.
3708
3709         For every record retrieval action, a ReadRecordTaskCounter is used.
3710         Its purpose is to allow retrieving the record data on the disk in parallel,
3711         and then send back the information when everything is read.
3712         In case some records cannot be correctly read, they are removed automatically at that point.
3713         The current implementation loads all information in memory including response bodies.
3714         Further improvements might consider streaming the response bodies progressively.
3715
3716         For every stored record, an AsynchronousPutTaskCounter is used.
3717         Its purpose is also to wait for all put actions to be completed before executing the completion callback.
3718         In some cases, a record needs to be overriden.
3719         In that case, as per the specification, only the data related to the response is to be modified.
3720         This requires reading the record request data on disk before actually writing the whole record again.
3721         This is implemented in updateRecordToDisk.
3722
3723         The Cache object is delegating all record writing/reading tasks to its Caches object.
3724         The Caches object is responsible to handle persistent/private sessions.
3725
3726         * NetworkProcess/cache/CacheStorageEngine.cpp:
3727         (WebKit::CacheStorage::Engine::retrieveRecords): Making sure Cache object is opened.
3728         (WebKit::CacheStorage::Engine::readCache): Ditto.
3729         (WebKit::CacheStorage::Engine::unlock): Disposing the cache without going through initializing it.
3730         * NetworkProcess/cache/CacheStorageEngineCache.cpp:
3731         (WebKit::CacheStorage::computeKeyURL):
3732         (WebKit::CacheStorage::queryCache):
3733         (WebKit::CacheStorage::updateVaryInformation):
3734         (WebKit::CacheStorage::Cache::toRecordInformation):
3735         (WebKit::CacheStorage::Cache::Cache):
3736         (WebKit::CacheStorage::Cache::open):
3737         (WebKit::CacheStorage::Cache::finishOpening):
3738         (WebKit::CacheStorage::ReadRecordTaskCounter::create):
3739         (WebKit::CacheStorage::ReadRecordTaskCounter::~ReadRecordTaskCounter):
3740         (WebKit::CacheStorage::ReadRecordTaskCounter::appendRecord):
3741         (WebKit::CacheStorage::ReadRecordTaskCounter::ReadRecordTaskCounter):
3742         (WebKit::CacheStorage::Cache::retrieveRecord):
3743         (WebKit::CacheStorage::Cache::retrieveRecords):
3744         (WebKit::CacheStorage::Cache::addRecord):
3745         (WebKit::CacheStorage::Cache::recordsFromURL):
3746         (WebKit::CacheStorage::Cache::recordsFromURL const):
3747         (WebKit::CacheStorage::AsynchronousPutTaskCounter::create):
3748         (WebKit::CacheStorage::AsynchronousPutTaskCounter::~AsynchronousPutTaskCounter):
3749         (WebKit::CacheStorage::AsynchronousPutTaskCounter::onCompletion):
3750         (WebKit::CacheStorage::AsynchronousPutTaskCounter::setError):
3751         (WebKit::CacheStorage::Cache::put):
3752         (WebKit::CacheStorage::Cache::remove):
3753         (WebKit::CacheStorage::Cache::removeFromRecordList):
3754         (WebKit::CacheStorage::Cache::writeRecordToDisk):
3755         (WebKit::CacheStorage::Cache::updateRecordToDisk):
3756         (WebKit::CacheStorage::Cache::readRecordFromDisk):
3757         (WebKit::CacheStorage::Cache::removeRecordFromDisk):
3758         (WebKit::CacheStorage::Cache::encode):
3759         (WebKit::CacheStorage::decodeRecordHeader):
3760         (WebKit::CacheStorage::Cache::decode):
3761         (WebKit::CacheStorage::Cache::keys const):
3762         * NetworkProcess/cache/CacheStorageEngineCache.h:
3763         (WebKit::CacheStorage::Cache::isOpened const):
3764         (WebKit::CacheStorage::Cache::uniqueName const):
3765         * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
3766         (WebKit::CacheStorage::Caches::initialize):
3767         (WebKit::CacheStorage::Caches::open):
3768         (WebKit::CacheStorage::Caches::remove):
3769         (WebKit::CacheStorage::Caches::dispose):
3770         (WebKit::CacheStorage::encodeCacheNames):
3771         (WebKit::CacheStorage::decodeCachesNames):
3772         (WebKit::CacheStorage::Caches::readCachesFromDisk):
3773         (WebKit::CacheStorage::Caches::readRecordsList):
3774         (WebKit::CacheStorage::Caches::writeRecord):
3775         (WebKit::CacheStorage::Caches::readRecord):
3776         (WebKit::CacheStorage::Caches::removeRecord):
3777         (WebKit::CacheStorage::Caches::clearMemoryRepresentation):
3778         (WebKit::CacheStorage::Caches::salt const):
3779         * NetworkProcess/cache/CacheStorageEngineCaches.h:
3780         (WebKit::CacheStorage::Caches::shouldPersist const):
3781         * NetworkProcess/cache/NetworkCacheStorage.cpp:
3782         (WebKit::NetworkCache::Storage::store):
3783         * NetworkProcess/cache/NetworkCacheStorage.h:
3784         (WebKit::NetworkCache::Storage::writeWithoutWaiting):
3785
3786 2017-09-14  Alex Christensen  <achristensen@webkit.org>
3787
3788         Add WKUIDelegatePrivate equivalent of WKPageUIClient's drawHeader, drawFooter, headerHeight, and footerHeight
3789         https://bugs.webkit.org/show_bug.cgi?id=176889
3790         <rdar://problem/29270035>
3791
3792         Reviewed by Andy Estes.
3793
3794         * UIProcess/API/C/WKPage.cpp:
3795         (WKPageLoadAlternateHTMLString):
3796         (WKPageLoadAlternateHTMLStringWithUserData):
3797         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
3798         (-[WKBrowsingContextController loadAlternateHTMLString:baseURL:forUnreachableURL:]):
3799         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
3800         * UIProcess/API/Cocoa/WKWebView.mm:
3801         (-[WKWebView _loadAlternateHTMLString:baseURL:forUnreachableURL:]):
3802         * UIProcess/Cocoa/UIDelegate.h:
3803         * UIProcess/Cocoa/UIDelegate.mm:
3804         (WebKit::UIDelegate::setDelegate):
3805         (WebKit::UIDelegate::UIClient::headerHeight):
3806         (WebKit::UIDelegate::UIClient::footerHeight):
3807         (WebKit::UIDelegate::UIClient::drawHeader):
3808         (WebKit::UIDelegate::UIClient::drawFooter):
3809         * UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.mm:
3810         (-[WKReloadFrameErrorRecoveryAttempter attemptRecovery]):
3811         * UIProcess/Cocoa/WebViewImpl.mm:
3812         (WebKit::WebViewImpl::printOperationWithPrintInfo):
3813         * UIProcess/FrameLoadState.cpp:
3814         (WebKit::FrameLoadState::didStartProvisionalLoad):
3815         (WebKit::FrameLoadState::didReceiveServerRedirectForProvisionalLoad):
3816         (WebKit::FrameLoadState::didFailProvisionalLoad):
3817         (WebKit::FrameLoadState::didCommitLoad):
3818         (WebKit::FrameLoadState::didSameDocumentNotification):
3819         (WebKit::FrameLoadState::setUnreachableURL):
3820         (WebKit::FrameLoadState::FrameLoadState): Deleted.
3821         * UIProcess/FrameLoadState.h:
3822         (WebKit::FrameLoadState::url const):
3823         (WebKit::FrameLoadState::provisionalURL const):
3824         (WebKit::FrameLoadState::unreachableURL const):
3825         * UIProcess/WebFrameProxy.cpp:
3826         (WebKit::WebFrameProxy::loadURL):
3827         (WebKit::WebFrameProxy::didStartProvisionalLoad):
3828         (WebKit::WebFrameProxy::didReceiveServerRedirectForProvisionalLoad):
3829         (WebKit::WebFrameProxy::didSameDocumentNavigation):
3830         (WebKit::WebFrameProxy::setUnreachableURL):
3831         * UIProcess/WebFrameProxy.h:
3832         (WebKit::WebFrameProxy::url const):
3833         (WebKit::WebFrameProxy::provisionalURL const):
3834         (WebKit::WebFrameProxy::unreachableURL const):
3835         * UIProcess/WebPageProxy.cpp:
3836         (WebKit::WebPageProxy::loadAlternateHTMLString):
3837         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
3838         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
3839         (WebKit::WebPageProxy::didChangeProvisionalURLForFrame):
3840         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
3841         * UIProcess/WebPageProxy.h:
3842         * UIProcess/WebPageProxy.messages.in:
3843         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3844         (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
3845         (WebKit::WebFrameLoaderClient::dispatchDidChangeProvisionalURL):
3846         (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
3847         (WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
3848         (WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
3849         (WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
3850         (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
3851         * WebProcess/WebPage/WebPage.cpp:
3852         (WebKit::WebPage::loadURLInFrame):
3853         * WebProcess/WebPage/WebPage.h:
3854         * WebProcess/WebPage/WebPage.messages.in:
3855
3856 2017-09-14  Andy Estes  <aestes@apple.com>
3857
3858         [Mac] Upstream SpeechSynthesis-related WebKitSystemInterface functions
3859         https://bugs.webkit.org/show_bug.cgi?id=176931
3860
3861         Reviewed by Joseph Pecoraro.
3862
3863         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3864         (InitWebCoreSystemInterface):
3865
3866 2017-09-14  Ryan Haddad  <ryanhaddad@apple.com>
3867
3868         Unreviewed, rolling out r222033.
3869
3870         This change caused API test WebKit.PrintFrame to time out.
3871
3872         Reverted changeset:
3873
3874         "Add WKUIDelegatePrivate equivalent of WKPageUIClient's
3875         drawHeader, drawFooter, headerHeight, and footerHeight"
3876         https://bugs.webkit.org/show_bug.cgi?id=176889
3877         http://trac.webkit.org/changeset/222033
3878
3879 2017-09-14  Alex Christensen  <achristensen@webkit.org>
3880
3881         Add WKUIDelegatePrivate equivalent of WKPageUIClient's drawHeader, drawFooter, headerHeight, and footerHeight
3882         https://bugs.webkit.org/show_bug.cgi?id=176889
3883         <rdar://problem/29270035>
3884
3885         Reviewed by Andy Estes.
3886
3887         * UIProcess/API/C/WKPage.cpp:
3888         (WKPageLoadAlternateHTMLString):
3889         (WKPageLoadAlternateHTMLStringWithUserData):
3890         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
3891         (-[WKBrowsingContextController loadAlternateHTMLString:baseURL:forUnreachableURL:]):
3892         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
3893         * UIProcess/API/Cocoa/WKWebView.mm:
3894         (-[WKWebView _loadAlternateHTMLString:baseURL:forUnreachableURL:]):
3895         * UIProcess/Cocoa/UIDelegate.h:
3896         * UIProcess/Cocoa/UIDelegate.mm:
3897         (WebKit::UIDelegate::setDelegate):
3898         (WebKit::UIDelegate::UIClient::headerHeight):
3899         (WebKit::UIDelegate::UIClient::footerHeight):
3900         (WebKit::UIDelegate::UIClient::drawHeader):
3901         (WebKit::UIDelegate::UIClient::drawFooter):
3902         * UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.mm:
3903         (-[WKReloadFrameErrorRecoveryAttempter attemptRecovery]):
3904         * UIProcess/Cocoa/WebViewImpl.mm:
3905         (WebKit::WebViewImpl::printOperationWithPrintInfo):
3906         * UIProcess/FrameLoadState.cpp:
3907         (WebKit::FrameLoadState::didStartProvisionalLoad):
3908         (WebKit::FrameLoadState::didReceiveServerRedirectForProvisionalLoad):
3909         (WebKit::FrameLoadState::didFailProvisionalLoad):
3910         (WebKit::FrameLoadState::didCommitLoad):
3911         (WebKit::FrameLoadState::didSameDocumentNotification):
3912         (WebKit::FrameLoadState::setUnreachableURL):
3913         (WebKit::FrameLoadState::FrameLoadState): Deleted.
3914         * UIProcess/FrameLoadState.h:
3915         (WebKit::FrameLoadState::url const):
3916         (WebKit::FrameLoadState::provisionalURL const):
3917         (WebKit::FrameLoadState::unreachableURL const):
3918         * UIProcess/WebFrameProxy.cpp:
3919         (WebKit::WebFrameProxy::loadURL):
3920         (WebKit::WebFrameProxy::didStartProvisionalLoad):
3921         (WebKit::WebFrameProxy::didReceiveServerRedirectForProvisionalLoad):
3922         (WebKit::WebFrameProxy::didSameDocumentNavigation):
3923         (WebKit::WebFrameProxy::setUnreachableURL):
3924         * UIProcess/WebFrameProxy.h:
3925         (WebKit::WebFrameProxy::url const):
3926         (WebKit::WebFrameProxy::provisionalURL const):
3927         (WebKit::WebFrameProxy::unreachableURL const):
3928         * UIProcess/WebPageProxy.cpp:
3929         (WebKit::WebPageProxy::loadAlternateHTMLString):
3930         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
3931         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
3932         (WebKit::WebPageProxy::didChangeProvisionalURLForFrame):
3933         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
3934         * UIProcess/WebPageProxy.h:
3935         * UIProcess/WebPageProxy.messages.in:
3936         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3937         (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
3938         (WebKit::WebFrameLoaderClient::dispatchDidChangeProvisionalURL):
3939         (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
3940         (WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
3941         (WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
3942         (WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
3943         (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
3944         * WebProcess/WebPage/WebPage.cpp:
3945         (WebKit::WebPage::loadURLInFrame):
3946         * WebProcess/WebPage/WebPage.h:
3947         * WebProcess/WebPage/WebPage.messages.in:
3948
3949 2017-09-14  Carlos Garcia Campos  <cgarcia@igalia.com>
3950
3951         [GTK][Wayland] Flickering when resizing the window
3952         https://bugs.webkit.org/show_bug.cgi?id=176774
3953
3954         Reviewed by Michael Catanzaro.
3955
3956         This regressed when we switched to always start the wayland compositor. In
3957         AcceleratedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState() we check if the nested compositor is
3958         running, which is always true now (if EGL and the required extensions are available). We should check if we are
3959         in AC mode instead.
3960
3961         * UIProcess/AcceleratedDrawingAreaProxy.cpp:
3962         (WebKit::AcceleratedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState):
3963
3964 2017-09-14  Yusuke Suzuki  <utatane.tea@gmail.com>
3965
3966         [JSC] Add PrivateSymbolMode::{Include,Exclude} for PropertyNameArray
3967         https://bugs.webkit.org/show_bug.cgi?id=176867
3968
3969         Reviewed by Sam Weinig.
3970
3971         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
3972         (WebKit::NPJSObject::enumerate):
3973
3974 2017-09-14  Maureen Daum  <mdaum@apple.com>
3975
3976         Introduce the option to mark an HTML element as having AutoFill available.
3977         https://bugs.webkit.org/show_bug.cgi?id=176710
3978
3979         Reviewed by Alex Christensen.
3980
3981         Introduce the option to mark an HTML element as having AutoFill available. Accessibility
3982         can use this property when deciding whether to announce that the focused field offers
3983         AutoFill.
3984
3985         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
3986         (WKBundleNodeHandleGetHTMLInputElementAutoFillAvailable):
3987         (WKBundleNodeHandleSetHTMLInputElementAutoFillAvailable):
3988         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
3989         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
3990         (WebKit::InjectedBundleNodeHandle::isAutoFillAvailable const):
3991         (WebKit::InjectedBundleNodeHandle::setAutoFillAvailable):
3992         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
3993
3994 2017-09-13  John Wilander  <wilander@apple.com>
3995
3996         Introduce Storage Access API (document parts) as an experimental feature
3997         https://bugs.webkit.org/show_bug.cgi?id=175759
3998         <rdar://problem/34414107>
3999
4000         Reviewed by Alex Christensen.
4001
4002         Storage Access API is an experimental feature which allows cross-origin,
4003         sandboxed iframes to request access to their first-party storage (as
4004         opposed to partitioned storage). This might be restricted to cookies or
4005         might cover all stateful mechanisms.
4006
4007         It introduces the following three developer-facing things:
4008         - A new readonly attribute, document.hasStorageAccess.
4009         - A new function, document.requestStorageAccess().
4010         - A new iframe sandbox token, allow-storage-access-by-user-activation.
4011
4012         * Shared/WebCoreArgumentCoders.cpp:
4013         (IPC::ArgumentCoder<ResourceLoadStatistics>::encode):
4014         (IPC::ArgumentCoder<ResourceLoadStatistics>::decode):
4015             Storage handling of the new type of data.
4016         * Shared/WebPreferencesDefinitions.h:
4017         * UIProcess/API/C/WKPreferences.cpp:
4018         (WKPreferencesSetStorageAccessAPIEnabled):
4019         (WKPreferencesGetStorageAccessAPIEnabled):
4020         * UIProcess/API/C/WKPreferencesRefPrivate.h:
4021         * UIProcess/WebResourceLoadStatisticsStore.cpp:
4022             Bumped the model version from 9 to 10.
4023         * WebProcess/WebPage/WebPage.cpp:
4024         (WebKit::WebPage::updatePreferences):
4025
4026 2017-09-13  Andy Estes  <aestes@apple.com>
4027
4028         [Apple Pay] Consider phoneticName when encoding ContactFields
4029         https://bugs.webkit.org/show_bug.cgi?id=176885
4030         <rdar://problem/34176419>
4031
4032         Reviewed by Tim Horton.
4033
4034         * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
4035         (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::ContactFields>::encode):
4036         (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::ContactFields>::decode):
4037
4038 2017-09-13  Matt Lewis  <jlewis3@apple.com>
4039
4040         Unreviewed, rolling out r221976.
4041
4042         The test introduced was flaky from point of addition.
4043
4044         Reverted changeset:
4045
4046         "Introduce Storage Access API (document parts) as an
4047         experimental feature"
4048         https://bugs.webkit.org/show_bug.cgi?id=175759
4049         http://trac.webkit.org/changeset/221976
4050
4051 2017-09-13  Youenn Fablet  <youenn@apple.com>
4052
4053         Internals clearCacheStorageMemoryRepresentation should return a Promise
4054         https://bugs.webkit.org/show_bug.cgi?id=176818
4055
4056         Reviewed by Alex Christensen.
4057
4058         Adding a completion handler to clearMemoryRepresentation.
4059
4060         * NetworkProcess/cache/CacheStorageEngine.cpp:
4061         (WebKit::CacheStorage::Engine::clearMemoryRepresentation):
4062         * NetworkProcess/cache/CacheStorageEngine.h:
4063         * NetworkProcess/cache/CacheStorageEngineConnection.cpp:
4064         (WebKit::CacheStorageEngineConnection::clearMemoryRepresentation):
4065         * NetworkProcess/cache/CacheStorageEngineConnection.h:
4066         * NetworkProcess/cache/CacheStorageEngineConnection.messages.in:
4067         * WebProcess/Cache/WebCacheStorageConnection.cpp:
4068         (WebKit::WebCacheStorageConnection::clearMemoryRepresentation):
4069         (WebKit::WebCacheStorageConnection::clearMemoryRepresentationCompleted):
4070         * WebProcess/Cache/WebCacheStorageConnection.h:
4071         * WebProcess/Cache/WebCacheStorageConnection.messages.in:
4072
4073 2017-09-13  Andy Estes  <aestes@apple.com>
4074
4075         [CF] Upstream CFNetwork-related WebKitSystemInterface functions
4076         https://bugs.webkit.org/show_bug.cgi?id=176729
4077
4078         Reviewed by Alex Christensen.