Move NetworkStorageSession ownership to NetworkProcess
[WebKit-https.git] / Source / WebKit / ChangeLog
1 2019-01-22  Alex Christensen  <achristensen@webkit.org>
2
3         Move NetworkStorageSession ownership to NetworkProcess
4         https://bugs.webkit.org/show_bug.cgi?id=193580
5
6         Reviewed by Geoff Garen.
7
8         * NetworkProcess/Cookies/WebCookieManager.cpp:
9         (WebKit::WebCookieManager::WebCookieManager):
10         (WebKit::WebCookieManager::getHostnamesWithCookies):
11         (WebKit::WebCookieManager::deleteCookiesForHostname):
12         (WebKit::WebCookieManager::deleteAllCookies):
13         (WebKit::WebCookieManager::deleteCookie):
14         (WebKit::WebCookieManager::deleteAllCookiesModifiedSince):
15         (WebKit::WebCookieManager::getAllCookies):
16         (WebKit::WebCookieManager::getCookies):
17         (WebKit::WebCookieManager::setCookie):
18         (WebKit::WebCookieManager::setCookies):
19         (WebKit::WebCookieManager::startObservingCookieChanges):
20         (WebKit::WebCookieManager::stopObservingCookieChanges):
21         * NetworkProcess/Cookies/WebCookieManager.h:
22         * NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
23         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
24         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
25         (WebKit::storageSession):
26         (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
27         (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
28         (WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
29         (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
30         (WebKit::NetworkConnectionToWebProcess::getRawCookies):
31         (WebKit::NetworkConnectionToWebProcess::deleteCookie):
32         (WebKit::NetworkConnectionToWebProcess::removeStorageAccessForFrame):
33         (WebKit::NetworkConnectionToWebProcess::removeStorageAccessForAllFramesOnPage):
34         * NetworkProcess/NetworkProcess.cpp:
35         (WebKit::NetworkProcess::initializeNetworkProcess):
36         (WebKit::NetworkProcess::clearCachedCredentials):
37         (WebKit::NetworkProcess::switchToNewTestingSession):
38         (WebKit::NetworkProcess::ensureSession):
39         (WebKit::NetworkProcess::storageSession const):
40         (WebKit::NetworkProcess::defaultStorageSession const):
41         (WebKit::NetworkProcess::forEachNetworkStorageSession):
42         (WebKit::NetworkProcess::destroySession):
43         (WebKit::NetworkProcess::updatePrevalentDomainsToBlockCookiesFor):
44         (WebKit::NetworkProcess::setAgeCapForClientSideCookies):
45         (WebKit::NetworkProcess::hasStorageAccessForFrame):
46         (WebKit::NetworkProcess::getAllStorageAccessEntries):
47         (WebKit::NetworkProcess::grantStorageAccess):
48         (WebKit::NetworkProcess::removeAllStorageAccess):
49         (WebKit::NetworkProcess::removePrevalentDomains):
50         (WebKit::NetworkProcess::setCacheMaxAgeCapForPrevalentResources):
51         (WebKit::NetworkProcess::resetCacheMaxAgeCapForPrevalentResources):
52         (WebKit::NetworkProcess::fetchWebsiteData):
53         (WebKit::NetworkProcess::deleteWebsiteData):
54         (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
55         * NetworkProcess/NetworkProcess.h:
56         * NetworkProcess/NetworkResourceLoader.cpp:
57         (WebKit::NetworkResourceLoader::validateCacheEntryForMaxAgeCapValidation):
58         (WebKit::NetworkResourceLoader::logCookieInformation const):
59         * NetworkProcess/NetworkSession.cpp:
60         (WebKit::NetworkSession::networkStorageSession const):
61         * NetworkProcess/NetworkStorageSessionProvider.h:
62         * NetworkProcess/cache/NetworkCache.cpp:
63         (WebKit::NetworkCache::makeUseDecision):
64         (WebKit::NetworkCache::Cache::retrieve):
65         (WebKit::NetworkCache::Cache::makeEntry):
66         (WebKit::NetworkCache::Cache::makeRedirectEntry):
67         (WebKit::NetworkCache::Cache::update):
68         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
69         (WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):
70         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
71         (WebKit::NetworkProcess::platformSyncAllCookies):
72         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
73         (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
74         (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
75         (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
76         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
77         * NetworkProcess/mac/RemoteNetworkingContext.mm:
78         (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):
79         * SourcesCocoa.txt:
80         * UIProcess/API/APIHTTPCookieStore.cpp:
81         (API::HTTPCookieStore::~HTTPCookieStore):
82         (API::HTTPCookieStore::cookies):
83         (API::HTTPCookieStore::setCookie):
84         (API::HTTPCookieStore::deleteCookie):
85         (API::HTTPCookieStore::registerObserver):
86         (API::HTTPCookieStore::unregisterObserver):
87         (API::HTTPCookieStore::registerForNewProcessPoolNotifications):
88         (API::HTTPCookieStore::flushDefaultUIProcessCookieStore):
89         (API::HTTPCookieStore::getAllDefaultUIProcessCookieStoreCookies):
90         (API::HTTPCookieStore::setCookieInDefaultUIProcessCookieStore):
91         (API::HTTPCookieStore::deleteCookieFromDefaultUIProcessCookieStore):
92         (API::HTTPCookieStore::startObservingChangesToDefaultUIProcessCookieStore):
93         (API::HTTPCookieStore::stopObservingChangesToDefaultUIProcessCookieStore):
94         * UIProcess/API/APIHTTPCookieStore.h:
95         * UIProcess/API/Cocoa/APIHTTPCookieStoreCocoa.mm: Added.
96         (API::HTTPCookieStore::flushDefaultUIProcessCookieStore):
97         (API::HTTPCookieStore::getAllDefaultUIProcessCookieStoreCookies):
98         (API::HTTPCookieStore::setCookieInDefaultUIProcessCookieStore):
99         (API::HTTPCookieStore::deleteCookieFromDefaultUIProcessCookieStore):
100         (API::HTTPCookieStore::startObservingChangesToDefaultUIProcessCookieStore):
101         (API::HTTPCookieStore::stopObservingChangesToDefaultUIProcessCookieStore):
102         * UIProcess/WebProcessPool.cpp:
103         (WebKit::WebProcessPool::clearCachedCredentials):
104         * WebKit.xcodeproj/project.pbxproj:
105         * WebProcess/Plugins/PluginView.cpp:
106         (WebKit::PluginView::getAuthenticationInfo):
107         * WebProcess/WebProcess.cpp:
108         (WebKit::WebProcess::deleteWebsiteData):
109         (WebKit::WebProcess::clearCachedCredentials): Deleted.
110         * WebProcess/WebProcess.h:
111         * WebProcess/WebProcess.messages.in:
112
113 2019-01-22  Per Arne Vollan  <pvollan@apple.com>
114
115         [macOS] Adjust logging policy in WebKit's sandbox
116         https://bugs.webkit.org/show_bug.cgi?id=193454
117
118         Reviewed by Brent Fulgham.
119
120         Add a rule to initially deny all calls, since the default is to allow every call.
121         Later rules allow syscalls that we determined are needed for proper WebKit function.
122         This reduces the API surface available to attackers.
123
124         * WebProcess/com.apple.WebProcess.sb.in:
125
126 2019-01-22  Daniel Bates  <dabates@apple.com>
127
128         [iOS] WebKit should handle shift state changes when using the software keyboard
129         https://bugs.webkit.org/show_bug.cgi?id=191475
130         <rdar://problem/45949246>
131
132         Reviewed by Brent Fulgham.
133
134         Implement UIKit SPI to be notified of shift state changes to the software keyboard
135         and dispatch a synthetic keydown or keyup event for either the Shift key or Caps Lock
136         key.
137
138         A side benefit of this change is that we now show and hide the caps lock indicator
139         in a focused password field when caps lock is enabled or disabled using the software
140         keyboard, respectively.
141
142         * Platform/spi/ios/UIKitSPI.h: Expose more SPI.
143         * SourcesCocoa.txt:
144         * UIProcess/ios/WKContentViewInteraction.mm:
145         (-[WKContentView modifierFlagsDidChangeFrom:to:]): Create a synthetic flags changed
146         web event based on the state change and dispatch it.
147         (-[WKContentView _didHandleKeyEvent:eventWasHandled:]): Early return if the event
148         was a synethic flags change event so that we do not notify UIKit about this event
149         as it does not know anything about such synthetic events.
150         * UIProcess/ios/WKSyntheticFlagsChangedWebEvent.h: Added.
151         * UIProcess/ios/WKSyntheticFlagsChangedWebEvent.mm: Added.
152         (-[WKSyntheticFlagsChangedWebEvent initWithKeyCode:modifiers:keyDown:]):
153         (-[WKSyntheticFlagsChangedWebEvent initWithCapsLockState:]):
154         (-[WKSyntheticFlagsChangedWebEvent initWithShiftState:]):
155         * WebKit.xcodeproj/project.pbxproj:
156
157 2019-01-22  Daniel Bates  <dabates@apple.com>
158
159         [iOS] Interpret text key commands on keydown and app key commands on keypress
160         https://bugs.webkit.org/show_bug.cgi?id=192897
161         <rdar://problem/46857378>
162
163         Reviewed by Brent Fulgham.
164
165         Adopt SPI to interpret text key commands and app key commands independently on keydown (isCharEvent
166         is false) and keypress (isCharEvent is true), respectively.
167
168         * Platform/spi/ios/UIKitSPI.h: Add more SPI.
169         * UIProcess/ios/WKContentViewInteraction.mm:
170         (-[WKContentView _interpretKeyEvent:isCharEvent:]):
171
172 2019-01-22  David Kilzer  <ddkilzer@apple.com>
173
174         C strings in ClientCertificateAuthenticationXPCConstants.h are duplicated
175         <https://webkit.org/b/193607>
176         <rdar://problem/47334613>
177
178         Reviewed by Alex Christensen.
179
180         * Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm:
181         (WebKit::AuthenticationManager::initializeConnection):
182         * UIProcess/Authentication/cocoa/AuthenticationChallengeProxyCocoa.mm:
183         (WebKit::AuthenticationChallengeProxy::sendClientCertificateCredentialOverXpc):
184         - Update name of constants.
185
186         * Shared/Authentication/cocoa/ClientCertificateAuthenticationXPCConstants.cpp: Copied from Source/WebKit/Shared/Authentication/cocoa/ClientCertificateAuthenticationXPCConstants.h.
187         * Shared/Authentication/cocoa/ClientCertificateAuthenticationXPCConstants.h:
188         - Put constant values in a namespace, and move values to
189           ClientCertificateAuthenticationXPCConstants.cpp.
190
191         * SourcesCocoa.txt:
192         * UnifiedSources-input.xcfilelist:
193         * WebKit.xcodeproj/project.pbxproj:
194         - Add ClientCertificateAuthenticationXPCConstants.cpp.
195
196 2019-01-22  David Kilzer  <ddkilzer@apple.com>
197
198         Switch remaining QuickLook soft-linking in WebCore, WebKit over to QuickLookSoftLink.{cpp,h}
199         <https://webkit.org/b/193654>
200         <rdar://problem/47430290>
201
202         Reviewed by Alex Christensen.
203
204         - Moves QuickLookSoftLink.{h,mm} to PAL.
205         - Adds soft-link to 3 classes to consolidate QuickLook.framework
206           soft-linking.
207         - Updates existing source to work with above changes.
208
209         * UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:
210         (-[_WKPreviewControllerDataSource previewController:previewItemAtIndex:]):
211         (WebKit::SystemPreviewController::start):
212         * UIProcess/ios/WKSystemPreviewView.mm:
213         (-[WKSystemPreviewView web_setContentProviderData:suggestedFilename:]):
214         - Switch to using QuickLookSoftLink.{h,mm} in PAL.
215
216 2019-01-22  Oriol Brufau  <obrufau@igalia.com>
217
218         [css-logical] Implement flow-relative margin, padding and border shorthands
219         https://bugs.webkit.org/show_bug.cgi?id=188697
220
221         Reviewed by Simon Fraser and Antti Koivisto.
222
223         Add a CSSLogicalEnabled runtime flag.
224
225         * Shared/WebPreferences.yaml:
226
227 2019-01-22  Frederic Wang  <fwang@igalia.com>
228
229         Enable CSSOMViewScrollingAPI
230         https://bugs.webkit.org/show_bug.cgi?id=189472
231
232         Reviewed by Simon Fraser.
233
234         This patch enables the CSSOMViewScrollingAPI option by default. This feature has already been
235         enabled in tests since r235855. Basically, this change fixes an old compatibility issue
236         regarding which scrolling element correspond to the viewport in standard mode (WebKit uses
237         document.body while Gecko/Edge/Chromium use document.documentElement as described in the
238         CSSOM View specification). WebKit developers writing tests can use document.scrollingElement
239         for that purpose, so that they work independently of whether the option is enabled.
240
241         [1] https://lists.webkit.org/pipermail/webkit-dev/2018-January/029857.html
242
243         * Shared/WebPreferences.yaml: Enable by default and remove "experimental" category in
244         accordance with the new policy. Instead, keep an internal flag only for developers.
245
246 2019-01-21  Antti Koivisto  <antti@apple.com>
247
248         [iOS] Handle hit testing for subframes
249         https://bugs.webkit.org/show_bug.cgi?id=192303
250
251         Reviewed by Frédéric Wang.
252
253         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
254         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
255
256         Only set delegatesScrolling for the main frame.
257
258 2019-01-21  Brent Fulgham  <bfulgham@apple.com>
259
260         Unreviewed test fix after r240243
261         Nhttps://bugs.webkit.org/show_bug.cgi?id=193660
262         <rdar://problem/47433602>
263
264         The new ResourceLoadStatistics section of 'removeData' was incrementing the
265         pending callback count before deciding whether to send a message to delete
266         data. This left the count out-of-balance leading to the operation never
267         completing.
268
269         This patch also prevents sending a second message to the NetworkProcess
270         requesting data be deleted if the message was already sent in an earlier
271         section of the method (e.g., as typically happens when all website data
272         is being deleted).
273
274         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
275         (WebKit::WebsiteDataStore::removeData):
276
277 2019-01-21  Brent Fulgham  <bfulgham@apple.com>
278
279         Implement message handlers for NetworkProcess-based ResourceLoadStatistics
280         https://bugs.webkit.org/show_bug.cgi?id=193556
281         <rdar://problem/47368501>
282
283         Reviewed by Alex Christensen.
284
285         This patch adds a number of sibling methods for tracking ResourceLoadStatistics when the
286         observations are being handled in the NetworkProcess, rather than the UIProcess. The
287         original versions of these methods will be removed as part of Bug 193303.
288
289         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
290         (WebKit::ResourceLoadStatisticsMemoryStore::removeDataRecords):
291         (WebKit::ResourceLoadStatisticsMemoryStore::processStatisticsAndDataRecords):
292         (WebKit::ResourceLoadStatisticsMemoryStore::grandfatherExistingWebsiteData):
293         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h:
294         (WebKit::ResourceLoadStatisticsMemoryStore::store const):
295         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
296         (WebKit::WebResourceLoadStatisticsStore::setNotifyPagesWhenDataRecordsWereScanned):
297         (WebKit::WebResourceLoadStatisticsStore::setNotifyPagesWhenTelemetryWasCaptured):
298         (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
299         (WebKit::WebResourceLoadStatisticsStore::setPrevalentResourceForDebugMode):
300         (WebKit::WebResourceLoadStatisticsStore::scheduleStatisticsAndDataRecordsProcessing):
301         (WebKit::WebResourceLoadStatisticsStore::hasStorageAccess):
302         (WebKit::WebResourceLoadStatisticsStore::callHasStorageAccessForFrameHandler):
303         (WebKit::WebResourceLoadStatisticsStore::requestStorageAccess):
304         (WebKit::WebResourceLoadStatisticsStore::logUserInteraction):
305         (WebKit::WebResourceLoadStatisticsStore::clearUserInteraction):
306         (WebKit::WebResourceLoadStatisticsStore::hasHadUserInteraction):
307         (WebKit::WebResourceLoadStatisticsStore::setLastSeen):
308         (WebKit::WebResourceLoadStatisticsStore::setPrevalentResource):
309         (WebKit::WebResourceLoadStatisticsStore::setVeryPrevalentResource):
310         (WebKit::WebResourceLoadStatisticsStore::isPrevalentResource):
311         (WebKit::WebResourceLoadStatisticsStore::isVeryPrevalentResource):
312         (WebKit::WebResourceLoadStatisticsStore::isRegisteredAsSubresourceUnder):
313         (WebKit::WebResourceLoadStatisticsStore::isRegisteredAsSubFrameUnder):
314         (WebKit::WebResourceLoadStatisticsStore::isRegisteredAsRedirectingTo):
315         (WebKit::WebResourceLoadStatisticsStore::clearPrevalentResource):
316         (WebKit::WebResourceLoadStatisticsStore::setGrandfathered):
317         (WebKit::WebResourceLoadStatisticsStore::isGrandfathered):
318         (WebKit::WebResourceLoadStatisticsStore::setSubframeUnderTopFrameOrigin):
319         (WebKit::WebResourceLoadStatisticsStore::setSubresourceUnderTopFrameOrigin):
320         (WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectTo):
321         (WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectFrom):
322         (WebKit::WebResourceLoadStatisticsStore::setTopFrameUniqueRedirectTo):
323         (WebKit::WebResourceLoadStatisticsStore::setTopFrameUniqueRedirectFrom):
324         (WebKit::WebResourceLoadStatisticsStore::setTimeToLiveUserInteraction):
325         (WebKit::WebResourceLoadStatisticsStore::logTestingEvent):
326         (WebKit::WebResourceLoadStatisticsStore::notifyResourceLoadStatisticsProcessed):
327         (WebKit::WebResourceLoadStatisticsStore::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores):
328         (WebKit::WebResourceLoadStatisticsStore::topPrivatelyControlledDomainsWithWebsiteData):
329         (WebKit::WebResourceLoadStatisticsStore::sendDiagnosticMessageWithValue const):
330         (WebKit::WebResourceLoadStatisticsStore::notifyPageStatisticsTelemetryFinished const):
331         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
332         * NetworkProcess/Classifier/WebResourceLoadStatisticsTelemetry.cpp:
333         (WebKit::submitTopList):
334         (WebKit::submitTopLists):
335         (WebKit::notifyPages):
336         (WebKit::WebResourceLoadStatisticsTelemetry::calculateAndSubmit):
337         (WebKit::nonEphemeralWebPageProxy): Deleted.
338         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
339         (WebKit::NetworkConnectionToWebProcess::logUserInteraction):
340         * NetworkProcess/NetworkConnectionToWebProcess.h:
341         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
342         * NetworkProcess/NetworkProcess.cpp:
343         (WebKit::NetworkProcess::dumpResourceLoadStatistics):
344         (WebKit::NetworkProcess::isGrandfathered):
345         (WebKit::NetworkProcess::isPrevalentResource):
346         (WebKit::NetworkProcess::isVeryPrevalentResource):
347         (WebKit::NetworkProcess::setGrandfathered):
348         (WebKit::NetworkProcess::setPrevalentResource):
349         (WebKit::NetworkProcess::setPrevalentResourceForDebugMode):
350         (WebKit::NetworkProcess::setVeryPrevalentResource):
351         (WebKit::NetworkProcess::clearPrevalentResource):
352         (WebKit::NetworkProcess::submitTelemetry):
353         (WebKit::NetworkProcess::scheduleCookieBlockingUpdate):
354         (WebKit::NetworkProcess::scheduleClearInMemoryAndPersistent):
355         (WebKit::NetworkProcess::resetParametersToDefaultValues):
356         (WebKit::NetworkProcess::scheduleStatisticsAndDataRecordsProcessing):
357         (WebKit::NetworkProcess::setNotifyPagesWhenDataRecordsWereScanned):
358         (WebKit::NetworkProcess::setNotifyPagesWhenTelemetryWasCaptured):
359         (WebKit::NetworkProcess::setSubframeUnderTopFrameOrigin):
360         (WebKit::NetworkProcess::isRegisteredAsRedirectingTo):
361         (WebKit::NetworkProcess::isRegisteredAsSubFrameUnder):
362         (WebKit::NetworkProcess::setSubresourceUnderTopFrameOrigin):
363         (WebKit::NetworkProcess::setSubresourceUniqueRedirectTo):
364         (WebKit::NetworkProcess::setSubresourceUniqueRedirectFrom):
365         (WebKit::NetworkProcess::isRegisteredAsSubresourceUnder):
366         (WebKit::NetworkProcess::setTopFrameUniqueRedirectTo):
367         (WebKit::NetworkProcess::setTopFrameUniqueRedirectFrom):
368         (WebKit::NetworkProcess::setLastSeen):
369         (WebKit::NetworkProcess::hasStorageAccess):
370         (WebKit::NetworkProcess::requestStorageAccess):
371         (WebKit::NetworkProcess::grantStorageAccess):
372         (WebKit::NetworkProcess::logUserInteraction):
373         (WebKit::NetworkProcess::hadUserInteraction):
374         (WebKit::NetworkProcess::clearUserInteraction):
375         (WebKit::NetworkProcess::setGrandfatheringTime):
376         (WebKit::NetworkProcess::setMaxStatisticsEntries):
377         (WebKit::NetworkProcess::setMinimumTimeBetweenDataRecordsRemoval):
378         (WebKit::NetworkProcess::setPruneEntriesDownTo):
379         (WebKit::NetworkProcess::setTimeToLiveUserInteraction):
380         (WebKit::NetworkProcess::setShouldClassifyResourcesBeforeDataRecordsRemoval):
381         (WebKit::NetworkProcess::setResourceLoadStatisticsEnabled):
382         (WebKit::NetworkProcess::setResourceLoadStatisticsDebugMode):
383         (WebKit::NetworkProcess::resetCacheMaxAgeCapForPrevalentResources):
384         (WebKit::NetworkProcess::deleteWebsiteData):
385         (WebKit::filterForTopLevelDomains):
386         (WebKit::NetworkProcess::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores):
387         (WebKit::NetworkProcess::topPrivatelyControlledDomainsWithWebsiteData):
388         * NetworkProcess/NetworkProcess.h:
389         * NetworkProcess/NetworkProcess.messages.in:
390         * NetworkProcess/NetworkSession.cpp:
391         (WebKit::NetworkSession::setResourceLoadStatisticsEnabled):
392         (WebKit::NetworkSession::notifyResourceLoadStatisticsProcessed):
393         (WebKit::NetworkSession::logDiagnosticMessageWithValue):
394         (WebKit::NetworkSession::notifyPageStatisticsTelemetryFinished):
395         (WebKit::NetworkSession::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores):
396         (WebKit::NetworkSession::topPrivatelyControlledDomainsWithWebsiteData):
397         (WebKit::NetworkSession::enableResourceLoadStatistics): Deleted.
398         * NetworkProcess/NetworkSession.h:
399         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
400         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
401         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
402         (WKWebsiteDataStoreSetResourceLoadStatisticsDebugModeWithCompletionHandler):
403         (WKWebsiteDataStoreSetResourceLoadStatisticsPrevalentResourceForDebugMode):
404         (WKWebsiteDataStoreSetStatisticsLastSeen):
405         (WKWebsiteDataStoreSetStatisticsPrevalentResource):
406         (WKWebsiteDataStoreSetStatisticsVeryPrevalentResource):
407         (WKWebsiteDataStoreDumpResourceLoadStatistics):
408         (WKWebsiteDataStoreIsStatisticsPrevalentResource):
409         (WKWebsiteDataStoreIsStatisticsVeryPrevalentResource):
410         (WKWebsiteDataStoreIsStatisticsRegisteredAsSubresourceUnder):
411         (WKWebsiteDataStoreIsStatisticsRegisteredAsSubFrameUnder):
412         (WKWebsiteDataStoreIsStatisticsRegisteredAsRedirectingTo):
413         (WKWebsiteDataStoreSetStatisticsHasHadUserInteraction):
414         (WKWebsiteDataStoreIsStatisticsHasHadUserInteraction):
415         (WKWebsiteDataStoreSetStatisticsGrandfathered):
416         (WKWebsiteDataStoreIsStatisticsGrandfathered):
417         (WKWebsiteDataStoreSetStatisticsSubframeUnderTopFrameOrigin):
418         (WKWebsiteDataStoreSetStatisticsSubresourceUnderTopFrameOrigin):
419         (WKWebsiteDataStoreSetStatisticsSubresourceUniqueRedirectTo):
420         (WKWebsiteDataStoreSetStatisticsSubresourceUniqueRedirectFrom):
421         (WKWebsiteDataStoreSetStatisticsTopFrameUniqueRedirectTo):
422         (WKWebsiteDataStoreSetStatisticsTopFrameUniqueRedirectFrom):
423         (WKWebsiteDataStoreSetStatisticsTimeToLiveUserInteraction):
424         (WKWebsiteDataStoreStatisticsProcessStatisticsAndDataRecords):
425         (WKWebsiteDataStoreStatisticsUpdateCookieBlocking):
426         (WKWebsiteDataStoreStatisticsSubmitTelemetry):
427         (WKWebsiteDataStoreSetStatisticsNotifyPagesWhenDataRecordsWereScanned):
428         (WKWebsiteDataStoreSetStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval):
429         (WKWebsiteDataStoreSetStatisticsNotifyPagesWhenTelemetryWasCaptured):
430         (WKWebsiteDataStoreSetStatisticsMinimumTimeBetweenDataRecordsRemoval):
431         (WKWebsiteDataStoreSetStatisticsGrandfatheringTime):
432         (WKWebsiteDataStoreSetStatisticsMaxStatisticsEntries):
433         (WKWebsiteDataStoreSetStatisticsPruneEntriesDownTo):
434         (WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStore):
435         (WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
436         (WKWebsiteDataStoreStatisticsResetToConsistentState):
437         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
438         (-[WKWebsiteDataStore _setResourceLoadStatisticsTestingCallback:]):
439         * UIProcess/Network/NetworkProcessProxy.cpp:
440         (WebKit::NetworkProcessProxy::clearCallbackStates):
441         (WebKit::NetworkProcessProxy::didClose):
442         (WebKit::nonEphemeralWebPageProxy):
443         (WebKit::NetworkProcessProxy::logGlobalDiagnosticMessageWithValue):
444         (WebKit::NetworkProcessProxy::dumpResourceLoadStatistics):
445         (WebKit::NetworkProcessProxy::didDumpResourceLoadStatistics):
446         (WebKit::NetworkProcessProxy::updatePrevalentDomainsToBlockCookiesFor):
447         (WebKit::NetworkProcessProxy::didUpdateBlockCookies):
448         (WebKit::NetworkProcessProxy::isPrevalentResource):
449         (WebKit::NetworkProcessProxy::isPrevalentResourceResult):
450         (WebKit::NetworkProcessProxy::isVeryPrevalentResource):
451         (WebKit::NetworkProcessProxy::setPrevalentResource):
452         (WebKit::NetworkProcessProxy::setPrevalentResourceForDebugMode):
453         (WebKit::NetworkProcessProxy::setVeryPrevalentResource):
454         (WebKit::NetworkProcessProxy::didSetResourceLoadStatisticData):
455         (WebKit::NetworkProcessProxy::setLastSeen):
456         (WebKit::NetworkProcessProxy::clearPrevalentResource):
457         (WebKit::NetworkProcessProxy::scheduleCookieBlockingUpdate):
458         (WebKit::NetworkProcessProxy::didScheduleCookieBlockingUpdate):
459         (WebKit::NetworkProcessProxy::scheduleClearInMemoryAndPersistent):
460         (WebKit::NetworkProcessProxy::didScheduleStatisticsProcessing):
461         (WebKit::NetworkProcessProxy::scheduleStatisticsAndDataRecordsProcessing):
462         (WebKit::NetworkProcessProxy::logUserInteraction):
463         (WebKit::NetworkProcessProxy::hasHadUserInteraction):
464         (WebKit::NetworkProcessProxy::didHaveUserInteraction):
465         (WebKit::NetworkProcessProxy::clearUserInteraction):
466         (WebKit::NetworkProcessProxy::setAgeCapForClientSideCookies):
467         (WebKit::NetworkProcessProxy::didSetAgeCapForClientSideCookies):
468         (WebKit::NetworkProcessProxy::setTimeToLiveUserInteraction):
469         (WebKit::NetworkProcessProxy::didUpdateRuntimeSettings):
470         (WebKit::NetworkProcessProxy::setNotifyPagesWhenTelemetryWasCaptured):
471         (WebKit::NetworkProcessProxy::setNotifyPagesWhenDataRecordsWereScanned):
472         (WebKit::NetworkProcessProxy::setSubframeUnderTopFrameOrigin):
473         (WebKit::NetworkProcessProxy::isRegisteredAsRedirectingTo):
474         (WebKit::NetworkProcessProxy::didIsRegisteredAsRedirectingTo):
475         (WebKit::NetworkProcessProxy::isRegisteredAsSubFrameUnder):
476         (WebKit::NetworkProcessProxy::didIsRegisteredAsSubFrameUnder):
477         (WebKit::NetworkProcessProxy::setSubresourceUnderTopFrameOrigin):
478         (WebKit::NetworkProcessProxy::isRegisteredAsSubresourceUnder):
479         (WebKit::NetworkProcessProxy::didIsRegisteredAsSubresourceUnder):
480         (WebKit::NetworkProcessProxy::setSubresourceUniqueRedirectTo):
481         (WebKit::NetworkProcessProxy::setSubresourceUniqueRedirectFrom):
482         (WebKit::NetworkProcessProxy::setTopFrameUniqueRedirectTo):
483         (WebKit::NetworkProcessProxy::setTopFrameUniqueRedirectFrom):
484         (WebKit::NetworkProcessProxy::isGrandfathered):
485         (WebKit::NetworkProcessProxy::didIsGrandfathered):
486         (WebKit::NetworkProcessProxy::setGrandfathered):
487         (WebKit::NetworkProcessProxy::hasStorageAccess):
488         (WebKit::NetworkProcessProxy::requestStorageAccess):
489         (WebKit::NetworkProcessProxy::grantStorageAccess):
490         (WebKit::NetworkProcessProxy::storageAccessRequestResult):
491         (WebKit::NetworkProcessProxy::storageAccessOperationResult):
492         (WebKit::NetworkProcessProxy::didRemoveAllStorageAccess):
493         (WebKit::NetworkProcessProxy::didSetCacheMaxAgeCapForPrevalentResources):
494         (WebKit::NetworkProcessProxy::setCacheMaxAgeCap):
495         (WebKit::NetworkProcessProxy::setGrandfatheringTime):
496         (WebKit::NetworkProcessProxy::setMaxStatisticsEntries):
497         (WebKit::NetworkProcessProxy::setMinimumTimeBetweenDataRecordsRemoval):
498         (WebKit::NetworkProcessProxy::setPruneEntriesDownTo):
499         (WebKit::NetworkProcessProxy::setShouldClassifyResourcesBeforeDataRecordsRemoval):
500         (WebKit::NetworkProcessProxy::setResourceLoadStatisticsDebugMode):
501         (WebKit::NetworkProcessProxy::resetParametersToDefaultValues):
502         (WebKit::NetworkProcessProxy::submitTelemetry):
503         (WebKit::NetworkProcessProxy::notifyResourceLoadStatisticsProcessed):
504         (WebKit::NetworkProcessProxy::notifyWebsiteDataDeletionForTopPrivatelyOwnedDomainsFinished):
505         (WebKit::NetworkProcessProxy::notifyWebsiteDataScanForTopPrivatelyControlledDomainsFinished):
506         (WebKit::NetworkProcessProxy::notifyResourceLoadStatisticsTelemetryFinished):
507         (WebKit::NetworkProcessProxy::didLogUserInteraction): Deleted.
508         (WebKit::NetworkProcessProxy::didResetCacheMaxAgeCapForPrevalentResources): Deleted.
509         * UIProcess/Network/NetworkProcessProxy.h:
510         * UIProcess/Network/NetworkProcessProxy.messages.in:
511         * UIProcess/WebPageProxy.cpp:
512         (WebKit::WebPageProxy::nonEphemeralWebPageProxy):
513         * UIProcess/WebPageProxy.h:
514         * UIProcess/WebProcessPool.cpp:
515         (WebKit::WebProcessPool::ensureNetworkProcess):
516         * UIProcess/WebProcessProxy.cpp:
517         (WebKit::WebProcessProxy::notifyWebsiteDataScanForTopPrivatelyControlledDomainsFinished):
518         (WebKit::WebProcessProxy::notifyWebsiteDataDeletionForTopPrivatelyOwnedDomainsFinished):
519         * UIProcess/WebProcessProxy.h:
520         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
521         (WebKit::WebsiteDataStore::parameters):
522         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
523         (WebKit::WebsiteDataStore::removeData):
524         (WebKit::WebsiteDataStore::setMaxStatisticsEntries):
525         (WebKit::WebsiteDataStore::setPruneEntriesDownTo):
526         (WebKit::WebsiteDataStore::setGrandfatheringTime):
527         (WebKit::WebsiteDataStore::setCacheMaxAgeCap):
528         (WebKit::WebsiteDataStore::setMinimumTimeBetweenDataRecordsRemoval):
529         (WebKit::WebsiteDataStore::dumpResourceLoadStatistics):
530         (WebKit::WebsiteDataStore::isPrevalentResource):
531         (WebKit::WebsiteDataStore::setPrevalentResource):
532         (WebKit::WebsiteDataStore::setPrevalentResourceForDebugMode):
533         (WebKit::WebsiteDataStore::isVeryPrevalentResource):
534         (WebKit::WebsiteDataStore::setVeryPrevalentResource):
535         (WebKit::WebsiteDataStore::setShouldClassifyResourcesBeforeDataRecordsRemoval):
536         (WebKit::WebsiteDataStore::setSubframeUnderTopFrameOrigin):
537         (WebKit::WebsiteDataStore::isRegisteredAsSubFrameUnder):
538         (WebKit::WebsiteDataStore::setSubresourceUnderTopFrameOrigin):
539         (WebKit::WebsiteDataStore::isRegisteredAsSubresourceUnder):
540         (WebKit::WebsiteDataStore::setSubresourceUniqueRedirectTo):
541         (WebKit::WebsiteDataStore::setSubresourceUniqueRedirectFrom):
542         (WebKit::WebsiteDataStore::setTopFrameUniqueRedirectTo):
543         (WebKit::WebsiteDataStore::setTopFrameUniqueRedirectFrom):
544         (WebKit::WebsiteDataStore::isRegisteredAsRedirectingTo):
545         (WebKit::WebsiteDataStore::clearPrevalentResource):
546         (WebKit::WebsiteDataStore::resetParametersToDefaultValues):
547         (WebKit::WebsiteDataStore::submitTelemetry):
548         (WebKit::WebsiteDataStore::scheduleClearInMemoryAndPersistent):
549         (WebKit::WebsiteDataStore::scheduleCookieBlockingUpdate):
550         (WebKit::WebsiteDataStore::scheduleStatisticsAndDataRecordsProcessing):
551         (WebKit::WebsiteDataStore::updatePrevalentDomainsToBlockCookiesFor):
552         (WebKit::WebsiteDataStore::setAgeCapForClientSideCookies):
553         (WebKit::WebsiteDataStore::setLastSeen):
554         (WebKit::WebsiteDataStore::setNotifyPagesWhenDataRecordsWereScanned):
555         (WebKit::WebsiteDataStore::setNotifyPagesWhenTelemetryWasCaptured):
556         (WebKit::WebsiteDataStore::hasStorageAccessForFrameHandler):
557         (WebKit::WebsiteDataStore::getAllStorageAccessEntries):
558         (WebKit::WebsiteDataStore::grantStorageAccessHandler):
559         (WebKit::WebsiteDataStore::removeAllStorageAccessHandler):
560         (WebKit::WebsiteDataStore::removePrevalentDomains):
561         (WebKit::WebsiteDataStore::hasStorageAccess):
562         (WebKit::WebsiteDataStore::requestStorageAccess):
563         (WebKit::WebsiteDataStore::grantStorageAccess):
564         (WebKit::WebsiteDataStore::setTimeToLiveUserInteraction):
565         (WebKit::WebsiteDataStore::logUserInteraction):
566         (WebKit::WebsiteDataStore::hasHadUserInteraction):
567         (WebKit::WebsiteDataStore::clearUserInteraction):
568         (WebKit::WebsiteDataStore::isGrandfathered):
569         (WebKit::WebsiteDataStore::setGrandfathered):
570         (WebKit::WebsiteDataStore::setCacheMaxAgeCapForPrevalentResources):
571         (WebKit::WebsiteDataStore::resetCacheMaxAgeCapForPrevalentResources):
572         (WebKit::WebsiteDataStore::webPageWasAdded):
573         (WebKit::WebsiteDataStore::webPageWasInvalidated):
574         (WebKit::WebsiteDataStore::webProcessWillOpenConnection):
575         (WebKit::WebsiteDataStore::webPageWillOpenConnection):
576         (WebKit::WebsiteDataStore::webPageDidCloseConnection):
577         (WebKit::WebsiteDataStore::webProcessDidCloseConnection):
578         (WebKit::WebsiteDataStore::isAssociatedProcessPool const):
579         (WebKit::WebsiteDataStore::processPools const):
580         (WebKit::WebsiteDataStore::resourceLoadStatisticsEnabled const):
581         (WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):
582         (WebKit::WebsiteDataStore::setResourceLoadStatisticsDebugMode):
583         (WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):
584         (WebKit::WebsiteDataStore::logTestingEvent):
585         * UIProcess/WebsiteData/WebsiteDataStore.h:
586         (WebKit::WebsiteDataStore::setStatisticsTestingCallback):
587         * WebProcess/WebProcess.cpp:
588         (WebKit::WebProcess::initializeWebProcess):
589
590 2019-01-15  Darin Adler  <darin@apple.com>
591
592         Use references rather than pointers for register/unregister functions, and more
593         https://bugs.webkit.org/show_bug.cgi?id=175028
594
595         Reviewed by Daniel Bates.
596
597         * WebProcess/FullScreen/WebFullScreenManager.cpp:
598         (WebKit::WebFullScreenManager::willEnterFullScreen): Update for change to the
599         functions in Document; pass a reference.
600         (WebKit::WebFullScreenManager::didEnterFullScreen): Ditto, don't pass the element.
601         (WebKit::WebFullScreenManager::willExitFullScreen): Ditto.
602         (WebKit::WebFullScreenManager::didExitFullScreen): Ditto.
603
604         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
605         (WebKit::UserMediaPermissionRequestManager::startUserMediaRequest): Pass a reference.
606         (WebKit::UserMediaPermissionRequestManager::mediaCanStart): Ditto.
607         (WebKit::UserMediaPermissionRequestManager::removeMediaRequestFromMaps): Ditto.
608         * WebProcess/Plugins/PluginView.cpp:
609         (WebKit::PluginView::~PluginView): Ditto.
610         (WebKit::PluginView::initializePlugin): Ditto.
611
612 2019-01-20  Michael Catanzaro  <mcatanzaro@igalia.com>
613
614         Unreviewed, fix -Wreturn-type warning
615         https://bugs.webkit.org/show_bug.cgi?id=193333
616         <rdar://problem/45649489>
617
618         * UIProcess/Automation/WebAutomationSession.cpp:
619         (WebKit::toProtocol):
620
621 2019-01-20  chris fleizach  <cfleizach@apple.com>
622
623         AX: Support returning relative frames for accessibility
624         https://bugs.webkit.org/show_bug.cgi?id=193414
625         <rdar://problem/47268501>
626
627         Reviewed by Zalan Bujtas.
628
629         * UIProcess/API/Cocoa/WKWebView.mm:
630         (-[WKWebView accessibilityAttributeValue:forParameter:]):
631         (-[WKWebView IGNORE_WARNINGS_END]):
632         * UIProcess/API/mac/WKView.mm:
633         (-[WKView accessibilityAttributeValue:forParameter:]):
634         (-[WKView IGNORE_WARNINGS_END]):
635         * UIProcess/Cocoa/WebViewImpl.h:
636         * UIProcess/Cocoa/WebViewImpl.mm:
637         (WebKit::WebViewImpl::accessibilityAttributeValue):
638         * UIProcess/ios/WKContentView.mm:
639         (-[WKContentView accessibilityConvertRelativeFrameFromPage:]):
640
641 2019-01-20  Michael Catanzaro  <mcatanzaro@igalia.com>
642
643         Unreviewed, rolling out r240209.
644
645         Broke GTK/WPE injected bundle
646
647         Reverted changeset:
648
649         "AX: Support returning relative frames for accessibility"
650         https://bugs.webkit.org/show_bug.cgi?id=193414
651         https://trac.webkit.org/changeset/240209
652
653 2019-01-12  Dan Bernstein  <mitz@apple.com>
654
655         [Cocoa] Avoid importing directly from subumbrella frameworks
656         https://bugs.webkit.org/show_bug.cgi?id=186016
657         <rdar://problem/40591038>
658
659         Reviewed by Sam Weinig.
660
661         * Configurations/BaseTarget.xcconfig: Removed -iframework options from OTHER_CFLAGS and
662           OTHER_CPLUSPLUSFLAGS.
663         * UIProcess/Automation/mac/WebAutomationSessionMac.mm: Import Carbon.h instead of an
664           HIToolbox header.
665         * UIProcess/Cocoa/WebViewImpl.mm: Ditto.
666         * UIProcess/mac/WKPrintingView.mm: Import Quartz.h instead of a PDFKit header.
667         * UIProcess/mac/WKTextInputWindowController.mm: Import Carbon.h instead of an HIToolbox
668           header.
669         * WebProcess/Plugins/PDF/PDFAnnotationTextWidgetDetails.h: Import Quartz.h instead of a
670           PDFKit header.
671         * WebProcess/Plugins/PDF/PDFLayerControllerSPI.h: Ditto.
672         * WebProcess/Plugins/PDF/PDFPlugin.mm: Ditto.
673         * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm: Ditto.
674         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm: Ditto.
675         * WebProcess/Plugins/PDF/PDFPluginPasswordField.mm: Ditto.
676         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm: Ditto.
677         * WebProcess/WebPage/mac/WebPageMac.mm: Ditto.
678
679 2019-01-20  chris fleizach  <cfleizach@apple.com>
680
681         AX: Support returning relative frames for accessibility
682         https://bugs.webkit.org/show_bug.cgi?id=193414
683         <rdar://problem/47268501>
684
685         Reviewed by Zalan Bujtas.
686
687         * UIProcess/API/Cocoa/WKWebView.mm:
688         (-[WKWebView accessibilityAttributeValue:forParameter:]):
689         (-[WKWebView IGNORE_WARNINGS_END]):
690         * UIProcess/API/mac/WKView.mm:
691         (-[WKView accessibilityAttributeValue:forParameter:]):
692         (-[WKView IGNORE_WARNINGS_END]):
693         * UIProcess/Cocoa/WebViewImpl.h:
694         * UIProcess/Cocoa/WebViewImpl.mm:
695         (WebKit::WebViewImpl::accessibilityAttributeValue):
696         * UIProcess/ios/WKContentView.mm:
697         (-[WKContentView accessibilityConvertRelativeFrameFromPage:]):
698
699 2019-01-20  Antoine Quint  <graouts@apple.com>
700
701         Add a POINTER_EVENTS feature flag
702         https://bugs.webkit.org/show_bug.cgi?id=193577
703         <rdar://problem/47408511>
704
705         Unreviewed. Also enable Pointer Events for iosmac.
706
707         * Configurations/FeatureDefines.xcconfig:
708
709 2019-01-19  David Kilzer  <ddkilzer@apple.com>
710
711         Follow-up: iOS: Updating input mode should update the software keyboard
712         <https://bugs.webkit.org/show_bug.cgi?id=193565>
713         <rdar://problem/47376334>
714
715         * WebProcess/WebPage/WebPage.cpp:
716         (WebKit::WebPage::focusedElementDidChangeInputMode): Fix iOS
717         Debug builds after r240199 by downcasting `element` to
718         `HTMLElement` before calling canonicalInputMode().
719
720 2019-01-19  David Kilzer  <ddkilzer@apple.com>
721
722         Sort WebKit Xcode project file
723
724         * WebKit.xcodeproj/project.pbxproj:
725
726 2019-01-19  Antoine Quint  <graouts@apple.com>
727
728         Add a POINTER_EVENTS feature flag
729         https://bugs.webkit.org/show_bug.cgi?id=193577
730
731         Reviewed by Dean Jackson.
732
733         * Configurations/FeatureDefines.xcconfig:
734
735 2019-01-18  Ryosuke Niwa  <rniwa@webkit.org>
736
737         iOS: Updating input mode should update the software keyboard
738         https://bugs.webkit.org/show_bug.cgi?id=193565
739         <rdar://problem/47376334>
740
741         Reviewed by Wenson Hsieh.
742
743         Update the software keyboard when the inputmode content attribute on the focused element had been mutated.
744
745         * Scripts/webkit/messages.py:
746         * Shared/WebCoreArgumentCoders.h:
747         * UIProcess/PageClient.h:
748         * UIProcess/WebPageProxy.h:
749         * UIProcess/WebPageProxy.messages.in:
750         * UIProcess/ios/PageClientImplIOS.h:
751         * UIProcess/ios/PageClientImplIOS.mm:
752         (WebKit::PageClientImpl::focusedElementDidChangeInputMode):
753         * UIProcess/ios/WKContentViewInteraction.h:
754         * UIProcess/ios/WKContentViewInteraction.mm:
755         (-[WKContentView _didUpdateInputMode:]):
756         * UIProcess/ios/WebPageProxyIOS.mm:
757         (WebKit::WebPageProxy::focusedElementDidChangeInputMode):
758         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
759         (WebKit::WebChromeClient::focusedElementDidChangeInputMode):
760         * WebProcess/WebCoreSupport/WebChromeClient.h:
761         * WebProcess/WebPage/WebPage.cpp:
762         (WebKit::WebPage::focusedElementDidChangeInputMode):
763         * WebProcess/WebPage/WebPage.h:
764
765 2019-01-18  Tim Horton  <timothy_horton@apple.com>
766
767         Adjust WKDrawingView protocol method name
768         https://bugs.webkit.org/show_bug.cgi?id=193604
769
770         Reviewed by Wenson Hsieh.
771
772         * UIProcess/ios/WKDrawingView.mm:
773         (-[WKDrawingView canvasViewDrawingDidChange:]):
774         (-[WKDrawingView drawingDidChange:]): Deleted.
775
776 2019-01-18  David Kilzer  <ddkilzer@apple.com>
777
778         [WebKit] Change Xcode folders to map to folders on disk
779
780         * WebKit.xcodeproj/project.pbxproj: Update these folders:
781         - Shared/Authentication
782         - Shared/Authentication/cocoa
783
784 2019-01-18  Brian Burg  <bburg@apple.com>
785
786         Automation.computeElementLayout should return visual viewport-aware coordinates
787         https://bugs.webkit.org/show_bug.cgi?id=193598
788         <rdar://problem/35325644>
789
790         Reviewed by Simon Fraser.
791
792         Previously I added CoordinateSystem::VisualViewport to stub out this for iOS.
793         But I think that it's a mistake for safaridriver to care about VisualViewport
794         being enabled or not, because it is a runtime-switchable setting.
795
796         This patch removes CoordinateSystem::VisualViewport. Make the existing
797         CoordinateSystem::LayoutViewport use visual viewport semantics if needed.
798
799         This is tested by WebDriver element clicking tests. There should not be any
800         difference in behavior until it is possible to zoom with gestures via WebDriver.
801
802         * Shared/CoordinateSystem.h:
803         * UIProcess/Automation/Automation.json:
804         * UIProcess/Automation/WebAutomationSession.cpp:
805         (WebKit::protocolStringToCoordinateSystem):
806         * WebProcess/Automation/WebAutomationSessionProxy.cpp:
807         (WebKit::WebAutomationSessionProxy::computeElementLayout):
808
809 2019-01-18  Daniel Bates  <dabates@apple.com>
810
811         Fix some build issues.
812
813         Include missing header WKDrawingCoordinator.
814
815         * UIProcess/ios/WKInkPickerView.mm:
816
817 2019-01-18  Tim Horton  <timothy_horton@apple.com>
818
819         Get rid of ADVANCED_SPELL_CHECKING
820         https://bugs.webkit.org/show_bug.cgi?id=193592
821
822         Reviewed by Wenson Hsieh.
823
824         * UIProcess/Cocoa/WebViewImpl.mm:
825         (WebKit::WebViewImpl::requestCandidatesForSelectionIfNeeded):
826         (WebKit::WebViewImpl::insertText):
827         * UIProcess/mac/TextCheckerMac.mm:
828         (WebKit::TextChecker::checkTextOfParagraph):
829         (WebKit::TextChecker::getGuessesForWord):
830
831 2019-01-18  Chris Dumez  <cdumez@apple.com>
832
833         Regression(PSON) Content blockers are sometimes lost on back navigation cross-site
834         https://bugs.webkit.org/show_bug.cgi?id=193588
835         <rdar://problem/47131566>
836
837         Reviewed by Alex Christensen.
838
839         When the WebPageProxy needs to create initialization parameters for its WebPage in the
840         WebContent process, it calls WebProcessProxy::addWebUserContentControllerProxy()
841         which calls WebUserContentControllerProxy::addProcess(). This last call is supposed to
842         register the WebProcessProxy with the WebUserContentControllerProxy and adding the
843         contentRuleLists to the WebPageCreationParameters. The issue is that if the
844         WebUserContentControllerProxy already knows about this WebProcessProxy, it would return
845         early and not populate the WebPageCreationParameters.
846
847         In PSON world, when navigating back to a page that failed to enter page cache, we reuse
848         the process where we previously loaded the page but re-create a new WebPage on the
849         WebContent process site. When this happens, WebUserContentControllerProxy would not
850         add the contentRuleLists to the WebPageCreationParameters and the new WebPage in the
851         previously-suspended process would be missing them.
852
853         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
854         (WebKit::WebUserContentControllerProxy::addProcess):
855
856 2019-01-18  Jer Noble  <jer.noble@apple.com>
857
858         SDK_VARIANT build destinations should be separate from non-SDK_VARIANT builds
859         https://bugs.webkit.org/show_bug.cgi?id=189553
860
861         Reviewed by Tim Horton.
862
863         * Configurations/Base.xcconfig:
864         * Configurations/BaseTarget.xcconfig:
865         * Configurations/SDKVariant.xcconfig: Added.
866
867 2019-01-18  Antti Koivisto  <antti@apple.com>
868
869         Implement asynchronous frame scrolling for iOS
870         https://bugs.webkit.org/show_bug.cgi?id=193539
871         <rdar://problem/47379873>
872
873         Reviewed by Simon Fraser.
874
875         Add a scrolling node type that can handle UIScrollView backed frames.
876         It basically just instantiates and forwards to the existing ScrollingTreeScrollingNodeDelegateIOS.
877
878         * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:
879         (WebKit::RemoteScrollingTree::createScrollingTreeNode):
880         * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
881         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
882         * UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.h: Added.
883         * UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm: Added.
884         (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::create):
885         (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::ScrollingTreeFrameScrollingNodeRemoteIOS):
886         (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::~ScrollingTreeFrameScrollingNodeRemoteIOS):
887         (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateBeforeChildren):
888         (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateAfterChildren):
889         (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::updateLayersAfterAncestorChange):
890         (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::scrollPosition const):
891         (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::setScrollLayerPosition):
892         (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::updateLayersAfterDelegatedScroll):
893         * WebKit.xcodeproj/project.pbxproj:
894
895 2019-01-18  Chris Dumez  <cdumez@apple.com>
896
897         Regression(PSON) Scroll position is not always restored properly when navigating back
898         https://bugs.webkit.org/show_bug.cgi?id=193578
899         <rdar://problem/47386331>
900
901         Reviewed by Tim Horton.
902
903         Fix issues causing the scroll position to not be restored at all (or incorrectly) when
904         navigating back cross-site with PSON enabled. Also make sure that the swipe gesture
905         snapshot really stays up until we've restored the scroll position.
906
907         Note that even after those changes, I can still sometimes reproduce a white flash when
908         swiping back to Google search results (scroll position being correct now). This is
909         tracked by <rdar://problem/47071684> and happens even if I disable PSON entirely.
910
911         * Shared/SessionState.cpp:
912         (WebKit::FrameState::encode const):
913         (WebKit::FrameState::decode):
914         * Shared/SessionState.h:
915         * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
916         (WebKit::toFrameState):
917         (WebKit::applyFrameState):
918         obscuredInsets is present on the HistoryItem in the WebProcess but was never passed to
919         or stored by the UIProcess on the WebBackForwardListItem. obscuredInsets is needed to
920         properly restore the scrollPosition (position was 70px off on my iPad without this).
921         With PSON enabled, if you swipe back cross-process and the previous page was not put
922         into PageCache, then the HistoryItem is gone on the WebProcess side. What happens is
923         that the UIProcess sends its WebBackForwardListItem to the WebProcess, which restores
924         the HistoryItem there, and then asks it to load it. The obscuredInsets was getting lost
925         in the process since the UIProcess never knew about it.
926
927         * UIProcess/Cocoa/ViewGestureController.cpp:
928         (WebKit::ViewGestureController::didReachMainFrameLoadTerminalState):
929         Drop logic that was causing the ViewGestureController to not wait for the scroll position
930         to be restored before taking down the snapshot, when UI-side compositing is enabled.
931         If you look at the comment above the code, you'll see that the code in question was meant
932         to impact only the non-UI side compositing code path. As a matter of fact, when the code
933         was reviewed at https://bugs.webkit.org/show_bug.cgi?id=151224, it was protected by a
934         #if PLATFORM(MAC), before getting modified the wrong way before landing. In practice, we
935         would have often restored the scroll position by the time the load is finished so it would
936         not cause a flash in most cases. However, with PSON enabled and the layer tree freezing we
937         do on process-swap, the first post-scroll restoration layer tree commit may now occur a
938         little bit later and we would lose the race more often.
939
940         * UIProcess/WebProcessProxy.cpp:
941         (WebKit::WebProcessProxy::updateBackForwardItem):
942         * UIProcess/WebProcessProxy.h:
943         When adding PageCache support to PSON, we used to navigate the "suspended" page to
944         about:blank. This would lead to unwanted WebProcessProxy::updateBackForwardItem()
945         calls from the WebProcess which we wanted to ignore. We thus added logic to ignore
946         updateBackForwardItem() IPC from the old WebProcess after a swap. The issue with this
947         is that we sometimes miss/ignore legit updates to the HistoryItem from the old process,
948         in particular with regards to the scroll position and the pageScaleFactor. So if you
949         swiped and then quickly enough did a cross-site navigation, the UIProcess'
950         WebBackForwardList would not get updated with the latest scroll position and we would
951         thus fail to restore it later on. To address the issue, we now stop ignoring updates
952         from the old WebProcess after a swap. This logic is no longer needed since we no longer
953         navigate the old page to about:blank after a swap, we merely suspend it "in place".
954
955 2019-01-18  Wenson Hsieh  <wenson_hsieh@apple.com>
956
957         Remove some last vestiges of assisted node terminology in WebKit
958         https://bugs.webkit.org/show_bug.cgi?id=193572
959
960         Reviewed by Tim Horton.
961
962         * UIProcess/API/Cocoa/_WKFocusedElementInfo.h:
963         * UIProcess/ios/WKContentViewInteraction.mm:
964         (-[WKContentView gestureRecognizerShouldBegin:]):
965         (-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
966         (-[WKContentView _showKeyboard]):
967         (-[WKContentView _hideKeyboard]):
968
969         Add a FIXME about invoking `-reloadInputViews` on watchOS when the focused element is blurred.
970
971         (-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
972         (-[WKContentView _elementDidBlur]):
973         (-[WKContentView updateCurrentFocusedElementInformation:]):
974         (-[WKContentView _startAssistingKeyboard]): Deleted.
975         (-[WKContentView _stopAssistingKeyboard]): Deleted.
976         * WebProcess/WebPage/ios/WebPageIOS.mm:
977         (WebKit::WebPage::getFocusedElementInformation):
978
979 2019-01-18  Youenn Fablet  <youenn@apple.com>
980
981         Add a new SPI to request for cache storage quota increase
982         https://bugs.webkit.org/show_bug.cgi?id=193323
983
984         Reviewed by Alex Christensen.
985
986         Add a delegate on the WebSiteDataStore for WebKit to ask for quota update.
987         The current SPI is currently CacheStorage specific but future work should
988         make it so that other storage like IDB use the same mechanism.
989         By default, quota remains unchanged if delegate is not implemented.
990
991         * NetworkProcess/NetworkProcess.cpp:
992         * UIProcess/API/Cocoa/WKStorageQuotaDelegatePrivate.h: Added.
993         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
994         (WebsiteDataStoreQuotaManager::WebsiteDataStoreQuotaManager):
995         (-[WKWebsiteDataStore _quotaDelegate]):
996         (-[WKWebsiteDataStore set_quotaDelegate:]):
997         * UIProcess/API/Cocoa/WKWebsiteDataStoreInternal.h:
998         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
999         * UIProcess/Network/NetworkProcessProxy.cpp:
1000         (WebKit::NetworkProcessProxy::requestCacheStorageSpace):
1001         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1002         (WebKit::WebsiteDataStore::WebsiteDataStore):
1003         * UIProcess/WebsiteData/WebsiteDataStore.h:
1004         (WebKit::WebsiteDataStore::quotaManager):
1005         (WebKit::WebsiteDataStore::setQuotaManager):
1006         * UIProcess/WebsiteData/WebsiteDataStoreQuotaManager.h: Added.
1007         (WebKit::WebsiteDataStoreQuotaManager::~WebsiteDataStoreQuotaManager):
1008         (WebKit::WebsiteDataStoreQuotaManager::requestCacheStorageSpace):
1009         * WebKit.xcodeproj/project.pbxproj:
1010
1011 2019-01-18  Philippe Normand  <pnormand@igalia.com>
1012
1013         [WPE] Add Qt extension
1014         https://bugs.webkit.org/show_bug.cgi?id=191464
1015
1016         Reviewed by Carlos Garcia Campos.
1017
1018         This new extension is a QML plugin embedding a WPE ViewBackend
1019         implementation. It provides a public API very similar to Qt's
1020         WebView module. It comes with a simple mini-browser implemented in
1021         QML.
1022
1023         QtWPE is known to work with the Wayland-EGL (in GNOME and Weston
1024         compositors) and EGLFS QPAs.
1025
1026         * PlatformWPE.cmake:
1027         * UIProcess/API/wpe/qt/WPEQmlExtensionPlugin.cpp: Added.
1028         (WPEQmlExtensionPlugin::registerTypes):
1029         * UIProcess/API/wpe/qt/WPEQmlExtensionPlugin.h: Added.
1030         * UIProcess/API/wpe/qt/WPEQtView.cpp: Added.
1031         (WPEQtView::WPEQtView):
1032         (WPEQtView::~WPEQtView):
1033         (WPEQtView::geometryChanged):
1034         (WPEQtView::configureWindow):
1035         (WPEQtView::createOffscreen):
1036         (WPEQtView::backendCreated):
1037         (WPEQtView::notifyUrlChangedCallback):
1038         (WPEQtView::notifyTitleChangedCallback):
1039         (WPEQtView::notifyLoadProgressCallback):
1040         (WPEQtView::notifyLoadChangedCallback):
1041         (WPEQtView::notifyLoadFailedCallback):
1042         (WPEQtView::updatePaintNode):
1043         (WPEQtView::url const):
1044         (WPEQtView::setUrl):
1045         (WPEQtView::loadProgress const):
1046         (WPEQtView::title const):
1047         (WPEQtView::canGoBack const):
1048         (WPEQtView::isLoading const):
1049         (WPEQtView::canGoForward const):
1050         (WPEQtView::goBack):
1051         (WPEQtView::goForward):
1052         (WPEQtView::reload):
1053         (WPEQtView::stop):
1054         (WPEQtView::loadHtml):
1055         (WPEQtView::jsAsyncReadyCallback):
1056         (WPEQtView::handleJsResult):
1057         (WPEQtView::runJavaScript):
1058         (WPEQtView::mousePressEvent):
1059         (WPEQtView::mouseReleaseEvent):
1060         (WPEQtView::hoverEnterEvent):
1061         (WPEQtView::hoverLeaveEvent):
1062         (WPEQtView::hoverMoveEvent):
1063         (WPEQtView::wheelEvent):
1064         (WPEQtView::keyPressEvent):
1065         (WPEQtView::keyReleaseEvent):
1066         (WPEQtView::touchEvent):
1067         * UIProcess/API/wpe/qt/WPEQtView.h: Added.
1068         * UIProcess/API/wpe/qt/WPEQtViewBackend.cpp: Added.
1069         (configureCallback):
1070         (WPEQtViewBackend::WPEQtViewBackend):
1071         (WPEQtViewBackend::~WPEQtViewBackend):
1072         (WPEQtViewBackend::configureGlibEglDisplay):
1073         (WPEQtViewBackend::configureEglDisplay):
1074         (WPEQtViewBackend::initialize):
1075         (WPEQtViewBackend::backend const):
1076         (WPEQtViewBackend::resize):
1077         (WPEQtViewBackend::getTexture):
1078         (WPEQtViewBackend::initSurface):
1079         (WPEQtViewBackend::displayImage):
1080         (WPEQtViewBackend::modifiers const):
1081         (WPEQtViewBackend::dispatchHoverEnterEvent):
1082         (WPEQtViewBackend::dispatchHoverLeaveEvent):
1083         (WPEQtViewBackend::dispatchHoverMoveEvent):
1084         (WPEQtViewBackend::dispatchMousePressEvent):
1085         (WPEQtViewBackend::dispatchMouseReleaseEvent):
1086         (WPEQtViewBackend::dispatchWheelEvent):
1087         (WPEQtViewBackend::dispatchKeyEvent):
1088         (WPEQtViewBackend::dispatchTouchEvent):
1089         * UIProcess/API/wpe/qt/WPEQtViewBackend.h: Added.
1090         * UIProcess/API/wpe/qt/WPEQtViewLoadRequest.cpp: Added.
1091         (WPEQtViewLoadRequest::WPEQtViewLoadRequest):
1092         (WPEQtViewLoadRequest::~WPEQtViewLoadRequest):
1093         (WPEQtViewLoadRequest::url const):
1094         (WPEQtViewLoadRequest::status const):
1095         (WPEQtViewLoadRequest::errorString const):
1096         * UIProcess/API/wpe/qt/WPEQtViewLoadRequest.h: Added.
1097         * UIProcess/API/wpe/qt/WPEQtViewLoadRequestPrivate.h: Added.
1098         (WPEQtViewLoadRequestPrivate::WPEQtViewLoadRequestPrivate):
1099         (WPEQtViewLoadRequestPrivate::~WPEQtViewLoadRequestPrivate):
1100         * UIProcess/API/wpe/qt/qmldir: Added.
1101
1102 2019-01-17  Wenson Hsieh  <wenson_hsieh@apple.com>
1103
1104         [iOS] Content offset jumps erratically when autoscrolling near scroll view content inset areas
1105         https://bugs.webkit.org/show_bug.cgi?id=193494
1106         <rdar://problem/46859627>
1107
1108         Reviewed by Simon Fraser and Tim Horton.
1109
1110         Adds `contentInsets` to `VisibleContentRectUpdateInfo`. This keeps track of the visible content insets
1111         surrounding the unobscured content rect. See WebCore ChangeLog for more details.
1112
1113         * Shared/VisibleContentRectUpdateInfo.cpp:
1114         (WebKit::VisibleContentRectUpdateInfo::encode const):
1115         (WebKit::VisibleContentRectUpdateInfo::decode):
1116         (WebKit::operator<<):
1117         * Shared/VisibleContentRectUpdateInfo.h:
1118         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
1119         (WebKit::VisibleContentRectUpdateInfo::contentInsets const):
1120         (WebKit::operator==):
1121         * UIProcess/API/Cocoa/WKWebView.mm:
1122         (-[WKWebView _computedObscuredInset]):
1123         (-[WKWebView _computedContentInset]):
1124         (-[WKWebView _computedUnobscuredSafeAreaInset]):
1125
1126         We don't care about source compatibility with iOS 10 and below anymore, so we should change these >= iOS 11
1127         target checks to simply `PLATFORM(IOS)`.
1128
1129         (-[WKWebView _updateVisibleContentRects]):
1130
1131         Compute the visible content insets on all sides of the unobscured content rect. These insets are scaled to
1132         content coordinates.
1133
1134         * UIProcess/ios/WKContentView.h:
1135         * UIProcess/ios/WKContentView.mm:
1136         (floatBoxExtent):
1137
1138         Add a helper to convert `UIEdgeInsets` to `WebCore::FloatBoxExtent`, and use it in a few places below.
1139
1140         (-[WKContentView didUpdateVisibleRect:unobscuredRect:contentInsets:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
1141         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]): Deleted.
1142         * WebProcess/WebPage/ios/WebPageIOS.mm:
1143         (WebKit::WebPage::updateVisibleContentRects):
1144
1145         Update the Page's content insets.
1146
1147 2019-01-17  Truitt Savell  <tsavell@apple.com>
1148
1149         Unreviewed, rolling out r240124.
1150
1151         This commit broke an internal build.
1152
1153         Reverted changeset:
1154
1155         "SDK_VARIANT build destinations should be separate from non-
1156         SDK_VARIANT builds"
1157         https://bugs.webkit.org/show_bug.cgi?id=189553
1158         https://trac.webkit.org/changeset/240124
1159
1160 2019-01-17  John Wilander  <wilander@apple.com>
1161
1162         Add infrastructure to enable/disable ITP Debug Mode through Preferences
1163         https://bugs.webkit.org/show_bug.cgi?id=193510
1164         <rdar://problem/47330969>
1165
1166         Reviewed by Dean Jackson.
1167
1168         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
1169         (WebKit::ResourceLoadStatisticsMemoryStore::ensurePrevalentResourcesForDebugMode):
1170         (WebKit::ResourceLoadStatisticsMemoryStore::setResourceLoadStatisticsDebugMode):
1171         (WebKit::ResourceLoadStatisticsMemoryStore::setPrevalentResourceForDebugMode):
1172             These functions are now suited for runtime switching of ITP Debug Mode.
1173         * Shared/WebPreferences.yaml:
1174             Changed name from ResourceLoadStatisticsDebugMode to ItpDebugModeEnabled.
1175         * UIProcess/API/Cocoa/WKPreferences.mm:
1176         (-[WKPreferences _setItpDebugModeEnabled:]):
1177         (-[WKPreferences _itpDebugModeEnabled]):
1178             New private preferences functions.
1179         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1180         * UIProcess/Cocoa/ResourceLoadStatisticsMemoryStoreCocoa.mm:
1181         (WebKit::ResourceLoadStatisticsMemoryStore::registerUserDefaultsIfNeeded):
1182             Removed support for old experimental user default. Added a new one that's
1183             not connected to any UI, i.e. merely for command line debugging where
1184             ITP Debug Mode needs to be on all the time.
1185
1186 2019-01-17  Tim Horton  <timothy_horton@apple.com>
1187
1188         Adopt NSTextCheckingSuppressInitialCapitalizationKey
1189         https://bugs.webkit.org/show_bug.cgi?id=193545
1190
1191         Reviewed by Dean Jackson.
1192
1193         * UIProcess/mac/TextCheckerMac.mm:
1194         (WebKit::TextChecker::checkTextOfParagraph):
1195         (WebKit::TextChecker::getGuessesForWord):
1196
1197 2019-01-17  Jer Noble  <jer.noble@apple.com>
1198
1199         SDK_VARIANT build destinations should be separate from non-SDK_VARIANT builds
1200         https://bugs.webkit.org/show_bug.cgi?id=189553
1201
1202         Reviewed by Tim Horton.
1203
1204         * Configurations/Base.xcconfig:
1205         * Configurations/BaseTarget.xcconfig:
1206         * Configurations/SDKVariant.xcconfig: Added.
1207
1208 2019-01-16  Dean Jackson  <dino@apple.com>
1209
1210         (iPad) Link tapping is sluggish on many sites
1211         https://bugs.webkit.org/show_bug.cgi?id=193522
1212         <rdar://problem/47102987>
1213
1214         Reviewed by Wenson Hsieh.
1215
1216         Some WKWebView clients might set the initial zoom scale of the page to
1217         something other than 1, which disables the "fast tap" behaviour.
1218         The fix is very simple -- just check against the initial scale rather
1219         than 1.
1220
1221         The most likely regression from this would be pages designed for desktop,
1222         but provide a viewport tag saying width=device-width and initial-scale.
1223         They might stop allowing double-tap-to-zoom.
1224
1225         * UIProcess/API/Cocoa/WKWebView.mm:
1226         (-[WKWebView _allowsDoubleTapGestures]): Check against initial page scale.
1227
1228 2019-01-17  Alex Christensen  <achristensen@webkit.org>
1229
1230         Stop using NetworkStorageSession::storageSession in WebCore
1231         https://bugs.webkit.org/show_bug.cgi?id=193529
1232
1233         Reviewed by Tim Horton.
1234
1235         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1236         (WebKit::NetworkConnectionToWebProcess::createSocketStream):
1237         * NetworkProcess/NetworkProcess.h:
1238         * NetworkProcess/NetworkSocketStream.cpp:
1239         (WebKit::NetworkSocketStream::create):
1240         (WebKit::NetworkSocketStream::NetworkSocketStream):
1241         * NetworkProcess/NetworkSocketStream.h:
1242         * NetworkProcess/NetworkStorageSessionProvider.h: Added.
1243         * WebKit.xcodeproj/project.pbxproj:
1244         * WebProcess/Network/WebSocketProvider.cpp:
1245         (WebKit::WebSocketProvider::createSocketStreamHandle):
1246         * WebProcess/Network/WebSocketProvider.h:
1247         * WebProcess/WebPage/WebCookieJar.cpp:
1248         (WebKit::WebCookieJar::WebCookieJar):
1249         * WebProcess/WebPage/WebCookieJar.h:
1250
1251 2019-01-16  Youenn Fablet  <youenn@apple.com>
1252
1253         Add a new SPI for controlling getUserMedia
1254         https://bugs.webkit.org/show_bug.cgi?id=192793
1255
1256         Reviewed by Eric Carlson.
1257
1258         Some weaknesses of the current getUserMedia/enumerateDevices SPI were found.
1259         In particular:
1260         - The hash salt should be handled by WebKit not by apps using WebKit.
1261         - No need to expose the frame URL, only the top level origin is needed.
1262         - The names of the callback are changed to improve the intent of these callbacks.
1263         Addressed these by creating a new SPI which will replace the current one.
1264         The current SPI will be removed later on.
1265
1266         Did some refactoring by making the callbacks not return false.
1267         Instead, implement the default behavior inside the request objects as deny methods.
1268         Some further refactoring will be done as a follow-up to better align the C API with the Cocoa API.
1269
1270         * UIProcess/API/APIUIClient.h:
1271         (API::UIClient::decidePolicyForUserMediaPermissionRequest):
1272         (API::UIClient::checkUserMediaPermissionForOrigin):
1273         * UIProcess/API/C/WKPage.cpp:
1274         (WKPageSetPageUIClient):
1275         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1276         * UIProcess/API/Cocoa/WKWebView.mm:
1277         (-[WKWebView _mediaCaptureState]):
1278         (-[WKWebView _setMediaCaptureMuted:]):
1279         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1280         * UIProcess/API/glib/WebKitUIClient.cpp:
1281         * UIProcess/Cocoa/MediaCaptureUtilities.h: Added.
1282         * UIProcess/Cocoa/MediaCaptureUtilities.mm: Added.
1283         * UIProcess/Cocoa/UIDelegate.h:
1284         * UIProcess/Cocoa/UIDelegate.mm:
1285         (WebKit::UIDelegate::setDelegate):
1286         (WebKit::requestUserMediaAuthorizationForFrame):
1287         (WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest):
1288         (WebKit::UIDelegate::UIClient::checkUserMediaPermissionForOrigin):
1289         (WebKit::UIDelegate::UIClient::mediaCaptureStateDidChange):
1290         * UIProcess/UserMediaPermissionCheckProxy.h:
1291         (WebKit::UserMediaPermissionCheckProxy::deny):
1292         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
1293         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
1294         (WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo):
1295         * UIProcess/UserMediaPermissionRequestProxy.h:
1296
1297 2019-01-16  Youenn Fablet  <youenn@apple.com>
1298
1299         Pipe cache quota request from Network Process to UIProcess
1300         https://bugs.webkit.org/show_bug.cgi?id=193296
1301
1302         Reviewed by Alex Christensen.
1303
1304         When cache storage hits quota for a given origin, pipe the request back to NetworkProcess.
1305         No record will be put until the quota request is answered.
1306         The request is sent from CacheStorage::Caches to CacheStorage::Engine and to NetworkProcess.
1307         NetworkProcess then sends it to NetworkProcessProxy.
1308         Currently NetworkProcessProxy just answers by keeping the quota as it is.
1309         In the future, NetworkProcessProxy should make a delegate call to let the app using WebKit
1310         make a decision on the quota. This will allow prompting user to bump it as done for other data.
1311
1312         * NetworkProcess/NetworkProcess.cpp:
1313         (WebKit::NetworkProcess::requestCacheStorageSpace):
1314         * NetworkProcess/NetworkProcess.h:
1315         * NetworkProcess/cache/CacheStorageEngine.cpp:
1316         (WebKit::CacheStorage::Engine::~Engine):
1317         (WebKit::CacheStorage::Engine::from):
1318         (WebKit::CacheStorage::Engine::Engine):
1319         (WebKit::CacheStorage::Engine::requestSpace):
1320         (WebKit::CacheStorage::Engine::requestSpaceCompleted):
1321         * NetworkProcess/cache/CacheStorageEngine.h:
1322         * NetworkProcess/cache/CacheStorageEngineCache.cpp:
1323         (WebKit::CacheStorage::Cache::put):
1324         (WebKit::CacheStorage::Cache::retryPuttingPendingRecords):
1325         * NetworkProcess/cache/CacheStorageEngineCache.h:
1326         * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
1327         (WebKit::CacheStorage::Caches::requestSpace):
1328         (WebKit::CacheStorage::Caches::notifyCachesOfRequestSpaceEnd):
1329         * NetworkProcess/cache/CacheStorageEngineCaches.h:
1330         (WebKit::CacheStorage::Caches::isRequestingSpace const):
1331         * UIProcess/Network/NetworkProcessProxy.cpp:
1332         (WebKit::NetworkProcessProxy::requestCacheStorageSpace):
1333         * UIProcess/Network/NetworkProcessProxy.h:
1334         * UIProcess/Network/NetworkProcessProxy.messages.in:
1335
1336 2019-01-16  Alex Christensen  <achristensen@webkit.org>
1337
1338         sendBeacon to previously-unvisited https domain always fails
1339         https://bugs.webkit.org/show_bug.cgi?id=193508
1340
1341         Reviewed by Geoffrey Garen.
1342
1343         * NetworkProcess/PingLoad.cpp:
1344         (WebKit::PingLoad::didReceiveChallenge):
1345         If a ping load is doing a TLS handshake, continue if the server has good certificates.
1346
1347 2019-01-16  Youenn Fablet  <youenn@apple.com>
1348
1349         ASSERTION FAILED: m_networkLoadInformationByID.contains(identifier) in WebKit::NetworkConnectionToWebProcess::addNetworkLoadInformationMetrics
1350         https://bugs.webkit.org/show_bug.cgi?id=189097
1351         <rdar://problem/43856423>
1352
1353         Reviewed by Alex Christensen.
1354
1355         In case where the inspector is launched, it will instruct the NetworkConnectionToWebProcess to start capturing network metrics.
1356         If this happens in the middle of a load, addNetworkLoadInformationMetrics might fail since addNetworkLoadInformation will not be called.
1357         To fix this issue, store whether to capture metrics at NetworkResourceLoader level.
1358
1359         To ensure that the case of switching back and forth capture of metrics, disable loader capture of metrics whenver NetworkConnectionToWebProcess is asked to.
1360
1361         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1362         (WebKit::NetworkConnectionToWebProcess::setCaptureExtraNetworkLoadMetricsEnabled):
1363         * NetworkProcess/NetworkConnectionToWebProcess.h:
1364         (WebKit::NetworkConnectionToWebProcess::addNetworkLoadInformationMetrics):
1365         * NetworkProcess/NetworkResourceLoader.cpp:
1366         (WebKit::m_shouldCaptureExtraNetworkLoadMetrics):
1367         (WebKit::NetworkResourceLoader::shouldCaptureExtraNetworkLoadMetrics const):
1368         * NetworkProcess/NetworkResourceLoader.h:
1369
1370 2019-01-16  Alex Christensen  <achristensen@webkit.org>
1371
1372         Revert r239938
1373         https://bugs.webkit.org/show_bug.cgi?id=193267
1374         <rdar://problem/47297304>
1375
1376         * Configurations/WebContent-iOS.entitlements:
1377
1378 2019-01-16  Chris Dumez  <cdumez@apple.com>
1379
1380         Regression(r240046) Several API tests are crashing
1381         https://bugs.webkit.org/show_bug.cgi?id=193509
1382
1383         Reviewed by Geoffrey Garen.
1384
1385         The crashes would happen because loadRequestShared() would take a WebProcessProxy& in parameter but
1386         then call reattachToWebProcess() if the page is not valid, which would replace m_process and invalidate
1387         our process reference.
1388
1389         To address the issue, move the reattachToWebProcess() call to loadRequest(), before calling
1390         loadRequestShared(). Also, update *Shared() methods to take a Ref<WebProcessProxy>&& instead
1391         of a WebProcessProxy& in parameter. Since we call client delegates, we need to make sure
1392         our process stays alive.
1393
1394         * UIProcess/ProvisionalPageProxy.cpp:
1395         (WebKit::ProvisionalPageProxy::loadData):
1396         (WebKit::ProvisionalPageProxy::loadRequest):
1397         (WebKit::ProvisionalPageProxy::didCreateMainFrame):
1398         (WebKit::ProvisionalPageProxy::didPerformClientRedirect):
1399         (WebKit::ProvisionalPageProxy::didStartProvisionalLoadForFrame):
1400         (WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame):
1401         (WebKit::ProvisionalPageProxy::didNavigateWithNavigationData):
1402         (WebKit::ProvisionalPageProxy::didChangeProvisionalURLForFrame):
1403         (WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionAsync):
1404         (WebKit::ProvisionalPageProxy::decidePolicyForResponse):
1405         (WebKit::ProvisionalPageProxy::startURLSchemeTask):
1406         (WebKit::ProvisionalPageProxy::backForwardGoToItem):
1407         * UIProcess/WebPageProxy.cpp:
1408         (WebKit::WebPageProxy::loadRequest):
1409         (WebKit::WebPageProxy::loadRequestWithNavigationShared):
1410         (WebKit::WebPageProxy::loadData):
1411         (WebKit::WebPageProxy::loadDataWithNavigationShared):
1412         (WebKit::WebPageProxy::didPerformDragControllerAction):
1413         (WebKit::WebPageProxy::findPlugin):
1414         (WebKit::WebPageProxy::didCreateMainFrame):
1415         (WebKit::WebPageProxy::didCreateSubframe):
1416         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
1417         (WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
1418         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
1419         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared):
1420         (WebKit::WebPageProxy::willPerformClientRedirectForFrame):
1421         (WebKit::WebPageProxy::didCancelClientRedirectForFrame):
1422         (WebKit::WebPageProxy::didChangeProvisionalURLForFrame):
1423         (WebKit::WebPageProxy::didChangeProvisionalURLForFrameShared):
1424         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
1425         (WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
1426         (WebKit::WebPageProxy::didCommitLoadForFrame):
1427         (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
1428         (WebKit::WebPageProxy::didFinishLoadForFrame):
1429         (WebKit::WebPageProxy::didFailLoadForFrame):
1430         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
1431         (WebKit::WebPageProxy::didReceiveTitleForFrame):
1432         (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
1433         (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
1434         (WebKit::WebPageProxy::didRunInsecureContentForFrame):
1435         (WebKit::WebPageProxy::frameDidBecomeFrameSet):
1436         (WebKit::WebPageProxy::decidePolicyForNavigationActionAsync):
1437         (WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared):
1438         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1439         (WebKit::WebPageProxy::decidePolicyForNavigationActionSync):
1440         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
1441         (WebKit::WebPageProxy::decidePolicyForResponse):
1442         (WebKit::WebPageProxy::decidePolicyForResponseShared):
1443         (WebKit::WebPageProxy::unableToImplementPolicy):
1444         (WebKit::WebPageProxy::willSubmitForm):
1445         (WebKit::WebPageProxy::didNavigateWithNavigationData):
1446         (WebKit::WebPageProxy::didNavigateWithNavigationDataShared):
1447         (WebKit::WebPageProxy::didPerformClientRedirect):
1448         (WebKit::WebPageProxy::didPerformClientRedirectShared):
1449         (WebKit::WebPageProxy::didPerformServerRedirect):
1450         (WebKit::WebPageProxy::didUpdateHistoryTitle):
1451         (WebKit::WebPageProxy::createNewPage):
1452         (WebKit::WebPageProxy::runJavaScriptAlert):
1453         (WebKit::WebPageProxy::runJavaScriptConfirm):
1454         (WebKit::WebPageProxy::runJavaScriptPrompt):
1455         (WebKit::WebPageProxy::unavailablePluginButtonClicked):
1456         (WebKit::WebPageProxy::runBeforeUnloadConfirmPanel):
1457         (WebKit::WebPageProxy::runOpenPanel):
1458         (WebKit::WebPageProxy::printFrame):
1459         (WebKit::WebPageProxy::backForwardGoToItem):
1460         (WebKit::WebPageProxy::backForwardGoToItemShared):
1461         (WebKit::WebPageProxy::learnWord):
1462         (WebKit::WebPageProxy::ignoreWord):
1463         (WebKit::WebPageProxy::didReceiveEvent):
1464         (WebKit::WebPageProxy::editingRangeCallback):
1465         (WebKit::WebPageProxy::rectForCharacterRangeCallback):
1466         (WebKit::WebPageProxy::focusedFrameChanged):
1467         (WebKit::WebPageProxy::frameSetLargestFrameChanged):
1468         (WebKit::WebPageProxy::exceededDatabaseQuota):
1469         (WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
1470         (WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
1471         (WebKit::WebPageProxy::enumerateMediaDevicesForFrame):
1472         (WebKit::WebPageProxy::startURLSchemeTask):
1473         (WebKit::WebPageProxy::startURLSchemeTaskShared):
1474         (WebKit::WebPageProxy::stopURLSchemeTask):
1475         (WebKit::WebPageProxy::loadSynchronousURLSchemeTask):
1476         * UIProcess/WebPageProxy.h:
1477
1478 2019-01-16  Chris Dumez  <cdumez@apple.com>
1479
1480         Regression(PSON) View becomes blank after click a cross-site download link
1481         https://bugs.webkit.org/show_bug.cgi?id=193361
1482         <rdar://problem/47099573>
1483
1484         Reviewed by Geoffrey Garen.
1485
1486         The issue tracked by rdar://problem/47099573 is that a provisional load may get
1487         canceled (or converted into a download) *after* we've decided to process-swap.
1488         In such cases, the view should keep displaying the current site and it should
1489         still be interactive. However, with the previous PSON model, the view (pageProxy)
1490         would have already swapped to the new process and would end up displaying the
1491         initially empty document.
1492
1493         To address the issue, this patch introduces the concept of a provisional load
1494         in the UIProcess, handled by a ProvisionalPageProxy which has its own privisional
1495         process. The WebPageProxy owns the ProvisionalPageProxy but we do not commit the
1496         provisional page until after the load was committed in the new process. This means
1497         that the view / WebPageProxy keeps using the old process and displays the current
1498         content until a load has committed in the provisional page. If no load commits
1499         in the provisional process (e.g. because the load is cancelled or converted into
1500         a download), then we merely destroy the ProvisionalPageProxy and terminate its
1501         process, without impacting the WebPageProxy.
1502
1503         * Shared/WebPageCreationParameters.cpp:
1504         (WebKit::WebPageCreationParameters::encode const):
1505         (WebKit::WebPageCreationParameters::decode):
1506         * Shared/WebPageCreationParameters.h:
1507         Rename isSwapFromSuspended to isProcessSwap for clarity as we always want to
1508         delay attaching the drawing area in case of a process-swap, no matter what
1509         now that the previous process is kept alive until the provisional load is
1510         committed in the new process.
1511
1512         * Shared/WebPolicyAction.h:
1513         Drop Suspend policy action. At decidePolicyForNavigationAction time, in case of
1514         process-swap, we now tell the previous process to simply ignore the load, while
1515         we create a ProvisionalPageProxy to do the new load in a new process.
1516         Suspension of the previous page in the old process, happens later, when a load
1517         is actually committed in the new process.
1518
1519         * Sources.txt:
1520         Add new ProvisionalPageProxy file.
1521
1522         * UIProcess/API/Cocoa/WKWebView.mm:
1523         (-[WKWebView _killWebContentProcessAndResetState]):
1524         When calling _killWebContentProcessAndResetState on a WKWebView, kill both the current
1525         process and the provisional one, to maintain previous behavior in our API tests.
1526
1527         * UIProcess/API/gtk/PageClientImpl.cpp:
1528         (WebKit::PageClientImpl::createDrawingAreaProxy):
1529         * UIProcess/API/gtk/PageClientImpl.h:
1530         * UIProcess/API/wpe/PageClientImpl.cpp:
1531         (WebKit::PageClientImpl::createDrawingAreaProxy):
1532         * UIProcess/API/wpe/PageClientImpl.h:
1533         * UIProcess/AcceleratedDrawingAreaProxy.cpp:
1534         (WebKit::AcceleratedDrawingAreaProxy::AcceleratedDrawingAreaProxy):
1535         (WebKit::AcceleratedDrawingAreaProxy::didUpdateBackingStoreState):
1536         (WebKit::AcceleratedDrawingAreaProxy::sendUpdateBackingStoreState):
1537         (WebKit::AcceleratedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState):
1538         (WebKit::AcceleratedDrawingAreaProxy::setNativeSurfaceHandleForCompositing):
1539         (WebKit::AcceleratedDrawingAreaProxy::destroyNativeSurfaceHandleForCompositing):
1540         * UIProcess/AcceleratedDrawingAreaProxy.h:
1541         * UIProcess/Cocoa/WebViewImpl.h:
1542         * UIProcess/Cocoa/WebViewImpl.mm:
1543         (WebKit::WebViewImpl::createDrawingAreaProxy):
1544         * UIProcess/DrawingAreaProxy.cpp:
1545         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
1546         (WebKit::DrawingAreaProxy::~DrawingAreaProxy):
1547         (WebKit::DrawingAreaProxy::viewExposedRectChangedTimerFired):
1548         * UIProcess/DrawingAreaProxy.h:
1549         (WebKit::DrawingAreaProxy::process):
1550         * UIProcess/DrawingAreaProxyImpl.cpp:
1551         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
1552         (WebKit::DrawingAreaProxyImpl::update):
1553         * UIProcess/DrawingAreaProxyImpl.h:
1554         * UIProcess/PageClient.h:
1555         * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
1556         * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
1557         (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
1558         (WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
1559         (WebKit::RemoteLayerTreeDrawingAreaProxy::deviceScaleFactorDidChange):
1560         (WebKit::RemoteLayerTreeDrawingAreaProxy::sendUpdateGeometry):
1561         (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart):
1562         (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidEnd):
1563         (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
1564         (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateActivityState):
1565         (WebKit::RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing):
1566         * UIProcess/ios/PageClientImplIOS.h:
1567         * UIProcess/ios/PageClientImplIOS.mm:
1568         (WebKit::PageClientImpl::createDrawingAreaProxy):
1569         * UIProcess/ios/WKContentView.h:
1570         * UIProcess/ios/WKContentView.mm:
1571         (-[WKContentView _createDrawingAreaProxy:]):
1572         * UIProcess/mac/PageClientImplMac.h:
1573         * UIProcess/mac/PageClientImplMac.mm:
1574         (WebKit::PageClientImpl::createDrawingAreaProxy):
1575         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
1576         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
1577         (WebKit::TiledCoreAnimationDrawingAreaProxy::TiledCoreAnimationDrawingAreaProxy):
1578         (WebKit::TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange):
1579         (WebKit::TiledCoreAnimationDrawingAreaProxy::colorSpaceDidChange):
1580         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateActivityState):
1581         (WebKit::TiledCoreAnimationDrawingAreaProxy::createFence):
1582         (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
1583         (WebKit::TiledCoreAnimationDrawingAreaProxy::adjustTransientZoom):
1584         (WebKit::TiledCoreAnimationDrawingAreaProxy::commitTransientZoom):
1585         (WebKit::TiledCoreAnimationDrawingAreaProxy::dispatchAfterEnsuringDrawing):
1586         * UIProcess/mac/WebPageProxyMac.mm:
1587         * UIProcess/win/PageClientImpl.cpp:
1588         (WebKit::PageClientImpl::createDrawingAreaProxy):
1589         * UIProcess/win/PageClientImpl.h:
1590         * UIProcess/win/PageClientImpl.cpp:
1591         (WebKit::PageClientImpl::createDrawingAreaProxy):
1592         * UIProcess/win/PageClientImpl.h:
1593         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1594         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
1595         Pass the drawing area's associated process when constructing it and store it as a member
1596         in addition to the page. This is necessary now that a page can be associated with 2
1597         WebProcesses at a time, each having its own drawing area.
1598
1599         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
1600         (WebKit::WebPageProxy::createSandboxExtensionsIfNeeded):
1601         Pass the process.
1602
1603         * UIProcess/ProvisionalPageProxy.cpp: Added.
1604         (WebKit::ProvisionalPageProxy::ProvisionalPageProxy):
1605         (WebKit::ProvisionalPageProxy::~ProvisionalPageProxy):
1606         (WebKit::ProvisionalPageProxy::processDidTerminate):
1607         (WebKit::ProvisionalPageProxy::takeDrawingArea):
1608         (WebKit::ProvisionalPageProxy::cancel):
1609         (WebKit::ProvisionalPageProxy::processDidFinishLaunching):
1610         (WebKit::ProvisionalPageProxy::finishInitializingWebPageAfterProcessLaunch):
1611         (WebKit::ProvisionalPageProxy::initializeWebPage):
1612         (WebKit::ProvisionalPageProxy::loadData):
1613         (WebKit::ProvisionalPageProxy::loadRequest):
1614         (WebKit::ProvisionalPageProxy::goToBackForwardItem):
1615         (WebKit::ProvisionalPageProxy::didCreateMainFrame):
1616         (WebKit::ProvisionalPageProxy::didPerformClientRedirect):
1617         (WebKit::ProvisionalPageProxy::didStartProvisionalLoadForFrame):
1618         (WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame):
1619         (WebKit::ProvisionalPageProxy::didCommitLoadForFrame):
1620         (WebKit::ProvisionalPageProxy::didNavigateWithNavigationData):
1621         (WebKit::ProvisionalPageProxy::didChangeProvisionalURLForFrame):
1622         (WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionAsync):
1623         (WebKit::ProvisionalPageProxy::decidePolicyForResponse):
1624         (WebKit::ProvisionalPageProxy::startURLSchemeTask):
1625         (WebKit::ProvisionalPageProxy::backForwardGoToItem):
1626         (WebKit::ProvisionalPageProxy::didReceiveMessage):
1627         (WebKit::ProvisionalPageProxy::didReceiveSyncMessage):
1628         * UIProcess/ProvisionalPageProxy.h: Added.
1629         (WebKit::ProvisionalPageProxy::page):
1630         (WebKit::ProvisionalPageProxy::mainFrame const):
1631         (WebKit::ProvisionalPageProxy::process):
1632         (WebKit::ProvisionalPageProxy::processSwapRequestedByClient const):
1633         (WebKit::ProvisionalPageProxy::navigationID const):
1634         (WebKit::ProvisionalPageProxy::drawingArea const):
1635         New WebPageProxy-like class which is owned by the WebPageProxy and proxies IPC from
1636         the provisional process.
1637
1638         * UIProcess/SuspendedPageProxy.cpp:
1639         (WebKit::SuspendedPageProxy::~SuspendedPageProxy):
1640         (WebKit::SuspendedPageProxy::unsuspend):
1641         (WebKit::SuspendedPageProxy::didProcessRequestToSuspend):
1642         Unregister the SuspendedPageProxy as an IPC message receiver a little bit earlier
1643         when we're going to unsuspend it. This avoids conflicting with the ProvisionalPageProxy
1644         which tries to register itself as an IPC message receiver for the same pageID when
1645         a process-swap occurs and we're switching to a suspended page.
1646
1647         * UIProcess/WebFrameProxy.cpp:
1648         (WebKit::WebFrameProxy::isMainFrame const):
1649         WebFrameProxy::isMainFrame() relies on checking that the frame is the WebPageProxy's m_mainFrame.
1650         Now that the WebPageProxy can have a ProvisionalPageProxy, also check if it is the ProvisionalPageProxy's
1651         m_mainFrame to maintain previous behavior.
1652
1653         * UIProcess/WebPageProxy.cpp:
1654         (WebKit::WebPageProxy::provisionalDrawingArea const):
1655         Add getter for the provisional drawing area. We normally only deal with the page's current drawing area, but
1656         the ViewGestureController needs access to the provisional once to display the swipe gesture snapshot.
1657
1658         (WebKit::WebPageProxy::swapToWebProcess):
1659         swapToWebProcess() no longer takes care of unsuspending the SuspendedPage because we now call swapToWebProcess()
1660         later, when a load is actually committed in the provisional page / process. swapToWebProcess() now also needs
1661         to initialize some data members such as the drawing area and the main frame as it is transferring them over from
1662         the ProvisionalPageProxy which started the provisional load.
1663
1664         (WebKit::WebPageProxy::finishAttachingToWebProcess):
1665         We no longer need IsSwapFromSuspended parameter as this is called later now, after a load has actually been
1666         committed in the provisional process.
1667
1668         (WebKit::WebPageProxy::setDrawingArea):
1669         (WebKit::WebPageProxy::initializeWebPage):
1670         - We no longer need IsSwapFromSuspended parameter as this is called later now, after a load has actually been
1671           committed in the provisional process.
1672         - Factor some code out to WebPageProxy::setDrawingArea() so that it can be shared with swapToWebProcess().
1673
1674         (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
1675         (WebKit::WebPageProxy::loadRequest):
1676         (WebKit::WebPageProxy::loadRequestWithNavigationShared):
1677         Only call setPendingAPIRequestURL() in loadRequestWithNavigation() only if ShouldTreatAsContinuingLoad is not
1678         Yes. This avoids hitting some assertions as this was already called during the first API call if needed.
1679
1680         (WebKit::WebPageProxy::loadData):
1681         (WebKit::WebPageProxy::loadDataWithNavigationShared):
1682         (WebKit::WebPageProxy::stopLoading):
1683         (WebKit::WebPageProxy::reload):
1684         (WebKit::WebPageProxy::didPerformDragControllerAction):
1685         (WebKit::WebPageProxy::findPlugin):
1686         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
1687         In case of process swap, tell the previous process to ignore the load instead of suspending it right away.
1688         Suspension now happens later, only if we end up committing the provisional load in the new process.
1689         Also discard the SuspendedPage if it failed to suspend (we only reuse its process in this case). This used
1690         to happen a bit later but it is clearer if we do this as early as possible I think.
1691
1692         (WebKit::WebPageProxy::commitProvisionalPage):
1693         When the load is committed in the new process, we call WebPageProxy::commitProvisionalPage(). It takes care of:
1694         - Actually swapping the WebPageProxy to the new process by calling processDidTerminate() / swapToWebProcess().
1695         - Suspending the current page.
1696         - Letting the client know the load is comitted
1697         - Destroy the ProvisionalPageProxy.
1698         This work used to happen earlier in continueNavigationInNewProcess().
1699
1700         (WebKit::WebPageProxy::continueNavigationInNewProcess):
1701         Moved some of the logic to commitProvisionalPage(). We now merely start the load in a new ProvisionalPageProxy,
1702         without actually having the WebPageProxy switch to the new process yet.
1703
1704         (WebKit::WebPageProxy::didCreateMainFrame):
1705         (WebKit::WebPageProxy::didCreateSubframe):
1706         (WebKit::WebPageProxy::didCreateWindow):
1707         Drop some code that is no longer needed, now that the ProvisionalPageProxy takes care of this.
1708
1709         (WebKit::WebPageProxy::didDestroyNavigation):
1710         On process-swap, when telling the previous process to ignore the load and starting the new load in a new
1711         ProvisionalPageProxy, the previous WebPage attempts to destroy the navigation. In this case, we ignore
1712         the call since the navigation is merely taken over by the ProvisionalPageProxy.
1713
1714         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
1715         (WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
1716         Moved some PSON logic to the ProvisionalPageProxy instead.
1717
1718         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
1719         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared):
1720         (WebKit::WebPageProxy::willPerformClientRedirectForFrame):
1721         (WebKit::WebPageProxy::didCancelClientRedirectForFrame):
1722         (WebKit::WebPageProxy::didChangeProvisionalURLForFrame):
1723         (WebKit::WebPageProxy::didChangeProvisionalURLForFrameShared):
1724
1725         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
1726         (WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
1727         When didFailProvisionalLoadForFrame() is called for a ProvisionalPageProxy, destroy it.
1728
1729         (WebKit::WebPageProxy::didCommitLoadForFrame):
1730         (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
1731         (WebKit::WebPageProxy::didFinishLoadForFrame):
1732         (WebKit::WebPageProxy::didFailLoadForFrame):
1733         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
1734         (WebKit::WebPageProxy::didReceiveTitleForFrame):
1735         (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
1736         (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
1737         (WebKit::WebPageProxy::didRunInsecureContentForFrame):
1738         (WebKit::WebPageProxy::frameDidBecomeFrameSet):
1739         (WebKit::WebPageProxy::decidePolicyForNavigationActionAsync):
1740         (WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared):
1741         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1742         (WebKit::WebPageProxy::decidePolicyForNavigationActionSync):
1743         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
1744         (WebKit::WebPageProxy::decidePolicyForResponse):
1745         (WebKit::WebPageProxy::decidePolicyForResponseShared):
1746         (WebKit::WebPageProxy::unableToImplementPolicy):
1747         (WebKit::WebPageProxy::willSubmitForm):
1748         (WebKit::WebPageProxy::didNavigateWithNavigationData):
1749         (WebKit::WebPageProxy::didNavigateWithNavigationDataShared):
1750         (WebKit::WebPageProxy::didPerformClientRedirect):
1751         (WebKit::WebPageProxy::didPerformClientRedirectShared):
1752         (WebKit::WebPageProxy::didPerformServerRedirect):
1753         (WebKit::WebPageProxy::didUpdateHistoryTitle):
1754         (WebKit::WebPageProxy::createNewPage):
1755         (WebKit::WebPageProxy::runJavaScriptAlert):
1756         (WebKit::WebPageProxy::runJavaScriptConfirm):
1757         (WebKit::WebPageProxy::runJavaScriptPrompt):
1758         (WebKit::WebPageProxy::unavailablePluginButtonClicked):
1759         (WebKit::WebPageProxy::runBeforeUnloadConfirmPanel):
1760         (WebKit::WebPageProxy::runOpenPanel):
1761         (WebKit::WebPageProxy::printFrame):
1762         (WebKit::WebPageProxy::backForwardGoToItem):
1763         (WebKit::WebPageProxy::backForwardGoToItemShared):
1764         (WebKit::WebPageProxy::learnWord):
1765         (WebKit::WebPageProxy::ignoreWord):
1766         (WebKit::WebPageProxy::didReceiveEvent):
1767         (WebKit::WebPageProxy::editingRangeCallback):
1768         (WebKit::WebPageProxy::rectForCharacterRangeCallback):
1769         (WebKit::WebPageProxy::focusedFrameChanged):
1770         (WebKit::WebPageProxy::frameSetLargestFrameChanged):
1771
1772         (WebKit::WebPageProxy::provisionalProcessDidTerminate):
1773         Cancel the provisiona load and destroy the ProvisionalPageProxy if
1774         the provisional process crashes.
1775
1776         (WebKit::WebPageProxy::resetState):
1777         Drop some code that is no longer needed.
1778
1779         (WebKit::WebPageProxy::creationParameters):
1780         - Move the hasRegisteredServiceWorkers flag initialization from the call site to here now that we have
1781         more than one call site. This was just some bad factoring.
1782         - Take the process in parameter now that we page can be associated with several processes at a time.
1783
1784         (WebKit::WebPageProxy::exceededDatabaseQuota):
1785         (WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
1786         (WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
1787         (WebKit::WebPageProxy::enumerateMediaDevicesForFrame):
1788         (WebKit::WebPageProxy::startURLSchemeTask):
1789         (WebKit::WebPageProxy::startURLSchemeTaskShared):
1790         (WebKit::WebPageProxy::stopURLSchemeTask):
1791         (WebKit::WebPageProxy::loadSynchronousURLSchemeTask):
1792         (WebKit::WebPageProxy::checkURLReceivedFromCurrentOrPreviousWebProcess):
1793         (WebKit::WebPageProxy::willAcquireUniversalFileReadSandboxExtension):
1794         * UIProcess/WebPageProxy.h:
1795         (WebKit::WebPageProxy::visitedLinkStore):
1796         (WebKit::WebPageProxy::provisionalPageProxy const):
1797
1798         * UIProcess/WebProcessProxy.cpp:
1799         (WebKit::WebProcessProxy::hasProvisionalPageWithID const):
1800         (WebKit::WebProcessProxy::updateBackForwardItem):
1801         (WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch):
1802         (WebKit::WebProcessProxy::didFinishLaunching):
1803         (WebKit::WebProcessProxy::canTerminateChildProcess):
1804         * UIProcess/WebProcessProxy.h:
1805         (WebKit::WebProcessProxy::addProvisionalPageProxy):
1806         (WebKit::WebProcessProxy::removeProvisionalPageProxy):
1807         Before updating a BackForwardListItem, we normally make sure the process has a WebPageProxy with the
1808         item's pageID. We have to tweak the logic because there may now be no WebPageProxy with this pageID
1809         associated with this process yet, because it is still a ProvisionalPageProxy.        
1810
1811         * UIProcess/WebURLSchemeHandler.cpp:
1812         (WebKit::WebURLSchemeHandler::startTask):
1813         * UIProcess/WebURLSchemeHandler.h:
1814         * UIProcess/WebURLSchemeTask.cpp:
1815         (WebKit::WebURLSchemeTask::create):
1816         (WebKit::WebURLSchemeTask::WebURLSchemeTask):
1817         (WebKit::WebURLSchemeTask::didPerformRedirection):
1818         (WebKit::WebURLSchemeTask::didReceiveResponse):
1819         (WebKit::WebURLSchemeTask::didReceiveData):
1820         (WebKit::WebURLSchemeTask::didComplete):
1821         (WebKit::WebURLSchemeTask::pageDestroyed):
1822         * UIProcess/WebURLSchemeTask.h:
1823         Pass the process when constructing a WebURLSchemeTask and store it as a data member in addition to
1824         the page. This is necessary now that a WebPageProxy can be associated with several WebProcesses.
1825
1826         * UIProcess/ios/ViewGestureControllerIOS.mm:
1827         (WebKit::ViewGestureController::endSwipeGesture):
1828         Use the provisional drawing area to display the swipe snapshot as it may differ from the one currently
1829         associated with the page in case of process swap.
1830
1831         * WebKit.xcodeproj/project.pbxproj:
1832         Add ProvisionalPageProxy class.
1833
1834         * WebProcess/WebPage/WebFrame.cpp:
1835         (WebKit::toPolicyAction):
1836         (WebKit::WebFrame::didReceivePolicyDecision):
1837         * WebProcess/WebPage/WebPage.cpp:
1838         (WebKit::m_shouldAttachDrawingAreaOnPageTransition):
1839         (WebKit::WebPage::reinitializeWebPage):
1840         (WebKit::WebPage::didReceivePolicyDecision):
1841         Stop dealing with WebPolicyAction::Suspend as it no longer exists.
1842
1843         (WebKit::WebPage::didCompletePageTransition):
1844
1845         (WebKit::WebPage::setIsSuspended):
1846         Suspend the Page when setIsSuspended(true) is called, now that there is no longer a WebPolicyAction::Suspend.
1847         setIsSuspended(true) IPC is sent when we actually commit the provisional page.
1848
1849         * WebProcess/WebPage/WebPage.h:
1850
1851 2019-01-16  Tim Horton  <timothy_horton@apple.com>
1852
1853         Frequent null-deref under TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded()
1854         https://bugs.webkit.org/show_bug.cgi?id=193468
1855         <rdar://problem/38645869>
1856
1857         Reviewed by Zalan Bujtas.
1858
1859         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1860         (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
1861         Adjust the null-check a bit; Zalan pointed out that the layout could
1862         be responsible for the Frame/RenderView going away, so we should bail
1863         *after* layout, not before.
1864
1865 2019-01-15  Fujii Hironori  <Hironori.Fujii@sony.com>
1866
1867         Unreviewed WinCairo build fix.
1868
1869         * WebProcess/WebPage/WebPageInspectorTargetController.cpp:
1870         (WebKit::WebPageInspectorTargetController::connectInspector): Use 'auto' instead of unprefixed InspectorTarget.
1871         (WebKit::WebPageInspectorTargetController::disconnectInspector): Ditto.
1872         (WebKit::WebPageInspectorTargetController::sendMessageToTargetBackend): Ditto.
1873
1874 2019-01-15  Alex Christensen  <achristensen@webkit.org>
1875
1876         Reduce use of NetworkStorageSession::defaultStorageSession in WebCore
1877         https://bugs.webkit.org/show_bug.cgi?id=193368
1878
1879         Reviewed by Geoff Garen.
1880
1881         * WebProcess/Plugins/PluginView.cpp:
1882         (WebKit::PluginView::getAuthenticationInfo):
1883
1884 2019-01-15  Alex Christensen  <achristensen@webkit.org>
1885
1886         Remove more NetworkProcess::singleton use
1887         https://bugs.webkit.org/show_bug.cgi?id=193484
1888
1889         Reviewed by Geoffrey Garen.
1890
1891         This removes the use of NetworkProcess::singleton in the LegacyCustomProtocolManager.
1892         This is the kind of awful duct tape code that keeps me awake at night, but it's necessary
1893         because we can't quite remove LegacyCustomProtocolManager yet but we need to allow more than
1894         one NetworkProcess object.  To make it work well enough until we remove LegacyCustomProtocolManager,
1895         use the last NetworkProcess object that has been created.
1896
1897         * NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm:
1898         (newestNetworkProcess):
1899         (LegacyCustomProtocolManager::networkProcessCreated):
1900         (+[WKCustomProtocol canInitWithRequest:]):
1901         (-[WKCustomProtocol initWithRequest:cachedResponse:client:]):
1902         (-[WKCustomProtocol startLoading]):
1903         (-[WKCustomProtocol stopLoading]):
1904         * NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.cpp:
1905         (WebKit::LegacyCustomProtocolManager::LegacyCustomProtocolManager):
1906         (WebKit::LegacyCustomProtocolManager::startLoading):
1907         (WebKit::LegacyCustomProtocolManager::stopLoading):
1908         * NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h:
1909         * NetworkProcess/NetworkProcess.cpp:
1910         (WebKit::NetworkProcess::NetworkProcess):
1911
1912 2019-01-15  Alex Christensen  <achristensen@webkit.org>
1913
1914         Fix WinCairo build after r240014
1915         https://bugs.webkit.org/show_bug.cgi?id=161106
1916
1917         * NetworkProcess/curl/NetworkDataTaskCurl.cpp:
1918
1919 2019-01-15  Ryosuke Niwa  <rniwa@webkit.org>
1920
1921         VisualViewport API should be updated upon opening of keyboard
1922         https://bugs.webkit.org/show_bug.cgi?id=193475
1923
1924         Reviewed by Simon Fraser.
1925
1926         The bug was caused by the changes to unobscuredContentRectRespectingInputViewBounds not updating the visual viewport
1927         unless it caused a layout to happen. Added a code to update the visual viewport in WebPage::updateVisibleContentRects.
1928
1929         Also fixed the bug that VisibleContentRectUpdateInfo::operator== was not checking differences in
1930         unobscuredContentRectRespectingInputViewBounds which resulted in the visual viewport override not getting updated
1931         while the keyboard is getting brought up.
1932
1933         * Shared/VisibleContentRectUpdateInfo.h:
1934         (WebKit::operator==):
1935         * WebProcess/WebPage/ios/WebPageIOS.mm:
1936         (WebKit::WebPage::updateVisibleContentRects):
1937
1938 2019-01-15  Megan Gardner  <megan_gardner@apple.com>
1939
1940         Add Reveal support in iOSMac
1941         https://bugs.webkit.org/show_bug.cgi?id=193408
1942         <rdar://problem/47300699>
1943
1944         Reviewed by Tim Horton.
1945
1946         Add calls to DictionaryLookup from the appropriate places.
1947
1948         * UIProcess/PageClient.h:
1949         * UIProcess/ios/PageClientImplIOS.h:
1950         * UIProcess/ios/PageClientImplIOS.mm:
1951         (WebKit::PageClientImpl::didPerformDictionaryLookup):
1952         * UIProcess/ios/WebPageProxyIOS.mm:
1953         (WebKit::WebPageProxy::didPerformDictionaryLookup):
1954         * WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
1955         (WebKit::WebPage::dictionaryPopupInfoForRange):
1956
1957 2019-01-15  Claudio Saavedra  <csaavedra@igalia.com>
1958
1959         [SOUP] Remove usage of NetworkProcess::singleton()
1960         https://bugs.webkit.org/show_bug.cgi?id=193444
1961
1962         Reviewed by Michael Catanzaro.
1963
1964         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
1965         (WebKit::NetworkDataTaskSoup::download):
1966         (WebKit::NetworkDataTaskSoup::didWriteDownload):
1967         (WebKit::NetworkDataTaskSoup::didFinishDownload):
1968         (WebKit::NetworkDataTaskSoup::didFailDownload):
1969         * NetworkProcess/soup/NetworkSessionSoup.cpp:
1970         (WebKit::NetworkSessionSoup::NetworkSessionSoup):
1971
1972 2019-01-15  Eric Carlson  <eric.carlson@apple.com>
1973
1974         Fix incorrect ASSERT added in r239840
1975         https://bugs.webkit.org/show_bug.cgi?id=193466
1976         <rdar://problem/47095142>
1977
1978         Reviewed by Youenn Fablet.
1979
1980         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
1981         (WebKit::UserMediaCaptureManager::Source::Source):
1982
1983 2019-01-15  Tim Horton  <timothy_horton@apple.com>
1984
1985         Frequent null-deref under TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded()
1986         https://bugs.webkit.org/show_bug.cgi?id=193468
1987         <rdar://problem/38645869>
1988
1989         Reviewed by Beth Dakin.
1990
1991         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1992         (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
1993         I'm not sure why this got *worse*, but we should null-check RenderView.
1994         It's OK to bail from scaleViewToFitDocumentIfNeeded, we'll re-do it
1995         the next time we paint (which will surely happen if we gain a RenderView).
1996
1997 2019-01-15  Chris Dumez  <cdumez@apple.com>
1998
1999         Unreviewed, rolling out r239993, r239995, r239997, and
2000         r239999.
2001
2002         Caused assertions under
2003         ViewGestureController::disconnectFromProcess()
2004
2005         Reverted changesets:
2006
2007         "Regression(PSON) View becomes blank after click a cross-site
2008         download link"
2009         https://bugs.webkit.org/show_bug.cgi?id=193361
2010         https://trac.webkit.org/changeset/239993
2011
2012         "Unreviewed iOS build fix after r239993."
2013         https://trac.webkit.org/changeset/239995
2014
2015         "Fix iOS build after r239993"
2016         https://bugs.webkit.org/show_bug.cgi?id=193361
2017         https://trac.webkit.org/changeset/239997
2018
2019         "Unreviewed, revert part of r239997 as it is not needed to fix
2020         the build."
2021         https://trac.webkit.org/changeset/239999
2022
2023 2019-01-15  Alex Christensen  <achristensen@webkit.org>
2024
2025         Stop using CookiesStrategy
2026         https://bugs.webkit.org/show_bug.cgi?id=161106
2027
2028         Reviewed by Don Olmstead and Antti Koivisto.
2029
2030         * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
2031         (WebKit::NetworkProcessPlatformStrategies::createCookiesStrategy): Deleted.
2032         * NetworkProcess/NetworkProcessPlatformStrategies.h:
2033         * NetworkProcess/curl/NetworkDataTaskCurl.cpp:
2034         * Scripts/webkit/messages.py:
2035         * Sources.txt:
2036         * WebKit.xcodeproj/project.pbxproj:
2037         * WebProcess/Automation/WebAutomationSessionProxy.cpp:
2038         (WebKit::WebAutomationSessionProxy::getCookiesForFrame):
2039         (WebKit::WebAutomationSessionProxy::deleteCookie):
2040         * WebProcess/Plugins/PluginView.cpp:
2041         (WebKit::PluginView::cookiesForURL):
2042         (WebKit::PluginView::setCookiesForURL):
2043         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2044         (WebKit::WebPlatformStrategies::createCookiesStrategy): Deleted.
2045         (WebKit::WebPlatformStrategies::cookiesForDOM): Deleted.
2046         (WebKit::WebPlatformStrategies::setCookiesFromDOM): Deleted.
2047         (WebKit::WebPlatformStrategies::cookiesEnabled): Deleted.
2048         (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue): Deleted.
2049         (WebKit::WebPlatformStrategies::getRawCookies): Deleted.
2050         (WebKit::WebPlatformStrategies::deleteCookie): Deleted.
2051         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2052         * WebProcess/WebPage/WebCookieJar.cpp: Added.
2053         (WebKit::WebCookieJar::cookies const):
2054         (WebKit::WebCookieJar::setCookies):
2055         (WebKit::WebCookieJar::cookiesEnabled const):
2056         (WebKit::WebCookieJar::cookieRequestHeaderFieldValue const):
2057         (WebKit::WebCookieJar::getRawCookies const):
2058         (WebKit::WebCookieJar::deleteCookie):
2059         * WebProcess/WebPage/WebCookieJar.h: Added.
2060         * WebProcess/WebPage/WebPage.cpp:
2061         (WebKit::m_shouldAttachDrawingAreaOnPageTransition):
2062
2063 2019-01-15  Per Arne Vollan  <pvollan@apple.com>
2064
2065         Remove reporting for iOS mach lookups confirmed in-use
2066         https://bugs.webkit.org/show_bug.cgi?id=193455
2067         <rdar://problem/47259551>
2068
2069         Reviewed by Brent Fulgham.
2070
2071         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2072
2073 2019-01-15  Tim Horton  <timothy_horton@apple.com>
2074
2075         Cannot tab out of WKWebView on macOS
2076         https://bugs.webkit.org/show_bug.cgi?id=161448
2077         <rdar://problem/28100085>
2078
2079         Reviewed by Dean Jackson.
2080
2081         * UIProcess/WebPageProxy.cpp:
2082         (WebKit::WebPageProxy::takeFocus):
2083         If the UIDelegate doesn't implement takeFocus, provide a simple default
2084         implementation that just uses AppKit's key view loop to move the focus.
2085
2086         * UIProcess/API/APIUIClient.h:
2087         (API::UIClient::takeFocus):
2088         * UIProcess/API/C/WKPage.cpp:
2089         (WKPageSetPageUIClient):
2090         * UIProcess/Cocoa/UIDelegate.h:
2091         * UIProcess/Cocoa/UIDelegate.mm:
2092         (WebKit::UIDelegate::UIClient::takeFocus):
2093         Make API::UIClient's takeFocus return a bool indicating whether the
2094         client implements it or not.
2095
2096         * UIProcess/PageClient.h:
2097         * UIProcess/mac/PageClientImplMac.h:
2098         * UIProcess/mac/PageClientImplMac.mm:
2099         (WebKit::PageClientImpl::takeFocus):
2100         Plumb takeFocus to WebViewImpl.
2101
2102         * UIProcess/Cocoa/WebViewImpl.h:
2103         * UIProcess/Cocoa/WebViewImpl.mm:
2104         (WebKit::WebViewImpl::takeFocus):
2105         Borrow the relevant portion of WebKitLegacy's implementation of takeFocus,
2106         shifting focus to the next/previous key view in the window.
2107
2108 2019-01-15  Youenn Fablet  <youenn@apple.com>
2109
2110         Remove the specific handling of ephemeral sessions from CacheStorage::Engine::from
2111         https://bugs.webkit.org/show_bug.cgi?id=193400
2112
2113         Reviewed by Alex Christensen.
2114
2115         It is no longer needed as we correctly handle ephemeral sessions removal.
2116
2117         * NetworkProcess/cache/CacheStorageEngine.cpp:
2118         (WebKit::CacheStorage::Engine::from):
2119
2120 2019-01-15  Alex Christensen  <achristensen@webkit.org>
2121
2122         Fix iOS build after r239993
2123         https://bugs.webkit.org/show_bug.cgi?id=193361
2124
2125         * UIProcess/ProvisionalPageProxy.h:
2126         * UIProcess/SuspendedPageProxy.h:
2127
2128 2019-01-15  Per Arne Vollan  <pvollan@apple.com>
2129
2130         [macOS] Adjust logging policy in WebKit's sandbox
2131         https://bugs.webkit.org/show_bug.cgi?id=193454
2132         <rdar://problem/47256325>
2133
2134         Reviewed by Brent Fulgham.
2135
2136         * WebProcess/com.apple.WebProcess.sb.in:
2137
2138 2019-01-15  Chris Dumez  <cdumez@apple.com>
2139
2140         Unreviewed iOS build fix after r239993.
2141
2142         * UIProcess/SuspendedPageProxy.h:
2143
2144 2019-01-15  Per Arne Vollan  <pvollan@apple.com>
2145
2146         Add allow directive for MTLCompilerService.xpc to PluginProcess and WebContent
2147         https://bugs.webkit.org/show_bug.cgi?id=193453
2148         <rdar://problem/47268166>
2149
2150         Reviewed by Brent Fulgham.
2151
2152         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
2153         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2154         * WebProcess/com.apple.WebProcess.sb.in:
2155
2156 2019-01-15  Chris Dumez  <cdumez@apple.com>
2157
2158         Regression(PSON) View becomes blank after click a cross-site download link
2159         https://bugs.webkit.org/show_bug.cgi?id=193361
2160         <rdar://problem/47099573>
2161
2162         Reviewed by Geoff Garen.
2163
2164         The issue tracked by rdar://problem/47099573 is that a provisional load may get
2165         canceled (or converted into a download) *after* we've decided to process-swap.
2166         In such cases, the view should keep displaying the current site and it should
2167         still be interactive. However, with the previous PSON model, the view (pageProxy)
2168         would have already swapped to the new process and would end up displaying the
2169         initially empty document.
2170
2171         To address the issue, this patch introduces the concept of a provisional load
2172         in the UIProcess, handled by a ProvisionalPageProxy which has its own privisional
2173         process. The WebPageProxy owns the ProvisionalPageProxy but we do not commit the
2174         provisional page until after the load was committed in the new process. This means
2175         that the view / WebPageProxy keeps using the old process and displays the current
2176         content until a load has committed in the provisional page. If no load commits
2177         in the provisional process (e.g. because the load is cancelled or converted into
2178         a download), then we merely destroy the ProvisionalPageProxy and terminate its
2179         process, without impacting the WebPageProxy.
2180
2181         * Shared/WebPageCreationParameters.cpp:
2182         (WebKit::WebPageCreationParameters::encode const):
2183         (WebKit::WebPageCreationParameters::decode):
2184         * Shared/WebPageCreationParameters.h:
2185         Rename isSwapFromSuspended to isProcessSwap for clarity as we always want to
2186         delay attaching the drawing area in case of a process-swap, no matter what
2187         now that the previous process is kept alive until the provisional load is
2188         committed in the new process.
2189
2190         * Shared/WebPolicyAction.h:
2191         Drop Suspend policy action. At decidePolicyForNavigationAction time, in case of
2192         process-swap, we now tell the previous process to simply ignore the load, while
2193         we create a ProvisionalPageProxy to do the new load in a new process.
2194         Suspension of the previous page in the old process, happens later, when a load
2195         is actually committed in the new process.
2196
2197         * Sources.txt:
2198         Add new ProvisionalPageProxy file.
2199
2200         * UIProcess/API/Cocoa/WKWebView.mm:
2201         (-[WKWebView _killWebContentProcessAndResetState]):
2202         When calling _killWebContentProcessAndResetState on a WKWebView, kill both the current
2203         process and the provisional one, to maintain previous behavior in our API tests.
2204
2205         * UIProcess/PageClient.h:
2206         Tiny build fix.
2207
2208         * UIProcess/ProvisionalPageProxy.cpp: Added.
2209         (WebKit::ProvisionalPageProxy::ProvisionalPageProxy):
2210         (WebKit::ProvisionalPageProxy::~ProvisionalPageProxy):
2211         (WebKit::ProvisionalPageProxy::takeDrawingArea):
2212         (WebKit::ProvisionalPageProxy::cancel):
2213         (WebKit::ProvisionalPageProxy::initializeWebPage):
2214         (WebKit::ProvisionalPageProxy::loadDataWithNavigation):
2215         (WebKit::ProvisionalPageProxy::loadRequestWithNavigation):
2216         (WebKit::ProvisionalPageProxy::goToBackForwardItem):
2217         (WebKit::ProvisionalPageProxy::didCreateMainFrame):
2218         (WebKit::ProvisionalPageProxy::didStartProvisionalLoadForFrame):
2219         (WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame):
2220         (WebKit::ProvisionalPageProxy::didCommitLoadForFrame):
2221         (WebKit::ProvisionalPageProxy::didReceiveMessage):
2222         (WebKit::ProvisionalPageProxy::didReceiveSyncMessage):
2223         * UIProcess/ProvisionalPageProxy.h: Added.
2224         (WebKit::ProvisionalPageProxy::page):
2225         (WebKit::ProvisionalPageProxy::mainFrame const):
2226         (WebKit::ProvisionalPageProxy::process):
2227         (WebKit::ProvisionalPageProxy::processSwapRequestedByClient const):
2228         (WebKit::ProvisionalPageProxy::navigationID const):
2229         Add new ProvisionalPageProxy class to wrap the provisional load in the new process
2230         after a swap. The provisional page is owned by the WebPageProxy and we only commit
2231         the provisional page when the load is committed. Until then, the WebPageProxy keeps
2232         using the old process and displaying the current content.
2233
2234         * UIProcess/SuspendedPageProxy.cpp:
2235         (WebKit::SuspendedPageProxy::~SuspendedPageProxy):
2236         (WebKit::SuspendedPageProxy::unsuspend):
2237         (WebKit::SuspendedPageProxy::didProcessRequestToSuspend):
2238         Unregister the SuspendedPageProxy as an IPC message receiver a little bit earlier
2239         when we're going to unsuspend it. This avoids conflicting with the ProvisionalPageProxy
2240         which tries to register itself as an IPC message receiver for the same pageID when
2241         a process-swap occurs and we're switching to a suspended page.
2242
2243         * UIProcess/WebFrameProxy.cpp:
2244         (WebKit::WebFrameProxy::isMainFrame const):
2245         WebFrameProxy::isMainFrame() relies on checking that the frame is the WebPageProxy's m_mainFrame.
2246         Now that the WebPageProxy can have a ProvisionalPageProxy, also check if it is the ProvisionalPageProxy's
2247         m_mainFrame to maintain previous behavior.
2248
2249         * UIProcess/WebPageProxy.cpp:
2250         (WebKit::WebPageProxy::swapToWebProcess):
2251         swapToWebProcess() no longer takes care of unsuspending the SuspendedPage because we now call swapToWebProcess()
2252         later, when a load is actually committed in the provisional page / process. swapToWebProcess() now also needs
2253         to initialize some data members such as the drawing area and the main frame as it is transferring them over from
2254         the ProvisionalPageProxy which started the provisional load.
2255
2256         (WebKit::WebPageProxy::finishAttachingToWebProcess):
2257         We no longer need IsSwapFromSuspended parameter as this is called later now, after a load has actually been
2258         committed in the provisional process.
2259
2260         (WebKit::WebPageProxy::initializeWebPage):
2261         - We no longer need IsSwapFromSuspended parameter as this is called later now, after a load has actually been
2262           committed in the provisional process.
2263         - Factor some code out to WebPageProxy::setDrawingArea() so that it can be shared with swapToWebProcess().
2264
2265         (WebKit::WebPageProxy::loadRequestWithNavigation):
2266         Only call setPendingAPIRequestURL() in loadRequestWithNavigation() only if ShouldTreatAsContinuingLoad is not
2267         Yes. This avoids hitting some assertions as this was already called during the first API call if needed.
2268
2269         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
2270         In case of process swap, tell the previous process to ignore the load instead of suspending it right away.
2271         Suspension now happens later, only if we end up committing the provisional load in the new process.
2272         Also discard the SuspendedPage if it failed to suspend (we only reuse its process in this case). This used
2273         to happen a bit later but it is clearer if we do this as early as possible I think.
2274
2275         (WebKit::WebPageProxy::commitProvisionalPage):
2276         When the load is committed in the new process, we call WebPageProxy::commitProvisionalPage(). It takes care of:
2277         - Actually swapping the WebPageProxy to the new process by calling processDidTerminate() / swapToWebProcess().
2278         - Suspending the current page.
2279         - Letting the client know the load is comitted
2280         - Destroy the ProvisionalPageProxy.
2281         This work used to happen earlier in continueNavigationInNewProcess().
2282
2283         (WebKit::WebPageProxy::continueNavigationInNewProcess):
2284         Moved some of the logic to commitProvisionalPage(). We now merely start the load in a new ProvisionalPageProxy,
2285         without actually having the WebPageProxy switch to the new process yet.
2286
2287         (WebKit::WebPageProxy::didCreateMainFrame):
2288         (WebKit::WebPageProxy::didCreateWindow):
2289         Drop some code that is no longer needed, now that the ProvisionalPageProxy takes care of this.
2290
2291         (WebKit::WebPageProxy::didDestroyNavigation):
2292         On process-swap, when telling the previous process to ignore the load and starting the new load in a new
2293         ProvisionalPageProxy, the previous WebPage attempts to destroy the navigation. In this case, we ignore
2294         the call since the navigation is merely taken over by the ProvisionalPageProxy.
2295
2296         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
2297         Moved some PSON logic to the ProvisionalPageProxy instead.
2298
2299         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
2300         When didFailProvisionalLoadForFrame() is called for a ProvisionalPageProxy, destroy it.
2301
2302         (WebKit::WebPageProxy::decidePolicyForNavigationActionAsync):
2303         (WebKit::WebPageProxy::decidePolicyForResponse):
2304         Capture the process in the lambda, to make sure we send the policy decision to the same process that
2305         asked for it, so as to not get confused by process swaps.
2306
2307         (WebKit::WebPageProxy::resetState):
2308         Drop some code that is no longer needed.
2309
2310         (WebKit::WebPageProxy::creationParameters):
2311         Move the hasRegisteredServiceWorkers flag initialization from the call site to here now that we have
2312         more than one call site. This was just some bad factoring.
2313
2314         (WebKit::WebPageProxy::PageProcessOverride::PageProcessOverride):
2315         (WebKit::WebPageProxy::PageProcessOverride::~PageProcessOverride):
2316         * UIProcess/WebPageProxy.h:
2317         (WebKit::WebPageProxy::temporarilyOverrideProcess):
2318         Add utility class to temporarily override the WebPageProxy's m_process with the provisional one when
2319         the ProvisionalPageProxy interacts with the WebPageProxy.
2320
2321         * UIProcess/WebProcessProxy.cpp:
2322         (WebKit::WebProcessProxy::hasProvisionalPageWithID const):
2323         (WebKit::WebProcessProxy::updateBackForwardItem):
2324         Before updating a BackForwardListItem, we normally make sure the process has a WebPageProxy with the
2325         item's pageID. We have to tweak the logic because there may now be no WebPageProxy with this pageID
2326         associated with this process yet, because it is still a ProvisionalPageProxy.
2327
2328         (WebKit::WebProcessProxy::canTerminateChildProcess):
2329         Do not terminate the WebProcess if there are ProvisionalPageProxy objects using it.
2330
2331         * UIProcess/WebProcessProxy.h:
2332         (WebKit::WebProcessProxy::addProvisionalPageProxy):
2333         (WebKit::WebProcessProxy::removeProvisionalPageProxy):
2334
2335         * WebKit.xcodeproj/project.pbxproj:
2336
2337         * WebProcess/WebPage/WebFrame.cpp:
2338         (WebKit::toPolicyAction):
2339         (WebKit::WebFrame::didReceivePolicyDecision):
2340         Stop dealing with WebPolicyAction::Suspend as it no longer exists.
2341
2342         * WebProcess/WebPage/WebPage.cpp:
2343         (WebKit::WebPage::reinitializeWebPage):
2344         (WebKit::WebPage::didReceivePolicyDecision):
2345
2346         (WebKit::WebPage::setIsSuspended):
2347         Suspend the Page when setIsSuspended(true) is called, now that there is no longer a WebPolicyAction::Suspend.
2348         setIsSuspended(true) IPC is sent when we actually commit the provisional page.
2349
2350         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2351         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
2352
2353 2019-01-15  Brian Burg  <bburg@apple.com>
2354
2355         WebDriver: update Create Window implementation to support newest specification
2356         https://bugs.webkit.org/show_bug.cgi?id=193333
2357         <rdar://problem/45649489>
2358
2359         Reviewed by Carlos Garcia Campos.
2360
2361         Spec link: https://w3c.github.io/webdriver/#create-window
2362
2363         The command as specified returns a value indicating whether the new browsing context
2364         was presented as a new tab or new window. Add a new delegate method to query the current
2365         'presentation' of the browsing context. The presentation can change over time due to
2366         things such as screen orientation, so the value that is returned by the command only
2367         reflects how the browsing context was initially presented to the user.
2368
2369         This is covered by existing WPT and internal tests. More will be added when Selenium
2370         exposes this command in its various bindings.
2371
2372         * UIProcess/API/Cocoa/_WKAutomationSessionDelegate.h:
2373         Add new SPI delegate method to query the 'presentation' (tab or window) for an automated WKWebView.
2374
2375         * UIProcess/API/APIAutomationSessionClient.h:
2376         (API::AutomationSessionClient::currentPresentationOfPage):
2377         * UIProcess/Cocoa/AutomationSessionClient.h:
2378         * UIProcess/Cocoa/AutomationSessionClient.mm:
2379         (WebKit::AutomationSessionClient::AutomationSessionClient):
2380         (WebKit::toImpl):
2381         (WebKit::AutomationSessionClient::currentPresentationOfPage):
2382         * UIProcess/Automation/WebAutomationSession.cpp:
2383         (WebKit::toProtocol):
2384         (WebKit::WebAutomationSession::createBrowsingContext):
2385         Add plumbing between ObjC delegate and C++.
2386
2387         * UIProcess/Automation/Automation.json:
2388         Include the initial presentation in the createBrowsingContext command result.
2389
2390 2019-01-14  Alex Christensen  <achristensen@webkit.org>
2391
2392         Split headerValueForVary into specialized functions for NetworkProcess and WebProcess/WebKitLegacy
2393         https://bugs.webkit.org/show_bug.cgi?id=193429
2394
2395         Reviewed by Joseph Pecoraro.
2396
2397         * NetworkProcess/cache/NetworkCache.cpp:
2398         (WebKit::NetworkCache::makeUseDecision):
2399         (WebKit::NetworkCache::Cache::retrieve):
2400         (WebKit::NetworkCache::Cache::makeEntry):
2401         (WebKit::NetworkCache::Cache::makeRedirectEntry):
2402         (WebKit::NetworkCache::Cache::update):
2403
2404 2019-01-14  Tim Horton  <timothy_horton@apple.com>
2405
2406         Fix a style mistake in PageClientImplMac
2407
2408         * UIProcess/mac/PageClientImplMac.h:
2409         Somehow these methods ended up above the members.
2410
2411 2019-01-14  Per Arne Vollan  <pvollan@apple.com>
2412
2413         [macOS] Remove reporting for mach lookups confirmed in-use
2414         https://bugs.webkit.org/show_bug.cgi?id=193415
2415         <rdar://problem/47266542>
2416
2417         Reviewed by Brent Fulgham.
2418
2419         Also, start denying the services which have not been confirmed to be in use.
2420
2421         * WebProcess/com.apple.WebProcess.sb.in:
2422
2423 2019-01-14  Commit Queue  <commit-queue@webkit.org>
2424
2425         Unreviewed, rolling out r239901, r239909, r239910, r239912,
2426         r239913, and r239914.
2427         https://bugs.webkit.org/show_bug.cgi?id=193407
2428
2429         These revisions caused an internal failure (Requested by
2430         Truitt on #webkit).
2431
2432         Reverted changesets:
2433
2434         "[Cocoa] Avoid importing directly from subumbrella frameworks"
2435         https://bugs.webkit.org/show_bug.cgi?id=186016
2436         https://trac.webkit.org/changeset/239901
2437
2438         "Tried to fix USE(APPLE_INTERNAL_SDK) builds after r239901."
2439         https://trac.webkit.org/changeset/239909
2440
2441         "Tried to fix the build."
2442         https://trac.webkit.org/changeset/239910
2443
2444         "Fixed iOS builds after r239910."
2445         https://trac.webkit.org/changeset/239912
2446
2447         "More build fixing."
2448         https://trac.webkit.org/changeset/239913
2449
2450         "Tried to fix USE(APPLE_INTERNAL_SDK) 32-bit builds."
2451         https://trac.webkit.org/changeset/239914
2452
2453 2019-01-14  Mark Lam  <mark.lam@apple.com>
2454
2455         Re-enable ability to build --cloop builds.
2456         https://bugs.webkit.org/show_bug.cgi?id=192955
2457         <rdar://problem/46882363>
2458
2459         Reviewed by Saam barati and Keith Miller.
2460
2461         * Configurations/FeatureDefines.xcconfig:
2462
2463 2019-01-14  Alex Christensen  <achristensen@webkit.org>
2464
2465         Remove unused networking entitlement from iOS WebProcess entitlements
2466         https://bugs.webkit.org/show_bug.cgi?id=193267
2467
2468         Reviewed by Dean Jackson.
2469
2470         * Configurations/WebContent-iOS.entitlements:
2471         This gave access to VPN stuff.  It's not needed any more.
2472
2473 2019-01-14  Youenn Fablet  <youenn@apple.com>
2474
2475         Enable MDNS ICE candidate support by default
2476         https://bugs.webkit.org/show_bug.cgi?id=193358
2477
2478         Reviewed by Geoffrey Garen.
2479
2480         * Shared/WebPreferences.yaml:
2481
2482 2019-01-11  Matt Rajca  <mrajca@apple.com>
2483
2484         Expose preference for site-specific quirks on iOS
2485         https://bugs.webkit.org/show_bug.cgi?id=193353
2486
2487         Reviewed by Dean Jackson.
2488
2489         * UIProcess/API/Cocoa/WKPreferences.mm:
2490         (-[WKPreferences _setNeedsSiteSpecificQuirks:]):
2491         (-[WKPreferences _needsSiteSpecificQuirks]):
2492         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2493
2494 2019-01-14  Wenson Hsieh  <wenson_hsieh@apple.com>
2495
2496         [iOS] Expose SPI to access the current sentence boundary and selection state
2497         https://bugs.webkit.org/show_bug.cgi?id=193398
2498         <rdar://problem/45893108>
2499
2500         Reviewed by Dean Jackson.
2501
2502         Expose SPI on WKWebView for internal clients to grab information about attributes at the current selection; so
2503         far, this only includes whether the selection is a caret or a range, and whether or not the start of the
2504         selection is at the start of a new sentence.
2505
2506         Test: EditorStateTests.ObserveSelectionAttributeChanges
2507
2508         * Shared/EditorState.cpp:
2509         (WebKit::EditorState::PostLayoutData::encode const):
2510         (WebKit::EditorState::PostLayoutData::decode):
2511         * Shared/EditorState.h:
2512
2513         Add a new bit in EditorState on iOS to compute whether or not the start of the selection is at the start of a
2514         new sentence. This is computed and set when sending post-layout data in `WebPageIOS.mm`.
2515
2516         * UIProcess/API/Cocoa/WKWebView.mm:
2517         (selectionAttributes):
2518         (-[WKWebView _didChangeEditorState]):
2519         (-[WKWebView _selectionAttributes]):
2520
2521         Make the new SPI property support KVO by invoking `-willChangeValueForKey:` and `-didChangeValueForKey:`
2522         whenever the selection attributes change.
2523
2524         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2525         * WebProcess/WebPage/ios/WebPageIOS.mm:
2526         (WebKit::WebPage::platformEditorState const):
2527
2528 2019-01-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2529
2530         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.23.3 release
2531
2532         * gtk/NEWS: Add release notes for 2.23.3.
2533
2534 2019-01-13  Dan Bernstein  <mitz@apple.com>
2535
2536         Fixed iOS builds after r239910.
2537
2538         * Platform/spi/ios/PDFKitSPI.h:
2539
2540 2019-01-13  Dan Bernstein  <mitz@apple.com>
2541
2542         Tried to fix the build.
2543
2544         * Platform/spi/ios/PDFKitSPI.h:
2545
2546 2019-01-13  Dan Bernstein  <mitz@apple.com>
2547
2548         Tried to fix USE(APPLE_INTERNAL_SDK) builds after r239901.
2549
2550         Patch by Keith Rollin.
2551
2552         * Platform/IPC/mac/ConnectionMac.mm:
2553         * Shared/mac/ChildProcessMac.mm:
2554         (WebKit::ChildProcess::launchServicesCheckIn):
2555
2556 2019-01-12  Timothy Hatcher  <timothy@apple.com>
2557
2558         Have prefers-color-scheme: light always match on macOS versions before Mojave.
2559         https://bugs.webkit.org/show_bug.cgi?id=191655
2560         rdar://problem/46074680
2561
2562         Reviewed by Megan Gardner.
2563
2564         * Configurations/FeatureDefines.xcconfig: ENABLE_DARK_MODE_CSS_macosx for all OS versions.
2565         * UIProcess/Cocoa/WebViewImpl.mm:
2566         (WebKit::WebViewImpl::effectiveAppearanceIsDark):
2567         * UIProcess/RemoteLayerTree/mac/ScrollerMac.mm:
2568
2569 2019-01-12  Dan Bernstein  <mitz@apple.com>
2570
2571         [Cocoa] Avoid importing directly from subumbrella frameworks
2572         https://bugs.webkit.org/show_bug.cgi?id=186016
2573         <rdar://problem/40591038>
2574
2575         Reviewed by Sam Weinig.
2576
2577         * Configurations/BaseTarget.xcconfig: Removed -iframework options from OTHER_CFLAGS and
2578           OTHER_CPLUSPLUSFLAGS.
2579         * UIProcess/Automation/mac/WebAutomationSessionMac.mm: Import Carbon.h instead of an
2580           HIToolbox header.
2581         * UIProcess/Cocoa/WebViewImpl.mm: Ditto.
2582         * UIProcess/mac/WKPrintingView.mm: Import Quartz.h instead of a PDFKit header.
2583         * UIProcess/mac/WKTextInputWindowController.mm: Import Carbon.h instead of an HIToolbox
2584           header.
2585         * WebProcess/Plugins/PDF/PDFAnnotationTextWidgetDetails.h: Import Quartz.h instead of a
2586           PDFKit header.
2587         * WebProcess/Plugins/PDF/PDFLayerControllerSPI.h: Ditto.
2588         * WebProcess/Plugins/PDF/PDFPlugin.mm: Ditto.
2589         * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm: Ditto.
2590         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm: Ditto.
2591         * WebProcess/Plugins/PDF/PDFPluginPasswordField.mm: Ditto.
2592         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm: Ditto.
2593         * WebProcess/WebPage/mac/WebPageMac.mm: Ditto.
2594
2595 2019-01-11  Ryosuke Niwa  <rniwa@webkit.org>
2596
2597         Enable visual viewport API by default
2598         https://bugs.webkit.org/show_bug.cgi?id=193376
2599
2600         Reviewed by Simon Fraser.
2601
2602         Enable this feature by default since the remaining issue on iOS is mostly about test failures,
2603         not an issue with the core functionality of the API.
2604
2605         * Shared/WebPreferences.yaml:
2606
2607 2019-01-11  Brent Fulgham  <bfulgham@apple.com>
2608
2609         Allow WebContent process access to some drawing-related IOKit properties
2610         https://bugs.webkit.org/show_bug.cgi?id=193086
2611         <rdar://problem/46568088>
2612
2613         Reviewed by Eric Carlson.
2614
2615         Add one missing IOKit property, and revise the regexp used for another.
2616
2617         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2618
2619 2019-01-11  John Wilander  <wilander@apple.com>
2620
2621         Compile out Web API Statistics Collection
2622         https://bugs.webkit.org/show_bug.cgi?id=193370
2623         <rdar://problem/45388584>
2624
2625         Reviewed by Brent Fulgham.
2626
2627         * Configurations/FeatureDefines.xcconfig:
2628             Defined ENABLE_WEB_API_STATISTICS, off by default.
2629         * Shared/WebCoreArgumentCoders.cpp:
2630         (IPC::ArgumentCoder<ResourceLoadStatistics>::encode):
2631             Skipped encoding of web API statistics.
2632         (IPC::ArgumentCoder<ResourceLoadStatistics>::decode):
2633             Skipped decoding of web API statistics.
2634
2635 2019-01-11  Sihui Liu  <sihui_liu@apple.com>
2636
2637         IndexedDB: leak WebIDBConnectionToClient for retain cycle
2638         https://bugs.webkit.org/show_bug.cgi?id=193097
2639         <rdar://problem/46899601>
2640
2641         Reviewed by Brady Eidson.
2642
2643         Let WebIDBConnectionToClient hold reference to IPC::Connection instead of NetworkConnectionToWebProcess to break
2644         the cycle.
2645
2646         * NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:
2647         (WebKit::WebIDBConnectionToClient::create):
2648         (WebKit::WebIDBConnectionToClient::WebIDBConnectionToClient):
2649         (WebKit::WebIDBConnectionToClient::messageSenderConnection):
2650         * NetworkProcess/IndexedDB/WebIDBConnectionToClient.h:
2651         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2652         (WebKit::NetworkConnectionToWebProcess::establishIDBConnectionToServer):
2653
2654 2019-01-11  Sihui Liu  <sihui_liu@apple.com>
2655
2656         Make "Disable Web SQL" on by default
2657         https://bugs.webkit.org/show_bug.cgi?id=193354
2658         <rdar://problem/46524584>
2659
2660         Reviewed by Geoffrey Garen.
2661
2662         * Shared/WebPreferences.yaml:
2663
2664 2019-01-11  Devin Rousso  <drousso@apple.com>
2665
2666         Fix style CFNetworkSPI style checker warnings from r239698
2667         https://bugs.webkit.org/show_bug.cgi?id=193369
2668
2669         Reviewed by Joseph Pecoraro.
2670
2671         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2672         (-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):
2673
2674 2019-01-11  Wenson Hsieh  <wenson_hsieh@apple.com>
2675
2676         [iOS] Precision drop state thrashes when dragging near the top edge of an editable element
2677         https://bugs.webkit.org/show_bug.cgi?id=193364
2678         <rdar://problem/47214117>
2679
2680         Reviewed by Tim Horton.
2681
2682         On iOS, marking a UIDropProposal as precise offsets the hit-testing location of the drop by a small distance
2683         either upwards or downwards from the actual location of the user's finger. When dragging over an editable
2684         element, WebKit currently marks the drop proposal as precise; however, when dragging over the top edge of an
2685         editable element, what happens is that the hit-testing location is offset to a location outside of the editable
2686         element, which causes us to turn off precision drop mode; subsequently, turning off precision drop mode removes
2687         the offset, which causes us to hit-test within the editable element once again and re-enable precision mode, and
2688         the cycle continues.
2689
2690         In order to mitigate this, bail out of precision drop mode when dragging near the top or bottom edges of the
2691         highest editable root that contains the current drop caret position (or, if the drop caret is inside of a text
2692         form control, use the form control as the editable element instead).
2693
2694         * UIProcess/WebPageProxy.cpp:
2695         (WebKit::WebPageProxy::didPerformDragControllerAction):
2696         * UIProcess/WebPageProxy.h:
2697         (WebKit::WebPageProxy::currentDragCaretEditableElementRect const):
2698         * UIProcess/WebPageProxy.messages.in:
2699         * UIProcess/ios/WKContentViewInteraction.mm:
2700         (-[WKContentView dropInteraction:sessionDidUpdate:]):
2701
2702         Avoid precise mode when we're less than 25pt away from the top and bottom edge of the editable element rect.
2703         Since the drag location offset amount is a fixed offset in window coordinates, we first convert this minimum
2704         distance to the content view's coordinate space by dividing by the content scale factor.
2705
2706         * WebProcess/WebPage/WebPage.cpp:
2707         (WebKit::WebPage::performDragControllerAction):
2708
2709 2019-01-11  Tim Horton  <timothy_horton@apple.com>
2710
2711         REGRESSION (PSON): Firefox app lacks Open in New Tab in menu
2712         https://bugs.webkit.org/show_bug.cgi?id=193366
2713         <rdar://problem/46097212>
2714
2715         Reviewed by Simon Fraser.
2716
2717         A pair of unrelated changes broke Firefox's use of WKWebView internals
2718         to override the long-press menu. Maintain binary compatibility by
2719         introducing linked-on-or-after checks.
2720
2721         * UIProcess/Cocoa/VersionChecks.h:
2722         * UIProcess/WebProcessPool.cpp:
2723         (WebKit::WebProcessPool::createWebPage):
2724         Disable PSON in Firefox when linked against an SDK where PSON wasn't enabled by default.
2725         Because gestures are very stateful, we always swap them out when swapping
2726         processes (changing that behavior is fairly risky). Also, we don't always
2727         inform the client when we swap processes (only when the process actually crashes),
2728         so they currently don't re-adjust the gesture recognizers when a PSON swap occurs.
2729
2730         * UIProcess/ios/WKContentView.mm:
2731         (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
2732         Synchronously install gesture recognizers under -init when linked against
2733         an SDK before the version that introduces lazy gesture recognizer installation.
2734         r237331 is an optimization that made us lazily install gestures when the
2735         view is parented, but Firefox (and potentially other clients) depend
2736         on them being installed synchronously in order to find and override them.
2737
2738 2019-01-11  Wenson Hsieh  <wenson_hsieh@apple.com>
2739
2740         Introduce IDL files for runtime-enabled UndoManager and UndoItem JavaScript API
2741         https://bugs.webkit.org/show_bug.cgi?id=193109
2742         <rdar://problem/44807048>
2743
2744         Reviewed by Ryosuke Niwa.
2745
2746         Add a new SPI configuration flag to enable the UndoManager API. This is off by default.
2747
2748         * Shared/WebPreferences.yaml:
2749         * UIProcess/API/Cocoa/WKWebView.mm:
2750         (-[WKWebView _initializeWithConfiguration:]):
2751         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2752         (-[WKWebViewConfiguration init]):
2753         (-[WKWebViewConfiguration copyWithZone:]):
2754         (-[WKWebViewConfiguration _setUndoManagerAPIEnabled:]):
2755         (-[WKWebViewConfiguration _undoManagerAPIEnabled]):
2756         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2757
2758 2019-01-10  Jiewen Tan  <jiewen_tan@apple.com>
2759
2760         [WebAuthN] Change the nonce in the CTAP kInit command to weak random values
2761         https://bugs.webkit.org/show_bug.cgi?id=192061
2762         <rdar://problem/46471091>
2763
2764         Reviewed by Chris Dumez.
2765
2766         Change the nonce in the CTAP kInit command to weak random values as the nonce is mainly
2767         for being a probabilistically unique global identifier for hand shakes, instead of
2768         preventing replay attacks. Otherwise, it might exhaust system entropy unnecessarily.
2769
2770         The patch also removes all logging when debugging the test case flakiness.
2771
2772         * UIProcess/WebAuthentication/AuthenticatorManager.cpp:
2773         (WebKit::AuthenticatorManager::respondReceived):
2774         (WebKit::AuthenticatorManager::initTimeOutTimer):
2775         (WebKit::AuthenticatorManager::timeOutTimerFired):
2776         * UIProcess/WebAuthentication/Cocoa/HidService.mm:
2777         (WebKit::HidService::deviceAdded):
2778         * UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.cpp:
2779         (WebKit::MockAuthenticatorManager::respondReceivedInternal):
2780         * UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:
2781         (WebKit::MockHidConnection::send):
2782         * UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp:
2783         (WebKit::CtapHidAuthenticator::makeCredential):
2784         (WebKit::CtapHidAuthenticator::getAssertion):
2785         * UIProcess/WebAuthentication/fido/CtapHidDriver.cpp:
2786         (WebKit::CtapHidDriver::Worker::write):
2787         (WebKit::CtapHidDriver::Worker::read):
2788         (WebKit::CtapHidDriver::Worker::returnMessage):
2789         (WebKit::CtapHidDriver::transact):
2790         (WebKit::CtapHidDriver::continueAfterChannelAllocated):
2791         (WebKit::CtapHidDriver::continueAfterResponseReceived):
2792
2793 2019-01-10  Timothy Hatcher  <timothy@apple.com>
2794
2795         Add WKBundlePage SPI to temporarily force light or dark appearance on a page.
2796         https://bugs.webkit.org/show_bug.cgi?id=193327
2797         rdar://problem/47093222
2798
2799         Reviewed by Tim Horton.
2800
2801         Tests: WebKit.ForceLightAppearanceInBundle API Test
2802
2803         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2804         (WKBundlePageSetUseDarkAppearance): Added.
2805         (WKBundlePageIsUsingDarkAppearance): Added.
2806         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
2807
2808 2019-01-10  Eric Carlson  <eric.carlson@apple.com>
2809
2810         DeviceID hash salt manager can be NULL
2811         https://bugs.webkit.org/show_bug.cgi?id=193334
2812         <rdar://problem/47179650>
2813
2814         Reviewed by Youenn Fablet.
2815
2816         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2817         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): No need to
2818         NULL-check websiteDataStore.deviceIdHashSaltStorage, it is a Ref.
2819         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): Ditto.
2820         (WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo): Ditto.
2821         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): Ditto.
2822
2823         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2824         (WebKit::WebsiteDataStore::WebsiteDataStore): m_deviceIdHashSaltStorage is a Ref.
2825         (WebKit::WebsiteDataStore::fetchDataAndApply): Ditto.
2826         (WebKit::WebsiteDataStore::removeData): Ditto.
2827         * UIProcess/WebsiteData/WebsiteDataStore.h:
2828         (WebKit::WebsiteDataStore::deviceIdHashSaltStorage): Ditto.
2829
2830 2019-01-10  Per Arne Vollan  <pvollan@apple.com>
2831
2832         [macOS] Add name of IORegistry key in sandbox.
2833         https://bugs.webkit.org/show_bug.cgi?id=193335
2834         <rdar://problem/47184951>
2835
2836         Reviewed by Alexey Proskuryakov.
2837
2838         The property IOGVAHEVCDecodeCapabilities was added in https://bugs.webkit.org/show_bug.cgi?id=193324.
2839         Also, the property IOGVAHEVCEncodeCapabilities needs to be added.
2840
2841         * WebProcess/com.apple.WebProcess.sb.in:
2842
2843 2019-01-10  Zalan Bujtas  <zalan@apple.com>
2844
2845         REGRESSION (r237658): Tap highlight limits cause the highlight to no longer show with legitimate button sizes
2846         https://bugs.webkit.org/show_bug.cgi?id=193294
2847         <rdar://problem/46006678>
2848
2849         Reviewed by Simon Fraser.
2850
2851         Input type elements should always paint tap highlight (ignore size heuristic). 
2852
2853         * UIProcess/PageClient.h:
2854         * UIProcess/WebPageProxy.h:
2855         * UIProcess/WebPageProxy.messages.in:
2856         * UIProcess/ios/PageClientImplIOS.h:
2857         * UIProcess/ios/PageClientImplIOS.mm:
2858         (WebKit::PageClientImpl::didGetTapHighlightGeometries):
2859         * UIProcess/ios/WKContentViewInteraction.h:
2860         * UIProcess/ios/WKContentViewInteraction.mm:
2861         (-[WKContentView _showTapHighlight]):
2862         (-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:nodeHasBuiltInClickHandling:]):
2863         (-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]): Deleted.
2864         * UIProcess/ios/WebPageProxyIOS.mm:
2865         (WebKit::WebPageProxy::didGetTapHighlightGeometries):
2866         * WebProcess/WebPage/ios/WebPageIOS.mm:
2867         (WebKit::WebPage::sendTapHighlightForNodeIfNecessary):
2868
2869 2019-01-10  Alexey Proskuryakov  <ap@apple.com>
2870
2871         Remove unneeded XPCService variant for plugin service
2872         https://bugs.webkit.org/show_bug.cgi?id=193326
2873
2874         Reviewed by Tim Horton.
2875
2876         * Configurations/PluginService.32.xcconfig: Removed.
2877         * Configurations/PluginService.64.xcconfig:
2878         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist: Removed.
2879         * PluginProcess/EntryPoint/mac/XPCService/PluginService.64.Info.plist: Copied from Source/WebKit/PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist.
2880         * WebKit.xcodeproj/project.pbxproj:
2881
2882 2019-01-10  Eric Carlson  <eric.carlson@apple.com>
2883
2884         Define page media state flags for display capture.
2885         https://bugs.webkit.org/show_bug.cgi?id=193230
2886         <rdar://problem/47095142>
2887
2888         Reviewed by Youenn Fablet.
2889
2890         * UIProcess/API/C/WKPage.cpp:
2891         (WKPageGetMediaState):
2892         * UIProcess/API/C/WKPagePrivate.h:
2893         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
2894         (WebKit::UserMediaCaptureManager::Source::Source):
2895         (WebKit::UserMediaCaptureManager::createCaptureSource):
2896
2897 2019-01-10  Alex Christensen  <achristensen@webkit.org>
2898
2899         REGRESSION(r239815) http/tests/workers/service/serviceworker-private-browsing.https.html test times out
2900         https://bugs.webkit.org/show_bug.cgi?id=193325
2901
2902         Reviewed by Joseph Pecoraro.
2903
2904         InjectedBundle::setPrivateBrowsingEnabled effectively didn't do anything when enabled was false.
2905         I made it destroy the legacy private browsing session in the NetworkProcess, which caused a test to time out.
2906         This functionality is only used for testing, so it's no big deal to revert that part of the patch.
2907
2908         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2909         (WebKit::NetworkConnectionToWebProcess::destroyLegacyPrivateBrowsingSession): Deleted.
2910         * NetworkProcess/NetworkConnectionToWebProcess.h:
2911         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
2912         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2913         (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
2914         * WebProcess/WebProcess.cpp:
2915         (WebKit::WebProcess::destroyLegacyPrivateBrowsingSessionInNetworkProcess): Deleted.
2916         * WebProcess/WebProcess.h:
2917
2918 2019-01-10  Per Arne Vollan  <pvollan@apple.com>
2919
2920         [macOS] Add name of IORegistry key in sandbox.
2921         https://bugs.webkit.org/show_bug.cgi?id=193324
2922
2923         Reviewed by Brent Fulgham.
2924
2925         IOGVAVTCapabilities key has been changed to IOGVAHEVCDecodeCapabilities.
2926
2927         * WebProcess/com.apple.WebProcess.sb.in:
2928
2929 2019-01-10  John Wilander  <wilander@apple.com>
2930
2931         Override the session configuration for cookieAcceptPolicy
2932         https://bugs.webkit.org/show_bug.cgi?id=190925
2933         <rdar://problem/45497382>
2934
2935         Reviewed by Alexey Proskuryakov and Alex Christensen.
2936
2937         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2938         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
2939             Now sets cookieStorage._overrideSessionCookieAcceptPolicy to YES.
2940
2941 2019-01-09  Matt Rajca  <mrajca@apple.com>
2942
2943         Put per-document autoplay behavior behind runtime website policies quirk instead of a compile time flag
2944         https://bugs.webkit.org/show_bug.cgi?id=193301
2945
2946         Reviewed by Jer Noble.
2947
2948         Register a new quirk that can be configured per-load for per-document media
2949         autoplay behaviors.
2950
2951         * Shared/WebsiteAutoplayQuirk.h:
2952         * Shared/WebsitePoliciesData.cpp:
2953         (WebKit::WebsitePoliciesData::applyToDocumentLoader):
2954         * UIProcess/API/C/WKWebsitePolicies.cpp:
2955         (WKWebsitePoliciesSetAllowedAutoplayQuirks):
2956         (WKWebsitePoliciesGetAllowedAutoplayQuirks):
2957         * UIProcess/API/C/WKWebsitePolicies.h:
2958         * UIProcess/API/Cocoa/_WKWebsitePolicies.h:
2959         * UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
2960         (-[_WKWebsitePolicies setAllowedAutoplayQuirks:]):
2961         (-[_WKWebsitePolicies allowedAutoplayQuirks]):
2962
2963 2019-01-10  Tim Horton  <timothy_horton@apple.com>
2964
2965         Rename some entitlements files to be more clear about their target platform
2966         https://bugs.webkit.org/show_bug.cgi?id=193311
2967
2968         Reviewed by Alexey Proskuryakov.
2969
2970         * Configurations/Network-iOSMac.entitlements: Renamed from Source/WebKit/Configurations/Network-iOS-minimalsimulator.entitlements.
2971         * Configurations/NetworkService.xcconfig:
2972         * Configurations/WebContent-iOSMac.entitlements: Renamed from Source/WebKit/Configurations/WebContent-iOS-minimalsimulator.entitlements.
2973         * Configurations/WebContentService.xcconfig:
2974         * WebKit.xcodeproj/project.pbxproj:
2975
2976 2019-01-09  Brent Fulgham  <bfulgham@apple.com>
2977
2978         Unreviewed build fix after r239816.
2979
2980         Although EWS had no problem with the patch, I'm seeing build errors on the actual bots.
2981         This patch corrects the problem.
2982
2983         * NetworkProcess/NetworkProcess.cpp:
2984         (WebKit::NetworkProcess::logFrameNavigation):
2985         (WebKit::NetworkProcess::logUserInteraction):
2986
2987 2019-01-09  Brent Fulgham  <bfulgham@apple.com>
2988
2989         Create a WebResourceLoadStatisticsStore attached to the NetworkSession
2990         https://bugs.webkit.org/show_bug.cgi?id=193261
2991         <rdar://problem/47158616>
2992
2993         Reviewed by Alex Christensen.
2994
2995         This patch modifies NetworkSession so that it owns a WebResourceLoadStatisticsStore
2996         object. This object is only created if the ResourceLoadStatistics feature is turned on.
2997
2998         The patch also modifies WebResourceLoadStatisticsStore so that it can be constructed
2999         with an owning NetworkSession as an alternative to the current practice of using a
3000         WebsiteDataStore object.
3001
3002         Two initial messages from the WebContent process are added (logFrameNavigation and
3003         logUserNavigation) that notify the network process of these actions. Currently they
3004         are called in addition the calls to the WebsiteDataStore object. These redundant calls
3005         will be removed in a future patch.
3006
3007         This patch forces the ResourceLoadStatistics code in the NetworkSession to be off by
3008         default, so there should be no change in behavior with this patch.
3009
3010         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
3011         (WebKit::ResourceLoadStatisticsMemoryStore::updateClientSideCookiesAgeCap):
3012         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
3013         (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
3014         (WebKit::WebResourceLoadStatisticsStore::hasStorageAccessForFrame):
3015         (WebKit::WebResourceLoadStatisticsStore::callHasStorageAccessForFrameHandler):
3016         (WebKit::WebResourceLoadStatisticsStore::grantStorageAccess):
3017         (WebKit::WebResourceLoadStatisticsStore::callGrantStorageAccessHandler):
3018         (WebKit::WebResourceLoadStatisticsStore::removeAllStorageAccess):
3019         (WebKit::WebResourceLoadStatisticsStore::logFrameNavigation):
3020         (WebKit::WebResourceLoadStatisticsStore::logUserInteraction):
3021         (WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCapForPrevalentResources):
3022         (WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCap):
3023         (WebKit::WebResourceLoadStatisticsStore::updatePrevalentDomainsToBlockCookiesFor):
3024         (WebKit::WebResourceLoadStatisticsStore::callUpdatePrevalentDomainsToBlockCookiesForHandler):
3025         (WebKit::WebResourceLoadStatisticsStore::removePrevalentDomains):
3026         (WebKit::WebResourceLoadStatisticsStore::callRemoveDomainsHandler):
3027         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
3028         * NetworkProcess/NetworkProcess.cpp:
3029         (WebKit::NetworkProcess::initializeNetworkProcess):
3030         (WebKit::NetworkProcess::logFrameNavigation):
3031         (WebKit::NetworkProcess::logUserInteraction):
3032         * NetworkProcess/NetworkProcess.h:
3033         * NetworkProcess/NetworkProcess.messages.in:
3034         * NetworkProcess/NetworkSession.cpp:
3035         (WebKit::NetworkSession::enableResourceLoadStatistics):
3036         * NetworkProcess/NetworkSession.h:
3037         (WebKit::NetworkSession::resourceLoadStatistics const):
3038         * NetworkProcess/NetworkSessionCreationParameters.cpp:
3039         (WebKit::NetworkSessionCreationParameters::privateSessionParameters):
3040         (WebKit::NetworkSessionCreationParameters::encode const):
3041         (WebKit::NetworkSessionCreationParameters::decode):
3042         * NetworkProcess/NetworkSessionCreationParameters.h:
3043         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
3044         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
3045         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3046         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
3047         * UIProcess/Network/NetworkProcessProxy.cpp:
3048         (WebKit::NetworkProcessProxy::didLogUserInteraction):
3049         * UIProcess/Network/NetworkProcessProxy.h:
3050         * UIProcess/Network/NetworkProcessProxy.messages.in:
3051         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
3052         (WebsiteDataStore::parameters):
3053         * UIProcess/WebPageProxy.cpp:
3054         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
3055         (WebKit::WebPageProxy::logFrameNavigation):
3056         * UIProcess/WebPageProxy.h:
3057         * UIProcess/WebProcessPool.cpp:
3058         (WebKit::WebProcessPool::ensureNetworkProcess):
3059         (WebKit::WebProcessPool::initializeNewWebProcess):
3060
3061 2019-01-09  Alex Christensen  <achristensen@webkit.org>
3062
3063         Replace SessionTracker with HashMap member of NetworkProcess
3064         https://bugs.webkit.org/show_bug.cgi?id=193266
3065
3066         Reviewed by Joseph Pecoraro.
3067
3068         * NetworkProcess/Downloads/DownloadManager.cpp:
3069         (WebKit::DownloadManager::startDownload):
3070         * NetworkProcess/Downloads/DownloadManager.h:
3071         * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
3072         (WebKit::Download::resume):
3073         * NetworkProcess/NetworkCORSPreflightChecker.cpp:
3074         (WebKit::NetworkCORSPreflightChecker::startPreflight):
3075         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3076         (WebKit::NetworkConnectionToWebProcess::preconnectTo):
3077         (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
3078         (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
3079         (WebKit::NetworkConnectionToWebProcess::destroyLegacyPrivateBrowsingSession):
3080         * NetworkProcess/NetworkConnectionToWebProcess.h:
3081         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
3082         * NetworkProcess/NetworkProcess.cpp:
3083         (WebKit::NetworkProcess::initializeNetworkProcess):
3084         (WebKit::NetworkProcess::clearCachedCredentials):
3085         (WebKit::NetworkProcess::networkSession):
3086         (WebKit::NetworkProcess::setSession):
3087         (WebKit::NetworkProcess::destroySession):
3088         (WebKit::NetworkProcess::preconnectTo):
3089         * NetworkProcess/NetworkProcess.h:
3090         * NetworkProcess/NetworkResourceLoader.cpp:
3091         (WebKit::NetworkResourceLoader::startNetworkLoad):
3092         (WebKit::NetworkResourceLoader::didFinishLoading):
3093         (WebKit::NetworkResourceLoader::sendResultForCacheEntry):
3094         (WebKit::NetworkResourceLoader::shouldLogCookieInformation):
3095         (WebKit::NetworkResourceLoader::logCookieInformation const):
3096         (WebKit::logBlockedCookieInformation):
3097         (WebKit::logCookieInformationInternal):
3098         (WebKit::NetworkResourceLoader::logCookieInformation):
3099         * NetworkProcess/NetworkResourceLoader.h:
3100         * NetworkProcess/PingLoad.cpp:
3101         (WebKit::PingLoad::loadRequest):
3102         * NetworkProcess/PingLoad.h:
3103         * NetworkProcess/PreconnectTask.cpp:
3104         (WebKit::PreconnectTask::PreconnectTask):
3105         * NetworkProcess/PreconnectTask.h:
3106         * NetworkProcess/RemoteNetworkingContext.h:
3107         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
3108         (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
3109         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
3110         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3111         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
3112         * NetworkProcess/mac/RemoteNetworkingContext.mm:
3113         (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):
3114         * Shared/SessionTracker.cpp: Removed.
3115         * Shared/SessionTracker.h: Removed.
3116         * Sources.txt:
3117         * WebKit.xcodeproj/project.pbxproj:
3118         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3119         (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
3120         * WebProcess/Network/WebLoaderStrategy.cpp:
3121         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3122         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
3123         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
3124         * WebProcess/WebPage/WebPage.cpp:
3125         * WebProcess/WebProcess.cpp:
3126         (WebKit::WebProcess::destroyLegacyPrivateBrowsingSessionInNetworkProcess):
3127         * WebProcess/WebProcess.h:
3128         * WebProcess/cocoa/WebProcessCocoa.mm:
3129
3130 2019-01-09  Alex Christensen  <achristensen@webkit.org>
3131
3132         Expand use of sourceApplicationAuditData
3133         https://bugs.webkit.org/show_bug.cgi?id=192995
3134         <rdar://problem/46627875>
3135
3136         Reviewed by Brady Eidson.
3137
3138         sourceApplicationAuditData has been used for a long time on iOS, but it's needed on more platforms.
3139         I also made it return an Optional instead of a bool and returning by reference. Ahhh. So much nicer.
3140         The NetworkProcess needed an additional entitlement on Mac to continue to load anything, which is desirable.
3141
3142         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3143         (WebKit::NetworkProcess::sourceApplicationAuditData const):
3144         * Platform/IPC/Connection.h:
3145         * Platform/IPC/mac/ConnectionMac.mm:
3146         (IPC::Connection::getAuditToken):
3147         * WebProcess/WebProcess.cpp:
3148         (WebKit::WebProcess::initializeWebProcess):
3149         * WebProcess/cocoa/WebProcessCocoa.mm:
3150         (WebKit::WebProcess::sourceApplicationAuditData const):
3151
3152 2019-01-09  Brent Fulgham  <bfulgham@apple.com>
3153
3154         [iOS] Update sandbox profile to use iconservices instead of lsdiconservice
3155         https://bugs.webkit.org/show_bug.cgi?id=193115
3156         <rdar://problem/44867379>
3157
3158         Reviewed by Eric Carlson.
3159
3160         Add access to the 'com.apple.iconservices' endpoint. We will remove access to
3161         the older name ('com.apple.lsdiconservices') once existing clients have completed
3162         the switch.
3163
3164         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
3165
3166 2019-01-09  Antti Koivisto  <antti@apple.com>
3167
3168         [PSON] Flash of blank content while transitioning from page A to page B.
3169         https://bugs.webkit.org/show_bug.cgi?id=193283
3170
3171         Reviewed by Chris Dumez.
3172
3173         Layer tree is not frozen during WebPage construction. If the flush timer (started for the initial
3174         empty document) manages to run before the actual page load starts, we'll get a flash.
3175
3176         * Shared/WebPageCreationParameters.cpp:
3177         (WebKit::WebPageCreationParameters::encode const):
3178         (WebKit::WebPageCreationParameters::decode):
3179         * Shared/WebPageCreationParameters.h:
3180
3181         Rename shouldDelayAttachingDrawingArea bit to isSwapFromSuspended and make it available on all platforms.
3182
3183         * UIProcess/RemoteLayerTree/mac/ScrollerMac.h: Removed.
3184         * UIProcess/RemoteLayerTree/mac/ScrollerMac.mm: Removed.
3185         * UIProcess/RemoteLayerTree/mac/ScrollerPairMac.h: Removed.
3186         * UIProcess/RemoteLayerTree/mac/ScrollerPairMac.mm: Removed.
3187         * UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.cpp: Removed.
3188         * UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.h: Removed.
3189         * UIProcess/WebPageProxy.cpp:
3190         (WebKit::WebPageProxy::swapToWebProcess):
3191         (WebKit::WebPageProxy::finishAttachingToWebProcess):
3192         (WebKit::WebPageProxy::initializeWebPage):
3193         (WebKit::WebPageProxy::continueNavigationInNewProcess):
3194         * UIProcess/WebPageProxy.h:
3195         * WebProcess/WebPage/WebPage.cpp:
3196         (WebKit::m_shouldAttachDrawingAreaOnPageTransition):
3197
3198         Freeze the layer tree in WebPage constructor if this is a swap from a suspended process.
3199
3200         (WebKit::WebPage::reinitializeWebPage):
3201         (WebKit::WebPage::didCompletePageTransition):
3202
3203         Unfreeze on first non-initial empty document page transition.
3204
3205         * WebProcess/WebPage/WebPage.h:
3206         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3207         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
3208
3209 2019-01-09  Chris Dumez  <cdumez@apple.com>
3210
3211         WebKit Networking process crashes if the HTTPSUpgradeList is not found in the bundle
3212         https://bugs.webkit.org/show_bug.cgi?id=193285
3213         <rdar://problem/47147610>
3214
3215         Reviewed by Geoffrey Garen.
3216
3217         * NetworkProcess/NetworkHTTPSUpgradeChecker.cpp:
3218         (WebKit::networkHTTPSUpgradeCheckerDatabasePath):
3219         (WebKit::NetworkHTTPSUpgradeChecker::NetworkHTTPSUpgradeChecker):
3220
3221 2019-01-09  Michael Catanzaro  <mcatanzaro@igalia.com>
3222
3223         [GTK] Add missing autocleanups
3224         https://bugs.webkit.org/show_bug.cgi?id=193068
3225
3226         Reviewed by Carlos Garcia Campos.
3227
3228         * UIProcess/API/gtk/WebKitAutocleanups.h:
3229
3230 2019-01-08  Alex Christensen  <achristensen@webkit.org>
3231
3232         Fix CompletionHandler assertions introduced today.
3233         https://bugs.webkit.org/show_bug.cgi?id=193237
3234
3235         This reverts part of r239710 and all of r239725, r239738, and r239748 which unsuccessfully tried to fix all the assertions.
3236         This code is a mess that will have to be cleaned up later.
3237
3238         * NetworkProcess/NetworkResourceLoader.cpp:
3239         (WebKit::NetworkResourceLoader::tryStoreAsCacheEntry):
3240         * NetworkProcess/cache/CacheStorageEngine.cpp:
3241         (WebKit::CacheStorage::Engine::from):
3242         * NetworkProcess/cache/CacheStorageEngine.h:
3243         * NetworkProcess/cache/NetworkCache.cpp:
3244         (WebKit::NetworkCache::Cache::store):
3245         (WebKit::NetworkCache::Cache::remove):
3246         (WebKit::NetworkCache::Cache::traverse):
3247         (WebKit::NetworkCache::Cache::clear):
3248         (WebKit::NetworkCache::Cache::retrieveData):
3249         * NetworkProcess/cache/NetworkCache.h:
3250         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
3251         (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
3252         * NetworkProcess/cache/NetworkCacheStorage.cpp:
3253         (WebKit::NetworkCache::Storage::store):
3254         (WebKit::NetworkCache::Storage::WriteOperation::~WriteOperation): Deleted.
3255         * NetworkProcess/cache/NetworkCacheStorage.h:
3256         (WebKit::NetworkCache::Storage::store):
3257
3258 2019-01-08  Jiewen Tan  <jiewen_tan@apple.com>
3259
3260         [Mac] Layout Test http/wpt/webauthn/public-key-credential-create-success-hid.https.html and http/wpt/webauthn/public-key-credential-get-success-hid.https.html are flaky
3261         https://bugs.webkit.org/show_bug.cgi?id=192061
3262
3263         Reviewed by Dewei Zhu.
3264
3265         Part 6.
3266
3267         Add some additional temporary logging info to determine if data is actually sent.
3268         Once the bug is determined and fixed, we should remove all logging added in this patch.
3269
3270         * UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:
3271         (WebKit::MockHidConnection::send):
3272
3273 2019-01-08  Jiewen Tan  <jiewen_tan@apple.com>
3274
3275         [WebAuthN] Support U2F HID Authenticators on macOS
3276         https://bugs.webkit.org/show_bug.cgi?id=191535
3277         <rdar://problem/47102027>
3278
3279         Reviewed by Brent Fulgham.
3280
3281         This patch implements the support for U2F authenticators, and enables it for hid devices.
3282         It follows the CTAP spec to map WebAuthN requests to U2F commands and return the responses:
3283         https://fidoalliance.org/specs/fido-v2.0-id-20180227/fido-client-to-authenticator-protocol-v2.0-id-20180227.html#u2f-interoperability
3284         Most of the parts are done before this patch, this patch focues on: 7.2.2 and 7.3.2.
3285
3286         Besides implementing the U2fHidAuthenticator, this patch also adds support in the mocking
3287         environment for U2F authenticators. It is done by extending the stages in MockHidConnection
3288         from 4 to indefinite as multi-round communications are expected to map WebAuthN requests
3289         to U2F requests.
3290
3291         * Sources.txt:
3292         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
3293         (WKWebsiteDataStoreSetWebAuthenticationMockConfiguration):
3294         * UIProcess/WebAuthentication/Cocoa/HidService.mm:
3295         (WebKit::HidService::continueAddDeviceAfterGetInfo):
3296         * UIProcess/WebAuthentication/fido/CtapHidDriver.cpp:
3297         (WebKit::CtapHidDriver::continueAfterChannelAllocated):
3298         * UIProcess/WebAuthentication/fido/CtapHidDriver.h:
3299         (WebKit::CtapHidDriver::setProtocol):
3300         * UIProcess/WebAuthentication/fido/U2fHidAuthenticator.cpp: Added.
3301         (WebKit::U2fHidAuthenticator::U2fHidAuthenticator):
3302         (WebKit::U2fHidAuthenticator::makeCredential):
3303         (WebKit::U2fHidAuthenticator::checkExcludeList):
3304         (WebKit::U2fHidAuthenticator::issueRegisterCommand):
3305         (WebKit::U2fHidAuthenticator::getAssertion):
3306         (WebKit::U2fHidAuthenticator::issueSignCommand):
3307         (WebKit::U2fHidAuthenticator::issueNewCommand):
3308         (WebKit::U2fHidAuthenticator::issueCommand):
3309         (WebKit::U2fHidAuthenticator::responseReceived):
3310         (WebKit::U2fHidAuthenticator::continueRegisterCommandAfterResponseReceived):
3311         (WebKit::U2fHidAuthenticator::continueCheckOnlyCommandAfterResponseReceived):
3312         (WebKit::U2fHidAuthenticator::continueBogusCommandAfterResponseReceived):
3313         (WebKit::U2fHidAuthenticator::continueSignCommandAfterResponseReceived):
3314         * UIProcess/WebAuthentication/fido/U2fHidAuthenticator.h: Added.
3315         * UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:
3316         (WebKit::MockHidConnection::parseRequest):
3317         (WebKit::MockHidConnection::feedReports):
3318         * UIProcess/WebAuthentication/Mock/MockHidConnection.h:
3319         * UIProcess/WebAuthentication/Mock/MockWebAuthenticationConfiguration.h:
3320         * WebKit.xcodeproj/project.pbxproj:
3321
3322 2019-01-08  Youenn Fablet  <youenn@apple.com>
3323
3324         service worker fetch handler results in bad referrer
3325         https://bugs.webkit.org/show_bug.cgi?id=188248
3326         <rdar://problem/47050478>
3327
3328         Reviewed by Alex Christensen.
3329
3330         NetworkDataTaskCocoa is sometimes updating the referrer on its own.
3331         Instead of updating the referrer when sending the request to WebProcess for evaluation,
3332         Update the referrer once the web process decides to follow the redirection.
3333         This ensures that any referrer that the WebProcess will set will be updated by NetworkDataTaskCocoa.
3334
3335         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
3336         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
3337         (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
3338         (WebKit::NetworkDataTaskCocoa::restrictRequestReferrerToOriginIfNeeded):
3339         (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
3340
3341 2019-01-08  Alex Christensen  <achristensen@webkit.org>
3342
3343         Fix more assertions after r239710
3344         https://bugs.webkit.org/show_bug.cgi?id=193237
3345
3346         * NetworkProcess/cache/NetworkCacheStorage.h:
3347         (WebKit::NetworkCache::Storage::store):
3348         Make default parameter an empty lambda instead of a null CompletionHandler.
3349         This way it can be called once instead of thinking it has already been called.
3350
3351 2019-01-08  Brent Fulgham  <bfulgham@apple.com>
3352
3353         Move ResourceLoadStatistics files from UIProcess to NetworkProcess
3354         https://bugs.webkit.org/show_bug.cgi?id=193252
3355         <rdar://problem/47125401>
3356
3357         Reviewed by Alex Christensen.
3358
3359         This patch is the first part of a refactoring to move the ResourceLoadStatistics logic from the UIProcess to the NetworkProcess.
3360
3361         This patch moves code into different folders and adjusts necessary build files, but does not change where the code executes. These
3362         changes have no impact on behavior or test results.
3363
3364         I also modified a few files to add missing include files uncovered by the unified build system.
3365
3366         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp: Renamed from Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.cpp.
3367         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h: Renamed from Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.h.
3368         * NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.cpp: Renamed from Source/WebKit/UIProcess/ResourceLoadStatisticsPersistentStorage.cpp.
3369         * NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.h: Renamed from Source/WebKit/UIProcess/ResourceLoadStatisticsPersistentStorage.h.
3370         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: Renamed from Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp.
3371         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h: Renamed from Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h.
3372         * NetworkProcess/Classifier/WebResourceLoadStatisticsTelemetry.cpp: Renamed from Source/WebKit/UIProcess/WebResourceLoadStatisticsTelemetry.cpp.
3373         * NetworkProcess/Classifier/WebResourceLoadStatisticsTelemetry.h: Renamed from Source/WebKit/UIProcess/WebResourceLoadStatisticsTelemetry.h.
3374         * NetworkProcess/Downloads/PendingDownload.cpp:
3375         * NetworkProcess/Downloads/PendingDownload.h:
3376         * CMakeLists.txt:
3377         * PlatformMac.cmake:
3378         * PlatformWin.cmake:
3379         * Shared/PersistencyUtils.cpp: Renamed from Source/WebKit/UIProcess/PersistencyUtils.cpp.
3380         * Shared/PersistencyUtils.h: Renamed from Source/WebKit/UIProcess/PersistencyUtils.h.
3381         * Sources.txt:
3382         * SourcesCocoa.txt:
3383         * SourcesGTK.txt:
3384         * SourcesWPE.txt:
3385         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
3386         (WKWebsiteDataStoreSetWebAuthenticationMockConfiguration): Add missing WebKit:: scope.
3387         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: Add missing include.
3388         * UIProcess/WebDataListSuggestionsDropdown.cpp: Ditto.
3389         * UIProcess/mac/DisplayLink.cpp:
3390         * UnifiedSources-input.xcfilelist:
3391         * WebKit.xcodeproj/project.pbxproj:
3392
3393 2019-01-08  Chris Dumez  <cdumez@apple.com>