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