Unreviewed, build fix after r246514
[WebKit-https.git] / Source / WebKit / ChangeLog
1 2019-06-17  Jiewen Tan  <jiewen_tan@apple.com>
2
3         Unreviewed, build fix after r246514
4
5         * UIProcess/Cocoa/SOAuthorization/SOAuthorizationNSURLExtras.h:
6         * UIProcess/Cocoa/SOAuthorization/SOAuthorizationNSURLExtras.mm:
7         (+[NSURL _web_canPerformAuthorizationWithURL:]):
8         Expose the above method as a SPI for Safari.
9         * WebKit.xcodeproj/project.pbxproj:
10
11 2019-06-17  Alex Christensen  <achristensen@webkit.org>
12
13         Protect StorageManager::m_localStorageNamespaces with a Lock
14         https://bugs.webkit.org/show_bug.cgi?id=198939
15         <rdar://problem/51784225>
16
17         Reviewed by Geoff Garen.
18
19         StorageManager::LocalStorageNamespace::didDestroyStorageArea is called from StorageArea::~StorageArea which is called on the main thread.
20         All other access of m_localStorageNamespaces is from the non-main thread.  Sometimes this causes hash table corruption, so wait for a mutex
21         before accessing this member variable.
22
23         * NetworkProcess/WebStorage/StorageManager.cpp:
24         (WebKit::StorageManager::LocalStorageNamespace::didDestroyStorageArea):
25         (WebKit::StorageManager::cloneSessionStorageNamespace):
26         (WebKit::StorageManager::getLocalStorageOrigins):
27         (WebKit::StorageManager::deleteLocalStorageEntriesForOrigin):
28         (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
29         (WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
30         (WebKit::StorageManager::getOrCreateLocalStorageNamespace):
31         * NetworkProcess/WebStorage/StorageManager.h:
32
33 2019-06-17  Alex Christensen  <achristensen@webkit.org>
34
35         Add null check in WebFrameLoaderClient::assignIdentifierToInitialRequest
36         https://bugs.webkit.org/show_bug.cgi?id=198926
37         <rdar://problem/50079713>
38
39         Reviewed by Brady Eidson.
40
41         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
42         (WebKit::WebFrameLoaderClient::assignIdentifierToInitialRequest):
43         WebKitLegacy's version already checks null for the corresponding call.
44
45 2019-06-17  Alex Christensen  <achristensen@webkit.org>
46
47         Fix internal build after r246514
48         https://bugs.webkit.org/show_bug.cgi?id=198874
49
50         * UIProcess/API/APINavigationAction.h:
51         A problematic reference to APINavigationActionAdditions.h was left.
52         Its contents had been sprinkled into the correct places, though.
53
54 2019-06-17  Jiewen Tan  <jiewen_tan@apple.com>
55
56         Move SOAuthorization from WebKitAdditions to WebKit
57         https://bugs.webkit.org/show_bug.cgi?id=198874
58         <rdar://problem/47573431>
59
60         Reviewed by Brent Fulgham.
61
62         This patch basically moves everything from existing WebKitAdditions to WebKit.
63         It also replaces the LoadOptimizer nonsense with the actual SOAuthorization API.
64
65         * Configurations/WebKit.xcconfig:
66         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
67         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
68         * PluginProcess/mac/PluginProcessMac.mm:
69         (WebKit::PluginProcess::platformInitializePluginProcess):
70         * SourcesCocoa.txt:
71         * UIProcess/API/APINavigationAction.h:
72         * UIProcess/Cocoa/NavigationState.mm:
73         (WebKit::trySOAuthorization):
74         (WebKit::tryInterceptNavigation):
75         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
76         (WebKit::tryOptimizingLoad): Deleted.
77         * UIProcess/Cocoa/SOAuthorization/NavigationSOAuthorizationSession.h: Added.
78         (WebKit::NavigationSOAuthorizationSession::callback):
79         * UIProcess/Cocoa/SOAuthorization/NavigationSOAuthorizationSession.mm: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/TestLoadOptimizer.mm.
80         (WebKit::NavigationSOAuthorizationSession::NavigationSOAuthorizationSession):
81         (WebKit::NavigationSOAuthorizationSession::~NavigationSOAuthorizationSession):
82         (WebKit::NavigationSOAuthorizationSession::shouldStartInternal):
83         (WebKit::NavigationSOAuthorizationSession::webViewDidMoveToWindow):
84         * UIProcess/Cocoa/SOAuthorization/PopUpSOAuthorizationSession.h: Added.
85         * UIProcess/Cocoa/SOAuthorization/PopUpSOAuthorizationSession.mm: Added.
86         (-[WKSOSecretDelegate initWithSession:]):
87         (-[WKSOSecretDelegate webViewDidClose:]):
88         (-[WKSOSecretDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
89         (-[WKSOSecretDelegate webView:didFinishNavigation:]):
90         (WebKit::PopUpSOAuthorizationSession::PopUpSOAuthorizationSession):
91         (WebKit::PopUpSOAuthorizationSession::~PopUpSOAuthorizationSession):
92         (WebKit::PopUpSOAuthorizationSession::shouldStartInternal):
93         (WebKit::PopUpSOAuthorizationSession::fallBackToWebPathInternal):
94         (WebKit::PopUpSOAuthorizationSession::abortInternal):
95         (WebKit::PopUpSOAuthorizationSession::completeInternal):
96         (WebKit::PopUpSOAuthorizationSession::close):
97         (WebKit::PopUpSOAuthorizationSession::initSecretWebView):
98         * UIProcess/Cocoa/SOAuthorization/RedirectSOAuthorizationSession.h: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/TestLoadOptimizer.mm.
99         * UIProcess/Cocoa/SOAuthorization/RedirectSOAuthorizationSession.mm: Added.
100         (WebKit::RedirectSOAuthorizationSession::RedirectSOAuthorizationSession):
101         (WebKit::RedirectSOAuthorizationSession::fallBackToWebPathInternal):
102         (WebKit::RedirectSOAuthorizationSession::abortInternal):
103         (WebKit::RedirectSOAuthorizationSession::completeInternal):
104         (WebKit::RedirectSOAuthorizationSession::beforeStart):
105         * UIProcess/Cocoa/SOAuthorization/SOAuthorizationCoordinator.h: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/TestLoadOptimizer.mm.
106         * UIProcess/Cocoa/SOAuthorization/SOAuthorizationCoordinator.mm: Added.
107         (WebKit::SOAuthorizationCoordinator::SOAuthorizationCoordinator):
108         (WebKit::SOAuthorizationCoordinator::canAuthorize const):
109         (WebKit::SOAuthorizationCoordinator::tryAuthorize):
110         * UIProcess/Cocoa/SOAuthorization/SOAuthorizationNSURLExtras.h: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/TestLoadOptimizer.mm.
111         * UIProcess/Cocoa/SOAuthorization/SOAuthorizationNSURLExtras.mm: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/TestLoadOptimizer.mm.
112         (+[NSURL _web_canPerformAuthorizationWithURL:]):
113         * UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.h: Added.
114         (WebKit::SOAuthorizationSession::page const):
115         (WebKit::SOAuthorizationSession::state const):
116         (WebKit::SOAuthorizationSession::setState):
117         (WebKit::SOAuthorizationSession::navigationAction):
118         * UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.mm: Added.
119         (WebKit::SOAuthorizationSession::SOAuthorizationSession):
120         (WebKit::SOAuthorizationSession::~SOAuthorizationSession):
121         (WebKit::SOAuthorizationSession::releaseNavigationAction):
122         (WebKit::SOAuthorizationSession::becomeCompleted):
123         (WebKit::SOAuthorizationSession::shouldStart):
124         (WebKit::SOAuthorizationSession::start):
125         (WebKit::SOAuthorizationSession::fallBackToWebPath):
126         (WebKit::SOAuthorizationSession::abort):
127         (WebKit::SOAuthorizationSession::complete):
128         (WebKit::SOAuthorizationSession::presentViewController):
129         (WebKit::SOAuthorizationSession::dismissViewController):
130         * UIProcess/Cocoa/SOAuthorization/SubFrameSOAuthorizationSession.h: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/TestLoadOptimizer.mm.
131         * UIProcess/Cocoa/SOAuthorization/SubFrameSOAuthorizationSession.mm: Added.
132         (WebKit::SubFrameSOAuthorizationSession::SubFrameSOAuthorizationSession):
133         (WebKit::SubFrameSOAuthorizationSession::fallBackToWebPathInternal):
134         (WebKit::SubFrameSOAuthorizationSession::abortInternal):
135         (WebKit::SubFrameSOAuthorizationSession::completeInternal):
136         (WebKit::SubFrameSOAuthorizationSession::beforeStart):
137         (WebKit::SubFrameSOAuthorizationSession::loadDataToFrame):
138         (WebKit::SubFrameSOAuthorizationSession::postDidCancelMessageToParent):
139         * UIProcess/Cocoa/SOAuthorization/WKSOAuthorizationDelegate.h: Renamed from Tools/TestWebKitAPI/Tests/WebKitCocoa/TestLoadOptimizer.mm.
140         * UIProcess/Cocoa/SOAuthorization/WKSOAuthorizationDelegate.mm: Added.
141         (-[WKSOAuthorizationDelegate authorization:presentViewController:withCompletion:]):
142         (-[WKSOAuthorizationDelegate authorizationDidNotHandle:]):
143         (-[WKSOAuthorizationDelegate authorizationDidCancel:]):
144         (-[WKSOAuthorizationDelegate authorizationDidComplete:]):
145         (-[WKSOAuthorizationDelegate authorization:didCompleteWithHTTPAuthorizationHeaders:]):
146         (-[WKSOAuthorizationDelegate authorization:didCompleteWithHTTPResponse:httpBody:]):
147         (-[WKSOAuthorizationDelegate authorization:didCompleteWithError:]):
148         (-[WKSOAuthorizationDelegate setSession:]):
149         * UIProcess/WebPageProxy.cpp:
150         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
151         (WebKit::trySOAuthorization):
152         (WebKit::WebPageProxy::createNewPage):
153         (WebKit::tryOptimizingLoad): Deleted.
154         * UIProcess/WebPageProxy.h:
155         (WebKit::WebPageProxy::setShouldSuppressSOAuthorizationInAllNavigationPolicyDecision):
156         (WebKit::WebPageProxy::setShouldSuppressSOAuthorizationInNextNavigationPolicyDecision):
157         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
158         (WebKit::WebsiteDataStore::WebsiteDataStore):
159         * UIProcess/WebsiteData/WebsiteDataStore.h:
160         (WebKit::WebsiteDataStore::soAuthorizationCoordinator):
161         * WebKit.xcodeproj/project.pbxproj:
162         * WebProcess/cocoa/WebProcessCocoa.mm:
163         (WebKit::WebProcess::platformInitializeProcess):
164
165 2019-06-17  Tim Horton  <timothy_horton@apple.com>
166
167         Fix the build.
168
169         * UIProcess/Gamepad/ios/UIGamepadProviderIOS.mm:
170         (WebKit::UIGamepadProvider::platformWebPageProxyForGamepadInput):
171         * UIProcess/_WKTouchEventGenerator.mm:
172         (-[_WKTouchEventGenerator _sendHIDEvent:]):
173         (-[_WKTouchEventGenerator _sendMarkerHIDEventWithCompletionBlock:]):
174
175 2019-06-17  Dan Bernstein  <mitz@apple.com>
176
177         REGRESSION (r242686): Paths in XPC services’ LC_DYLD_ENVIRONMENT are incorrect in built products directory
178         https://bugs.webkit.org/show_bug.cgi?id=198904
179
180         Reviewed by Alex Christensen.
181
182         After r242686, in local builds, the XPC service executables run from their location at the
183         top of the built products directory, rather than inside the framework.
184
185         * Configurations/BaseXPCService.xcconfig: Updated the load commands that set
186           DYLD_FRAMEWORK_PATH and DYLD_LIBRARY_PATH for the new location in the built products
187           directory. Also removed WK_XPC_SERVICE_INSERT_LIBRARIES_DIR that had been unused.
188
189         * WebKit.xcodeproj/project.pbxproj: Made the creation of symbolic links inside the
190           framework’s XPCServices directory predicated on whether this is an install build, rather
191           than on the build configuration, for consistency with the condition used in the .xcconfig.
192
193 2019-06-17  Brent Fulgham  <bfulgham@apple.com>
194
195         Ensure ITP state is relayed to Network Process on restart
196         https://bugs.webkit.org/show_bug.cgi?id=198797
197         <rdar://problem/51646944>
198
199         Reviewed by Youenn Fablet.
200
201         Now that the ITP state is maintained in the Network Process, we have to make sure that we update
202         that process with current ITP state if the Network Process crashes and is relaunched. This wasn't a
203         problem in earlier releases because we tracked all ITP state in the UIProcess.
204
205         This patch does the following:
206         1. Add a new method to WKWebsiteDataStore to allow us to trigger statistics processing, which has the
207            side effect of syncing ITP state persistently so that it will be available after bouncing the process.
208         2. Adds a new test that sets a tracking domain, bounces the process, and confirms the state is still
209            consistent.
210
211         Tested by TestWebKitAPI.
212
213         * NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:
214         (WebKit::ResourceLoadStatisticsStore::processStatisticsAndDataRecords):
215         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
216         (-[WKWebsiteDataStore _clearPrevalentDomain:completionHandler:]):
217         (-[WKWebsiteDataStore _processStatisticsAndDataRecords:]):
218         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
219         * UIProcess/WebProcessPool.cpp:
220         (WebKit::WebProcessPool::ensureNetworkProcess):
221         (WebKit::WebProcessPool::setResourceLoadStatisticsEnabled):
222         * UIProcess/WebProcessPool.h:
223         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
224         (WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):
225
226 2019-06-17  Ludovico de Nittis  <ludovico.denittis@collabora.com>
227
228         [GTK] Stop accessing GdkEvent fields when possible
229         https://bugs.webkit.org/show_bug.cgi?id=198829
230
231         Reviewed by Michael Catanzaro.
232
233         Direct access to GdkEvent structs is no longer possible in GTK 4.
234
235         * Shared/gtk/WebEventFactory.cpp:
236         (WebKit::buttonForEvent):
237         (WebKit::WebEventFactory::createWebMouseEvent):
238         (WebKit::WebEventFactory::createWebWheelEvent):
239         (WebKit::WebEventFactory::createWebKeyboardEvent):
240         (WebKit::WebEventFactory::createWebTouchEvent):
241         * UIProcess/API/gtk/WebKitEmojiChooser.cpp:
242         * UIProcess/API/gtk/WebKitScriptDialogImpl.cpp:
243         (webkitScriptDialogImplKeyPressEvent):
244         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
245         (ClickCounter::currentClickCountForGdkButtonEvent):
246         (webkitWebViewBaseKeyPressEvent):
247         (webkitWebViewBaseHandleMouseEvent):
248         (webkitWebViewBaseCrossingNotifyEvent):
249         (webkitWebViewBaseGetTouchPointsForEvent):
250         (webkitWebViewBaseTouchEvent):
251         (webkitWebViewBaseEvent):
252         * UIProcess/gtk/GestureController.cpp:
253         (WebKit::GestureController::handleEvent):
254         * UIProcess/gtk/InputMethodFilter.cpp:
255         (WebKit::InputMethodFilter::filterKeyEvent):
256         (WebKit::InputMethodFilter::logHandleKeyboardEventForTesting):
257         (WebKit::InputMethodFilter::logHandleKeyboardEventWithCompositionResultsForTesting):
258         * UIProcess/gtk/KeyBindingTranslator.cpp:
259         (WebKit::KeyBindingTranslator::commandsForKeyEvent):
260         * UIProcess/gtk/ViewGestureControllerGtk.cpp:
261         (WebKit::isEventStop):
262         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanInfluenceSwipe):
263         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventGetScrollingDeltas):
264         (WebKit::ViewGestureController::SwipeProgressTracker::handleEvent):
265         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
266         (WebKit::WebPopupMenuProxyGtk::treeViewButtonReleaseEventCallback):
267         (WebKit::WebPopupMenuProxyGtk::keyPressEventCallback):
268
269 2019-06-17  Carlos Garcia Campos  <cgarcia@igalia.com>
270
271         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.25.2 release
272
273         * gtk/NEWS: Add release notes for 2.25.2.
274
275 2019-06-17  Carlos Garcia Campos  <cgarcia@igalia.com>
276
277         Unreviewed, rolling out r246467.
278
279         It broke scrolling with mouse wheel
280
281         Reverted changeset:
282
283         "[GTK] Stop accessing GdkEvent fields when possible"
284         https://bugs.webkit.org/show_bug.cgi?id=198829
285         https://trac.webkit.org/changeset/246467
286
287 2019-06-16  Darin Adler  <darin@apple.com>
288
289         Rename AtomicString to AtomString
290         https://bugs.webkit.org/show_bug.cgi?id=195276
291
292         Reviewed by Michael Catanzaro.
293
294         * many files: Let do-webcore-rename do the renaming.
295
296 2019-06-16  Simon Fraser  <simon.fraser@apple.com>
297
298         Implement ScrollableArea::scrollOffset()
299         https://bugs.webkit.org/show_bug.cgi?id=198895
300
301         Reviewed by Antti Koivisto.
302
303         * UIProcess/win/WebPopupMenuProxyWin.cpp:
304         (WebKit::PopupMenuWin::scrollPosition const):
305         (WebKit::WebPopupMenuProxyWin::onKeyDown): Just use m_scrollOffset.
306         (WebKit::WebPopupMenuProxyWin::scrollSize const): Deleted.
307         * UIProcess/win/WebPopupMenuProxyWin.h: Remove the one-axis scrollOffset()
308         * WebProcess/Plugins/PDF/PDFPlugin.h:
309         * WebProcess/Plugins/PDF/PDFPlugin.mm:
310         (WebKit::PDFPlugin::scrollSize const): Deleted.
311         (WebKit::PDFPlugin::scrollOffset const): Deleted.
312         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
313         (WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect):
314
315 2019-06-15  Youenn Fablet  <youenn@apple.com>
316
317         WebProcessPool::clearWebProcessHasUploads cannot assume its given processIdentifier is valid
318         https://bugs.webkit.org/show_bug.cgi?id=198865
319
320         Unreviewed.
321
322         * UIProcess/WebProcessPool.cpp:
323         (WebKit::WebProcessPool::clearWebProcessHasUploads):
324         Remove wrong debug assertion in case of WebProcessProxy destruction.
325
326 2019-06-15  Ludovico de Nittis  <ludovico.denittis@collabora.com>
327
328         [GTK] Stop accessing GdkEvent fields when possible
329         https://bugs.webkit.org/show_bug.cgi?id=198829
330
331         Reviewed by Michael Catanzaro.
332
333         Direct access to GdkEvent structs is no longer possible in GTK 4.
334
335         * Shared/gtk/WebEventFactory.cpp:
336         (WebKit::buttonForEvent):
337         (WebKit::WebEventFactory::createWebMouseEvent):
338         (WebKit::WebEventFactory::createWebWheelEvent):
339         (WebKit::WebEventFactory::createWebKeyboardEvent):
340         (WebKit::WebEventFactory::createWebTouchEvent):
341         * UIProcess/API/gtk/WebKitEmojiChooser.cpp:
342         * UIProcess/API/gtk/WebKitScriptDialogImpl.cpp:
343         (webkitScriptDialogImplKeyPressEvent):
344         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
345         (ClickCounter::currentClickCountForGdkButtonEvent):
346         (webkitWebViewBaseKeyPressEvent):
347         (webkitWebViewBaseHandleMouseEvent):
348         (webkitWebViewBaseCrossingNotifyEvent):
349         (webkitWebViewBaseGetTouchPointsForEvent):
350         (webkitWebViewBaseTouchEvent):
351         (webkitWebViewBaseEvent):
352         * UIProcess/gtk/GestureController.cpp:
353         (WebKit::GestureController::handleEvent):
354         * UIProcess/gtk/InputMethodFilter.cpp:
355         (WebKit::InputMethodFilter::filterKeyEvent):
356         (WebKit::InputMethodFilter::logHandleKeyboardEventForTesting):
357         (WebKit::InputMethodFilter::logHandleKeyboardEventWithCompositionResultsForTesting):
358         * UIProcess/gtk/KeyBindingTranslator.cpp:
359         (WebKit::KeyBindingTranslator::commandsForKeyEvent):
360         * UIProcess/gtk/ViewGestureControllerGtk.cpp:
361         (WebKit::isEventStop):
362         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanInfluenceSwipe):
363         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventGetScrollingDeltas):
364         (WebKit::ViewGestureController::SwipeProgressTracker::handleEvent):
365         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
366         (WebKit::WebPopupMenuProxyGtk::treeViewButtonReleaseEventCallback):
367         (WebKit::WebPopupMenuProxyGtk::keyPressEventCallback):
368
369 2019-06-15  Rob Buis  <rbuis@igalia.com>
370
371         Store prefetch redirects in the prefetch cache
372         https://bugs.webkit.org/show_bug.cgi?id=197371
373
374         Reviewed by Youenn Fablet.
375
376         Store prefetch redirects in the prefetch cache and use them when
377         navigating.
378
379         * NetworkProcess/NetworkResourceLoader.cpp:
380         (WebKit::NetworkResourceLoader::retrieveCacheEntry):
381         (WebKit::NetworkResourceLoader::willSendRedirectedRequest):
382         (WebKit::NetworkResourceLoader::didFinishWithRedirectResponse):
383         * NetworkProcess/NetworkResourceLoader.h:
384         * NetworkProcess/cache/PrefetchCache.cpp:
385         (WebKit::PrefetchCache::Entry::Entry):
386         (WebKit::PrefetchCache::storeRedirect):
387         * NetworkProcess/cache/PrefetchCache.h:
388
389 2019-06-14  Devin Rousso  <drousso@apple.com>
390
391         waitForNavigationToComplete may be called before WebPageProxy knows it's loading
392         https://bugs.webkit.org/show_bug.cgi?id=198741
393         <rdar://problem/31164316>
394
395         Reviewed by Joseph Pecoraro.
396
397         There's a potential race in `WebAutomationSession::waitForNavigationToCompleteOnPage` when
398         querying for the `WebPageProxy`'s loading state (via `PageLoadingState::isLoading`), in that
399         a pending load may be committed _after_ the `WebAutomationSession` checks it's value. This
400         makes the automation session think that it isn't loading, so it will continue running
401         commands, which can lead to a JavaScript error ("Callback was not called before the unload
402         event") as any injected scripts will be cleared by the impending navigation, leaving the
403         script evaluation callbacks "dangling".
404
405         Expose more information from `PageLoadState` about whether it thinks there _may_ be a
406         navigation currently happening, which the `WebAutomationSession` can use to delay commands.
407
408         In the best case, no navigations are "missed".
409
410         In the worst case, the automation session will wait `pageLoadTimeout` before continuing.
411
412         * UIProcess/Automation/WebAutomationSession.cpp:
413         (WebKit::WebAutomationSession::waitForNavigationToCompleteOnPage):
414
415         * UIProcess/PageLoadState.h:
416         * UIProcess/PageLoadState.cpp:
417         (WebKit::PageLoadState::hasUncommittedLoad const): Added.
418
419 2019-06-14  Youenn Fablet  <youenn@apple.com>
420
421         WebProcessPool::clearWebProcessHasUploads cannot assume its given processIdentifier is valid
422         https://bugs.webkit.org/show_bug.cgi?id=198865
423         <rdar://problem/51618878>
424
425         Reviewed by Brady Eidson.
426
427         NetworkProcess currently instructs UIProcess whether a given WebProcess is doing upload.
428         There is no guarantee though that the WebProcessProxy is still there when the IPC is arriving at UIProcess.
429         Instead, let WebProcess handles its upload state and notify WebProcessPool about its state.
430         Make sure WebProcessProxy unregisters itself in case of crash.
431         In case of NetworkProcess crash, WebProcesses will see all their uploads fail
432         and will notify automatically UIProcess to update their state.
433
434         Since the processID given to WebProcessPool is coming from IPC, we cannot not trust it.
435         Add early return in case of not finding a WebProcessProxy for WebProcessPool clear/set methods.
436
437         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
438         (WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
439         * NetworkProcess/NetworkConnectionToWebProcess.h:
440         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
441         * NetworkProcess/NetworkResourceLoadMap.cpp:
442         (WebKit::NetworkResourceLoadMap::add):
443         (WebKit::NetworkResourceLoadMap::take):
444         * NetworkProcess/NetworkResourceLoadMap.h:
445         * UIProcess/WebProcessPool.cpp:
446         (WebKit::WebProcessPool::setWebProcessHasUploads):
447         (WebKit::WebProcessPool::clearWebProcessHasUploads):
448         * UIProcess/WebProcessProxy.cpp:
449         (WebKit::WebProcessProxy::~WebProcessProxy):
450         * WebProcess/Network/WebLoaderStrategy.cpp:
451         (WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
452         (WebKit::WebLoaderStrategy::remove):
453         (WebKit::WebLoaderStrategy::tryLoadingSynchronouslyUsingURLSchemeHandler):
454         * WebProcess/Network/WebLoaderStrategy.h:
455         * WebProcess/WebProcess.cpp:
456         (WebKit::WebProcess::ensureNetworkProcessConnection):
457
458 2019-06-14  Youenn Fablet  <youenn@apple.com>
459
460         WebResourceLoadStatisticsStore should not use its network session if invalidated
461         https://bugs.webkit.org/show_bug.cgi?id=198814
462
463         Reviewed by Geoffrey Garen.
464
465         Tell WebResourceLoadStatisticsStore that its network session is invalidated.
466         WebResourceLoadStatisticsStore will then clear its reference to the network session.
467
468         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
469         (WebKit::ResourceLoadStatisticsMemoryStore::updateCookieBlocking):
470         Added for test purposes to trigger further cookie processing.
471         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
472         (WebKit::WebResourceLoadStatisticsStore::invalidateAndCancel):
473         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
474         * NetworkProcess/NetworkSession.cpp:
475         (WebKit::NetworkSession::invalidateAndCancel):
476
477 2019-06-14  Joseph Pecoraro  <pecoraro@apple.com>
478
479         [Cocoa] NSFileWrapper associated with _WKAttachment
480         https://bugs.webkit.org/show_bug.cgi?id=198871
481         <rdar://problem/51760625>
482
483         Reviewed by Wenson Hsieh.
484
485         * UIProcess/API/Cocoa/_WKAttachment.mm:
486         (-[_WKAttachment dealloc]):
487         Ensure we destruct the API::Object associated with this so RetainPtrs can release.
488
489 2019-06-14  Tim Horton  <timothy_horton@apple.com>
490
491         WebKit's NSAttributedString.h is not included in the WebKit.h umbrella header
492         https://bugs.webkit.org/show_bug.cgi?id=198869
493         <rdar://problem/51754437>
494
495         Reviewed by Timothy Hatcher.
496
497         * Shared/API/Cocoa/WebKit.h:
498         Make the new API available to modularized clients and folks who just import WebKit.h
499
500 2019-06-14  Jiewen Tan  <jiewen_tan@apple.com>
501
502         Disable AppSSO for web processes and plugin processes
503         https://bugs.webkit.org/show_bug.cgi?id=198843
504         <rdar://problem/51642920>
505
506         Reviewed by Sam Weinig.
507
508         This patch moves the disabling of AppSSO from AuxiliaryProcess to PluginProcess
509         and WebProcess such that NetworkingProcess will not be affected.
510
511         * PluginProcess/mac/PluginProcessMac.mm:
512         (WebKit::PluginProcess::platformInitializePluginProcess):
513         * Shared/ios/AuxiliaryProcessIOS.mm:
514         (WebKit::AuxiliaryProcess::platformInitialize):
515         * Shared/mac/AuxiliaryProcessMac.mm:
516         (WebKit::AuxiliaryProcess::platformInitialize):
517         * WebProcess/cocoa/WebProcessCocoa.mm:
518         (WebKit::WebProcess::platformInitializeProcess):
519
520 2019-06-14  Megan Gardner  <megan_gardner@apple.com>
521
522         Move Synthetic Editing Commands to behind an experimental feature flag
523         https://bugs.webkit.org/show_bug.cgi?id=198842
524         <rdar://problem/50594700>
525
526         Reviewed by Simon Fraser.
527
528         Add a feature flag to gate synthetic editing commands.
529
530         * Shared/WebPreferences.yaml:
531         * WebProcess/WebPage/ios/WebPageIOS.mm:
532         (WebKit::WebPage::getFocusedElementInformation):
533
534 2019-06-13  Megan Gardner  <megan_gardner@apple.com>
535
536         Fix selection hang in Mail
537         https://bugs.webkit.org/show_bug.cgi?id=198845
538         <rdar://problem/51388180>
539
540         Reviewed by Tim Horton.
541
542         SelectionDidChange requires a selectionWillChange in order to keep things in line.
543
544         * UIProcess/ios/WKContentViewInteraction.mm:
545         (-[WKContentView _selectionChanged]):
546
547 2019-06-13  Tim Horton  <timothy_horton@apple.com>
548
549         No content shows up for WKWebView while locked even with _canShowWhileLocked is YES
550         https://bugs.webkit.org/show_bug.cgi?id=198819
551         <rdar://problem/51636240>
552
553         Reviewed by Simon Fraser.
554
555         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
556         (WebKit::WebPageProxy::didCreateContextForVisibilityPropagation):
557         * UIProcess/WebPageProxy.h:
558         (WebKit::WebPageProxy::contextIDForVisibilityPropagation const):
559         * UIProcess/WebPageProxy.messages.in:
560         * UIProcess/WebProcessProxy.h:
561         (WebKit::WebProcessProxy::contextIDForVisibilityPropagation): Deleted.
562         * UIProcess/WebProcessProxy.messages.in:
563         * UIProcess/ios/WKContentView.mm:
564         (-[WKContentView _setupVisibilityPropagationView]):
565         * UIProcess/ios/WebPageProxyIOS.mm:
566         (WebKit::WebPageProxy::didCreateContextForVisibilityPropagation): Deleted.
567         * UIProcess/ios/WebProcessProxyIOS.mm:
568         (WebKit::WebProcessProxy::didCreateContextForVisibilityPropagation): Deleted.
569         * WebProcess/WebPage/WebPage.cpp:
570         (WebKit::m_shrinkToFitContentTimer):
571         * WebProcess/WebPage/WebPage.h:
572         * WebProcess/WebProcess.h:
573         * WebProcess/cocoa/WebProcessCocoa.mm:
574         (WebKit::WebProcess::platformInitializeWebProcess):
575         Move the creation of the visibility propagation context to WebPage instead of WebProcess,
576         because canShowWhileLocked is per-page, not per-process.
577
578         Also, pass canShowWhileLocked into the context creation function for the visibility
579         propagation context, not just RemoteLayerTree contexts.
580
581 2019-06-13  Antoine Quint  <graouts@apple.com>
582
583         "display: contents" Content click does not trigger
584         https://bugs.webkit.org/show_bug.cgi?id=198559
585         <rdar://problem/51488524>
586
587         Reviewed by Antti Koivisto.
588
589         * WebProcess/WebPage/ios/WebPageIOS.mm:
590         (WebKit::WebPage::commitPotentialTap):
591
592 2019-06-13  Takashi Komori  <Takashi.Komori@sony.com>
593
594         [curl] Remove member objects of CurlRequest not to share by different threads.
595         https://bugs.webkit.org/show_bug.cgi?id=198747
596
597         Reviewed by Fujii Hironori.
598
599         * NetworkProcess/curl/NetworkDataTaskCurl.cpp:
600         (WebKit::NetworkDataTaskCurl::curlDidReceiveResponse):
601         (WebKit::NetworkDataTaskCurl::curlDidComplete):
602         (WebKit::NetworkDataTaskCurl::curlDidFailWithError):
603         * NetworkProcess/curl/NetworkDataTaskCurl.h:
604
605 2019-06-13  Zan Dobersek  <zdobersek@igalia.com>
606
607         [Nicosia] Add SceneIntegration
608         https://bugs.webkit.org/show_bug.cgi?id=198791
609
610         Reviewed by Carlos Garcia Campos.
611
612         Have the LayerTreeHost own the SceneIntegration object that's to be
613         associated with layers used inside the LayerTreeHost's scene. The
614         class now also inherits the SceneIntegration::Client interface, with the
615         requestUpdate() method scheduling a scene update in ThreadedCompositor.
616
617         CompositingCoordinator now retrieves the SceneIntegration object from
618         the LayerTreeHost instance and manages association to that object for
619         layers under the coordinator's control.
620
621         ThreadedCompositor class gets a new public updateScene() method that
622         schedules an update, enabling the SceneIntegration class to invoke
623         scene updates.
624
625         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
626         (WebKit::ThreadedCompositor::updateScene):
627         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
628         * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
629         (WebKit::CompositingCoordinator::createGraphicsLayer):
630         (WebKit::CompositingCoordinator::detachLayer):
631         (WebKit::CompositingCoordinator::attachLayer):
632         * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
633         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:
634         (WebKit::LayerTreeHost::LayerTreeHost):
635         (WebKit::LayerTreeHost::sceneIntegration):
636         (WebKit::LayerTreeHost::requestUpdate):
637         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h:
638
639 2019-06-13  Ludovico de Nittis  <ludovico.denittis@collabora.com>
640
641         [GTK] gdk_display_get_device_manager and gdk_screen_get_width/height are deprecated
642         https://bugs.webkit.org/show_bug.cgi?id=198822
643
644         Reviewed by Carlos Garcia Campos.
645
646         GdkSeat and GdkRectangle should be used, respectively.
647
648         * UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp:
649         (WebKit::doMouseEvent):
650         (WebKit::doMotionEvent):
651         (WebKit::doKeyStrokeEvent):
652
653 2019-06-12  Antoine Quint  <graouts@apple.com>
654
655         Show the web page URL when sharing an AR model
656         https://bugs.webkit.org/show_bug.cgi?id=198812
657         <rdar://problem/48689498>
658
659         Reviewed by Dean Jackson.
660
661         * UIProcess/Cocoa/DownloadClient.mm:
662         (WebKit::DownloadClient::didStart):
663         * UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:
664         (-[_WKPreviewControllerDataSource initWithMIMEType:originatingPageURL:]):
665         (-[_WKPreviewControllerDataSource previewController:previewItemAtIndex:]):
666         (WebKit::SystemPreviewController::start):
667         (-[_WKPreviewControllerDataSource initWithMIMEType:]): Deleted.
668         * UIProcess/SystemPreviewController.h:
669
670 2019-06-12  Antti Koivisto  <antti@apple.com>
671
672         Try to fix iOS build.
673
674         * NetworkProcess/Downloads/DownloadMap.cpp:
675
676 2019-06-12  Youenn Fablet  <youenn@apple.com>
677
678         Use NSURLSession for WebSocket
679         https://bugs.webkit.org/show_bug.cgi?id=198568
680
681         Reviewed by Geoffrey Garen.
682
683         Implement socket channel provider on WebProcess level by sending IPC to NetworkProcess.
684         On NetworkProcess side, use NSURLSession API to implement the WebSocket functionality. 
685         This is a partial implementation:
686         - inspector integration is not working.
687         - some error cases are not well handled or are not producing the same error messages.
688         - some features are not implemented (extensions, subprotocols, handshake authentication challenge, cookie handling...).
689
690         * CMakeLists.txt:
691         * DerivedSources-input.xcfilelist:
692         * DerivedSources-output.xcfilelist:
693         * DerivedSources.make:
694         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
695         (WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
696         (WebKit::NetworkConnectionToWebProcess::createSocketChannel):
697         (WebKit::NetworkConnectionToWebProcess::removeSocketChannel):
698         * NetworkProcess/NetworkConnectionToWebProcess.h:
699         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
700         * NetworkProcess/NetworkSession.cpp:
701         (WebKit::NetworkSession::createWebSocketTask):
702         * NetworkProcess/NetworkSession.h:
703         (WebKit::NetworkSession::removeWebSocketTask):
704         (WebKit::NetworkSession::addWebSocketTask):
705         * NetworkProcess/NetworkSocketChannel.cpp: Added.
706         (WebKit::NetworkSocketChannel::create):
707         (WebKit::NetworkSocketChannel::NetworkSocketChannel):
708         (WebKit::NetworkSocketChannel::~NetworkSocketChannel):
709         (WebKit::NetworkSocketChannel::sendString):
710         (WebKit::NetworkSocketChannel::sendData):
711         (WebKit::NetworkSocketChannel::finishClosingIfPossible):
712         (WebKit::NetworkSocketChannel::close):
713         (WebKit::NetworkSocketChannel::didConnect):
714         (WebKit::NetworkSocketChannel::didReceiveText):
715         (WebKit::NetworkSocketChannel::didReceiveBinaryData):
716         (WebKit::NetworkSocketChannel::didClose):
717         (WebKit::NetworkSocketChannel::messageSenderConnection const):
718         * NetworkProcess/NetworkSocketChannel.h: Added.
719         * NetworkProcess/NetworkSocketChannel.messages.in: Added.
720         * NetworkProcess/NetworkSocketStream.messages.in:
721         * NetworkProcess/WebSocketTask.h: Added.
722         (WebKit::WebSocketTask::sendString):
723         (WebKit::WebSocketTask::sendData):
724         (WebKit::WebSocketTask::close):
725         (WebKit::WebSocketTask::cancel):
726         (WebKit::WebSocketTask::resume):
727         * NetworkProcess/cocoa/NetworkSessionCocoa.h:
728         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
729         (-[WKNetworkSessionDelegate existingWebSocketTask:]):
730         (-[WKNetworkSessionDelegate URLSession:webSocketTask:didOpenWithProtocol:]):
731         (-[WKNetworkSessionDelegate URLSession:webSocketTask:didCloseWithCode:reason:]):
732         (WebKit::NetworkSessionCocoa::continueDidReceiveChallenge):
733         (WebKit::NetworkSessionCocoa::createWebSocketTask):
734         (WebKit::NetworkSessionCocoa::addWebSocketTask):
735         (WebKit::NetworkSessionCocoa::removeWebSocketTask):
736         (WebKit::NetworkSessionCocoa::webSocketDataTaskForIdentifier):
737         * NetworkProcess/cocoa/WebSocketTaskCocoa.h: Added.
738         * NetworkProcess/cocoa/WebSocketTaskCocoa.mm: Added.
739         (WebKit::WebSocketTask::WebSocketTask):
740         (WebKit::WebSocketTask::~WebSocketTask):
741         (WebKit::WebSocketTask::readNextMessage):
742         (WebKit::WebSocketTask::cancel):
743         (WebKit::WebSocketTask::resume):
744         (WebKit::WebSocketTask::didConnect):
745         (WebKit::WebSocketTask::didClose):
746         (WebKit::WebSocketTask::sendString):
747         (WebKit::WebSocketTask::sendData):
748         (WebKit::WebSocketTask::close):
749         (WebKit::WebSocketTask::identifier const):
750         * Shared/WebPreferences.yaml:
751         * WebKit.xcodeproj/project.pbxproj:
752         * WebProcess/Network/NetworkProcessConnection.cpp:
753         (WebKit::NetworkProcessConnection::didReceiveMessage):
754         * WebProcess/Network/WebSocketChannel.cpp: Added.
755         (WebKit::WebSocketChannel::create):
756         (WebKit::WebSocketChannel::WebSocketChannel):
757         (WebKit::WebSocketChannel::~WebSocketChannel):
758         (WebKit::WebSocketChannel::messageSenderConnection const):
759         (WebKit::WebSocketChannel::messageSenderDestinationID const):
760         (WebKit::WebSocketChannel::subprotocol):
761         (WebKit::WebSocketChannel::extensions):
762         (WebKit::WebSocketChannel::connect):
763         (WebKit::WebSocketChannel::send):
764         (WebKit::WebSocketChannel::bufferedAmount const):
765         (WebKit::WebSocketChannel::close):
766         (WebKit::WebSocketChannel::fail):
767         (WebKit::WebSocketChannel::disconnect):
768         (WebKit::WebSocketChannel::didConnect):
769         (WebKit::WebSocketChannel::didReceiveText):
770         (WebKit::WebSocketChannel::didReceiveBinaryData):
771         (WebKit::WebSocketChannel::didClose):
772         (WebKit::WebSocketChannel::didFail):
773         (WebKit::WebSocketChannel::networkProcessCrashed):
774         * WebProcess/Network/WebSocketChannel.h: Added.
775         * WebProcess/Network/WebSocketChannel.messages.in: Added.
776         * WebProcess/Network/WebSocketChannelManager.cpp: Added.
777         (WebKit::WebSocketChannelManager::createWebSocketChannel):
778         (WebKit::WebSocketChannelManager::networkProcessCrashed):
779         (WebKit::WebSocketChannelManager::didReceiveMessage):
780         * WebProcess/Network/WebSocketChannelManager.h: Added.
781         * WebProcess/Network/WebSocketProvider.cpp:
782         (WebKit::WebSocketProvider::createWebSocketChannel):
783         * WebProcess/Network/WebSocketProvider.h:
784         * WebProcess/Network/WebSocketStream.cpp:
785         * WebProcess/Network/WebSocketStream.messages.in:
786         * WebProcess/WebProcess.cpp:
787         (WebKit::WebProcess::networkProcessConnectionClosed):
788         * WebProcess/WebProcess.h:
789         (WebKit::WebProcess::webSocketChannelManager):
790
791 2019-06-12  Sihui Liu  <sihui_liu@apple.com>
792
793         Add assertions to help debug crash at WebKit::HistoryEntryDataEncoder::operator<<
794         https://bugs.webkit.org/show_bug.cgi?id=198766
795
796         Reviewed by Geoffrey Garen.
797
798         * Shared/SessionState.h:
799         (WebKit::FrameState::~FrameState):
800         * UIProcess/API/C/WKPage.cpp:
801         (WKPageCopySessionState):
802         * UIProcess/mac/LegacySessionStateCoding.cpp:
803         (WebKit::HistoryEntryDataEncoder::encodeFixedLengthData):
804         (WebKit::encodeFrameStateNode):
805
806 2019-06-12  Ludovico de Nittis  <ludovico.denittis@collabora.com>
807
808         [GTK] GTK_STOCK_* types have been deprecated since GTK 3.10
809         https://bugs.webkit.org/show_bug.cgi?id=198787
810
811         Reviewed by Michael Catanzaro.
812
813         We completely remove the gtkStockIDFromContextMenuAction function in order to get rid of the stock items.
814         This function was used only in "createActionIfNeeded" where now we pass a nullptr as a stock_id variable.
815
816         * Shared/glib/WebContextMenuItemGlib.cpp:
817         (WebKit::gtkStockIDFromContextMenuAction):
818
819 2019-06-12  Brent Fulgham  <bfulgham@apple.com>
820
821         Unreviewed fix after rr246360.
822
823         The current code accidentally calls the completion handler twice.
824
825         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
826         (-[WKWebsiteDataStore _setPrevalentDomain:completionHandler:]):
827
828 2019-06-12  Jiewen Tan  <jiewen_tan@apple.com>
829
830         REGRESSION (r245043) [Mac WK2 Debug] ASSERTION FAILED: m_services.isEmpty() && transports.size() <= maxTransportNumber seen with two http/wpt/webauthn/public-key-credential-* tests
831         https://bugs.webkit.org/show_bug.cgi?id=197917
832         <rdar://problem/51524958>
833
834         Reviewed by Brent Fulgham.
835
836         This is a race condition that when a new request comes in the middle between the previous one finishes and the clearStateAsync is queued in the main thread.
837         Therefore, when the new request starts discovery, it will still see previous request's state.
838
839         To fix this issue, clearState() will be called unconditionally for every request. And a guard is added to clearState() to prevent double clearance.
840
841         * UIProcess/WebAuthentication/AuthenticatorManager.cpp:
842         (WebKit::AuthenticatorManager::makeCredential):
843         (WebKit::AuthenticatorManager::getAssertion):
844         (WebKit::AuthenticatorManager::clearState):
845
846 2019-06-12  Brent Fulgham  <bfulgham@apple.com>
847
848         Add mechanism and test case to check if ITP is active
849         https://bugs.webkit.org/show_bug.cgi?id=198694
850         <rdar://problem/51557704>
851
852         Reviewed by Youenn Fablet.
853
854         Add a new private SPI call on the WebsiteDataStore object that allows test code
855         to mark a domain as prevalent, and check the prevalance of a resource. This
856         is then used to build a test to confirm ITP is active and working.
857
858         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
859         (-[WKWebsiteDataStore _setPrevalentDomain:completionHandler:]):
860         (-[WKWebsiteDataStore _getIsPrevalentDomain:completionHandler:]):
861         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
862
863 2019-06-12  Wenson Hsieh  <wenson_hsieh@apple.com>
864
865         Many layout tests are failing on iPad simulator due to unexpected viewport dimensions
866         https://bugs.webkit.org/show_bug.cgi?id=198789
867         <rdar://problem/51595519>
868
869         Reviewed by Simon Fraser.
870
871         Prevent the shrink-to-fit-content timer from activating on layout tests that use the testing viewport
872         configuration.
873
874         * WebProcess/WebPage/ios/WebPageIOS.mm:
875         (WebKit::WebPage::immediatelyShrinkToFitContent):
876
877 2019-06-12  Michael Catanzaro  <mcatanzaro@igalia.com>
878
879         [WPE][GTK] Deprecate WebSQL APIs
880         https://bugs.webkit.org/show_bug.cgi?id=195011
881
882         Reviewed by Carlos Garcia Campos.
883
884         * UIProcess/API/glib/WebKitSettings.cpp:
885         (webkit_settings_class_init):
886         * UIProcess/API/glib/WebKitWebContext.cpp:
887         (webkitWebContextConstructed):
888         * UIProcess/API/glib/WebKitWebsiteDataManager.cpp:
889         (webkitWebsiteDataManagerGetProperty):
890         (webkit_website_data_manager_class_init):
891         * UIProcess/API/gtk/WebKitWebsiteData.h:
892         * UIProcess/API/gtk/WebKitWebsiteDataManager.h:
893         * UIProcess/API/wpe/WebKitWebsiteData.h:
894         * UIProcess/API/wpe/WebKitWebsiteDataManager.h:
895
896 2019-06-12  Michael Catanzaro  <mcatanzaro@igalia.com>
897
898         [WPE][GTK] Enable hyperlink auditing
899         https://bugs.webkit.org/show_bug.cgi?id=197845
900
901         Reviewed by Carlos Garcia Campos.
902
903         * UIProcess/API/glib/WebKitSettings.cpp:
904         (webkit_settings_class_init):
905
906 2019-06-12  Ludovico de Nittis  <ludovico.denittis@collabora.com>
907
908         [GTK] gtk_misc_set_alignment is deprecated since GTK 3.14
909         https://bugs.webkit.org/show_bug.cgi?id=198785
910
911         Reviewed by Carlos Garcia Campos.
912
913         Replace the deprecated gtk_misc_set_alignment with halign and valign.
914
915         * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
916         (createLabelWithLineWrap):
917
918 2019-06-11  Wenson Hsieh  <wenson_hsieh@apple.com>
919
920         [iOS] Idempotent text autosizing needs to react properly to viewport changes
921         https://bugs.webkit.org/show_bug.cgi?id=198736
922         <rdar://problem/50591911>
923
924         Reviewed by Zalan Bujtas.
925
926         If idempotent text autosizing is enabled, respond to viewport initial scale changes by forcing a style recalc,
927         since the amount by which idempotent text autosizing boosts font sizes depends on the Page's initial scale.
928
929         * WebProcess/WebPage/WebPage.h:
930         * WebProcess/WebPage/ios/WebPageIOS.mm:
931         (WebKit::WebPage::resetIdempotentTextAutosizingIfNeeded):
932         (WebKit::WebPage::viewportConfigurationChanged):
933
934 2019-06-11  Zalan Bujtas  <zalan@apple.com>
935
936         LayoutTests/fast/events/touch/ios/double-tap-for-double-click* test cases are failing
937         https://bugs.webkit.org/show_bug.cgi?id=198764
938         <rdar://problem/51035459>
939
940         Reviewed by Wenson Hsieh.
941
942         This patch replaces the existing, _doubleTapGestureRecognizerForDoubleClick based double click handling with a WebProcess based implementation using
943         the potentialTapAtPosition/commitPotentialTap infrastructure.
944
945         * Shared/WebPageCreationParameters.cpp:
946         (WebKit::WebPageCreationParameters::encode const):
947         (WebKit::WebPageCreationParameters::decode):
948         * Shared/WebPageCreationParameters.h:
949         * UIProcess/PageClient.h:
950         * UIProcess/WebPageProxy.cpp:
951         (WebKit::WebPageProxy::creationParameters):
952         * UIProcess/WebPageProxy.h:
953         * UIProcess/ios/PageClientImplIOS.h:
954         * UIProcess/ios/PageClientImplIOS.mm:
955         (WebKit::PageClientImpl::doubleTapForDoubleClickDelay):
956         (WebKit::PageClientImpl::doubleTapForDoubleClickRadius):
957         * UIProcess/ios/WKContentViewInteraction.h:
958         * UIProcess/ios/WKContentViewInteraction.mm:
959         (-[WKContentView _ensureNonBlockingDoubleTapGestureRecognizer]):
960         (-[WKContentView setupInteraction]):
961         (-[WKContentView cleanupInteraction]):
962         (-[WKContentView _removeDefaultGestureRecognizers]):
963         (-[WKContentView _addDefaultGestureRecognizers]):
964         (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
965         (-[WKContentView gestureRecognizerShouldBegin:]):
966         (-[WKContentView _didStartProvisionalLoadForMainFrame]):
967         (-[WKContentView _doubleTapForDoubleClickDelay]):
968         (-[WKContentView _doubleTapForDoubleClickRadius]):
969         (-[WKContentView _doubleTapRecognizedForDoubleClick:]): Deleted.
970         * UIProcess/ios/WebPageProxyIOS.mm:
971         (WebKit::WebPageProxy::handleDoubleTapForDoubleClickAtPoint): Deleted.
972         * WebProcess/WebPage/WebPage.cpp:
973         * WebProcess/WebPage/WebPage.h:
974         * WebProcess/WebPage/WebPage.messages.in:
975         * WebProcess/WebPage/ios/WebPageIOS.mm:
976         (WebKit::WebPage::handlePotentialDoubleTapForDoubleClickAtPoint):
977         (WebKit::WebPage::commitPotentialTap):
978         (WebKit::WebPage::handleDoubleTapForDoubleClickAtPoint): Deleted.
979
980 2019-06-11  Andy Estes  <aestes@apple.com>
981
982         [Apple Pay] ASSERTION FAILED: m_state == State::Activating under WebPaymentCoordinatorProxy::showPaymentUI
983         https://bugs.webkit.org/show_bug.cgi?id=198776
984         <rdar://problem/49123795>
985
986         Reviewed by Brian Weinstein.
987
988         It's possible that an active session is aborted before the completion handler passed to
989         platformShowPaymentUI() has executed. When that happens, m_state will be Idle even though we
990         assert that it is Activating. Fix this by returning early in the platformShowPaymentUI()
991         completion handler when m_state is Idle.
992
993         It's not possible to write a layout test for this because MockPaymentCoordinator handles
994         showing payment UI directly in the web process, so this code is not executed in layout
995         tests. The assertion can be reproduced manually by loading
996         https://w3c-test.org/payment-request/payment-is-showing.https.html and clicking the button.
997
998         * Shared/ApplePay/WebPaymentCoordinatorProxy.cpp:
999         (WebKit::WebPaymentCoordinatorProxy::showPaymentUI):
1000
1001 2019-06-11  Patrick Griffis  <pgriffis@igalia.com>
1002
1003         [GTK] Fix a11y support in bubblewrap sandbox
1004         https://bugs.webkit.org/show_bug.cgi?id=198777
1005
1006         Reviewed by Michael Catanzaro.
1007
1008         * UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
1009         (WebKit::bindA11y):
1010
1011 2019-06-11  Timothy Hatcher  <timothy@apple.com>
1012
1013         Flash when tapping compose button after switching to/from dark mode without restarting Mail.
1014         https://bugs.webkit.org/show_bug.cgi?id=198769
1015         rdar://problem/51370037
1016
1017         Reviewed by Tim Horton.
1018
1019         Accessing a dynamic color outside a normal UIView choke point without setting
1020         UITraitCollection.currentTraitCollection first can cause undefined results.
1021         Use LocalCurrentTraitCollection inside scrollViewBackgroundColor when accessing
1022         the dynamic system UIColors. Also use systemBackgroundColor instead of white.
1023
1024         * UIProcess/API/Cocoa/WKWebView.mm:
1025         (scrollViewBackgroundColor):
1026
1027 2019-06-11  Megan Gardner  <megan_gardner@apple.com>
1028
1029         Integrate scrollbar gestures for iOS
1030         https://bugs.webkit.org/show_bug.cgi?id=198767
1031
1032         Reviewed by Tim Horton.
1033
1034         * UIProcess/ios/WKContentViewInteraction.mm:
1035         (_WKGestureRecognizerIsBuiltInScrollViewGestureRecognizer):
1036         (-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):
1037
1038 2019-06-11  Timothy Hatcher  <timothy@apple.com>
1039
1040         Scrollbar can show as white on white in dark mode on iOS.
1041         https://bugs.webkit.org/show_bug.cgi?id=198772
1042         rdar://problem/51516743
1043
1044         Reviewed by Tim Horton.
1045
1046         * UIProcess/API/Cocoa/WKWebView.mm:
1047         (-[WKWebView _updateScrollViewBackground]): Use UIScrollViewIndicatorStyleBlack instead
1048         of UIScrollViewIndicatorStyleDefault to prevent getting a white scrollbar in dark mode.
1049
1050 2019-06-11  Michael Catanzaro  <mcatanzaro@igalia.com>
1051
1052         Unreviewed build warning fixes
1053
1054         Silence -Wunused-variable warning
1055
1056         * UIProcess/WebProcessPool.cpp:
1057         (WebKit::WebProcessPool::clearWebProcessIsPlayingAudibleMedia):
1058
1059 2019-06-11  Simon Fraser  <simon.fraser@apple.com>
1060
1061         Fix non-internal builds after r246327.
1062
1063         * Platform/spi/ios/UIKitSPI.h:
1064
1065 2019-06-10  Simon Fraser  <simon.fraser@apple.com>
1066
1067         Add logging for UI-side compositing hit-testing
1068         https://bugs.webkit.org/show_bug.cgi?id=198739
1069
1070         Reviewed by Antti Koivisto.
1071
1072         Make it easier to debug UI-side compositing hit-testing issues with a UIHitTesting log
1073         channel, which logs information about the UIView hierarchy, which views are found by
1074         hit-testing, and what touch-actions apply.
1075
1076         This log channel can be set by passing the argument '-WebKit2Logging "UIHitTesting"' when
1077         launching a debug iOS MobileSafari instance.
1078
1079         * Platform/Logging.h:
1080         * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:
1081         (-[UIView _web_findDescendantViewAtPoint:withEvent:]):
1082         * UIProcess/ios/WKContentViewInteraction.mm:
1083         (-[WKContentView hitTest:withEvent:]):
1084         (-[WKContentView _handleTouchActionsForTouchEvent:]):
1085
1086 2019-06-11  Antti Koivisto  <antti@apple.com>
1087
1088         REGRESSION (iOS): Can't scroll litter-robot.com checkout form's dropdown menus
1089         https://bugs.webkit.org/show_bug.cgi?id=198753
1090         <rdar://problem/51355686>
1091
1092         Reviewed by Simon Fraser.
1093
1094         If an element with 'overflow:scroll' also had 'visibility:hidden' or 'pointer-events:none' it would
1095         capture touches and prevent scrolling of any overlapped scrollers.
1096
1097         * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:
1098         (WebKit::collectDescendantViewsAtPoint):
1099
1100         Filter out views with 'isUserInteractionEnabled == NO' (set for hidden and pointer-events:none layers).
1101         This prevents it being considered as the first view hit when determining scrolling relationships.
1102
1103         (-[UIView _web_findDescendantViewAtPoint:withEvent:]):
1104
1105         No need to skip here anymore.
1106
1107 2019-06-11  Wenson Hsieh  <wenson_hsieh@apple.com>
1108
1109         Quotes are always inserted as smart quotes on stackblitz.com, causing compilation errors
1110         https://bugs.webkit.org/show_bug.cgi?id=198735
1111         <rdar://problem/51557159>
1112
1113         Reviewed by Megan Gardner.
1114
1115         Add a flag in FocusedElementInformation to indicate whether spellchecking is allowed in the focused element.
1116         If spellchecking is not allowed, then disable smart quotes and dashes, which matches behavior on macOS.
1117
1118         * Shared/FocusedElementInformation.cpp:
1119         (WebKit::FocusedElementInformation::encode const):
1120         (WebKit::FocusedElementInformation::decode):
1121         * Shared/FocusedElementInformation.h:
1122         * UIProcess/ios/WKContentViewInteraction.mm:
1123         (-[WKContentView textInputTraits]):
1124         * WebProcess/WebPage/ios/WebPageIOS.mm:
1125         (WebKit::WebPage::getFocusedElementInformation):
1126
1127 2019-06-11  Carlos Garcia Campos  <cgarcia@igalia.com>
1128
1129         [GTK] Remove option REDIRECTED_XCOMPOSITE_WINDOW
1130         https://bugs.webkit.org/show_bug.cgi?id=198748
1131
1132         Reviewed by Žan Doberšek.
1133
1134         It's unused and untested, we kept that code path only because the redirected window caused performance issues in
1135         some drivers in embedded devices. Nowadays there are much better solutions for those cases like using WPE port
1136         or GTK port under wayland instead of X11.
1137
1138         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
1139         (WebKit::ThreadedCompositor::create): Remove the ShouldDoFrameSync parameter since it always receives Yes.
1140         (WebKit::ThreadedCompositor::ThreadedCompositor): Ditto.
1141         (WebKit::ThreadedCompositor::createGLContext): Remove the code to handle the case of ShouldDoFrameSync being No,
1142         since it's always Yes.
1143         (WebKit::ThreadedCompositor::setNativeSurfaceHandleForCompositing): Deleted.
1144         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
1145         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1146         (webkitWebViewBaseRealize): Remove the code for !USE(REDIRECTED_XCOMPOSITE_WINDOW).
1147         (webkitWebViewBaseUnrealize): Ditto.
1148         (webkitWebViewBaseDraw): acceleratedBackingStore member can't be nullptr now.
1149         (webkitWebViewBaseEnterAcceleratedCompositingMode): Ditto.
1150         (webkitWebViewBaseUpdateAcceleratedCompositingMode): Ditto.
1151         (webkitWebViewBaseExitAcceleratedCompositingMode): Ditto.
1152         (webkitWebViewBaseMakeGLContextCurrent): Ditto.
1153         (webkitWebViewBaseDidRelaunchWebProcess): Remove the code for !USE(REDIRECTED_XCOMPOSITE_WINDOW).
1154         (webkitWebViewBasePageClosed): Ditto.
1155         (webkitWebViewBaseRenderHostFileDescriptor): acceleratedBackingStore member can't be nullptr now.
1156         * UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:
1157         (WebKit::DrawingAreaProxyCoordinatedGraphics::didUpdateBackingStoreState): Remove the code for !USE(REDIRECTED_XCOMPOSITE_WINDOW).
1158         (WebKit::DrawingAreaProxyCoordinatedGraphics::setNativeSurfaceHandleForCompositing): Deleted.
1159         (WebKit::DrawingAreaProxyCoordinatedGraphics::destroyNativeSurfaceHandleForCompositing): Deleted.
1160         * UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h:
1161         * UIProcess/gtk/AcceleratedBackingStore.cpp:
1162         (WebKit::AcceleratedBackingStore::create): Add an assert to ensure we create an AcceleratedBackingStore.
1163         * UIProcess/gtk/AcceleratedBackingStoreX11.cpp:
1164         * UIProcess/gtk/AcceleratedBackingStoreX11.h:
1165         * UIProcess/gtk/HardwareAccelerationManager.cpp:
1166         (WebKit::HardwareAccelerationManager::HardwareAccelerationManager): Remove the code for !USE(REDIRECTED_XCOMPOSITE_WINDOW).
1167         * WebProcess/WebPage/AcceleratedSurface.cpp:
1168         (WebKit::AcceleratedSurface::create): Add an assert to ensure we create an AcceleratedSurface.
1169         * WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:
1170         (WebKit::DrawingAreaCoordinatedGraphics::enterAcceleratedCompositingMode): Remove the code for !USE(REDIRECTED_XCOMPOSITE_WINDOW).
1171         (WebKit::DrawingAreaCoordinatedGraphics::setNativeSurfaceHandleForCompositing): Deleted.
1172         (WebKit::DrawingAreaCoordinatedGraphics::destroyNativeSurfaceHandleForCompositing): Deleted.
1173         * WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h:
1174         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:
1175         (WebKit::LayerTreeHost::LayerTreeHost): m_surface can't be nullptr now.
1176         (WebKit::LayerTreeHost::sizeDidChange): Ditto.
1177         (WebKit::LayerTreeHost::deviceOrPageScaleFactorChanged): Ditto.
1178         (WebKit::LayerTreeHost::nativeSurfaceHandleForCompositing): Ditto.
1179         (WebKit::LayerTreeHost::didDestroyGLContext): Ditto.
1180         (WebKit::LayerTreeHost::willRenderFrame): Ditto.
1181         (WebKit::LayerTreeHost::didRenderFrame): Ditto.
1182         (WebKit::LayerTreeHost::setNativeSurfaceHandleForCompositing): Deleted.
1183         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h:
1184         * WebProcess/WebPage/DrawingArea.h:
1185         * WebProcess/WebPage/DrawingArea.messages.in:
1186         * WebProcess/WebPage/WebPage.h:
1187         (WebKit::WebPage::nativeWindowHandle): Deleted.
1188         * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.cpp:
1189         * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.h:
1190
1191 2019-06-11  Michael Catanzaro  <mcatanzaro@igalia.com>
1192
1193         [WPE][GTK] bubblewrap sandbox should grant access to web extensions directory
1194         https://bugs.webkit.org/show_bug.cgi?id=198734
1195
1196         Reviewed by Carlos Garcia Campos.
1197
1198         * UIProcess/API/glib/WebKitWebContext.cpp:
1199         (webkit_web_context_set_web_extensions_directory):
1200
1201 2019-06-10  Andy Estes  <aestes@apple.com>
1202
1203         [iOS] Use PDFKit SPI for taking snapshots when the hosting app is not entitled for global capture
1204         https://bugs.webkit.org/show_bug.cgi?id=198731
1205         <rdar://problem/46215174>
1206
1207         Reviewed by Tim Horton.
1208
1209         PDFHostViewController renders PDF contents in a view service, and apps are unable to
1210         snapshot views rendered out-of-process without an entitlement.
1211
1212         When an app is missing this entitlement and calls WKWebView's
1213         takeSnapshotWithConfiguration: API when a PDF is displayed, fall back to calling
1214         PDFHostViewController's snapshotting SPI.
1215
1216         Testing is blocked by <https://webkit.org/b/175204>.
1217
1218         * Platform/spi/ios/PDFKitSPI.h:
1219         * UIProcess/API/Cocoa/WKWebView.mm:
1220         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
1221         * UIProcess/Cocoa/WKWebViewContentProvider.h:
1222         * UIProcess/ios/WKPDFView.mm:
1223         (+[WKPDFView web_requiresCustomSnapshotting]):
1224         (-[WKPDFView web_snapshotRectInContentViewCoordinates:snapshotWidth:completionHandler:]):
1225         * UIProcess/ios/WKSystemPreviewView.mm:
1226         (+[WKSystemPreviewView web_requiresCustomSnapshotting]):
1227
1228 2019-06-10  Sam Weinig  <weinig@apple.com>
1229
1230         Remove Dashboard support
1231         https://bugs.webkit.org/show_bug.cgi?id=198615
1232
1233         Reviewed by Ryosuke Niwa.
1234
1235         * Configurations/FeatureDefines.xcconfig:
1236         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1237         (WKBundleSetUseDashboardCompatibilityMode): Deleted.
1238         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
1239         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1240         (WebKit::InjectedBundle::setUseDashboardCompatibilityMode): Deleted.
1241         * WebProcess/InjectedBundle/InjectedBundle.h:
1242         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1243         (WebKit::WebChromeClient::annotatedRegionsChanged): Deleted.
1244         * WebProcess/WebCoreSupport/WebChromeClient.h:
1245
1246 2019-06-10  Wenson Hsieh  <wenson_hsieh@apple.com>
1247
1248         [iOS] fast/xsl tests are flaky when run after certain viewport shrink-to-fit tests
1249         https://bugs.webkit.org/show_bug.cgi?id=198699
1250         <rdar://problem/50501718>
1251
1252         Reviewed by Simon Fraser.
1253
1254         Lift logic that sets the "IsKnownToLayOutWiderThanViewport" flag out of resetViewportDefaultConfiguration, and
1255         into didCommitLoad instead (along with other logic for resetting viewport arguments). The previous method,
1256         resetViewportDefaultConfiguration, was being triggered very frequently undo didReceiveMobileDocType, causing the
1257         shrink-to-fit heuristic to sometimes take no effect. The original intention here was simply to reset the flag
1258         upon page load.
1259
1260         * WebProcess/WebPage/WebPage.cpp:
1261         (WebKit::WebPage::didCommitLoad):
1262         * WebProcess/WebPage/ios/WebPageIOS.mm:
1263         (WebKit::WebPage::resetViewportDefaultConfiguration):
1264
1265 2019-06-10  Timothy Hatcher  <timothy@apple.com>
1266
1267         Integrate dark mode support for iOS.
1268         https://bugs.webkit.org/show_bug.cgi?id=198687
1269         rdar://problem/51545643
1270
1271         Reviewed by Tim Horton.
1272
1273         * Configurations/FeatureDefines.xcconfig:
1274         * UIProcess/API/Cocoa/WKWebView.mm:
1275         (-[WKWebView _effectiveAppearanceIsDark]):
1276         (-[WKWebView _effectiveAppearanceIsInactive]):
1277         (-[WKWebView _dynamicUserInterfaceTraitDidChange]):
1278         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1279         * UIProcess/ios/PageClientImplIOS.h:
1280         * UIProcess/ios/PageClientImplIOS.mm:
1281         (WebKit::PageClientImpl::effectiveAppearanceIsDark const):
1282         (WebKit::PageClientImpl::effectiveAppearanceIsInactive const):
1283         * UIProcess/ios/WKPasswordView.mm:
1284         (-[WKPasswordView showInScrollView:]):
1285         (configureScrollView): Deleted.
1286
1287 2019-06-10  Sihui Liu  <sihui_liu@apple.com>
1288
1289         [WKHTTPCookieStore getAllCookies:] may return duplicate cookies
1290         https://bugs.webkit.org/show_bug.cgi?id=198635
1291         <rdar://problem/46010232>
1292
1293         Reviewed by Ryosuke Niwa.
1294
1295         When there is no process pool, we store cookies set in memory with HashSet m_pendingCookies of WebsiteDataStore.
1296
1297         HashSet does not contain duplicate Cookies that are completely identical, but it may contain Cookies that have 
1298         all the other properties identical other than value. This is not correct because Cookies with same name, domain
1299         and path should be treated as the same cookie. When a cookie is set via API, we should either insert the 
1300         cookie into m_pendingCookies if the cookie does not exist, or update the cookie value if it already exists.
1301
1302         Note that we still use HashSet with CookieHash for m_pendingCookies because in cookie deletion, we only delete 
1303         cookie when there is a complete match. If some cookie from m_pendingCookies has all other properties the same as
1304         the cookie specified in the deletion function, but the value is different, it will not be removed.
1305
1306         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1307         (WebKit::WebsiteDataStore::addPendingCookie):
1308
1309 2019-06-10  Philippe Normand  <pnormand@igalia.com>
1310
1311         [WPE][Qt] Port to new wpe_fdo_egl_exported_image API
1312         https://bugs.webkit.org/show_bug.cgi?id=198713
1313
1314         Reviewed by Carlos Garcia Campos.
1315
1316         * UIProcess/API/wpe/qt/WPEQtViewBackend.cpp:
1317         (WPEQtViewBackend::WPEQtViewBackend):
1318         (WPEQtViewBackend::texture):
1319         (WPEQtViewBackend::displayImage):
1320         * UIProcess/API/wpe/qt/WPEQtViewBackend.h:
1321
1322 2019-06-09  Brent Fulgham  <bfulgham@apple.com>
1323
1324         [iOS] ResourceLoadStatistics state is not properly relayed to the NetworkProcess
1325         https://bugs.webkit.org/show_bug.cgi?id=198692
1326         <rdar://problem/51538088>
1327
1328         Reviewed by Maciej Stachowiak.
1329
1330         * UIProcess/WebProcessPool.cpp:
1331         (WebKit::WebProcessPool::setResourceLoadStatisticsEnabled): Message the NetworkProcess
1332         on state change.
1333
1334 2019-06-08  Dean Jackson  <dino@apple.com>
1335
1336         Drag starting state can get stuck even though the drag has ended
1337         https://bugs.webkit.org/show_bug.cgi?id=198696
1338         <rdar://problem/51556045>
1339
1340         Reviewed by Wenson Hsieh.
1341
1342         In iOS 13, we're seeing cases of the DragSession not
1343         correctly ending, and thus leaving m_isStartingDrag in
1344         an incorrect state. Temporarily force this to be reset
1345         in ::dragEnded while investigating
1346
1347         * UIProcess/ios/WKContentViewInteraction.mm: Add some more release logging
1348         while here.
1349         (-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
1350         (-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
1351         * WebProcess/WebPage/WebPage.cpp:
1352         (WebKit::WebPage::dragEnded):
1353
1354 2019-06-08  Wenson Hsieh  <wenson_hsieh@apple.com>
1355
1356         [iOS] The default application name for user agent when requesting desktop content is still "Mobile/15E148"
1357         https://bugs.webkit.org/show_bug.cgi?id=198693
1358         <rdar://problem/51555371>
1359
1360         Reviewed by Tim Horton.
1361
1362         Fixes the bug by introducing an applicationNameForDesktopUserAgent member to WebPageProxy. This
1363         applicationNameForDesktopUserAgent is set alongside the regular applicationNameForUserAgent; however, in the
1364         case where it is being set via WKWebViewConfiguration, use WKWebViewConfiguration's
1365         _applicationNameForDesktopUserAgent instead. See below for more details.
1366
1367         Tested by adding to the existing API test PreferredContentMode.ApplicationNameForDesktopUserAgent.
1368
1369         * UIProcess/API/APIWebsitePolicies.cpp:
1370         (API::WebsitePolicies::copy const):
1371         * UIProcess/API/APIWebsitePolicies.h:
1372
1373         Drive-by fix: rename applicationNameForUserAgentWithModernCompatibility to applicationNameForDesktopUserAgent in
1374         a few places.
1375
1376         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1377         (-[WKBrowsingContextController setApplicationNameForUserAgent:]):
1378         * UIProcess/API/Cocoa/WKWebView.mm:
1379         (-[WKWebView _initializeWithConfiguration:]):
1380         (-[WKWebView _setApplicationNameForUserAgent:]):
1381         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1382
1383         Change _applicationNameForUserAgent into an Optional<RetainPtr<NSString>>. A value of WTF::nullopt allows us to
1384         know that the default application name should be used (which is different when requesting desktop content).
1385
1386         (-[WKWebViewConfiguration encodeWithCoder:]):
1387         (-[WKWebViewConfiguration initWithCoder:]):
1388         (-[WKWebViewConfiguration copyWithZone:]):
1389         (-[WKWebViewConfiguration _applicationNameForDesktopUserAgent]):
1390
1391         Add _applicationNameForDesktopUserAgent to the web view configuration. This behaves like
1392         applicationNameForUserAgent, with one exception: in the case where the default applicationNameForUserAgent is
1393         used (i.e. the client has not specified any application name), default to `nil` as the application name for user
1394         agent, rather than "Mobile/15E148".
1395
1396         (-[WKWebViewConfiguration applicationNameForUserAgent]):
1397         (-[WKWebViewConfiguration setApplicationNameForUserAgent:]):
1398         * UIProcess/API/Cocoa/WKWebViewConfigurationInternal.h:
1399         * UIProcess/API/Cocoa/WKWebpagePreferences.mm:
1400         (-[WKWebpagePreferences _applicationNameForUserAgentWithModernCompatibility]):
1401         (-[WKWebpagePreferences _setApplicationNameForUserAgentWithModernCompatibility:]):
1402         * UIProcess/WebPageProxy.h:
1403         (WebKit::WebPageProxy::setApplicationNameForDesktopUserAgent):
1404         (WebKit::WebPageProxy::applicationNameForDesktopUserAgent const):
1405         * UIProcess/ios/WebPageProxyIOS.mm:
1406         (WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies):
1407
1408 2019-06-08  Andy Estes  <aestes@apple.com>
1409
1410         [Apple Pay] If we have a bound interface identifier, set it on new PKPaymentRequests
1411         https://bugs.webkit.org/show_bug.cgi?id=198690
1412         <rdar://problem/48041803>
1413
1414         Reviewed by Tim Horton.
1415
1416         * NetworkProcess/cocoa/NetworkSessionCocoa.h:
1417         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1418         (WebKit::NetworkSessionCocoa::boundInterfaceIdentifier const): Implemented a public getter
1419         for m_boundInterfaceIdentifier.
1420
1421         * NetworkProcess/NetworkConnectionToWebProcess.h:
1422         * NetworkProcess/ios/NetworkConnectionToWebProcessIOS.mm:
1423         (WebKit::NetworkConnectionToWebProcess::paymentCoordinatorBoundInterfaceIdentifier):
1424         Implemented an override for paymentCoordinatorBoundInterfaceIdentifier.
1425
1426         * Shared/ApplePay/WebPaymentCoordinatorProxy.h: Declared
1427         paymentCoordinatorBoundInterfaceIdentifier for clients to override.
1428
1429         * Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
1430         (WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest): If the client has a non-empty
1431         bound interface identifier, set it on the new PKPaymentRequest.
1432
1433         * UIProcess/WebPageProxy.h:
1434         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
1435         (WebKit::WebPageProxy::paymentCoordinatorBoundInterfaceIdentifier): Implemented an override
1436         for paymentCoordinatorBoundInterfaceIdentifier.
1437
1438 2019-06-07  Antti Koivisto  <antti@apple.com>
1439
1440         REGRESSION (r245006): Setting scrollview.scrollEnabled clobbers any scrollEnabled set by a client
1441         https://bugs.webkit.org/show_bug.cgi?id=198656
1442         <rdar://problem/51494585>
1443
1444         Reviewed by Tim Horton.
1445
1446         Allow client to disable scrolling and zooming.
1447
1448         * UIProcess/API/Cocoa/WKWebView.mm:
1449         (-[WKWebView _didCommitLayerTree:]):
1450         * UIProcess/ios/WKScrollView.h:
1451         * UIProcess/ios/WKScrollView.mm:
1452         (-[WKScrollView initWithFrame:]):
1453         (-[WKScrollView setScrollEnabled:]):
1454         (-[WKScrollView _setScrollEnabledInternal:]):
1455         (-[WKScrollView _updateScrollability]):
1456         (-[WKScrollView setZoomEnabled:]):
1457         (-[WKScrollView _setZoomEnabledInternal:]):
1458         (-[WKScrollView _updateZoomability]):
1459
1460 2019-06-07  Wenson Hsieh  <wenson_hsieh@apple.com>
1461
1462         Allow clients to vend custom -inputView and -inputAccessoryView by overriding WKWebView methods
1463         https://bugs.webkit.org/show_bug.cgi?id=198631
1464         <rdar://problem/51505431>
1465
1466         Reviewed by Tim Horton.
1467
1468         Allow WKWebView API clients to override WKContentView's default input view and/or input accessory view by
1469         subclassing WKWebView and implementing -inputView or -inputAccessoryView.
1470
1471         * UIProcess/API/Cocoa/WKWebView.mm:
1472         (-[WKWebView inputAccessoryView]):
1473         (-[WKWebView inputView]):
1474         * UIProcess/ios/WKContentViewInteraction.h:
1475         * UIProcess/ios/WKContentViewInteraction.mm:
1476         (-[WKContentView inputView]):
1477         (-[WKContentView inputViewForWebView]):
1478         (-[WKContentView inputAccessoryView]):
1479         (-[WKContentView inputAccessoryViewForWebView]):
1480
1481 2019-06-07  Tim Horton  <timothy_horton@apple.com>
1482
1483         Disable focus rings on WKContentView for PLATFORM(IOSMAC)
1484         https://bugs.webkit.org/show_bug.cgi?id=198685
1485
1486         Reviewed by Simon Fraser.
1487
1488         * Platform/spi/ios/UIKitSPI.h:
1489         * UIProcess/ios/WKContentView.mm:
1490         (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
1491
1492 2019-06-07  Megan Gardner  <megan_gardner@apple.com>
1493
1494         Extend quirks to emulate bold/italic/underline in hidden editable areas
1495         https://bugs.webkit.org/show_bug.cgi?id=198681
1496
1497         Reviewed by Wenson Hsieh.
1498
1499         * Shared/FocusedElementInformation.cpp:
1500         (WebKit::FocusedElementInformation::encode const):
1501         (WebKit::FocusedElementInformation::decode):
1502         * Shared/FocusedElementInformation.h:
1503         * Shared/SyntheticEditingCommandType.h:
1504         * UIProcess/ios/WKContentView.mm:
1505         (-[WKContentView undoManager]):
1506         * UIProcess/ios/WKContentViewInteraction.mm:
1507         (shouldSynthezieKeyEvents):
1508         (-[WKContentView toggleBoldfaceForWebView:]):
1509         (-[WKContentView toggleItalicsForWebView:]):
1510         (-[WKContentView toggleUnderlineForWebView:]):
1511         (-[WKContentView _elementDidBlur]):
1512         * WebProcess/WebPage/ios/WebPageIOS.mm:
1513         (WebKit::WebPage::generateSyntheticEditingCommand):
1514         (WebKit::WebPage::getFocusedElementInformation):
1515
1516 2019-06-05  Alex Christensen  <achristensen@webkit.org>
1517
1518         Introduce new SPI for context menus on iOS
1519         https://bugs.webkit.org/show_bug.cgi?id=198590
1520
1521         Reviewed by Tim Horton.
1522
1523         Also introduce WKContextMenuElementInfo which is API.
1524         This is part of <rdar://problem/51003503>
1525
1526         * Shared/API/APIObject.h:
1527         * Shared/API/Cocoa/WebKit.h:
1528         * Shared/Cocoa/APIObject.mm:
1529         (API::Object::newObject):
1530         * Sources.txt:
1531         * SourcesCocoa.txt:
1532         * UIProcess/API/APIContextMenuElementInfo.cpp: Added.
1533         (API::ContextMenuElementInfo::ContextMenuElementInfo):
1534         * UIProcess/API/APIContextMenuElementInfo.h: Added.
1535         * UIProcess/API/Cocoa/WKContextMenuElementInfo.h: Added.
1536         * UIProcess/API/Cocoa/WKContextMenuElementInfo.mm: Added.
1537         (-[WKContextMenuElementInfo linkURL]):
1538         (-[WKContextMenuElementInfo _apiObject]):
1539         (-[WKContextMenuElementInfo _activatedElementInfo]):
1540         * UIProcess/API/Cocoa/WKContextMenuElementInfoInternal.h: Added.
1541         * UIProcess/API/Cocoa/WKContextMenuElementInfoPrivate.h: Added.
1542         * UIProcess/API/Cocoa/WKPreviewElementInfo.h:
1543         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1544         * UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
1545         * UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
1546         (-[_WKActivatedElementInfo _initWithInteractionInformationAtPosition:]):
1547         (-[_WKActivatedElementInfo isAnimatedImage]):
1548         * UIProcess/ios/WKActionSheetAssistant.h:
1549         * UIProcess/ios/WKActionSheetAssistant.mm:
1550         (-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
1551         (-[WKActionSheetAssistant defaultActionsForImageSheet:]):
1552         * UIProcess/ios/WKContentView.h:
1553         * UIProcess/ios/WKContentViewInteraction.mm:
1554         * WebKit.xcodeproj/project.pbxproj:
1555
1556 2019-06-07  Antoine Quint  <graouts@apple.com>
1557
1558         Restrict fast clicks everywhere to desktop content mode
1559         https://bugs.webkit.org/show_bug.cgi?id=198610
1560         <rdar://problem/50114230>
1561
1562         Reviewed by Dean Jackson.
1563
1564         We now set a new allowsFastClicksEverywhere property on the WebPageProxy when the content mode changes, set to true
1565         when we're in desktop browsing mode. We now check on this property to opt into the fast clicks everywhere behavior.
1566
1567         This patch had been reverted once because it yielded some regressions in existing tests, notably under
1568         fast/events/touch/ios/content-observation. This updated patch addresses this by ensuring the gesture recognizers
1569         used for double-tap-to-zoom are disabled in -[WKContentViewInteraction _didStartProvisionalLoadForMainFrame]
1570         to ensure that two tests dispatching a tap at the same location don't yield the recognition of a double-tap
1571         rathern than the recognition of two single taps. 
1572
1573         * UIProcess/WebPageProxy.h:
1574         (WebKit::WebPageProxy::allowsFastClicksEverywhere const):
1575         * UIProcess/ios/WKContentViewInteraction.mm:
1576         (-[WKContentView _handleSmartMagnificationInformationForPotentialTap:renderRect:fitEntireRect:viewportMinimumScale:viewportMaximumScale:]):
1577         (_didStartProvisionalLoadForMainFrame):
1578         * UIProcess/ios/WebPageProxyIOS.mm:
1579         (WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies):
1580
1581 2019-06-07  Brent Fulgham  <bfulgham@apple.com>
1582
1583         [iOS] Update sandboxes to address iokit-get-property errors
1584         https://bugs.webkit.org/show_bug.cgi?id=198494
1585         <rdar://problem/51322072> and <rdar://problem/50602737>
1586
1587         Reviewed by Per Arne Vollan.
1588
1589         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1590
1591 2019-06-07  Andy Estes  <aestes@apple.com>
1592
1593         process-swap-on-navigation error when loading blocked website on iOS 12.2 only.
1594         https://bugs.webkit.org/show_bug.cgi?id=196930
1595         <rdar://problem/47819301>
1596
1597         Reviewed by Chris Dumez.
1598
1599         The ContentFilterDidBlockLoadForFrame message needs to be handled by ProvisionalPageProxy in
1600         order to look up the blocked frame in the correct WebProcessProxy.
1601
1602         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
1603         (WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame):
1604         (WebKit::WebPageProxy::contentFilterDidBlockLoadForFrameShared):
1605         * UIProcess/ProvisionalPageProxy.cpp:
1606         (WebKit::ProvisionalPageProxy::contentFilterDidBlockLoadForFrame):
1607         (WebKit::ProvisionalPageProxy::didReceiveMessage):
1608         * UIProcess/ProvisionalPageProxy.h:
1609         * UIProcess/WebPageProxy.h:
1610
1611 2019-06-07  Carlos Garcia Campos  <cgarcia@igalia.com>
1612
1613         Unreviewed. Fix api used to release wpe_fdo_egl_exported_image in GTK
1614
1615         We are using the old deprecated API in AcceleratedBackingStoreWayland::displayBuffer().
1616
1617         * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
1618         (WebKit::AcceleratedBackingStoreWayland::displayBuffer):
1619
1620 2019-06-06  Carlos Garcia Campos  <cgarcia@igalia.com>
1621
1622         REGRESSION(r243094): [GTK][WPE] Stale content after restoring the web view session
1623         https://bugs.webkit.org/show_bug.cgi?id=198561
1624
1625         Reviewed by Chris Dumez.
1626
1627         This is another regression of delaying the web process launch until the first load. If the session is restored
1628         before anything has been loaded, which is the normal way, the RestoreSession message is just ignored and the
1629         state is sent to the WebPage on creation via creation parameters. The WebPage considers that restoring a session
1630         from creation parameters only happens when re-launching a process after a crash or in case of process swap. In
1631         those cases, the history item is not marked as restored from session. We need to ensure the session is restored
1632         in the web process from the IPC message handler, by launching the initial process before the session is
1633         restored.
1634
1635         * UIProcess/WebPageProxy.cpp:
1636         (WebKit::WebPageProxy::restoreFromSessionState):
1637
1638 2019-06-06  Youenn Fablet  <youenn@apple.com>
1639
1640         Use an enumeration in UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo callback
1641         https://bugs.webkit.org/show_bug.cgi?id=198548
1642
1643         Reviewed by Eric Carlson.
1644
1645         Move from an Optional<bool> to an enum having three values to ease readability.
1646
1647         * UIProcess/UserMediaPermissionCheckProxy.cpp:
1648         (WebKit::UserMediaPermissionCheckProxy::setUserMediaAccessInfo):
1649         (WebKit::UserMediaPermissionCheckProxy::complete):
1650         * UIProcess/UserMediaPermissionCheckProxy.h:
1651         (WebKit::UserMediaPermissionCheckProxy::invalidate):
1652         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
1653         (WebKit::UserMediaPermissionRequestManagerProxy::captureDevicesChanged):
1654         (WebKit::UserMediaPermissionRequestManagerProxy::startProcessingUserMediaPermissionRequest):
1655         (WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo):
1656         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
1657         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
1658
1659 2019-06-06  Youenn Fablet  <youenn@apple.com>
1660
1661         Allow WebKitTestRunner to terminate network process after it finishes service worker file operations
1662         https://bugs.webkit.org/show_bug.cgi?id=198584
1663
1664         Reviewed by Geoffrey Garen.
1665
1666         Add IPC binding to new internal API.
1667
1668         * NetworkProcess/ServiceWorker/WebSWServerConnection.messages.in:
1669         * WebProcess/Storage/WebSWClientConnection.cpp:
1670         (WebKit::WebSWClientConnection::storeRegistrationsOnDiskForTesting):
1671         * WebProcess/Storage/WebSWClientConnection.h:
1672
1673 2019-06-06  Commit Queue  <commit-queue@webkit.org>
1674
1675         Unreviewed, rolling out r246165.
1676         https://bugs.webkit.org/show_bug.cgi?id=198636
1677
1678         Causing test failures in 7 content-observation tests.
1679         (Requested by ShawnRoberts on #webkit).
1680
1681         Reverted changeset:
1682
1683         "Restrict fast clicks everywhere to desktop content mode"
1684         https://bugs.webkit.org/show_bug.cgi?id=198610
1685         https://trac.webkit.org/changeset/246165
1686
1687 2019-06-06  Commit Queue  <commit-queue@webkit.org>
1688
1689         Unreviewed, rolling out r246123.
1690         https://bugs.webkit.org/show_bug.cgi?id=198634
1691
1692         Causes test failures (Requested by ShawnRoberts on #webkit).
1693
1694         Reverted changeset:
1695
1696         "[iOS] Update sandboxes to address iokit-get-property errors"
1697         https://bugs.webkit.org/show_bug.cgi?id=198494
1698         https://trac.webkit.org/changeset/246123
1699
1700 2019-06-06  Geoffrey Garen  <ggaren@apple.com>
1701
1702         Crash using WKHTTPCookieStore when you use WKWebView and UIWebView in the same app
1703         https://bugs.webkit.org/show_bug.cgi?id=198622
1704
1705         Reviewed by Chris Dumez.
1706
1707         Today in a WWDC lab, I saw some crash reports from an app that mixed
1708         WKWebView and UIWebView. The proximate cause of the crash is that
1709         WKHTTPCookieStore queues a callOnMainThread function, and then
1710         UIWebView dequeues it on the WebThread.
1711
1712         No test because this crash depends on mixing WKWebView and UIWebView and
1713         getting (un)lucky on the timing.
1714
1715         * UIProcess/API/APIHTTPCookieStore.cpp:
1716         (API::HTTPCookieStore::cookies):
1717         (API::HTTPCookieStore::setCookies):
1718         (API::HTTPCookieStore::deleteCookie): Avoid using callOnMainThread
1719         becuase it is prohibited in the UI process.
1720
1721 2019-06-06  Antoine Quint  <graouts@apple.com>
1722
1723         Remove duplicated websiteDataStoreParameters code from WebsitePoliciesData::applyToDocumentLoader()
1724         https://bugs.webkit.org/show_bug.cgi?id=198608
1725
1726         Reviewed by Wenson Hsieh.
1727
1728         Due to a rebasing error, r244218 re-introduced code that was removed in r244197. This patch removes this code for good.
1729
1730         * Shared/WebsitePoliciesData.cpp:
1731         (WebKit::WebsitePoliciesData::applyToDocumentLoader):
1732
1733 2019-06-06  Antoine Quint  <graouts@apple.com>
1734
1735         Restrict fast clicks everywhere to desktop content mode
1736         https://bugs.webkit.org/show_bug.cgi?id=198610
1737         <rdar://problem/50114230>
1738
1739         Reviewed by Dean Jackson.
1740
1741         * UIProcess/WebPageProxy.h:
1742         (WebKit::WebPageProxy::allowsFastClicksEverywhere const):
1743         * UIProcess/ios/WKContentViewInteraction.mm:
1744         (-[WKContentView _handleSmartMagnificationInformationForPotentialTap:renderRect:fitEntireRect:viewportMinimumScale:viewportMaximumScale:]):
1745         * UIProcess/ios/WebPageProxyIOS.mm:
1746         (WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies):
1747
1748 2019-06-06  Sihui Liu  <sihui_liu@apple.com>
1749
1750         NetworkHTTPSUpgradeChecker should construct and destruct database on the background thread
1751         https://bugs.webkit.org/show_bug.cgi?id=198496
1752
1753         Reviewed by Chris Dumez.
1754
1755         * NetworkProcess/NetworkHTTPSUpgradeChecker.cpp:
1756         (WebKit::NetworkHTTPSUpgradeChecker::NetworkHTTPSUpgradeChecker):
1757         (WebKit::NetworkHTTPSUpgradeChecker::~NetworkHTTPSUpgradeChecker):
1758         * NetworkProcess/NetworkHTTPSUpgradeChecker.h:
1759
1760 2019-06-06  Truitt Savell  <tsavell@apple.com>
1761
1762         Unreviewed, rolling out r246137.
1763
1764         Broke internal builds.
1765
1766         Reverted changeset:
1767
1768         "Introduce new SPI for context menus on iOS"
1769         https://bugs.webkit.org/show_bug.cgi?id=198590
1770         https://trac.webkit.org/changeset/246137
1771
1772 2019-06-06  Antti Koivisto  <antti@apple.com>
1773
1774         Position fixed is buggy with overflow:auto scrolling inside iframes
1775         https://bugs.webkit.org/show_bug.cgi?id=154399
1776         <rdar://problem/24742251>
1777
1778         Reviewed by Frederic Wang and Simon Fraser.
1779
1780         * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
1781         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
1782
1783         Remove viewportChangedViaDelegatedScrolling call as we were just relying on its side effect of (partially) applying
1784         the scrolling tree. Instead call the new applyScrollingTreeLayerPositionsAfterCommit() unconditionally.
1785         It only does work if there are local deltas to apply.
1786
1787         Local deltas will potentially need to be applied in non-fixed cases too and it is hard to reason about the conditions.
1788
1789         * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
1790         (WebKit::RemoteScrollingCoordinatorProxy::applyScrollingTreeLayerPositionsAfterCommit):
1791         (WebKit::RemoteScrollingCoordinatorProxy::applyScrollingTreeLayerPositions): Deleted.
1792         * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
1793
1794 2019-06-06  Michael Catanzaro  <mcatanzaro@igalia.com>
1795
1796         [WPE][GTK] Clean up use of initiatingPageID in implementation of webkit_uri_scheme_request_get_web_view()
1797         https://bugs.webkit.org/show_bug.cgi?id=198564
1798
1799         Reviewed by Carlos Garcia Campos.
1800
1801         Note that we have to use RefPtr rather than Ref here because the priv struct has to remain
1802         default-constructible.
1803
1804         * UIProcess/API/glib/WebKitURISchemeRequest.cpp:
1805         (webkitURISchemeRequestCreate):
1806         (webkit_uri_scheme_request_get_web_view):
1807
1808 2019-06-06  Carlos Garcia Campos  <cgarcia@igalia.com>
1809
1810         [GTK][WPE] Enable PSON
1811         https://bugs.webkit.org/show_bug.cgi?id=194979
1812
1813         Reviewed by Žan Doberšek.
1814
1815         * Shared/WebPreferencesDefaultValues.h:
1816
1817 2019-06-05  Said Abou-Hallawa  <sabouhallawa@apple.com>
1818
1819         [Cocoa] REGRESSION(r244182): Inspector thinks CA commits can be nested
1820         https://bugs.webkit.org/show_bug.cgi?id=198497
1821
1822         Reviewed by Simon Fraser.
1823
1824         Call InspectorController::willComposite() from the CA preCommit handler
1825         similar to the call to InspectorController::didComposite() in the CA
1826         postCommit handler. Ensure these calls will be once for nested commits.
1827
1828         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
1829         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
1830         (WebKit::RemoteLayerTreeDrawingArea::addCommitHandlers):
1831         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
1832         * WebProcess/WebPage/WebPage.h:
1833         (WebKit::WebPage::firstFlushAfterCommit const):
1834         (WebKit::WebPage::setFirstFlushAfterCommit):
1835         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1836         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1837         (WebKit::TiledCoreAnimationDrawingArea::addCommitHandlers):
1838         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
1839
1840 2019-06-05  Alex Christensen  <achristensen@webkit.org>
1841
1842         Introduce new SPI for context menus on iOS
1843         https://bugs.webkit.org/show_bug.cgi?id=198590
1844
1845         Reviewed by Tim Horton.
1846
1847         Also introduce WKContextMenuElementInfo which is API.
1848         This is part of <rdar://problem/51003503>
1849
1850         * Shared/API/APIObject.h:
1851         * Shared/API/Cocoa/WebKit.h:
1852         * Shared/Cocoa/APIObject.mm:
1853         (API::Object::newObject):
1854         * Sources.txt:
1855         * SourcesCocoa.txt:
1856         * UIProcess/API/APIContextMenuElementInfo.cpp: Added.
1857         (API::ContextMenuElementInfo::ContextMenuElementInfo):
1858         * UIProcess/API/APIContextMenuElementInfo.h: Added.
1859         * UIProcess/API/Cocoa/WKContextMenuElementInfo.h: Added.
1860         * UIProcess/API/Cocoa/WKContextMenuElementInfo.mm: Added.
1861         (-[WKContextMenuElementInfo linkURL]):
1862         (-[WKContextMenuElementInfo _apiObject]):
1863         (-[WKContextMenuElementInfo _activatedElementInfo]):
1864         * UIProcess/API/Cocoa/WKContextMenuElementInfoInternal.h: Added.
1865         * UIProcess/API/Cocoa/WKContextMenuElementInfoPrivate.h: Added.
1866         * UIProcess/API/Cocoa/WKPreviewElementInfo.h:
1867         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1868         * UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
1869         * UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
1870         (-[_WKActivatedElementInfo _initWithInteractionInformationAtPosition:]):
1871         (-[_WKActivatedElementInfo isAnimatedImage]):
1872         * UIProcess/ios/WKActionSheetAssistant.h:
1873         * UIProcess/ios/WKActionSheetAssistant.mm:
1874         (-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
1875         (-[WKActionSheetAssistant defaultActionsForImageSheet:]):
1876         * UIProcess/ios/WKContentView.h:
1877         * UIProcess/ios/WKContentViewInteraction.mm:
1878         * WebKit.xcodeproj/project.pbxproj:
1879
1880 2019-06-05  Jer Noble  <jer.noble@apple.com>
1881
1882         -[WKWebView _suspendAllMediaPlayback] does not persist across navigation.
1883         https://bugs.webkit.org/show_bug.cgi?id=198585
1884
1885         Reviewed by Chris Dumez.
1886
1887         Add a new WebPageCreationParameters entry for mediaPlaybackIsSuspended, and pass
1888         that value across during WebPage creation.
1889
1890         * Shared/WebPageCreationParameters.cpp:
1891         (WebKit::WebPageCreationParameters::encode const):
1892         (WebKit::WebPageCreationParameters::decode):
1893         * Shared/WebPageCreationParameters.h:
1894         * UIProcess/WebPageProxy.cpp:
1895         (WebKit::WebPageProxy::suspendAllMediaPlayback):
1896         (WebKit::WebPageProxy::resumeAllMediaPlayback):
1897         (WebKit::WebPageProxy::creationParameters):
1898         * UIProcess/WebPageProxy.h:
1899         * WebProcess/WebPage/WebPage.cpp:
1900         (WebKit::WebPage):
1901
1902 2019-06-05  Sihui Liu  <sihui_liu@apple.com>
1903
1904         TestWebKitAPI.WKWebView.LocalStorageProcessSuspends is flaky on release builds
1905         https://bugs.webkit.org/show_bug.cgi?id=198582
1906
1907         Reviewed by Youenn Fablet.
1908
1909         Initialize the state of StorageManager.
1910
1911         * NetworkProcess/WebStorage/StorageManager.h:
1912
1913 2019-06-05  Alex Christensen  <achristensen@webkit.org>
1914
1915         Re-enable safe browsing in WKWebView
1916         https://bugs.webkit.org/show_bug.cgi?id=196161
1917         <rdar://problem/49171413>
1918
1919         Reviewed by Ryosuke Niwa.
1920
1921         This is mostly just reverting r241728.
1922
1923         * Shared/WebPreferences.yaml:
1924         * UIProcess/API/Cocoa/WKPreferences.h:
1925         * UIProcess/API/Cocoa/WKPreferences.mm:
1926         (-[WKPreferences setSafeBrowsingEnabled:]):
1927         (-[WKPreferences isSafeBrowsingEnabled]):
1928
1929 2019-06-05  Alex Christensen  <achristensen@webkit.org>
1930
1931         Progress towards resurrecting Mac CMake build
1932         https://bugs.webkit.org/show_bug.cgi?id=197132
1933
1934         Reviewed by Don Olmstead.
1935
1936         * PlatformMac.cmake:
1937
1938 2019-06-05  Youenn Fablet  <youenn@apple.com>
1939
1940         Remove logSiteIdentifier from UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame
1941         https://bugs.webkit.org/show_bug.cgi?id=198575
1942
1943         Reviewed by Eric Carlson.
1944
1945         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
1946         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
1947
1948 == Rolled over to ChangeLog-2019-06-05 ==