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