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