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