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