8077ccda3a7e26be381ca0214450fded9e15963f
[WebKit-https.git] / Source / WebKit / ChangeLog
1 2019-06-20  Patrick Griffis  <pgriffis@igalia.com> and Carlos Garcia Campos  <cgarcia@igalia.com>
2
3         [GTK][WPE] Implement a basic DNS cache
4         https://bugs.webkit.org/show_bug.cgi?id=196094
5
6         Reviewed by Michael Catanzaro.
7
8         This adds a simple cache to all DNS operations in the network process.
9
10         * NetworkProcess/glib/DNSCache.cpp: Added.
11         (WebKit::DNSCache::DNSCache):
12         (WebKit::DNSCache::mapForType):
13         (WebKit::DNSCache::lookup):
14         (WebKit::DNSCache::update):
15         (WebKit::DNSCache::removeExpiredResponsesInMap):
16         (WebKit::DNSCache::pruneResponsesInMap):
17         (WebKit::DNSCache::removeExpiredResponsesFired):
18         (WebKit::DNSCache::clear):
19         * NetworkProcess/glib/DNSCache.h: Added.
20         * NetworkProcess/glib/WebKitCachedResolver.cpp: Added.
21         (addressListVectorToGList):
22         (addressListGListToVector):
23         (webkitCachedResolverLookupByName):
24         (webkitCachedResolverLookupByNameAsync):
25         (webkitCachedResolverLookupByNameFinish):
26         (dnsCacheType):
27         (webkitCachedResolverLookupByNameWithFlags):
28         (webkitCachedResolverLookupByNameWithFlagsAsync):
29         (webkitCachedResolverLookupByNameWithFlagsFinish):
30         (webkitCachedResolverLookupByAddress):
31         (webkitCachedResolverLookupByAddressAsync):
32         (webkitCachedResolverLookupByAddressFinish):
33         (webkitCachedResolverLookupRecords):
34         (webkitCachedResolverLookupRecordsAsync):
35         (webkitCachedResolverLookupRecordsFinish):
36         (webkitCachedResolverReload):
37         (webkit_cached_resolver_class_init):
38         (webkitCachedResolverNew):
39         * NetworkProcess/glib/WebKitCachedResolver.h: Added.
40         * NetworkProcess/soup/NetworkProcessSoup.cpp:
41         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
42         * PlatformGTK.cmake:
43         * PlatformWPE.cmake:
44         * SourcesGTK.txt:
45         * SourcesWPE.txt:
46
47 2019-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>
48
49         [GTK] Stop pretending WebCore::Widget can have a platform widget
50         https://bugs.webkit.org/show_bug.cgi?id=199066
51
52         Reviewed by Michael Catanzaro.
53
54         Rename PlatformWidget as PlatformViewWidget to avoid conflict with PlatformWidget defined in WebCore.
55
56         * UIProcess/WebPageProxy.h:
57         * UIProcess/win/WebPageProxyWin.cpp:
58         (WebKit::WebPageProxy::viewWidget):
59
60 2019-06-20  Megan Gardner  <megan_gardner@apple.com>
61
62         Remove change that was causing hangs
63         https://bugs.webkit.org/show_bug.cgi?id=199055
64         <rdar://problem/51820516>
65
66         Reviewed by Darin Adler.
67
68         This fix can sometimes cause deadlocks in the UIProcess.
69         We have a different fix that will go into UIKit <rdar://problem/51927701>.
70
71         * UIProcess/ios/WKContentViewInteraction.mm:
72         (-[WKContentView _selectionChanged]):
73
74 2019-06-20  Daniel Bates  <dabates@apple.com>
75
76         [iOS] Evernote crashes when creating a note
77         https://bugs.webkit.org/show_bug.cgi?id=199083
78         <rdar://problem/51759247>
79
80         Reviewed by Brent Fulgham.
81
82         Add a hack just for Evernote linked before iOS 13 that dynamically adds a placeholder -[WKContentView keyCommands]
83         method (it just calls super). Evernote swizzles the IPI -[WKContentView keyCommands], but this
84         method may not always be present in the WebKit binary following r240514. So, Evernote may end
85         up swizzling -[UIResponder keyCommands], but their implementation doesn't account for this
86         scenario and they end up crashing because they call an unrecognized selector.
87
88         * UIProcess/Cocoa/VersionChecks.h: Add version check.
89         * UIProcess/ios/WKContentView.mm:
90         (keyCommandsPlaceholderHackForEvernote): Added.
91         (-[WKContentView _commonInitializationWithProcessPool:configuration:]): Install the hack.
92
93 2019-06-20  Brady Eidson  <beidson@apple.com>
94
95         WebURLSchemeHandlerProxy::loadSynchronously crash with sync request.
96         <rdar://problem/51862206> and https://bugs.webkit.org/show_bug.cgi?id=199063
97
98         Reviewed by Geoffrey Garen.
99
100         Don't use a DataReference for the sync reply type.
101
102         * UIProcess/WebPageProxy.messages.in:
103         * UIProcess/WebURLSchemeHandler.h:
104
105         * UIProcess/WebURLSchemeTask.cpp:
106         (WebKit::WebURLSchemeTask::didComplete):
107         * UIProcess/WebURLSchemeTask.h:
108
109         * WebProcess/WebPage/WebURLSchemeHandlerProxy.cpp:
110         (WebKit::WebURLSchemeHandlerProxy::loadSynchronously):
111
112 2019-06-20  Alex Christensen  <achristensen@webkit.org>
113
114         Add unit test for UIContextMenuConfiguration API
115         https://bugs.webkit.org/show_bug.cgi?id=199043
116
117         Reviewed by Wenson Hsieh.
118
119         * UIProcess/API/APIPageConfiguration.cpp:
120         (API::PageConfiguration::copy const):
121         * UIProcess/API/APIPageConfiguration.h:
122         (API::PageConfiguration::clickInteractionDriverForTesting const):
123         (API::PageConfiguration::setClickInteractionDriverForTesting):
124         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
125         (-[WKWebViewConfiguration _setClickInteractionDriverForTesting:]):
126         (-[WKWebViewConfiguration _clickInteractionDriverForTesting]):
127         * UIProcess/ios/WKContentViewInteraction.mm:
128         (-[WKContentView _registerPreview]):
129
130 2019-06-20  Alexander Mikhaylenko  <exalm7659@gmail.com>
131
132         [GTK] Enable navigation swipe layout tests
133         https://bugs.webkit.org/show_bug.cgi?id=198995
134
135         Reviewed by Michael Catanzaro.
136
137         Implement API for enabling and controlling swipes from WebKitTestRunner.
138
139         Implement beginSimulatedSwipeInDirectionForTesting() and completeSimulatedSwipeInDirectionForTesting()
140         in ViewGestureController for controlling the test swipes. Add functions in WebKitWebViewBase for calling
141         them.
142
143         Simulate the gesture by generating two scroll events: one to begin the gesture and one to complete it.
144
145         Since there's no reliable way to set source device type of the generated events to touchpad, don't check
146         source device type for simulated swipes.
147
148         * UIProcess/API/C/gtk/WKView.cpp:
149         (WKViewSetEnableBackForwardNavigationGesture): Added.
150         (WKViewBeginBackSwipeForTesting): Added.
151         (WKViewCompleteBackSwipeForTesting): Added.
152         * UIProcess/API/C/gtk/WKViewPrivate.h:
153         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
154         (webkitWebViewBaseBeginBackSwipeForTesting): Added.
155         (webkitWebViewBaseCompleteBackSwipeForTesting): Added.
156         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
157         * UIProcess/ViewGestureController.h:
158         * UIProcess/gtk/ViewGestureControllerGtk.cpp:
159         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanInfluenceSwipe):
160         Skip source device type check for simulated swipes. Also, remove an incorrect FIXME.
161         (WebKit::createScrollEvent): Added.
162         (WebKit::ViewGestureController::beginSimulatedSwipeInDirectionForTesting): Implemented.
163         (WebKit::ViewGestureController::completeSimulatedSwipeInDirectionForTesting): Implemented.
164
165 2019-06-20  Charlie Turner  <cturner@igalia.com>
166
167         [GTK] Make startup pause available in DEVELOPER_MODE rather than DEBUG.
168         https://bugs.webkit.org/show_bug.cgi?id=199069
169
170         Reviewed by Michael Catanzaro.
171
172         * WebProcess/gtk/WebProcessMainGtk.cpp: Allow developers to pause
173         the web process in DEVELOPER_MODE rather than only DEBUG, matching
174         the WPE behaviour and also the purpose of DEVELOPER_MODE.
175
176 2019-06-20  Alexander Mikhaylenko  <exalm7659@gmail.com>
177
178         [GTK] The Previous/Next gesture should handle RTL
179         https://bugs.webkit.org/show_bug.cgi?id=198707
180
181         Reviewed by Michael Catanzaro.
182
183         The gesture uses PageClientImpl::userInterfaceLayoutDirection() to determine the text
184         direction. Implement that method, then adjust drawing so that the pages move from/to
185         the left instead of right side for RTL locales.
186
187         * UIProcess/API/gtk/PageClientImpl.cpp:
188         (WebKit::): Implemented.
189         * UIProcess/API/gtk/PageClientImpl.h:
190         * UIProcess/gtk/ViewGestureControllerGtk.cpp:
191         (WebKit::ViewGestureController::draw):
192
193 2019-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>
194
195         [GTK] Remove support for GTK2 plugins
196         https://bugs.webkit.org/show_bug.cgi?id=199065
197
198         Reviewed by Sergio Villar Senin.
199
200         * PlatformGTK.cmake:
201         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
202         (WebKit::moduleMixesGtkSymbols):
203         * Shared/Plugins/Netscape/unix/NetscapePluginModuleUnix.cpp:
204         (WebKit::NetscapePluginModule::getPluginInfo):
205         * Shared/Plugins/PluginModuleInfo.h:
206         * Shared/gtk/WebEventFactory.cpp:
207         (WebKit::isGdkKeyCodeFromKeyPad):
208         (WebKit::buttonForEvent):
209         (WebKit::WebEventFactory::createWebMouseEvent):
210         (WebKit::WebEventFactory::createWebWheelEvent):
211         (WebKit::WebEventFactory::createWebKeyboardEvent):
212         (WebKit::WebEventFactory::createWebTouchEvent):
213         * SourcesGTK.txt:
214         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
215         * UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:
216         (WebKit::ProcessLauncher::launchProcess):
217         * UIProcess/Plugins/PluginProcessProxy.h:
218         * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
219         (WebKit::PluginInfoCache::getPluginInfo):
220         (WebKit::PluginInfoCache::updatePluginInfo):
221         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
222         (WebKit::PluginInfoStore::getPluginInfo):
223         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
224         (WebKit::PluginProcessProxy::platformGetLaunchOptionsWithAttributes):
225         (WebKit::PluginProcessProxy::scanPlugin):
226         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
227
228 2019-06-19  Dean Jackson  <dino@apple.com>
229
230         No menu pop-up when long pressing on a link in Firefox app
231         https://bugs.webkit.org/show_bug.cgi?id=199045
232         <rdar://problem/51422407>
233
234         Reviewed by Tim Horton.
235
236         Add a version check for linking on-or-after iOS 13. When
237         that isn't true, we don't use UIContextMenuInteraction
238         and instead fall back on the legacy UIPreviewItem API.
239
240         * UIProcess/Cocoa/VersionChecks.h: Add FirstThatHasUIContextMenuInteraction.
241         * UIProcess/ios/WKContentViewInteraction.h: 
242         * UIProcess/ios/WKContentViewInteraction.mm:
243         (-[WKContentView _shouldUseContextMenus]): New method to decide if we should
244         use context menus or preview items.
245         (-[WKContentView setupInteraction]): Make the decision at runtime rather than
246         compile time.
247         (-[WKContentView _contentsOfUserInterfaceItem:]): Ditto.
248         (-[WKContentView _registerPreview]): Ditto.
249         (-[WKContentView _unregisterPreview]): Ditto.
250
251 2019-06-19  Andy Estes  <aestes@apple.com>
252
253         [iOS] Fall back to taking a UIView snapshohot for UITargetedPreviews if InteractionInformationAtPosition does not have an image
254         https://bugs.webkit.org/show_bug.cgi?id=199038
255         <rdar://problem/50555810>
256
257         Reviewed by Tim Horton.
258
259         In -contextMenuInteraction:previewForHighlightingMenuWithConfiguration: and friend, we
260         should always return a non-nil UITargetedPreview. When we do return nil, UIKit uses the web
261         view itself as the snapshot view, creating an unsightly animation.
262
263         For cases where we fail to create a UITargetedPreview from the information in
264         InteractionInformationAtPosition, this patch falls back to creating a UITargetedPreview with
265         a snapshot view obtained from
266         -[UIView resizableSnapshotViewFromRect:afterScreenUpdates:withCapInsets:].
267
268         Also renamed -targetedPreview to -_ensureTargetedPreview and cached the UITargetedPreview
269         for reuse in -contextMenuInteraction:previewForDismissingMenuWithConfiguration:.
270
271         * UIProcess/ios/WKContentViewInteraction.h:
272         * UIProcess/ios/WKContentViewInteraction.mm:
273         (createFallbackTargetedPreview):
274         (-[WKContentView _ensureTargetedPreview]):
275         (-[WKContentView contextMenuInteraction:previewForHighlightingMenuWithConfiguration:]):
276         (-[WKContentView contextMenuInteraction:previewForDismissingMenuWithConfiguration:]):
277         (-[WKContentView contextMenuInteractionDidEnd:]):
278         (-[WKContentView _targetedPreview]): Renamed to _ensureTargetedPreview.
279
280 2019-06-19  Devin Rousso  <drousso@apple.com>
281
282         Web Inspector: Network: replace CFNetwork SPI with new API where able
283         https://bugs.webkit.org/show_bug.cgi?id=198762
284
285         Reviewed by Timothy Hatcher.
286
287         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
288         (-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):
289
290 2019-06-19  Alex Christensen  <achristensen@webkit.org>
291
292         DownloadMonitor::measuredThroughputRate should approach zero with no throughput
293         https://bugs.webkit.org/show_bug.cgi?id=198981
294         <rdar://problem/51456914>
295
296         Reviewed by Geoffrey Garen.
297
298         When the timer fires to approximate the download rate, add a new timestamp with 0 bytes received since the last time we received bytes.
299         Then, if there's only one timestamp, assume the throughput rate is 0 instead of infinite.
300         This will prevent false positives estimating large download rates based on old data when the throughput drops to 0.
301
302         * NetworkProcess/Downloads/DownloadMonitor.cpp:
303         (WebKit::DownloadMonitor::measuredThroughputRate const):
304         (WebKit::DownloadMonitor::timerFired):
305
306 2019-06-19  Sihui Liu  <sihui_liu@apple.com>
307
308         Remove unused originsWithCredentials from WebsiteData
309         https://bugs.webkit.org/show_bug.cgi?id=199020
310
311         Reviewed by Geoffrey Garen.
312
313         * Shared/WebsiteData/WebsiteData.cpp:
314         (WebKit::WebsiteData::encode const):
315         (WebKit::WebsiteData::decode):
316         * Shared/WebsiteData/WebsiteData.h:
317
318 2019-06-19  Sihui Liu  <sihui_liu@apple.com>
319
320         Crash at com.apple.WebKit: WebKit::WebsiteDataStore::processPools const
321         https://bugs.webkit.org/show_bug.cgi?id=198935
322         <rdar://problem/51549308>
323
324         Reviewed by Geoffrey Garen.
325
326         When WebProcessProxy is in WebProcessCache or is pre-warmed, it does not hold a strong reference of 
327         WebProcessPool. In this case, we should not store the raw pointer of WebProcessPool and perform websiteDataStore
328         operations with it.
329         This patch should fix the crash at dereferencing null pointer of WebProcessPool in 
330         WebsiteDataStore::processPools, but it is unclear why websiteDataStore comes to observe cached or prewarmed web 
331         process that should not have web page. The release log may help us find the cause.
332
333         * UIProcess/WebProcessProxy.cpp:
334         (WebKit::WebProcessProxy::processPoolIfExists const):
335         * UIProcess/WebProcessProxy.h:
336         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
337         (WebKit::WebsiteDataStore::processPools const):
338
339 2019-06-19  Alex Christensen  <achristensen@webkit.org>
340
341         Add a unit test for client certificate authentication
342         https://bugs.webkit.org/show_bug.cgi?id=197800
343
344         Reviewed by Youenn Fablet.
345
346         * Shared/cf/ArgumentCodersCF.cpp:
347         Move SPI declarations to SecuritySPI.h.
348
349 2019-06-19  Alex Christensen  <achristensen@webkit.org>
350
351         Update preview API deprecation message.
352         https://bugs.webkit.org/show_bug.cgi?id=198974
353
354         * UIProcess/API/Cocoa/WKUIDelegate.h:
355
356 2019-06-19  Adrian Perez de Castro  <aperez@igalia.com>
357
358         [GTK] Fix compilation errors for the GTK2 plugin process
359         https://bugs.webkit.org/show_bug.cgi?id=199000
360
361         Reviewed by Michael Catanzaro.
362
363         * Shared/gtk/WebEventFactory.cpp: Use the GdkEvent union fields
364         when directly accessing event struct fields.
365         (WebKit::buttonForEvent):
366         (WebKit::WebEventFactory::createWebMouseEvent):
367         (WebKit::WebEventFactory::createWebKeyboardEvent):
368
369 2019-06-19  Adrian Perez de Castro  <aperez@igalia.com>
370
371         [WPE][GTK] Fix build with unified sources disabled
372         https://bugs.webkit.org/show_bug.cgi?id=198752
373
374         Reviewed by Michael Catanzaro.
375
376         * NetworkProcess/NetworkHTTPSUpgradeChecker.cpp:
377         (WebKit::NetworkHTTPSUpgradeChecker::NetworkHTTPSUpgradeChecker): Qualify SQLiteDatabase
378         with its namespace.
379         * UIProcess/WebFrameProxy.h: Replace forward declaration of WebPageProxy with inclusion
380         of WebPageProxy.h to avoid build error due to usage of undefined class. Moved DataCallback
381         definition from WebPageProxy.h to avoid code using the type before its declaration.
382         * UIProcess/WebPageProxy.h: Remove definition of DataCallback.
383         * UIProcess/wpe/WebInspectorProxyWPE.cpp: Add missing forward declaration of
384         WebCore::FloatRect.
385         (WebKit::WebInspectorProxy::platformSetSheetRect): Qualify FloatRect with its namespace.
386         * WebProcess/Automation/WebAutomationSessionProxy.cpp: Qualify all occurrences of
387         PageIdentifier with its namespace.
388         (WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction):
389         (WebKit::WebAutomationSessionProxy::resolveChildFrameWithOrdinal):
390         (WebKit::WebAutomationSessionProxy::resolveChildFrameWithNodeHandle):
391         (WebKit::WebAutomationSessionProxy::resolveChildFrameWithName):
392         (WebKit::WebAutomationSessionProxy::resolveParentFrame):
393         (WebKit::WebAutomationSessionProxy::focusFrame):
394         (WebKit::WebAutomationSessionProxy::computeElementLayout):
395         (WebKit::WebAutomationSessionProxy::selectOptionElement):
396         (WebKit::WebAutomationSessionProxy::takeScreenshot):
397         (WebKit::WebAutomationSessionProxy::getCookiesForFrame):
398         (WebKit::WebAutomationSessionProxy::deleteCookie):
399         * WebProcess/Cache/WebCacheStorageConnection.cpp: Ditto.
400         (WebKit::WebCacheStorageConnection::open):
401         (WebKit::WebCacheStorageConnection::remove):
402         (WebKit::WebCacheStorageConnection::retrieveCaches):
403         (WebKit::WebCacheStorageConnection::retrieveRecords):
404         (WebKit::WebCacheStorageConnection::batchDeleteOperation):
405         (WebKit::WebCacheStorageConnection::batchPutOperation):
406         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: Add missing inclusion of WebPage.h
407         * WebProcess/WebPage/gtk/WebPageGtk.cpp: Add missing inclusion of gtk/gtk.h
408         * WebProcess/WebPage/wpe/WebPageWPE.cpp: Add missing inclusion of WebPageProxy.h
409
410 2019-06-19  Alexander Mikhaylenko  <exalm7659@gmail.com>
411
412         [GTK] Page blinks after navigation swipe if it triggered PSON
413         https://bugs.webkit.org/show_bug.cgi?id=198996
414
415         Reviewed by Michael Catanzaro.
416
417         Disconnect and then reconnect ViewGestureController during process swap
418         instead of destroying and re-creating it.
419
420         * UIProcess/API/gtk/PageClientImpl.cpp:
421         (WebKit::PageClientImpl::PageClientImpl::processWillSwap): Added.
422         (WebKit::PageClientImpl::PageClientImpl::processDidExit): Implemented.
423         * UIProcess/API/gtk/PageClientImpl.h:
424         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
425         (webkitWebViewBaseWillSwapWebProcess): Added.
426         Disconnect ViewGestureController if it exists.
427         (webkitWebViewBaseDidExitWebProcess): Added.
428         Destroy ViewGestureController.
429         (webkitWebViewBaseDidRelaunchWebProcess):
430         Reconnect the ViewGestureController if it exists.
431         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
432
433 2019-06-19  Takashi Komori  <Takashi.Komori@sony.com>
434
435         [Curl] CurlRequestScheduler doesn't terminate worker thread in a certain situation.
436         https://bugs.webkit.org/show_bug.cgi?id=198993
437
438         Cancel CurlRequest before invalidation to remove tasks from CurlRequestScheduler certainly in ~NetworkDataTaskCurl.
439
440         Reviewed by Fujii Hironori.
441
442         * NetworkProcess/curl/NetworkDataTaskCurl.cpp:
443         (WebKit::NetworkDataTaskCurl::~NetworkDataTaskCurl):
444
445 2019-06-19  Zan Dobersek  <zdobersek@igalia.com>
446
447         [Nicosia] Invalidate SceneIntegration in LayerTreeHost::invalidate()
448         https://bugs.webkit.org/show_bug.cgi?id=198992
449
450         Reviewed by Carlos Garcia Campos.
451
452         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:
453         (WebKit::LayerTreeHost::invalidate): Invalidate the
454         Nicosia::SceneIntegration object. This should properly disassociate
455         the now-invalited LayerTreeHost (a SceneIntegration client) from the
456         SceneIntegration object that can still be shared with platform layers
457         originating from this LayerTreeHost.
458
459 2019-06-18  Dean Jackson  <dino@apple.com>
460
461         UIContextMenuInteraction implementation for WKContentView
462         https://bugs.webkit.org/show_bug.cgi?id=198986
463         <rdar://problem/51875189>
464
465         Reviewed by Andy Estes.
466
467         Implement UIContextMenuInteraction and its delegate as a
468         replacement for UIPreviewItemController in iOS 13.
469
470         In order to preserve existing behaviour as much as possible,
471         we check for the implementation of new WebKit API to configure
472         the menu. If that is not present, we attempt to convert
473         the results of the existing WebKit WKPreviewAction delegates
474         into something that works with UIContextMenus.
475
476         * UIProcess/ios/WKContentViewInteraction.h:
477         * UIProcess/ios/WKContentViewInteraction.mm:
478         (-[WKContentView setupInteraction]):
479         (-[WKContentView _contentsOfUserInterfaceItem:]):
480         (-[WKContentView _registerPreview]):
481         (-[WKContentView _unregisterPreview]):
482         (-[WKContentView _showLinkPreviewsPreferenceChanged:]):
483         (needsDeprecatedPreviewAPI):
484         (uiActionForPreviewAction):
485         (menuFromPreviewOrDefaults):
486         (titleForMenu):
487         (-[WKContentView assignLegacyDataForContextMenuInteraction]):
488         (-[WKContentView contextMenuInteraction:configurationForMenuAtLocation:]):
489         (-[WKContentView _contextMenuInteraction:configurationForMenuAtLocation:completion:]):
490         (-[WKContentView continueContextMenuInteraction:]):
491         (uiImageForImage):
492         (createTargetedPreview):
493         (-[WKContentView _targetedPreview]):
494         (-[WKContentView contextMenuInteraction:previewForHighlightingMenuWithConfiguration:]):
495         (-[WKContentView contextMenuInteractionWillPresent:]):
496         (-[WKContentView contextMenuInteraction:previewForDismissingMenuWithConfiguration:]):
497         (-[WKContentView contextMenuInteraction:willCommitWithAnimator:]):
498         (-[WKContentView contextMenuInteractionDidEnd:]):
499         (-[WKContentView shouldUsePreviewForLongPress]): Deleted.
500
501 2019-06-18  Ryan Haddad  <ryanhaddad@apple.com>
502
503         Unreviewed, rolling out r246575.
504
505         Breaks internal builds.
506
507         Reverted changeset:
508
509         "Update WebKit API to separately retrieve actions and use
510         context menus"
511         https://bugs.webkit.org/show_bug.cgi?id=198974
512         https://trac.webkit.org/changeset/246575
513
514 2019-06-18  Alex Christensen  <achristensen@webkit.org>
515
516         Update WebKit API to separately retrieve actions and use context menus
517         https://bugs.webkit.org/show_bug.cgi?id=198974
518         <rdar://problem/50735687>
519
520         Reviewed by Tim Horton.
521
522         Update API and SPI, and add infrastructure for asynchronously requesting interaction information.
523
524         * UIProcess/API/Cocoa/WKUIDelegate.h:
525         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
526
527 2019-06-18  Daniel Bates  <dabates@apple.com>
528
529         REGRESSION (r240757): Cannot dismiss the keyboard on http://apple.com/apple-tv-plus
530         https://bugs.webkit.org/show_bug.cgi?id=198922
531         <rdar://problem/50300056>
532
533         Reviewed by Wenson Hsieh.
534
535         Actually dismiss the keyboard as intended in r240757. Do not wait for the round-trip
536         to the WebProcess to run through the -elementDidBlur steps in the UIProcess and hide
537         the keyboard when a person explicitly dismisses the keyboard via the Done button (iPhone)
538         or hide keyboard button (iPad).
539
540         Note that r240757 revealed another bug in this code, <https://bugs.webkit.org/show_bug.cgi?id=198928>.
541         I am unclear of the implications of that bug, but it is clear for this bug that it
542         never makes sense to round-trip to the WebProcess when the keyboard is dismissed by
543         a user gesture.
544
545         * UIProcess/ios/WKContentViewInteraction.mm:
546         (-[WKContentView endEditingAndUpdateFocusAppearanceWithReason:]): Invoke -_elementDidBlur
547         to blur the element in the UIProcess and hide the keyboard.
548         (-[WKContentView _elementDidBlur]): Prevent duplicate invocations of -didEndFormControlInteraction
549         and setIsShowingInputViewForFocusedElement messages by only doing these actions when
550         editablity changes. This covers the case where -_elementDidBlur may be invoked a second
551         time (the reply in the round-trip). In that case we don't need to do these actions.
552
553 2019-06-18  Alex Christensen  <achristensen@webkit.org>
554
555         NetworkSession::networkStorageSession can return null
556         https://bugs.webkit.org/show_bug.cgi?id=198947
557         <rdar://problem/51394449>
558
559         Reviewed by Youenn Fablet.
560
561         We are seeing evidence of crashes from the map owning NetworkSessions and the map owning NetworkStorageSessions becoming out of sync
562         because NetworkSession is refcounted but NetworkStorageSession is not.  I started the complete fix in https://bugs.webkit.org/show_bug.cgi?id=194926
563         but for now let's add less risky null checks to prevent fallout.
564
565         * NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:
566         (WebKit::ResourceLoadStatisticsStore::updateClientSideCookiesAgeCap):
567         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
568         (WebKit::WebResourceLoadStatisticsStore::hasStorageAccessForFrame):
569         (WebKit::WebResourceLoadStatisticsStore::callHasStorageAccessForFrameHandler):
570         (WebKit::WebResourceLoadStatisticsStore::grantStorageAccess):
571         (WebKit::WebResourceLoadStatisticsStore::removeAllStorageAccess):
572         (WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCap):
573         (WebKit::WebResourceLoadStatisticsStore::callUpdatePrevalentDomainsToBlockCookiesForHandler):
574         (WebKit::WebResourceLoadStatisticsStore::removePrevalentDomains):
575         * NetworkProcess/NetworkProcess.cpp:
576         (WebKit::NetworkProcess::initializeNetworkProcess):
577         * NetworkProcess/NetworkSession.cpp:
578         (WebKit::NetworkSession::networkStorageSession const):
579         * NetworkProcess/NetworkSession.h:
580         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
581         (WebKit::NetworkDataTaskCocoa::applyCookieBlockingPolicy):
582         (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
583         (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
584         (WebKit::NetworkDataTaskCocoa::tryPasswordBasedAuthentication):
585
586 2019-06-18  Brady Eidson  <beidson@apple.com>
587
588         Handle NSProgress calling our cancellation handler on background threads (and calling it more than once).
589         <rdar://problem/51392926> and https://bugs.webkit.org/show_bug.cgi?id=198945
590
591         Reviewed by Alex Christensen.
592
593         If you have a download in progress and quickly tap the button to cancel it multiple times, then:
594             - NSProgress calls our cancellation handler on a non-main thread, which we can't handle.
595             - They do it more than once, which is also bad.
596             - They might even do it multiple times concurrently (on different background dispatch queues)
597         
598         Let's work around these.
599
600         * NetworkProcess/Downloads/Download.cpp:
601         (WebKit::Download::cancel): Double check we're on the main thread, and handle being called twice.
602
603         * NetworkProcess/Downloads/cocoa/WKDownloadProgress.mm:
604         (-[WKDownloadProgress performCancel]): Actually cancel the WebKit::Download if we still have one.
605         (-[WKDownloadProgress progressCancelled]): Called when NSProgress calls the cancellation handler, no matter
606           which thread it does it on. By leveraging std::call_once we handle multiple calls as well as being called
607           concurrently from different threads. call_once punts the *actual* cancel operation off to the main thread.
608         (-[WKDownloadProgress initWithDownloadTask:download:URL:sandboxExtension:]): The cancellation handler is
609           now simply calling 'progressCancelled' on self, assuming the weak pointer for self is still valid.
610
611 2019-06-18  Daniel Bates  <dabates@apple.com>
612
613         [iOS] Pressing key while holding Command should not insert character
614         https://bugs.webkit.org/show_bug.cgi?id=198925
615         <rdar://problem/51778811>
616
617         Reviewed by Brent Fulgham.
618
619         Do not insert a character for an unhandled key command that has a Command modifier.
620         For example, pressing Command + Shift + v, which is an unhandled key command (at the
621         time of writing) should not insert v. This matches iOS and Mac platform conventions.
622
623         * UIProcess/ios/WKContentViewInteraction.mm:
624         (-[WKContentView _interpretKeyEvent:isCharEvent:]):
625
626 2019-06-18  John Wilander  <wilander@apple.com>
627
628         Change log channel name from ResourceLoadStatisticsDebug to ITPDebug and remove unnecessary #if !RELEASE_LOG_DISABLED
629         https://bugs.webkit.org/show_bug.cgi?id=198970
630         <rdar://problem/51855836>
631
632         Reviewed by Brent Fulgham.
633
634         * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
635         (WebKit::ResourceLoadStatisticsDatabaseStore::requestStorageAccess):
636         (WebKit::ResourceLoadStatisticsDatabaseStore::requestStorageAccessUnderOpener):
637         (WebKit::ResourceLoadStatisticsDatabaseStore::ensurePrevalentResourcesForDebugMode):
638         (WebKit::ResourceLoadStatisticsDatabaseStore::updateCookieBlocking):
639         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
640         (WebKit::ResourceLoadStatisticsMemoryStore::requestStorageAccess):
641         (WebKit::ResourceLoadStatisticsMemoryStore::requestStorageAccessUnderOpener):
642         (WebKit::ResourceLoadStatisticsMemoryStore::ensurePrevalentResourcesForDebugMode):
643         (WebKit::ResourceLoadStatisticsMemoryStore::updateCookieBlocking):
644         * NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:
645         (WebKit::domainsToString):
646         (WebKit::ResourceLoadStatisticsStore::removeDataRecords):
647         (WebKit::ResourceLoadStatisticsStore::setResourceLoadStatisticsDebugMode):
648         (WebKit::ResourceLoadStatisticsStore::debugLogDomainsInBatches):
649         * Platform/Logging.h:
650
651 2019-06-18  Youenn Fablet  <youenn@apple.com>
652
653         StorageManager::removeAllowedSessionStorageNamespaceConnection should make sure its storageNamespaceID is valid
654         https://bugs.webkit.org/show_bug.cgi?id=198966
655         rdar://problem/51352080
656
657         Reviewed by Alex Christensen.
658
659         Make sure the namespace ID is a key of the map before using the value.
660         The namespace ID is coming straight from IPC so should not be trusted.
661         Also, namespace IDs are added/removed based on web pages being created/deleted.
662         Namespace IDs are supposed to be scoped by session IDs.
663         Using page IDs for namespace IDs works as long as the page does not change of session ID during its lifetime, which is not guaranteed.
664
665         * NetworkProcess/WebStorage/StorageManager.cpp:
666         (WebKit::StorageManager::removeAllowedSessionStorageNamespaceConnection):
667
668 2019-06-18  David Quesada  <david_quesada@apple.com>
669
670         Network process crash in SandboxExtension::consume() via Download::publishProgress
671         https://bugs.webkit.org/show_bug.cgi?id=198968
672         rdar://problem/51732997
673
674         Reviewed by Alex Christensen.
675
676         Add an early return if the network process fails to resolve a sandbox extension handle for publishing
677         progress on a download. Creating the NSProgress doesn't do much since the progress reporting service
678         won't honor the attempt to publish progress on a URL the process does not have access to, and nothing
679         else in the Network process makes any use of the progress.
680
681         * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
682         (WebKit::Download::publishProgress):
683
684 2019-06-18  Adrian Perez de Castro  <aperez@igalia.com>
685
686         Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.25.1 release
687
688         * wpe/NEWS: Add release notes for 2.25.1
689
690 2019-06-18  Tim Horton  <timothy_horton@apple.com>
691
692         Expose DataDetectors context generation on WKContentViewInteraction
693         https://bugs.webkit.org/show_bug.cgi?id=198950
694         <rdar://problem/51116021>
695
696         Reviewed by Andy Estes.
697
698         * UIProcess/ios/WKActionSheetAssistant.h:
699         * UIProcess/ios/WKActionSheetAssistant.mm:
700         (-[WKActionSheetAssistant currentPositionInformation]):
701         (-[WKActionSheetAssistant showDataDetectorsSheet]):
702         * UIProcess/ios/WKContentViewInteraction.h:
703         * UIProcess/ios/WKContentViewInteraction.mm:
704         (-[WKContentView dataDetectionContextForPositionInformation:]):
705         (-[WKContentView dataDetectionContextForActionSheetAssistant:]):
706         For use by other clients, add -dataDetectionContextForPositionInformation:
707         and make -dataDetectionContextForActionSheetAssistant: use it.
708         Also, pull the code to augment the context with surrounding text out of
709         from WKActionSheetAssistant.
710
711 2019-06-18  Adrian Perez de Castro  <aperez@igalia.com>
712
713         [WPE] Fix building the documentation
714
715         Unreviewed.
716
717         * UIProcess/API/wpe/docs/wpe-docs.sgml: Fix typo "2.62" -> "2.26"
718
719 2019-06-18  Truitt Savell  <tsavell@apple.com>
720
721         Unreviewed, rolling out r246531.
722
723         Broke internal builds.
724
725         Reverted changeset:
726
727         "Expose DataDetectors context generation on
728         WKContentViewInteraction"
729         https://bugs.webkit.org/show_bug.cgi?id=198950
730         https://trac.webkit.org/changeset/246531
731
732 2019-06-18  Simon Fraser  <simon.fraser@apple.com>
733
734         Convert macOS to scroll by changing layer boundsOrigin
735         https://bugs.webkit.org/show_bug.cgi?id=198917
736
737         Reviewed by Antti Koivisto.
738
739         Remove unreached and confusing code.
740
741         * UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm:
742         (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::repositionScrollingLayers):
743
744 2019-06-18  Dean Jackson  <dino@apple.com>
745
746         Attachment elements are missing context menu previews
747         https://bugs.webkit.org/show_bug.cgi?id=198946
748
749         Reviewed by Tim Horton.
750
751         When requesting position information on an <attachment> element,
752         we were not providing a snapshot image.
753
754         * WebProcess/WebPage/WebPage.h: New common method to take a snapshot.
755         * WebProcess/WebPage/ios/WebPageIOS.mm:
756         (WebKit::WebPage::shareableBitmapSnapshotForNode): New helper.
757         (WebKit::WebPage::positionInformation): If the element is an attachment,
758         then ask for a snapshot.
759
760 2019-06-17  Tim Horton  <timothy_horton@apple.com>
761
762         Expose DataDetectors context generation on WKContentViewInteraction
763         https://bugs.webkit.org/show_bug.cgi?id=198950
764         <rdar://problem/51116021>
765
766         Reviewed by Andy Estes.
767
768         * UIProcess/ios/WKActionSheetAssistant.h:
769         * UIProcess/ios/WKActionSheetAssistant.mm:
770         (-[WKActionSheetAssistant currentPositionInformation]):
771         (-[WKActionSheetAssistant showDataDetectorsSheet]):
772         * UIProcess/ios/WKContentViewInteraction.h:
773         * UIProcess/ios/WKContentViewInteraction.mm:
774         (-[WKContentView dataDetectionContextForPositionInformation:]):
775         (-[WKContentView dataDetectionContextForActionSheetAssistant:]):
776         For use by other clients, add -dataDetectionContextForPositionInformation:
777         and make -dataDetectionContextForActionSheetAssistant: use it.
778         Also, pull the code to augment the context with surrounding text out of
779         from WKActionSheetAssistant.
780
781 2019-06-17  Sihui Liu  <sihui_liu@apple.com>
782
783         -[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:] doesn't delete _WKWebsiteDataTypeCredentials
784         https://bugs.webkit.org/show_bug.cgi?id=198854
785         <rdar://problem/51386058>
786
787         Reviewed by Geoffrey Garen.
788
789         Clear persistent credentials in deleteWebsiteData of network process.
790
791         Also, merge originsWithPersistentCredentials and removeCredentialsWithOrigins into fetchWebsiteData and
792         deleteWebsiteData, and move credentials handling to WebCore.
793
794         * NetworkProcess/NetworkProcess.cpp:
795         (WebKit::NetworkProcess::fetchWebsiteData):
796         (WebKit::NetworkProcess::deleteWebsiteData):
797         (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
798         (WebKit::NetworkProcess::originsWithPersistentCredentials): Deleted.
799         (WebKit::NetworkProcess::removeCredentialsWithOrigins): Deleted.
800         * NetworkProcess/NetworkProcess.h:
801         * NetworkProcess/NetworkProcess.messages.in:
802         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
803         (WebKit::NetworkProcess::originsWithPersistentCredentials): Deleted.
804         (WebKit::NetworkProcess::removeCredentialsWithOrigins): Deleted.
805         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
806         (WebKit::WebsiteDataStore::fetchDataAndApply):
807         (WebKit::computeWebProcessAccessTypeForDataRemoval):
808         (WebKit::WebsiteDataStore::removeData):
809
810 2019-06-17  Tim Horton  <timothy_horton@apple.com>
811
812         Fix the build with case-sensitive includes
813         <rdar://problem/51828273>
814
815         * UIProcess/API/Cocoa/WKContentRuleListStore.mm:
816         FileSystem, not Filesystem.
817
818 2019-06-17  Jiewen Tan  <jiewen_tan@apple.com>
819
820         Unreviewed, build fix after r246514
821
822         * UIProcess/Cocoa/SOAuthorization/SOAuthorizationNSURLExtras.h:
823         * UIProcess/Cocoa/SOAuthorization/SOAuthorizationNSURLExtras.mm:
824         (+[NSURL _web_canPerformAuthorizationWithURL:]):
825         Expose the above method as a SPI for Safari.
826         * WebKit.xcodeproj/project.pbxproj:
827
828 2019-06-17  Alex Christensen  <achristensen@webkit.org>
829
830         Protect StorageManager::m_localStorageNamespaces with a Lock
831         https://bugs.webkit.org/show_bug.cgi?id=198939
832         <rdar://problem/51784225>
833
834         Reviewed by Geoff Garen.
835
836         StorageManager::LocalStorageNamespace::didDestroyStorageArea is called from StorageArea::~StorageArea which is called on the main thread.
837         All other access of m_localStorageNamespaces is from the non-main thread.  Sometimes this causes hash table corruption, so wait for a mutex
838         before accessing this member variable.
839
840         * NetworkProcess/WebStorage/StorageManager.cpp:
841         (WebKit::StorageManager::LocalStorageNamespace::didDestroyStorageArea):
842         (WebKit::StorageManager::cloneSessionStorageNamespace):
843         (WebKit::StorageManager::getLocalStorageOrigins):
844         (WebKit::StorageManager::deleteLocalStorageEntriesForOrigin):
845         (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
846         (WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
847         (WebKit::StorageManager::getOrCreateLocalStorageNamespace):
848         * NetworkProcess/WebStorage/StorageManager.h:
849
850 2019-06-17  Alex Christensen  <achristensen@webkit.org>
851
852         Add null check in WebFrameLoaderClient::assignIdentifierToInitialRequest
853         https://bugs.webkit.org/show_bug.cgi?id=198926
854         <rdar://problem/50079713>
855
856         Reviewed by Brady Eidson.
857
858         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
859         (WebKit::WebFrameLoaderClient::assignIdentifierToInitialRequest):
860         WebKitLegacy's version already checks null for the corresponding call.
861
862 2019-06-17  Alex Christensen  <achristensen@webkit.org>
863
864         Fix internal build after r246514
865         https://bugs.webkit.org/show_bug.cgi?id=198874
866
867         * UIProcess/API/APINavigationAction.h:
868         A problematic reference to APINavigationActionAdditions.h was left.
869         Its contents had been sprinkled into the correct places, though.
870
871 2019-06-17  Jiewen Tan  <jiewen_tan@apple.com>
872
873         Move SOAuthorization from WebKitAdditions to WebKit
874         https://bugs.webkit.org/show_bug.cgi?id=198874
875         <rdar://problem/47573431>
876
877         Reviewed by Brent Fulgham.
878
879         This patch basically moves everything from existing WebKitAdditions to WebKit.
880         It also replaces the LoadOptimizer nonsense with the actual SOAuthorization API.
881
882         * Configurations/WebKit.xcconfig:
883         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
884         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
885         * PluginProcess/mac/PluginProcessMac.mm:
886         (WebKit::PluginProcess::platformInitializePluginProcess):
887         * SourcesCocoa.txt:
888         * UIProcess/API/APINavigationAction.h:
889         * UIProcess/Cocoa/NavigationState.mm:
890         (WebKit::trySOAuthorization):
891         (WebKit::tryInterceptNavigation):
892         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
893         (WebKit::tryOptimizingLoad): Deleted.
894         * UIProcess/Cocoa/SOAuthorization/NavigationSOAuthorizationSession.h: Added.
895         (WebKit::NavigationSOAuthorizationSession::callback):
896         * UIProcess/Cocoa/SOAuthorization/NavigationSOAuthorizationSession.mm: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/TestLoadOptimizer.mm.
897         (WebKit::NavigationSOAuthorizationSession::NavigationSOAuthorizationSession):
898         (WebKit::NavigationSOAuthorizationSession::~NavigationSOAuthorizationSession):
899         (WebKit::NavigationSOAuthorizationSession::shouldStartInternal):
900         (WebKit::NavigationSOAuthorizationSession::webViewDidMoveToWindow):
901         * UIProcess/Cocoa/SOAuthorization/PopUpSOAuthorizationSession.h: Added.
902         * UIProcess/Cocoa/SOAuthorization/PopUpSOAuthorizationSession.mm: Added.
903         (-[WKSOSecretDelegate initWithSession:]):
904         (-[WKSOSecretDelegate webViewDidClose:]):
905         (-[WKSOSecretDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
906         (-[WKSOSecretDelegate webView:didFinishNavigation:]):
907         (WebKit::PopUpSOAuthorizationSession::PopUpSOAuthorizationSession):
908         (WebKit::PopUpSOAuthorizationSession::~PopUpSOAuthorizationSession):
909         (WebKit::PopUpSOAuthorizationSession::shouldStartInternal):
910         (WebKit::PopUpSOAuthorizationSession::fallBackToWebPathInternal):
911         (WebKit::PopUpSOAuthorizationSession::abortInternal):
912         (WebKit::PopUpSOAuthorizationSession::completeInternal):
913         (WebKit::PopUpSOAuthorizationSession::close):
914         (WebKit::PopUpSOAuthorizationSession::initSecretWebView):
915         * UIProcess/Cocoa/SOAuthorization/RedirectSOAuthorizationSession.h: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/TestLoadOptimizer.mm.
916         * UIProcess/Cocoa/SOAuthorization/RedirectSOAuthorizationSession.mm: Added.
917         (WebKit::RedirectSOAuthorizationSession::RedirectSOAuthorizationSession):
918         (WebKit::RedirectSOAuthorizationSession::fallBackToWebPathInternal):
919         (WebKit::RedirectSOAuthorizationSession::abortInternal):
920         (WebKit::RedirectSOAuthorizationSession::completeInternal):
921         (WebKit::RedirectSOAuthorizationSession::beforeStart):
922         * UIProcess/Cocoa/SOAuthorization/SOAuthorizationCoordinator.h: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/TestLoadOptimizer.mm.
923         * UIProcess/Cocoa/SOAuthorization/SOAuthorizationCoordinator.mm: Added.
924         (WebKit::SOAuthorizationCoordinator::SOAuthorizationCoordinator):
925         (WebKit::SOAuthorizationCoordinator::canAuthorize const):
926         (WebKit::SOAuthorizationCoordinator::tryAuthorize):
927         * UIProcess/Cocoa/SOAuthorization/SOAuthorizationNSURLExtras.h: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/TestLoadOptimizer.mm.
928         * UIProcess/Cocoa/SOAuthorization/SOAuthorizationNSURLExtras.mm: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/TestLoadOptimizer.mm.
929         (+[NSURL _web_canPerformAuthorizationWithURL:]):
930         * UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.h: Added.
931         (WebKit::SOAuthorizationSession::page const):
932         (WebKit::SOAuthorizationSession::state const):
933         (WebKit::SOAuthorizationSession::setState):
934         (WebKit::SOAuthorizationSession::navigationAction):
935         * UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.mm: Added.
936         (WebKit::SOAuthorizationSession::SOAuthorizationSession):
937         (WebKit::SOAuthorizationSession::~SOAuthorizationSession):
938         (WebKit::SOAuthorizationSession::releaseNavigationAction):
939         (WebKit::SOAuthorizationSession::becomeCompleted):
940         (WebKit::SOAuthorizationSession::shouldStart):
941         (WebKit::SOAuthorizationSession::start):
942         (WebKit::SOAuthorizationSession::fallBackToWebPath):
943         (WebKit::SOAuthorizationSession::abort):
944         (WebKit::SOAuthorizationSession::complete):
945         (WebKit::SOAuthorizationSession::presentViewController):
946         (WebKit::SOAuthorizationSession::dismissViewController):
947         * UIProcess/Cocoa/SOAuthorization/SubFrameSOAuthorizationSession.h: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/TestLoadOptimizer.mm.
948         * UIProcess/Cocoa/SOAuthorization/SubFrameSOAuthorizationSession.mm: Added.
949         (WebKit::SubFrameSOAuthorizationSession::SubFrameSOAuthorizationSession):
950         (WebKit::SubFrameSOAuthorizationSession::fallBackToWebPathInternal):
951         (WebKit::SubFrameSOAuthorizationSession::abortInternal):
952         (WebKit::SubFrameSOAuthorizationSession::completeInternal):
953         (WebKit::SubFrameSOAuthorizationSession::beforeStart):
954         (WebKit::SubFrameSOAuthorizationSession::loadDataToFrame):
955         (WebKit::SubFrameSOAuthorizationSession::postDidCancelMessageToParent):
956         * UIProcess/Cocoa/SOAuthorization/WKSOAuthorizationDelegate.h: Renamed from Tools/TestWebKitAPI/Tests/WebKitCocoa/TestLoadOptimizer.mm.
957         * UIProcess/Cocoa/SOAuthorization/WKSOAuthorizationDelegate.mm: Added.
958         (-[WKSOAuthorizationDelegate authorization:presentViewController:withCompletion:]):
959         (-[WKSOAuthorizationDelegate authorizationDidNotHandle:]):
960         (-[WKSOAuthorizationDelegate authorizationDidCancel:]):
961         (-[WKSOAuthorizationDelegate authorizationDidComplete:]):
962         (-[WKSOAuthorizationDelegate authorization:didCompleteWithHTTPAuthorizationHeaders:]):
963         (-[WKSOAuthorizationDelegate authorization:didCompleteWithHTTPResponse:httpBody:]):
964         (-[WKSOAuthorizationDelegate authorization:didCompleteWithError:]):
965         (-[WKSOAuthorizationDelegate setSession:]):
966         * UIProcess/WebPageProxy.cpp:
967         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
968         (WebKit::trySOAuthorization):
969         (WebKit::WebPageProxy::createNewPage):
970         (WebKit::tryOptimizingLoad): Deleted.
971         * UIProcess/WebPageProxy.h:
972         (WebKit::WebPageProxy::setShouldSuppressSOAuthorizationInAllNavigationPolicyDecision):
973         (WebKit::WebPageProxy::setShouldSuppressSOAuthorizationInNextNavigationPolicyDecision):
974         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
975         (WebKit::WebsiteDataStore::WebsiteDataStore):
976         * UIProcess/WebsiteData/WebsiteDataStore.h:
977         (WebKit::WebsiteDataStore::soAuthorizationCoordinator):
978         * WebKit.xcodeproj/project.pbxproj:
979         * WebProcess/cocoa/WebProcessCocoa.mm:
980         (WebKit::WebProcess::platformInitializeProcess):
981
982 2019-06-17  Tim Horton  <timothy_horton@apple.com>
983
984         Fix the build.
985
986         * UIProcess/Gamepad/ios/UIGamepadProviderIOS.mm:
987         (WebKit::UIGamepadProvider::platformWebPageProxyForGamepadInput):
988         * UIProcess/_WKTouchEventGenerator.mm:
989         (-[_WKTouchEventGenerator _sendHIDEvent:]):
990         (-[_WKTouchEventGenerator _sendMarkerHIDEventWithCompletionBlock:]):
991
992 2019-06-17  Dan Bernstein  <mitz@apple.com>
993
994         REGRESSION (r242686): Paths in XPC services’ LC_DYLD_ENVIRONMENT are incorrect in built products directory
995         https://bugs.webkit.org/show_bug.cgi?id=198904
996
997         Reviewed by Alex Christensen.
998
999         After r242686, in local builds, the XPC service executables run from their location at the
1000         top of the built products directory, rather than inside the framework.
1001
1002         * Configurations/BaseXPCService.xcconfig: Updated the load commands that set
1003           DYLD_FRAMEWORK_PATH and DYLD_LIBRARY_PATH for the new location in the built products
1004           directory. Also removed WK_XPC_SERVICE_INSERT_LIBRARIES_DIR that had been unused.
1005
1006         * WebKit.xcodeproj/project.pbxproj: Made the creation of symbolic links inside the
1007           framework’s XPCServices directory predicated on whether this is an install build, rather
1008           than on the build configuration, for consistency with the condition used in the .xcconfig.
1009
1010 2019-06-17  Brent Fulgham  <bfulgham@apple.com>
1011
1012         Ensure ITP state is relayed to Network Process on restart
1013         https://bugs.webkit.org/show_bug.cgi?id=198797
1014         <rdar://problem/51646944>
1015
1016         Reviewed by Youenn Fablet.
1017
1018         Now that the ITP state is maintained in the Network Process, we have to make sure that we update
1019         that process with current ITP state if the Network Process crashes and is relaunched. This wasn't a
1020         problem in earlier releases because we tracked all ITP state in the UIProcess.
1021
1022         This patch does the following:
1023         1. Add a new method to WKWebsiteDataStore to allow us to trigger statistics processing, which has the
1024            side effect of syncing ITP state persistently so that it will be available after bouncing the process.
1025         2. Adds a new test that sets a tracking domain, bounces the process, and confirms the state is still
1026            consistent.
1027
1028         Tested by TestWebKitAPI.
1029
1030         * NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:
1031         (WebKit::ResourceLoadStatisticsStore::processStatisticsAndDataRecords):
1032         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1033         (-[WKWebsiteDataStore _clearPrevalentDomain:completionHandler:]):
1034         (-[WKWebsiteDataStore _processStatisticsAndDataRecords:]):
1035         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
1036         * UIProcess/WebProcessPool.cpp:
1037         (WebKit::WebProcessPool::ensureNetworkProcess):
1038         (WebKit::WebProcessPool::setResourceLoadStatisticsEnabled):
1039         * UIProcess/WebProcessPool.h:
1040         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1041         (WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):
1042
1043 2019-06-17  Ludovico de Nittis  <ludovico.denittis@collabora.com>
1044
1045         [GTK] Stop accessing GdkEvent fields when possible
1046         https://bugs.webkit.org/show_bug.cgi?id=198829
1047
1048         Reviewed by Michael Catanzaro.
1049
1050         Direct access to GdkEvent structs is no longer possible in GTK 4.
1051
1052         * Shared/gtk/WebEventFactory.cpp:
1053         (WebKit::buttonForEvent):
1054         (WebKit::WebEventFactory::createWebMouseEvent):
1055         (WebKit::WebEventFactory::createWebWheelEvent):
1056         (WebKit::WebEventFactory::createWebKeyboardEvent):
1057         (WebKit::WebEventFactory::createWebTouchEvent):
1058         * UIProcess/API/gtk/WebKitEmojiChooser.cpp:
1059         * UIProcess/API/gtk/WebKitScriptDialogImpl.cpp:
1060         (webkitScriptDialogImplKeyPressEvent):
1061         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1062         (ClickCounter::currentClickCountForGdkButtonEvent):
1063         (webkitWebViewBaseKeyPressEvent):
1064         (webkitWebViewBaseHandleMouseEvent):
1065         (webkitWebViewBaseCrossingNotifyEvent):
1066         (webkitWebViewBaseGetTouchPointsForEvent):
1067         (webkitWebViewBaseTouchEvent):
1068         (webkitWebViewBaseEvent):
1069         * UIProcess/gtk/GestureController.cpp:
1070         (WebKit::GestureController::handleEvent):
1071         * UIProcess/gtk/InputMethodFilter.cpp:
1072         (WebKit::InputMethodFilter::filterKeyEvent):
1073         (WebKit::InputMethodFilter::logHandleKeyboardEventForTesting):
1074         (WebKit::InputMethodFilter::logHandleKeyboardEventWithCompositionResultsForTesting):
1075         * UIProcess/gtk/KeyBindingTranslator.cpp:
1076         (WebKit::KeyBindingTranslator::commandsForKeyEvent):
1077         * UIProcess/gtk/ViewGestureControllerGtk.cpp:
1078         (WebKit::isEventStop):
1079         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanInfluenceSwipe):
1080         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventGetScrollingDeltas):
1081         (WebKit::ViewGestureController::SwipeProgressTracker::handleEvent):
1082         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
1083         (WebKit::WebPopupMenuProxyGtk::treeViewButtonReleaseEventCallback):
1084         (WebKit::WebPopupMenuProxyGtk::keyPressEventCallback):
1085
1086 2019-06-17  Carlos Garcia Campos  <cgarcia@igalia.com>
1087
1088         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.25.2 release
1089
1090         * gtk/NEWS: Add release notes for 2.25.2.
1091
1092 2019-06-17  Carlos Garcia Campos  <cgarcia@igalia.com>
1093
1094         Unreviewed, rolling out r246467.
1095
1096         It broke scrolling with mouse wheel
1097
1098         Reverted changeset:
1099
1100         "[GTK] Stop accessing GdkEvent fields when possible"
1101         https://bugs.webkit.org/show_bug.cgi?id=198829
1102         https://trac.webkit.org/changeset/246467
1103
1104 2019-06-16  Darin Adler  <darin@apple.com>
1105
1106         Rename AtomicString to AtomString
1107         https://bugs.webkit.org/show_bug.cgi?id=195276
1108
1109         Reviewed by Michael Catanzaro.
1110
1111         * many files: Let do-webcore-rename do the renaming.
1112
1113 2019-06-16  Simon Fraser  <simon.fraser@apple.com>
1114
1115         Implement ScrollableArea::scrollOffset()
1116         https://bugs.webkit.org/show_bug.cgi?id=198895
1117
1118         Reviewed by Antti Koivisto.
1119
1120         * UIProcess/win/WebPopupMenuProxyWin.cpp:
1121         (WebKit::PopupMenuWin::scrollPosition const):
1122         (WebKit::WebPopupMenuProxyWin::onKeyDown): Just use m_scrollOffset.
1123         (WebKit::WebPopupMenuProxyWin::scrollSize const): Deleted.
1124         * UIProcess/win/WebPopupMenuProxyWin.h: Remove the one-axis scrollOffset()
1125         * WebProcess/Plugins/PDF/PDFPlugin.h:
1126         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1127         (WebKit::PDFPlugin::scrollSize const): Deleted.
1128         (WebKit::PDFPlugin::scrollOffset const): Deleted.
1129         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
1130         (WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect):
1131
1132 2019-06-15  Youenn Fablet  <youenn@apple.com>
1133
1134         WebProcessPool::clearWebProcessHasUploads cannot assume its given processIdentifier is valid
1135         https://bugs.webkit.org/show_bug.cgi?id=198865
1136
1137         Unreviewed.
1138
1139         * UIProcess/WebProcessPool.cpp:
1140         (WebKit::WebProcessPool::clearWebProcessHasUploads):
1141         Remove wrong debug assertion in case of WebProcessProxy destruction.
1142
1143 2019-06-15  Ludovico de Nittis  <ludovico.denittis@collabora.com>
1144
1145         [GTK] Stop accessing GdkEvent fields when possible
1146         https://bugs.webkit.org/show_bug.cgi?id=198829
1147
1148         Reviewed by Michael Catanzaro.
1149
1150         Direct access to GdkEvent structs is no longer possible in GTK 4.
1151
1152         * Shared/gtk/WebEventFactory.cpp:
1153         (WebKit::buttonForEvent):
1154         (WebKit::WebEventFactory::createWebMouseEvent):
1155         (WebKit::WebEventFactory::createWebWheelEvent):
1156         (WebKit::WebEventFactory::createWebKeyboardEvent):
1157         (WebKit::WebEventFactory::createWebTouchEvent):
1158         * UIProcess/API/gtk/WebKitEmojiChooser.cpp:
1159         * UIProcess/API/gtk/WebKitScriptDialogImpl.cpp:
1160         (webkitScriptDialogImplKeyPressEvent):
1161         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1162         (ClickCounter::currentClickCountForGdkButtonEvent):
1163         (webkitWebViewBaseKeyPressEvent):
1164         (webkitWebViewBaseHandleMouseEvent):
1165         (webkitWebViewBaseCrossingNotifyEvent):
1166         (webkitWebViewBaseGetTouchPointsForEvent):
1167         (webkitWebViewBaseTouchEvent):
1168         (webkitWebViewBaseEvent):
1169         * UIProcess/gtk/GestureController.cpp:
1170         (WebKit::GestureController::handleEvent):
1171         * UIProcess/gtk/InputMethodFilter.cpp:
1172         (WebKit::InputMethodFilter::filterKeyEvent):
1173         (WebKit::InputMethodFilter::logHandleKeyboardEventForTesting):
1174         (WebKit::InputMethodFilter::logHandleKeyboardEventWithCompositionResultsForTesting):
1175         * UIProcess/gtk/KeyBindingTranslator.cpp:
1176         (WebKit::KeyBindingTranslator::commandsForKeyEvent):
1177         * UIProcess/gtk/ViewGestureControllerGtk.cpp:
1178         (WebKit::isEventStop):
1179         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanInfluenceSwipe):
1180         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventGetScrollingDeltas):
1181         (WebKit::ViewGestureController::SwipeProgressTracker::handleEvent):
1182         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
1183         (WebKit::WebPopupMenuProxyGtk::treeViewButtonReleaseEventCallback):
1184         (WebKit::WebPopupMenuProxyGtk::keyPressEventCallback):
1185
1186 2019-06-15  Rob Buis  <rbuis@igalia.com>
1187
1188         Store prefetch redirects in the prefetch cache
1189         https://bugs.webkit.org/show_bug.cgi?id=197371
1190
1191         Reviewed by Youenn Fablet.
1192
1193         Store prefetch redirects in the prefetch cache and use them when
1194         navigating.
1195
1196         * NetworkProcess/NetworkResourceLoader.cpp:
1197         (WebKit::NetworkResourceLoader::retrieveCacheEntry):
1198         (WebKit::NetworkResourceLoader::willSendRedirectedRequest):
1199         (WebKit::NetworkResourceLoader::didFinishWithRedirectResponse):
1200         * NetworkProcess/NetworkResourceLoader.h:
1201         * NetworkProcess/cache/PrefetchCache.cpp:
1202         (WebKit::PrefetchCache::Entry::Entry):
1203         (WebKit::PrefetchCache::storeRedirect):
1204         * NetworkProcess/cache/PrefetchCache.h:
1205
1206 2019-06-14  Devin Rousso  <drousso@apple.com>
1207
1208         waitForNavigationToComplete may be called before WebPageProxy knows it's loading
1209         https://bugs.webkit.org/show_bug.cgi?id=198741
1210         <rdar://problem/31164316>
1211
1212         Reviewed by Joseph Pecoraro.
1213
1214         There's a potential race in `WebAutomationSession::waitForNavigationToCompleteOnPage` when
1215         querying for the `WebPageProxy`'s loading state (via `PageLoadingState::isLoading`), in that
1216         a pending load may be committed _after_ the `WebAutomationSession` checks it's value. This
1217         makes the automation session think that it isn't loading, so it will continue running
1218         commands, which can lead to a JavaScript error ("Callback was not called before the unload
1219         event") as any injected scripts will be cleared by the impending navigation, leaving the
1220         script evaluation callbacks "dangling".
1221
1222         Expose more information from `PageLoadState` about whether it thinks there _may_ be a
1223         navigation currently happening, which the `WebAutomationSession` can use to delay commands.
1224
1225         In the best case, no navigations are "missed".
1226
1227         In the worst case, the automation session will wait `pageLoadTimeout` before continuing.
1228
1229         * UIProcess/Automation/WebAutomationSession.cpp:
1230         (WebKit::WebAutomationSession::waitForNavigationToCompleteOnPage):
1231
1232         * UIProcess/PageLoadState.h:
1233         * UIProcess/PageLoadState.cpp:
1234         (WebKit::PageLoadState::hasUncommittedLoad const): Added.
1235
1236 2019-06-14  Youenn Fablet  <youenn@apple.com>
1237
1238         WebProcessPool::clearWebProcessHasUploads cannot assume its given processIdentifier is valid
1239         https://bugs.webkit.org/show_bug.cgi?id=198865
1240         <rdar://problem/51618878>
1241
1242         Reviewed by Brady Eidson.
1243
1244         NetworkProcess currently instructs UIProcess whether a given WebProcess is doing upload.
1245         There is no guarantee though that the WebProcessProxy is still there when the IPC is arriving at UIProcess.
1246         Instead, let WebProcess handles its upload state and notify WebProcessPool about its state.
1247         Make sure WebProcessProxy unregisters itself in case of crash.
1248         In case of NetworkProcess crash, WebProcesses will see all their uploads fail
1249         and will notify automatically UIProcess to update their state.
1250
1251         Since the processID given to WebProcessPool is coming from IPC, we cannot not trust it.
1252         Add early return in case of not finding a WebProcessProxy for WebProcessPool clear/set methods.
1253
1254         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1255         (WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
1256         * NetworkProcess/NetworkConnectionToWebProcess.h:
1257         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1258         * NetworkProcess/NetworkResourceLoadMap.cpp:
1259         (WebKit::NetworkResourceLoadMap::add):
1260         (WebKit::NetworkResourceLoadMap::take):
1261         * NetworkProcess/NetworkResourceLoadMap.h:
1262         * UIProcess/WebProcessPool.cpp:
1263         (WebKit::WebProcessPool::setWebProcessHasUploads):
1264         (WebKit::WebProcessPool::clearWebProcessHasUploads):
1265         * UIProcess/WebProcessProxy.cpp:
1266         (WebKit::WebProcessProxy::~WebProcessProxy):
1267         * WebProcess/Network/WebLoaderStrategy.cpp:
1268         (WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
1269         (WebKit::WebLoaderStrategy::remove):
1270         (WebKit::WebLoaderStrategy::tryLoadingSynchronouslyUsingURLSchemeHandler):
1271         * WebProcess/Network/WebLoaderStrategy.h:
1272         * WebProcess/WebProcess.cpp:
1273         (WebKit::WebProcess::ensureNetworkProcessConnection):
1274
1275 2019-06-14  Youenn Fablet  <youenn@apple.com>
1276
1277         WebResourceLoadStatisticsStore should not use its network session if invalidated
1278         https://bugs.webkit.org/show_bug.cgi?id=198814
1279
1280         Reviewed by Geoffrey Garen.
1281
1282         Tell WebResourceLoadStatisticsStore that its network session is invalidated.
1283         WebResourceLoadStatisticsStore will then clear its reference to the network session.
1284
1285         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
1286         (WebKit::ResourceLoadStatisticsMemoryStore::updateCookieBlocking):
1287         Added for test purposes to trigger further cookie processing.
1288         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
1289         (WebKit::WebResourceLoadStatisticsStore::invalidateAndCancel):
1290         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
1291         * NetworkProcess/NetworkSession.cpp:
1292         (WebKit::NetworkSession::invalidateAndCancel):
1293
1294 2019-06-14  Joseph Pecoraro  <pecoraro@apple.com>
1295
1296         [Cocoa] NSFileWrapper associated with _WKAttachment
1297         https://bugs.webkit.org/show_bug.cgi?id=198871
1298         <rdar://problem/51760625>
1299
1300         Reviewed by Wenson Hsieh.
1301
1302         * UIProcess/API/Cocoa/_WKAttachment.mm:
1303         (-[_WKAttachment dealloc]):
1304         Ensure we destruct the API::Object associated with this so RetainPtrs can release.
1305
1306 2019-06-14  Tim Horton  <timothy_horton@apple.com>
1307
1308         WebKit's NSAttributedString.h is not included in the WebKit.h umbrella header
1309         https://bugs.webkit.org/show_bug.cgi?id=198869
1310         <rdar://problem/51754437>
1311
1312         Reviewed by Timothy Hatcher.
1313
1314         * Shared/API/Cocoa/WebKit.h:
1315         Make the new API available to modularized clients and folks who just import WebKit.h
1316
1317 2019-06-14  Jiewen Tan  <jiewen_tan@apple.com>
1318
1319         Disable AppSSO for web processes and plugin processes
1320         https://bugs.webkit.org/show_bug.cgi?id=198843
1321         <rdar://problem/51642920>
1322
1323         Reviewed by Sam Weinig.
1324
1325         This patch moves the disabling of AppSSO from AuxiliaryProcess to PluginProcess
1326         and WebProcess such that NetworkingProcess will not be affected.
1327
1328         * PluginProcess/mac/PluginProcessMac.mm:
1329         (WebKit::PluginProcess::platformInitializePluginProcess):
1330         * Shared/ios/AuxiliaryProcessIOS.mm:
1331         (WebKit::AuxiliaryProcess::platformInitialize):
1332         * Shared/mac/AuxiliaryProcessMac.mm:
1333         (WebKit::AuxiliaryProcess::platformInitialize):
1334         * WebProcess/cocoa/WebProcessCocoa.mm:
1335         (WebKit::WebProcess::platformInitializeProcess):
1336
1337 2019-06-14  Megan Gardner  <megan_gardner@apple.com>
1338
1339         Move Synthetic Editing Commands to behind an experimental feature flag
1340         https://bugs.webkit.org/show_bug.cgi?id=198842
1341         <rdar://problem/50594700>
1342
1343         Reviewed by Simon Fraser.
1344
1345         Add a feature flag to gate synthetic editing commands.
1346
1347         * Shared/WebPreferences.yaml:
1348         * WebProcess/WebPage/ios/WebPageIOS.mm:
1349         (WebKit::WebPage::getFocusedElementInformation):
1350
1351 2019-06-13  Megan Gardner  <megan_gardner@apple.com>
1352
1353         Fix selection hang in Mail
1354         https://bugs.webkit.org/show_bug.cgi?id=198845
1355         <rdar://problem/51388180>
1356
1357         Reviewed by Tim Horton.
1358
1359         SelectionDidChange requires a selectionWillChange in order to keep things in line.
1360
1361         * UIProcess/ios/WKContentViewInteraction.mm:
1362         (-[WKContentView _selectionChanged]):
1363
1364 2019-06-13  Tim Horton  <timothy_horton@apple.com>
1365
1366         No content shows up for WKWebView while locked even with _canShowWhileLocked is YES
1367         https://bugs.webkit.org/show_bug.cgi?id=198819
1368         <rdar://problem/51636240>
1369
1370         Reviewed by Simon Fraser.
1371
1372         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
1373         (WebKit::WebPageProxy::didCreateContextForVisibilityPropagation):
1374         * UIProcess/WebPageProxy.h:
1375         (WebKit::WebPageProxy::contextIDForVisibilityPropagation const):
1376         * UIProcess/WebPageProxy.messages.in:
1377         * UIProcess/WebProcessProxy.h:
1378         (WebKit::WebProcessProxy::contextIDForVisibilityPropagation): Deleted.
1379         * UIProcess/WebProcessProxy.messages.in:
1380         * UIProcess/ios/WKContentView.mm:
1381         (-[WKContentView _setupVisibilityPropagationView]):
1382         * UIProcess/ios/WebPageProxyIOS.mm:
1383         (WebKit::WebPageProxy::didCreateContextForVisibilityPropagation): Deleted.
1384         * UIProcess/ios/WebProcessProxyIOS.mm:
1385         (WebKit::WebProcessProxy::didCreateContextForVisibilityPropagation): Deleted.
1386         * WebProcess/WebPage/WebPage.cpp:
1387         (WebKit::m_shrinkToFitContentTimer):
1388         * WebProcess/WebPage/WebPage.h:
1389         * WebProcess/WebProcess.h:
1390         * WebProcess/cocoa/WebProcessCocoa.mm:
1391         (WebKit::WebProcess::platformInitializeWebProcess):
1392         Move the creation of the visibility propagation context to WebPage instead of WebProcess,
1393         because canShowWhileLocked is per-page, not per-process.
1394
1395         Also, pass canShowWhileLocked into the context creation function for the visibility
1396         propagation context, not just RemoteLayerTree contexts.
1397
1398 2019-06-13  Antoine Quint  <graouts@apple.com>
1399
1400         "display: contents" Content click does not trigger
1401         https://bugs.webkit.org/show_bug.cgi?id=198559
1402         <rdar://problem/51488524>
1403
1404         Reviewed by Antti Koivisto.
1405
1406         * WebProcess/WebPage/ios/WebPageIOS.mm:
1407         (WebKit::WebPage::commitPotentialTap):
1408
1409 2019-06-13  Takashi Komori  <Takashi.Komori@sony.com>
1410
1411         [curl] Remove member objects of CurlRequest not to share by different threads.
1412         https://bugs.webkit.org/show_bug.cgi?id=198747
1413
1414         Reviewed by Fujii Hironori.
1415
1416         * NetworkProcess/curl/NetworkDataTaskCurl.cpp:
1417         (WebKit::NetworkDataTaskCurl::curlDidReceiveResponse):
1418         (WebKit::NetworkDataTaskCurl::curlDidComplete):
1419         (WebKit::NetworkDataTaskCurl::curlDidFailWithError):
1420         * NetworkProcess/curl/NetworkDataTaskCurl.h:
1421
1422 2019-06-13  Zan Dobersek  <zdobersek@igalia.com>
1423
1424         [Nicosia] Add SceneIntegration
1425         https://bugs.webkit.org/show_bug.cgi?id=198791
1426
1427         Reviewed by Carlos Garcia Campos.
1428
1429         Have the LayerTreeHost own the SceneIntegration object that's to be
1430         associated with layers used inside the LayerTreeHost's scene. The
1431         class now also inherits the SceneIntegration::Client interface, with the
1432         requestUpdate() method scheduling a scene update in ThreadedCompositor.
1433
1434         CompositingCoordinator now retrieves the SceneIntegration object from
1435         the LayerTreeHost instance and manages association to that object for
1436         layers under the coordinator's control.
1437
1438         ThreadedCompositor class gets a new public updateScene() method that
1439         schedules an update, enabling the SceneIntegration class to invoke
1440         scene updates.
1441
1442         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
1443         (WebKit::ThreadedCompositor::updateScene):
1444         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
1445         * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
1446         (WebKit::CompositingCoordinator::createGraphicsLayer):
1447         (WebKit::CompositingCoordinator::detachLayer):
1448         (WebKit::CompositingCoordinator::attachLayer):
1449         * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
1450         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:
1451         (WebKit::LayerTreeHost::LayerTreeHost):
1452         (WebKit::LayerTreeHost::sceneIntegration):
1453         (WebKit::LayerTreeHost::requestUpdate):
1454         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h:
1455
1456 2019-06-13  Ludovico de Nittis  <ludovico.denittis@collabora.com>
1457
1458         [GTK] gdk_display_get_device_manager and gdk_screen_get_width/height are deprecated
1459         https://bugs.webkit.org/show_bug.cgi?id=198822
1460
1461         Reviewed by Carlos Garcia Campos.
1462
1463         GdkSeat and GdkRectangle should be used, respectively.
1464
1465         * UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp:
1466         (WebKit::doMouseEvent):
1467         (WebKit::doMotionEvent):
1468         (WebKit::doKeyStrokeEvent):
1469
1470 2019-06-12  Antoine Quint  <graouts@apple.com>
1471
1472         Show the web page URL when sharing an AR model
1473         https://bugs.webkit.org/show_bug.cgi?id=198812
1474         <rdar://problem/48689498>
1475
1476         Reviewed by Dean Jackson.
1477
1478         * UIProcess/Cocoa/DownloadClient.mm:
1479         (WebKit::DownloadClient::didStart):
1480         * UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:
1481         (-[_WKPreviewControllerDataSource initWithMIMEType:originatingPageURL:]):
1482         (-[_WKPreviewControllerDataSource previewController:previewItemAtIndex:]):
1483         (WebKit::SystemPreviewController::start):
1484         (-[_WKPreviewControllerDataSource initWithMIMEType:]): Deleted.
1485         * UIProcess/SystemPreviewController.h:
1486
1487 2019-06-12  Antti Koivisto  <antti@apple.com>
1488
1489         Try to fix iOS build.
1490
1491         * NetworkProcess/Downloads/DownloadMap.cpp:
1492
1493 2019-06-12  Youenn Fablet  <youenn@apple.com>
1494
1495         Use NSURLSession for WebSocket
1496         https://bugs.webkit.org/show_bug.cgi?id=198568
1497
1498         Reviewed by Geoffrey Garen.
1499
1500         Implement socket channel provider on WebProcess level by sending IPC to NetworkProcess.
1501         On NetworkProcess side, use NSURLSession API to implement the WebSocket functionality. 
1502         This is a partial implementation:
1503         - inspector integration is not working.
1504         - some error cases are not well handled or are not producing the same error messages.
1505         - some features are not implemented (extensions, subprotocols, handshake authentication challenge, cookie handling...).
1506
1507         * CMakeLists.txt:
1508         * DerivedSources-input.xcfilelist:
1509         * DerivedSources-output.xcfilelist:
1510         * DerivedSources.make:
1511         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1512         (WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
1513         (WebKit::NetworkConnectionToWebProcess::createSocketChannel):
1514         (WebKit::NetworkConnectionToWebProcess::removeSocketChannel):
1515         * NetworkProcess/NetworkConnectionToWebProcess.h:
1516         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1517         * NetworkProcess/NetworkSession.cpp:
1518         (WebKit::NetworkSession::createWebSocketTask):
1519         * NetworkProcess/NetworkSession.h:
1520         (WebKit::NetworkSession::removeWebSocketTask):
1521         (WebKit::NetworkSession::addWebSocketTask):
1522         * NetworkProcess/NetworkSocketChannel.cpp: Added.
1523         (WebKit::NetworkSocketChannel::create):
1524         (WebKit::NetworkSocketChannel::NetworkSocketChannel):
1525         (WebKit::NetworkSocketChannel::~NetworkSocketChannel):
1526         (WebKit::NetworkSocketChannel::sendString):
1527         (WebKit::NetworkSocketChannel::sendData):
1528         (WebKit::NetworkSocketChannel::finishClosingIfPossible):
1529         (WebKit::NetworkSocketChannel::close):
1530         (WebKit::NetworkSocketChannel::didConnect):
1531         (WebKit::NetworkSocketChannel::didReceiveText):
1532         (WebKit::NetworkSocketChannel::didReceiveBinaryData):
1533         (WebKit::NetworkSocketChannel::didClose):
1534         (WebKit::NetworkSocketChannel::messageSenderConnection const):
1535         * NetworkProcess/NetworkSocketChannel.h: Added.
1536         * NetworkProcess/NetworkSocketChannel.messages.in: Added.
1537         * NetworkProcess/NetworkSocketStream.messages.in:
1538         * NetworkProcess/WebSocketTask.h: Added.
1539         (WebKit::WebSocketTask::sendString):
1540         (WebKit::WebSocketTask::sendData):
1541         (WebKit::WebSocketTask::close):
1542         (WebKit::WebSocketTask::cancel):
1543         (WebKit::WebSocketTask::resume):
1544         * NetworkProcess/cocoa/NetworkSessionCocoa.h:
1545         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1546         (-[WKNetworkSessionDelegate existingWebSocketTask:]):
1547         (-[WKNetworkSessionDelegate URLSession:webSocketTask:didOpenWithProtocol:]):
1548         (-[WKNetworkSessionDelegate URLSession:webSocketTask:didCloseWithCode:reason:]):
1549         (WebKit::NetworkSessionCocoa::continueDidReceiveChallenge):
1550         (WebKit::NetworkSessionCocoa::createWebSocketTask):
1551         (WebKit::NetworkSessionCocoa::addWebSocketTask):
1552         (WebKit::NetworkSessionCocoa::removeWebSocketTask):
1553         (WebKit::NetworkSessionCocoa::webSocketDataTaskForIdentifier):
1554         * NetworkProcess/cocoa/WebSocketTaskCocoa.h: Added.
1555         * NetworkProcess/cocoa/WebSocketTaskCocoa.mm: Added.
1556         (WebKit::WebSocketTask::WebSocketTask):
1557         (WebKit::WebSocketTask::~WebSocketTask):
1558         (WebKit::WebSocketTask::readNextMessage):
1559         (WebKit::WebSocketTask::cancel):
1560         (WebKit::WebSocketTask::resume):
1561         (WebKit::WebSocketTask::didConnect):
1562         (WebKit::WebSocketTask::didClose):
1563         (WebKit::WebSocketTask::sendString):
1564         (WebKit::WebSocketTask::sendData):
1565         (WebKit::WebSocketTask::close):
1566         (WebKit::WebSocketTask::identifier const):
1567         * Shared/WebPreferences.yaml:
1568         * WebKit.xcodeproj/project.pbxproj:
1569         * WebProcess/Network/NetworkProcessConnection.cpp:
1570         (WebKit::NetworkProcessConnection::didReceiveMessage):
1571         * WebProcess/Network/WebSocketChannel.cpp: Added.
1572         (WebKit::WebSocketChannel::create):
1573         (WebKit::WebSocketChannel::WebSocketChannel):
1574         (WebKit::WebSocketChannel::~WebSocketChannel):
1575         (WebKit::WebSocketChannel::messageSenderConnection const):
1576         (WebKit::WebSocketChannel::messageSenderDestinationID const):
1577         (WebKit::WebSocketChannel::subprotocol):
1578         (WebKit::WebSocketChannel::extensions):
1579         (WebKit::WebSocketChannel::connect):
1580         (WebKit::WebSocketChannel::send):
1581         (WebKit::WebSocketChannel::bufferedAmount const):
1582         (WebKit::WebSocketChannel::close):
1583         (WebKit::WebSocketChannel::fail):
1584         (WebKit::WebSocketChannel::disconnect):
1585         (WebKit::WebSocketChannel::didConnect):
1586         (WebKit::WebSocketChannel::didReceiveText):
1587         (WebKit::WebSocketChannel::didReceiveBinaryData):
1588         (WebKit::WebSocketChannel::didClose):
1589         (WebKit::WebSocketChannel::didFail):
1590         (WebKit::WebSocketChannel::networkProcessCrashed):
1591         * WebProcess/Network/WebSocketChannel.h: Added.
1592         * WebProcess/Network/WebSocketChannel.messages.in: Added.
1593         * WebProcess/Network/WebSocketChannelManager.cpp: Added.
1594         (WebKit::WebSocketChannelManager::createWebSocketChannel):
1595         (WebKit::WebSocketChannelManager::networkProcessCrashed):
1596         (WebKit::WebSocketChannelManager::didReceiveMessage):
1597         * WebProcess/Network/WebSocketChannelManager.h: Added.
1598         * WebProcess/Network/WebSocketProvider.cpp:
1599         (WebKit::WebSocketProvider::createWebSocketChannel):
1600         * WebProcess/Network/WebSocketProvider.h:
1601         * WebProcess/Network/WebSocketStream.cpp:
1602         * WebProcess/Network/WebSocketStream.messages.in:
1603         * WebProcess/WebProcess.cpp:
1604         (WebKit::WebProcess::networkProcessConnectionClosed):
1605         * WebProcess/WebProcess.h:
1606         (WebKit::WebProcess::webSocketChannelManager):
1607
1608 2019-06-12  Sihui Liu  <sihui_liu@apple.com>
1609
1610         Add assertions to help debug crash at WebKit::HistoryEntryDataEncoder::operator<<
1611         https://bugs.webkit.org/show_bug.cgi?id=198766
1612
1613         Reviewed by Geoffrey Garen.
1614
1615         * Shared/SessionState.h:
1616         (WebKit::FrameState::~FrameState):
1617         * UIProcess/API/C/WKPage.cpp:
1618         (WKPageCopySessionState):
1619         * UIProcess/mac/LegacySessionStateCoding.cpp:
1620         (WebKit::HistoryEntryDataEncoder::encodeFixedLengthData):
1621         (WebKit::encodeFrameStateNode):
1622
1623 2019-06-12  Ludovico de Nittis  <ludovico.denittis@collabora.com>
1624
1625         [GTK] GTK_STOCK_* types have been deprecated since GTK 3.10
1626         https://bugs.webkit.org/show_bug.cgi?id=198787
1627
1628         Reviewed by Michael Catanzaro.
1629
1630         We completely remove the gtkStockIDFromContextMenuAction function in order to get rid of the stock items.
1631         This function was used only in "createActionIfNeeded" where now we pass a nullptr as a stock_id variable.
1632
1633         * Shared/glib/WebContextMenuItemGlib.cpp:
1634         (WebKit::gtkStockIDFromContextMenuAction):
1635
1636 2019-06-12  Brent Fulgham  <bfulgham@apple.com>
1637
1638         Unreviewed fix after rr246360.
1639
1640         The current code accidentally calls the completion handler twice.
1641
1642         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1643         (-[WKWebsiteDataStore _setPrevalentDomain:completionHandler:]):
1644
1645 2019-06-12  Jiewen Tan  <jiewen_tan@apple.com>
1646
1647         REGRESSION (r245043) [Mac WK2 Debug] ASSERTION FAILED: m_services.isEmpty() && transports.size() <= maxTransportNumber seen with two http/wpt/webauthn/public-key-credential-* tests
1648         https://bugs.webkit.org/show_bug.cgi?id=197917
1649         <rdar://problem/51524958>
1650
1651         Reviewed by Brent Fulgham.
1652
1653         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.
1654         Therefore, when the new request starts discovery, it will still see previous request's state.
1655
1656         To fix this issue, clearState() will be called unconditionally for every request. And a guard is added to clearState() to prevent double clearance.
1657
1658         * UIProcess/WebAuthentication/AuthenticatorManager.cpp:
1659         (WebKit::AuthenticatorManager::makeCredential):
1660         (WebKit::AuthenticatorManager::getAssertion):
1661         (WebKit::AuthenticatorManager::clearState):
1662
1663 2019-06-12  Brent Fulgham  <bfulgham@apple.com>
1664
1665         Add mechanism and test case to check if ITP is active
1666         https://bugs.webkit.org/show_bug.cgi?id=198694
1667         <rdar://problem/51557704>
1668
1669         Reviewed by Youenn Fablet.
1670
1671         Add a new private SPI call on the WebsiteDataStore object that allows test code
1672         to mark a domain as prevalent, and check the prevalance of a resource. This
1673         is then used to build a test to confirm ITP is active and working.
1674
1675         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1676         (-[WKWebsiteDataStore _setPrevalentDomain:completionHandler:]):
1677         (-[WKWebsiteDataStore _getIsPrevalentDomain:completionHandler:]):
1678         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
1679
1680 2019-06-12  Wenson Hsieh  <wenson_hsieh@apple.com>
1681
1682         Many layout tests are failing on iPad simulator due to unexpected viewport dimensions
1683         https://bugs.webkit.org/show_bug.cgi?id=198789
1684         <rdar://problem/51595519>
1685
1686         Reviewed by Simon Fraser.
1687
1688         Prevent the shrink-to-fit-content timer from activating on layout tests that use the testing viewport
1689         configuration.
1690
1691         * WebProcess/WebPage/ios/WebPageIOS.mm:
1692         (WebKit::WebPage::immediatelyShrinkToFitContent):
1693
1694 2019-06-12  Michael Catanzaro  <mcatanzaro@igalia.com>
1695
1696         [WPE][GTK] Deprecate WebSQL APIs
1697         https://bugs.webkit.org/show_bug.cgi?id=195011
1698
1699         Reviewed by Carlos Garcia Campos.
1700
1701         * UIProcess/API/glib/WebKitSettings.cpp:
1702         (webkit_settings_class_init):
1703         * UIProcess/API/glib/WebKitWebContext.cpp:
1704         (webkitWebContextConstructed):
1705         * UIProcess/API/glib/WebKitWebsiteDataManager.cpp:
1706         (webkitWebsiteDataManagerGetProperty):
1707         (webkit_website_data_manager_class_init):
1708         * UIProcess/API/gtk/WebKitWebsiteData.h:
1709         * UIProcess/API/gtk/WebKitWebsiteDataManager.h:
1710         * UIProcess/API/wpe/WebKitWebsiteData.h:
1711         * UIProcess/API/wpe/WebKitWebsiteDataManager.h:
1712
1713 2019-06-12  Michael Catanzaro  <mcatanzaro@igalia.com>
1714
1715         [WPE][GTK] Enable hyperlink auditing
1716         https://bugs.webkit.org/show_bug.cgi?id=197845
1717
1718         Reviewed by Carlos Garcia Campos.
1719
1720         * UIProcess/API/glib/WebKitSettings.cpp:
1721         (webkit_settings_class_init):
1722
1723 2019-06-12  Ludovico de Nittis  <ludovico.denittis@collabora.com>
1724
1725         [GTK] gtk_misc_set_alignment is deprecated since GTK 3.14
1726         https://bugs.webkit.org/show_bug.cgi?id=198785
1727
1728         Reviewed by Carlos Garcia Campos.
1729
1730         Replace the deprecated gtk_misc_set_alignment with halign and valign.
1731
1732         * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
1733         (createLabelWithLineWrap):
1734
1735 2019-06-11  Wenson Hsieh  <wenson_hsieh@apple.com>
1736
1737         [iOS] Idempotent text autosizing needs to react properly to viewport changes
1738         https://bugs.webkit.org/show_bug.cgi?id=198736
1739         <rdar://problem/50591911>
1740
1741         Reviewed by Zalan Bujtas.
1742
1743         If idempotent text autosizing is enabled, respond to viewport initial scale changes by forcing a style recalc,
1744         since the amount by which idempotent text autosizing boosts font sizes depends on the Page's initial scale.
1745
1746         * WebProcess/WebPage/WebPage.h:
1747         * WebProcess/WebPage/ios/WebPageIOS.mm:
1748         (WebKit::WebPage::resetIdempotentTextAutosizingIfNeeded):
1749         (WebKit::WebPage::viewportConfigurationChanged):
1750
1751 2019-06-11  Zalan Bujtas  <zalan@apple.com>
1752
1753         LayoutTests/fast/events/touch/ios/double-tap-for-double-click* test cases are failing
1754         https://bugs.webkit.org/show_bug.cgi?id=198764
1755         <rdar://problem/51035459>
1756
1757         Reviewed by Wenson Hsieh.
1758
1759         This patch replaces the existing, _doubleTapGestureRecognizerForDoubleClick based double click handling with a WebProcess based implementation using
1760         the potentialTapAtPosition/commitPotentialTap infrastructure.
1761
1762         * Shared/WebPageCreationParameters.cpp:
1763         (WebKit::WebPageCreationParameters::encode const):
1764         (WebKit::WebPageCreationParameters::decode):
1765         * Shared/WebPageCreationParameters.h:
1766         * UIProcess/PageClient.h:
1767         * UIProcess/WebPageProxy.cpp:
1768         (WebKit::WebPageProxy::creationParameters):
1769         * UIProcess/WebPageProxy.h:
1770         * UIProcess/ios/PageClientImplIOS.h:
1771         * UIProcess/ios/PageClientImplIOS.mm:
1772         (WebKit::PageClientImpl::doubleTapForDoubleClickDelay):
1773         (WebKit::PageClientImpl::doubleTapForDoubleClickRadius):
1774         * UIProcess/ios/WKContentViewInteraction.h:
1775         * UIProcess/ios/WKContentViewInteraction.mm:
1776         (-[WKContentView _ensureNonBlockingDoubleTapGestureRecognizer]):
1777         (-[WKContentView setupInteraction]):
1778         (-[WKContentView cleanupInteraction]):
1779         (-[WKContentView _removeDefaultGestureRecognizers]):
1780         (-[WKContentView _addDefaultGestureRecognizers]):
1781         (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
1782         (-[WKContentView gestureRecognizerShouldBegin:]):
1783         (-[WKContentView _didStartProvisionalLoadForMainFrame]):
1784         (-[WKContentView _doubleTapForDoubleClickDelay]):
1785         (-[WKContentView _doubleTapForDoubleClickRadius]):
1786         (-[WKContentView _doubleTapRecognizedForDoubleClick:]): Deleted.
1787         * UIProcess/ios/WebPageProxyIOS.mm:
1788         (WebKit::WebPageProxy::handleDoubleTapForDoubleClickAtPoint): Deleted.
1789         * WebProcess/WebPage/WebPage.cpp:
1790         * WebProcess/WebPage/WebPage.h:
1791         * WebProcess/WebPage/WebPage.messages.in:
1792         * WebProcess/WebPage/ios/WebPageIOS.mm:
1793         (WebKit::WebPage::handlePotentialDoubleTapForDoubleClickAtPoint):
1794         (WebKit::WebPage::commitPotentialTap):
1795         (WebKit::WebPage::handleDoubleTapForDoubleClickAtPoint): Deleted.
1796
1797 2019-06-11  Andy Estes  <aestes@apple.com>
1798
1799         [Apple Pay] ASSERTION FAILED: m_state == State::Activating under WebPaymentCoordinatorProxy::showPaymentUI
1800         https://bugs.webkit.org/show_bug.cgi?id=198776
1801         <rdar://problem/49123795>
1802
1803         Reviewed by Brian Weinstein.
1804
1805         It's possible that an active session is aborted before the completion handler passed to
1806         platformShowPaymentUI() has executed. When that happens, m_state will be Idle even though we
1807         assert that it is Activating. Fix this by returning early in the platformShowPaymentUI()
1808         completion handler when m_state is Idle.
1809
1810         It's not possible to write a layout test for this because MockPaymentCoordinator handles
1811         showing payment UI directly in the web process, so this code is not executed in layout
1812         tests. The assertion can be reproduced manually by loading
1813         https://w3c-test.org/payment-request/payment-is-showing.https.html and clicking the button.
1814
1815         * Shared/ApplePay/WebPaymentCoordinatorProxy.cpp:
1816         (WebKit::WebPaymentCoordinatorProxy::showPaymentUI):
1817
1818 2019-06-11  Patrick Griffis  <pgriffis@igalia.com>
1819
1820         [GTK] Fix a11y support in bubblewrap sandbox
1821         https://bugs.webkit.org/show_bug.cgi?id=198777
1822
1823         Reviewed by Michael Catanzaro.
1824
1825         * UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
1826         (WebKit::bindA11y):
1827
1828 2019-06-11  Timothy Hatcher  <timothy@apple.com>
1829
1830         Flash when tapping compose button after switching to/from dark mode without restarting Mail.
1831         https://bugs.webkit.org/show_bug.cgi?id=198769
1832         rdar://problem/51370037
1833
1834         Reviewed by Tim Horton.
1835
1836         Accessing a dynamic color outside a normal UIView choke point without setting
1837         UITraitCollection.currentTraitCollection first can cause undefined results.
1838         Use LocalCurrentTraitCollection inside scrollViewBackgroundColor when accessing
1839         the dynamic system UIColors. Also use systemBackgroundColor instead of white.
1840
1841         * UIProcess/API/Cocoa/WKWebView.mm:
1842         (scrollViewBackgroundColor):
1843
1844 2019-06-11  Megan Gardner  <megan_gardner@apple.com>
1845
1846         Integrate scrollbar gestures for iOS
1847         https://bugs.webkit.org/show_bug.cgi?id=198767
1848
1849         Reviewed by Tim Horton.
1850
1851         * UIProcess/ios/WKContentViewInteraction.mm:
1852         (_WKGestureRecognizerIsBuiltInScrollViewGestureRecognizer):
1853         (-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):
1854
1855 2019-06-11  Timothy Hatcher  <timothy@apple.com>
1856
1857         Scrollbar can show as white on white in dark mode on iOS.
1858         https://bugs.webkit.org/show_bug.cgi?id=198772
1859         rdar://problem/51516743
1860
1861         Reviewed by Tim Horton.
1862
1863         * UIProcess/API/Cocoa/WKWebView.mm:
1864         (-[WKWebView _updateScrollViewBackground]): Use UIScrollViewIndicatorStyleBlack instead
1865         of UIScrollViewIndicatorStyleDefault to prevent getting a white scrollbar in dark mode.
1866
1867 2019-06-11  Michael Catanzaro  <mcatanzaro@igalia.com>
1868
1869         Unreviewed build warning fixes
1870
1871         Silence -Wunused-variable warning
1872
1873         * UIProcess/WebProcessPool.cpp:
1874         (WebKit::WebProcessPool::clearWebProcessIsPlayingAudibleMedia):
1875
1876 2019-06-11  Simon Fraser  <simon.fraser@apple.com>
1877
1878         Fix non-internal builds after r246327.
1879
1880         * Platform/spi/ios/UIKitSPI.h:
1881
1882 2019-06-10  Simon Fraser  <simon.fraser@apple.com>
1883
1884         Add logging for UI-side compositing hit-testing
1885         https://bugs.webkit.org/show_bug.cgi?id=198739
1886
1887         Reviewed by Antti Koivisto.
1888
1889         Make it easier to debug UI-side compositing hit-testing issues with a UIHitTesting log
1890         channel, which logs information about the UIView hierarchy, which views are found by
1891         hit-testing, and what touch-actions apply.
1892
1893         This log channel can be set by passing the argument '-WebKit2Logging "UIHitTesting"' when
1894         launching a debug iOS MobileSafari instance.
1895
1896         * Platform/Logging.h:
1897         * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:
1898         (-[UIView _web_findDescendantViewAtPoint:withEvent:]):
1899         * UIProcess/ios/WKContentViewInteraction.mm:
1900         (-[WKContentView hitTest:withEvent:]):
1901         (-[WKContentView _handleTouchActionsForTouchEvent:]):
1902
1903 2019-06-11  Antti Koivisto  <antti@apple.com>
1904
1905         REGRESSION (iOS): Can't scroll litter-robot.com checkout form's dropdown menus
1906         https://bugs.webkit.org/show_bug.cgi?id=198753
1907         <rdar://problem/51355686>
1908
1909         Reviewed by Simon Fraser.
1910
1911         If an element with 'overflow:scroll' also had 'visibility:hidden' or 'pointer-events:none' it would
1912         capture touches and prevent scrolling of any overlapped scrollers.
1913
1914         * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:
1915         (WebKit::collectDescendantViewsAtPoint):
1916
1917         Filter out views with 'isUserInteractionEnabled == NO' (set for hidden and pointer-events:none layers).
1918         This prevents it being considered as the first view hit when determining scrolling relationships.
1919
1920         (-[UIView _web_findDescendantViewAtPoint:withEvent:]):
1921
1922         No need to skip here anymore.
1923
1924 2019-06-11  Wenson Hsieh  <wenson_hsieh@apple.com>
1925
1926         Quotes are always inserted as smart quotes on stackblitz.com, causing compilation errors
1927         https://bugs.webkit.org/show_bug.cgi?id=198735
1928         <rdar://problem/51557159>
1929
1930         Reviewed by Megan Gardner.
1931
1932         Add a flag in FocusedElementInformation to indicate whether spellchecking is allowed in the focused element.
1933         If spellchecking is not allowed, then disable smart quotes and dashes, which matches behavior on macOS.
1934
1935         * Shared/FocusedElementInformation.cpp:
1936         (WebKit::FocusedElementInformation::encode const):
1937         (WebKit::FocusedElementInformation::decode):
1938         * Shared/FocusedElementInformation.h:
1939         * UIProcess/ios/WKContentViewInteraction.mm:
1940         (-[WKContentView textInputTraits]):
1941         * WebProcess/WebPage/ios/WebPageIOS.mm:
1942         (WebKit::WebPage::getFocusedElementInformation):
1943
1944 2019-06-11  Carlos Garcia Campos  <cgarcia@igalia.com>
1945
1946         [GTK] Remove option REDIRECTED_XCOMPOSITE_WINDOW
1947         https://bugs.webkit.org/show_bug.cgi?id=198748
1948
1949         Reviewed by Žan Doberšek.
1950
1951         It's unused and untested, we kept that code path only because the redirected window caused performance issues in
1952         some drivers in embedded devices. Nowadays there are much better solutions for those cases like using WPE port
1953         or GTK port under wayland instead of X11.
1954
1955         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
1956         (WebKit::ThreadedCompositor::create): Remove the ShouldDoFrameSync parameter since it always receives Yes.
1957         (WebKit::ThreadedCompositor::ThreadedCompositor): Ditto.
1958         (WebKit::ThreadedCompositor::createGLContext): Remove the code to handle the case of ShouldDoFrameSync being No,
1959         since it's always Yes.
1960         (WebKit::ThreadedCompositor::setNativeSurfaceHandleForCompositing): Deleted.
1961         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
1962         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1963         (webkitWebViewBaseRealize): Remove the code for !USE(REDIRECTED_XCOMPOSITE_WINDOW).
1964         (webkitWebViewBaseUnrealize): Ditto.
1965         (webkitWebViewBaseDraw): acceleratedBackingStore member can't be nullptr now.
1966         (webkitWebViewBaseEnterAcceleratedCompositingMode): Ditto.
1967         (webkitWebViewBaseUpdateAcceleratedCompositingMode): Ditto.
1968         (webkitWebViewBaseExitAcceleratedCompositingMode): Ditto.
1969         (webkitWebViewBaseMakeGLContextCurrent): Ditto.
1970         (webkitWebViewBaseDidRelaunchWebProcess): Remove the code for !USE(REDIRECTED_XCOMPOSITE_WINDOW).
1971         (webkitWebViewBasePageClosed): Ditto.
1972         (webkitWebViewBaseRenderHostFileDescriptor): acceleratedBackingStore member can't be nullptr now.
1973         * UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:
1974         (WebKit::DrawingAreaProxyCoordinatedGraphics::didUpdateBackingStoreState): Remove the code for !USE(REDIRECTED_XCOMPOSITE_WINDOW).
1975         (WebKit::DrawingAreaProxyCoordinatedGraphics::setNativeSurfaceHandleForCompositing): Deleted.
1976         (WebKit::DrawingAreaProxyCoordinatedGraphics::destroyNativeSurfaceHandleForCompositing): Deleted.
1977         * UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h:
1978         * UIProcess/gtk/AcceleratedBackingStore.cpp:
1979         (WebKit::AcceleratedBackingStore::create): Add an assert to ensure we create an AcceleratedBackingStore.
1980         * UIProcess/gtk/AcceleratedBackingStoreX11.cpp:
1981         * UIProcess/gtk/AcceleratedBackingStoreX11.h:
1982         * UIProcess/gtk/HardwareAccelerationManager.cpp:
1983         (WebKit::HardwareAccelerationManager::HardwareAccelerationManager): Remove the code for !USE(REDIRECTED_XCOMPOSITE_WINDOW).
1984         * WebProcess/WebPage/AcceleratedSurface.cpp:
1985         (WebKit::AcceleratedSurface::create): Add an assert to ensure we create an AcceleratedSurface.
1986         * WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:
1987         (WebKit::DrawingAreaCoordinatedGraphics::enterAcceleratedCompositingMode): Remove the code for !USE(REDIRECTED_XCOMPOSITE_WINDOW).
1988         (WebKit::DrawingAreaCoordinatedGraphics::setNativeSurfaceHandleForCompositing): Deleted.
1989         (WebKit::DrawingAreaCoordinatedGraphics::destroyNativeSurfaceHandleForCompositing): Deleted.
1990         * WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h:
1991         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:
1992         (WebKit::LayerTreeHost::LayerTreeHost): m_surface can't be nullptr now.
1993         (WebKit::LayerTreeHost::sizeDidChange): Ditto.
1994         (WebKit::LayerTreeHost::deviceOrPageScaleFactorChanged): Ditto.
1995         (WebKit::LayerTreeHost::nativeSurfaceHandleForCompositing): Ditto.
1996         (WebKit::LayerTreeHost::didDestroyGLContext): Ditto.
1997         (WebKit::LayerTreeHost::willRenderFrame): Ditto.
1998         (WebKit::LayerTreeHost::didRenderFrame): Ditto.
1999         (WebKit::LayerTreeHost::setNativeSurfaceHandleForCompositing): Deleted.
2000         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h:
2001         * WebProcess/WebPage/DrawingArea.h:
2002         * WebProcess/WebPage/DrawingArea.messages.in:
2003         * WebProcess/WebPage/WebPage.h:
2004         (WebKit::WebPage::nativeWindowHandle): Deleted.
2005         * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.cpp:
2006         * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.h:
2007
2008 2019-06-11  Michael Catanzaro  <mcatanzaro@igalia.com>
2009
2010         [WPE][GTK] bubblewrap sandbox should grant access to web extensions directory
2011         https://bugs.webkit.org/show_bug.cgi?id=198734
2012
2013         Reviewed by Carlos Garcia Campos.
2014
2015         * UIProcess/API/glib/WebKitWebContext.cpp:
2016         (webkit_web_context_set_web_extensions_directory):
2017
2018 2019-06-10  Andy Estes  <aestes@apple.com>
2019
2020         [iOS] Use PDFKit SPI for taking snapshots when the hosting app is not entitled for global capture
2021         https://bugs.webkit.org/show_bug.cgi?id=198731
2022         <rdar://problem/46215174>
2023
2024         Reviewed by Tim Horton.
2025
2026         PDFHostViewController renders PDF contents in a view service, and apps are unable to
2027         snapshot views rendered out-of-process without an entitlement.
2028
2029         When an app is missing this entitlement and calls WKWebView's
2030         takeSnapshotWithConfiguration: API when a PDF is displayed, fall back to calling
2031         PDFHostViewController's snapshotting SPI.
2032
2033         Testing is blocked by <https://webkit.org/b/175204>.
2034
2035         * Platform/spi/ios/PDFKitSPI.h:
2036         * UIProcess/API/Cocoa/WKWebView.mm:
2037         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
2038         * UIProcess/Cocoa/WKWebViewContentProvider.h:
2039         * UIProcess/ios/WKPDFView.mm:
2040         (+[WKPDFView web_requiresCustomSnapshotting]):
2041         (-[WKPDFView web_snapshotRectInContentViewCoordinates:snapshotWidth:completionHandler:]):
2042         * UIProcess/ios/WKSystemPreviewView.mm:
2043         (+[WKSystemPreviewView web_requiresCustomSnapshotting]):
2044
2045 2019-06-10  Sam Weinig  <weinig@apple.com>
2046
2047         Remove Dashboard support
2048         https://bugs.webkit.org/show_bug.cgi?id=198615
2049
2050         Reviewed by Ryosuke Niwa.
2051
2052         * Configurations/FeatureDefines.xcconfig:
2053         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
2054         (WKBundleSetUseDashboardCompatibilityMode): Deleted.
2055         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
2056         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2057         (WebKit::InjectedBundle::setUseDashboardCompatibilityMode): Deleted.
2058         * WebProcess/InjectedBundle/InjectedBundle.h:
2059         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2060         (WebKit::WebChromeClient::annotatedRegionsChanged): Deleted.
2061         * WebProcess/WebCoreSupport/WebChromeClient.h:
2062
2063 2019-06-10  Wenson Hsieh  <wenson_hsieh@apple.com>
2064
2065         [iOS] fast/xsl tests are flaky when run after certain viewport shrink-to-fit tests
2066         https://bugs.webkit.org/show_bug.cgi?id=198699
2067         <rdar://problem/50501718>
2068
2069         Reviewed by Simon Fraser.
2070
2071         Lift logic that sets the "IsKnownToLayOutWiderThanViewport" flag out of resetViewportDefaultConfiguration, and
2072         into didCommitLoad instead (along with other logic for resetting viewport arguments). The previous method,
2073         resetViewportDefaultConfiguration, was being triggered very frequently undo didReceiveMobileDocType, causing the
2074         shrink-to-fit heuristic to sometimes take no effect. The original intention here was simply to reset the flag
2075         upon page load.
2076
2077         * WebProcess/WebPage/WebPage.cpp:
2078         (WebKit::WebPage::didCommitLoad):
2079         * WebProcess/WebPage/ios/WebPageIOS.mm:
2080         (WebKit::WebPage::resetViewportDefaultConfiguration):
2081
2082 2019-06-10  Timothy Hatcher  <timothy@apple.com>
2083
2084         Integrate dark mode support for iOS.
2085         https://bugs.webkit.org/show_bug.cgi?id=198687
2086         rdar://problem/51545643
2087
2088         Reviewed by Tim Horton.
2089
2090         * Configurations/FeatureDefines.xcconfig:
2091         * UIProcess/API/Cocoa/WKWebView.mm:
2092         (-[WKWebView _effectiveAppearanceIsDark]):
2093         (-[WKWebView _effectiveAppearanceIsInactive]):
2094         (-[WKWebView _dynamicUserInterfaceTraitDidChange]):
2095         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2096         * UIProcess/ios/PageClientImplIOS.h:
2097         * UIProcess/ios/PageClientImplIOS.mm:
2098         (WebKit::PageClientImpl::effectiveAppearanceIsDark const):
2099         (WebKit::PageClientImpl::effectiveAppearanceIsInactive const):
2100         * UIProcess/ios/WKPasswordView.mm:
2101         (-[WKPasswordView showInScrollView:]):
2102         (configureScrollView): Deleted.
2103
2104 2019-06-10  Sihui Liu  <sihui_liu@apple.com>
2105
2106         [WKHTTPCookieStore getAllCookies:] may return duplicate cookies
2107         https://bugs.webkit.org/show_bug.cgi?id=198635
2108         <rdar://problem/46010232>
2109
2110         Reviewed by Ryosuke Niwa.
2111
2112         When there is no process pool, we store cookies set in memory with HashSet m_pendingCookies of WebsiteDataStore.
2113
2114         HashSet does not contain duplicate Cookies that are completely identical, but it may contain Cookies that have 
2115         all the other properties identical other than value. This is not correct because Cookies with same name, domain
2116         and path should be treated as the same cookie. When a cookie is set via API, we should either insert the 
2117         cookie into m_pendingCookies if the cookie does not exist, or update the cookie value if it already exists.
2118
2119         Note that we still use HashSet with CookieHash for m_pendingCookies because in cookie deletion, we only delete 
2120         cookie when there is a complete match. If some cookie from m_pendingCookies has all other properties the same as
2121         the cookie specified in the deletion function, but the value is different, it will not be removed.
2122
2123         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2124         (WebKit::WebsiteDataStore::addPendingCookie):
2125
2126 2019-06-10  Philippe Normand  <pnormand@igalia.com>
2127
2128         [WPE][Qt] Port to new wpe_fdo_egl_exported_image API
2129         https://bugs.webkit.org/show_bug.cgi?id=198713
2130
2131         Reviewed by Carlos Garcia Campos.
2132
2133         * UIProcess/API/wpe/qt/WPEQtViewBackend.cpp:
2134         (WPEQtViewBackend::WPEQtViewBackend):
2135         (WPEQtViewBackend::texture):
2136         (WPEQtViewBackend::displayImage):
2137         * UIProcess/API/wpe/qt/WPEQtViewBackend.h:
2138
2139 2019-06-09  Brent Fulgham  <bfulgham@apple.com>
2140
2141         [iOS] ResourceLoadStatistics state is not properly relayed to the NetworkProcess
2142         https://bugs.webkit.org/show_bug.cgi?id=198692
2143         <rdar://problem/51538088>
2144
2145         Reviewed by Maciej Stachowiak.
2146
2147         * UIProcess/WebProcessPool.cpp:
2148         (WebKit::WebProcessPool::setResourceLoadStatisticsEnabled): Message the NetworkProcess
2149         on state change.
2150
2151 2019-06-08  Dean Jackson  <dino@apple.com>
2152
2153         Drag starting state can get stuck even though the drag has ended
2154         https://bugs.webkit.org/show_bug.cgi?id=198696
2155         <rdar://problem/51556045>
2156
2157         Reviewed by Wenson Hsieh.
2158
2159         In iOS 13, we're seeing cases of the DragSession not
2160         correctly ending, and thus leaving m_isStartingDrag in
2161         an incorrect state. Temporarily force this to be reset
2162         in ::dragEnded while investigating
2163
2164         * UIProcess/ios/WKContentViewInteraction.mm: Add some more release logging
2165         while here.
2166         (-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
2167         (-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
2168         * WebProcess/WebPage/WebPage.cpp:
2169         (WebKit::WebPage::dragEnded):
2170
2171 2019-06-08  Wenson Hsieh  <wenson_hsieh@apple.com>
2172
2173         [iOS] The default application name for user agent when requesting desktop content is still "Mobile/15E148"
2174         https://bugs.webkit.org/show_bug.cgi?id=198693
2175         <rdar://problem/51555371>
2176
2177         Reviewed by Tim Horton.
2178
2179         Fixes the bug by introducing an applicationNameForDesktopUserAgent member to WebPageProxy. This
2180         applicationNameForDesktopUserAgent is set alongside the regular applicationNameForUserAgent; however, in the
2181         case where it is being set via WKWebViewConfiguration, use WKWebViewConfiguration's
2182         _applicationNameForDesktopUserAgent instead. See below for more details.
2183
2184         Tested by adding to the existing API test PreferredContentMode.ApplicationNameForDesktopUserAgent.
2185
2186         * UIProcess/API/APIWebsitePolicies.cpp:
2187         (API::WebsitePolicies::copy const):
2188         * UIProcess/API/APIWebsitePolicies.h:
2189
2190         Drive-by fix: rename applicationNameForUserAgentWithModernCompatibility to applicationNameForDesktopUserAgent in
2191         a few places.
2192
2193         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2194         (-[WKBrowsingContextController setApplicationNameForUserAgent:]):
2195         * UIProcess/API/Cocoa/WKWebView.mm:
2196         (-[WKWebView _initializeWithConfiguration:]):
2197         (-[WKWebView _setApplicationNameForUserAgent:]):
2198         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2199
2200         Change _applicationNameForUserAgent into an Optional<RetainPtr<NSString>>. A value of WTF::nullopt allows us to
2201         know that the default application name should be used (which is different when requesting desktop content).
2202
2203         (-[WKWebViewConfiguration encodeWithCoder:]):
2204         (-[WKWebViewConfiguration initWithCoder:]):
2205         (-[WKWebViewConfiguration copyWithZone:]):
2206         (-[WKWebViewConfiguration _applicationNameForDesktopUserAgent]):
2207
2208         Add _applicationNameForDesktopUserAgent to the web view configuration. This behaves like
2209         applicationNameForUserAgent, with one exception: in the case where the default applicationNameForUserAgent is
2210         used (i.e. the client has not specified any application name), default to `nil` as the application name for user
2211         agent, rather than "Mobile/15E148".
2212
2213         (-[WKWebViewConfiguration applicationNameForUserAgent]):
2214         (-[WKWebViewConfiguration setApplicationNameForUserAgent:]):
2215         * UIProcess/API/Cocoa/WKWebViewConfigurationInternal.h:
2216         * UIProcess/API/Cocoa/WKWebpagePreferences.mm:
2217         (-[WKWebpagePreferences _applicationNameForUserAgentWithModernCompatibility]):
2218         (-[WKWebpagePreferences _setApplicationNameForUserAgentWithModernCompatibility:]):
2219         * UIProcess/WebPageProxy.h:
2220         (WebKit::WebPageProxy::setApplicationNameForDesktopUserAgent):
2221         (WebKit::WebPageProxy::applicationNameForDesktopUserAgent const):
2222         * UIProcess/ios/WebPageProxyIOS.mm:
2223         (WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies):
2224
2225 2019-06-08  Andy Estes  <aestes@apple.com>
2226
2227         [Apple Pay] If we have a bound interface identifier, set it on new PKPaymentRequests
2228         https://bugs.webkit.org/show_bug.cgi?id=198690
2229         <rdar://problem/48041803>
2230
2231         Reviewed by Tim Horton.
2232
2233         * NetworkProcess/cocoa/NetworkSessionCocoa.h:
2234         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2235         (WebKit::NetworkSessionCocoa::boundInterfaceIdentifier const): Implemented a public getter
2236         for m_boundInterfaceIdentifier.
2237
2238         * NetworkProcess/NetworkConnectionToWebProcess.h:
2239         * NetworkProcess/ios/NetworkConnectionToWebProcessIOS.mm:
2240         (WebKit::NetworkConnectionToWebProcess::paymentCoordinatorBoundInterfaceIdentifier):
2241         Implemented an override for paymentCoordinatorBoundInterfaceIdentifier.
2242
2243         * Shared/ApplePay/WebPaymentCoordinatorProxy.h: Declared
2244         paymentCoordinatorBoundInterfaceIdentifier for clients to override.
2245
2246         * Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
2247         (WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest): If the client has a non-empty
2248         bound interface identifier, set it on the new PKPaymentRequest.
2249
2250         * UIProcess/WebPageProxy.h:
2251         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
2252         (WebKit::WebPageProxy::paymentCoordinatorBoundInterfaceIdentifier): Implemented an override
2253         for paymentCoordinatorBoundInterfaceIdentifier.
2254
2255 2019-06-07  Antti Koivisto  <antti@apple.com>
2256
2257         REGRESSION (r245006): Setting scrollview.scrollEnabled clobbers any scrollEnabled set by a client
2258         https://bugs.webkit.org/show_bug.cgi?id=198656
2259         <rdar://problem/51494585>
2260
2261         Reviewed by Tim Horton.
2262
2263         Allow client to disable scrolling and zooming.
2264
2265         * UIProcess/API/Cocoa/WKWebView.mm:
2266         (-[WKWebView _didCommitLayerTree:]):
2267         * UIProcess/ios/WKScrollView.h:
2268         * UIProcess/ios/WKScrollView.mm:
2269         (-[WKScrollView initWithFrame:]):
2270         (-[WKScrollView setScrollEnabled:]):
2271         (-[WKScrollView _setScrollEnabledInternal:]):
2272         (-[WKScrollView _updateScrollability]):
2273         (-[WKScrollView setZoomEnabled:]):
2274         (-[WKScrollView _setZoomEnabledInternal:]):
2275         (-[WKScrollView _updateZoomability]):
2276
2277 2019-06-07  Wenson Hsieh  <wenson_hsieh@apple.com>
2278
2279         Allow clients to vend custom -inputView and -inputAccessoryView by overriding WKWebView methods
2280         https://bugs.webkit.org/show_bug.cgi?id=198631
2281         <rdar://problem/51505431>
2282
2283         Reviewed by Tim Horton.
2284
2285         Allow WKWebView API clients to override WKContentView's default input view and/or input accessory view by
2286         subclassing WKWebView and implementing -inputView or -inputAccessoryView.
2287
2288         * UIProcess/API/Cocoa/WKWebView.mm:
2289         (-[WKWebView inputAccessoryView]):
2290         (-[WKWebView inputView]):
2291         * UIProcess/ios/WKContentViewInteraction.h:
2292         * UIProcess/ios/WKContentViewInteraction.mm:
2293         (-[WKContentView inputView]):
2294         (-[WKContentView inputViewForWebView]):
2295         (-[WKContentView inputAccessoryView]):
2296         (-[WKContentView inputAccessoryViewForWebView]):
2297
2298 2019-06-07  Tim Horton  <timothy_horton@apple.com>
2299
2300         Disable focus rings on WKContentView for PLATFORM(IOSMAC)
2301         https://bugs.webkit.org/show_bug.cgi?id=198685
2302
2303         Reviewed by Simon Fraser.
2304
2305         * Platform/spi/ios/UIKitSPI.h:
2306         * UIProcess/ios/WKContentView.mm:
2307         (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
2308
2309 2019-06-07  Megan Gardner  <megan_gardner@apple.com>
2310
2311         Extend quirks to emulate bold/italic/underline in hidden editable areas
2312         https://bugs.webkit.org/show_bug.cgi?id=198681
2313
2314         Reviewed by Wenson Hsieh.
2315
2316         * Shared/FocusedElementInformation.cpp:
2317         (WebKit::FocusedElementInformation::encode const):
2318         (WebKit::FocusedElementInformation::decode):
2319         * Shared/FocusedElementInformation.h:
2320         * Shared/SyntheticEditingCommandType.h:
2321         * UIProcess/ios/WKContentView.mm:
2322         (-[WKContentView undoManager]):
2323         * UIProcess/ios/WKContentViewInteraction.mm:
2324         (shouldSynthezieKeyEvents):
2325         (-[WKContentView toggleBoldfaceForWebView:]):
2326         (-[WKContentView toggleItalicsForWebView:]):
2327         (-[WKContentView toggleUnderlineForWebView:]):
2328         (-[WKContentView _elementDidBlur]):
2329         * WebProcess/WebPage/ios/WebPageIOS.mm:
2330         (WebKit::WebPage::generateSyntheticEditingCommand):
2331         (WebKit::WebPage::getFocusedElementInformation):
2332
2333 2019-06-05  Alex Christensen  <achristensen@webkit.org>
2334
2335         Introduce new SPI for context menus on iOS
2336         https://bugs.webkit.org/show_bug.cgi?id=198590
2337
2338         Reviewed by Tim Horton.
2339
2340         Also introduce WKContextMenuElementInfo which is API.
2341         This is part of <rdar://problem/51003503>
2342
2343         * Shared/API/APIObject.h:
2344         * Shared/API/Cocoa/WebKit.h:
2345         * Shared/Cocoa/APIObject.mm:
2346         (API::Object::newObject):
2347         * Sources.txt:
2348         * SourcesCocoa.txt:
2349         * UIProcess/API/APIContextMenuElementInfo.cpp: Added.
2350         (API::ContextMenuElementInfo::ContextMenuElementInfo):
2351         * UIProcess/API/APIContextMenuElementInfo.h: Added.
2352         * UIProcess/API/Cocoa/WKContextMenuElementInfo.h: Added.
2353         * UIProcess/API/Cocoa/WKContextMenuElementInfo.mm: Added.
2354         (-[WKContextMenuElementInfo linkURL]):
2355         (-[WKContextMenuElementInfo _apiObject]):
2356         (-[WKContextMenuElementInfo _activatedElementInfo]):
2357         * UIProcess/API/Cocoa/WKContextMenuElementInfoInternal.h: Added.
2358         * UIProcess/API/Cocoa/WKContextMenuElementInfoPrivate.h: Added.
2359         * UIProcess/API/Cocoa/WKPreviewElementInfo.h:
2360         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
2361         * UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
2362         * UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
2363         (-[_WKActivatedElementInfo _initWithInteractionInformationAtPosition:]):
2364         (-[_WKActivatedElementInfo isAnimatedImage]):
2365         * UIProcess/ios/WKActionSheetAssistant.h:
2366         * UIProcess/ios/WKActionSheetAssistant.mm:
2367         (-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
2368         (-[WKActionSheetAssistant defaultActionsForImageSheet:]):
2369         * UIProcess/ios/WKContentView.h:
2370         * UIProcess/ios/WKContentViewInteraction.mm:
2371         * WebKit.xcodeproj/project.pbxproj:
2372
2373 2019-06-07  Antoine Quint  <graouts@apple.com>
2374
2375         Restrict fast clicks everywhere to desktop content mode
2376         https://bugs.webkit.org/show_bug.cgi?id=198610
2377         <rdar://problem/50114230>
2378
2379         Reviewed by Dean Jackson.
2380
2381         We now set a new allowsFastClicksEverywhere property on the WebPageProxy when the content mode changes, set to true
2382         when we're in desktop browsing mode. We now check on this property to opt into the fast clicks everywhere behavior.
2383
2384         This patch had been reverted once because it yielded some regressions in existing tests, notably under
2385         fast/events/touch/ios/content-observation. This updated patch addresses this by ensuring the gesture recognizers
2386         used for double-tap-to-zoom are disabled in -[WKContentViewInteraction _didStartProvisionalLoadForMainFrame]
2387         to ensure that two tests dispatching a tap at the same location don't yield the recognition of a double-tap
2388         rathern than the recognition of two single taps. 
2389
2390         * UIProcess/WebPageProxy.h:
2391         (WebKit::WebPageProxy::allowsFastClicksEverywhere const):
2392         * UIProcess/ios/WKContentViewInteraction.mm:
2393         (-[WKContentView _handleSmartMagnificationInformationForPotentialTap:renderRect:fitEntireRect:viewportMinimumScale:viewportMaximumScale:]):
2394         (_didStartProvisionalLoadForMainFrame):
2395         * UIProcess/ios/WebPageProxyIOS.mm:
2396         (WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies):
2397
2398 2019-06-07  Brent Fulgham  <bfulgham@apple.com>
2399
2400         [iOS] Update sandboxes to address iokit-get-property errors
2401         https://bugs.webkit.org/show_bug.cgi?id=198494
2402         <rdar://problem/51322072> and <rdar://problem/50602737>
2403
2404         Reviewed by Per Arne Vollan.
2405
2406         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2407
2408 2019-06-07  Andy Estes  <aestes@apple.com>
2409
2410         process-swap-on-navigation error when loading blocked website on iOS 12.2 only.
2411         https://bugs.webkit.org/show_bug.cgi?id=196930
2412         <rdar://problem/47819301>
2413
2414         Reviewed by Chris Dumez.
2415
2416         The ContentFilterDidBlockLoadForFrame message needs to be handled by ProvisionalPageProxy in
2417         order to look up the blocked frame in the correct WebProcessProxy.
2418
2419         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
2420         (WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame):
2421         (WebKit::WebPageProxy::contentFilterDidBlockLoadForFrameShared):
2422         * UIProcess/ProvisionalPageProxy.cpp:
2423         (WebKit::ProvisionalPageProxy::contentFilterDidBlockLoadForFrame):
2424         (WebKit::ProvisionalPageProxy::didReceiveMessage):
2425         * UIProcess/ProvisionalPageProxy.h:
2426         * UIProcess/WebPageProxy.h:
2427
2428 2019-06-07  Carlos Garcia Campos  <cgarcia@igalia.com>
2429
2430         Unreviewed. Fix api used to release wpe_fdo_egl_exported_image in GTK
2431
2432         We are using the old deprecated API in AcceleratedBackingStoreWayland::displayBuffer().
2433
2434         * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
2435         (WebKit::AcceleratedBackingStoreWayland::displayBuffer):
2436
2437 2019-06-06  Carlos Garcia Campos  <cgarcia@igalia.com>
2438
2439         REGRESSION(r243094): [GTK][WPE] Stale content after restoring the web view session
2440         https://bugs.webkit.org/show_bug.cgi?id=198561
2441
2442         Reviewed by Chris Dumez.
2443
2444         This is another regression of delaying the web process launch until the first load. If the session is restored
2445         before anything has been loaded, which is the normal way, the RestoreSession message is just ignored and the
2446         state is sent to the WebPage on creation via creation parameters. The WebPage considers that restoring a session
2447         from creation parameters only happens when re-launching a process after a crash or in case of process swap. In
2448         those cases, the history item is not marked as restored from session. We need to ensure the session is restored
2449         in the web process from the IPC message handler, by launching the initial process before the session is
2450         restored.
2451
2452         * UIProcess/WebPageProxy.cpp:
2453         (WebKit::WebPageProxy::restoreFromSessionState):
2454
2455 2019-06-06  Youenn Fablet  <youenn@apple.com>
2456
2457         Use an enumeration in UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo callback
2458         https://bugs.webkit.org/show_bug.cgi?id=198548
2459
2460         Reviewed by Eric Carlson.
2461
2462         Move from an Optional<bool> to an enum having three values to ease readability.
2463
2464         * UIProcess/UserMediaPermissionCheckProxy.cpp:
2465         (WebKit::UserMediaPermissionCheckProxy::setUserMediaAccessInfo):
2466         (WebKit::UserMediaPermissionCheckProxy::complete):
2467         * UIProcess/UserMediaPermissionCheckProxy.h:
2468         (WebKit::UserMediaPermissionCheckProxy::invalidate):
2469         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2470         (WebKit::UserMediaPermissionRequestManagerProxy::captureDevicesChanged):
2471         (WebKit::UserMediaPermissionRequestManagerProxy::startProcessingUserMediaPermissionRequest):
2472         (WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo):
2473         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
2474         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
2475
2476 2019-06-06  Youenn Fablet  <youenn@apple.com>
2477
2478         Allow WebKitTestRunner to terminate network process after it finishes service worker file operations
2479         https://bugs.webkit.org/show_bug.cgi?id=198584
2480
2481         Reviewed by Geoffrey Garen.
2482
2483         Add IPC binding to new internal API.
2484
2485         * NetworkProcess/ServiceWorker/WebSWServerConnection.messages.in:
2486         * WebProcess/Storage/WebSWClientConnection.cpp:
2487         (WebKit::WebSWClientConnection::storeRegistrationsOnDiskForTesting):
2488         * WebProcess/Storage/WebSWClientConnection.h:
2489
2490 2019-06-06  Commit Queue  <commit-queue@webkit.org>
2491
2492         Unreviewed, rolling out r246165.
2493         https://bugs.webkit.org/show_bug.cgi?id=198636
2494
2495         Causing test failures in 7 content-observation tests.
2496         (Requested by ShawnRoberts on #webkit).
2497
2498         Reverted changeset:
2499
2500         "Restrict fast clicks everywhere to desktop content mode"
2501         https://bugs.webkit.org/show_bug.cgi?id=198610
2502         https://trac.webkit.org/changeset/246165
2503
2504 2019-06-06  Commit Queue  <commit-queue@webkit.org>
2505
2506         Unreviewed, rolling out r246123.
2507         https://bugs.webkit.org/show_bug.cgi?id=198634
2508
2509         Causes test failures (Requested by ShawnRoberts on #webkit).
2510
2511         Reverted changeset:
2512
2513         "[iOS] Update sandboxes to address iokit-get-property errors"
2514         https://bugs.webkit.org/show_bug.cgi?id=198494
2515         https://trac.webkit.org/changeset/246123
2516
2517 2019-06-06  Geoffrey Garen  <ggaren@apple.com>
2518
2519         Crash using WKHTTPCookieStore when you use WKWebView and UIWebView in the same app
2520         https://bugs.webkit.org/show_bug.cgi?id=198622
2521
2522         Reviewed by Chris Dumez.
2523
2524         Today in a WWDC lab, I saw some crash reports from an app that mixed
2525         WKWebView and UIWebView. The proximate cause of the crash is that
2526         WKHTTPCookieStore queues a callOnMainThread function, and then
2527         UIWebView dequeues it on the WebThread.
2528
2529         No test because this crash depends on mixing WKWebView and UIWebView and
2530         getting (un)lucky on the timing.
2531
2532         * UIProcess/API/APIHTTPCookieStore.cpp:
2533         (API::HTTPCookieStore::cookies):
2534         (API::HTTPCookieStore::setCookies):
2535         (API::HTTPCookieStore::deleteCookie): Avoid using callOnMainThread
2536         becuase it is prohibited in the UI process.
2537
2538 2019-06-06  Antoine Quint  <graouts@apple.com>
2539
2540         Remove duplicated websiteDataStoreParameters code from WebsitePoliciesData::applyToDocumentLoader()
2541         https://bugs.webkit.org/show_bug.cgi?id=198608
2542
2543         Reviewed by Wenson Hsieh.
2544
2545         Due to a rebasing error, r244218 re-introduced code that was removed in r244197. This patch removes this code for good.
2546
2547         * Shared/WebsitePoliciesData.cpp:
2548         (WebKit::WebsitePoliciesData::applyToDocumentLoader):
2549
2550 2019-06-06  Antoine Quint  <graouts@apple.com>
2551
2552         Restrict fast clicks everywhere to desktop content mode
2553         https://bugs.webkit.org/show_bug.cgi?id=198610
2554         <rdar://problem/50114230>
2555
2556         Reviewed by Dean Jackson.
2557
2558         * UIProcess/WebPageProxy.h:
2559         (WebKit::WebPageProxy::allowsFastClicksEverywhere const):
2560         * UIProcess/ios/WKContentViewInteraction.mm:
2561         (-[WKContentView _handleSmartMagnificationInformationForPotentialTap:renderRect:fitEntireRect:viewportMinimumScale:viewportMaximumScale:]):
2562         * UIProcess/ios/WebPageProxyIOS.mm:
2563         (WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies):
2564
2565 2019-06-06  Sihui Liu  <sihui_liu@apple.com>
2566
2567         NetworkHTTPSUpgradeChecker should construct and destruct database on the background thread
2568         https://bugs.webkit.org/show_bug.cgi?id=198496
2569
2570         Reviewed by Chris Dumez.
2571
2572         * NetworkProcess/NetworkHTTPSUpgradeChecker.cpp:
2573         (WebKit::NetworkHTTPSUpgradeChecker::NetworkHTTPSUpgradeChecker):
2574         (WebKit::NetworkHTTPSUpgradeChecker::~NetworkHTTPSUpgradeChecker):
2575         * NetworkProcess/NetworkHTTPSUpgradeChecker.h:
2576
2577 2019-06-06  Truitt Savell  <tsavell@apple.com>
2578
2579         Unreviewed, rolling out r246137.
2580
2581         Broke internal builds.
2582
2583         Reverted changeset:
2584
2585         "Introduce new SPI for context menus on iOS"
2586         https://bugs.webkit.org/show_bug.cgi?id=198590
2587         https://trac.webkit.org/changeset/246137
2588
2589 2019-06-06  Antti Koivisto  <antti@apple.com>
2590
2591         Position fixed is buggy with overflow:auto scrolling inside iframes
2592         https://bugs.webkit.org/show_bug.cgi?id=154399
2593         <rdar://problem/24742251>
2594
2595         Reviewed by Frederic Wang and Simon Fraser.
2596
2597         * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
2598         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
2599
2600         Remove viewportChangedViaDelegatedScrolling call as we were just relying on its side effect of (partially) applying
2601         the scrolling tree. Instead call the new applyScrollingTreeLayerPositionsAfterCommit() unconditionally.
2602         It only does work if there are local deltas to apply.
2603
2604         Local deltas will potentially need to be applied in non-fixed cases too and it is hard to reason about the conditions.
2605
2606         * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
2607         (WebKit::RemoteScrollingCoordinatorProxy::applyScrollingTreeLayerPositionsAfterCommit):
2608         (WebKit::RemoteScrollingCoordinatorProxy::applyScrollingTreeLayerPositions): Deleted.
2609         * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
2610
2611 2019-06-06  Michael Catanzaro  <mcatanzaro@igalia.com>
2612
2613         [WPE][GTK] Clean up use of initiatingPageID in implementation of webkit_uri_scheme_request_get_web_view()
2614         https://bugs.webkit.org/show_bug.cgi?id=198564
2615
2616         Reviewed by Carlos Garcia Campos.
2617
2618         Note that we have to use RefPtr rather than Ref here because the priv struct has to remain
2619         default-constructible.
2620
2621         * UIProcess/API/glib/WebKitURISchemeRequest.cpp:
2622         (webkitURISchemeRequestCreate):
2623         (webkit_uri_scheme_request_get_web_view):
2624
2625 2019-06-06  Carlos Garcia Campos  <cgarcia@igalia.com>
2626
2627         [GTK][WPE] Enable PSON
2628         https://bugs.webkit.org/show_bug.cgi?id=194979
2629
2630         Reviewed by Žan Doberšek.
2631
2632         * Shared/WebPreferencesDefaultValues.h:
2633
2634 2019-06-05  Said Abou-Hallawa  <sabouhallawa@apple.com>
2635
2636         [Cocoa] REGRESSION(r244182): Inspector thinks CA commits can be nested
2637         https://bugs.webkit.org/show_bug.cgi?id=198497
2638
2639         Reviewed by Simon Fraser.
2640
2641         Call InspectorController::willComposite() from the CA preCommit handler
2642         similar to the call to InspectorController::didComposite() in the CA
2643         postCommit handler. Ensure these calls will be once for nested commits.
2644
2645         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
2646         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
2647         (WebKit::RemoteLayerTreeDrawingArea::addCommitHandlers):
2648         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
2649         * WebProcess/WebPage/WebPage.h:
2650         (WebKit::WebPage::firstFlushAfterCommit const):
2651         (WebKit::WebPage::setFirstFlushAfterCommit):
2652         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2653         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2654         (WebKit::TiledCoreAnimationDrawingArea::addCommitHandlers):
2655         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2656
2657 2019-06-05  Alex Christensen  <achristensen@webkit.org>
2658
2659         Introduce new SPI for context menus on iOS
2660         https://bugs.webkit.org/show_bug.cgi?id=198590
2661
2662         Reviewed by Tim Horton.
2663
2664         Also introduce WKContextMenuElementInfo which is API.
2665         This is part of <rdar://problem/51003503>
2666
2667         * Shared/API/APIObject.h:
2668         * Shared/API/Cocoa/WebKit.h:
2669         * Shared/Cocoa/APIObject.mm:
2670         (API::Object::newObject):
2671         * Sources.txt:
2672         * SourcesCocoa.txt:
2673         * UIProcess/API/APIContextMenuElementInfo.cpp: Added.
2674         (API::ContextMenuElementInfo::ContextMenuElementInfo):
2675         * UIProcess/API/APIContextMenuElementInfo.h: Added.
2676         * UIProcess/API/Cocoa/WKContextMenuElementInfo.h: Added.
2677         * UIProcess/API/Cocoa/WKContextMenuElementInfo.mm: Added.
2678         (-[WKContextMenuElementInfo linkURL]):
2679         (-[WKContextMenuElementInfo _apiObject]):
2680         (-[WKContextMenuElementInfo _activatedElementInfo]):
2681         * UIProcess/API/Cocoa/WKContextMenuElementInfoInternal.h: Added.
2682         * UIProcess/API/Cocoa/WKContextMenuElementInfoPrivate.h: Added.
2683         * UIProcess/API/Cocoa/WKPreviewElementInfo.h:
2684         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
2685         * UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
2686         * UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
2687         (-[_WKActivatedElementInfo _initWithInteractionInformationAtPosition:]):
2688         (-[_WKActivatedElementInfo isAnimatedImage]):
2689         * UIProcess/ios/WKActionSheetAssistant.h:
2690         * UIProcess/ios/WKActionSheetAssistant.mm:
2691         (-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
2692         (-[WKActionSheetAssistant defaultActionsForImageSheet:]):
2693         * UIProcess/ios/WKContentView.h:
2694         * UIProcess/ios/WKContentViewInteraction.mm:
2695         * WebKit.xcodeproj/project.pbxproj:
2696
2697 2019-06-05  Jer Noble  <jer.noble@apple.com>
2698
2699         -[WKWebView _suspendAllMediaPlayback] does not persist across navigation.
2700         https://bugs.webkit.org/show_bug.cgi?id=198585
2701
2702         Reviewed by Chris Dumez.
2703
2704         Add a new WebPageCreationParameters entry for mediaPlaybackIsSuspended, and pass
2705         that value across during WebPage creation.
2706
2707         * Shared/WebPageCreationParameters.cpp:
2708         (WebKit::WebPageCreationParameters::encode const):
2709         (WebKit::WebPageCreationParameters::decode):
2710         * Shared/WebPageCreationParameters.h:
2711         * UIProcess/WebPageProxy.cpp:
2712         (WebKit::WebPageProxy::suspendAllMediaPlayback):
2713         (WebKit::WebPageProxy::resumeAllMediaPlayback):
2714         (WebKit::WebPageProxy::creationParameters):
2715         * UIProcess/WebPageProxy.h:
2716         * WebProcess/WebPage/WebPage.cpp:
2717         (WebKit::WebPage):
2718
2719 2019-06-05  Sihui Liu  <sihui_liu@apple.com>
2720
2721         TestWebKitAPI.WKWebView.LocalStorageProcessSuspends is flaky on release builds
2722         https://bugs.webkit.org/show_bug.cgi?id=198582
2723
2724         Reviewed by Youenn Fablet.
2725
2726         Initialize the state of StorageManager.
2727
2728         * NetworkProcess/WebStorage/StorageManager.h:
2729
2730 2019-06-05  Alex Christensen  <achristensen@webkit.org>
2731
2732         Re-enable safe browsing in WKWebView
2733         https://bugs.webkit.org/show_bug.cgi?id=196161
2734         <rdar://problem/49171413>
2735
2736         Reviewed by Ryosuke Niwa.
2737
2738         This is mostly just reverting r241728.
2739
2740         * Shared/WebPreferences.yaml:
2741         * UIProcess/API/Cocoa/WKPreferences.h:
2742         * UIProcess/API/Cocoa/WKPreferences.mm:
2743         (-[WKPreferences setSafeBrowsingEnabled:]):
2744         (-[WKPreferences isSafeBrowsingEnabled]):
2745
2746 2019-06-05  Alex Christensen  <achristensen@webkit.org>
2747
2748         Progress towards resurrecting Mac CMake build
2749         https://bugs.webkit.org/show_bug.cgi?id=197132
2750
2751         Reviewed by Don Olmstead.
2752
2753         * PlatformMac.cmake:
2754
2755 2019-06-05  Youenn Fablet  <youenn@apple.com>
2756
2757         Remove logSiteIdentifier from UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame
2758         https://bugs.webkit.org/show_bug.cgi?id=198575
2759
2760         Reviewed by Eric Carlson.
2761
2762         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2763         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
2764
2765 == Rolled over to ChangeLog-2019-06-05 ==