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