[WPE][Qt] loadingChanged signal parameter is unusable
[WebKit-https.git] / Source / WebKit / ChangeLog
1 2019-08-30  Philippe Normand  <pnormand@igalia.com>
2
3         [WPE][Qt] loadingChanged signal parameter is unusable
4         https://bugs.webkit.org/show_bug.cgi?id=201301
5
6         Reviewed by Carlos Garcia Campos.
7
8         * UIProcess/API/wpe/qt/WPEQtView.h: Explicitely name signal
9         parameter. It is a runtime requirement for QML.
10
11 2019-08-29  Keith Rollin  <krollin@apple.com>
12
13         Remove HAVE_PASSKIT_GRANULAR_ERRORS conditional
14         https://bugs.webkit.org/show_bug.cgi?id=201278
15         <rdar://problem/54821052>
16
17         Reviewed by Alex Christensen.
18
19         HAVE_PASSKIT_GRANULAR_ERRORS is always True, so remove the conditional
20         tests, keeping the True branches and removing the False branches.
21
22         * Platform/cocoa/PaymentAuthorizationPresenter.mm:
23         (WebKit::PaymentAuthorizationPresenter::completePaymentSession):
24         (WebKit::PaymentAuthorizationPresenter::completeShippingContactSelection):
25         * Platform/cocoa/PaymentAuthorizationViewController.mm:
26         (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didAuthorizePayment:completion:]): Deleted.
27         (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingMethod:completion:]): Deleted.
28         (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingContact:completion:]): Deleted.
29         (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectPaymentMethod:completion:]): Deleted.
30         * Platform/cocoa/WKPaymentAuthorizationDelegate.h:
31         * Platform/cocoa/WKPaymentAuthorizationDelegate.mm:
32         (-[WKPaymentAuthorizationDelegate completePaymentMethodSelection:]):
33         (-[WKPaymentAuthorizationDelegate completePaymentSession:errors:didReachFinalState:]):
34         (-[WKPaymentAuthorizationDelegate completeShippingContactSelection:summaryItems:shippingMethods:errors:]):
35         (-[WKPaymentAuthorizationDelegate completeShippingMethodSelection:]):
36         * Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
37         (WebKit::WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard):
38         (WebKit::toPKContactFields):
39         (WebKit::toNSSet):
40         (WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest):
41         (WebKit::toPKAddressField): Deleted.
42
43 2019-08-29  Chris Dumez  <cdumez@apple.com>
44
45         Add "IsolatedCopy" in the name of String getters that call isolatedCopy() on the string
46         https://bugs.webkit.org/show_bug.cgi?id=201318
47
48         Reviewed by Alex Christensen.
49
50         Add "IsolatedCopy" in the name of String getters that call isolatedCopy() on the string, for clarity.
51
52         * NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.cpp:
53         (WebKit::ResourceLoadStatisticsPersistentStorage::storageDirectoryPathIsolatedCopy const):
54         (WebKit::ResourceLoadStatisticsPersistentStorage::resourceLogFilePath const):
55         (WebKit::ResourceLoadStatisticsPersistentStorage::monitorDirectoryForNewStatistics):
56         * NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.h:
57         * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
58         (WebKit::NetworkCache::BlobStorage::blobDirectoryPathIsolatedCopy const):
59         (WebKit::NetworkCache::BlobStorage::synchronize):
60         (WebKit::NetworkCache::BlobStorage::blobPathForHash const):
61         * NetworkProcess/cache/NetworkCacheBlobStorage.h:
62         * NetworkProcess/cache/NetworkCacheStorage.cpp:
63         (WebKit::NetworkCache::Storage::basePathIsolatedCopy const):
64         (WebKit::NetworkCache::Storage::versionPath const):
65         (WebKit::NetworkCache::Storage::recordsPathIsolatedCopy const):
66         (WebKit::NetworkCache::Storage::synchronize):
67         (WebKit::NetworkCache::Storage::recordDirectoryPathForKey const):
68         (WebKit::NetworkCache::Storage::traverse):
69         (WebKit::NetworkCache::Storage::clear):
70         (WebKit::NetworkCache::Storage::shrink):
71         (WebKit::NetworkCache::Storage::deleteOldVersions):
72         * NetworkProcess/cache/NetworkCacheStorage.h:
73
74 2019-08-29  Keith Rollin  <krollin@apple.com>
75
76         Update .xcconfig symbols to reflect the current set of past and future product versions.
77         https://bugs.webkit.org/show_bug.cgi?id=200720
78         <rdar://problem/54305032>
79
80         Reviewed by Alex Christensen.
81
82         Remove version symbols related to old OS's we no longer support,
83         ensure that version symbols are defined for OS's we do support.
84
85         * Configurations/Base.xcconfig:
86         * Configurations/DebugRelease.xcconfig:
87         * Configurations/Version.xcconfig:
88
89 2019-08-29  Keith Rollin  <krollin@apple.com>
90
91         Invalid XPCServices symlinks are being created
92         https://bugs.webkit.org/show_bug.cgi?id=201320
93         <rdar://problem/54719612>
94
95         Reviewed by Dan Bernstein.
96
97         When performing incremental builds, errant XPCServices symlinks can be
98         created. For example, in the following, the second symlink is the
99         correct one. The first symlink gets created when the build process
100         tries to create the symlink and it already exists. When it already
101         exists, the command to create the symlink actually follows the
102         existing symlink and creates the (second) symlink at the location
103         where the first symlink points.
104
105             WebKit.framework/Versions/A/XPCServices/XPCServices@ -> Versions/Current/XPCServices
106             WebKit.framework/XPCServices@ -> Versions/Current/XPCServices
107
108         Address this by specifying -h to the `ln` command, which will cause it
109         to not follow symlinks if they already exist at the target.
110
111         Also, fix a benign issue where the Xcode build variable WRAPPER_NAME
112         was being referenced in a context where it wasn't defined.
113
114         * WebKit.xcodeproj/project.pbxproj:
115
116 2019-08-29  Alex Christensen  <achristensen@webkit.org>
117
118         Speculative loads should use the NetworkSession owning their Cache
119         https://bugs.webkit.org/show_bug.cgi?id=201314
120
121         Reviewed by Chris Dumez.
122
123         This provides a performance improvement when using non-default persistent WKWebsiteDataStores.
124
125         * NetworkProcess/NetworkSession.cpp:
126         (WebKit::NetworkSession::NetworkSession):
127         * NetworkProcess/cache/NetworkCache.cpp:
128         (WebKit::NetworkCache::Cache::open):
129         (WebKit::NetworkCache::Cache::Cache):
130         * NetworkProcess/cache/NetworkCache.h:
131         (WebKit::NetworkCache::Cache::sessionID const):
132         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
133         (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
134
135 2019-08-29  Wenson Hsieh  <wenson_hsieh@apple.com>
136
137         [iOS 13] Caret does not appear in text field if the body element is translated completely out of the viewport
138         https://bugs.webkit.org/show_bug.cgi?id=201287
139         <rdar://problem/54780864>
140
141         Reviewed by Tim Horton.
142
143         During EditorState computation, we use the hidden editable element heuristic to determine whether we should
144         begin suppressing selection gestures and UI. Currently, we use the editable root of the selection range to
145         determine where in the layer tree we should start our ascent, in search of a completely transparent or
146         completely clipped container.
147
148         However, in the case where the selection is inside a focused text field, this causes us to walk up the layer
149         tree starting at the RenderLayer corresponding to the text field's inner contenteditable div, which is different
150         than the text field's enclosing RenderLayer in the case where the containing block is transformed, such that no
151         part of it is within the visible viewport. This scenario is exercised by the below test case, in which the caret
152         after transforming the body horizontally by -100vw is hidden due to a false positive in the hidden editable area
153         heuristic.
154
155         Fix this by starting the layer tree ascent from the enclosing layer of the text form control if applicable,
156         instead of the inner editable area under the shadow root of the form control.
157
158         Test: editing/selection/ios/show-selection-in-transformed-container.html
159
160         * WebProcess/WebPage/ios/WebPageIOS.mm:
161         (WebKit::WebPage::platformEditorState const):
162
163 2019-08-29  Youenn Fablet  <youenn@apple.com>
164
165         Skip fetch event dispatching if no fetch event handler is added at script evaluation time
166         https://bugs.webkit.org/show_bug.cgi?id=201174
167
168         Reviewed by Chris Dumez.
169
170         Store whether a fetch event handler is set at script evaluation time.
171         If not, we skip the fetch event entirely so that the network load can start sooner.
172         If fetch event is skipped, we trigger soft update, as defined in
173         https://w3c.github.io/ServiceWorker/#handle-fetch step 16.
174
175         * NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
176         (WebKit::WebSWServerConnection::startFetch):
177         * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
178         (WebKit::WebSWServerToContextConnection::softUpdate):
179         * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
180         * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.messages.in:
181         * WebProcess/Storage/WebSWContextManagerConnection.cpp:
182         (WebKit::WebSWContextManagerConnection::serviceWorkerStarted):
183         (WebKit::WebSWContextManagerConnection::serviceWorkerFailedToStart):
184         (WebKit::WebSWContextManagerConnection::softUpdate):
185         * WebProcess/Storage/WebSWContextManagerConnection.h:
186         * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
187
188 2019-08-29  Keith Rollin  <krollin@apple.com>
189
190         Remove support for macOS < 10.13 (part 3)
191         https://bugs.webkit.org/show_bug.cgi?id=201224
192         <rdar://problem/54795934>
193
194         Reviewed by Darin Adler.
195
196         Remove symbols in WebKitTargetConditionals.xcconfig related to macOS
197         10.13, including WK_MACOS_1013 and WK_MACOS_BEFORE_1013, and suffixes
198         like _MACOS_SINCE_1013.
199
200         * Configurations/WebKitTargetConditionals.xcconfig:
201
202 2019-08-29  Youenn Fablet  <youenn@apple.com>
203
204         Use WebPageProxy callbacks in case of authentication challenge received from Service Worker
205         https://bugs.webkit.org/show_bug.cgi?id=201177
206
207         Reviewed by Alex Christensen.
208
209         Send topOrigin for every possible load to NetworkProcess.
210         Send topOrigin as part of authentication challenge to UIProcess.
211
212         If there is no corresponding page for the pageID, try getting a page
213         related to the service worker using the topOrigin and send the challenge to it.
214
215         * NetworkProcess/NetworkCORSPreflightChecker.cpp:
216         (WebKit::NetworkCORSPreflightChecker::didReceiveChallenge):
217         * NetworkProcess/NetworkCORSPreflightChecker.h:
218         * NetworkProcess/NetworkLoad.cpp:
219         (WebKit::NetworkLoad::didReceiveChallenge):
220         * NetworkProcess/NetworkLoadChecker.cpp:
221         (WebKit::NetworkLoadChecker::NetworkLoadChecker):
222         (WebKit::NetworkLoadChecker::checkCORSRequestWithPreflight):
223         * NetworkProcess/NetworkLoadChecker.h:
224         * NetworkProcess/NetworkLoadParameters.h:
225         * NetworkProcess/NetworkResourceLoadParameters.cpp:
226         (WebKit::NetworkResourceLoadParameters::encode const):
227         (WebKit::NetworkResourceLoadParameters::decode):
228         * NetworkProcess/NetworkResourceLoadParameters.h:
229         * NetworkProcess/NetworkResourceLoader.cpp:
230         (WebKit::m_shouldCaptureExtraNetworkLoadMetrics):
231         * NetworkProcess/PingLoad.cpp:
232         (WebKit::PingLoad::PingLoad):
233         (WebKit::PingLoad::didReceiveChallenge):
234         * Shared/Authentication/AuthenticationManager.cpp:
235         (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
236         * Shared/Authentication/AuthenticationManager.h:
237         * UIProcess/Network/NetworkProcessProxy.cpp:
238         (WebKit::NetworkProcessProxy::processAuthenticationChallenge):
239         (WebKit::NetworkProcessProxy::didReceiveAuthenticationChallenge):
240         * UIProcess/Network/NetworkProcessProxy.h:
241         * UIProcess/Network/NetworkProcessProxy.messages.in:
242         * UIProcess/WebPageProxy.cpp:
243         (WebKit::WebPageProxy::didReceiveAuthenticationChallengeProxy):
244         * UIProcess/WebPageProxy.h:
245         * WebProcess/Network/WebLoaderStrategy.cpp:
246         (WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
247         (WebKit::WebLoaderStrategy::loadResourceSynchronously):
248         (WebKit::WebLoaderStrategy::startPingLoad):
249
250 2019-08-29  Chris Dumez  <cdumez@apple.com>
251
252         Dissociate the WebPageProxy's identifier from the WebPage's
253         https://bugs.webkit.org/show_bug.cgi?id=201233
254
255         Reviewed by Alex Christensen.
256
257         Dissociate the WebPageProxy's identifier from the WebPage's. This will allow bumping the
258         WebPage's identifier everytime we create a WebPage in a new process in case of process
259         swap on navigation (Bug 201225).
260
261         * Shared/WebBackForwardListItem.cpp:
262         (WebKit::WebBackForwardListItem::create):
263         (WebKit::WebBackForwardListItem::WebBackForwardListItem):
264         * Shared/WebBackForwardListItem.h:
265         (WebKit::WebBackForwardListItem::pageID const):
266         * UIProcess/API/C/WKPage.cpp:
267         (WKPageSetPageLoaderClient):
268         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
269         (-[WKBrowsingContextController handle]):
270         * UIProcess/API/Cocoa/WKWebView.mm:
271         (-[WKWebView dealloc]):
272         (-[WKWebView _didCommitLayerTree:]):
273         (-[WKWebView _dispatchSetViewLayoutSize:]):
274         (-[WKWebView _cancelAnimatedResize]):
275         (-[WKWebView _remoteObjectRegistry]):
276         (-[WKWebView _handle]):
277         (-[WKWebView _focusTextInputContext:completionHandler:]):
278         (-[WKWebView _endAnimatedResize]):
279         (-[WKWebView _resizeWhileHidingContentWithUpdates:]):
280         (-[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride:]):
281         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
282         (-[WKWebsiteDataStore _getAllStorageAccessEntriesFor:completionHandler:]):
283         * UIProcess/API/glib/WebKitWebContext.cpp:
284         (webkitWebContextGetWebViewForPage):
285         * UIProcess/API/glib/WebKitWebView.cpp:
286         (webkit_web_view_get_page_id):
287         * UIProcess/Automation/WebAutomationSession.cpp:
288         (WebKit::WebAutomationSession::handleForWebPageProxy):
289         (WebKit::WebAutomationSession::switchToBrowsingContext):
290         (WebKit::WebAutomationSession::waitForNavigationToCompleteOnPage):
291         (WebKit::WebAutomationSession::respondToPendingPageNavigationCallbacksWithTimeout):
292         (WebKit::WebAutomationSession::navigationOccurredForFrame):
293         (WebKit::WebAutomationSession::documentLoadedForFrame):
294         (WebKit::WebAutomationSession::inspectorFrontendLoaded):
295         (WebKit::WebAutomationSession::mouseEventsFlushedForPage):
296         (WebKit::WebAutomationSession::keyboardEventsFlushedForPage):
297         (WebKit::WebAutomationSession::willClosePage):
298         (WebKit::WebAutomationSession::evaluateJavaScriptFunction):
299         (WebKit::WebAutomationSession::resolveChildFrameHandle):
300         (WebKit::WebAutomationSession::resolveParentFrameHandle):
301         (WebKit::WebAutomationSession::computeElementLayout):
302         (WebKit::WebAutomationSession::selectOptionElement):
303         (WebKit::WebAutomationSession::getAllCookies):
304         (WebKit::WebAutomationSession::deleteSingleCookie):
305         (WebKit::WebAutomationSession::inputDispatcherForPage):
306         (WebKit::WebAutomationSession::viewportInViewCenterPointOfElement):
307         (WebKit::WebAutomationSession::simulateMouseInteraction):
308         (WebKit::WebAutomationSession::simulateKeyboardInteraction):
309         (WebKit::WebAutomationSession::performMouseInteraction):
310         (WebKit::WebAutomationSession::performKeyboardInteractions):
311         (WebKit::WebAutomationSession::takeScreenshot):
312         * UIProcess/Automation/WebAutomationSession.h:
313         * UIProcess/Automation/mac/WebAutomationSessionMac.mm:
314         (WebKit::WebAutomationSession::inspectBrowsingContext):
315         * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm:
316         (WebKit::PlaybackSessionManagerProxy::PlaybackSessionManagerProxy):
317         (WebKit::PlaybackSessionManagerProxy::invalidate):
318         * UIProcess/Cocoa/TextCheckingController.mm:
319         (WebKit::TextCheckingController::replaceRelativeToSelection):
320         (WebKit::TextCheckingController::removeAnnotationRelativeToSelection):
321         * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
322         (WebKit::VideoFullscreenManagerProxy::VideoFullscreenManagerProxy):
323         (WebKit::VideoFullscreenManagerProxy::invalidate):
324         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
325         (WebKit::WebPageProxy::performDictionaryLookupAtLocation):
326         (WebKit::WebPageProxy::performDictionaryLookupOfCurrentSelection):
327         (WebKit::WebPageProxy::paymentCoordinatorAddMessageReceiver):
328         (WebKit::WebPageProxy::paymentCoordinatorRemoveMessageReceiver):
329         (WebKit::WebPageProxy::speakingErrorOccurred):
330         (WebKit::WebPageProxy::boundaryEventOccurred):
331         (WebKit::WebPageProxy::voicesDidChange):
332         * UIProcess/Cocoa/WebViewImpl.mm:
333         (WebKit::WebViewImpl::~WebViewImpl):
334         (WebKit::WebViewImpl::windowDidOrderOffScreen):
335         (WebKit::WebViewImpl::windowDidOrderOnScreen):
336         (WebKit::WebViewImpl::windowDidChangeOcclusionState):
337         (WebKit::WebViewImpl::viewDidHide):
338         (WebKit::WebViewImpl::viewDidUnhide):
339         (WebKit::WebViewImpl::activeSpaceDidChange):
340         (WebKit::WebViewImpl::remoteObjectRegistry):
341         * UIProcess/GeolocationPermissionRequestManagerProxy.cpp:
342         (WebKit::GeolocationPermissionRequestManagerProxy::didReceiveGeolocationPermissionDecision):
343         * UIProcess/InspectorTargetProxy.cpp:
344         (WebKit::InspectorTargetProxy::connect):
345         (WebKit::InspectorTargetProxy::disconnect):
346         (WebKit::InspectorTargetProxy::sendMessageToTargetBackend):
347         * UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp:
348         (WebKit::NotificationPermissionRequestManagerProxy::createRequest):
349         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
350         (WebKit::WebNotificationManagerProxy::show):
351         (WebKit::WebNotificationManagerProxy::cancel):
352         (WebKit::WebNotificationManagerProxy::didDestroyNotification):
353         (WebKit::pageIDsMatch):
354         (WebKit::pageAndNotificationIDsMatch):
355         (WebKit::WebNotificationManagerProxy::clearNotifications):
356         (WebKit::WebNotificationManagerProxy::providerDidShowNotification):
357         (WebKit::WebNotificationManagerProxy::providerDidClickNotification):
358         * UIProcess/Notifications/WebNotificationManagerProxy.h:
359         * UIProcess/ProvisionalPageProxy.cpp:
360         (WebKit::ProvisionalPageProxy::ProvisionalPageProxy):
361         (WebKit::ProvisionalPageProxy::~ProvisionalPageProxy):
362         (WebKit::ProvisionalPageProxy::processDidTerminate):
363         (WebKit::ProvisionalPageProxy::cancel):
364         (WebKit::ProvisionalPageProxy::initializeWebPage):
365         (WebKit::ProvisionalPageProxy::loadData):
366         (WebKit::ProvisionalPageProxy::loadRequest):
367         (WebKit::ProvisionalPageProxy::goToBackForwardItem):
368         (WebKit::ProvisionalPageProxy::didCreateMainFrame):
369         (WebKit::ProvisionalPageProxy::didStartProvisionalLoadForFrame):
370         (WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame):
371         (WebKit::ProvisionalPageProxy::didCommitLoadForFrame):
372         * UIProcess/ProvisionalPageProxy.h:
373         * UIProcess/RemoteWebInspectorProxy.cpp:
374         (WebKit::RemoteWebInspectorProxy::load):
375         (WebKit::RemoteWebInspectorProxy::sendMessageToFrontend):
376         (WebKit::RemoteWebInspectorProxy::createFrontendPageAndWindow):
377         (WebKit::RemoteWebInspectorProxy::closeFrontendPageAndWindow):
378         * UIProcess/SuspendedPageProxy.cpp:
379         (WebKit::SuspendedPageProxy::SuspendedPageProxy):
380         (WebKit::SuspendedPageProxy::~SuspendedPageProxy):
381         (WebKit::SuspendedPageProxy::unsuspend):
382         (WebKit::SuspendedPageProxy::close):
383         (WebKit::SuspendedPageProxy::didProcessRequestToSuspend):
384         (WebKit::SuspendedPageProxy::loggingString const):
385         * UIProcess/SuspendedPageProxy.h:
386         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
387         (WebKit::UserMediaPermissionRequestManagerProxy::captureDevicesChanged):
388         (WebKit::UserMediaPermissionRequestManagerProxy::denyRequest):
389         (WebKit::UserMediaPermissionRequestManagerProxy::finishGrantingRequest):
390         * UIProcess/ViewGestureController.cpp:
391         (WebKit::ViewGestureController::ViewGestureController):
392         (WebKit::ViewGestureController::~ViewGestureController):
393         (WebKit::ViewGestureController::disconnectFromProcess):
394         (WebKit::ViewGestureController::connectToProcess):
395         (WebKit::ViewGestureController::controllerForGesture):
396         (WebKit::ViewGestureController::forceRepaintIfNeeded):
397         (WebKit::ViewGestureController::requestRenderTreeSizeNotificationIfNeeded):
398         * UIProcess/ViewGestureController.h:
399         * UIProcess/VisitedLinkStore.cpp:
400         (WebKit::VisitedLinkStore::addVisitedLinkHashFromPage):
401         * UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp:
402         (WebKit::WebAuthenticatorCoordinatorProxy::WebAuthenticatorCoordinatorProxy):
403         (WebKit::WebAuthenticatorCoordinatorProxy::~WebAuthenticatorCoordinatorProxy):
404         * UIProcess/WebBackForwardList.cpp:
405         (WebKit::WebBackForwardList::itemForID):
406         (WebKit::WebBackForwardList::restoreFromState):
407         * UIProcess/WebEditCommandProxy.cpp:
408         (WebKit::WebEditCommandProxy::unapply):
409         (WebKit::WebEditCommandProxy::reapply):
410         * UIProcess/WebFrameProxy.cpp:
411         (WebKit::WebFrameProxy::loadURL):
412         (WebKit::WebFrameProxy::loadData):
413         (WebKit::WebFrameProxy::stopLoading const):
414         (WebKit::WebFrameProxy::collapseSelection):
415         * UIProcess/WebFullScreenManagerProxy.cpp:
416         (WebKit::WebFullScreenManagerProxy::WebFullScreenManagerProxy):
417         (WebKit::WebFullScreenManagerProxy::~WebFullScreenManagerProxy):
418         (WebKit::WebFullScreenManagerProxy::willEnterFullScreen):
419         (WebKit::WebFullScreenManagerProxy::didEnterFullScreen):
420         (WebKit::WebFullScreenManagerProxy::willExitFullScreen):
421         (WebKit::WebFullScreenManagerProxy::didExitFullScreen):
422         (WebKit::WebFullScreenManagerProxy::setAnimatingFullScreen):
423         (WebKit::WebFullScreenManagerProxy::requestExitFullScreen):
424         (WebKit::WebFullScreenManagerProxy::saveScrollPosition):
425         (WebKit::WebFullScreenManagerProxy::restoreScrollPosition):
426         (WebKit::WebFullScreenManagerProxy::setFullscreenInsets):
427         (WebKit::WebFullScreenManagerProxy::setFullscreenAutoHideDuration):
428         (WebKit::WebFullScreenManagerProxy::setFullscreenControlsHidden):
429         * UIProcess/WebInspectorProxy.cpp:
430         (WebKit::WebInspectorProxy::WebInspectorProxy):
431         (WebKit::WebInspectorProxy::invalidate):
432         (WebKit::WebInspectorProxy::sendMessageToFrontend):
433         (WebKit::WebInspectorProxy::connect):
434         (WebKit::WebInspectorProxy::close):
435         (WebKit::WebInspectorProxy::reset):
436         (WebKit::WebInspectorProxy::updateForNewPageProcess):
437         (WebKit::WebInspectorProxy::setFrontendConnection):
438         (WebKit::WebInspectorProxy::showConsole):
439         (WebKit::WebInspectorProxy::showResources):
440         (WebKit::WebInspectorProxy::showMainResourceForFrame):
441         (WebKit::WebInspectorProxy::attach):
442         (WebKit::WebInspectorProxy::detach):
443         (WebKit::WebInspectorProxy::togglePageProfiling):
444         (WebKit::WebInspectorProxy::toggleElementSelection):
445         (WebKit::WebInspectorProxy::createFrontendPage):
446         (WebKit::WebInspectorProxy::openLocalInspectorFrontend):
447         (WebKit::WebInspectorProxy::open):
448         (WebKit::WebInspectorProxy::closeFrontendPageAndWindow):
449         (WebKit::WebInspectorProxy::attachAvailabilityChanged):
450         * UIProcess/WebPageProxy.cpp:
451         (WebKit::WebPageProxy::WebPageProxy):
452         (WebKit::m_resetRecentCrashCountTimer):
453         (WebKit::WebPageProxy::~WebPageProxy):
454         (WebKit::WebPageProxy::setUIClient):
455         (WebKit::WebPageProxy::setIconLoadingClient):
456         (WebKit::WebPageProxy::launchProcess):
457         (WebKit::WebPageProxy::suspendCurrentPageIfPossible):
458         (WebKit::WebPageProxy::swapToWebProcess):
459         (WebKit::WebPageProxy::launchProcessForReload):
460         (WebKit::WebPageProxy::launchProcessWithItem):
461         (WebKit::WebPageProxy::initializeWebPage):
462         (WebKit::WebPageProxy::close):
463         (WebKit::WebPageProxy::tryClose):
464         (WebKit::WebPageProxy::loadRequest):
465         (WebKit::WebPageProxy::loadRequestWithNavigationShared):
466         (WebKit::WebPageProxy::loadFile):
467         (WebKit::WebPageProxy::loadData):
468         (WebKit::WebPageProxy::loadDataWithNavigationShared):
469         (WebKit::WebPageProxy::loadAlternateHTML):
470         (WebKit::WebPageProxy::loadWebArchiveData):
471         (WebKit::WebPageProxy::navigateToPDFLinkWithSimulatedClick):
472         (WebKit::WebPageProxy::stopLoading):
473         (WebKit::WebPageProxy::reload):
474         (WebKit::WebPageProxy::goToBackForwardItem):
475         (WebKit::WebPageProxy::tryRestoreScrollPosition):
476         (WebKit::WebPageProxy::setControlledByAutomation):
477         (WebKit::WebPageProxy::setIndicating):
478         (WebKit::WebPageProxy::createInspectorTargets):
479         (WebKit::WebPageProxy::setBackgroundColor):
480         (WebKit::WebPageProxy::setTopContentInset):
481         (WebKit::WebPageProxy::setUnderlayColor):
482         (WebKit::WebPageProxy::viewWillStartLiveResize):
483         (WebKit::WebPageProxy::viewWillEndLiveResize):
484         (WebKit::WebPageProxy::activityStateDidChange):
485         (WebKit::WebPageProxy::viewDidEnterWindow):
486         (WebKit::WebPageProxy::dispatchActivityStateChange):
487         (WebKit::WebPageProxy::layerHostingModeDidChange):
488         (WebKit::WebPageProxy::setInitialFocus):
489         (WebKit::WebPageProxy::clearSelection):
490         (WebKit::WebPageProxy::restoreSelectionInFocusedEditableElement):
491         (WebKit::WebPageProxy::validateCommand):
492         (WebKit::WebPageProxy::increaseListLevel):
493         (WebKit::WebPageProxy::decreaseListLevel):
494         (WebKit::WebPageProxy::changeListType):
495         (WebKit::WebPageProxy::setBaseWritingDirection):
496         (WebKit::WebPageProxy::setNeedsFontAttributes):
497         (WebKit::WebPageProxy::scheduleFullEditorStateUpdate):
498         (WebKit::WebPageProxy::selectAll):
499         (WebKit::WebPageProxy::executeEditCommand):
500         (WebKit::WebPageProxy::requestFontAttributesAtSelectionStart):
501         (WebKit::WebPageProxy::setEditable):
502         (WebKit::WebPageProxy::performDragControllerAction):
503         (WebKit::WebPageProxy::dragEnded):
504         (WebKit::WebPageProxy::didStartDrag):
505         (WebKit::WebPageProxy::dragCancelled):
506         (WebKit::WebPageProxy::processNextQueuedMouseEvent):
507         (WebKit::WebPageProxy::sendWheelEvent):
508         (WebKit::WebPageProxy::handleKeyboardEvent):
509         (WebKit::WebPageProxy::handleGestureEvent):
510         (WebKit::WebPageProxy::handleTouchEventSynchronously):
511         (WebKit::WebPageProxy::resetPotentialTapSecurityOrigin):
512         (WebKit::WebPageProxy::handleTouchEventAsynchronously):
513         (WebKit::WebPageProxy::handleTouchEvent):
514         (WebKit::WebPageProxy::cancelPointer):
515         (WebKit::WebPageProxy::touchWithIdentifierWasRemoved):
516         (WebKit::WebPageProxy::scrollBy):
517         (WebKit::WebPageProxy::centerSelectionInVisibleArea):
518         (WebKit::WebPageProxy::commitProvisionalPage):
519         (WebKit::WebPageProxy::continueNavigationInNewProcess):
520         (WebKit::WebPageProxy::setUserAgent):
521         (WebKit::WebPageProxy::resumeActiveDOMObjectsAndAnimations):
522         (WebKit::WebPageProxy::suspendActiveDOMObjectsAndAnimations):
523         (WebKit::WebPageProxy::setCustomTextEncodingName):
524         (WebKit::WebPageProxy::restoreFromSessionState):
525         (WebKit::WebPageProxy::setTextZoomFactor):
526         (WebKit::WebPageProxy::setPageZoomFactor):
527         (WebKit::WebPageProxy::setPageAndTextZoomFactors):
528         (WebKit::WebPageProxy::scalePage):
529         (WebKit::WebPageProxy::scalePageInViewCoordinates):
530         (WebKit::WebPageProxy::scaleView):
531         (WebKit::WebPageProxy::windowScreenDidChange):
532         (WebKit::WebPageProxy::accessibilitySettingsDidChange):
533         (WebKit::WebPageProxy::setUseFixedLayout):
534         (WebKit::WebPageProxy::setFixedLayoutSize):
535         (WebKit::WebPageProxy::setAlwaysShowsHorizontalScroller):
536         (WebKit::WebPageProxy::setAlwaysShowsVerticalScroller):
537         (WebKit::WebPageProxy::listenForLayoutMilestones):
538         (WebKit::WebPageProxy::setSuppressScrollbarAnimations):
539         (WebKit::WebPageProxy::setEnableVerticalRubberBanding):
540         (WebKit::WebPageProxy::setEnableHorizontalRubberBanding):
541         (WebKit::WebPageProxy::setBackgroundExtendsBeyondPage):
542         (WebKit::WebPageProxy::setPaginationMode):
543         (WebKit::WebPageProxy::setPaginationBehavesLikeColumns):
544         (WebKit::WebPageProxy::setPageLength):
545         (WebKit::WebPageProxy::setGapBetweenPages):
546         (WebKit::WebPageProxy::setPaginationLineGridEnabled):
547         (WebKit::WebPageProxy::findStringMatches):
548         (WebKit::WebPageProxy::findString):
549         (WebKit::WebPageProxy::getImageForFindMatch):
550         (WebKit::WebPageProxy::selectFindMatch):
551         (WebKit::WebPageProxy::indicateFindMatch):
552         (WebKit::WebPageProxy::hideFindUI):
553         (WebKit::WebPageProxy::countStringMatches):
554         (WebKit::WebPageProxy::replaceMatches):
555         (WebKit::WebPageProxy::runJavaScriptInMainFrameScriptWorld):
556         (WebKit::WebPageProxy::runJavaScriptInFrame):
557         (WebKit::WebPageProxy::getRenderTreeExternalRepresentation):
558         (WebKit::WebPageProxy::getSourceForFrame):
559         (WebKit::WebPageProxy::getContentsAsString):
560         (WebKit::WebPageProxy::getContentsAsAttributedString):
561         (WebKit::WebPageProxy::getBytecodeProfile):
562         (WebKit::WebPageProxy::getSamplingProfilerOutput):
563         (WebKit::WebPageProxy::getContentsAsMHTMLData):
564         (WebKit::WebPageProxy::getSelectionOrContentsAsString):
565         (WebKit::WebPageProxy::getSelectionAsWebArchiveData):
566         (WebKit::WebPageProxy::getMainResourceDataOfFrame):
567         (WebKit::WebPageProxy::getResourceDataFromFrame):
568         (WebKit::WebPageProxy::getWebArchiveOfFrame):
569         (WebKit::WebPageProxy::forceRepaint):
570         (WebKit::WebPageProxy::preferencesDidChange):
571         (WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
572         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared):
573         (WebKit::WebPageProxy::willPerformClientRedirectForFrame):
574         (WebKit::WebPageProxy::didCancelClientRedirectForFrame):
575         (WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
576         (WebKit::WebPageProxy::didCommitLoadForFrame):
577         (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
578         (WebKit::WebPageProxy::didFinishLoadForFrame):
579         (WebKit::WebPageProxy::didFailLoadForFrame):
580         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
581         (WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared):
582         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
583         (WebKit::WebPageProxy::decidePolicyForResponseShared):
584         (WebKit::WebPageProxy::willSubmitForm):
585         (WebKit::WebPageProxy::didNavigateWithNavigationDataShared):
586         (WebKit::WebPageProxy::didPerformClientRedirectShared):
587         (WebKit::WebPageProxy::didPerformServerRedirectShared):
588         (WebKit::trySOAuthorization):
589         (WebKit::WebPageProxy::createNewPage):
590         (WebKit::WebPageProxy::showShareSheet):
591         (WebKit::WebPageProxy::setMediaVolume):
592         (WebKit::WebPageProxy::setMuted):
593         (WebKit::WebPageProxy::stopMediaCapture):
594         (WebKit::WebPageProxy::stopAllMediaPlayback):
595         (WebKit::WebPageProxy::suspendAllMediaPlayback):
596         (WebKit::WebPageProxy::resumeAllMediaPlayback):
597         (WebKit::WebPageProxy::handleMediaEvent):
598         (WebKit::WebPageProxy::setVolumeOfMediaElement):
599         (WebKit::WebPageProxy::setMayStartMediaWhenInWindow):
600         (WebKit::WebPageProxy::didChooseColor):
601         (WebKit::WebPageProxy::didEndColorPicker):
602         (WebKit::WebPageProxy::didCloseSuggestions):
603         (WebKit::WebPageProxy::didSelectOption):
604         (WebKit::WebPageProxy::setAllowsMediaDocumentInlinePlayback):
605         (WebKit::WebPageProxy::backForwardAddItem):
606         (WebKit::WebPageProxy::messageSenderDestinationID const):
607         (WebKit::WebPageProxy::valueChangedForPopupMenu):
608         (WebKit::WebPageProxy::setTextFromItemForPopupMenu):
609         (WebKit::WebPageProxy::postMessageToInjectedBundle):
610         (WebKit::WebPageProxy::failedToShowPopupMenu):
611         (WebKit::WebPageProxy::showContextMenu):
612         (WebKit::WebPageProxy::contextMenuItemSelected):
613         (WebKit::WebPageProxy::handleContextMenuKeyEvent):
614         (WebKit::WebPageProxy::didChooseFilesForOpenPanelWithDisplayStringAndIcon):
615         (WebKit::WebPageProxy::didChooseFilesForOpenPanel):
616         (WebKit::WebPageProxy::didCancelForOpenPanel):
617         (WebKit::WebPageProxy::advanceToNextMisspelling):
618         (WebKit::WebPageProxy::changeSpellingToWord):
619         (WebKit::WebPageProxy::removeEditCommand):
620         (WebKit::WebPageProxy::didFinishCheckingText):
621         (WebKit::WebPageProxy::didCancelCheckingText):
622         (WebKit::WebPageProxy::didReceiveEvent):
623         (WebKit::WebPageProxy::processDidBecomeUnresponsive):
624         (WebKit::WebPageProxy::processDidBecomeResponsive):
625         (WebKit::WebPageProxy::dispatchProcessDidTerminate):
626         (WebKit::WebPageProxy::gamepadActivity):
627         (WebKit::WebPageProxy::updateWebsitePolicies):
628         (WebKit::WebPageProxy::backForwardRemovedItem):
629         (WebKit::WebPageProxy::setCanRunModal):
630         (WebKit::WebPageProxy::beginPrinting):
631         (WebKit::WebPageProxy::endPrinting):
632         (WebKit::WebPageProxy::computePagesForPrinting):
633         (WebKit::WebPageProxy::drawRectToImage):
634         (WebKit::WebPageProxy::drawPagesToPDF):
635         (WebKit::WebPageProxy::drawPagesForPrinting):
636         (WebKit::WebPageProxy::setMinimumSizeForAutoLayout):
637         (WebKit::WebPageProxy::setAutoSizingShouldExpandToViewHeight):
638         (WebKit::WebPageProxy::setViewportSizeForCSSViewportUnits):
639         (WebKit::WebPageProxy::handleAlternativeTextUIResult):
640         (WebKit::WebPageProxy::setComposition):
641         (WebKit::WebPageProxy::confirmComposition):
642         (WebKit::WebPageProxy::cancelComposition):
643         (WebKit::WebPageProxy::setScrollPinningBehavior):
644         (WebKit::WebPageProxy::setOverlayScrollbarStyle):
645         (WebKit::WebPageProxy::addMIMETypeWithCustomContentProvider):
646         (WebKit::WebPageProxy::changeFontAttributes):
647         (WebKit::WebPageProxy::changeFont):
648         (WebKit::WebPageProxy::setTextAsync):
649         (WebKit::WebPageProxy::insertTextAsync):
650         (WebKit::WebPageProxy::hasMarkedText):
651         (WebKit::WebPageProxy::getMarkedRangeAsync):
652         (WebKit::WebPageProxy::getSelectedRangeAsync):
653         (WebKit::WebPageProxy::characterIndexForPointAsync):
654         (WebKit::WebPageProxy::firstRectForCharacterRangeAsync):
655         (WebKit::WebPageProxy::setCompositionAsync):
656         (WebKit::WebPageProxy::confirmCompositionAsync):
657         (WebKit::WebPageProxy::takeSnapshot):
658         (WebKit::WebPageProxy::requestActiveNowPlayingSessionInfo):
659         (WebKit::WebPageProxy::performImmediateActionHitTestAtLocation):
660         (WebKit::WebPageProxy::immediateActionDidUpdate):
661         (WebKit::WebPageProxy::immediateActionDidCancel):
662         (WebKit::WebPageProxy::immediateActionDidComplete):
663         (WebKit::WebPageProxy::handleAcceptedCandidate):
664         (WebKit::WebPageProxy::setUseSystemAppearance):
665         (WebKit::WebPageProxy::setHeaderBannerHeightForTesting):
666         (WebKit::WebPageProxy::setFooterBannerHeightForTesting):
667         (WebKit::WebPageProxy::setShouldDispatchFakeMouseMoveEvents):
668         (WebKit::WebPageProxy::setPlaybackTarget):
669         (WebKit::WebPageProxy::externalOutputDeviceAvailableDidChange):
670         (WebKit::WebPageProxy::setShouldPlayToPlaybackTarget):
671         (WebKit::WebPageProxy::clearWheelEventTestTrigger):
672         (WebKit::WebPageProxy::setShouldScaleViewToFitDocument):
673         (WebKit::WebPageProxy::getLoadDecisionForIcon):
674         (WebKit::WebPageProxy::setResourceCachingDisabled):
675         (WebKit::WebPageProxy::setUserInterfaceLayoutDirection):
676         (WebKit::WebPageProxy::didAllowPointerLock):
677         (WebKit::WebPageProxy::didDenyPointerLock):
678         (WebKit::WebPageProxy::requestPointerUnlock):
679         (WebKit::WebPageProxy::setURLSchemeHandlerForScheme):
680         (WebKit::WebPageProxy::didCommitCrossSiteLoadWithDataTransferFromPrevalentResource):
681         (WebKit::WebPageProxy::effectiveAppearanceDidChange):
682         (WebKit::WebPageProxy::insertAttachment):
683         (WebKit::WebPageProxy::updateAttachmentAttributes):
684         (WebKit::WebPageProxy::getApplicationManifest):
685         (WebKit::WebPageProxy::setDefersLoadingForTesting):
686         (WebKit::WebPageProxy::updateCurrentModifierState):
687         (WebKit::WebPageProxy::simulateDeviceOrientationChange):
688         (WebKit::WebPageProxy::detectDataInAllFrames):
689         (WebKit::WebPageProxy::removeDataDetectedLinks):
690         (WebKit::WebPageProxy::textInputContextsInRect):
691         (WebKit::WebPageProxy::focusTextInputContext):
692         * UIProcess/WebPageProxy.h:
693         (WebKit::WebPageProxy::identifier const):
694         (WebKit::WebPageProxy::webPageID const):
695         * UIProcess/WebPageProxyIdentifier.h: Added.
696         * UIProcess/WebProcessPool.cpp:
697         (WebKit::WebProcessPool::pageBeginUsingWebsiteDataStore):
698         (WebKit::WebProcessPool::pageEndUsingWebsiteDataStore):
699         * UIProcess/WebProcessPool.h:
700         * UIProcess/WebProcessProxy.cpp:
701         (WebKit::WebProcessProxy::webPage):
702         (WebKit::WebProcessProxy::addExistingWebPage):
703         (WebKit::WebProcessProxy::removeWebPage):
704         (WebKit::WebProcessProxy::addVisitedLinkStoreUser):
705         (WebKit::WebProcessProxy::removeVisitedLinkStoreUser):
706         (WebKit::WebProcessProxy::hasProvisionalPageWithID const):
707         (WebKit::WebProcessProxy::isAllowedToUpdateBackForwardItem const):
708         (WebKit::WebProcessProxy::transformObjectsToHandles):
709         * UIProcess/WebProcessProxy.h:
710         * UIProcess/WebURLSchemeHandler.cpp:
711         (WebKit::WebURLSchemeHandler::startTask):
712         (WebKit::WebURLSchemeHandler::stopAllTasksForPage):
713         (WebKit::WebURLSchemeHandler::stopTask):
714         (WebKit::WebURLSchemeHandler::removeTaskFromPageMap):
715         * UIProcess/WebURLSchemeHandler.h:
716         * UIProcess/WebURLSchemeTask.cpp:
717         (WebKit::WebURLSchemeTask::WebURLSchemeTask):
718         (WebKit::WebURLSchemeTask::didPerformRedirection):
719         (WebKit::WebURLSchemeTask::didReceiveResponse):
720         (WebKit::WebURLSchemeTask::didReceiveData):
721         (WebKit::WebURLSchemeTask::didComplete):
722         * UIProcess/WebURLSchemeTask.h:
723         (WebKit::WebURLSchemeTask::pageID const):
724         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
725         (WebKit::WebsiteDataStore::getAllStorageAccessEntries):
726         * UIProcess/WebsiteData/WebsiteDataStore.h:
727         * UIProcess/gtk/WebPageProxyGtk.cpp:
728         (WebKit::WebPageProxy::getCenterForZoomGesture):
729         * UIProcess/ios/EditableImageController.mm:
730         (WebKit::EditableImageController::EditableImageController):
731         (WebKit::EditableImageController::~EditableImageController):
732         * UIProcess/ios/SmartMagnificationController.mm:
733         (WebKit::SmartMagnificationController::SmartMagnificationController):
734         (WebKit::SmartMagnificationController::~SmartMagnificationController):
735         (WebKit::SmartMagnificationController::handleSmartMagnificationGesture):
736         * UIProcess/ios/ViewGestureControllerIOS.mm:
737         (WebKit::ViewGestureController::beginSwipeGesture):
738         (WebKit::ViewGestureController::endSwipeGesture):
739         * UIProcess/ios/WKContentView.mm:
740         (-[WKContentView _wk_printedDocument]):
741         * UIProcess/ios/WKContentViewInteraction.mm:
742         (-[WKContentView ensurePositionInformationIsUpToDate:]):
743         (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
744         * UIProcess/ios/WebPageProxyIOS.mm:
745         (WebKit::WebPageProxy::requestFocusedElementInformation):
746         (WebKit::WebPageProxy::updateVisibleContentRects):
747         (WebKit::WebPageProxy::resendLastVisibleContentRects):
748         (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
749         (WebKit::WebPageProxy::setViewportConfigurationViewLayoutSize):
750         (WebKit::WebPageProxy::setForceAlwaysUserScalable):
751         (WebKit::WebPageProxy::setMaximumUnobscuredSize):
752         (WebKit::WebPageProxy::setDeviceOrientation):
753         (WebKit::WebPageProxy::setOverrideViewportArguments):
754         (WebKit::WebPageProxy::selectWithGesture):
755         (WebKit::WebPageProxy::updateSelectionWithTouches):
756         (WebKit::WebPageProxy::replaceDictatedText):
757         (WebKit::WebPageProxy::replaceSelectedText):
758         (WebKit::WebPageProxy::requestAutocorrectionData):
759         (WebKit::WebPageProxy::applyAutocorrection):
760         (WebKit::WebPageProxy::selectTextWithGranularityAtPoint):
761         (WebKit::WebPageProxy::selectPositionAtBoundaryWithDirection):
762         (WebKit::WebPageProxy::moveSelectionAtBoundaryWithDirection):
763         (WebKit::WebPageProxy::selectPositionAtPoint):
764         (WebKit::WebPageProxy::beginSelectionInDirection):
765         (WebKit::WebPageProxy::updateSelectionWithExtentPoint):
766         (WebKit::WebPageProxy::updateSelectionWithExtentPointAndBoundary):
767         (WebKit::WebPageProxy::requestDictationContext):
768         (WebKit::WebPageProxy::requestAutocorrectionContext):
769         (WebKit::WebPageProxy::getSelectionContext):
770         (WebKit::WebPageProxy::handleTwoFingerTapAtPoint):
771         (WebKit::WebPageProxy::handleStylusSingleTapAtPoint):
772         (WebKit::WebPageProxy::selectWithTwoTouches):
773         (WebKit::WebPageProxy::requestPositionInformation):
774         (WebKit::WebPageProxy::startInteractionWithElementAtPosition):
775         (WebKit::WebPageProxy::stopInteraction):
776         (WebKit::WebPageProxy::performActionOnElement):
777         (WebKit::WebPageProxy::applicationDidEnterBackground):
778         (WebKit::WebPageProxy::applicationDidFinishSnapshottingAfterEnteringBackground):
779         (WebKit::WebPageProxy::applicationWillEnterForeground):
780         (WebKit::WebPageProxy::applicationWillResignActive):
781         (WebKit::WebPageProxy::applicationDidBecomeActive):
782         (WebKit::WebPageProxy::extendSelection):
783         (WebKit::WebPageProxy::selectWordBackward):
784         (WebKit::WebPageProxy::requestRectsForGranularityWithSelectionOffset):
785         (WebKit::WebPageProxy::requestRectsAtSelectionOffsetWithText):
786         (WebKit::WebPageProxy::storeSelectionForAccessibility):
787         (WebKit::WebPageProxy::startAutoscrollAtPosition):
788         (WebKit::WebPageProxy::cancelAutoscroll):
789         (WebKit::WebPageProxy::moveSelectionByOffset):
790         (WebKit::WebPageProxy::registerUIProcessAccessibilityTokens):
791         (WebKit::WebPageProxy::willStartUserTriggeredZooming):
792         (WebKit::WebPageProxy::potentialTapAtPosition):
793         (WebKit::WebPageProxy::commitPotentialTap):
794         (WebKit::WebPageProxy::cancelPotentialTap):
795         (WebKit::WebPageProxy::tapHighlightAtPosition):
796         (WebKit::WebPageProxy::handleTap):
797         (WebKit::WebPageProxy::didRecognizeLongPress):
798         (WebKit::WebPageProxy::handleDoubleTapForDoubleClickAtPoint):
799         (WebKit::WebPageProxy::inspectorNodeSearchMovedToPosition):
800         (WebKit::WebPageProxy::inspectorNodeSearchEndedAtPosition):
801         (WebKit::WebPageProxy::blurFocusedElement):
802         (WebKit::WebPageProxy::setIsShowingInputViewForFocusedElement):
803         (WebKit::WebPageProxy::autofillLoginCredentials):
804         (WebKit::WebPageProxy::focusNextFocusedElement):
805         (WebKit::WebPageProxy::setFocusedElementValue):
806         (WebKit::WebPageProxy::setFocusedElementValueAsNumber):
807         (WebKit::WebPageProxy::setFocusedElementSelectedIndex):
808         (WebKit::WebPageProxy::computePagesForPrintingAndDrawToPDF):
809         (WebKit::WebPageProxy::contentSizeCategoryDidChange):
810         (WebKit::WebPageProxy::generateSyntheticEditingCommand):
811         (WebKit::WebPageProxy::hardwareKeyboardAvailabilityChanged):
812         (WebKit::WebPageProxy::requestEvasionRectsAboveSelection):
813         (WebKit::WebPageProxy::updateSelectionWithDelta):
814         (WebKit::WebPageProxy::requestDocumentEditingContext):
815         (WebKit::WebPageProxy::requestDragStart):
816         (WebKit::WebPageProxy::requestAdditionalItemsForDragSession):
817         (WebKit::WebPageProxy::didConcludeDrop):
818         (WebKit::WebPageProxy::didRequestPasswordForQuickLookDocumentInMainFrameShared):
819         * UIProcess/mac/RemoteWebInspectorProxyMac.mm:
820         (WebKit::RemoteWebInspectorProxy::platformSave):
821         (WebKit::RemoteWebInspectorProxy::platformAppend):
822         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
823         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateActivityState):
824         * UIProcess/mac/ViewGestureControllerMac.mm:
825         (WebKit::ViewGestureController::handleMagnificationGestureEvent):
826         (WebKit::ViewGestureController::handleSmartMagnificationGesture):
827         * UIProcess/mac/WKImmediateActionController.mm:
828         (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
829         * UIProcess/mac/WebInspectorProxyMac.mm:
830         (WebKit::WebInspectorProxy::platformSave):
831         (WebKit::WebInspectorProxy::platformAppend):
832         * UIProcess/mac/WebPageProxyMac.mm:
833         (WebKit::WebPageProxy::windowAndViewFramesChanged):
834         (WebKit::WebPageProxy::setMainFrameIsScrollable):
835         (WebKit::WebPageProxy::insertDictatedTextAsync):
836         (WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
837         (WebKit::WebPageProxy::fontAtSelection):
838         (WebKit::WebPageProxy::stringSelectionForPasteboard):
839         (WebKit::WebPageProxy::dataSelectionForPasteboard):
840         (WebKit::WebPageProxy::readSelectionFromPasteboard):
841         (WebKit::WebPageProxy::replaceSelectionWithPasteboardData):
842         (WebKit::WebPageProxy::sendComplexTextInputToPlugin):
843         (WebKit::WebPageProxy::uppercaseWord):
844         (WebKit::WebPageProxy::lowercaseWord):
845         (WebKit::WebPageProxy::capitalizeWord):
846         (WebKit::WebPageProxy::setSmartInsertDeleteEnabled):
847         (WebKit::WebPageProxy::registerUIProcessAccessibilityTokens):
848         (WebKit::WebPageProxy::shouldDelayWindowOrderingForEvent):
849         (WebKit::WebPageProxy::acceptsFirstMouse):
850         * WebKit.xcodeproj/project.pbxproj:
851
852 2019-08-29  Chris Dumez  <cdumez@apple.com>
853
854         Use inline data member initialization in ProcessLauncher
855         https://bugs.webkit.org/show_bug.cgi?id=201247
856
857         Reviewed by Ryosuke Niwa.
858
859         * UIProcess/Launcher/ProcessLauncher.cpp:
860         (WebKit::ProcessLauncher::ProcessLauncher):
861         * UIProcess/Launcher/ProcessLauncher.h:
862
863 2019-08-28  Tim Horton  <timothy_horton@apple.com>
864
865         Reloading a web view with a fixed-width viewport and variable content width restores the previous page scale, shouldn't
866         https://bugs.webkit.org/show_bug.cgi?id=201256
867         <rdar://problem/54809509>
868
869         Reviewed by Simon Fraser.
870
871         * WebProcess/WebPage/ios/WebPageIOS.mm:
872         (WebKit::WebPage::restorePageState):
873         When restoring page state from a history item, if the saved scale was equal to the
874         initial scale at the time it was saved, ignore the saved scale and use the current
875         initial scale instead.
876
877         Normally this doesn't matter because a given page's initial scale doesn't usually change
878         between loads, but it totally can! See the test for one example of a way an API client
879         might cause this; you could also imagine something similar happening if the actual
880         page content changed.
881
882 2019-08-28  Megan Gardner  <megan_gardner@apple.com>
883
884         Null check webFrame when creating a print preview to prevent a crash.
885         https://bugs.webkit.org/show_bug.cgi?id=201237
886         <rdar://problem/51618863>
887
888         Reviewed by Tim Horton.
889
890         Move and expend a null check to keep from crashing when making a print preview.
891
892         * UIProcess/mac/WKPrintingView.mm:
893         (-[WKPrintingView _drawPreview:]):
894         (-[WKPrintingView drawRect:]):
895
896 2019-08-28  Said Abou-Hallawa  <sabouhallawa@apple.com>
897
898         All image drawing functions should take an argument of type ImagePaintingOptions
899         https://bugs.webkit.org/show_bug.cgi?id=201059
900
901         Reviewed by Simon Fraser.
902
903         GraphicsContext::drawImage() now takes an ImagePaintingOptions.
904
905         * WebProcess/WebPage/ios/WebPageIOS.mm:
906         (WebKit::imagePositionInformation):
907
908 2019-08-28  Keith Rollin  <krollin@apple.com>
909
910         Remove support for macOS < 10.13 (part 2)
911         https://bugs.webkit.org/show_bug.cgi?id=201197
912         <rdar://problem/54759985>
913
914         Reviewed by Darin Adler.
915
916         Update conditionals that reference WK_MACOS_1013 and suffixes like
917         _MACOS_SINCE_1013, assuming that we're always building on 10.13 or
918         later and that these conditionals are always True or False.
919
920         See Bug 200694 for earlier changes in this area.
921
922         * Configurations/FeatureDefines.xcconfig:
923         * Configurations/WebKit.xcconfig:
924
925 2019-08-28  Chris Dumez  <cdumez@apple.com>
926
927         Have WebPageProxy generate the page identifier by itself
928         https://bugs.webkit.org/show_bug.cgi?id=201223
929
930         Reviewed by Ryosuke Niwa.
931
932         Have WebPageProxy generate the page identifier by itself instead of
933         having the WebProcessProxy do it.
934
935         * UIProcess/ServiceWorkerProcessProxy.cpp:
936         (WebKit::m_serviceWorkerPageID):
937         * UIProcess/WebPageProxy.cpp:
938         (WebKit::WebPageProxy::create):
939         (WebKit::WebPageProxy::WebPageProxy):
940         * UIProcess/WebPageProxy.h:
941         * UIProcess/WebProcessProxy.cpp:
942         (WebKit::WebProcessProxy::createWebPage):
943         (WebKit::WebProcessProxy::generatePageID): Deleted.
944         * UIProcess/WebProcessProxy.h:
945
946 2019-08-28  Carlos Garcia Campos  <cgarcia@igalia.com>
947
948         REGRESSION(r243434): Wrong URL passed to WebKitWebView::load-failed when cancelling previous load
949         https://bugs.webkit.org/show_bug.cgi?id=201176
950
951         Reviewed by Žan Doberšek.
952
953         Use the current provisional/committed url when faking an error event, instead of the current active URI that can
954         be the pending api request of a new load.
955
956         * UIProcess/API/glib/WebKitWebView.cpp:
957         (webkitWebViewWillStartLoad):
958
959 2019-08-28  Claudio Saavedra  <csaavedra@igalia.com>
960
961         [GTK][WPE] Implement HSTS for the soup network backend
962         https://bugs.webkit.org/show_bug.cgi?id=192074
963
964         Reviewed by Carlos Garcia Campos.
965
966         libsoup 2.67.1 introduced HSTS support via a SoupSessionFeature.
967         Add support to the soup network backend by adding the feature to
968         SoupNetworkSession and handling HSTS protocol upgrades, by
969         propagating the scheme change further to clients. This patch adds
970         the HSTS feature unconditionally, but it still possible to add
971         a boolean property to the web context class if desired.
972
973         Additionally, add API to the WebKitWebsiteDataManager to specify
974         the directory where the HSTS database is saved. If the directory
975         is not set or if the data manager is ephemeral, use a
976         non-persistent, memory only HSTS enforcer.
977
978         Implement as well the methods needed to clean-up and delete HSTS
979         policies from the storage and expose the feature in GTK+
980         MiniBrowser's about:data.
981
982         * NetworkProcess/NetworkProcess.cpp:
983         (WebKit::NetworkProcess::fetchWebsiteData):
984         (WebKit::NetworkProcess::deleteWebsiteData):
985         (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
986         (WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomains):
987         (WebKit::NetworkProcess::registrableDomainsWithWebsiteData):
988         * NetworkProcess/NetworkProcess.h:
989         (WebKit::NetworkProcess::suppressesConnectionTerminationOnSystemChange const):
990         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
991         (WebKit::NetworkDataTaskSoup::createRequest):
992         (WebKit::NetworkDataTaskSoup::clearRequest):
993         (WebKit::NetworkDataTaskSoup::shouldAllowHSTSPolicySetting const):
994         (WebKit::NetworkDataTaskSoup::shouldAllowHSTSProtocolUpgrade const):
995         (WebKit::NetworkDataTaskSoup::protocolUpgradedViaHSTS):
996         (WebKit::NetworkDataTaskSoup::hstsEnforced):
997         * NetworkProcess/soup/NetworkDataTaskSoup.h:
998         * NetworkProcess/soup/NetworkProcessSoup.cpp:
999         (WebKit::NetworkProcess::getHostNamesWithHSTSCache):
1000         (WebKit::NetworkProcess::deleteHSTSCacheForHostNames):
1001         (WebKit::NetworkProcess::clearHSTSCache):
1002         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
1003         * UIProcess/API/APIWebsiteDataStore.h:
1004         * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp:
1005         (API::WebsiteDataStore::defaultHSTSDirectory):
1006         * UIProcess/API/glib/WebKitWebContext.cpp:
1007         (webkitWebContextConstructed):
1008         * UIProcess/API/glib/WebKitWebsiteData.cpp:
1009         (recordContainsSupportedDataTypes):
1010         (toWebKitWebsiteDataTypes):
1011         * UIProcess/API/glib/WebKitWebsiteDataManager.cpp:
1012         (webkitWebsiteDataManagerGetProperty):
1013         (webkitWebsiteDataManagerSetProperty):
1014         (webkitWebsiteDataManagerConstructed):
1015         (webkit_website_data_manager_class_init):
1016         (webkitWebsiteDataManagerGetDataStore):
1017         (webkit_website_data_manager_get_hsts_cache_directory):
1018         (toWebsiteDataTypes):
1019         * UIProcess/API/gtk/WebKitWebsiteData.h:
1020         * UIProcess/API/gtk/WebKitWebsiteDataManager.h:
1021         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
1022         * UIProcess/API/wpe/WebKitWebsiteData.h:
1023         * UIProcess/API/wpe/WebKitWebsiteDataManager.h:
1024         * UIProcess/API/wpe/docs/wpe-1.0-sections.txt:
1025         * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:
1026         (WebKit::WebsiteDataStoreConfiguration::copy):
1027         * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:
1028         (WebKit::WebsiteDataStoreConfiguration::hstsStorageDirectory const):
1029         (WebKit::WebsiteDataStoreConfiguration::setHSTSStorageDirectory):
1030
1031 2019-08-27  Mark Lam  <mark.lam@apple.com>
1032
1033         Refactor to use VM& instead of VM* at as many places as possible.
1034         https://bugs.webkit.org/show_bug.cgi?id=201172
1035
1036         Reviewed by Yusuke Suzuki.
1037
1038         * WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMNode.cpp:
1039         (webkit_dom_node_for_js_value):
1040         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
1041         (WebKit::InjectedBundleNodeHandle::getOrCreate):
1042         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1043         (WebKit::JSNPObject::getOwnPropertyNames):
1044         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
1045         (WebKit::identifierFromIdentifierRep):
1046         (WebKit::NPJSObject::enumerate):
1047         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
1048         (WebKit::NPRuntimeObjectMap::convertNPVariantToJSValue):
1049         (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
1050         * WebProcess/WebPage/WebFrame.cpp:
1051         (WebKit::WebFrame::counterValue):
1052
1053 2019-08-27  James Savage  <james.savage@apple.com>
1054
1055         Populate alternate URL for _WKActivatedElementInfo in UIContextMenu SPI.
1056         https://bugs.webkit.org/show_bug.cgi?id=201165.
1057         rdar://problem/54729648.
1058
1059         Reviewed by Dean Jackson.
1060
1061         * UIProcess/API/APIContextMenuElementInfo.h:
1062         * UIProcess/API/APIContextMenuElementInfo.cpp:
1063         (API::ContextMenuElementInfo::ContextMenuElementInfo): Initialize new memeber.
1064
1065         * UIProcess/API/Cocoa/WKContextMenuElementInfo.mm:
1066         (-[WKContextMenuElementInfo _activatedElementInfo]): Use new initializer.
1067
1068         * UIProcess/API/Cocoa/WKWebView.mm:
1069         (-[WKWebView _requestActivatedElementAtPosition:completionBlock:]): Ditto.
1070
1071         * UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h:
1072         * UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
1073         (+[_WKActivatedElementInfo activatedElementInfoWithInteractionInformationAtPosition:userInfo:]):
1074             Ditto.
1075         (-[_WKActivatedElementInfo _initWithInteractionInformationAtPosition:userInfo:]): Set new ivar.
1076         (+[_WKActivatedElementInfo activatedElementInfoWithInteractionInformationAtPosition:]): Deleted.
1077         (-[_WKActivatedElementInfo _initWithInteractionInformationAtPosition:]): Deleted.
1078
1079         * UIProcess/ios/WKContentViewInteraction.mm:
1080         (-[WKContentView assignLegacyDataForContextMenuInteraction]): Use new initializer.
1081         (-[WKContentView continueContextMenuInteraction:]): If the context menu is being generated for
1082             an image, and we do not have a URL associated with the position information, try to
1083             generate one using existing SPI. This change also passes through the userInfo via a new
1084             property on _WKActivatedElementInfo. We only do this for the SPI version of this delegate
1085             method, because the API is not called for image previews.
1086         (-[WKContentView _contextMenuInteraction:overrideSuggestedActionsForConfiguration:]): Use new
1087             initializer.
1088
1089 2019-08-27  Basuke Suzuki  <Basuke.Suzuki@sony.com>
1090
1091         [RemoteInspector][Socket] Restructuring the components of Socket implementation
1092         https://bugs.webkit.org/show_bug.cgi?id=201079
1093
1094         Reviewed by Ross Kirsling.
1095
1096         RemoteInspectorClient is now free from creation of SocketEndpoint. All communication
1097         to SocketEndpoint id now the duty of super class.
1098
1099         * UIProcess/socket/RemoteInspectorClient.cpp:
1100         (WebKit::RemoteInspectorClient::RemoteInspectorClient): Remove direct communication to Socket Endpoint.
1101         (WebKit::RemoteInspectorClient::sendWebInspectorEvent): Ditto.
1102         * UIProcess/socket/RemoteInspectorClient.h:
1103
1104 2019-08-27  Chris Dumez  <cdumez@apple.com>
1105
1106         Introduce subclasses to RemoteObjectRegistry for the UIProcess and the WebProcess
1107         https://bugs.webkit.org/show_bug.cgi?id=201153
1108
1109         Reviewed by Alex Christensen.
1110
1111         This better factoring improves code clarity.
1112
1113         * PlatformMac.cmake:
1114         * Shared/API/Cocoa/RemoteObjectRegistry.h:
1115         (WebKit::RemoteObjectRegistry::~RemoteObjectRegistry):
1116         (WebKit::RemoteObjectRegistry::takeBackgroundActivityToken):
1117         * Shared/API/Cocoa/RemoteObjectRegistry.mm:
1118         (WebKit::RemoteObjectRegistry::RemoteObjectRegistry):
1119         (WebKit::RemoteObjectRegistry::sendInvocation):
1120         (WebKit::RemoteObjectRegistry::sendReplyBlock):
1121         (WebKit::RemoteObjectRegistry::sendUnusedReply):
1122         * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
1123         (-[_WKRemoteObjectRegistry _initWithWebPage:]):
1124         (-[_WKRemoteObjectRegistry _initWithWebPageProxy:]):
1125         * SourcesCocoa.txt:
1126         * UIProcess/Cocoa/UIRemoteObjectRegistry.cpp: Added.
1127         (WebKit::UIRemoteObjectRegistry::takeBackgroundActivityToken):
1128         (WebKit::UIRemoteObjectRegistry::UIRemoteObjectRegistry):
1129         (WebKit::UIRemoteObjectRegistry::sendInvocation):
1130         (WebKit::UIRemoteObjectRegistry::messageSender):
1131         * UIProcess/Cocoa/UIRemoteObjectRegistry.h: Added.
1132         * WebKit.xcodeproj/project.pbxproj:
1133         * WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
1134         (WebKit::WebPage::setRemoteObjectRegistry):
1135         (WebKit::WebPage::remoteObjectRegistry):
1136         * WebProcess/WebPage/Cocoa/WebRemoteObjectRegistry.cpp: Added.
1137         (WebKit::WebRemoteObjectRegistry::WebRemoteObjectRegistry):
1138         (WebKit::WebRemoteObjectRegistry::~WebRemoteObjectRegistry):
1139         (WebKit::WebRemoteObjectRegistry::close):
1140         (WebKit::WebRemoteObjectRegistry::messageSender):
1141         * WebProcess/WebPage/Cocoa/WebRemoteObjectRegistry.h: Added.
1142         * WebProcess/WebPage/WebPage.cpp:
1143         (WebKit::WebPage::close):
1144         * WebProcess/WebPage/WebPage.h:
1145
1146 2019-08-26  Jer Noble  <jer.noble@apple.com>
1147
1148         Removing fullscreen element in rAF() callback after requestFullscreen() can leave fullscreen in inconsistent state.
1149         https://bugs.webkit.org/show_bug.cgi?id=201101
1150         <rdar://problem/54164587>
1151
1152         Reviewed by Eric Carlson.
1153
1154         Add more state to track in which direction the animation is flowing to allow in-process
1155         animations to be cancelled more gracefully.
1156
1157         * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
1158         (-[WKFullScreenWindowController enterFullScreen]):
1159         (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
1160         (-[WKFullScreenWindowController requestExitFullScreen]):
1161         (-[WKFullScreenWindowController exitFullScreen]):
1162         * WebProcess/cocoa/VideoFullscreenManager.h:
1163         (WebKit::VideoFullscreenInterfaceContext::animationState const):
1164         (WebKit::VideoFullscreenInterfaceContext::setAnimationState):
1165         (WebKit::VideoFullscreenInterfaceContext::isAnimating const): Deleted.
1166         (WebKit::VideoFullscreenInterfaceContext::setIsAnimating): Deleted.
1167         * WebProcess/cocoa/VideoFullscreenManager.mm:
1168         (WebKit::VideoFullscreenManager::enterVideoFullscreenForVideoElement):
1169         (WebKit::VideoFullscreenManager::exitVideoFullscreenForVideoElement):
1170         (WebKit::VideoFullscreenManager::didEnterFullscreen):
1171         (WebKit::VideoFullscreenManager::didCleanupFullscreen):
1172
1173 2019-08-27  Carlos Garcia Campos  <cgarcia@igalia.com>
1174
1175         Do not clear the pending api request when there's no navigation ID
1176         https://bugs.webkit.org/show_bug.cgi?id=201175
1177
1178         Reviewed by Chris Dumez.
1179
1180         After r247851, the pending API request URL is cleared for subresources in some cases.
1181
1182         * UIProcess/WebPageProxy.cpp:
1183         (WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
1184         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1185
1186 2019-08-27  Zan Dobersek  <zdobersek@igalia.com>
1187
1188         [CoordGraphics] Delay LayerTreeHost creation in always-on AC until DrawingArea painting is enabled
1189         https://bugs.webkit.org/show_bug.cgi?id=201178
1190
1191         Reviewed by Carlos Garcia Campos.
1192
1193         When in always-on AC mode, the LayerTreeHost spawning should be delayed
1194         until the WebPage construction (which sets up the LayerTreeHost-owning
1195         DrawingArea implementation) is further done with initializing relevant
1196         state, and not immediately after the DrawingArea is done with preference
1197         updates.
1198
1199         This is necessary in order to enable the LayerTreeHost instance to take
1200         into account additional WebPage-creation attributes like the correct
1201         device scale factor. Until now, when the LayerTreeHost was spawned in
1202         always-on AC mode, the device scale factor was not yet updated in the
1203         WebPage construction to the appropriate value, leaving the LayerTreeHost
1204         with the default 1.0 value instead of the intended one.
1205
1206         DrawingArea::setPaintingEnabled() is repurposed into enablePainting()
1207         that is to be called once everything should be set for painting (i.e.
1208         when setPaintingEnabled(true) was being called until now). Inside the
1209         DrawingAreaProxyCoordinatedGraphics class (only one to provide an
1210         implementation for this method), the LayerTreeHost is now spawned if
1211         in always-on AC mode. At this point, all relevant state coming from
1212         the owning WebPage object should be readily available for the host
1213         to correctly set up initial graphics scene.
1214
1215         * WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:
1216         (WebKit::DrawingAreaCoordinatedGraphics::updatePreferences):
1217         (WebKit::DrawingAreaCoordinatedGraphics::enablePainting):
1218         * WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h:
1219         * WebProcess/WebPage/DrawingArea.h:
1220         (WebKit::DrawingArea::enablePainting):
1221         (WebKit::DrawingArea::setPaintingEnabled): Deleted.
1222         * WebProcess/WebPage/WebPage.cpp:
1223         (WebKit::m_textAutoSizingAdjustmentTimer):
1224         (WebKit::WebPage::reinitializeWebPage):
1225
1226 2019-08-26  Devin Rousso  <drousso@apple.com>
1227
1228         Web Inspector: use more C++ keywords for defining agents
1229         https://bugs.webkit.org/show_bug.cgi?id=200959
1230
1231         Reviewed by Joseph Pecoraro.
1232
1233          - make constructors `protected` when the agent isn't meant to be constructed directly
1234          - add `virtual` destructors that are defined in the *.cpp so forward-declarations work
1235          - use `final` wherever possible
1236          - add comments to indicate where any virtual functions come from
1237
1238         * UIProcess/WebPageInspectorTargetAgent.h:
1239         * UIProcess/WebPageInspectorTargetAgent.cpp:
1240
1241 2019-08-26  Chris Dumez  <cdumez@apple.com>
1242
1243         Regression: ITP started doing a lot more IPC after its logic was moved to the network process
1244         https://bugs.webkit.org/show_bug.cgi?id=201155
1245
1246         Reviewed by John Wilander.
1247
1248         * WebProcess/WebProcess.cpp:
1249         (WebKit::WebProcess::initializeWebProcess):
1250
1251 2019-08-26  Wenson Hsieh  <wenson_hsieh@apple.com>
1252
1253         REGRESSION (iOS 13): Tests that simulate multiple back-to-back single taps fail or time out
1254         https://bugs.webkit.org/show_bug.cgi?id=201129
1255         <rdar://problem/51857277>
1256
1257         Reviewed by Tim Horton.
1258
1259         Adds a new SPI hook in WebKit to let clients know when a synthetic tap gesture that has ended has been reset.
1260         See Tools/ChangeLog and LayoutTests/ChangeLog for more details.
1261
1262         * UIProcess/API/Cocoa/WKWebView.mm:
1263         (-[WKWebView _doAfterResettingSingleTapGesture:]):
1264         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1265         * UIProcess/ios/WKContentViewInteraction.h:
1266         * UIProcess/ios/WKContentViewInteraction.mm:
1267         (-[WKContentView _singleTapDidReset:]):
1268         (-[WKContentView _doAfterResettingSingleTapGesture:]):
1269
1270 2019-08-26  Brent Fulgham  <bfulgham@apple.com>
1271
1272         [FTW] Go back to ID2D1Bitmap as our NativeImage type
1273         https://bugs.webkit.org/show_bug.cgi?id=201122
1274
1275         Reviewed by Alex Christensen.
1276
1277         In Bug 200093 I switched the OS type of NativeImagePtr from ID2D1Bitmap to IWICBitmap.
1278         However, this was an ill-advised approach, because it dramatically harmed performance due
1279         to the heavy use of software rendering.
1280
1281         I originally made this change because I thought this was the only way to get to the backing
1282         bits of the bitmaps, but it turns out that a more recent Direct2D data type (ID2D1Bitmap1)
1283         has the ability to map its memory to CPU-accessible memory, allowing software filter effects.
1284
1285         This patch switches back to the ID2D1Bitap data type, and hooks up the ID2D1Bitmap1 data type
1286         to access the underlying memory of the bitmaps when software filter effects are used.
1287
1288         Reviewed by Alex Christensen.
1289
1290         * Shared/ShareableBitmap.h:
1291         * Shared/win/ShareableBitmapDirect2D.cpp:
1292         * UIProcess/win/BackingStoreDirect2D.cpp:
1293         * WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:
1294
1295 2019-08-26  Jiewen Tan  <jiewen_tan@apple.com>
1296
1297         [WebAuthn] Support HID authenticators on iOS
1298         https://bugs.webkit.org/show_bug.cgi?id=201084
1299         <rdar://problem/51908390>
1300
1301         Reviewed by Youenn Fablet.
1302
1303         This patch makes the macOS HID implementation available in iOS as well.
1304         Mostly, it removes the PLATFORM(MAC) compile time flag.
1305
1306         * UIProcess/WebAuthentication/AuthenticatorManager.cpp:
1307         (WebKit::AuthenticatorManagerInternal::collectTransports):
1308         * UIProcess/WebAuthentication/AuthenticatorTransportService.cpp:
1309         (WebKit::AuthenticatorTransportService::create):
1310         (WebKit::AuthenticatorTransportService::createMock):
1311         * UIProcess/WebAuthentication/Cocoa/HidConnection.h:
1312         * UIProcess/WebAuthentication/Cocoa/HidConnection.mm:
1313         * UIProcess/WebAuthentication/Cocoa/HidService.h:
1314         * UIProcess/WebAuthentication/Cocoa/HidService.mm:
1315         * UIProcess/WebAuthentication/Cocoa/NfcConnection.mm:
1316         (WebKit::NfcConnection::NfcConnection):
1317         A tentative solution before there is an official UI.
1318         * UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:
1319         * UIProcess/WebAuthentication/Mock/MockHidConnection.h:
1320         * UIProcess/WebAuthentication/Mock/MockHidService.cpp:
1321         * UIProcess/WebAuthentication/Mock/MockHidService.h:
1322         * UIProcess/WebAuthentication/fido/CtapHidDriver.cpp:
1323         * UIProcess/WebAuthentication/fido/CtapHidDriver.h:
1324
1325 2019-08-26  Russell Epstein  <repstein@apple.com>
1326
1327         Unreviewed, rolling out r248961.
1328
1329         Same patch was re-landed after being rolled out. Patch is
1330         causing Catalina/iOS 13 test failures. Rolling out.
1331
1332         Reverted changeset:
1333
1334         "Verify Prefetch and credential behavior"
1335         https://bugs.webkit.org/show_bug.cgi?id=200000
1336         https://trac.webkit.org/changeset/248961
1337
1338 2019-08-26  Youenn Fablet  <youenn@apple.com>
1339
1340         Add a WebsiteDataStore delegate to handle AuthenticationChallenge that do not come from pages
1341         https://bugs.webkit.org/show_bug.cgi?id=196870
1342
1343         Reviewed by Alex Christensen.
1344
1345         Make NetworkProcess provide the session ID for any authentication challenge.
1346         In case there is no associated page for the authentication challenge or this is related to a service worker,
1347         ask the website data store to take a decision.
1348         Add website data store delegate to allow applications to make the decision.
1349         Restrict using the delegate to server trust evaluation only.
1350
1351         Make ping loads reuse the same mechanism.
1352
1353         Covered by service worker tests and updated beacon test.
1354
1355         * NetworkProcess/NetworkCORSPreflightChecker.cpp:
1356         (WebKit::NetworkCORSPreflightChecker::didReceiveChallenge):
1357         * NetworkProcess/NetworkDataTask.cpp:
1358         (WebKit::NetworkDataTask::sessionID const):
1359         * NetworkProcess/NetworkDataTask.h:
1360         * NetworkProcess/NetworkLoad.cpp:
1361         (WebKit::NetworkLoad::didReceiveChallenge):
1362         * NetworkProcess/NetworkLoadChecker.h:
1363         (WebKit::NetworkLoadChecker::networkProcess):
1364         * NetworkProcess/PingLoad.cpp:
1365         (WebKit::PingLoad::didReceiveChallenge):
1366         * Shared/Authentication/AuthenticationManager.cpp:
1367         (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
1368         * Shared/Authentication/AuthenticationManager.h:
1369         * Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.h: Copied from Tools/WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.h.
1370         * Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.mm: Copied from Source/WebKit/Shared/Authentication/cocoa/ClientCertificateAuthenticationXPCConstants.h.
1371         (WebKit::toAuthenticationChallengeDisposition):
1372         * SourcesCocoa.txt:
1373         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1374         (WebsiteDataStoreClient::WebsiteDataStoreClient):
1375         * UIProcess/API/Cocoa/_WKWebsiteDataStoreDelegate.h:
1376         * UIProcess/Cocoa/NavigationState.mm:
1377         (WebKit::NavigationState::NavigationClient::didReceiveAuthenticationChallenge):
1378         * UIProcess/Network/NetworkProcessProxy.cpp:
1379         (WebKit::NetworkProcessProxy::didReceiveAuthenticationChallenge):
1380         * UIProcess/Network/NetworkProcessProxy.h:
1381         * UIProcess/Network/NetworkProcessProxy.messages.in:
1382         * UIProcess/ServiceWorkerProcessProxy.cpp:
1383         * UIProcess/ServiceWorkerProcessProxy.h:
1384         * UIProcess/WebPageProxy.cpp:
1385         * UIProcess/WebProcessPool.cpp:
1386         (WebKit::WebProcessPool::isServiceWorkerPageID const):
1387         * UIProcess/WebProcessPool.h:
1388         * UIProcess/WebsiteData/WebsiteDataStoreClient.h:
1389         (WebKit::WebsiteDataStoreClient::didReceiveAuthenticationChallenge):
1390         * WebKit.xcodeproj/project.pbxproj:
1391
1392 2019-08-25  Simon Fraser  <simon.fraser@apple.com>
1393
1394         [iOS WK2] Make a strongly-typed TransactionID to replace uint64_t transactionIDs
1395         https://bugs.webkit.org/show_bug.cgi?id=199983
1396
1397         Reviewed by Dean Jackson.
1398         
1399         Add TransactionID which is a MonotonicObjectIdentifier<TransactionIDType>. This is modeled
1400         after ObjectIdentifier<>, but we can't use that because it doesn't have a guarantee of
1401         values always increasing by 1 (all derived classes share the same value source). Also, we
1402         need a per-RemoteLayerTreeDrawingArea set of values, but a static seed would cause values to
1403         be incremented by all RemoteLayerTreeDrawingAreas in a WebProcess.
1404
1405         Replace all the bare uint64_t with TransactionID, fixing message generation codegen.
1406
1407         * Scripts/webkit/messages.py:
1408         * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:
1409         (WebKit::RemoteLayerTreeTransaction::transactionID const):
1410         (WebKit::RemoteLayerTreeTransaction::setTransactionID):
1411         * Shared/TransactionID.h: Added.
1412         (WebKit::MonotonicObjectIdentifier::MonotonicObjectIdentifier):
1413         (WebKit::MonotonicObjectIdentifier::isHashTableDeletedValue const):
1414         (WebKit::MonotonicObjectIdentifier::encode const):
1415         (WebKit::MonotonicObjectIdentifier::decode):
1416         (WebKit::MonotonicObjectIdentifier::operator== const):
1417         (WebKit::MonotonicObjectIdentifier::operator> const):
1418         (WebKit::MonotonicObjectIdentifier::operator>= const):
1419         (WebKit::MonotonicObjectIdentifier::operator< const):
1420         (WebKit::MonotonicObjectIdentifier::operator<= const):
1421         (WebKit::MonotonicObjectIdentifier::operator!= const):
1422         (WebKit::MonotonicObjectIdentifier::increment):
1423         (WebKit::MonotonicObjectIdentifier::next const):
1424         (WebKit::MonotonicObjectIdentifier::toUInt64 const):
1425         (WebKit::MonotonicObjectIdentifier::operator bool const):
1426         (WebKit::MonotonicObjectIdentifier::loggingString const):
1427         (WebKit::MonotonicObjectIdentifier::hashTableDeletedValue):
1428         (WebKit::MonotonicObjectIdentifier::isValidIdentifier):
1429         (WebKit::operator<<):
1430         * Shared/VisibleContentRectUpdateInfo.h:
1431         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
1432         (WebKit::VisibleContentRectUpdateInfo::lastLayerTreeTransactionID const):
1433         * UIProcess/API/Cocoa/WKWebView.mm:
1434         (-[WKWebView _processWillSwapOrDidExit]):
1435         * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
1436         * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.messages.in:
1437         * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
1438         (WebKit::RemoteLayerTreeDrawingAreaProxy::willCommitLayerTree):
1439         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
1440         * UIProcess/WebPageProxy.cpp:
1441         (WebKit::WebPageProxy::resetState):
1442         * UIProcess/WebPageProxy.h:
1443         * UIProcess/ios/WKContentViewInteraction.h:
1444         * UIProcess/ios/WKContentViewInteraction.mm:
1445         (-[WKContentView cleanupInteraction]):
1446         * UIProcess/ios/WebPageProxyIOS.mm:
1447         (WebKit::WebPageProxy::commitPotentialTap):
1448         (WebKit::WebPageProxy::handleTap):
1449         * WebKit.xcodeproj/project.pbxproj:
1450         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
1451         (WebKit::RemoteLayerTreeDrawingArea::nextTransactionID const):
1452         (WebKit::RemoteLayerTreeDrawingArea::lastCommittedTransactionID const):
1453         (WebKit::RemoteLayerTreeDrawingArea::takeNextTransactionID):
1454         * WebProcess/WebPage/WebFrame.h:
1455         (WebKit::WebFrame::firstLayerTreeTransactionIDAfterDidCommitLoad const):
1456         (WebKit::WebFrame::setFirstLayerTreeTransactionIDAfterDidCommitLoad):
1457         * WebProcess/WebPage/WebPage.h:
1458         * WebProcess/WebPage/WebPage.messages.in:
1459         * WebProcess/WebPage/ios/WebPageIOS.mm:
1460         (WebKit::WebPage::handleTap):
1461         (WebKit::WebPage::handlePotentialDoubleTapForDoubleClickAtPoint):
1462         (WebKit::WebPage::commitPotentialTap):
1463
1464 2019-08-24  Chris Dumez  <cdumez@apple.com>
1465
1466         Make CacheStorageEngineCaches's decodeCachesNames() more robust against bad input data
1467         https://bugs.webkit.org/show_bug.cgi?id=201102
1468
1469         Reviewed by Antti Koivisto.
1470
1471         Use Vector::tryReserveCapacity() instead of Vector::reserveInitialCapacity() in CacheStorage::decodeCachesNames()
1472         since the size is read from disk and thus cannot be trusted. If the size is too large, reserveInitialCapacity()
1473         would end up crashing the network process. Now, we merely discard the data if tryReserveCapacity() fails because
1474         the size is too large.
1475
1476         * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
1477         (WebKit::CacheStorage::decodeCachesNames):
1478
1479 2019-08-23  Wenson Hsieh  <wenson_hsieh@apple.com>
1480
1481         [iOS] [WebKit2] Tapping on the “I’m” text suggestion after typing “i’” does nothing
1482         https://bugs.webkit.org/show_bug.cgi?id=201085
1483         <rdar://problem/53056118>
1484
1485         Reviewed by Tim Horton.
1486
1487         Currently, logic in applyAutocorrectionInternal only selects the range to autocorrect if the text of the range
1488         matches the string to replace (delivered to us from UIKit). In the case of changing "I’" to "I’m", the string to
1489         replace is "I'" (with a straight quote rather than an apostrophe), even though the DOM contains an apostrophe.
1490
1491         This is because kbd believes that the document context contains straight quotes (rather than apostrophes). For
1492         native text views, this works out because UIKit uses relative UITextPositions to determine the replacement
1493         range rather than by checking against the contents of the document. However, WKWebView does not have the ability
1494         to synchronously compute and reason about arbitrary UITextPositions relative to the selection, so we instead
1495         search for the string near the current selection when applying autocorrections.
1496
1497         Of course, this doesn't work in this scenario because the replacement string contains a straight quote, yet the
1498         text node contains an apostrophe, so we bail and don't end up replacing any text. To address this, we repurpose
1499         TextIterator helpers currently used to allow find-in-page to match straight quotes against apostrophes; instead
1500         of matching the replacement string exactly, we instead match the quote-folded versions of these strings when
1501         finding the range to replace.
1502
1503         Test: fast/events/ios/autocorrect-with-apostrophe.html
1504
1505         * WebProcess/WebPage/ios/WebPageIOS.mm:
1506         (WebKit::WebPage::applyAutocorrectionInternal):
1507
1508 2019-08-23  Jiewen Tan  <jiewen_tan@apple.com>
1509
1510         Unreviewed, build fix after r249059
1511
1512         * UIProcess/WebAuthentication/Cocoa/NfcConnection.mm:
1513         (WebKit::NfcConnection::NfcConnection):
1514         Remove the HAVE() macro.
1515
1516 2019-08-23  Chris Dumez  <cdumez@apple.com>
1517
1518         [geolocation] Rename interfaces and remove [NoInterfaceObject]
1519         https://bugs.webkit.org/show_bug.cgi?id=200885
1520
1521         Reviewed by Alex Christensen.
1522
1523         * Shared/WebGeolocationPosition.cpp:
1524         (WebKit::WebGeolocationPosition::create):
1525         * Shared/WebGeolocationPosition.h:
1526         (WebKit::WebGeolocationPosition::corePosition const):
1527         (WebKit::WebGeolocationPosition::WebGeolocationPosition):
1528         * UIProcess/API/C/WKGeolocationPosition.cpp:
1529         (WKGeolocationPositionCreate_c):
1530         * UIProcess/WebGeolocationManagerProxy.h:
1531         (WebKit::WebGeolocationManagerProxy::lastPosition const):
1532         * UIProcess/ios/WKGeolocationProviderIOS.mm:
1533         (-[WKLegacyCoreLocationProvider positionChanged:]):
1534         * WebProcess/Geolocation/WebGeolocationManager.cpp:
1535         (WebKit::WebGeolocationManager::didChangePosition):
1536         * WebProcess/Geolocation/WebGeolocationManager.h:
1537         * WebProcess/Geolocation/WebGeolocationManager.messages.in:
1538         * WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
1539         (WebKit::WebGeolocationClient::lastPosition):
1540         * WebProcess/WebCoreSupport/WebGeolocationClient.h:
1541
1542 2019-08-23  Ryan Haddad  <ryanhaddad@apple.com>
1543
1544         Unreviewed, rolling out r249001.
1545
1546         Caused one layout test to fail on all configurations and
1547         another to time out on Catalina / iOS 13.
1548
1549         Reverted changeset:
1550
1551         "Add a WebsiteDataStore delegate to handle
1552         AuthenticationChallenge that do not come from pages"
1553         https://bugs.webkit.org/show_bug.cgi?id=196870
1554         https://trac.webkit.org/changeset/249001
1555
1556 2019-08-23  Brian Burg  <bburg@apple.com>
1557
1558         REGRESSION(r248713): WebDriver commands which target the implicit main frame now hit an ASSERT
1559         https://bugs.webkit.org/show_bug.cgi?id=200793
1560         <rdar://problem/54516988>
1561
1562         Reviewed by Chris Dumez.
1563
1564         SimulatedInputDispatcher and its callers need to support Optional<FrameIdentifier>
1565         and WTF::nullopt as an encoding for the implicit main frame.
1566
1567         * UIProcess/Automation/SimulatedInputDispatcher.h:
1568         * UIProcess/Automation/SimulatedInputDispatcher.cpp:
1569         (WebKit::SimulatedInputDispatcher::resolveLocation):
1570         (WebKit::SimulatedInputDispatcher::run):
1571
1572         * UIProcess/Automation/WebAutomationSession.h:
1573         * UIProcess/Automation/WebAutomationSession.cpp:
1574         (WebKit::WebAutomationSession::viewportInViewCenterPointOfElement):
1575         (WebKit::WebAutomationSession::performInteractionSequence):
1576         (WebKit::WebAutomationSession::cancelInteractionSequence):
1577
1578 2019-08-20  Jiewen Tan  <jiewen_tan@apple.com>
1579
1580         [WebAuthn] Support NFC authenticators for iOS
1581         https://bugs.webkit.org/show_bug.cgi?id=188624
1582         <rdar://problem/43354214>
1583
1584         Reviewed by Chris Dumez.
1585
1586         This patch implements support for NFC authenticators including both FIDO2 and U2F ones. It utilizes a private
1587         framework called NearField instead of CoreNFC to be able to supply a custom UI later if necessary.
1588
1589         The patch follows almost the same flow as previous HID and Local authenticator support.
1590         1) Discovery is via NfcService which will invoke NFHardwareManager to start a generic NFC reader session.
1591         2) Once a reader session is established, a NfcConnection is created to start the polling and register the WKNFReaderSessionDelegate
1592         to wait for 'didDetectTags'.
1593         3) When tags are detected, NfcConnection will determine if it meets our requriements: { type, connectability, fido applet availability }.
1594         The first tag that meets all requirement will then be returned for WebAuthn operations.
1595         4) The first WebAuthn operation is to send authenticatorGetInfo command to determine the supported protocol, and then initialize corresponding
1596         authenticators. Noted, the sending/receiving of this command is now abstracted into FidoService which will be shared across HidService and NfcService.
1597         5) From then, the actual WebAuthn request, either makeCredential or getAssertion will be sent.
1598
1599         For testing, this patch follows the same flow as well.
1600         1) MockNfcService overrides NfcService to mock the behavior of NFC Tags discovery.
1601         2) The same class also swizzles methods from NFReaderSession to mock tag connection and communication.
1602
1603         * Platform/spi/Cocoa/NearFieldSPI.h: Added.
1604         * Sources.txt:
1605         * SourcesCocoa.txt:
1606         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
1607         (WKWebsiteDataStoreSetWebAuthenticationMockConfiguration):
1608         * UIProcess/WebAuthentication/AuthenticatorManager.cpp:
1609         (WebKit::AuthenticatorManagerInternal::collectTransports):
1610         * UIProcess/WebAuthentication/AuthenticatorTransportService.cpp:
1611         (WebKit::AuthenticatorTransportService::create):
1612         (WebKit::AuthenticatorTransportService::createMock):
1613         * UIProcess/WebAuthentication/Cocoa/HidService.h:
1614         * UIProcess/WebAuthentication/Cocoa/HidService.mm:
1615         (WebKit::HidService::HidService):
1616         (WebKit::HidService::deviceAdded):
1617         (WebKit::HidService::continueAddDeviceAfterGetInfo): Deleted.
1618         * UIProcess/WebAuthentication/Cocoa/NearFieldSoftLink.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
1619         * UIProcess/WebAuthentication/Cocoa/NearFieldSoftLink.mm: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
1620         * UIProcess/WebAuthentication/Cocoa/NfcConnection.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
1621         * UIProcess/WebAuthentication/Cocoa/NfcConnection.mm: Added.
1622         (WebKit::fido::compareVersion):
1623         (WebKit::NfcConnection::NfcConnection):
1624         (WebKit::NfcConnection::~NfcConnection):
1625         (WebKit::NfcConnection::transact const):
1626         (WebKit::NfcConnection::didDetectTags const):
1627         * UIProcess/WebAuthentication/Cocoa/NfcService.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
1628         * UIProcess/WebAuthentication/Cocoa/NfcService.mm: Added.
1629         (WebKit::NfcService::NfcService):
1630         (WebKit::NfcService::~NfcService):
1631         (WebKit::NfcService::didConnectTag):
1632         (WebKit::NfcService::startDiscoveryInternal):
1633         (WebKit::NfcService::platformStartDiscovery):
1634         * UIProcess/WebAuthentication/Cocoa/WKNFReaderSessionDelegate.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
1635         * UIProcess/WebAuthentication/Cocoa/WKNFReaderSessionDelegate.mm: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
1636         (-[WKNFReaderSessionDelegate initWithConnection:]):
1637         (-[WKNFReaderSessionDelegate readerSession:didDetectTags:]):
1638         * UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:
1639         (WebKit::MockHidConnection::send):
1640         (WebKit::MockHidConnection::registerDataReceivedCallbackInternal):
1641         (WebKit::MockHidConnection::parseRequest):
1642         (WebKit::MockHidConnection::feedReports):
1643         (WebKit::MockHidConnection::shouldContinueFeedReports):
1644         * UIProcess/WebAuthentication/Mock/MockNfcService.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
1645         * UIProcess/WebAuthentication/Mock/MockNfcService.mm: Added.
1646         (-[WKMockNFTag type]):
1647         (-[WKMockNFTag initWithNFTag:]):
1648         (-[WKMockNFTag description]):
1649         (-[WKMockNFTag isEqualToNFTag:]):
1650         (-[WKMockNFTag initWithType:]):
1651         (WebKit::MockNfcService::MockNfcService):
1652         (WebKit::MockNfcService::transceive):
1653         (WebKit::MockNfcService::platformStartDiscovery):
1654         (WebKit::MockNfcService::detectTags const):
1655         * UIProcess/WebAuthentication/Mock/MockWebAuthenticationConfiguration.h:
1656         * UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp:
1657         * UIProcess/WebAuthentication/fido/CtapAuthenticator.h:
1658         * UIProcess/WebAuthentication/fido/CtapNfcDriver.cpp: Added.
1659         (WebKit::CtapNfcDriver::CtapNfcDriver):
1660         (WebKit::CtapNfcDriver::transact):
1661         (WebKit::CtapNfcDriver::respondAsync const):
1662         * UIProcess/WebAuthentication/fido/CtapNfcDriver.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
1663         * UIProcess/WebAuthentication/fido/FidoService.cpp: Added.
1664         (WebKit::FidoService::FidoService):
1665         (WebKit::FidoService::getInfo):
1666         (WebKit::FidoService::continueAfterGetInfo):
1667         * UIProcess/WebAuthentication/fido/FidoService.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
1668         * UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp:
1669         * UIProcess/WebAuthentication/fido/U2fAuthenticator.h:
1670         * UIProcess/ios/WebPageProxyIOS.mm:
1671         * WebKit.xcodeproj/project.pbxproj:
1672
1673 2019-08-23  Kate Cheney  <katherine_cheney@apple.com>
1674
1675         Support ITP on a per-session basis (198923)
1676         https://bugs.webkit.org/show_bug.cgi?id=198923
1677
1678         Reviewed by Chris Dumez.
1679
1680         The original implementation of resourceLoadStatisticsUpdated
1681         did not allow for ITP on a per session basis due to the sessionID
1682         not being passed to the resourceLoadStatisticsUpdated function.
1683         This patch allows access of the correct networkSession by passing
1684         all resourceLoadStatistics in a new data structure of key-value
1685         pairs, where the sessionID is the key.
1686
1687         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1688         (WebKit::NetworkConnectionToWebProcess::resourceLoadStatisticsUpdated):
1689         * NetworkProcess/NetworkConnectionToWebProcess.h:
1690         * WebProcess/WebProcess.cpp:
1691
1692 2019-08-23  Russell Epstein  <repstein@apple.com>
1693
1694         Unreviewed, rolling out r249031.
1695
1696         Causes multiple test failures on iOS simulator
1697
1698         Reverted changeset:
1699
1700         "[iOS] Should show input view when became first responder if
1701         keyboard was showing when the view was resigned"
1702         https://bugs.webkit.org/show_bug.cgi?id=200902
1703         https://trac.webkit.org/changeset/249031
1704
1705 2019-08-22  Andy Estes  <aestes@apple.com>
1706
1707         [watchOS] Disable Content Filtering in the simulator build
1708         https://bugs.webkit.org/show_bug.cgi?id=201047
1709
1710         Reviewed by Tim Horton.
1711
1712         * Configurations/FeatureDefines.xcconfig:
1713
1714 2019-08-22  Daniel Bates  <dabates@apple.com>
1715
1716         [iOS] Should show input view when became first responder if keyboard was showing when the view was resigned
1717         https://bugs.webkit.org/show_bug.cgi?id=200902
1718         <rdar://problem/54231756>
1719
1720         Reviewed by Wenson Hsieh.
1721
1722         When resigning first responder save whether the peripheral host has an input view on screen,
1723         including the software keyboard, so that we show the input view(s) again when the WKWebView
1724         is made first responder. In Safari, this avoids the need for a person to explicitly focus an
1725         editable element again to bring up the keyboard when returning to a tab they were previously
1726         typing in. It also makes the behavior of switching tabs in Safari with a software keyboard
1727         match the behavior of doing the same thing when a hardware keyboard attached.
1728
1729         * UIProcess/PageClient.h:
1730         * UIProcess/WebPageProxy.h:
1731         * UIProcess/WebPageProxy.messages.in:
1732         * UIProcess/ios/PageClientImplIOS.h:
1733         * UIProcess/ios/PageClientImplIOS.mm:
1734         (WebKit::PageClientImpl::focusedElementDidChangeInputMode):
1735         Pass a diff of the activity state from the web process to the UI process so that we can
1736         differentiate between an inputmode change as a result of page deactivation vs a change
1737         caused by some other means. We need to differentiate these cases because we want to
1738         ignore a page that sets inputmode "none" (i.e. a request to hide the keyboard) from inside
1739         a focus event handler if the handler was called as part of the process of page activation
1740         (i.e. switching to the tab). Google Docs is one example of a web site that sets inputmode
1741         to "none" as a result of the page activation process.
1742
1743         * UIProcess/ios/WKContentViewInteraction.h:
1744         * UIProcess/ios/WKContentViewInteraction.mm:
1745         (-[WKContentView cleanupInteraction]): Clear out state.
1746         (-[WKContentView resignFirstResponderForWebView]): Save whether the peripheral host is on screen
1747         into a local before ending the editing session. We then copy the local into the ivar if we
1748         actually will resign. This ordering is explicitly done because:
1749                 1. Ending the editing session may dismiss the keyboard => we need to query the peripheral
1750                    host first.
1751                 2. If the view is being resigned as a result of a keyboard dismissal (i.e. a person pressed
1752                    the hide keyboard button on iPad) then the user has indicated that they are finished
1753                    with the keyboard and we do not want to show the keyboard on page re-activation => we
1754                    do not want to copy the local to the ivar.
1755                 3. If the view refuses to resign itself then it does not make sense to save the keyboard
1756                    state as responder status hasn't changed.
1757         (-[WKContentView shouldShowAutomaticKeyboardUI]): Ignore inputmode="none", if needed.
1758         (-[WKContentView _didCommitLoadForMainFrame]): Clear out state.
1759         (-[WKContentView isFirstResponderOrBecomingFirstResponder]): Added.
1760         (-[WKContentView shouldShowInputViewOnPageActivation:]): Added.
1761         (-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:activityStateChanges:userObject:]):
1762         Update ivar if this element is being focused as a result of page activation.
1763         (-[WKContentView _didUpdateInputMode:activityStateChanges:]): Modified to take the activity state
1764         diff. If the input mode was changed as a result of page activation then we want to update our ivar
1765         so that when we call -reloadInputViews and UIKit calls us back in -shouldShowAutomaticKeyboardUI we
1766         will know to ignore inputmode set to "none" when determining whether to show the automatic keyboard UI.
1767         Note that we do not need to check/track whether an earlier -_elementDidFocus actually started an
1768         input session as part of updating the value of our ivar because if an input session was not started,
1769         say the embedding client disallowed it, then we would not have a focused element => we early return from
1770         this function. Also remove duplication and improve code readbility by making use of the convenience function
1771         hasFocusedElement() instead of duplicating what it does.
1772         (-[WKContentView _didUpdateInputMode:]): Deleted.
1773         * UIProcess/ios/WebPageProxyIOS.mm:
1774         (WebKit::WebPageProxy::focusedElementDidChangeInputMode): Modified to take the activity state diff
1775         and pass it through.
1776         (WebKit::WebPageProxy::didReleaseAllTouchPoints): Pass the empty set for the activity state diff to
1777         keep our current behavior.
1778         * WebProcess/WebPage/WebPage.cpp:
1779         (WebKit::WebPage::focusedElementDidChangeInputMode): Send the activity state diff to the UI process.
1780 2019-08-22  Keith Rollin  <krollin@apple.com>
1781
1782         Remove logging that contains a URL
1783         https://bugs.webkit.org/show_bug.cgi?id=201052
1784         <rdar://problem/54613204>
1785
1786         Reviewed by Chris Dumez.
1787
1788         checkURLReceivedFromWebProcess in WebProcessProxy.cpp contains an old
1789         logging line that logs a URL. We don't log URLs any more for privacy
1790         reasons, so remove this.
1791
1792         A search for WTFLogAlways.*url turns up other matches, but those are
1793         either false positives or cases where the URLs are logged only on
1794         demand by the developer as part of debugging.
1795         checkURLReceivedFromWebProcess is the only place where a URL is logged
1796         as a matter of course.
1797
1798         * UIProcess/WebProcessProxy.cpp:
1799         (WebKit::WebProcessProxy::checkURLReceivedFromWebProcess):
1800
1801 2019-08-22  Adrian Perez de Castro  <aperez@igalia.com>
1802
1803         [GTK][WPE] Fixes for non-unified builds after r248547
1804         https://bugs.webkit.org/show_bug.cgi?id=201044
1805
1806         Reviewed by Philippe Normand.
1807
1808         * NetworkProcess/WebStorage/LocalStorageDatabaseTracker.cpp: Add missing inclusion of
1809         the wtf/CrossThreadCopier.h header.
1810         * WebProcess/WebStorage/StorageNamespaceImpl.h: Add missing inclusion of the
1811         WebCore/PageIdentifier.h header.
1812
1813 2019-08-22  Alex Christensen  <achristensen@webkit.org>
1814
1815         Disable legacy TLS versions and add a temporary default to re-enable it
1816         https://bugs.webkit.org/show_bug.cgi?id=200945
1817
1818         Reviewed by Brady Eidson.
1819
1820         * NetworkProcess/NetworkSessionCreationParameters.cpp:
1821         (WebKit::NetworkSessionCreationParameters::privateSessionParameters):
1822         (WebKit::NetworkSessionCreationParameters::encode const):
1823         (WebKit::NetworkSessionCreationParameters::decode):
1824         * NetworkProcess/NetworkSessionCreationParameters.h:
1825         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1826         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
1827         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1828         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
1829         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
1830         (WebKit::WebsiteDataStore::parameters):
1831
1832 2019-08-17  Darin Adler  <darin@apple.com>
1833
1834         Use makeString and multi-argument StringBuilder::append instead of less efficient multiple appends
1835         https://bugs.webkit.org/show_bug.cgi?id=200862
1836
1837         Reviewed by Ryosuke Niwa.
1838
1839         * Shared/mac/AuxiliaryProcessMac.mm:
1840         (WebKit::setAndSerializeSandboxParameters): Use one append instead of multiple.
1841
1842 2019-08-22  Wenson Hsieh  <wenson_hsieh@apple.com>
1843
1844         Typing Korean in title field after typing in the body inserts extraneous characters on blog.naver.com
1845         https://bugs.webkit.org/show_bug.cgi?id=201023
1846         <rdar://problem/54294794>
1847
1848         Reviewed by Ryosuke Niwa.
1849
1850         After r242833, we began to avoid sending redundant ElementDidFocus updates in the case where a focused element
1851         was blurred and refocused within the same runloop. This was done to prevent the input view from flickering due
1852         to input view reloading, as well as scrolling to reveal the focused element, when tapping to change selection on
1853         Microsoft Word online.
1854
1855         However, on blog.naver.com, these ElementDidFocus messages were necessary in order to ensure that the platform
1856         input context changes when moving between the title and body fields, or when tapping to change selection. This
1857         is because blog.naver.com uses a hidden contenteditable area under a subframe (see WebCore ChangeLog for more
1858         detail here). While text is never directly inserted into this hidden contenteditable, the events are observed
1859         and used to "play back" editing in the main visible content area.
1860
1861         Thus, when moving between the title and body fields (or when changing selection within either), the only hint we
1862         get is that the hidden editable element is blurred and immediately refocused. Since we no longer send
1863         ElementDidFocus updates in this scenario, UIKeyboardImpl and kbd are not aware that the page has effectively
1864         changed input contexts.
1865
1866         Combined with the fact that Korean IME on iOS may insert additional text given the document context (i.e. text
1867         that the input manager, kbd, thinks we've previously inserted), this means that when typing several characters
1868         into the body field on naver and then switching to edit the title, initial keystrokes may insert unexpected
1869         text in the title field.
1870
1871         To fix this, we add some hooks to notify the UI process when an element that was blurred has been immediately
1872         refocused. Upon receiving this message, the UI process then tells UIKeyboardImpl to re-retrieve its input
1873         context, which calls into -requestAutocorrectionContextWithCompletionHandler: in WKContentView. While notorious
1874         for being synchronous IPC, this is mitigated by (1) being limiting to only instances where we have a hidden
1875         editable area, and (2) being limited by a batching mechanism in the web process, such that if the focused
1876         element is blurred, refocused, re-blurred, and refocused many times in the same runloop, we'll only send a
1877         single UpdateInputContextAfterBlurringAndRefocusingElement message (as opposed to the many ElementDidFocus
1878         messages we would've sent in previous releases).
1879
1880         * Platform/spi/ios/UIKitSPI.h:
1881         * UIProcess/PageClient.h:
1882         * UIProcess/WebPageProxy.h:
1883         * UIProcess/WebPageProxy.messages.in:
1884
1885         Add a new mechanism to update the platform input context (on iOS, UIKeyboardImpl's document state) when focus
1886         moves away from and immediately returns to a hidden editable element.
1887
1888         * UIProcess/ios/PageClientImplIOS.h:
1889         * UIProcess/ios/PageClientImplIOS.mm:
1890         (WebKit::PageClientImpl::updateInputContextAfterBlurringAndRefocusingElement):
1891         * UIProcess/ios/WKContentViewInteraction.h:
1892         * UIProcess/ios/WKContentViewInteraction.mm:
1893         (-[WKContentView _updateInputContextAfterBlurringAndRefocusingElement]):
1894
1895         Tell the active UIKeyboardImpl to refetch document state from the WKContentView. While this does result in a new
1896         autocorrection context request (which, unfortunately, triggers synchronous IPC to the web process), this request
1897         would've still happened anyways in the case where we would previously have sent an ElementDidFocus message.
1898
1899         * UIProcess/ios/WebPageProxyIOS.mm:
1900         (WebKit::WebPageProxy::updateInputContextAfterBlurringAndRefocusingElement):
1901         * WebProcess/WebPage/WebPage.cpp:
1902         (WebKit::WebPage::elementDidFocus):
1903
1904         In the case where we avoid sending a full ElementDidFocus message to the UI process due to refocusing the same
1905         element, we should still notify the UI process so that it can synchronize state between the application process
1906         and kbd. See above for more details.
1907
1908         (WebKit::WebPage::elementDidBlur):
1909         (WebKit::WebPage::updateInputContextAfterBlurringAndRefocusingElementIfNeeded):
1910         * WebProcess/WebPage/WebPage.h:
1911         * WebProcess/WebPage/ios/WebPageIOS.mm:
1912         (WebKit::WebPage::updateInputContextAfterBlurringAndRefocusingElementIfNeeded):
1913
1914 2019-08-22  Youenn Fablet  <youenn@apple.com>
1915
1916         Add a WebsiteDataStore delegate to handle AuthenticationChallenge that do not come from pages
1917         https://bugs.webkit.org/show_bug.cgi?id=196870
1918
1919         Reviewed by Alex Christensen.
1920
1921         Make NetworkProcess provide the session ID for any authentication challenge.
1922         In case there is no associated page for the authentication challenge or this is related to a service worker,
1923         ask the website data store to take a decision.
1924         Add website data store delegate to allow applications to make the decision.
1925         Restrict using the delegate to server trust evaluation only.
1926
1927         Make ping loads reuse the same mechanism.
1928
1929         Covered by service worker tests and updated beacon test.
1930
1931         * NetworkProcess/NetworkCORSPreflightChecker.cpp:
1932         (WebKit::NetworkCORSPreflightChecker::didReceiveChallenge):
1933         * NetworkProcess/NetworkDataTask.cpp:
1934         (WebKit::NetworkDataTask::sessionID const):
1935         * NetworkProcess/NetworkDataTask.h:
1936         * NetworkProcess/NetworkLoad.cpp:
1937         (WebKit::NetworkLoad::didReceiveChallenge):
1938         * NetworkProcess/NetworkLoadChecker.h:
1939         (WebKit::NetworkLoadChecker::networkProcess):
1940         * NetworkProcess/PingLoad.cpp:
1941         (WebKit::PingLoad::didReceiveChallenge):
1942         * Shared/Authentication/AuthenticationManager.cpp:
1943         (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
1944         * Shared/Authentication/AuthenticationManager.h:
1945         * Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.h: Copied from Tools/WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.h.
1946         * Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.mm: Copied from Source/WebKit/Shared/Authentication/cocoa/ClientCertificateAuthenticationXPCConstants.h.
1947         (WebKit::toAuthenticationChallengeDisposition):
1948         * SourcesCocoa.txt:
1949         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1950         (WebsiteDataStoreClient::WebsiteDataStoreClient):
1951         * UIProcess/API/Cocoa/_WKWebsiteDataStoreDelegate.h:
1952         * UIProcess/Cocoa/NavigationState.mm:
1953         (WebKit::NavigationState::NavigationClient::didReceiveAuthenticationChallenge):
1954         * UIProcess/Network/NetworkProcessProxy.cpp:
1955         (WebKit::NetworkProcessProxy::didReceiveAuthenticationChallenge):
1956         * UIProcess/Network/NetworkProcessProxy.h:
1957         * UIProcess/Network/NetworkProcessProxy.messages.in:
1958         * UIProcess/ServiceWorkerProcessProxy.cpp:
1959         * UIProcess/ServiceWorkerProcessProxy.h:
1960         * UIProcess/WebPageProxy.cpp:
1961         * UIProcess/WebProcessPool.cpp:
1962         (WebKit::WebProcessPool::isServiceWorkerPageID const):
1963         * UIProcess/WebProcessPool.h:
1964         * UIProcess/WebsiteData/WebsiteDataStoreClient.h:
1965         (WebKit::WebsiteDataStoreClient::didReceiveAuthenticationChallenge):
1966         * WebKit.xcodeproj/project.pbxproj:
1967
1968 2019-08-22  Claudio Saavedra  <csaavedra@igalia.com>
1969
1970         [SOUP] NetworkProcessSoup does not initialize CacheOptions correctly
1971         https://bugs.webkit.org/show_bug.cgi?id=200886
1972
1973         Reviewed by Philippe Normand.
1974
1975         r247567 wrongly initializes CacheOptions in a local variable that is never used
1976         instead of using NetworkProcess's member variable, that is later used by the
1977         NetworkSession to initialize the cache.
1978
1979         * NetworkProcess/soup/NetworkProcessSoup.cpp:
1980         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
1981
1982 2019-08-21  Tim Horton  <timothy_horton@apple.com>
1983
1984         [Mail] Tapping top of message scrolls back to copied text instead of top of the message
1985         https://bugs.webkit.org/show_bug.cgi?id=200999
1986         <rdar://problem/54564878>
1987
1988         Reviewed by Wenson Hsieh.
1989
1990         In the case where you have a WebCore selection but are not first responder,
1991         when you tap the WKWebView to become first responder, EventHandler would
1992         bail from setting the selection, assuming UIKit was going to do it. This
1993         behavior was introduced in r233311.
1994
1995         However, since we are not first responder, UIKit does not change the
1996         selection, since it considers the view to not be editable.
1997
1998         Fix this by letting WebCore set the selection in this case, as it used to.
1999
2000         * WebProcess/WebCoreSupport/WebEditorClient.h:
2001         * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
2002         (WebKit::WebEditorClient::shouldAllowSingleClickToChangeSelection const):
2003         * WebProcess/WebPage/WebPage.h:
2004         (WebKit::WebPage::isShowingInputViewForFocusedElement const):
2005         Copy the logic from EventHandler, with the added caveat (which fixes the
2006         aforementioned behavior) that we will allow EventHandler to change the
2007         selection if we don't have a focused node in the UIKit sense, because
2008         we know that the platform text interaction code will *not* change the
2009         selection if that is the case, so it's up to us.
2010
2011 2019-08-21  Chris Dumez  <cdumez@apple.com>
2012
2013         Crash under NetworkCache::Data::mapToFile()
2014         https://bugs.webkit.org/show_bug.cgi?id=200996
2015         <rdar://problem/54570421>
2016
2017         Reviewed by Geoffrey Garen.
2018
2019         Make sure NetworkCache::Data::mapToFile() calls makeSafeToUseMemoryMapForPath() between
2020         creating the file and calling mmap().
2021
2022         * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
2023         (WebKit::NetworkCache::BlobStorage::add):
2024         * NetworkProcess/cache/NetworkCacheData.cpp:
2025         (WebKit::NetworkCache::Data::mapToFile const):
2026
2027 2019-08-21  Chris Dumez  <cdumez@apple.com>
2028
2029         Have NetworkCache::store() null check its completion handler before calling it
2030         https://bugs.webkit.org/show_bug.cgi?id=200994
2031
2032         Reviewed by Geoffrey Garen.
2033
2034         * NetworkProcess/NetworkResourceLoader.cpp:
2035         (WebKit::NetworkResourceLoader::retrieveCacheEntry):
2036         Stop passing nullptr for the completion handler now that the parameter has a default value.
2037         Note that passing nullptr here was likely wrong since the NetworkCache::store() implementation
2038         did not null-check the completion handler before calling it.
2039
2040         * NetworkProcess/cache/NetworkCache.cpp:
2041         (WebKit::NetworkCache::Cache::store):
2042         Have NetworkCache::store() null check its completion handler before calling it as calling
2043         a null WTF::Function crashes.
2044
2045         * NetworkProcess/cache/NetworkCache.h:
2046         Use nullptr as default parameter value for the completion handler.
2047
2048 2019-08-21  Rob Buis  <rbuis@igalia.com>
2049
2050         Verify Prefetch and credential behavior
2051         https://bugs.webkit.org/show_bug.cgi?id=200000
2052
2053         Reviewed by Youenn Fablet.
2054
2055         Cancel cross-origin prefetches for Vary: Cookie.
2056
2057         Test: http/wpt/prefetch/link-prefetch-cross-origin-vary-cookie.html
2058
2059         * NetworkProcess/NetworkResourceLoader.cpp:
2060         (WebKit::NetworkResourceLoader::retrieveCacheEntry):
2061         (WebKit::NetworkResourceLoader::didReceiveResponse):
2062         * NetworkProcess/cache/PrefetchCache.cpp:
2063         (WebKit::PrefetchCache::take):
2064
2065 2019-08-21  Ryosuke Niwa  <rniwa@webkit.org>
2066
2067         Put keygen element behind a runtime flag and disable it by default
2068         https://bugs.webkit.org/show_bug.cgi?id=200850
2069
2070         Reviewed by Antti Koivisto.
2071
2072         * Shared/WebPreferences.yaml:
2073         * UIProcess/API/C/WKPreferences.cpp:
2074         (WKPreferencesSetKeygenElementEnabled):
2075         (WKPreferencesGetKeygenElementEnabled):
2076         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2077
2078 2019-08-21  Chris Dumez  <cdumez@apple.com>
2079
2080         Crash under StringImpl::~StringImpl() in NetworkProcess::deleteWebsiteDataForRegistrableDomains()
2081         https://bugs.webkit.org/show_bug.cgi?id=200986
2082         <rdar://problem/32850192>
2083
2084         Reviewed by Brent Fulgham.
2085
2086         Code was calling postStorageTask() with a lambda that captures Strings that are not isolated copied.
2087         The lambda would get executed on another thread so this is not safe. The CrossThreadTask constructor
2088         does not take care of this for you, despite its name (the createCrossThreadTask() function does though).
2089
2090         * NetworkProcess/NetworkProcess.cpp:
2091         (WebKit::NetworkProcess::fetchWebsiteData):
2092         (WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomains):
2093         (WebKit::NetworkProcess::registrableDomainsWithWebsiteData):
2094
2095 2019-08-21  Chris Dumez  <cdumez@apple.com>
2096
2097         Add internal setting to disable SecureContext checks
2098         https://bugs.webkit.org/show_bug.cgi?id=200980
2099         <rdar://problem/54438512>
2100
2101         Reviewed by Alex Christensen.
2102
2103         Add internal setting to disable SecureContext checks, in order to facilitate development
2104         for features like Service workers or device orientation / motion.
2105
2106         * Shared/WebPreferences.yaml:
2107         * UIProcess/API/Cocoa/WKPreferences.mm:
2108         (-[WKPreferences _secureContextChecksEnabled]):
2109         (-[WKPreferences _setSecureContextChecksEnabled:]):
2110         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2111
2112 2019-08-21  Chris Dumez  <cdumez@apple.com>
2113
2114         registrableDomainsToRemoveWebsiteDataFor() does not need to return a HashMap
2115         https://bugs.webkit.org/show_bug.cgi?id=200985
2116
2117         Reviewed by John Wilander.
2118
2119         registrableDomainsToRemoveWebsiteDataFor() does not need to return a HashMap. It is more
2120         efficient to simply return a Vector since we never need to look up keys.
2121
2122         * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
2123         (WebKit::ResourceLoadStatisticsDatabaseStore::registrableDomainsToRemoveWebsiteDataFor):
2124         * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
2125         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
2126         (WebKit::ResourceLoadStatisticsMemoryStore::registrableDomainsToRemoveWebsiteDataFor):
2127         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h:
2128         * NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:
2129         (WebKit::domainsToString):
2130         * NetworkProcess/Classifier/ResourceLoadStatisticsStore.h:
2131         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
2132         (WebKit::WebResourceLoadStatisticsStore::deleteWebsiteDataForRegistrableDomains):
2133         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
2134         * NetworkProcess/NetworkProcess.cpp:
2135         (WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomains):
2136         (WebKit::NetworkProcess::deleteCookiesForTesting):
2137         * NetworkProcess/NetworkProcess.h:
2138         * NetworkProcess/NetworkSession.cpp:
2139         (WebKit::NetworkSession::deleteWebsiteDataForRegistrableDomains):
2140         * NetworkProcess/NetworkSession.h:
2141
2142 2019-08-21  Russell Epstein  <repstein@apple.com>
2143
2144         Unreviewed, rolling out r248942.
2145
2146         Causes multiple layout test crashes on MacOS Bots
2147
2148         Reverted changeset:
2149
2150         "Verify Prefetch and credential behavior"
2151         https://bugs.webkit.org/show_bug.cgi?id=200000
2152         https://trac.webkit.org/changeset/248942
2153
2154 2019-08-21  Keith Rollin  <krollin@apple.com>
2155
2156         Remove support for watchOS < 6.0
2157         https://bugs.webkit.org/show_bug.cgi?id=200937
2158         <rdar://problem/54524009>
2159
2160         Reviewed by Darin Adler.
2161
2162         Update conditionals that reference __WATCH_OS_VERSION_MIN_REQUIRED and
2163         __WATCH_OS_VERSION_MAX_ALLOWED, assuming that they both have values >=
2164         60000. This means that expressions like
2165         "__WATCH_OS_VERSION_MIN_REQUIRED < 60000" are always False and
2166         "__WATCH_OS_VERSION_MIN_REQUIRED >= 60000" are always True.
2167
2168         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2169         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
2170
2171 2019-08-21  Adrian Perez de Castro  <aperez@igalia.com>
2172
2173         [GTK] Build failure due to unwieldy definition of “None” from X11 headers
2174         https://bugs.webkit.org/show_bug.cgi?id=200984
2175
2176         Reviewed by Carlos Alberto Lopez Perez.
2177
2178         * SourcesGTK.txt: Mark AcceleratedBackingStore.cpp with @no-unify
2179         because it includes AcceleratedSurfaceX11.h when building with
2180         ENABLE_X11_TARGET=ON, which in turn will include the X11 headers.
2181         It is just lucky that most of the time the order of the generated
2182         #include statements in the unified sources has been masking this
2183         problem.
2184
2185 2019-08-21  Rob Buis  <rbuis@igalia.com>
2186
2187         Verify Prefetch and credential behavior
2188         https://bugs.webkit.org/show_bug.cgi?id=200000
2189
2190         Reviewed by Youenn Fablet.
2191
2192         Cancel cross-origin prefetches for Vary: Cookie.
2193
2194         Test: http/wpt/prefetch/link-prefetch-cross-origin-vary-cookie.html
2195
2196         * NetworkProcess/NetworkResourceLoader.cpp:
2197         (WebKit::NetworkResourceLoader::retrieveCacheEntry):
2198         (WebKit::NetworkResourceLoader::didReceiveResponse):
2199         * NetworkProcess/cache/PrefetchCache.cpp:
2200         (WebKit::PrefetchCache::take):
2201
2202 2019-08-21  Pablo Saavedra  <psaavedra@igalia.com>
2203
2204         [WPE] Build failure after r248846 ([WTF] Add makeUnique<T>, which ensures T is fast-allocated, makeUnique / makeUniqueWithoutFastMallocCheck part)
2205         https://bugs.webkit.org/show_bug.cgi?id=200973
2206
2207         WPE fails to build with `-DENABLE_WPE_QT_API=ON` after changes done by r248846 in:
2208
2209           Source/WebKit/UIProcess/API/wpe/qt/WPEQtView.cpp
2210           Source/WebKit/UIProcess/API/wpe/qt/WPEQtViewBackend.cpp
2211
2212         ; to forces FastMalloc use.
2213
2214         Related to:
2215
2216           https://bugs.webkit.org/show_bug.cgi?id=200611
2217           https://bugs.webkit.org/show_bug.cgi?id=200620
2218
2219         This patch puts WPEQt... classes into FastMalloc in the same way it
2220         was done by many others in r248603.
2221
2222         Reviewed by Philippe Normand.
2223
2224         * UIProcess/API/wpe/qt/WPEQtView.cpp:
2225         (WPEQtView::runJavaScript):
2226         * UIProcess/API/wpe/qt/WPEQtViewBackend.h:
2227         * UIProcess/API/wpe/qt/WPEQtViewLoadRequest.h:
2228
2229 2019-08-20  Said Abou-Hallawa  <sabouhallawa@apple.com>
2230
2231         [iOS] REGRESSION (248501): gmail.com images are still not shown on some versions of iPhone iOS13
2232         https://bugs.webkit.org/show_bug.cgi?id=200948
2233
2234         Reviewed by Tim Horton.
2235
2236         Apply the gmail.com quirk for all iPhone iOS versions till the gmail.com
2237         bug is fixed.
2238
2239         * WebProcess/WebPage/ios/WebPageIOS.mm:
2240         (WebKit::WebPage::platformUserAgent const):
2241
2242 2019-08-20  Chris Dumez  <cdumez@apple.com>
2243
2244         WebSQLiteDatabaseTracker does not ensure it is still alive after dispatching to the main thread
2245         https://bugs.webkit.org/show_bug.cgi?id=200925
2246
2247         Reviewed by Geoffrey Garen.
2248
2249         WebSQLiteDatabaseTracker does not ensure it is still alive after dispatching to the main thread,
2250         which is not safe. Use WeakPtr to address the issue.
2251
2252         * Shared/WebSQLiteDatabaseTracker.cpp:
2253         (WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker):
2254         (WebKit::WebSQLiteDatabaseTracker::willBeginFirstTransaction):
2255         (WebKit::WebSQLiteDatabaseTracker::didFinishLastTransaction):
2256         * Shared/WebSQLiteDatabaseTracker.h:
2257
2258 2019-08-20  Brent Fulgham  <bfulgham@apple.com>
2259
2260         [FTW] Fix scrolling in modern WebKit views
2261         https://bugs.webkit.org/show_bug.cgi?id=200923
2262
2263         Reviewed by Don Olmstead.
2264
2265         The initial implementation of scrolling in Direct2D had errors that
2266         caused hilarious rendering glitches. This patch corrects the logic
2267         so that page scroll is correct.
2268
2269         This patch also fixes a bug that would trigger when resizing windows.
2270
2271         * Shared/win/ShareableBitmapDirect2D.cpp:
2272         (WebKit::ShareableBitmap::paint):
2273         * UIProcess/BackingStore.h:
2274         (WebKit::BackingStore::renderTarget): Deleted.
2275         * UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:
2276         (WebKit::DrawingAreaProxyCoordinatedGraphics::sizeDidChange):
2277         (WebKit::DrawingAreaProxyCoordinatedGraphics::deviceScaleFactorDidChange):
2278         * UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h:
2279         * UIProcess/win/BackingStoreDirect2D.cpp:
2280         (WebKit::BackingStore::paint):
2281         (WebKit::BackingStore::incorporateUpdate):
2282         (WebKit::BackingStore::scroll):
2283         * UIProcess/win/WebView.cpp:
2284         (WebKit::WebView::paint):
2285         (WebKit::WebView::onSizeEvent):
2286
2287 2019-08-20  Chris Dumez  <cdumez@apple.com>
2288
2289         Unsafe usage of CookieStorageObserver from a background thread
2290         https://bugs.webkit.org/show_bug.cgi?id=200920
2291
2292         Reviewed by Alex Christensen.
2293
2294         * UIProcess/API/APIHTTPCookieStore.h:
2295         * UIProcess/API/Cocoa/APIHTTPCookieStoreCocoa.mm:
2296         (API::HTTPCookieStore::startObservingChangesToDefaultUIProcessCookieStore):
2297
2298 2019-08-20  Chris Dumez  <cdumez@apple.com>
2299
2300         Use a strongly typed identifier for StorageNamespace's identifier
2301         https://bugs.webkit.org/show_bug.cgi?id=200895
2302
2303         Reviewed by Alex Christensen and Youenn Fablet.
2304
2305         Use a strongly typed identifier for StorageNamespace's identifier instead of uint64_t, to
2306         avoid type confusion.
2307
2308         * NetworkProcess/WebStorage/LocalStorageNamespace.cpp:
2309         (WebKit::LocalStorageNamespace::LocalStorageNamespace):
2310         * NetworkProcess/WebStorage/LocalStorageNamespace.h:
2311         * NetworkProcess/WebStorage/StorageManager.cpp:
2312         (WebKit::StorageManager::createSessionStorageNamespace):
2313         (WebKit::StorageManager::destroySessionStorageNamespace):
2314         (WebKit::StorageManager::cloneSessionStorageNamespace):
2315         (WebKit::StorageManager::createLocalStorageArea):
2316         (WebKit::StorageManager::createTransientLocalStorageArea):
2317         (WebKit::StorageManager::createSessionStorageArea):
2318         (WebKit::StorageManager::getOrCreateLocalStorageNamespace):
2319         (WebKit::StorageManager::getOrCreateTransientLocalStorageNamespace):
2320         (WebKit::StorageManager::getOrCreateSessionStorageNamespace):
2321         * NetworkProcess/WebStorage/StorageManager.h:
2322         * NetworkProcess/WebStorage/StorageManagerSet.cpp:
2323         (WebKit::StorageManagerSet::connectToLocalStorageArea):
2324         (WebKit::StorageManagerSet::connectToTransientLocalStorageArea):
2325         (WebKit::StorageManagerSet::connectToSessionStorageArea):
2326         (WebKit::StorageManagerSet::cloneSessionStorageNamespace):
2327         * NetworkProcess/WebStorage/StorageManagerSet.h:
2328         * NetworkProcess/WebStorage/StorageManagerSet.messages.in:
2329         * Scripts/webkit/messages.py:
2330         * WebKit.xcodeproj/project.pbxproj:
2331         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2332         (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
2333         * WebProcess/WebPage/WebPage.cpp:
2334         (WebKit::m_textAutoSizingAdjustmentTimer):
2335         * WebProcess/WebPage/WebPage.h:
2336         (WebKit::WebPage::sessionStorageNamespaceIdentifier const):
2337         * WebProcess/WebPage/WebPageGroupProxy.h:
2338         (WebKit::WebPageGroupProxy::localStorageNamespaceIdentifier const):
2339         * WebProcess/WebStorage/StorageAreaMap.cpp:
2340         (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
2341         (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
2342         * WebProcess/WebStorage/StorageNamespaceIdentifier.h: Copied from Source/WebKit/WebProcess/WebStorage/WebStorageNamespaceProvider.h.
2343         * WebProcess/WebStorage/StorageNamespaceImpl.cpp:
2344         (WebKit::StorageNamespaceImpl::createSessionStorageNamespace):
2345         (WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
2346         (WebKit::StorageNamespaceImpl::createTransientLocalStorageNamespace):
2347         (WebKit::StorageNamespaceImpl::StorageNamespaceImpl):
2348         (WebKit::StorageNamespaceImpl::copy):
2349         (WebKit::StorageNamespaceImpl::sessionStoragePageID const):
2350         (WebKit::StorageNamespaceImpl::pageGroupID const):
2351         * WebProcess/WebStorage/StorageNamespaceImpl.h:
2352         (WebKit::StorageNamespaceImpl::storageNamespaceID const):
2353         * WebProcess/WebStorage/WebStorageNamespaceProvider.cpp:
2354         (WebKit::WebStorageNamespaceProvider::getOrCreate):
2355         (WebKit::WebStorageNamespaceProvider::WebStorageNamespaceProvider):
2356         (WebKit::WebStorageNamespaceProvider::~WebStorageNamespaceProvider):
2357         (WebKit::WebStorageNamespaceProvider::createSessionStorageNamespace):
2358         (WebKit::WebStorageNamespaceProvider::createLocalStorageNamespace):
2359         (WebKit::WebStorageNamespaceProvider::createTransientLocalStorageNamespace):
2360         * WebProcess/WebStorage/WebStorageNamespaceProvider.h:
2361
2362 2019-08-20  Dean Jackson  <dino@apple.com>
2363
2364         REGRESSION: Open in New Tab is missing from context menu
2365         https://bugs.webkit.org/show_bug.cgi?id=200909
2366         <rdar://problem/54476169>
2367
2368         Reviewed by Simon Fraser.
2369
2370         Don't assume the new API if webView:contextMenuWillPresentForElement:
2371         is implemented.
2372
2373         * UIProcess/ios/WKContentViewInteraction.mm:
2374         (needsDeprecatedPreviewAPI):
2375
2376 2019-08-20  Joseph Pecoraro  <pecoraro@apple.com>
2377
2378         Web Inspector: Support for JavaScript BigInt
2379         https://bugs.webkit.org/show_bug.cgi?id=180731
2380         <rdar://problem/36298748>
2381
2382         Reviewed by Devin Rousso.
2383
2384         * WebProcess/WebPage/WebInspectorUI.cpp:
2385         (WebKit::WebInspectorUI::WebInspectorUI):
2386         Enable BigInt in the Web Inspector process. It only makes use of
2387         `globalThis.BigInt(...)` to hold the value.
2388
2389 2019-08-19  Fujii Hironori  <Hironori.Fujii@sony.com>
2390
2391         [CMake] WebKit2.dll can't link because of missing PAL's import symbols for WinCairo port
2392         https://bugs.webkit.org/show_bug.cgi?id=200910
2393
2394         Unreviewed build fix for Windows port.
2395
2396         * CMakeLists.txt: Added -DSTATICALLY_LINKED_WITH_PAL=1 if PAL_LIBRARY_TYPE is STATIC.
2397
2398 2019-08-19  Fujii Hironori  <Hironori.Fujii@sony.com>
2399
2400         Unreviewed build fix for WinCairo port.
2401
2402         The base class of NetworkDataTask has been changed in r248874.
2403
2404         * NetworkProcess/curl/NetworkDataTaskCurl.h:
2405         (ref):
2406         (deref):
2407         Call 'ref' and 'deref' of NetworkDataTask instead of RefCounted<NetworkDataTask>.
2408
2409 2019-08-19  Keith Rollin  <krollin@apple.com>
2410
2411         Unreviewed build fix for security entitlements.
2412
2413         Bug 200242 (r248164) changed the way that entitlements were generated
2414         and applied during the build. In that refactoring, the codesign
2415         parameter "-o library" was dropped. This change adds it back.
2416
2417         * Configurations/BaseXPCService.xcconfig:
2418
2419 2019-08-19  Chris Dumez  <cdumez@apple.com>
2420
2421         NetworkDataTask is being ref'd / deref'd from several threads and is not ThreadSafeRefCounted
2422         https://bugs.webkit.org/show_bug.cgi?id=200897
2423
2424         Reviewed by Geoffrey Garen.
2425
2426         NetworkDataTask subclasses RefCounted and is ref'd / deref'd on the main thread. However, there
2427         is code in NetworkDataTaskCocoa::resume() that was ref'ing / deref'ing it on a background thread,
2428         which is unsafe. To address the issue, Have NetworkDataTask subclass ThreadSafeRefCounted, and
2429         make sure it always gets destroyed on the main thread.
2430
2431         * NetworkProcess/NetworkDataTask.h:
2432
2433         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
2434         (WebKit::NetworkDataTaskCocoa::resume):
2435         Avoid some unnecessary refcounting churn.
2436
2437 2019-08-19  Alex Christensen  <achristensen@webkit.org>
2438
2439         Move call to initializeMainThread introduced in r248549 to after WebKit.framework has been loaded
2440         https://bugs.webkit.org/show_bug.cgi?id=200896
2441         <rdar://problem/54479065>
2442
2443         Reviewed by Chris Dumez.
2444
2445         In XPCServiceMain we haven't been told which WebKit.framework to load yet, so when using staged frameworks it
2446         causes problems if we call a function from a WebKit framework.  We need to wait until after initializerFunctionPtr is called.
2447
2448         * NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkServiceEntryPoint.mm:
2449         (NetworkServiceInitializer):
2450         * PluginProcess/EntryPoint/Cocoa/XPCService/PluginServiceEntryPoint.mm:
2451         (PluginServiceInitializer):
2452         * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
2453         (WebKit::XPCServiceMain):
2454         * WebProcess/EntryPoint/Cocoa/XPCService/WebContentServiceEntryPoint.mm:
2455         (WebContentServiceInitializer):
2456
2457 2019-08-19  Yusuke Suzuki  <ysuzuki@apple.com>
2458
2459         Unreviewed, build fix for PLATFORM_DRIVEN_TEXT_CHECKING
2460         https://bugs.webkit.org/show_bug.cgi?id=200620
2461
2462         It is enabled if PLATFORM(MACCATALYST) is true.
2463
2464         * UIProcess/Cocoa/TextCheckingController.h:
2465
2466 2019-08-19  Sihui Liu  <sihui_liu@apple.com>
2467
2468         Remove IDB-specific quota
2469         https://bugs.webkit.org/show_bug.cgi?id=196545
2470         <rdar://problem/54201783>
2471
2472         Reviewed by Youenn Fablet.
2473
2474         * NetworkProcess/NetworkProcess.cpp:
2475         (WebKit::NetworkProcess::createIDBServer):
2476         (WebKit::NetworkProcess::addIndexedDatabaseSession):
2477         (WebKit::NetworkProcess::setIDBPerOriginQuota): Deleted.
2478         * NetworkProcess/NetworkProcess.h:
2479         * NetworkProcess/NetworkProcess.messages.in:
2480         * UIProcess/API/C/WKContext.cpp:
2481         (WKContextSetIDBPerOriginQuota): Deleted.
2482         * UIProcess/API/C/WKContextPrivate.h:
2483         * UIProcess/WebProcessPool.cpp:
2484         (WebKit::WebProcessPool::setIDBPerOriginQuota): Deleted.
2485         * UIProcess/WebProcessPool.h:
2486
2487 2019-08-19  Youenn Fablet  <youenn@apple.com>
2488
2489         Remove SessionID::emptySessionID()
2490         https://bugs.webkit.org/show_bug.cgi?id=200811
2491
2492         Reviewed by Alex Christensen.
2493
2494         Update SessionID call sites to use toUInt64.
2495         Remove debug asserts to isValid since construction of invalid session IDs can only happen in very specific cases
2496         typically for HashMaps.
2497
2498         * NetworkProcess/Downloads/DownloadManager.h:
2499         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2500         (WebKit::storageSession):
2501         (WebKit::NetworkConnectionToWebProcess::logUserInteraction):
2502         * NetworkProcess/NetworkProcess.cpp:
2503         (WebKit::NetworkProcess::networkSession const):
2504         (WebKit::NetworkProcess::networkSessionByConnection const):
2505         (WebKit::NetworkProcess::setSession):
2506         (WebKit::NetworkProcess::destroySession):
2507         (WebKit::NetworkProcess::fetchWebsiteData):
2508         (WebKit::NetworkProcess::deleteWebsiteData):
2509         (WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomains):
2510         (WebKit::NetworkProcess::registrableDomainsWithWebsiteData):
2511         (WebKit::NetworkProcess::existingSWOriginStoreForSession const):
2512         (WebKit::NetworkProcess::webProcessWasDisconnected):
2513         * NetworkProcess/NetworkProcess.h:
2514         * NetworkProcess/NetworkResourceLoader.cpp:
2515         (WebKit::NetworkResourceLoader::startNetworkLoad):
2516         * NetworkProcess/mac/RemoteNetworkingContext.mm:
2517         (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):
2518         * UIProcess/Network/NetworkProcessProxy.cpp:
2519         (WebKit::NetworkProcessProxy::retrieveCacheStorageParameters):
2520         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2521         (WebKit::WebsiteDataStore::~WebsiteDataStore):
2522         (WebKit::WebsiteDataStore::maybeRegisterWithSessionIDMap):
2523         (WebKit::WebsiteDataStore::existingNonDefaultDataStoreForSessionID):
2524         * WebProcess/Cache/WebCacheStorageProvider.cpp:
2525         (WebKit::WebCacheStorageProvider::createCacheStorageConnection):
2526         * WebProcess/Cache/WebCacheStorageProvider.h:
2527         * WebProcess/Storage/WebSWClientConnection.cpp:
2528         (WebKit::WebSWClientConnection::WebSWClientConnection):
2529         (WebKit::WebSWClientConnection::initializeConnectionIfNeeded):
2530         * WebProcess/Storage/WebServiceWorkerProvider.cpp:
2531         (WebKit::WebServiceWorkerProvider::existingServiceWorkerConnectionForSession):
2532         * WebProcess/WebPage/WebPage.cpp:
2533         (WebKit::m_textAutoSizingAdjustmentTimer):
2534
2535 2019-08-19  Yusuke Suzuki  <ysuzuki@apple.com>
2536
2537         Unreviewed, speculative build fix for GTK and WinCairo
2538         https://bugs.webkit.org/show_bug.cgi?id=200620
2539
2540         * UIProcess/socket/RemoteInspectorProtocolHandler.cpp:
2541
2542 2019-08-19  Yusuke Suzuki  <ysuzuki@apple.com>
2543
2544         Unreviewed, build fix in WinCairo and GTK ports
2545         https://bugs.webkit.org/show_bug.cgi?id=200767
2546
2547         * UIProcess/WebPageProxy.cpp:
2548         (WebKit::WebPageProxy::enumerateMediaDevicesForFrame):
2549
2550 2019-08-19  Youenn Fablet  <youenn@apple.com>
2551
2552         enumerateDevices should return the same JS objects if called twice
2553         https://bugs.webkit.org/show_bug.cgi?id=200767
2554
2555         Reviewed by Eric Carlson.
2556
2557         Update code as enumerate device request is now gone.
2558         Make use of async IPC to simplify code since we are now passing a completion handler directly.
2559
2560         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2561         (WebKit::UserMediaPermissionRequestManagerProxy::captureDevicesChanged):
2562         (WebKit::UserMediaPermissionRequestManagerProxy::finishGrantingRequest):
2563         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
2564         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
2565         * UIProcess/WebPageProxy.cpp:
2566         (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
2567         * UIProcess/WebPageProxy.h:
2568         * UIProcess/WebPageProxy.messages.in:
2569         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
2570         (WebKit::UserMediaPermissionRequestManager::enumerateMediaDevices):
2571         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
2572         * WebProcess/WebCoreSupport/WebUserMediaClient.cpp:
2573         (WebKit::WebUserMediaClient::enumerateMediaDevices):
2574         * WebProcess/WebCoreSupport/WebUserMediaClient.h:
2575         * WebProcess/WebPage/WebPage.cpp:
2576         * WebProcess/WebPage/WebPage.h:
2577         * WebProcess/WebPage/WebPage.messages.in:
2578
2579 2019-08-18  Yusuke Suzuki  <ysuzuki@apple.com>
2580
2581         [WTF] Add makeUnique<T>, which ensures T is fast-allocated, makeUnique / makeUniqueWithoutFastMallocCheck part
2582         https://bugs.webkit.org/show_bug.cgi?id=200620
2583
2584         Reviewed by Geoffrey Garen.
2585
2586         * NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.cpp:
2587         (WebKit::ResourceLoadStatisticsPersistentStorage::startMonitoringDisk):
2588         (WebKit::ResourceLoadStatisticsPersistentStorage::monitorDirectoryForNewStatistics):
2589         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
2590         (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
2591         * NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp:
2592         * NetworkProcess/Downloads/DownloadManager.cpp:
2593         (WebKit::DownloadManager::startDownload):
2594         (WebKit::DownloadManager::convertNetworkLoadToDownload):
2595         (WebKit::DownloadManager::resumeDownload):
2596         * NetworkProcess/Downloads/DownloadMap.cpp:
2597         (WebKit::DownloadMap::add):
2598         * NetworkProcess/Downloads/PendingDownload.cpp:
2599         (WebKit::PendingDownload::PendingDownload):
2600         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2601         (WebKit::NetworkConnectionToWebProcess::establishSWServerConnection):
2602         * NetworkProcess/NetworkContentRuleListManager.cpp:
2603         (WebKit::NetworkContentRuleListManager::addContentRuleLists):
2604         * NetworkProcess/NetworkDataTaskBlob.cpp:
2605         (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
2606         (WebKit::NetworkDataTaskBlob::download):
2607         * NetworkProcess/NetworkHTTPSUpgradeChecker.cpp:
2608         (WebKit::NetworkHTTPSUpgradeChecker::NetworkHTTPSUpgradeChecker):
2609         * NetworkProcess/NetworkLoad.cpp:
2610         (WebKit::NetworkLoad::didReceiveResponse):
2611         * NetworkProcess/NetworkLoadChecker.cpp:
2612         (WebKit::NetworkLoadChecker::checkCORSRequestWithPreflight):
2613         (WebKit::NetworkLoadChecker::contentSecurityPolicy):
2614         * NetworkProcess/NetworkProcess.cpp:
2615         (WebKit::NetworkProcess::switchToNewTestingSession):
2616         (WebKit::NetworkProcess::ensureSession):
2617         (WebKit::NetworkProcess::swServerForSession):
2618         (WebKit::NetworkProcess::initializeQuotaUsers):
2619         (WebKit::NetworkProcess::storageQuotaManager):
2620         * NetworkProcess/NetworkProcess.h:
2621         (WebKit::NetworkProcess::addSupplement):
2622         * NetworkProcess/NetworkResourceLoader.cpp:
2623         (WebKit::m_shouldCaptureExtraNetworkLoadMetrics):
2624         (WebKit::NetworkResourceLoader::startNetworkLoad):
2625         * NetworkProcess/NetworkSocketChannel.cpp:
2626         (WebKit::NetworkSocketChannel::create):
2627         * NetworkProcess/PreconnectTask.cpp:
2628         * NetworkProcess/WebStorage/LocalStorageDatabase.cpp:
2629         (WebKit::LocalStorageDatabase::scheduleDatabaseUpdate):
2630         * NetworkProcess/WebStorage/LocalStorageNamespace.cpp:
2631         (WebKit::LocalStorageNamespace::getOrCreateStorageArea):
2632         * NetworkProcess/WebStorage/SessionStorageNamespace.cpp:
2633         (WebKit::SessionStorageNamespace::getOrCreateStorageArea):
2634         * NetworkProcess/WebStorage/StorageArea.cpp:
2635         (WebKit::StorageArea::clone const):
2636         * NetworkProcess/WebStorage/StorageManager.cpp:
2637         (WebKit::StorageManager::createSessionStorageNamespace):
2638         (WebKit::StorageManager::getOrCreateLocalStorageNamespace):
2639         (WebKit::StorageManager::getOrCreateTransientLocalStorageNamespace):
2640         (WebKit::StorageManager::getOrCreateSessionStorageNamespace):
2641         * NetworkProcess/WebStorage/StorageManagerSet.cpp:
2642         (WebKit::StorageManagerSet::add):
2643         * NetworkProcess/WebStorage/TransientLocalStorageNamespace.cpp:
2644         (WebKit::TransientLocalStorageNamespace::getOrCreateStorageArea):
2645         * NetworkProcess/cache/NetworkCache.cpp:
2646         (WebKit::NetworkCache::Cache::Cache):
2647         (WebKit::NetworkCache::Cache::makeEntry):
2648         (WebKit::NetworkCache::Cache::makeRedirectEntry):
2649         (WebKit::NetworkCache::Cache::update):
2650         * NetworkProcess/cache/NetworkCacheEntry.cpp:
2651         (WebKit::NetworkCache::Entry::decodeStorageRecord):
2652         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
2653         (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
2654         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
2655         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::registerSubresourceLoad):
2656         (WebKit::NetworkCache::SpeculativeLoadManager::retrieve):
2657         (WebKit::NetworkCache::SpeculativeLoadManager::addPreloadedEntry):
2658         (WebKit::NetworkCache::SpeculativeLoadManager::satisfyPendingRequests):
2659         (WebKit::NetworkCache::SpeculativeLoadManager::revalidateSubresource):
2660         (WebKit::NetworkCache::SpeculativeLoadManager::startSpeculativeRevalidation):
2661         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2662         (WebKit::NetworkCache::Storage::synchronize):
2663         (WebKit::NetworkCache::Storage::readRecord):
2664         (WebKit::NetworkCache::retrieveFromMemory):
2665         (WebKit::NetworkCache::Storage::retrieve):
2666         (WebKit::NetworkCache::Storage::store):
2667         (WebKit::NetworkCache::Storage::traverse):
2668         * NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:
2669         (WebKit::NetworkCache::SubresourcesEntry::decodeStorageRecord):
2670         * NetworkProcess/cache/PrefetchCache.cpp:
2671         (WebKit::PrefetchCache::store):
2672         (WebKit::PrefetchCache::storeRedirect):
2673         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2674         (WebKit::NetworkProcess::platformCreateDefaultStorageSession const):
2675         (WebKit::NetworkProcess::networkHTTPSUpgradeChecker):
2676         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2677         (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):
2678         (WebKit::NetworkSessionCocoa::create):
2679         (WebKit::NetworkSessionCocoa::createWebSocketTask):
2680         * NetworkProcess/curl/NetworkProcessCurl.cpp:
2681         (WebKit::NetworkProcess::platformCreateDefaultStorageSession const):
2682         * NetworkProcess/curl/NetworkSessionCurl.h:
2683         * NetworkProcess/ios/NetworkConnectionToWebProcessIOS.mm:
2684         (WebKit::NetworkConnectionToWebProcess::paymentCoordinator):
2685         (WebKit::NetworkConnectionToWebProcess::paymentCoordinatorAuthorizationPresenter):
2686         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
2687         (WebKit::NetworkDataTaskSoup::download):
2688         * NetworkProcess/soup/NetworkProcessSoup.cpp:
2689         (WebKit::NetworkProcess::platformCreateDefaultStorageSession const):
2690         * NetworkProcess/soup/NetworkSessionSoup.cpp:
2691         (WebKit::NetworkSessionSoup::NetworkSessionSoup):
2692         (WebKit::NetworkSessionSoup::createWebSocketTask):
2693         * NetworkProcess/soup/NetworkSessionSoup.h:
2694         * NetworkProcess/soup/WebKitSoupRequestInputStream.cpp:
2695         (webkitSoupRequestInputStreamReadAsync):
2696         * NetworkProcess/webrtc/NetworkMDNSRegister.cpp:
2697         (WebKit::NetworkMDNSRegister::registerMDNSName):
2698         * NetworkProcess/webrtc/NetworkRTCMonitor.cpp:
2699         (WebKit::NetworkRTCMonitor::startUpdating):
2700         * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
2701         (WebKit::NetworkRTCProvider::NetworkRTCProvider):
2702         (WebKit::NetworkRTCProvider::createSocket):
2703         (WebKit::NetworkRTCProvider::wrapNewTCPConnection):
2704         * Platform/IPC/Connection.cpp:
2705         (IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
2706         (IPC::Connection::createSyncMessageEncoder):
2707         (IPC::Connection::enableIncomingMessagesThrottling):
2708         (IPC::Connection::dispatchSyncMessage):
2709         * Platform/IPC/Connection.h:
2710         (IPC::Connection::send):
2711         (IPC::Connection::sendWithAsyncReply):
2712         * Platform/IPC/Decoder.cpp:
2713         (IPC::Decoder::unwrapForTesting):
2714         * Platform/IPC/HandleMessage.h:
2715         (IPC::handleMessageAsync):
2716         * Platform/IPC/MessageSender.h:
2717         * Platform/IPC/cocoa/ConnectionCocoa.mm:
2718         (IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog):
2719         (IPC::Connection::open):
2720         (IPC::createMessageDecoder):
2721         (IPC::Connection::receiveSourceEventHandler):
2722         * Platform/IPC/unix/ConnectionUnix.cpp:
2723         (IPC::Connection::processMessage):
2724         (IPC::Connection::sendOutputMessage):
2725         * Platform/IPC/win/ConnectionWin.cpp:
2726         (IPC::Connection::readEventHandler):
2727         * Platform/mac/LayerHostingContext.mm:
2728         (WebKit::LayerHostingContext::createForPort):
2729         (WebKit::LayerHostingContext::createForExternalHostingProcess):
2730         (WebKit::LayerHostingContext::createForExternalPluginHostingProcess):
2731         * PluginProcess/WebProcessConnection.cpp:
2732         (WebKit::WebProcessConnection::createPluginInternal):
2733         * Shared/API/APIURL.h:
2734         (API::URL::create):
2735         (API::URL::parseURLIfNecessary const):
2736         * Shared/API/Cocoa/RemoteObjectInvocation.mm:
2737         (WebKit::RemoteObjectInvocation::decode):
2738         * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
2739         (-[_WKRemoteObjectRegistry _initWithWebPage:]):
2740         (-[_WKRemoteObjectRegistry _initWithWebPageProxy:]):
2741         (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
2742         * Shared/API/glib/WebKitContextMenuItem.cpp:
2743         (webkitContextMenuItemCreate):
2744         (webkit_context_menu_item_new):
2745         (webkit_context_menu_item_new_from_gaction):
2746         (webkit_context_menu_item_new_from_stock_action):
2747         (webkit_context_menu_item_new_from_stock_action_with_label):
2748         (webkit_context_menu_item_new_with_submenu):
2749         (webkit_context_menu_item_new_separator):
2750         * Shared/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
2751         (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
2752         * Shared/Cocoa/SandboxExtensionCocoa.mm:
2753         (WebKit::SandboxExtension::Handle::decode):
2754         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
2755         (WebKit::texmapLayer):
2756         (WebKit::CoordinatedGraphicsScene::ensureRootLayer):
2757         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
2758         (WebKit::ThreadedCompositor::ThreadedCompositor):
2759         * Shared/Plugins/NPRemoteObjectMap.cpp:
2760         (WebKit::NPRemoteObjectMap::registerNPObject):
2761         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
2762         (WebKit::NetscapePluginModule::tryLoad):
2763         * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:
2764         (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
2765         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
2766         (WebKit::RemoteLayerTreeTransaction::decode):
2767         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
2768         (WebKit::RemoteScrollingCoordinatorTransaction::decode):
2769         * Shared/cairo/ShareableBitmapCairo.cpp:
2770         (WebKit::ShareableBitmap::createGraphicsContext):
2771         * Shared/cg/ShareableBitmapCG.cpp:
2772         (WebKit::ShareableBitmap::createGraphicsContext):
2773         * Shared/win/ShareableBitmapDirect2D.cpp:
2774         (WebKit::ShareableBitmap::createGraphicsContext):
2775         * UIProcess/API/APIHTTPCookieStore.cpp:
2776         (API::HTTPCookieStore::registerObserver):
2777         * UIProcess/API/C/WKContext.cpp:
2778         (WKContextSetInjectedBundleClient):
2779         (WKContextSetHistoryClient):
2780         (WKContextSetDownloadClient):
2781         * UIProcess/API/C/WKGeolocationManager.cpp:
2782         (WKGeolocationManagerSetProvider):
2783         * UIProcess/API/C/WKNotificationManager.cpp:
2784         (WKNotificationManagerSetProvider):
2785         * UIProcess/API/C/WKPage.cpp:
2786         (WKPageSetPageContextMenuClient):
2787         (WKPageSetPageDiagnosticLoggingClient):
2788         (WKPageSetPageFindClient):
2789         (WKPageSetPageFindMatchesClient):
2790         (WKPageSetPageFormClient):
2791         (WKPageSetPageLoaderClient):
2792         (WKPageSetPagePolicyClient):
2793         (WKPageSetPageUIClient):
2794         (WKPageSetPageStateClient):
2795         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
2796         (-[WKObservablePageState initWithPage:]):
2797         * UIProcess/API/C/wpe/WKView.cpp:
2798         (WKViewSetViewClient):
2799         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2800         (-[WKBrowsingContextController _initWithPageRef:]):
2801         * UIProcess/API/Cocoa/WKHTTPCookieStore.mm:
2802         (-[WKHTTPCookieStore addObserver:]):
2803         * UIProcess/API/Cocoa/WKProcessPool.mm:
2804         (-[WKProcessPool _setDownloadDelegate:]):
2805         (-[WKProcessPool _setAutomationDelegate:]):
2806         * UIProcess/API/Cocoa/WKUserContentController.mm:
2807         (-[WKUserContentController addScriptMessageHandler:name:]):
2808         (-[WKUserContentController _addScriptMessageHandler:name:userContentWorld:]):
2809         * UIProcess/API/Cocoa/WKWebView.mm:
2810         (-[WKWebView _initializeWithConfiguration:]):
2811         (-[WKWebView setAllowsBackForwardNavigationGestures:]):
2812         (-[WKWebView _setInputDelegate:]):
2813         * UIProcess/API/Cocoa/_WKAutomationSession.mm:
2814         (-[_WKAutomationSession setDelegate:]):
2815         * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm:
2816         (-[_WKRemoteWebInspectorViewController init]):
2817         * UIProcess/API/glib/IconDatabase.cpp:
2818         (WebKit::readySQLiteStatement):
2819         * UIProcess/API/glib/WebKitAutomationSession.cpp:
2820         (webkitAutomationSessionConstructed):
2821         * UIProcess/API/glib/WebKitContextMenuClient.cpp:
2822         (attachContextMenuClientToView):
2823         * UIProcess/API/glib/WebKitCustomProtocolManagerClient.cpp:
2824         (attachCustomProtocolManagerClientToContext):
2825         * UIProcess/API/glib/WebKitDownloadClient.cpp:
2826         (attachDownloadClientToContext):
2827         * UIProcess/API/glib/WebKitFaviconDatabase.cpp:
2828         (webkitFaviconDatabaseOpen):
2829         * UIProcess/API/glib/WebKitFindController.cpp:
2830         (webkitFindControllerConstructed):
2831         * UIProcess/API/glib/WebKitFormClient.cpp:
2832         (attachFormClientToView):
2833         * UIProcess/API/glib/WebKitGeolocationManager.cpp:
2834         (webkitGeolocationManagerCreate):
2835         * UIProcess/API/glib/WebKitIconLoadingClient.cpp:
2836         (attachIconLoadingClientToView):
2837         * UIProcess/API/glib/WebKitInjectedBundleClient.cpp:
2838         (attachInjectedBundleClientToContext):
2839         * UIProcess/API/glib/WebKitNotificationProvider.cpp:
2840         (WebKitNotificationProvider::WebKitNotificationProvider):
2841         * UIProcess/API/glib/WebKitUIClient.cpp:
2842         (attachUIClientToView):
2843         * UIProcess/API/glib/WebKitUserContentManager.cpp:
2844         (webkit_user_content_manager_register_script_message_handler):
2845         (webkit_user_content_manager_register_script_message_handler_in_world):
2846         * UIProcess/API/glib/WebKitWebContext.cpp:
2847         (webkitWebContextConstructed):
2848         (webkit_web_context_set_automation_allowed):
2849         * UIProcess/API/glib/WebKitWebView.cpp:
2850         (webkitWebViewConstructed):
2851         * UIProcess/API/gtk/PageClientImpl.cpp:
2852         (WebKit::PageClientImpl::createDrawingAreaProxy):
2853         * UIProcess/API/gtk/WebKitEmojiChooser.cpp:
2854         (webkitEmojiChooserSetupEmojiSections):
2855         * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
2856         (WebKit::RemoteInspectorProtocolHandler::handleRequest):
2857         * UIProcess/API/gtk/WebKitWebInspector.cpp:
2858         (webkitWebInspectorCreate):
2859         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2860         (webkitWebViewBaseConstructed):
2861         (webkitWebViewBaseGestureController):
2862         (webkitWebViewBaseDragAndDropHandler):
2863         (webkitWebViewBaseDidRelaunchWebProcess):
2864         * UIProcess/API/mac/WKView.mm:
2865         (-[WKView maybeInstallIconLoadingClient]):
2866         (-[WKView initWithFrame:processPool:configuration:]):
2867         * UIProcess/API/wpe/PageClientImpl.cpp:
2868         (WebKit::PageClientImpl::PageClientImpl):
2869         (WebKit::PageClientImpl::createDrawingAreaProxy):
2870         * UIProcess/API/wpe/WPEView.cpp:
2871         (WKWPE::View::View):
2872         (WKWPE::View::setClient):
2873         * UIProcess/API/wpe/qt/WPEQtView.cpp:
2874         (WPEQtView::notifyLoadChangedCallback):
2875         (WPEQtView::notifyLoadFailedCallback):
2876         (WPEQtView::runJavaScript):
2877         * UIProcess/API/wpe/qt/WPEQtViewBackend.cpp:
2878         (WPEQtViewBackend::create):
2879         * UIProcess/Automation/WebAutomationSession.cpp:
2880         (WebKit::WebAutomationSession::WebAutomationSession):
2881         * UIProcess/AuxiliaryProcessProxy.h:
2882         (WebKit::AuxiliaryProcessProxy::send):
2883         * UIProcess/Cocoa/IconLoadingDelegate.mm:
2884         (WebKit::IconLoadingDelegate::createIconLoadingClient):
2885         * UIProcess/Cocoa/UIDelegate.mm:
2886         (WebKit::UIDelegate::createContextMenuClient):
2887         (WebKit::UIDelegate::createUIClient):
2888         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
2889         (WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):
2890         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2891         (WebKit::WebProcessPool::platformInitialize):
2892         (WebKit::WebProcessPool::startDisplayLink):
2893         * UIProcess/Cocoa/WebProcessProxyCocoa.mm:
2894         (WebKit::WebProcessProxy::processWasUnexpectedlyUnsuspended):
2895         * UIProcess/Cocoa/WebViewImpl.mm:
2896         (WebKit::WebViewImpl::WebViewImpl):
2897         (WebKit::WebViewImpl::createDrawingAreaProxy):
2898         (WebKit::WebViewImpl::setTextIndicator):
2899         (WebKit::WebViewImpl::ensureGestureController):
2900         * UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:
2901         (WebKit::DrawingAreaProxyCoordinatedGraphics::incorporateUpdate):
2902         (WebKit::DrawingAreaProxyCoordinatedGraphics::dispatchAfterEnsuringDrawing):
2903         * UIProcess/DeviceIdHashSaltStorage.cpp:
2904         (WebKit::DeviceIdHashSaltStorage::getDataFromDecoder const):
2905         (WebKit::DeviceIdHashSaltStorage::completeDeviceIdHashSaltForOriginCall):
2906         * UIProcess/Downloads/DownloadProxyMap.cpp:
2907         (WebKit::DownloadProxyMap::createDownloadProxy):
2908         * UIProcess/Gamepad/UIGamepadProvider.cpp:
2909         (WebKit::UIGamepadProvider::setInitialConnectedGamepads):
2910         (WebKit::UIGamepadProvider::platformGamepadConnected):
2911         * UIProcess/Network/NetworkProcessProxy.cpp:
2912         (WebKit::NetworkProcessProxy::createDownloadProxy):
2913         (WebKit::NetworkProcessProxy::takeUploadAssertion):
2914         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
2915         (WebKit::WebNotificationManagerProxy::WebNotificationManagerProxy):
2916         (WebKit::WebNotificationManagerProxy::setProvider):
2917         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
2918         (WebKit::pluginRequiresGtk2):
2919         * UIProcess/ProcessThrottler.cpp:
2920         (WebKit::ProcessThrottler::didConnectToProcess):
2921         * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
2922         (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
2923         (WebKit::RemoteLayerTreeDrawingAreaProxy::initializeDebugIndicator):
2924         * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
2925         (WebKit::RemoteLayerTreeHost::makeNode):
2926         * UIProcess/RemoteLayerTree/RemoteLayerTreeNode.mm:
2927         (WebKit::RemoteLayerTreeNode::createWithPlainLayer):
2928         * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
2929         (WebKit::RemoteLayerTreeHost::makeNode):
2930         * UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm:
2931         (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateBeforeChildren):
2932         * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
2933         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::ScrollingTreeOverflowScrollingNodeIOS):
2934         * UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.cpp:
2935         (WebKit::ScrollingTreeFrameScrollingNodeRemoteMac::ScrollingTreeFrameScrollingNodeRemoteMac):
2936         * UIProcess/RemoteLayerTree/mac/ScrollingTreeOverflowScrollingNodeRemoteMac.cpp:
2937         (WebKit::ScrollingTreeOverflowScrollingNodeRemoteMac::ScrollingTreeOverflowScrollingNodeRemoteMac):
2938         * UIProcess/WebAuthentication/Cocoa/HidService.mm:
2939         (WebKit::HidService::deviceAdded):
2940         * UIProcess/WebGeolocationManagerProxy.cpp:
2941         (WebKit::WebGeolocationManagerProxy::WebGeolocationManagerProxy):
2942         (WebKit::WebGeolocationManagerProxy::setProvider):
2943         * UIProcess/WebMediaSessionFocusManager.cpp:
2944         (WebKit::WebMediaSessionFocusManager::setFocusedMediaElement):
2945         * UIProcess/WebPageInspectorController.cpp:
2946         (WebKit::WebPageInspectorController::WebPageInspectorController):
2947         * UIProcess/WebPageProxy.cpp:
2948         (WebKit::WebPageProxy::WebPageProxy):
2949         (WebKit::m_resetRecentCrashCountTimer):
2950         (WebKit::WebPageProxy::setFormClient):
2951         (WebKit::WebPageProxy::setUIClient):
2952         (WebKit::WebPageProxy::setIconLoadingClient):
2953         (WebKit::WebPageProxy::setFindClient):
2954         (WebKit::WebPageProxy::setFindMatchesClient):
2955         (WebKit::WebPageProxy::setContextMenuClient):
2956         (WebKit::WebPageProxy::setInjectedBundleClient):
2957         (WebKit::WebPageProxy::suspendCurrentPageIfPossible):
2958         (WebKit::WebPageProxy::didAttachToRunningProcess):
2959         (WebKit::WebPageProxy::setDrawingArea):
2960         (WebKit::WebPageProxy::close):
2961         (WebKit::WebPageProxy::loadData):
2962         (WebKit::WebPageProxy::handleWheelEvent):
2963         (WebKit::WebPageProxy::processNextQueuedWheelEvent):
2964         (WebKit::WebPageProxy::continueNavigationInNewProcess):
2965         (WebKit::WebPageProxy::setFullscreenClient):
2966         (WebKit::WebPageProxy::userMediaPermissionRequestManager):
2967         (WebKit::WebPageProxy::setScrollPerformanceDataCollectionEnabled):
2968         (WebKit::WebPageProxy::speechSynthesisData):
2969         * UIProcess/WebProcessCache.cpp:
2970         (WebKit::WebProcessCache::addProcessIfPossible):
2971         * UIProcess/WebProcessPool.cpp:
2972         (WebKit::WebProcessPool::WebProcessPool):
2973         (WebKit::WebProcessPool::setInjectedBundleClient):
2974         (WebKit::WebProcessPool::setHistoryClient):
2975         (WebKit::WebProcessPool::setDownloadClient):
2976         (WebKit::WebProcessPool::setAutomationClient):
2977         (WebKit::WebProcessPool::setLegacyCustomProtocolManagerClient):
2978         (WebKit::WebProcessPool::ensureNetworkProcess):
2979         (WebKit::WebProcessPool::didCollectPrewarmInformation):
2980         (WebKit::WebProcessPool::setWebProcessHasUploads):
2981         (WebKit::WebProcessPool::setWebProcessIsPlayingAudibleMedia):
2982         * UIProcess/WebProcessProxy.cpp:
2983         * UIProcess/cairo/BackingStoreCairo.cpp:
2984         (WebKit::BackingStore::createBackend):
2985         * UIProcess/glib/RemoteInspectorClient.cpp:
2986         (WebKit::RemoteInspectorClient::inspect):
2987         * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
2988         (WebKit::AcceleratedBackingStoreWayland::checkRequirements):
2989         * UIProcess/gtk/DragAndDropHandler.cpp:
2990         (WebKit::DragAndDropHandler::dragDataSelection):
2991         * UIProcess/gtk/WaylandCompositor.cpp:
2992         (WebKit::WaylandCompositor::initializeEGL):
2993         * UIProcess/ios/EditableImageController.mm:
2994         (WebKit::EditableImageController::ensureEditableImage):
2995         * UIProcess/ios/WKApplicationStateTrackingView.mm:
2996         (-[WKApplicationStateTrackingView didMoveToWindow]):
2997         * UIProcess/ios/WKContentView.mm:
2998         (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
2999         (-[WKContentView initWithFrame:processPool:configuration:webView:]):
3000         (-[WKContentView _createDrawingAreaProxy:]):
3001         * UIProcess/ios/WKContentViewInteraction.mm:
3002         (-[WKContentView setupInteraction]):
3003         (-[WKContentView becomeFirstResponderForWebView]):
3004         (-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:activityStateChanges:userObject:]):
3005         * UIProcess/ios/WebPageProxyIOS.mm:
3006         (WebKit::WebPageProxy::elementDidFocus):
3007         (WebKit::WebPageProxy::paymentCoordinatorAuthorizationPresenter):
3008         * UIProcess/mac/PageClientImplMac.mm:
3009         (WebKit::PageClientImpl::PageClientImpl):
3010         * UIProcess/mac/WKFullScreenWindowController.mm:
3011         (-[WKFullScreenWindowController initWithWindow:webView:page:]):
3012         * UIProcess/mac/WKTextFinderClient.mm:
3013         (-[WKTextFinderClient initWithPage:view:usePlatformFindUI:]):
3014         * UIProcess/socket/RemoteInspectorClient.cpp:
3015         (WebKit::RemoteInspectorClient::inspect):
3016         * UIProcess/socket/RemoteInspectorProtocolHandler.cpp:
3017         (WebKit::RemoteInspectorProtocolHandler::platformStartTask):
3018         * UIProcess/win/BackingStoreDirect2D.cpp:
3019         (WebKit::BackingStore::createBackend):
3020         * UIProcess/win/PageClientImpl.cpp:
3021         (WebKit::PageClientImpl::createDrawingAreaProxy):
3022         * UIProcess/win/WebView.cpp:
3023         (WebKit::WebView::WebView):
3024         * WebProcess/Gamepad/WebGamepadProvider.cpp:
3025         (WebKit::WebGamepadProvider::setInitialGamepads):
3026         (WebKit::WebGamepadProvider::gamepadConnected):
3027         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
3028         (WKBundleSetClient):
3029         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3030         (WKBundlePageSetContextMenuClient):
3031         (WKBundlePageSetEditorClient):
3032         (WKBundlePageSetFormClient):
3033         (WKBundlePageSetPageLoaderClient):
3034         (WKBundlePageSetResourceLoadClient):
3035         (WKBundlePageSetUIClient):
3036         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
3037         (WKBundlePageOverlayCreate):
3038         * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm:
3039         (WKBundlePageBannerCreateBannerWithCALayer):
3040         * WebProcess/InjectedBundle/API/glib/DOM/DOMObjectCache.cpp:
3041         (WebKit::getOrCreateDOMObjectCacheFrameObserver):
3042         (WebKit::DOMObjectCache::put):
3043         * WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.cpp:
3044         (WebKit::WebKitExtensionManager::initialize):
3045         * WebProcess/InjectedBundle/API/glib/WebKitWebEditor.cpp:
3046         (webkitWebEditorCreate):
3047         * WebProcess/InjectedBundle/API/glib/WebKitWebExtension.cpp:
3048         (webkitWebExtensionCreate):
3049         * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
3050         (webkitFrameGetOrCreate):
3051         (webkitWebPageCreate):
3052         * WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.mm:
3053         (-[WKDOMTextIterator initWithRange:]):
3054         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
3055         (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]):
3056         (-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]):
3057         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3058         (WebKit::InjectedBundle::InjectedBundle):
3059         (WebKit::InjectedBundle::setClient):
3060         * WebProcess/Network/WebSocketChannel.cpp:
3061         (WebKit::PendingMessage::PendingMessage):
3062         (WebKit::WebSocketChannel::send):
3063         * WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
3064         (WebKit::LibWebRTCProvider::createPeerConnection):
3065         (WebKit::LibWebRTCProvider::createSocketFactory):
3066         * WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:
3067         (WebKit::LibWebRTCSocketFactory::createServerTcpSocket):
3068         (WebKit::LibWebRTCSocketFactory::createUdpSocket):
3069         (WebKit::LibWebRTCSocketFactory::createClientTcpSocket):
3070         (WebKit::LibWebRTCSocketFactory::createNewConnectionSocket):
3071         (WebKit::LibWebRTCSocketFactory::createAsyncResolver):
3072         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
3073         (WebKit::PluginDestructionProtector::PluginDestructionProtector):
3074         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3075         (WebKit::NetscapePlugin::scheduleTimer):
3076         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
3077         (WebKit::NetscapePluginStream::deliverData):
3078         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
3079         (WebKit::NetscapePluginX11::create):
3080         * WebProcess/Plugins/PluginProxy.cpp:
3081         (WebKit::PluginProxy::initialize):
3082         * WebProcess/Plugins/PluginView.cpp:
3083         (WebKit::PluginView::createWebEvent const):
3084         * WebProcess/Storage/WebSWContextManagerConnection.cpp:
3085         (WebKit::WebSWContextManagerConnection::installServiceWorker):
3086         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3087         (WebKit::WebChromeClient::createColorChooser):
3088         (WebKit::WebChromeClient::createDataListSuggestionPicker):
3089         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
3090         (WebKit::WebInspectorClient::showPaintRect):
3091         * WebProcess/WebCoreSupport/WebPasteboardOverrides.cpp:
3092         (WebKit::WebPasteboardOverrides::addOverride):
3093         * WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:
3094         (WebKit::DrawingAreaCoordinatedGraphics::enterAcceleratedCompositingMode):
3095         * WebProcess/WebPage/DrawingArea.cpp:
3096         (WebKit::DrawingArea::create):
3097         * WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp:
3098         (WebKit::PlatformCALayerRemote::ensureBackingStore):
3099         (WebKit::PlatformCALayerRemote::setTransform):
3100         (WebKit::PlatformCALayerRemote::setSublayerTransform):
3101         (WebKit::PlatformCALayerRemote::setFilters):
3102         (WebKit::PlatformCALayerRemote::setShapeRoundedRect):
3103         * WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteTiledBacking.cpp:
3104         (WebKit::PlatformCALayerRemoteTiledBacking::PlatformCALayerRemoteTiledBacking):
3105         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
3106         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
3107         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
3108         * WebProcess/WebPage/WebFrame.cpp:
3109         (WebKit::WebFrame::createSubframe):
3110         * WebProcess/WebPage/WebPage.cpp:
3111         (WebKit::m_textAutoSizingAdjustmentTimer):
3112         (WebKit::WebPage::setInjectedBundleContextMenuClient):
3113         (WebKit::WebPage::setInjectedBundleEditorClient):
3114         (WebKit::WebPage::setInjectedBundleFormClient):
3115         (WebKit::WebPage::setInjectedBundlePageLoaderClient):
3116         (WebKit::WebPage::setInjectedBundleResourceLoadClient):
3117         (WebKit::WebPage::setInjectedBundleUIClient):
3118         (WebKit::WebPage::close):
3119         (WebKit::WebPage::beginPrinting):
3120         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
3121         (WebKit::WebPrintOperationGtk::print):
3122         * WebProcess/WebPage/ios/FindControllerIOS.mm:
3123         (WebKit::FindController::updateFindIndicator):
3124         * WebProcess/WebPage/mac/DrawingAreaMac.cpp:
3125         (WebKit::DisplayRefreshMonitorMac::requestRefreshCallback):
3126         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3127         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
3128         * WebProcess/WebProcess.cpp:
3129         (WebKit::WebProcess::markAllLayersVolatile):
3130         (WebKit::WebProcess::ensureAutomationSessionProxy):
3131         (WebKit::WebProcess::libWebRTCNetwork):
3132         (WebKit::WebProcess::establishWorkerContextConnectionToNetworkProcess):
3133         * WebProcess/WebProcess.h:
3134         (WebKit::WebProcess::addSupplement):
3135         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
3136         (WebKit::UserMediaCaptureManager::Source::Source):
3137         * WebProcess/cocoa/WebProcessCocoa.mm:
3138         (WebKit::WebProcess::processTaskStateDidChange):
3139         (WebKit::WebProcess::updateCPUMonitorState):
3140
3141 2019-08-18  Per Arne Vollan  <pvollan@apple.com>
3142
3143         [Mac] Use the PID of the WebContent process when issuing local file read sandbox extensions
3144         https://bugs.webkit.org/show_bug.cgi?id=200543
3145         <rdar://problem/49394015>
3146         
3147         Reviewed by Brent Fulgham.
3148
3149         Adopt SPI to issue a process-specific sandbox extension for local file read, passing it the process
3150         identifier of the WebContent process.
3151         
3152         * Shared/Cocoa/SandboxExtensionCocoa.mm:
3153         (WebKit::SandboxExtensionImpl::sandboxExtensionForType):
3154         (WebKit::SandboxExtension::createHandleForReadByPid):
3155         * Shared/SandboxExtension.h:
3156         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
3157         (WebKit::WebPageProxy::createSandboxExtensionsIfNeeded):
3158         * UIProcess/WebPageProxy.cpp:
3159         (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
3160         (WebKit::WebPageProxy::loadFile):
3161
3162 2019-08-17  Tim Horton  <timothy_horton@apple.com>
3163
3164         Layout tests that call resizeTo() crash when run on iOS with IOSurface support enabled
3165         https://bugs.webkit.org/show_bug.cgi?id=200866
3166         <rdar://problem/50254021>
3167
3168         Reviewed by Simon Fraser.
3169
3170         * UIProcess/ios/PageClientImplIOS.mm:
3171         (WebKit::PageClientImpl::convertToDeviceSpace):
3172         (WebKit::PageClientImpl::convertToUserSpace):
3173         Implement convertTo{Device,User}Space in PageClientImplIOS.
3174         We don't actually do any conversion. For our purposes, the window is
3175         "device" space, and we never allow iOS WebKit clients to resize the window...
3176         except for in tests! So just pass the rects straight through, instead of
3177         returning an empty rect.
3178
3179 2019-08-17  Eric Liang  <ericliang@apple.com>
3180
3181         Use bundlePath SPI in AccessibilitySupport for WebProcessLoader
3182         https://bugs.webkit.org/show_bug.cgi?id=200367
3183
3184         Reviewed by Darin Adler.
3185
3186         * Platform/spi/ios/AccessibilitySupportSPI.h:
3187         * WebProcess/cocoa/WebProcessCocoa.mm:
3188         (WebKit::accessibilityWebProcessLoaderBundlePath):
3189         (WebKit::registerWithAccessibility):
3190
3191 2019-08-17  Sam Weinig  <weinig@apple.com>
3192
3193         Rename StringBuilder::flexibleAppend(...) to StringBuilder::append(...)
3194         https://bugs.webkit.org/show_bug.cgi?id=200756
3195
3196         Reviewed by Darin Adler.
3197
3198         Update call sites for rename from StringBuilder::flexibleAppend(...) to 
3199         StringBuilder::append(...).
3200
3201         * WebProcess/WebPage/WebPage.cpp:
3202         (WebKit::dumpHistoryItem):
3203         We have to explicitly access the underlying String of the URL rather than
3204         relying on the implicit conversion since it is now ambiguous which append(...)
3205         overload should be used.
3206
3207 2019-08-17  Devin Rousso  <drousso@apple.com>
3208
3209         Web Inspector: make the initial height bigger when attached
3210         https://bugs.webkit.org/show_bug.cgi?id=200855
3211
3212         Reviewed by Joseph Pecoraro.
3213
3214         * Shared/WebPreferences.yaml:
3215         Increase the default attached height from `300px` to `500px`, which is close to the same
3216         amount of area given a 15" MacBook Pro's aspect ratio (default attached width is `750px`).
3217
3218 2019-08-17  Simon Fraser  <simon.fraser@apple.com>
3219
3220         [iOS WK2] Scroll indicators disappear sometimes
3221         https://bugs.webkit.org/show_bug.cgi?id=200791
3222
3223         Reviewed by Tim Horton.
3224         
3225         _web_setSubviews: replaces all of the views subviews with the supplied array, but this blows
3226         away views not managed by WebKit, including UIScrollViews scroll indicators. Fix by having
3227         WebKit-managed views implement the WKWebKitControlled protocol, and only removing views
3228         implementing that protocol.
3229
3230         * Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
3231         (-[UIView _web_setSubviews:]):
3232         * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.h:
3233
3234 2019-08-17  Antti Koivisto  <antti@apple.com>
3235
3236         Content in <iframe> should override "touch-action" set in embedding document
3237         https://bugs.webkit.org/show_bug.cgi?id=200204
3238         <rdar://problem/54355249>
3239
3240         Reviewed by Antoine Quint.
3241
3242         Subframes where content doesn't use any touch-action properties won't generate event region for their main layer.
3243         As a result the touch-action property gets computed in UI process to the parent frames touch-action (instead of 'auto').
3244
3245         * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:
3246         (WebKit::touchActionsForPoint):
3247
3248         If the topmost layer hit is a WKChildScrollView we know its content layer didn't have an event region.
3249         This means we should return the default value 'auto'.
3250
3251 2019-08-16  Chris Dumez  <cdumez@apple.com>
3252
3253         Use strongly typed identifiers for StorageArea / StorageAreaImpl
3254         https://bugs.webkit.org/show_bug.cgi?id=200835
3255
3256         Reviewed by Alex Christensen.
3257
3258         Use strongly typed identifiers for StorageArea / StorageAreaImpl. They currently both use uint64_t
3259         and are used in the same code, it is therefore very easy to confused the 2 types of identifiers.
3260
3261         * NetworkProcess/WebStorage/StorageArea.cpp:
3262         (WebKit::StorageArea::StorageArea):
3263         (WebKit::StorageArea::setItem):
3264         (WebKit::StorageArea::removeItem):
3265         (WebKit::StorageArea::clear):
3266         (WebKit::StorageArea::dispatchEvents const):
3267         * NetworkProcess/WebStorage/StorageArea.h:
3268         (WebKit::StorageArea::identifier):
3269         * NetworkProcess/WebStorage/StorageAreaIdentifier.h: Copied from Source/WebKit/WebProcess/WebStorage/StorageAreaImpl.h.
3270         * NetworkProcess/WebStorage/StorageManagerSet.cpp:
3271         (WebKit::StorageManagerSet::connectToLocalStorageArea):
3272         (WebKit::StorageManagerSet::connectToTransientLocalStorageArea):
3273         (WebKit::StorageManagerSet::connectToSessionStorageArea):
3274         (WebKit::StorageManagerSet::disconnectFromStorageArea):
3275         (WebKit::StorageManagerSet::getValues):
3276         (WebKit::StorageManagerSet::setItem):
3277         (WebKit::StorageManagerSet::removeItem):
3278         (WebKit::StorageManagerSet::clear):
3279         * NetworkProcess/WebStorage/StorageManagerSet.h:
3280         * NetworkProcess/WebStorage/StorageManagerSet.messages.in:
3281         * Scripts/webkit/messages.py:
3282         * WebKit.xcodeproj/project.pbxproj:
3283         * WebProcess/Network/NetworkProcessConnection.cpp:
3284         (WebKit::NetworkProcessConnection::didReceiveMessage):
3285         * WebProcess/WebProcess.cpp:
3286         (WebKit::WebProcess::registerStorageAreaMap):
3287         (WebKit::WebProcess::unregisterStorageAreaMap):
3288         (WebKit::WebProcess::storageAreaMap const):
3289         * WebProcess/WebProcess.h:
3290         * WebProcess/WebStorage/StorageAreaImpl.cpp:
3291         (WebKit::StorageAreaImpl::StorageAreaImpl):
3292         * WebProcess/WebStorage/StorageAreaImpl.h:
3293         * WebProcess/WebStorage/StorageAreaImplIdentifier.h: Copied from Source/WebKit/WebProcess/WebStorage/StorageAreaImpl.h.
3294         * WebProcess/WebStorage/StorageAreaMap.cpp:
3295         (WebKit::StorageAreaMap::StorageAreaMap):
3296         (WebKit::StorageAreaMap::setItem):
3297         (WebKit::StorageAreaMap::removeItem):
3298         (WebKit::StorageAreaMap::clear):
3299         (WebKit::StorageAreaMap::loadValuesIfNeeded):
3300         (WebKit::StorageAreaMap::dispatchStorageEvent):
3301         (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
3302         (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
3303         (WebKit::StorageAreaMap::disconnect):
3304         * WebProcess/WebStorage/StorageAreaMap.h:
3305         (WebKit::StorageAreaMap::identifier const):
3306         * WebProcess/WebStorage/StorageAreaMap.messages.in:
3307
3308 2019-08-16  Chris Dumez  <cdumez@apple.com>
3309
3310         Drop StorageArea::setWorkQueue() member function
3311         https://bugs.webkit.org/show_bug.cgi?id=200832
3312
3313         Reviewed by Alex Christensen.
3314
3315         Drop StorageArea::setWorkQueue() member function and pass the WorkQueue to the StorageArea constructor instead.
3316         The WorkQueue can never get updated so an explicit setter is not necessary. It also makes it clearer that the
3317         m_queue data member can never be null.
3318
3319         * NetworkProcess/WebStorage/LocalStorageNamespace.cpp:
3320         (WebKit::LocalStorageNamespace::getOrCreateStorageArea):
3321         * NetworkProcess/WebStorage/LocalStorageNamespace.h:
3322         * NetworkProcess/WebStorage/SessionStorageNamespace.cpp:
3323         (WebKit::SessionStorageNamespace::getOrCreateStorageArea):
3324         * NetworkProcess/WebStorage/SessionStorageNamespace.h:
3325         * NetworkProcess/WebStorage/StorageArea.cpp:
3326         (WebKit::StorageArea::StorageArea):
3327         (WebKit::StorageArea::clone const):
3328         (WebKit::StorageArea::openDatabaseAndImportItemsIfNeeded const):
3329         * NetworkProcess/WebStorage/StorageArea.h:
3330         (WebKit::StorageArea::setWorkQueue): Deleted.
3331         * NetworkProcess/WebStorage/StorageManager.cpp:
3332         (WebKit::StorageManager::createLocalStorageArea):
3333         (WebKit::StorageManager::createTransientLocalStorageArea):
3334         (WebKit::StorageManager::createSessionStorageArea):
3335         * NetworkProcess/WebStorage/StorageManager.h:
3336         * NetworkProcess/WebStorage/StorageManagerSet.cpp:
3337         (WebKit::StorageManagerSet::connectToLocalStorageArea):
3338         (WebKit::StorageManagerSet::connectToTransientLocalStorageArea):
3339         (WebKit::StorageManagerSet::connectToSessionStorageArea):
3340         * NetworkProcess/WebStorage/TransientLocalStorageNamespace.cpp:
3341         (WebKit::TransientLocalStorageNamespace::getOrCreateStorageArea):
3342         * NetworkProcess/WebStorage/TransientLocalStorageNamespace.h:
3343
3344 2019-08-16  Chris Dumez  <cdumez@apple.com>
3345
3346         LocalStorageDatabaseTracker does not need to subclass ThreadSafeRefCounted
3347         https://bugs.webkit.org/show_bug.cgi?id=200825
3348
3349         Reviewed by Alex Christensen.
3350
3351         LocalStorageDatabaseTracker does not need to subclass ThreadSafeRefCounted. It is currently always
3352         ref'd / deref'd from the com.apple.WebKit.WebStorage serial WorkQueue, save from inside
3353         LocalStorageDatabaseTracker::platformMaybeExcludeFromBackup() on iOS. However, it is probably
3354         not a good idea to set FileSystem metadata from the main thread in platformMaybeExcludeFromBackup()
3355         anyway.
3356
3357         Note that I had to get rid of an old linked-on-after check since those are currently only safe
3358         to do on the main thread. I cleared this with Brady. It has been a while since we've shipped this
3359         behavior now and apps have had a chance to update.
3360
3361         * NetworkProcess/WebStorage/LocalStorageDatabaseTracker.cpp:
3362         (WebKit::LocalStorageDatabaseTracker::databasePath const):
3363         * NetworkProcess/WebStorage/LocalStorageDatabaseTracker.h:
3364         * NetworkProcess/WebStorage/ios/LocalStorageDatabaseTrackerIOS.mm:
3365         (WebKit::LocalStorageDatabaseTracker::platformMaybeExcludeFromBackup const):
3366         * UIProcess/Cocoa/VersionChecks.h:
3367
3368 2019-08-16  Chris Dumez  <cdumez@apple.com>
3369
3370         LocalStorageDatabase should use inline initialization for its data members
3371         https://bugs.webkit.org/show_bug.cgi?id=200828
3372
3373         Reviewed by John Wilander.
3374