fc4ab70c3dd2be3a6f4e18b6b6193529b6ce4115
[WebKit-https.git] / Source / WebKit / ChangeLog
1 2019-02-15  Wenson Hsieh  <wenson_hsieh@apple.com>
2
3         [iOS] WKWebView callout bar is missing Change Writing Direction item
4         https://bugs.webkit.org/show_bug.cgi?id=190015
5         <rdar://problem/44810366>
6
7         Reviewed by Tim Horton.
8
9         Support -makeTextWritingDirectionLeftToRight: and -makeTextWritingDirectionRightToLeft: in WKWebView on iOS.
10         To match behavior in native UITextViews on iOS, we implement these methods by changing the *base* writing
11         direction, rather than the text writing direction (this is in contrast to macOS, which has different
12         NSResponder methods for changing the base writing direction as opposed to the text writing direction).
13
14         Additionally fixes the implementation of -makeTextWritingDirectionNatural:, which currently attempts to change
15         the text writing direction instead of the base writing direction.
16
17         * Platform/spi/ios/UIKitSPI.h:
18
19         Add a forward declaration for keyboards SPI to determine whether the user has an active RTL keyboard.
20
21         * Shared/EditorState.cpp:
22         (WebKit::EditorState::PostLayoutData::encode const):
23         (WebKit::EditorState::PostLayoutData::decode):
24         (WebKit::operator<<):
25         * Shared/EditorState.h:
26
27         Plumb the base writing direction to the UI process through EditorState.
28
29         * UIProcess/ios/WKContentViewInteraction.h:
30         * UIProcess/ios/WKContentViewInteraction.mm:
31         (-[WKContentView makeTextWritingDirectionNaturalForWebView:]):
32         (-[WKContentView makeTextWritingDirectionLeftToRightForWebView:]):
33         (-[WKContentView makeTextWritingDirectionRightToLeftForWebView:]):
34
35         Implement the new SPI (see above for more details).
36
37         (-[WKContentView canPerformActionForWebView:withSender:]):
38
39         Implement -canPerformAction: for LTR and RTL actions. To match existing UIWebView behavior, we only enable
40         these actions if either the base writing direction is RTL, or the user has an active RTL keyboard. This means,
41         for instance, that in the case where a user with only an English keyboard is editing LTR content, we would never
42         show an option to convert to RTL.
43
44         * WebProcess/WebPage/WebPage.cpp:
45         (WebKit::WebPage::editorState const):
46
47 2019-02-15  Alex Christensen  <achristensen@webkit.org>
48
49         Make WebPaymentCoordinatorProxy more robust and modern
50         https://bugs.webkit.org/show_bug.cgi?id=194678
51
52         Reviewed by Andy Estes.
53
54         Use WeakPtr instead of storing raw pointers in lambdas or the global activePaymentCoordinatorProxy to avoid UAF problems.
55         Call CompletionHandlers in all code paths to avoid hangs.
56         Use Delayed instead of LegacySync for synchronous messaging to progress towards removing LegacySync messages.
57
58         * Scripts/webkit/messages.py:
59         * UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:
60         (WebKit::activePaymentCoordinatorProxy):
61         (WebKit::WebPaymentCoordinatorProxy::~WebPaymentCoordinatorProxy):
62         (WebKit::WebPaymentCoordinatorProxy::availablePaymentNetworks):
63         (WebKit::WebPaymentCoordinatorProxy::canMakePayments):
64         (WebKit::WebPaymentCoordinatorProxy::showPaymentUI):
65         (WebKit::WebPaymentCoordinatorProxy::didReachFinalState):
66         * UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
67         * UIProcess/ApplePay/WebPaymentCoordinatorProxy.messages.in:
68         * UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm:
69         (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
70         * UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
71         (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
72
73 2019-02-15  Youenn Fablet  <youenn@apple.com>
74
75         Make ServiceWorkerClientFetch closer to WebResourceLoader
76         https://bugs.webkit.org/show_bug.cgi?id=194651
77
78         Unreviewed, build fix for WPE.
79
80         * WebProcess/Storage/WebServiceWorkerFetchTaskClient.h:
81
82 2019-02-15  Chris Dumez  <cdumez@apple.com>
83
84         Regression(PSON) Navigating quickly back and forth can lead to getting 'about:blank' in the backforward list
85         https://bugs.webkit.org/show_bug.cgi?id=194717
86         <rdar://problem/47884404>
87
88         Reviewed by Brady Eidson.
89
90         When the client does a history navigation, the UIProcess sends a WebPage::GoToBackForwardItem IPC to the
91         WebProcess and the WebProcess sends a WebPageProxy::BackForwardGoToItem IPC back to the UIProcess to
92         update the current item in the BackForwardList. This means that there is a slight delay between the
93         point a client requests a history navigation and the point where the BackForwardList's current item gets
94         update. This delay is pre-existing behavior and not new to PSON.
95
96         However, with PSON enabled, if we decide to process-swap for the history navigation, we'll tell the
97         previous (committed) process to ignore the load and we ask a new (provisional) process to do the history
98         navigation. When the previous process receives the request to ignore the history navigation, it restores
99         the History's current item to the one previous the navigation, which sends a WebPageProxy::GoToBackForwardItem
100         IPC to the UIProcess to update the BackForwardList as well. In parallel, the new process starts the
101         history navigation and also sends a WebPageProxy::GoToBackForwardItem to update the BackForwardList's
102         current item as well. We end up with a race between the 2 GoToBackForwardItem IPC messages coming from
103         the old and new process. If the old process's message loses the race, we end up with the wrong current
104         history item getting set in the UIProcess. Later, when we commit the provisional load and try to suspend
105         the previous page, we would save the SuspendedPage on the *wrong* BackForwardList item. If one tries to
106         load this BackForwardList item later, we'll use its SuspendedPage and try to unsuspend it. However,
107         because the PageCache entry is saved on another HistoryItem than the one getting loaded in the WebProcess
108         side, we attempt to do a regular load instead of a PageCache restore. We end up failing the load because
109         pages cannot trigger new loads while in page cache. Because the load fails, we end up loading the
110         initial empty document and this is how we end up with 'about:blank' in the back forward list.
111
112         To address the issue, update WebPageProxy::backForwardGoToItem() to ignore messages from the old/committed
113         WebProcess when there is a pending provisional load. If the committed processes starts a legit new
114         load, it would clear any existing pending provisional load before attempting the call backForwardGoToItem().
115         As a result, ignoring such messages from the old processes when there is a pending provisional load is
116         safe.
117
118         In the future, we should probably move more of the history / backForwardList management to the UIProcess
119         to avoid this sort of issues. This would be a much larger refactoring though so I am going with this
120         simpler fix that is easily cherry-pickable for now.
121
122         * UIProcess/WebPageProxy.cpp:
123         (WebKit::WebPageProxy::suspendCurrentPageIfPossible):
124         (WebKit::WebPageProxy::continueNavigationInNewProcess):
125         (WebKit::WebPageProxy::backForwardGoToItem):
126
127 2019-02-15  Alex Christensen  <achristensen@webkit.org>
128
129         Update IPC code generator unit test expectations after r241595
130         https://bugs.webkit.org/show_bug.cgi?id=194679
131
132         * Scripts/webkit/LegacyMessageReceiver-expected.cpp:
133         (WebKit::WebPage::didReceiveSyncWebPageMessage):
134         * Scripts/webkit/MessageReceiver-expected.cpp:
135         (WebKit::WebPage::didReceiveSyncMessage):
136
137 2019-02-15  Youenn Fablet  <youenn@apple.com>
138
139         Make ServiceWorkerClientFetch closer to WebResourceLoader
140         https://bugs.webkit.org/show_bug.cgi?id=194651
141
142         Reviewed by Alex Christensen.
143
144         The goal of this refactoring is to, at some point use the regular network process load path for service worker loads.
145         This should simplify things and allow less IPC exchanges, for instance in the case of fetch not handled by service worker.
146
147         Introduce two IPC messages for supporting redirect responses and allow the didReceiveResponse/continueDidReceiveResponse
148         handshake for navigation loads.
149
150         This makes ServiceWorker having to buffer load information for this particular case.
151
152         * NetworkProcess/NetworkProcess.cpp:
153         (WebKit::NetworkProcess::didReceiveFetchRedirectResponse):
154         (WebKit::NetworkProcess::didReceiveFetchResponse):
155         * NetworkProcess/NetworkProcess.h:
156         * NetworkProcess/NetworkProcess.messages.in:
157         * NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
158         (WebKit::WebSWServerConnection::continueDidReceiveFetchResponse):
159         (WebKit::WebSWServerConnection::didReceiveFetchRedirectResponse):
160         (WebKit::WebSWServerConnection::didReceiveFetchResponse):
161         * NetworkProcess/ServiceWorker/WebSWServerConnection.h:
162         * NetworkProcess/ServiceWorker/WebSWServerConnection.messages.in:
163         * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
164         (WebKit::ServiceWorkerClientFetch::start):
165         (WebKit::ServiceWorkerClientFetch::didReceiveRedirectResponse):
166         (WebKit::ServiceWorkerClientFetch::didReceiveResponse):
167         (WebKit::ServiceWorkerClientFetch::didReceiveData):
168         (WebKit::ServiceWorkerClientFetch::didFinish):
169         (WebKit::ServiceWorkerClientFetch::didFail):
170         (WebKit::ServiceWorkerClientFetch::didNotHandle):
171         (WebKit::ServiceWorkerClientFetch::cancel):
172         * WebProcess/Storage/ServiceWorkerClientFetch.h:
173         * WebProcess/Storage/ServiceWorkerClientFetch.messages.in:
174         * WebProcess/Storage/WebSWClientConnection.cpp:
175         (WebKit::WebSWClientConnection::startFetch):
176         (WebKit::WebSWClientConnection::cancelFetch):
177         (WebKit::WebSWClientConnection::continueDidReceiveFetchResponse):
178         * WebProcess/Storage/WebSWClientConnection.h:
179         * WebProcess/Storage/WebSWContextManagerConnection.cpp:
180         (WebKit::WebSWContextManagerConnection::continueDidReceiveFetchResponse):
181         (WebKit::WebSWContextManagerConnection::startFetch):
182         * WebProcess/Storage/WebSWContextManagerConnection.h:
183         * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
184         * WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp:
185         (WebKit::WebServiceWorkerFetchTaskClient::WebServiceWorkerFetchTaskClient):
186         (WebKit::WebServiceWorkerFetchTaskClient::didReceiveRedirection):
187         (WebKit::WebServiceWorkerFetchTaskClient::didReceiveResponse):
188         (WebKit::WebServiceWorkerFetchTaskClient::didReceiveData):
189         (WebKit::WebServiceWorkerFetchTaskClient::didReceiveFormDataAndFinish):
190         (WebKit::WebServiceWorkerFetchTaskClient::didFail):
191         (WebKit::WebServiceWorkerFetchTaskClient::didFinish):
192         (WebKit::WebServiceWorkerFetchTaskClient::continueDidReceiveResponse):
193         * WebProcess/Storage/WebServiceWorkerFetchTaskClient.h:
194
195 2019-02-15  Brian Burg  <bburg@apple.com>
196
197         [Mac] WebInspectorUI.framework does not need to be soft-linked anymore
198         https://bugs.webkit.org/show_bug.cgi?id=194411
199         <rdar://problem/47787614>
200
201         Reviewed by Joseph Pecoraro.
202
203         * Configurations/WebKit.xcconfig:
204         Conditionalize weak linking to WebInspectorUI.framework for Mac only.
205
206         * UIProcess/mac/WebInspectorProxyMac.mm:
207         (WebKit::WebInspectorProxy::inspectorPageURL):
208         (WebKit::WebInspectorProxy::inspectorTestPageURL):
209         (WebKit::WebInspectorProxy::inspectorBaseURL):
210         * WebProcess/WebPage/mac/WebInspectorUIMac.mm:
211         (WebKit::webInspectorUILocalizedStringsURL):
212         Rewrite uses of the bundle to exit early if bundle couldn't be loaded.
213
214 2019-02-15  Alex Christensen  <achristensen@webkit.org>
215
216         IPC code should support messages with both Delayed and WantsConnection attributes
217         https://bugs.webkit.org/show_bug.cgi?id=194679
218
219         Reviewed by Geoffrey Garen.
220
221         * Platform/IPC/HandleMessage.h:
222         (IPC::callMemberFunctionImpl):
223         (IPC::callMemberFunction):
224         (IPC::handleMessageDelayedWantsConnection):
225         * Scripts/webkit/messages.py:
226         * UIProcess/WebStorage/StorageManager.cpp:
227         (WebKit::StorageManager::getValues):
228         * UIProcess/WebStorage/StorageManager.h:
229         * UIProcess/WebStorage/StorageManager.messages.in:
230
231 2019-02-15  Commit Queue  <commit-queue@webkit.org>
232
233         Unreviewed, rolling out r241559 and r241566.
234         https://bugs.webkit.org/show_bug.cgi?id=194710
235
236         Causes layout test crashes under GuardMalloc (Requested by
237         ryanhaddad on #webkit).
238
239         Reverted changesets:
240
241         "[WTF] Add environment variable helpers"
242         https://bugs.webkit.org/show_bug.cgi?id=192405
243         https://trac.webkit.org/changeset/241559
244
245         "Unreviewed build fix for WinCairo Debug after r241559."
246         https://trac.webkit.org/changeset/241566
247
248 2019-02-15  Michael Catanzaro  <mcatanzaro@igalia.com>
249
250         [WPE][GTK] Defer sandboxing APIs to 2.26
251         https://bugs.webkit.org/show_bug.cgi?id=194274
252
253         Reviewed by Carlos Garcia Campos.
254
255         The web process sandbox has not been widely-tested yet, so we should defer the new APIs to
256         2.26.
257
258         * UIProcess/API/glib/WebKitWebContext.cpp:
259
260 2019-02-10  Darin Adler  <darin@apple.com>
261
262         Replace more uses of String::format with StringConcatenate (mostly non-Apple platform-specific cases)
263         https://bugs.webkit.org/show_bug.cgi?id=194487
264
265         Reviewed by Daniel Bates.
266
267         * NetworkProcess/NetworkProcess.cpp:
268         (WebKit::NetworkProcess::switchToNewTestingSession): Use makeString instead of String::format.
269         * NetworkProcess/soup/NetworkProcessSoup.cpp:
270         (WebKit::buildAcceptLanguages): Ditto.
271         * UIProcess/API/glib/IconDatabase.cpp:
272         (WebKit::IconDatabase::performURLImport): Ditto.
273         * UIProcess/gtk/InputMethodFilter.cpp:
274         (WebKit::InputMethodFilter::logConfirmCompositionForTesting): Ditto.
275         (WebKit::InputMethodFilter::logSetPreeditForTesting): Ditto.
276
277 2019-02-15  Truitt Savell  <tsavell@apple.com>
278
279         Unreviewed, rolling out r241564.
280
281         Caused 50+ Timeouts on Mac WK2, mostly in the http/ directory
282
283         Reverted changeset:
284
285         "[Mac] WebInspectorUI.framework does not need to be soft-
286         linked anymore"
287         https://bugs.webkit.org/show_bug.cgi?id=194411
288         https://trac.webkit.org/changeset/241564
289
290 2019-02-15  Carlos Garcia Campos  <cgarcia@igalia.com>
291
292         Unreviewed. Fix GTK+ build after r241556
293
294         I guess this is due to unified builds after a new file being added in r241556.
295
296         * UIProcess/API/C/WKAuthenticationDecisionListener.cpp:
297         * UIProcess/API/C/WKPage.cpp:
298
299 2019-02-14  Brent Fulgham  <bfulgham@apple.com>
300
301         REGRESSION (r240446): Storage Access API does not handle domains consistently
302         https://bugs.webkit.org/show_bug.cgi?id=194664
303
304         Reviewed by Alex Christensen.
305         
306         During my refactoring of the ResourceLoadStatistics code, I introduced two bugs:
307         (1) I neglected to be consistent in my use of 'primaryDomain', causing some Storage
308         Access API code paths to store approves under one domain (e.g., 'www.example.com'),
309         while checking status under the eTLD+1 (e.g., 'example.com'). The exact string matching
310         requirement caused these to get missed.
311
312         (2) I used a move operator before a final set of copies of domain names, leading to
313         some empty strings being passed to Storage Access API calls.
314
315         Both issues are corrected in this patch.
316
317         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
318         (WebKit::WebResourceLoadStatisticsStore::setPrevalentResourceForDebugMode): Always make the
319         domain comply with our 'primaryDomain' logic.
320         (WebKit::WebResourceLoadStatisticsStore::hasStorageAccess): Ditto.
321         (WebKit::WebResourceLoadStatisticsStore::requestStorageAccessGranted): Ditto.
322         (WebKit::WebResourceLoadStatisticsStore::logFrameNavigation): Ditto.
323         (WebKit::WebResourceLoadStatisticsStore::logWebSocketLoading): Ditto.
324         (WebKit::WebResourceLoadStatisticsStore::logSubresourceLoading): Ditto.
325         (WebKit::WebResourceLoadStatisticsStore::logSubresourceRedirect): Ditto.
326         (WebKit::WebResourceLoadStatisticsStore::logUserInteraction): Ditto.
327         (WebKit::WebResourceLoadStatisticsStore::clearUserInteraction): Ditto.
328         (WebKit::WebResourceLoadStatisticsStore::hasHadUserInteraction): Ditto.
329         (WebKit::WebResourceLoadStatisticsStore::setLastSeen): Ditto.
330         (WebKit::WebResourceLoadStatisticsStore::setPrevalentResource): Ditto.
331         (WebKit::WebResourceLoadStatisticsStore::setVeryPrevalentResource): Ditto.
332         (WebKit::WebResourceLoadStatisticsStore::isPrevalentResource): Ditto.
333         (WebKit::WebResourceLoadStatisticsStore::isVeryPrevalentResource): Ditto.
334         (WebKit::WebResourceLoadStatisticsStore::isRegisteredAsSubresourceUnder): Ditto.
335         (WebKit::WebResourceLoadStatisticsStore::isRegisteredAsSubFrameUnder): Ditto.
336         (WebKit::WebResourceLoadStatisticsStore::isRegisteredAsRedirectingTo): Ditto.
337         (WebKit::WebResourceLoadStatisticsStore::clearPrevalentResource): Ditto.
338         (WebKit::WebResourceLoadStatisticsStore::setGrandfathered): Ditto.
339         (WebKit::WebResourceLoadStatisticsStore::isGrandfathered): Ditto.
340         (WebKit::WebResourceLoadStatisticsStore::setSubframeUnderTopFrameOrigin): Ditto.
341         (WebKit::WebResourceLoadStatisticsStore::setSubresourceUnderTopFrameOrigin): Ditto.
342         (WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectTo): Ditto.
343         (WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectFrom): Ditto.
344         (WebKit::WebResourceLoadStatisticsStore::setTopFrameUniqueRedirectTo): Ditto.
345         (WebKit::WebResourceLoadStatisticsStore::setTopFrameUniqueRedirectFrom): Ditto.
346         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
347         (WebKit::WebsiteDataStore::hasStorageAccess): Always make the
348         domain comply with our 'primaryDomain' logic.
349         (WebKit::WebsiteDataStore::requestStorageAccess): Ditto. Also make copy of domain
350         names before moving them to the completion handler.
351         (WebKit::WebsiteDataStore::grantStorageAccess): Ditto.
352         * WebProcess/WebPage/WebPage.cpp:
353         (WebKit::WebPage::hasStorageAccess):  Always make the domain comply with our
354         'primaryDomain' logic.
355         (WebKit::WebPage::requestStorageAccess): Ditto.
356
357 2019-02-14  Tim Horton  <timothy_horton@apple.com>
358
359         Fix the build.
360
361         * UIProcess/ios/WKDrawingView.mm:
362         (-[WKDrawingView renderedDrawing]):
363
364 2019-02-14  Youenn Fablet  <youenn@apple.com>
365
366         ASSERTION FAILED: m_caches.isEmpty() || !m_pendingInitializationCallbacks.isEmpty() in WebKit::CacheStorage::Caches::clearMemoryRepresentation()
367         https://bugs.webkit.org/show_bug.cgi?id=188393
368         <rdar://problem/43025665>
369
370         Reviewed by Alex Christensen.
371
372         In case Caches::dispose is called, clearMemoryRepresentation might be called if there is no active cache.
373         We also ensure to not clear the memory representation if there is any remaining removed cache.
374         Update the clearMemoryRepresentation assertion to take that into account.
375
376         In case a Caches is cleared twice, the clearMemoryRepresentation assertion will assert while it should not.
377         In that case m_storage is null the second time. Update the assertion accordingly.
378
379         * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
380         (WebKit::CacheStorage::Caches::hasActiveCache const):
381         (WebKit::CacheStorage::Caches::dispose):
382         (WebKit::CacheStorage::Caches::clearMemoryRepresentation):
383         * NetworkProcess/cache/CacheStorageEngineCaches.h:
384
385 2019-02-14  Brian Burg  <bburg@apple.com>
386
387         [Mac] WebInspectorUI.framework does not need to be soft-linked anymore
388         https://bugs.webkit.org/show_bug.cgi?id=194411
389         <rdar://problem/47787614>
390
391         Reviewed by Joseph Pecoraro.
392
393         * Configurations/WebKit.xcconfig:
394         Conditionalize weak linking to WebInspectorUI.framework for Mac only.
395
396         * UIProcess/mac/WebInspectorProxyMac.mm:
397         (WebKit::WebInspectorProxy::inspectorPageURL):
398         (WebKit::WebInspectorProxy::inspectorTestPageURL):
399         (WebKit::WebInspectorProxy::inspectorBaseURL):
400         * WebProcess/WebPage/mac/WebInspectorUIMac.mm:
401         (WebKit::webInspectorUILocalizedStringsURL):
402         Rewrite uses of the bundle to exit early if bundle couldn't be loaded.
403
404 2019-02-14  Michael Catanzaro  <mcatanzaro@igalia.com>
405
406         [GTK] WebKitGTK+ -> WebKitGTK
407         https://bugs.webkit.org/show_bug.cgi?id=194658
408
409         Reviewed by Alex Christensen.
410
411         This renames WebKitGTK+ to WebKitGTK in a few user-visible places: the API documentation,
412         the pkg-config, and an error message.
413
414         In a couple places where it's exposed in WPE documentation, WPE is now mentioned, or the
415         reference to "WebKitGTK+" is changed to just "WebKit."
416
417         * UIProcess/API/glib/WebKitSettings.cpp:
418         (webkit_settings_class_init):
419         * UIProcess/API/glib/WebKitWebView.cpp:
420         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
421         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPrivateGtk.h:
422         * gtk/webkit2gtk-web-extension.pc.in:
423         * gtk/webkit2gtk.pc.in:
424
425 2019-02-14  Ross Kirsling  <ross.kirsling@sony.com>
426
427         [WTF] Add environment variable helpers
428         https://bugs.webkit.org/show_bug.cgi?id=192405
429
430         Reviewed by Michael Catanzaro.
431
432         * NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp:
433         (main):
434         * Platform/unix/EnvironmentUtilities.cpp:
435         (WebKit::EnvironmentUtilities::stripValuesEndingWithString):
436         * Platform/unix/LoggingUnix.cpp:
437         (WebKit::logLevelString):
438         * Platform/win/LoggingWin.cpp:
439         (WebKit::logLevelString):
440         * PluginProcess/mac/PluginProcessMac.mm:
441         (WebKit::shouldCallRealDebugger):
442         * Shared/Plugins/unix/PluginSearchPath.cpp:
443         (WebKit::pluginsDirectories):
444         * Shared/glib/ProcessExecutablePathGLib.cpp:
445         (WebKit::findWebKitProcess):
446         * UIProcess/API/glib/WebKitSettings.cpp:
447         (webKitSettingsConstructed):
448         (webKitSettingsSetProperty):
449         * UIProcess/API/glib/WebKitWebContext.cpp:
450         (injectedBundleDirectory):
451         (webkitWebContextConstructed):
452         * UIProcess/API/gtk/WebKitWebViewGtk.cpp:
453         (webkitWebViewMaximizeWindow):
454         (webkitWebViewRestoreWindow):
455         * UIProcess/API/wpe/WPEView.cpp:
456         (WKWPE::m_backend):
457         * UIProcess/AuxiliaryProcessProxy.cpp:
458         (WebKit::AuxiliaryProcessProxy::getLaunchOptions):
459         * UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
460         (WebKit::XDGDBusProxyLauncher::launch):
461         (WebKit::bindDBusSession):
462         (WebKit::bindX11):
463         (WebKit::bindWayland):
464         (WebKit::bindPulse):
465         (WebKit::bindPathVar):
466         (WebKit::bindGStreamerData):
467         (WebKit::bubblewrapSpawn):
468         * UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:
469         (WebKit::ProcessLauncher::launchProcess):
470         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
471         (WebKit::systemDirectoryPath):
472         (WebKit::ProcessLauncher::launchProcess):
473         * UIProcess/glib/WebProcessPoolGLib.cpp:
474         (WebKit::memoryPressureMonitorDisabled):
475         (WebKit::WebProcessPool::platformInitialize):
476         (WebKit::WebProcessPool::platformInitializeWebProcess):
477         * UIProcess/gtk/HardwareAccelerationManager.cpp:
478         (WebKit::HardwareAccelerationManager::HardwareAccelerationManager):
479         * WebProcess/EntryPoint/unix/WebProcessMain.cpp:
480         (main):
481         * WebProcess/gtk/WebProcessMainGtk.cpp:
482         * WebProcess/wpe/WebProcessMainWPE.cpp:
483         Utilize WTF::Environment where possible.
484
485 2019-02-14  Jiewen Tan  <jiewen_tan@apple.com>
486
487         Handle _WKNavigationActionPolicyAllowWithoutTryingAppLink for LoadOptimizer
488         https://bugs.webkit.org/show_bug.cgi?id=194640
489         <rdar://problem/48064140>
490
491         Reviewed by Brent Fulgham.
492
493         * UIProcess/Cocoa/NavigationState.mm:
494         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
495
496 2019-02-14  Chris Dumez  <cdumez@apple.com>
497
498         [PSON] Introduce a WebContent Process cache
499         https://bugs.webkit.org/show_bug.cgi?id=194594
500         <rdar://problem/46793397>
501
502         Reviewed by Geoff Garen.
503
504         Introduce a WebContent Process cache to reduce the number of process launches when
505         process swap on navigation is enabled, and to reduce the power cost of the feature.
506
507         If a WebProcess loaded pages from a single registrable domain then it is eligible
508         for the cache. When process-swapping on navigation to a new registrable domain, we
509         now attempt to retrieve a process from the cache for the domain in question instead
510         of always launching a new one.
511
512         The WebProcess cache currently has the following attributes:
513         - It may contains 4 processes per GB of RAM the machine has, up to 30 processes.
514         - WebProcesses automatically get evicted from the cache after 30 minutes.
515         - If the application is no longer the active app, then the cache will get cleared
516           after 5 minutes.
517         - WebProcesses that are in the cache are reported as "(Cached)" in Activity Monitor.
518
519         The WebProcess cache is currently disabled by default and can by enabled by the
520         client via SPI.
521
522         * Shared/WebBackForwardListItem.cpp:
523         (WebKit::WebBackForwardListItem::WebBackForwardListItem):
524         * Shared/WebBackForwardListItem.h:
525         (WebKit::WebBackForwardListItem::lastProcessIdentifier const):
526         (WebKit::WebBackForwardListItem::setLastProcessIdentifier):
527         Add new lastProcessIdentifier data member that reflects which process this item
528         was last loaded in. It is normally identical to the identifier of the process
529         that created the item but it gets overriden in case of cross-site client-side
530         redirect, since a new process takes over the item in this case.
531
532         * Sources.txt:
533         Add new source file.
534
535         * UIProcess/API/APIProcessPoolConfiguration.cpp:
536         (API::ProcessPoolConfiguration::copy):
537         * UIProcess/API/APIProcessPoolConfiguration.h:
538         * UIProcess/API/C/WKContextConfigurationRef.cpp:
539         (WKContextConfigurationUsesWebProcessCache):
540         (WKContextConfigurationSetUsesWebProcessCache):
541         * UIProcess/API/C/WKContextConfigurationRef.h:
542         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
543         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
544         (-[_WKProcessPoolConfiguration setUsesWebProcessCache:]):
545         (-[_WKProcessPoolConfiguration usesWebProcessCache]):
546         Add new SPI to enable the WebProcess cache.
547
548         * UIProcess/API/Cocoa/WKProcessPool.mm:
549         (-[WKProcessPool _webProcessCountIgnoringPrewarmedAndCached]):
550         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
551         Add new SPI for testing which returns the number of WebProcesses ignoring
552         both prewarmed and cached ones.
553
554         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
555         (WebKit::WebProcessPool::registerNotificationObservers):
556         (WebKit::WebProcessPool::unregisterNotificationObservers):
557         Add application active state observers as the WebProcess cache gets cleared
558         when the application resigns active state for more than 5 minutes.
559
560         * UIProcess/ProvisionalPageProxy.cpp:
561         (WebKit::ProvisionalPageProxy::loadRequest):
562         When doing a load in a new process with the BackForwardList locked (i.e. client-side
563         redirect), make sure we update the last process identifier for the BackForwardListItem.
564         This is important because the logic in WebProcessPool::processForNavigation() relies on
565         this identifier to select which process to do the history navigation into, and we want
566         to do the load in the post-redirect process, not the pre-redirect one.
567
568         * UIProcess/WebPageProxy.cpp:
569         (WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
570         Tell the WebProcess whenever a main frame provisional load is started, providing the URL.
571
572         * UIProcess/WebProcessCache.cpp: Added.
573         (WebKit::WebProcessCache::WebProcessCache):
574         (WebKit::WebProcessCache::addProcess):
575         (WebKit::WebProcessCache::takeProcess):
576         (WebKit::WebProcessCache::updateMaximumSize):
577         (WebKit::WebProcessCache::clear):
578         (WebKit::WebProcessCache::setApplicationIsActive):
579         (WebKit::WebProcessCache::evictProcess):
580         (WebKit::WebProcessCache::CachedProcess::CachedProcess):
581         (WebKit::WebProcessCache::CachedProcess::~CachedProcess):
582         (WebKit::WebProcessCache::CachedProcess::takeProcess):
583         (WebKit::WebProcessCache::CachedProcess::evictionTimerFired):
584         * UIProcess/WebProcessCache.h: Added.
585         (WebKit::WebProcessCache::maximumSize):
586         (WebKit::WebProcessCache::size const):
587         (WebKit::WebProcessCache::CachedProcess::process):
588         Add process cache implementation.
589
590         * UIProcess/WebProcessPool.cpp:
591         (WebKit::m_webProcessCache):
592         WebProcessCache is stored on the WebProcessPool via m_webProcessCache data member.
593
594         (WebKit::WebProcessPool::~WebProcessPool):
595         Clear the WebProcess cache in the destructor.
596
597         (WebKit::WebProcessPool::setApplicationIsActive):
598         Notify the WebProcessCache whenever the application's active state changes.
599
600         (WebKit::WebProcessPool::createWebPage):
601         If the state of PSON changes via the experimental features menu, dynamically
602         update the WebProcessCache's size. This is needed because the cache is disabled
603         when PSON is disabled.
604
605         (WebKit::WebProcessPool::handleMemoryPressureWarning):
606         Clear the WebProcess cache on memory pressure.
607
608         (WebKit::WebProcessPool::processForNavigationInternal):
609         Query the WebProcessCache before attempting to create a new WebProcess for a cross-site
610         navigation.
611
612         (WebKit::WebProcessPool::findReusableSuspendedPageProcess):
613         This logic was split out of processForNavigationInternal() to reduce the size
614         of the method.
615
616         * UIProcess/WebProcessPool.h:
617         * UIProcess/WebProcessProxy.cpp:
618         (WebKit::WebProcessProxy::setIsInProcessCache):
619         Update the isInProcessCache flag on the WebProcessProxy and send an IPC to the WebContent
620         process so that it can update its name in Activity Monitor.
621         We also need to stop holding a strong reference to the WebProcessPool whenever the process
622         is in the cache, similarly to what we do for pre-warmed processes, given that such processes
623         should not keep the process pool alive.
624
625         (WebKit::WebProcessProxy::addExistingWebPage):
626         Assert that we never try to add a page to a cached process, it should be taken out of the
627         cache before use.
628
629         (WebKit::WebProcessProxy::hasProvisionalPageWithID const):
630         (WebKit::WebProcessProxy::isAllowedToUpdateBackForwardItem const):
631         (WebKit::WebProcessProxy::updateBackForwardItem):
632         In case of client-side redirects, the previous process would sometimes send an IPC causing
633         the UIProcess' backforward list item to get updated with the pre-redirect URL after we've
634         already redirected. This previously would be unlikely to occur because we do not suspend
635         client-redirect pages and their process would normally exit before getting a chance to send
636         the IPC. However, with the process cache, the bug became obvious as the process would stay
637         alive and send up the "bad" IPC. To address the issue, we now only let the IPC update the
638         item if the item's page is (still) associated with the process. In the future, we may want
639         to update the IPC so that it gets sent to the WebPageProxy instead of the WebProcessProxy.
640
641         (WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch):
642         If a cached WebProcess crashes, remove it from the cache so that we do not attempt to use
643         it for a load later.
644
645         (WebKit::WebProcessProxy::canBeAddedToWebProcessCache const):
646         Only cache WebProcesses that have loaded a single registrable domain. Also prevent caching
647         for service worker and inspector processes.
648
649         (WebKit::WebProcessProxy::maybeShutDown):
650         If the process is cacheable, add it to the cache instead of shutting it down right away.
651
652         (WebKit::WebProcessProxy::canTerminateAuxiliaryProcess):
653         Make sure we do not attempt to terminate a processes that is in the cache.
654
655         (WebKit::WebProcessProxy::didStartProvisionalLoadForMainFrame):
656         Whenever a main frame provisional load starts, make sure we update the process's associated
657         registrable domain. nullopt indicates that there is no associated domain yet. Null string
658         indicates that the process is associated with several registrable domain and is therefore
659         not eligible for caching.
660
661         * UIProcess/WebProcessProxy.h:
662         (WebKit::WebProcessProxy::registrableDomain const):
663         (WebKit::WebProcessProxy::isInProcessCache const):
664         (WebKit::WebProcessProxy::provisionalPageCount const):
665         Add convenience getters.
666
667         * WebKit.xcodeproj/project.pbxproj:
668         Add new files to project.
669
670         * WebProcess/WebProcess.cpp:
671         (WebKit::WebProcess::setIsInProcessCache):
672         * WebProcess/WebProcess.h:
673         * WebProcess/WebProcess.messages.in:
674         * WebProcess/cocoa/WebProcessCocoa.mm:
675         (WebKit::WebProcess::updateProcessName):
676         Update the WebProcess' name in Activity Monitor whenever it goes into or out of the WebProcess
677         cache.
678
679 2019-02-14  Per Arne Vollan  <pvollan@apple.com>
680
681         [iOS] Open sandbox for certain calls.
682         https://bugs.webkit.org/show_bug.cgi?id=194626
683
684         Reviewed by Brent Fulgham.
685
686         Reporting shows that certain calls needs to be allowed in the sandbox.
687
688         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
689
690 2019-02-14  Chris Fleizach  <cfleizach@apple.com>
691
692         AX: ARIA Reflection was disabled in error
693         https://bugs.webkit.org/show_bug.cgi?id=194647
694         <rdar://problem/48068336>
695
696         Reviewed by Ryosuke Niwa.
697
698         * Shared/WebPreferences.yaml:
699
700 2019-02-14  Commit Queue  <commit-queue@webkit.org>
701
702         Unreviewed, rolling out r241486.
703         https://bugs.webkit.org/show_bug.cgi?id=194655
704
705         causing API failures in builds (Requested by ShawnRoberts on
706         #webkit).
707
708         Reverted changeset:
709
710         "[Cocoa] Media elements will restart network buffering just
711         before suspending"
712         https://bugs.webkit.org/show_bug.cgi?id=193691
713         https://trac.webkit.org/changeset/241486
714
715 2019-02-14  Youenn Fablet  <youenn@apple.com>
716
717         Do not add a caches to its engine if the salt cannot be initialized
718         https://bugs.webkit.org/show_bug.cgi?id=194604
719
720         Reviewed by Antti Koivisto.
721
722         This is a follow-up to https://bugs.webkit.org/show_bug.cgi?id=194588.
723         We should return early if initialize fails.
724
725         * NetworkProcess/cache/CacheStorageEngine.cpp:
726         (WebKit::CacheStorage::Engine::readCachesFromDisk):
727
728 2019-02-13  Carlos Garcia Campos  <cgarcia@igalia.com>
729
730         [GTK] Use a scrolled window for script alerts text
731         https://bugs.webkit.org/show_bug.cgi?id=184875
732
733         Reviewed by Michael Catanzaro.
734
735         To ensure long text doesn't make the dialog bigger.
736
737         * UIProcess/API/gtk/WebKitScriptDialogImpl.cpp:
738         (webkitScriptDialogImplConstructed): Use PANGO_ELLIPSIZE_END for the title and add a scrolled window for the body.
739         (webkitScriptDialogImplSetText): Helper function to set the dialog body, ensuring the scrolled window fills the
740         dialog available size.
741         (webkitScriptDialogImplNew): It now receives the maximum size and uses webkitScriptDialogImplSetText().
742         * UIProcess/API/gtk/WebKitScriptDialogImpl.h:
743         * UIProcess/API/gtk/WebKitWebViewGtk.cpp:
744         (webkitWebViewScriptDialog): Pass the 80% of the web view size as the maximum size of script dialogs.
745
746 2019-02-13  Ryosuke Niwa  <rniwa@webkit.org>
747
748         Crash in WKBundleFrameGetParentFrame when called inside didRemoveFrameFromHierarchy
749         https://bugs.webkit.org/show_bug.cgi?id=194641
750
751         Reviewed by Geoffrey Garen.
752
753         Fixed the bug by adding a null check to WebFrame::parentFrame.
754
755         * WebProcess/WebPage/WebFrame.cpp:
756         (WebKit::WebFrame::parentFrame const):
757
758 2019-02-13  Timothy Hatcher  <timothy@apple.com>
759
760         Allow some deprecations in WKDrawingView.
761         https://bugs.webkit.org/show_bug.cgi?id=194636
762
763         Reviewed by Wenson Hsieh.
764
765         * UIProcess/ios/WKDrawingView.mm:
766         (-[WKDrawingView PNGRepresentation]):
767         (-[WKDrawingView loadDrawingFromPNGRepresentation:]):
768         (-[WKDrawingView _canvasViewWillBeginDrawing:]):
769         (-[WKDrawingView didChangeInk:]):
770
771 2019-02-13  Jer Noble  <jer.noble@apple.com>
772
773         [Cocoa] Media elements will restart network buffering just before suspending
774         https://bugs.webkit.org/show_bug.cgi?id=193691
775
776         Reviewed by Eric Carlson.
777
778         When the WebProcess receives a notification that the process is about to become
779         suspended, it tells the MemoryPressureHandler to release all critical memory. This
780         has the side effect of causing AVFoundation-backed media elements to dump their
781         in-memory caches and start downloading media data again. Instead, media elements
782         should all stop buffering media data during suspension. Add new testing SPI to
783         simulate suspension and resume messages.
784
785         * UIProcess/API/Cocoa/WKWebView.mm:
786         (-[WKWebView _processWillSuspendImminentlyForTesting]):
787         (-[WKWebView _processDidResumeForTesting]):
788         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
789         * UIProcess/WebProcessProxy.h:
790         * UIProcess/ios/WKInkPickerView.mm:
791         * WebProcess/WebPage/WebPage.cpp:
792         (WebKit::WebPage::suspendAllMediaBuffering):
793         (WebKit::WebPage::resumeAllMediaBuffering):
794         * WebProcess/WebPage/WebPage.h:
795         * WebProcess/WebProcess.cpp:
796         (WebKit::WebProcess::actualPrepareToSuspend):
797         (WebKit::WebProcess::cancelPrepareToSuspend):
798         (WebKit::WebProcess::processDidResume):
799         (WebKit::WebProcess::suspendAllMediaBuffering):
800         (WebKit::WebProcess::resumeAllMediaBuffering):
801         * WebProcess/WebProcess.h:
802
803 2019-02-13  Per Arne Vollan  <pvollan@apple.com>
804
805         [iOS] Fix sandbox violation during media playback
806         https://bugs.webkit.org/show_bug.cgi?id=194616
807         <rdar://problem/48049264>
808
809         Reviewed by Brent Fulgham.
810
811         Mach lookup to "com.apple.coremedia.figcontentkeysession.xpc" should be allowed.
812
813         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
814
815 2019-02-13  Tim Horton  <timothy_horton@apple.com>
816
817         Encrypted PDFs inside <embed> or <object> crash the Web Content process
818         https://bugs.webkit.org/show_bug.cgi?id=194605
819         <rdar://problem/19894818>
820
821         Reviewed by Andy Estes.
822
823         * WebProcess/Plugins/PDF/PDFPlugin.mm:
824         (WebKit::PDFPlugin::createPasswordEntryForm):
825         Don't try to create a password form field if we can't make form fields.
826
827         This means you will be left with a useless embedded PDF, but at least
828         the Web Content process won't crash.
829
830         We'll need to find an alternative implementation of PDF embedded form
831         fields that is compatible with <embed> and <object> if we want to support
832         this. Currently we piggy-back off the fact that we can just insert
833         <input>s into the PluginDocument's DOM, but we can't do that if there
834         is no PluginDocument, just a main document, like in the <embed> case.
835
836 2019-02-12  Jiewen Tan  <jiewen_tan@apple.com>
837
838         Further restricting webarchive loads
839         https://bugs.webkit.org/show_bug.cgi?id=194567
840         <rdar://problem/47610130>
841
842         Reviewed by Youenn Fablet.
843
844         * WebProcess/WebPage/WebPage.cpp:
845         (WebKit::WebPage::loadRequest):
846         Set a flag to indicate a load is started from clients.
847
848 2019-02-13  Michael Catanzaro  <mcatanzaro@igalia.com>
849
850         [WPE][GTK] Merge WebProcessPoolWPE.cpp and WebProcessPoolGtk.cpp
851         https://bugs.webkit.org/show_bug.cgi?id=194551
852
853         Reviewed by Carlos Garcia Campos.
854
855         * SourcesGTK.txt:
856         * SourcesWPE.txt:
857         * UIProcess/glib/WebProcessPoolGLib.cpp: Renamed from Source/WebKit/UIProcess/gtk/WebProcessPoolGtk.cpp.
858         (WebKit::initializeRemoteInspectorServer):
859         (WebKit::memoryPressureMonitorDisabled):
860         (WebKit::WebProcessPool::platformInitialize):
861         (WebKit::WebProcessPool::platformInitializeWebProcess):
862         (WebKit::WebProcessPool::platformInvalidateContext):
863         (WebKit::WebProcessPool::platformResolvePathsForSandboxExtensions):
864         * UIProcess/wpe/WebProcessPoolWPE.cpp: Removed.
865
866 2019-02-13  Michael Catanzaro  <mcatanzaro@igalia.com>
867
868         Fix -Wformat warning from r241401
869         https://bugs.webkit.org/show_bug.cgi?id=194584
870         <rdar://problem/47761293>
871
872         * WebProcess/WebPage/WebPage.cpp:
873         (WebKit::WebPage::setActivityState):
874
875 2019-02-13  Youenn Fablet  <youenn@apple.com>
876
877         Make WebRTCUnifiedPlanEnabled true by default
878         https://bugs.webkit.org/show_bug.cgi?id=194595
879
880         Reviewed by Eric Carlson.
881
882         * Shared/WebPreferences.yaml:
883
884 2019-02-13  John Wilander  <wilander@apple.com>
885
886         Store Ad Click Attribution requests in the network process
887         https://bugs.webkit.org/show_bug.cgi?id=194510
888         <rdar://problem/47650118>
889
890         Reviewed by Alex Christensen and Daniel Bates.
891
892         With this patch, WebPageProxy::didCommitLoadForFrame() now looks for
893         an AdClickAttribution object in its navigation state. If there is an
894         attribution, it sends it to the network process where the 
895         WebKit::NetworkSession stores it in an object of a new class,
896         WebKit::NetworkAdClickAttribution.
897
898         This patch also covers test infrastructure to support two new
899         TestRunner functions:
900         - dumpAdClickAttribution()
901         - clearAdClickAttribution()
902
903         * NetworkProcess/Cookies/WebCookieManager.cpp:
904             Added missing header include.
905         * NetworkProcess/Downloads/DownloadManager.cpp:
906             Added missing header include.
907         * NetworkProcess/NetworkAdClickAttribution.cpp: Added.
908         (WebKit::NetworkAdClickAttribution::ensureDestinationMapForSource):
909         (WebKit::NetworkAdClickAttribution::store):
910         (WebKit::NetworkAdClickAttribution::clear):
911         (WebKit::NetworkAdClickAttribution::toString const):
912         * NetworkProcess/NetworkAdClickAttribution.h: Added.
913             Stores WebCore::AdClickAttribution objects in a map structure.
914         * NetworkProcess/NetworkLoad.cpp:
915             Added missing header includes.
916         * NetworkProcess/NetworkProcess.cpp:
917         (WebKit::NetworkProcess::storeAdClickAttribution):
918         (WebKit::NetworkProcess::dumpAdClickAttribution):
919         (WebKit::NetworkProcess::clearAdClickAttribution):
920         * NetworkProcess/NetworkProcess.h:
921         * NetworkProcess/NetworkProcess.messages.in:
922         * NetworkProcess/NetworkSession.cpp:
923         (WebKit::NetworkSession::NetworkSession):
924         (WebKit::NetworkSession::storeAdClickAttribution):
925         (WebKit::NetworkSession::dumpAdClickAttribution):
926         (WebKit::NetworkSession::clearAdClickAttribution):
927         * NetworkProcess/NetworkSession.h:
928         * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
929             Added missing header include.
930         * Sources.txt:
931             Added NetworkProcess/NetworkAdClickAttribution.cpp.
932         * UIProcess/API/APINavigation.h:
933         (API::Navigation::adClickAttribution const):
934         * UIProcess/API/C/WKPage.cpp:
935         (WKPageDumpAdClickAttribution):
936         (WKPageClearAdClickAttribution):
937             Test infrastructure.
938         * UIProcess/API/C/WKPagePrivate.h:
939         * UIProcess/Network/NetworkProcessProxy.cpp:
940         (WebKit::NetworkProcessProxy::dumpAdClickAttribution):
941         (WebKit::NetworkProcessProxy::clearAdClickAttribution):
942             Test infrastructure.
943         * UIProcess/Network/NetworkProcessProxy.h:
944         * UIProcess/WebPageProxy.cpp:
945         (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
946             This is where pending Ad Click Attributions are forwarded to the
947             network process.
948         (WebKit::WebPageProxy::dumpAdClickAttribution):
949         (WebKit::WebPageProxy::clearAdClickAttribution):
950             Test infrastructure.
951         * UIProcess/WebPageProxy.h:
952         * UIProcess/WebProcessPool.cpp:
953         (WebKit::WebProcessPool::dumpAdClickAttribution):
954         (WebKit::WebProcessPool::clearAdClickAttribution):
955             Test infrastructure.
956         * UIProcess/WebProcessPool.h:
957         * WebKit.xcodeproj/project.pbxproj:
958         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
959         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
960             Added missing data copying from navigationAction to navigationActionData.
961
962 2019-02-13  Antti Koivisto  <antti@apple.com>
963
964         Crash in WebKit::CacheStorage::Engine::cachesRootPath
965         https://bugs.webkit.org/show_bug.cgi?id=194588
966         <rdar://problem/46363997>
967
968         Reviewed by Youenn Fablet.
969
970         * NetworkProcess/cache/CacheStorageEngine.cpp:
971         (WebKit::CacheStorage::Engine::cachesRootPath):
972
973         Salt may have not been initialized yet when the Engine is destroyed.
974
975 2019-02-13  Alex Christensen  <achristensen@webkit.org>
976
977         Remove legacy sync messaging in some IPC code
978         https://bugs.webkit.org/show_bug.cgi?id=194561
979
980         Reviewed by Geoffrey Garen.
981
982         Changing some LegacySync messages to Delayed messages.  We should probably rename Delayed to Sync.
983         There are too many ways to send messages.  Let's work to get rid of the old one.
984
985         * NetworkProcess/NetworkProcess.cpp:
986         (WebKit::NetworkProcess::setAllowsAnySSLCertificateForWebSocket):
987         (WebKit::NetworkProcess::processWillSuspendImminently):
988         * NetworkProcess/NetworkProcess.h:
989         * NetworkProcess/NetworkProcess.messages.in:
990         * PluginProcess/PluginControllerProxy.cpp:
991         (WebKit::PluginControllerProxy::handleWheelEvent):
992         (WebKit::PluginControllerProxy::handleMouseEnterEvent):
993         (WebKit::PluginControllerProxy::handleMouseLeaveEvent):
994         (WebKit::PluginControllerProxy::handleKeyboardEvent):
995         (WebKit::PluginControllerProxy::handleEditingCommand):
996         (WebKit::PluginControllerProxy::isEditingCommandEnabled):
997         (WebKit::PluginControllerProxy::handlesPageScaleFactor):
998         (WebKit::PluginControllerProxy::requiresUnifiedScaleFactor):
999         (WebKit::PluginControllerProxy::paintEntirePlugin):
1000         (WebKit::PluginControllerProxy::supportsSnapshotting):
1001         (WebKit::PluginControllerProxy::snapshot):
1002         (WebKit::PluginControllerProxy::getPluginScriptableNPObject):
1003         (WebKit::PluginControllerProxy::getFormValue):
1004         * PluginProcess/PluginControllerProxy.h:
1005         * PluginProcess/PluginControllerProxy.messages.in:
1006         * Shared/Plugins/NPObjectMessageReceiver.cpp:
1007         (WebKit::NPObjectMessageReceiver::deallocate):
1008         (WebKit::NPObjectMessageReceiver::hasMethod):
1009         (WebKit::NPObjectMessageReceiver::invoke):
1010         (WebKit::NPObjectMessageReceiver::invokeDefault):
1011         (WebKit::NPObjectMessageReceiver::hasProperty):
1012         (WebKit::NPObjectMessageReceiver::getProperty):
1013         (WebKit::NPObjectMessageReceiver::setProperty):
1014         (WebKit::NPObjectMessageReceiver::removeProperty):
1015         (WebKit::NPObjectMessageReceiver::enumerate):
1016         (WebKit::NPObjectMessageReceiver::construct):
1017         * Shared/Plugins/NPObjectMessageReceiver.h:
1018         * Shared/Plugins/NPObjectMessageReceiver.messages.in:
1019         * UIProcess/mac/SecItemShimProxy.cpp:
1020         (WebKit::SecItemShimProxy::secItemRequest):
1021         * UIProcess/mac/SecItemShimProxy.h:
1022         * UIProcess/mac/SecItemShimProxy.messages.in:
1023
1024 2019-02-13  Truitt Savell  <tsavell@apple.com>
1025
1026         Unreviewed, rolling out r241433.
1027
1028         Broke internal builds.
1029
1030         Reverted changeset:
1031
1032         "Move
1033         UIWebTouchEventsGestureRecognizer.activeTouchesByIdentifier to
1034         SPI"
1035         https://bugs.webkit.org/show_bug.cgi?id=194531
1036         https://trac.webkit.org/changeset/241433
1037
1038 2019-02-12  Antoine Quint  <graouts@apple.com>
1039
1040         Move UIWebTouchEventsGestureRecognizer.activeTouchesByIdentifier to SPI
1041         https://bugs.webkit.org/show_bug.cgi?id=194531
1042         <rdar://problem/47714562>
1043
1044         Reviewed by Dean Jackson.
1045
1046         * Platform/spi/ios/UIKitSPI.h:
1047         * UIProcess/ios/WKContentViewInteraction.mm:
1048         (-[WKContentView cancelPointersForGestureRecognizer:]): We update the referenced Radar since we need to keep the call
1049         to respondsToSelector until the SPI has shipped for OpenSource builds to work.
1050
1051 2019-02-13  Antoine Quint  <graouts@apple.com>
1052
1053         Support simulated mouse events on iOS based on a PlatformTouchEvent
1054         https://bugs.webkit.org/show_bug.cgi?id=194501
1055         <rdar://problem/46910790>
1056
1057         Reviewed by Dean Jackson.
1058
1059         Add two new internal runtime flags to control whether simulated mouse events should be dipatched along with touch events and whether
1060         simulated mousemove events dispatched should automatically trigger the behavior preventDefault() would also trigger. We also ensure
1061         that we correctly create touch tracking regions for mouse events.
1062
1063         * Shared/WebPreferences.yaml:
1064         * UIProcess/WebPageProxy.cpp:
1065         (WebKit::WebPageProxy::updateTouchEventTracking):
1066
1067 2019-02-13  Ryosuke Niwa  <rniwa@webkit.org>
1068
1069         Crash in Page::setActivityState because m_page is null
1070         https://bugs.webkit.org/show_bug.cgi?id=194584
1071
1072         Reviewed by Antti Koivisto.
1073
1074         Add a null check to avoid the crash. Also add a debug assertion to help diagnose this in the future.
1075
1076         * WebProcess/WebPage/WebPage.cpp:
1077         (WebKit::WebPage::setActivityState):
1078
1079 2019-02-13  Ryosuke Niwa  <rniwa@webkit.org>
1080
1081         Release assert in PolicyCheckIdentifier::isValidFor via WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction
1082         https://bugs.webkit.org/show_bug.cgi?id=194582
1083
1084         Reviewed by Antti Koivisto.
1085
1086         The bug was caused by WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction invoking the callback
1087         with responseIdentifier even when we had failed to send the policy check IPC. Clearly, responseIdentifier
1088         is invalid in that case, and we should be using requestIdentifier instead.
1089
1090         Unfortunately no new tests since I'm not aware of a way to make sendSync fail in this case.
1091
1092         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1093         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1094
1095 2019-02-13  Benjamin Poulain  <benjamin@webkit.org>
1096
1097         Responsiveness timers are too expensive for frequent events
1098         https://bugs.webkit.org/show_bug.cgi?id=194003
1099
1100         Reviewed by Geoffrey Garen.
1101
1102         With each event, we set a responsivness timer to check if the WebProcess
1103         is responsive, and reset the timer when the WebProcess sends an answer.
1104
1105         For frequent events (e.g. wheel events, mouse force events, etc),
1106         we are spamming the kernel with hundreds of timers per second.
1107         That is a bit inefficient.
1108
1109         Another source of inefficiency comes from the timer implementation
1110         itself. Stopping a RunLoop::Timer removes the timer from every mode
1111         and invalidate the timer. It becomes costly since we do it a lot.
1112
1113         With this patch, I tweak ResponsivenessTimer and its use to minimize
1114         how often we schedule system timers.
1115
1116         The first change is to not stop the timer when we get the stop()
1117         calls if we expect more events to come in. Instead, we keep track
1118         if we care about the timeout or not in the attribute "m_waitingForTimer".
1119         When the next event starts, we can reschedule the timer without ever
1120         having told the kernel about the stop.
1121         If there are no next events, the timeout fires but m_waitingForTimer
1122         is false. To avoid idle wake up, the lazy stop is only used when having
1123         following events is common.
1124
1125         The second improvements comes from not even rescheduling the timer
1126         when restarted. Instead of changing the timer, we let the original timer
1127         fire and re-shedule a new one with the missing time.
1128
1129         For more context, also see patches r240759 and r240944.
1130
1131         * UIProcess/ResponsivenessTimer.cpp:
1132         (WebKit::ResponsivenessTimer::ResponsivenessTimer):
1133         (WebKit::ResponsivenessTimer::invalidate):
1134         (WebKit::ResponsivenessTimer::timerFired):
1135         (WebKit::ResponsivenessTimer::start):
1136         (WebKit::ResponsivenessTimer::startWithLazyStop):
1137         (WebKit::ResponsivenessTimer::stop):
1138         (WebKit::ResponsivenessTimer::processTerminated):
1139         (WebKit::ResponsivenessTimer::~ResponsivenessTimer): Deleted.
1140         * UIProcess/ResponsivenessTimer.h:
1141         (WebKit::ResponsivenessTimer::hasActiveTimer const):
1142         * UIProcess/WebPageProxy.cpp:
1143         (WebKit::WebPageProxy::processNextQueuedMouseEvent):
1144         (WebKit::WebPageProxy::sendWheelEvent):
1145         (WebKit::WebPageProxy::handleKeyboardEvent):
1146         (WebKit::WebPageProxy::handleGestureEvent):
1147         * UIProcess/WebProcessProxy.cpp:
1148         (WebKit::WebProcessProxy::isResponsiveWithLazyStop):
1149         * UIProcess/WebProcessProxy.h:
1150
1151 2019-02-12  Tim Horton  <timothy_horton@apple.com>
1152
1153         Null deref in userInterfaceLayoutDirection under ViewGestureController::handleSwipeGesture
1154         https://bugs.webkit.org/show_bug.cgi?id=194569
1155         <rdar://problem/46711049>
1156
1157         Reviewed by Wenson Hsieh.
1158
1159         * UIProcess/mac/ViewGestureControllerMac.mm:
1160         (WebKit::ViewGestureController::handleSwipeGesture):
1161         It is conceivable that we could get here if the client closes the page
1162         e.g. in the callback from willEndSwipeGesture. We already guarded against
1163         this ... one line too late! Rearrange the lines so we don't call into
1164         WebPageProxy at all if we don't have a drawing area (which is a strict subset
1165         of the time that isValid would return true). This is a speculative fix,
1166         since I can no longer reproduce the crash on demand.
1167
1168 2019-02-12  Youenn Fablet  <youenn@apple.com>
1169
1170         WebServiceWorkerProvider::handleFetch no longer needs a CachedResource parameter
1171         https://bugs.webkit.org/show_bug.cgi?id=194548
1172
1173         Reviewed by Alex Christensen.
1174
1175         * WebProcess/Network/WebLoaderStrategy.cpp:
1176         (WebKit::WebLoaderStrategy::scheduleLoad):
1177         * WebProcess/Storage/WebServiceWorkerProvider.cpp:
1178         (WebKit::WebServiceWorkerProvider::handleFetch):
1179         * WebProcess/Storage/WebServiceWorkerProvider.h:
1180
1181 2019-02-12  Tim Horton  <timothy_horton@apple.com>
1182
1183         Remove WKLegacyPDFView
1184         https://bugs.webkit.org/show_bug.cgi?id=194559
1185
1186         Reviewed by Andy Estes.
1187
1188         * Platform/spi/ios/CorePDFSPI.h: Removed.
1189         * SourcesCocoa.txt:
1190         * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:
1191         (-[WKWebViewContentProviderRegistry initWithConfiguration:]):
1192         * UIProcess/ios/WKLegacyPDFView.h: Removed.
1193         * UIProcess/ios/WKLegacyPDFView.mm: Removed.
1194         * WebKit.xcodeproj/project.pbxproj:
1195
1196 2019-02-12  Chris Dumez  <cdumez@apple.com>
1197
1198         Regression(PSON) MESSAGE_CHECK() hit under WebPageProxy::didFailProvisionalLoadForFrameShared()
1199         https://bugs.webkit.org/show_bug.cgi?id=194568
1200         <rdar://problem/47944490>
1201
1202         Reviewed by Ryosuke Niwa.
1203
1204         When the provisional process crashes, it is unsafe to call ProvisionalPageProxy::cancel() because
1205         the WebProcessProxy clears its frame map as soon as the process crashes. Calling cancel() after
1206         that would call WebPageProxy::didFailProvisionalLoadForFrameShared(), which would try to look up
1207         the frame by ID and MESSAGE_CHECK() that the frame is not null. We would fail this check since
1208         the frame has been removed from the WebProcessProxy at this point.
1209
1210         * UIProcess/API/Cocoa/WKWebView.mm:
1211         (-[WKWebView _provisionalWebProcessIdentifier]):
1212         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1213         * UIProcess/WebPageProxy.cpp:
1214         (WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
1215         (WebKit::WebPageProxy::provisionalProcessDidTerminate):
1216
1217 2019-02-12  Per Arne Vollan  <pvollan@apple.com>
1218
1219         [iOS] Youtube fails to play.
1220         https://bugs.webkit.org/show_bug.cgi?id=194565
1221         <rdar://problem/47974770>
1222
1223         Reviewed by Geoffrey Garen.
1224
1225         This is caused by sandbox violations and was introduced in r240500.
1226
1227         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1228
1229 2019-02-12  Alex Christensen  <achristensen@webkit.org>
1230
1231         Remove firing assertion after r241317
1232         https://bugs.webkit.org/show_bug.cgi?id=194506
1233
1234         * WebProcess/Network/WebLoaderStrategy.cpp:
1235         (WebKit::WebLoaderStrategy::setDefersLoading):
1236         The creation of a PageGroupLoadDeferrer in Chrome.cpp tries to defer loading.
1237         See comments in Chrome::runJavaScriptAlert et al.
1238         This was necessary with WebKitLegacy, so keep it, but it doesn't need to do anything in modern WebKit.
1239
1240 2019-02-12  Tim Horton  <timothy_horton@apple.com>
1241
1242         Find on Page shouldn't zoom in on matches
1243         https://bugs.webkit.org/show_bug.cgi?id=194557
1244         <rdar://problem/42087017>
1245
1246         Reviewed by Wenson Hsieh.
1247
1248         * UIProcess/ios/SmartMagnificationController.h:
1249         * UIProcess/ios/SmartMagnificationController.messages.in:
1250         * UIProcess/ios/SmartMagnificationController.mm:
1251         (WebKit::SmartMagnificationController::scrollToRect):
1252         * WebProcess/WebPage/ios/FindControllerIOS.mm:
1253         (WebKit::FindController::updateFindIndicator):
1254         Only scroll to reveal the find result, do not zoom in.
1255
1256 2019-02-12  Wenson Hsieh  <wenson_hsieh@apple.com>
1257
1258         Allow pages to trigger programmatic paste from script on iOS
1259         https://bugs.webkit.org/show_bug.cgi?id=194271
1260         <rdar://problem/47808810>
1261
1262         Reviewed by Tim Horton.
1263
1264         Cancel the pending DOM paste access handler when the menu is about to hide, rather than when the hiding
1265         animation has completed. This ensures that if the page (on behalf of the user) requests DOM paste again during
1266         user interaction before the callout bar has finished fading after the previous DOM paste, we won't automatically
1267         cancel the incoming DOM paste access request because the callout bar animation finished.
1268
1269         This scenario is exercised in the layout test editing/pasteboard/ios/dom-paste-consecutive-confirmations.html.
1270
1271         * Platform/spi/ios/UIKitSPI.h:
1272         * UIProcess/ios/WKContentViewInteraction.mm:
1273         (-[WKContentView setupInteraction]):
1274         (-[WKContentView _willHideMenu:]):
1275         (-[WKContentView _didHideMenu:]):
1276
1277 2019-02-12  Chris Fleizach  <cfleizach@apple.com>
1278
1279         AX: IsolatedTree: Implement more attributes
1280         https://bugs.webkit.org/show_bug.cgi?id=193911
1281         <rdar://problem/47599217>
1282
1283         Reviewed by Daniel Bates.
1284
1285         * Platform/spi/mac/AccessibilityPrivSPI.h: Added.
1286         * WebKit.xcodeproj/project.pbxproj:
1287         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.h:
1288         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
1289         (-[WKAccessibilityWebPageObjectBase clientSupportsIsolatedTree]):
1290         (-[WKAccessibilityWebPageObjectBase isolatedTreeRootObject]):
1291         (-[WKAccessibilityWebPageObjectBase accessibilityRootObjectWrapper]):
1292         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
1293         (-[WKAccessibilityWebPageObject IGNORE_WARNINGS_END]):
1294         (-[WKAccessibilityWebPageObject convertScreenPointToRootView:]):
1295         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
1296         (-[WKAccessibilityWebPageObject accessibilityAttributeSizeValue]):
1297         (-[WKAccessibilityWebPageObject accessibilityAttributePositionValue]):
1298         (-[WKAccessibilityWebPageObject accessibilityDataDetectorValue:point:]):
1299         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
1300         (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
1301
1302 2019-02-12  Wenson Hsieh  <wenson_hsieh@apple.com>
1303
1304         Allow pages to trigger programmatic paste from script on iOS
1305         https://bugs.webkit.org/show_bug.cgi?id=194271
1306         <rdar://problem/47808810>
1307
1308         Reviewed by Ryosuke Niwa.
1309
1310         * Shared/WebPreferences.yaml:
1311         * Shared/WebPreferencesDefaultValues.h:
1312
1313         Add an internal setting to enable or disable DOM paste access requests. This is on by default in iOS only
1314         (excluding watchOS and Apple TV), and is additionally disabled on macOS.
1315
1316         * UIProcess/API/gtk/PageClientImpl.cpp:
1317         (WebKit::PageClientImpl::requestDOMPasteAccess):
1318         * UIProcess/API/gtk/PageClientImpl.h:
1319         * UIProcess/API/wpe/PageClientImpl.cpp:
1320         (WebKit::PageClientImpl::requestDOMPasteAccess):
1321
1322         Plumb DOM paste access requests from the web process (WebEditorClient) to the view (WKContentView). As per the
1323         usual, this involves WebEditorClient, WebPage, WebPageProxy, PageClient and finally WKContentView.
1324
1325         * UIProcess/API/wpe/PageClientImpl.h:
1326         * UIProcess/PageClient.h:
1327         * UIProcess/WebPageProxy.cpp:
1328         (WebKit::WebPageProxy::requestDOMPasteAccess):
1329         * UIProcess/WebPageProxy.h:
1330         * UIProcess/WebPageProxy.messages.in:
1331         * UIProcess/ios/PageClientImplIOS.h:
1332         * UIProcess/ios/PageClientImplIOS.mm:
1333         (WebKit::PageClientImpl::requestDOMPasteAccess):
1334         * UIProcess/ios/WKContentViewInteraction.h:
1335         * UIProcess/ios/WKContentViewInteraction.mm:
1336         (-[WKContentView setupInteraction]):
1337         (-[WKContentView cleanupInteraction]):
1338         (-[WKContentView resignFirstResponderForWebView]):
1339         (-[WKContentView _webTouchEventsRecognized:]):
1340
1341         Bail from any pending DOM paste access handler the moment we start handling touches on the web view, or if the
1342         web view resigns first responder, or if the web process crashes.
1343
1344         (-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
1345
1346         Reject text selection gestures while waiting for DOM paste access.
1347
1348         (-[WKContentView canPerformAction:withSender:]):
1349         (-[WKContentView canPerformActionForWebView:withSender:]):
1350
1351         If we're handling a DOM paste, always return YES to allow the callout bar to show the "Paste" option.
1352
1353         (-[WKContentView _didHideMenu:]):
1354
1355         If the menu is programmatically hidden by the app while handling a DOM paste request, immediately reject the DOM
1356         paste request.
1357
1358         (-[WKContentView pasteForWebView:]):
1359
1360         Adjust -pasteForWebView: on WKContentView to first check whether there's an outstanding DOM paste completion
1361         handler to invoke, instead of telling the page to execute a paste command.
1362
1363         (-[WKContentView _handleDOMPasteRequestWithResult:]):
1364
1365         Add a helper to take and invoke the current DOM paste completion handler (if it exists) with the given result,
1366         and then dismiss the shared callout bar. Returns whether or not the paste completion handler exists. Invoked
1367         from various sources of user interaction or significant state changes (e.g. following a web process crash in
1368         -cleanupInteraction).
1369
1370         (-[WKContentView _willPerformAction:sender:]):
1371         (-[WKContentView _didPerformAction:sender:]):
1372
1373         Add hooks to detect when WKContentView is executing an editing action. This is to ensure that the page doesn't
1374         get stuck in a bad state in the case where WKWebView has been subclassed, overrides `-paste:`, and does not
1375         invoke the superclass method (which calls back into `-[WKContentView pasteForWebView:]`). There are a few
1376         possibilities here:
1377         1. WKWebView's `-paste:` action is not overridden. In this case, we will call back into `-pasteForWebView:`,
1378            which will notice that we have a pending paste completion handler and invoke it.
1379         2. WKWebView's `-paste:` action is overridden and does not call back into the content view. In this case, we
1380            will invoke the paste completion handler in `-_didPerformAction:sender:`.
1381         3. WKWebView's `-canPerformAction:withSender:` is overridden to include additional actions. In this case, we may
1382            get a call to invoke a different action selector while waiting for a potential paste action. If this happens,
1383            prevent the DOM paste in `-_willPerformAction:sender:` prior to handling the other action.
1384
1385         (-[WKContentView handleKeyWebEvent:withCompletionHandler:]):
1386
1387         Dismiss DOM paste UI upon handling any key event.
1388
1389         (-[WKContentView showGlobalMenuControllerInRect:]):
1390         (-[WKContentView hideGlobalMenuController]):
1391
1392         Helper methods to present and dismiss the global UIMenuController, that accounts for available platform APIs for
1393         presenting or dismissing the menu controller on iOS.
1394
1395         (-[WKContentView _requestDOMPasteAccessWithElementRect:completionHandler:]):
1396
1397         Attempt to find a good target presentation rect when showing the callout menu. First, we will try to use the
1398         rect of the element the user has interacted with when triggering the paste. If such an element is too large or
1399         does not exist, we fall back to presenting the callout menu near the user's last touch location (with a small
1400         amount of margin, such that the action doesn't overlap with the user's finger, stylus, etc.).
1401
1402         (-[WKContentView _resetShowingTextStyle:]): Deleted.
1403
1404         Rename this to `-_didHideMenu:`.
1405
1406         * UIProcess/mac/PageClientImplMac.h:
1407         * UIProcess/win/PageClientImpl.cpp:
1408         (WebKit::PageClientImpl::requestDOMPasteAccess):
1409         * UIProcess/win/PageClientImpl.h:
1410         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1411         (WebKit::WebEditorClient::requestDOMPasteAccess):
1412         * WebProcess/WebCoreSupport/WebEditorClient.h:
1413         * WebProcess/WebPage/WebPage.cpp:
1414         (WebKit::WebPage::requestDOMPasteAccess):
1415
1416         Add more plumbing and method stubs.
1417
1418         (WebKit::WebPage::updateCurrentModifierState):
1419         (WebKit::WebPage::rectForElementAtInteractionLocation const):
1420         * WebProcess/WebPage/WebPage.h:
1421         * WebProcess/WebPage/ios/WebPageIOS.mm:
1422         (WebKit::WebPage::rectForElementAtInteractionLocation const):
1423         (WebKit::WebPage::rectForElementAtInteractionLocation): Deleted.
1424
1425         Mark this method as const, add a platform-agnostic stub, and adopt it for the purposes of determining where to
1426         position the callout bar when pasting.
1427
1428 2019-02-12  Alex Christensen  <achristensen@webkit.org>
1429
1430         Remove setDefersLoading infrastructure from WebKit2
1431         https://bugs.webkit.org/show_bug.cgi?id=194506
1432
1433         Reviewed by Brady Eidson.
1434
1435         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1436         (WebKit::NetworkConnectionToWebProcess::setDefersLoading): Deleted.
1437         * NetworkProcess/NetworkConnectionToWebProcess.h:
1438         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1439         * NetworkProcess/NetworkDataTask.h:
1440         * NetworkProcess/NetworkDataTaskBlob.cpp:
1441         (WebKit::NetworkDataTaskBlob::suspend): Deleted.
1442         * NetworkProcess/NetworkDataTaskBlob.h:
1443         * NetworkProcess/NetworkLoad.cpp:
1444         (WebKit::NetworkLoad::initialize):
1445         (WebKit::NetworkLoad::setDefersLoading): Deleted.
1446         * NetworkProcess/NetworkLoad.h:
1447         * NetworkProcess/NetworkLoadParameters.h:
1448         * NetworkProcess/NetworkResourceLoadParameters.cpp:
1449         (WebKit::NetworkResourceLoadParameters::encode const):
1450         (WebKit::NetworkResourceLoadParameters::decode):
1451         * NetworkProcess/NetworkResourceLoader.cpp:
1452         (WebKit::NetworkResourceLoader::start):
1453         (WebKit::NetworkResourceLoader::startNetworkLoad):
1454         (WebKit::NetworkResourceLoader::setDefersLoading): Deleted.
1455         * NetworkProcess/NetworkResourceLoader.h:
1456         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
1457         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
1458         (WebKit::NetworkDataTaskCocoa::suspend): Deleted.
1459         * NetworkProcess/curl/NetworkDataTaskCurl.cpp:
1460         (WebKit::NetworkDataTaskCurl::suspend): Deleted.
1461         * NetworkProcess/curl/NetworkDataTaskCurl.h:
1462         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
1463         (WebKit::NetworkDataTaskSoup::suspend): Deleted.
1464         * NetworkProcess/soup/NetworkDataTaskSoup.h:
1465         * WebProcess/Network/WebLoaderStrategy.cpp:
1466         (WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
1467         (WebKit::WebLoaderStrategy::setDefersLoading):
1468
1469 2019-02-12  Michael Catanzaro  <mcatanzaro@igalia.com>
1470
1471         Unreviewed, fix build warnings after content extensions enablement
1472         https://bugs.webkit.org/show_bug.cgi?id=193622
1473         <rdar://problem/47982850>
1474
1475         * UIProcess/API/C/WKUserContentExtensionStoreRef.cpp:
1476         (toResult):
1477
1478 2019-02-12  Tim Horton  <timothy_horton@apple.com>
1479
1480         Switching focus from a UITextField to an editable WKWebView causes the keyboard to dance
1481         https://bugs.webkit.org/show_bug.cgi?id=194524
1482         <rdar://problem/35481797>
1483
1484         Reviewed by Wenson Hsieh.
1485
1486         * Platform/spi/ios/UIKitSPI.h:
1487         * UIProcess/ios/InputViewUpdateDeferrer.h:
1488         * UIProcess/ios/InputViewUpdateDeferrer.mm:
1489         (WebKit::InputViewUpdateDeferrer::InputViewUpdateDeferrer):
1490         (WebKit::InputViewUpdateDeferrer::~InputViewUpdateDeferrer):
1491         Make use of the per-responder and much safer input view pinning mechanism.
1492
1493         * UIProcess/ios/WKContentViewInteraction.mm:
1494         (-[WKContentView becomeFirstResponderForWebView]):
1495         (-[WKContentView _singleTapCommited:]):
1496         (-[WKContentView _attemptClickAtLocation:modifierFlags:]):
1497         Always temporarily pin input views when becoming first responder; there are
1498         many paths (such as through the text interaction assistant) that can
1499         focus us on tap, trying to cover them all is a fool's errand. We'll
1500         just get out the big hammer and call it in becomeFirstResponder.
1501         This also means we can remove it from _singleTapCommitted and _attemptClick...
1502
1503         (-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
1504         Don't release the input view pinning until we return from _elementDidFocus;
1505         it does the rebuilding synchronously, so we need to have actually updated
1506         all of the prerequisites of -inputView before depinning.
1507
1508 2019-02-12  Youenn Fablet  <youenn@apple.com>
1509
1510         Make use of is<SubresourceLoader>
1511         https://bugs.webkit.org/show_bug.cgi?id=194541
1512
1513         Reviewed by Alex Christensen.
1514
1515         * WebProcess/Network/WebLoaderStrategy.cpp:
1516         (WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
1517
1518 2019-02-12  Alex Christensen  <achristensen@webkit.org>
1519
1520         WebPage::close needs to remove all message receivers associated with that WebPage, not WebPage::~WebPage
1521         https://bugs.webkit.org/show_bug.cgi?id=194522
1522         <rdar://problem/47789393>
1523
1524         Reviewed by Chris Dumez.
1525
1526         The InjectedBundle SPI can retain the WebPage or wrapping objects (WKWebProcessPlugInBrowserContextController/WKBundlePageRef).
1527         This can make it so WebPage::close is called before WebPage::~WebPage, and if the SuspendedPageProxy is reused for a subsequent
1528         navigation to the same domain, the WebProcess is reused with a different WebPage instance with the same PageID, which causes problems
1529         when another WebPage registers message handlers and then the previous WebPage is destroyed, which removes both message handlers.
1530
1531         * WebProcess/WebPage/WebPage.cpp:
1532         (WebKit::WebPage::~WebPage):
1533         (WebKit::WebPage::close):
1534         (WebKit::WebPage::mainFrameDidLayout):
1535         * WebProcess/WebPage/WebPage.h:
1536         * WebProcess/WebProcess.h:
1537         (WebKit::WebProcess::eventDispatcher):
1538
1539 2019-02-12  Michael Catanzaro  <mcatanzaro@igalia.com>
1540
1541         [WPE][GTK] Unsafe g_unsetenv() use in WebProcessPool::platformInitialize
1542         https://bugs.webkit.org/show_bug.cgi?id=194370
1543
1544         Reviewed by Darin Adler.
1545
1546         It is incorrect to use g_unsetenv() here because it is MT-Unsafe. We know that it is
1547         impossible and unreasonable to expect the application has not started other threads at this
1548         point, and threads will be calling getenv(). WebKit itself has probably already started
1549         threads of its own.
1550
1551         Fortunately, the remote inspector in the web process is already prepared to deal with
1552         failure to connect to the inspector server, so we don't need to do anything except stop
1553         messing with the environment.
1554
1555         Note these files are copies of each other. I'll merge them together in a follow-up patch.
1556
1557         * UIProcess/gtk/WebProcessPoolGtk.cpp:
1558         (WebKit::initializeRemoteInspectorServer):
1559         (WebKit::WebProcessPool::platformInitialize):
1560         * UIProcess/wpe/WebProcessPoolWPE.cpp:
1561         (WebKit::initializeRemoteInspectorServer):
1562         (WebKit::WebProcessPool::platformInitialize):
1563
1564 2019-02-08  Beth Dakin  <bdakin@apple.com>
1565
1566         Ensure old binaries have old snapshotting behaviors
1567         https://bugs.webkit.org/show_bug.cgi?id=194449
1568         -and corresponding-
1569         rdar://problem/47931954
1570
1571         Reviewed by Darin Adler.
1572
1573         Make sure that a nil configuration behaves the same way that it used to on apps 
1574         that were linked before FirstWithSnapshotAfterScreenUpdates
1575
1576         * UIProcess/API/Cocoa/WKWebView.mm:
1577         (-[WKWebView takeSnapshotWithConfiguration:completionHandler:]):
1578         * UIProcess/Cocoa/VersionChecks.h:
1579
1580 2019-02-12  Andy Estes  <aestes@apple.com>
1581
1582         [iOSMac] Enable Parental Controls Content Filtering
1583         https://bugs.webkit.org/show_bug.cgi?id=194521
1584         <rdar://39732376>
1585
1586         Reviewed by Tim Horton.
1587
1588         * Configurations/FeatureDefines.xcconfig:
1589
1590 2019-02-11  Alex Christensen  <achristensen@webkit.org>
1591
1592         Remove noisy and unnecessary logs added in r241223
1593         https://bugs.webkit.org/show_bug.cgi?id=194427
1594
1595         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1596         (WebKit::ProcessLauncher::launchProcess):
1597         Errors occur all the time in the XPC connection's event handler, like when a process terminates.
1598         We don't need to print an "error" every time any process terminates.
1599
1600 2019-02-11  Brian Burg  <bburg@apple.com>
1601
1602         [Cocoa] Web Automation: client callbacks are not called if delegate does not override
1603         https://bugs.webkit.org/show_bug.cgi?id=194519
1604         <rdar://problem/47981961>
1605
1606         Reviewed by Joseph Pecoraro.
1607
1608         Call the completion handler directly if the delegate does not implement the relevant method.
1609
1610         * UIProcess/Cocoa/AutomationSessionClient.mm:
1611         (WebKit::AutomationSessionClient::requestNewPageWithOptions):
1612         (WebKit::AutomationSessionClient::requestSwitchToPage):
1613         (WebKit::AutomationSessionClient::requestHideWindowOfPage):
1614         (WebKit::AutomationSessionClient::requestRestoreWindowOfPage):
1615         (WebKit::AutomationSessionClient::requestMaximizeWindowOfPage):
1616
1617 2019-02-11  Daniel Bates  <dabates@apple.com>
1618
1619         [iOS] Adopt SPI to support Emacs bindings: transpose and delete to end of paragraph
1620         https://bugs.webkit.org/show_bug.cgi?id=194505
1621         <rdar://problem/47743533>
1622
1623         Reviewed by Tim Horton.
1624
1625         * UIProcess/ios/WKContentViewInteraction.mm:
1626         (-[WKContentView _deleteToEndOfParagraph]): Added.
1627         (-[WKContentView _transpose]): Added.
1628
1629 2019-02-11  Adrian Perez de Castro  <aperez@igalia.com>
1630
1631         [GTK][WPE] Add content extensions support in WKTR and unskip layout tests
1632         https://bugs.webkit.org/show_bug.cgi?id=193622
1633
1634         Reviewed by Michael Catanzaro.
1635
1636         * NetworkProcess/cache/NetworkCacheData.h: Define an adoptAndMapFile() implementation
1637         for GFileIOStream objects.
1638         * NetworkProcess/cache/NetworkCacheDataSoup.cpp:
1639         (WebKit::NetworkCache::adoptAndMapFile): Added implementation, which extracts the file
1640         descriptor from a GFileIOStream, as it inherits from GFileDescriptorBased, and then
1641         reuses the version of adoptAndMapFile() which takes a file descritor for the actual work.
1642         * NetworkProcess/NetworkLoadChecker.cpp:
1643         (Webkit::NetworkLoadChecker::checkRequest): Use "this" when referring to
1644         processContentExtensionRulesForLoad() in order to avoid ambiguity.
1645         * Sources.txt: Add WKUserContentExtensionStoreRef.cpp, all ports use it now.
1646         * SourcesCocoa.txt: Remove WKUserContentExtensionStoreRef.cpp, because it is not
1647         Cocoa-specific anymore.
1648         * SourcesGTK.txt: Add APIContentRuleListStoreGLib.cpp.
1649         * SourcesWPE.txt: Ditto.
1650         * UIProcess/API/C/WKUserContentExtensionStoreRef.cpp:
1651         (WKUserContentExtensionStoreCreate): Added.
1652         (toResult): Added.
1653         (WKUserContentExtensionStoreCompile): Added.
1654         (WKUserContentExtensionStoreLookup): Added.
1655         (WKUserContentExtensionStoreRemove): Added.
1656         * UIProcess/API/C/WKUserContentExtensionStoreRef.h: Add declarations for the new C API
1657         functions and for the WKUserContentExtensionStoreResult status enum.
1658         * UIProcess/API/glib/APIContentRuleListStoreGLib.cpp: Added.
1659         (API::ContentRuleListStore::defaultStorePath): Add a dummy implementation. The public API
1660         for the GLib based ports (GTK+ and WPE) will not allow using the default store and will
1661         always indicating a path.
1662
1663 2019-02-11  Daniel Bates  <dabates@apple.com>
1664
1665         [iOS] Mouse/Touch/Pointer events are missing modifier keys
1666         https://bugs.webkit.org/show_bug.cgi?id=191446
1667         <rdar://problem/45929460>
1668
1669         Reviewed by Tim Horton.
1670
1671         Make use of UIKit SPI to retreive the modifier flags when dispatching mouse and touch events.
1672         Add new WebKit SPI for iOS, -[WKNavigationAction modifierFlags], to retrieve the the modifier
1673         flags held when a navigation action was initiated.
1674
1675         * Platform/spi/ios/UIKitSPI.h: Expose SPI.
1676         * Shared/NativeWebTouchEvent.h: Re-arrange macro guards so that we can expose the helper function
1677         WebKit::webEventModifierFlags(). This is a bit more involved that usual since this header is included
1678         from both C++ and Objective-C source files. It only makes sense to expose this function when
1679         compiling as part of an Objective-C source file.
1680         * Shared/ios/NativeWebTouchEventIOS.mm:
1681         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent): Modified to take the modifier flags held down
1682         when the platform touch event was received and pass them through to the base constructor.
1683         (WebKit::webEventModifierFlags): Added. Converts from the platform-speciifc UIKeyModifierFlags to
1684         OptionSet<WebKit::WebEvent::Modifier>.
1685         * Shared/ios/WebIOSEventFactory.h:
1686         * Shared/ios/WebIOSEventFactory.mm:
1687         (WebIOSEventFactory::toUIKeyModifierFlags): Added. Converts from OptionSet<WebKit::WebEvent::Modifier>
1688         to the platform-specific UIKeyModifierFlags.
1689         * UIProcess/API/Cocoa/WKNavigationAction.mm:
1690         (-[WKNavigationAction modifierFlags]): Added.
1691         * UIProcess/API/Cocoa/WKNavigationActionPrivate.h:
1692         * UIProcess/WebPageProxy.h:
1693         * UIProcess/ios/WKContentViewInteraction.h:
1694         * UIProcess/ios/WKContentViewInteraction.mm:
1695         (gestureRecognizerModifierFlags): Added.
1696
1697         (-[WKContentView _webTouchEventsRecognized:]):
1698         (-[WKContentView _highlightLongPressRecognized:]):
1699         (-[WKContentView _twoFingerSingleTapGestureRecognized:]):
1700         (-[WKContentView _singleTapCommited:]):
1701         Pass modifier flags through.
1702
1703         (-[WKContentView _attemptClickAtLocation:modifierFlags:]): Added.
1704         (-[WKContentView actionSheetAssistant:openElementAtLocation:]): This is invoked when a person opens a link
1705         via the action sheet. We don't have access to the modifier flags to pass. It also seems like an implementation
1706         detail that this action is implemented via mouse click and we should re-evaluate this decision in light of
1707         the fact tht the action sheet is browser UI and we tend to be very reserved on what UI actions are visible
1708         to the page. On Mac, opening a link via the context menu is not visible to the page, at least from a mouse
1709         event perspective.
1710         (webEventFlagsForUIKeyModifierFlags): Added.
1711         (-[WKContentView _hoverGestureRecognizerChanged:]): Pass modifier flags through.
1712         (-[WKContentView _attemptClickAtLocation:]): Deleted.
1713         * UIProcess/ios/WebPageProxyIOS.mm:
1714         (WebKit::WebPageProxy::handleTwoFingerTapAtPoint):
1715         (WebKit::WebPageProxy::commitPotentialTap):
1716         (WebKit::WebPageProxy::handleTap):
1717         * WebProcess/WebPage/WebPage.h:
1718         * WebProcess/WebPage/WebPage.messages.in:
1719         * WebProcess/WebPage/ios/WebPageIOS.mm:
1720         (WebKit::WebPage::handleSyntheticClick):
1721         (WebKit::WebPage::completePendingSyntheticClickForContentChangeObserver):
1722         (WebKit::WebPage::completeSyntheticClick):
1723         (WebKit::WebPage::handleTap):
1724         (WebKit::WebPage::handleTwoFingerTapAtPoint):
1725         (WebKit::WebPage::commitPotentialTap):
1726         Pass modifier flags through.
1727
1728 2019-02-11  Jer Noble  <jer.noble@apple.com>
1729
1730         [Cocoa] Notify AVSystemController of our presenting PID before registering as a Now Playing app.
1731         https://bugs.webkit.org/show_bug.cgi?id=194504
1732
1733         Reviewed by Eric Carlson.
1734
1735         * WebKit.xcodeproj/project.pbxproj:
1736         * WebProcess/WebCoreSupport/WebUserMediaClient.cpp:
1737         (WebKit::WebUserMediaClient::requestUserMediaAccess):
1738         * WebProcess/WebPage/WebPage.cpp:
1739         (WebKit::WebPage::prepareToSendUserMediaPermissionRequest): Deleted.
1740         * WebProcess/WebPage/WebPage.h:
1741         (WebKit::WebPage::userMediaPermissionRequestManager):
1742         * WebProcess/WebPage/ios/WebPageIOS.mm:
1743         (WebKit::WebPage::prepareToSendUserMediaPermissionRequest): Deleted.
1744
1745 2019-02-11  Commit Queue  <commit-queue@webkit.org>
1746
1747         Unreviewed, rolling out r241272 and r241276.
1748         https://bugs.webkit.org/show_bug.cgi?id=194514
1749
1750         Broke the Apple Internal build and the fix requires human
1751         intervention :( (Requested by dydz on #webkit).
1752
1753         Reverted changesets:
1754
1755         "[iOS] Mouse/Touch/Pointer events are missing modifier keys"
1756         https://bugs.webkit.org/show_bug.cgi?id=191446
1757         https://trac.webkit.org/changeset/241272
1758
1759         "Fix internal iOS build after r241272"
1760         https://bugs.webkit.org/show_bug.cgi?id=191446
1761         https://trac.webkit.org/changeset/241276
1762
1763 2019-02-11  Alex Christensen  <achristensen@webkit.org>
1764
1765         Fix internal iOS build after r241272
1766         https://bugs.webkit.org/show_bug.cgi?id=191446
1767
1768         * Platform/spi/ios/UIKitSPI.h:
1769         Declare the _modifierFlags when using the internal SDK also.
1770
1771 2019-02-11  Wenson Hsieh  <wenson_hsieh@apple.com>
1772
1773         fast/forms/ios/force-gregorian-calendar-for-credit-card-expiry.html does not work on iPad
1774         https://bugs.webkit.org/show_bug.cgi?id=194313
1775
1776         Reviewed by Tim Horton.
1777
1778         Make `-dateTimePickerCalendarType` work on iPad by handling the case where the date picker control is a
1779         WKDateTimePopover. This fixes UIScriptController::calendarType() returning null on iPad.
1780
1781         * UIProcess/ios/forms/WKFormInputControl.mm:
1782         (-[WKFormInputControl dateTimePickerCalendarType]):
1783         (-[WKDateTimePopover calendarType]):
1784
1785 2019-02-11  Daniel Bates  <dabates@apple.com>
1786
1787         [iOS] Mouse/Touch/Pointer events are missing modifier keys
1788         https://bugs.webkit.org/show_bug.cgi?id=191446
1789         <rdar://problem/45929460>
1790
1791         Reviewed by Tim Horton.
1792
1793         Make use of UIKit SPI to retreive the modifier flags when dispatching mouse and touch events.
1794         Add new WebKit SPI for iOS, -[WKNavigationAction modifierFlags], to retrieve the the modifier
1795         flags held when a navigation action was initiated.
1796
1797         * Platform/spi/ios/UIKitSPI.h: Expose SPI.
1798         * Shared/NativeWebTouchEvent.h: Re-arrange macro guards so that we can expose the helper function
1799         WebKit::webEventModifierFlags(). This is a bit more involved that usual since this header is included
1800         from both C++ and Objective-C source files. It only makes sense to expose this function when
1801         compiling as part of an Objective-C source file.
1802         * Shared/ios/NativeWebTouchEventIOS.mm:
1803         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent): Modified to take the modifier flags held down
1804         when the platform touch event was received and pass them through to the base constructor.
1805         (WebKit::webEventModifierFlags): Added. Converts from the platform-speciifc UIKeyModifierFlags to
1806         OptionSet<WebKit::WebEvent::Modifier>.
1807         * Shared/ios/WebIOSEventFactory.h:
1808         * Shared/ios/WebIOSEventFactory.mm:
1809         (WebIOSEventFactory::toUIKeyModifierFlags): Added. Converts from OptionSet<WebKit::WebEvent::Modifier>
1810         to the platform-specific UIKeyModifierFlags.
1811         * UIProcess/API/Cocoa/WKNavigationAction.mm:
1812         (-[WKNavigationAction modifierFlags]): Added.
1813         * UIProcess/API/Cocoa/WKNavigationActionPrivate.h:
1814         * UIProcess/WebPageProxy.h:
1815         * UIProcess/ios/WKContentViewInteraction.h:
1816         * UIProcess/ios/WKContentViewInteraction.mm:
1817         (gestureRecognizerModifierFlags): Added.
1818
1819         (-[WKContentView _webTouchEventsRecognized:]):
1820         (-[WKContentView _highlightLongPressRecognized:]):
1821         (-[WKContentView _twoFingerSingleTapGestureRecognized:]):
1822         (-[WKContentView _singleTapCommited:]):
1823         Pass modifier flags through.
1824
1825         (-[WKContentView _attemptClickAtLocation:modifierFlags:]): Added.
1826         (-[WKContentView actionSheetAssistant:openElementAtLocation:]): This is invoked when a person opens a link
1827         via the action sheet. We don't have access to the modifier flags to pass. It also seems like an implementation
1828         detail that this action is implemented via mouse click and we should re-evaluate this decision in light of
1829         the fact tht the action sheet is browser UI and we tend to be very reserved on what UI actions are visible
1830         to the page. On Mac, opening a link via the context menu is not visible to the page, at least from a mouse
1831         event perspective.
1832         (webEventFlagsForUIKeyModifierFlags): Added.
1833         (-[WKContentView _hoverGestureRecognizerChanged:]): Pass modifier flags through.
1834         (-[WKContentView _attemptClickAtLocation:]): Deleted.
1835         * UIProcess/ios/WebPageProxyIOS.mm:
1836         (WebKit::WebPageProxy::handleTwoFingerTapAtPoint):
1837         (WebKit::WebPageProxy::commitPotentialTap):
1838         (WebKit::WebPageProxy::handleTap):
1839         * WebProcess/WebPage/WebPage.h:
1840         * WebProcess/WebPage/WebPage.messages.in:
1841         * WebProcess/WebPage/ios/WebPageIOS.mm:
1842         (WebKit::WebPage::handleSyntheticClick):
1843         (WebKit::WebPage::completePendingSyntheticClickForContentChangeObserver):
1844         (WebKit::WebPage::completeSyntheticClick):
1845         (WebKit::WebPage::handleTap):
1846         (WebKit::WebPage::handleTwoFingerTapAtPoint):
1847         (WebKit::WebPage::commitPotentialTap):
1848         Pass modifier flags through.
1849
1850 2019-02-11  Youenn Fablet  <youenn@apple.com>
1851
1852         Filter out Overconstrainederror.constraint when getUserMedia is not granted
1853         https://bugs.webkit.org/show_bug.cgi?id=194240
1854
1855         Reviewed by Eric Carlson.
1856
1857         Make sure in UIProcess to filter out constraint if either the page was not granted gum access or it has no persistent access.
1858
1859         Refactor UserMediaPermissionRequestManagerProxy to make the implementation easier to understand.
1860
1861         Covered by added test.
1862
1863         * UIProcess/UserMediaPermissionCheckProxy.cpp:
1864         (WebKit::UserMediaPermissionCheckProxy::setUserMediaAccessInfo):
1865         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
1866         (WebKit::UserMediaPermissionRequestManagerProxy::captureDevicesChanged):
1867         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted):
1868         (WebKit::UserMediaPermissionRequestManagerProxy::grantAccess):
1869         (WebKit::UserMediaPermissionRequestManagerProxy::getRequestAction):
1870         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
1871         (WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionRequest):
1872         (WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionInvalidRequest):
1873         (WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionValidRequest):
1874         (WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo):
1875         (WebKit::UserMediaPermissionRequestManagerProxy::wasGrantedVideoOrAudioAccess):
1876         (WebKit::UserMediaPermissionRequestManagerProxy::computeFilteredDeviceList):
1877         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
1878         (WebKit::UserMediaPermissionRequestManagerProxy::createPermissionRequest): Deleted.
1879         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
1880         * UIProcess/UserMediaPermissionRequestProxy.h:
1881         (WebKit::UserMediaPermissionRequestProxy::isPending const):
1882         (WebKit::UserMediaPermissionRequestProxy::setEligibleVideoDeviceUIDs):
1883         (WebKit::UserMediaPermissionRequestProxy::setEligibleAudioDeviceUIDs):
1884         (WebKit::UserMediaPermissionRequestProxy::hasAudioDevice const):
1885         (WebKit::UserMediaPermissionRequestProxy::hasVideoDevice const):
1886         (WebKit::UserMediaPermissionRequestProxy::hasPersistentAccess const):
1887         (WebKit::UserMediaPermissionRequestProxy::setHasPersistentAccess):
1888         (WebKit::UserMediaPermissionRequestProxy::userMediaID const):
1889         (WebKit::UserMediaPermissionRequestProxy::topLevelDocumentSecurityOrigin const):
1890         (WebKit::UserMediaPermissionRequestProxy::userMediaDocumentSecurityOrigin const):
1891         (WebKit::UserMediaPermissionRequestProxy::userRequest const):
1892         (WebKit::UserMediaPermissionRequestProxy::setDeviceIdentifierHashSalt):
1893         (WebKit::UserMediaPermissionRequestProxy::deviceIdentifierHashSalt const):
1894         (WebKit::UserMediaPermissionRequestProxy::audioDevice const):
1895         (WebKit::UserMediaPermissionRequestProxy::videoDevice const):
1896         * UIProcess/WebPageProxy.cpp:
1897         (WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
1898         * UIProcess/WebPageProxy.h:
1899
1900 2019-02-11  Carlos Garcia Campos  <cgarcia@igalia.com>
1901
1902         [WPE] Do not try to create empty egl windows
1903         https://bugs.webkit.org/show_bug.cgi?id=194497
1904
1905         Reviewed by Žan Doberšek.
1906
1907         In AcceleratedSurfaceWPE we ensure the size we pass to wpe is at least 0x0, but wl_egl_window_create() returns
1908         nullptr if 0 is passed as width or height. We should use at least 1x1 instead.
1909
1910         * WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.cpp:
1911         (WebKit::AcceleratedSurfaceWPE::initialize):
1912         (WebKit::AcceleratedSurfaceWPE::clientResize):
1913
1914 2019-02-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1915
1916         [WPE] Do not use a sync IPC message to send the host FD to the web process
1917         https://bugs.webkit.org/show_bug.cgi?id=194216
1918
1919         Reviewed by Darin Adler.
1920
1921         It can be sent as a web page creation parameter instead.
1922
1923         * PlatformWPE.cmake:
1924         * Shared/WebPageCreationParameters.cpp:
1925         (WebKit::WebPageCreationParameters::encode const):
1926         (WebKit::WebPageCreationParameters::decode):
1927         * Shared/WebPageCreationParameters.h:
1928         * SourcesWPE.txt:
1929         * UIProcess/API/wpe/CompositingManagerProxy.cpp: Removed.
1930         * UIProcess/API/wpe/CompositingManagerProxy.h: Removed.
1931         * UIProcess/API/wpe/CompositingManagerProxy.messages.in: Removed.
1932         * UIProcess/API/wpe/PageClientImpl.cpp:
1933         (WebKit::PageClientImpl::hostFileDescriptor):
1934         * UIProcess/API/wpe/PageClientImpl.h:
1935         * UIProcess/API/wpe/WPEView.cpp:
1936         (WKWPE::m_backend):
1937         * UIProcess/API/wpe/WPEView.h:
1938         (WKWPE::View::create):
1939         * UIProcess/PageClient.h:
1940         * UIProcess/WebPageProxy.cpp:
1941         (WebKit::WebPageProxy::creationParameters):
1942         * WebProcess/WebPage/WebPage.cpp:
1943         (WebKit::m_hostFileDescriptor):
1944         * WebProcess/WebPage/WebPage.h:
1945         (WebKit::WebPage::releaseHostFileDescriptor):
1946         * WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.cpp:
1947         (WebKit::AcceleratedSurfaceWPE::AcceleratedSurfaceWPE):
1948         (WebKit::AcceleratedSurfaceWPE::initialize):
1949         * WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.h:
1950         * WebProcess/WebPage/wpe/CompositingManager.cpp: Removed.
1951         * WebProcess/WebPage/wpe/CompositingManager.h: Removed.
1952
1953 2019-02-04  Carlos Garcia Campos  <cgarcia@igalia.com>
1954
1955         [GTK][WPE] Add enable-javascript-markup setting
1956         https://bugs.webkit.org/show_bug.cgi?id=193439
1957
1958         Reviewed by Michael Catanzaro.
1959
1960         Expose JavaScriptMarkupEnabled setting in the GLib API.
1961
1962         * UIProcess/API/glib/WebKitSettings.cpp:
1963         (webKitSettingsSetProperty):
1964         (webKitSettingsGetProperty):
1965         (webkit_settings_class_init):
1966         (webkit_settings_get_enable_javascript_markup):
1967         (webkit_settings_set_enable_javascript_markup):
1968         * UIProcess/API/gtk/WebKitSettings.h:
1969         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
1970         * UIProcess/API/wpe/WebKitSettings.h:
1971         * UIProcess/API/wpe/docs/wpe-0.1-sections.txt:
1972
1973 2019-02-10  Darin Adler  <darin@apple.com>
1974
1975         Switch uses of StringBuilder with String::format for hex numbers to use HexNumber.h instead
1976         https://bugs.webkit.org/show_bug.cgi?id=194485
1977
1978         Reviewed by Daniel Bates.
1979
1980         * UIProcess/DeviceIdHashSaltStorage.cpp:
1981         (WebKit::DeviceIdHashSaltStorage::completeDeviceIdHashSaltForOriginCall): Use
1982         appendUnsignedAsHex instead of appendUnsigned64AsHex.
1983
1984         * UIProcess/WebBackForwardList.cpp:
1985         (WebKit::WebBackForwardList::loggingString): Use appendUnsignedAsHex and
1986         reinterpret_cast<uintptr_t> instead of String::format and "%p".
1987
1988 2019-02-10  Commit Queue  <commit-queue@webkit.org>
1989
1990         Unreviewed, rolling out r241167.
1991         https://bugs.webkit.org/show_bug.cgi?id=194482
1992
1993         Broke the GTK mediastream tests (Requested by philn on
1994         #webkit).
1995
1996         Reverted changeset:
1997
1998         "Filter out Overconstrainederror.constraint when getUserMedia
1999         is not granted"
2000         https://bugs.webkit.org/show_bug.cgi?id=194240
2001         https://trac.webkit.org/changeset/241167
2002
2003 2019-02-09  Darin Adler  <darin@apple.com>
2004
2005         Eliminate unnecessary String temporaries by using StringConcatenateNumbers
2006         https://bugs.webkit.org/show_bug.cgi?id=194021
2007
2008         Reviewed by Geoffrey Garen.
2009
2010         * NetworkProcess/NetworkResourceLoader.cpp:
2011         (WebKit::escapeIDForJSON): Use an ASCIILiteral to create a String.
2012
2013         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2014         (WebKit::NetworkCache::makeVersionedDirectoryPath): Remove String::number and let
2015         makeString do the conversion without allocating/destroying a String.
2016
2017         * NetworkProcess/mac/RemoteNetworkingContext.mm: Removed "using namespace WebCore".
2018         (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession): Remove String::number
2019         and let makeString do the conversion without allocating/destroying a String.
2020
2021         * NetworkProcess/webrtc/NetworkMDNSRegister.cpp: Removed "using namespace WebCore".
2022         (WebKit::registerMDNSNameCallback): Added explicit WebCore prefix as needed.
2023         (WebKit::NetworkMDNSRegister::registerMDNSName): Ditto. Also remove String::number
2024         and let makeString do the conversion without allocating/destroying a String.
2025
2026         * UIProcess/WebPageGroup.cpp:
2027         (WebKit::pageGroupData): Remove String::number and let makeString do the conversion
2028         without allocating/destroying a String.
2029         * UIProcess/WebPageProxy.cpp:
2030         (WebKit::WebPageProxy::createInspectorTargets): Ditto.
2031         * UIProcess/ios/WKLegacyPDFView.mm:
2032         (-[WKLegacyPDFView _URLForLinkAnnotation:]): Ditto.
2033         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
2034         (WebKit::uniqueWorldName): Ditto.
2035         * WebProcess/WebPage/WebPageInspectorTarget.cpp:
2036         (WebKit::WebPageInspectorTarget::identifier const): Ditto.
2037
2038 2019-02-09  Alexander Mikhaylenko  <exalm7659@gmail.com>
2039
2040         [GTK] Fix typo in the newly added API
2041         https://bugs.webkit.org/show_bug.cgi?id=194472
2042
2043         Reviewed by Michael Catanzaro.
2044
2045         Fix a typo: enableed -> enabled.
2046
2047         * UIProcess/API/glib/WebKitSettings.cpp:
2048         (webkit_settings_set_enable_back_forward_navigation_gestures):
2049         * UIProcess/API/gtk/WebKitSettings.h:
2050
2051 2019-02-08  Alex Christensen  <achristensen@webkit.org>
2052
2053         Speculative fix for Mojave API test after r241223
2054         https://bugs.webkit.org/show_bug.cgi?id=194427
2055
2056         * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
2057         (WebKit::XPCInitializationHandler):
2058         (WebKit::XPCServiceMain):
2059         Set the __APPLEEVENTSSERVICENAME environment variable before handling any xpc messages like we used to.
2060         I'll worry about making things right in the daemon later.
2061
2062 2019-02-08  Chris Dumez  <cdumez@apple.com>
2063
2064         [WK2][macOS] Avoid creating new CVDisplayLink objects for each WebProcess
2065         https://bugs.webkit.org/show_bug.cgi?id=194463
2066
2067         Reviewed by Tim Horton.
2068
2069         Avoid creating new CVDisplayLink objects for each WebProcess. We really only need one per
2070         display, creating such object is expensive and it is even worse in a PSON world where we
2071         swap process on navigation.
2072
2073         This patch moves the DisplayLink storing from WebProcessProxy to WebProcessPool. Also,
2074         a DisplayLink can now be associated to several IPC connections instead of having a 1:1
2075         mapping. When a DisplayLink no longer has any observers, we now merely stop it instead
2076         of destroying it.
2077
2078         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2079         (WebKit::WebProcessPool::startDisplayLink):
2080         (WebKit::WebProcessPool::stopDisplayLink):
2081         (WebKit::WebProcessPool::stopDisplayLinks):
2082         * UIProcess/WebProcessPool.h:
2083         * UIProcess/WebProcessProxy.cpp:
2084         (WebKit::WebProcessProxy::~WebProcessProxy):
2085         (WebKit::WebProcessProxy::processWillShutDown):
2086         (WebKit::WebProcessProxy::shutDown):
2087         * UIProcess/WebProcessProxy.h:
2088         * UIProcess/mac/DisplayLink.cpp:
2089         (WebKit::DisplayLink::DisplayLink):
2090         (WebKit::DisplayLink::addObserver):
2091         (WebKit::DisplayLink::removeObserver):
2092         (WebKit::DisplayLink::removeObservers):
2093         (WebKit::DisplayLink::hasObservers const):
2094         (WebKit::DisplayLink::displayLinkCallback):
2095         * UIProcess/mac/DisplayLink.h:
2096         * UIProcess/mac/WebProcessProxyMac.mm:
2097         (WebKit::WebProcessProxy::startDisplayLink):
2098         (WebKit::WebProcessProxy::stopDisplayLink):
2099
2100 2019-02-08  Alexander Mikhaylenko  <exalm7659@gmail.com>
2101
2102         [GTK] Implement back/forward touchpad gesture
2103         https://bugs.webkit.org/show_bug.cgi?id=193919
2104
2105         Reviewed by Michael Catanzaro.
2106
2107         Move ViewSnapshotStore and ViewGestureController from Cocoa/Mac directory
2108         to UIProcess/, also move some parts of mac/ViewGestreControllerMac.mm to
2109         ViewGestureController.cpp, split up Mac- and iOS-specific parts of
2110         ViewSnapshotStore.cpp into mac/ViewSnapshotMac.mm, then implement 2-finger
2111         touchpad swipe back-forward gesture for GTK based on that.
2112
2113         To avoid name conflict, rename existing ViewGestureController class inside
2114         UIProcess/API/gtk/WebKitWebViewBase.cpp into TouchGestureController.
2115
2116         Since GTK gestures can only work with 3 or 4 fingers, treat horizontal
2117         scrolling events as a swipe as long as there's nowhere to scroll in that
2118         direction and web page doesn't handle the scrolling.
2119
2120         This is only allowed for touchpads, even though it can theoretically work
2121         with touch mice and trackpoints.
2122
2123         The gesture requires every item in back-forward list to have a snapshot.
2124         There's already an existing infrastructure for that, so the patch changes
2125         a bunch of #if PLATFORM(COCOA) statements to also check for GTK platform.
2126         The snapshots have to be taken in sync, so the implementation draws webview
2127         widget into a Cairo image surface.
2128
2129         The gesture is disabled by default, and can be enabled by setting the newly
2130         added 'enable-back-forward-navigation-gestures' property in WebKitSettings to
2131         true.
2132
2133         Gesture drawing is implemented via Cairo. When the gesture is active, the
2134         actual page is drawn into a Cairo group, which is then drawn together with
2135         a given snapshot, as well as dimming and a drop shadow over the "lower" layer.
2136
2137         Also add a memory pressure handler that clears snapshot store when low on memory.
2138
2139         * DerivedSources-input.xcfilelist:
2140         * PlatformGTK.cmake:
2141         * PlatformMac.cmake:
2142         * Shared/SessionState.h: Add snapshot to back-forward items for GTK.
2143         * Shared/WebBackForwardListItem.h: Add snapshot to back-forward items for GTK.
2144         * SourcesCocoa.txt:
2145         * SourcesGTK.txt:
2146         * UIProcess/API/glib/WebKitSettings.cpp:
2147         Added 'enable-back-forward-navigation-gestures' property for enabling the gesture.
2148         (webKitSettingsSetProperty):
2149         (webKitSettingsGetProperty):
2150         (webkit_settings_class_init):
2151         (webkit_settings_get_enable_back_forward_navigation_gestures): Added, GTK only.
2152         (webkit_settings_set_enable_back_forward_navigation_gestures): Added, GTK only.
2153         * UIProcess/API/glib/WebKitWebView.cpp:
2154         (enableBackForwardNavigationGesturesChanged): Added, GTK only.
2155         (webkitWebViewUpdateSettings):
2156         (webkitWebViewDisconnectSettingsSignalHandlers):
2157         * UIProcess/API/gtk/PageClientImpl.cpp:
2158         (WebKit::PageClientImpl::setViewNeedsDisplay): Redraw the whole screen instead of a region during the gesture.
2159         (WebKit::PageClientImpl::takeViewSnapshot): Added.
2160         (WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore): Pass unhandled events to the gesture controller.
2161         (WebKit::PageClientImpl::didRemoveNavigationGestureSnapshot): Redraw the widget immediately after removing snapshot.
2162         (WebKit::PageClientImpl::didStartProvisionalLoadForMainFrame): Added, send a notification to the gesture controller.
2163         (WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):  Send a notification to the gesture controller.
2164         (WebKit::PageClientImpl::didFinishLoadForMainFrame):  Send a notification to the gesture controller.
2165         (WebKit::PageClientImpl::didFailLoadForMainFrame):  Added, send a notification to the gesture controller.
2166         (WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):  Send a notification to the gesture controller.
2167         (WebKit::PageClientImpl::didRestoreScrollPosition):  Added, send a notification to the gesture controller.
2168         * UIProcess/API/gtk/PageClientImpl.h:
2169         * UIProcess/API/gtk/WebKitSettings.h:
2170         Add webkit_settings_get_enable_back_forward_navigation_gestures() and webkit_settings_get_enable_back_forward_navigation_gestures()
2171         to public API.
2172         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2173         (webkitWebViewBaseDraw): Pass drawing to ViewGestureController during the gesture.
2174         (webkitWebViewBaseScrollEvent): Pass scroll events to ViewGestureController during the gesture.
2175         (webkitWebViewBaseGestureController): Renamed ViewGestureController to TouchGestureController.
2176         (webkitWebViewBaseViewGestureController): Added.
2177         (webkitWebViewBaseCreateWebPage): Create an instance of ViewGestureController.
2178         (webkitWebViewBaseTakeViewSnapshot): Added.
2179         (webkitWebViewBaseDidStartProvisionalLoadForMainFrame): Added.
2180         (webkitWebViewBaseDidFirstVisuallyNonEmptyLayoutForMainFrame): Added.
2181         (webkitWebViewBaseDidFinishLoadForMainFrame): Added.
2182         (webkitWebViewBaseDidFailLoadForMainFrame): Added.
2183         (webkitWebViewBaseDidSameDocumentNavigationForMainFrame): Added.
2184         (webkitWebViewBaseDidRestoreScrollPosition): Added.
2185         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
2186         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Mentioned the added functions in docs.
2187         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2188         (WebKit::WebProcessPool::platformInitialize): Move the check from WebMemoryPressureHandlerCocoa.mm here.
2189         * UIProcess/PageClient.h: Add takeViewSnapshot() for GTK.
2190         * UIProcess/ViewGestureController.cpp: Renamed from Source/WebKit/UIProcess/Cocoa/ViewGestureController.cpp.
2191         (WebKit::ViewGestureController::ViewGestureController):
2192         (WebKit::ViewGestureController::~ViewGestureController):
2193         (WebKit::ViewGestureController::disconnectFromProcess):
2194         (WebKit::ViewGestureController::connectToProcess):
2195         (WebKit::ViewGestureController::controllerForGesture):
2196         (WebKit::ViewGestureController::takeNextGestureID):
2197         (WebKit::ViewGestureController::willBeginGesture):
2198         (WebKit::ViewGestureController::didEndGesture):
2199         (WebKit::ViewGestureController::setAlternateBackForwardListSourcePage):
2200         (WebKit::ViewGestureController::canSwipeInDirection const):
2201         (WebKit::ViewGestureController::didStartProvisionalOrSameDocumentLoadForMainFrame):
2202         (WebKit::ViewGestureController::didStartProvisionalLoadForMainFrame):
2203         (WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame):
2204         (WebKit::ViewGestureController::didRepaintAfterNavigation):
2205         (WebKit::ViewGestureController::didHitRenderTreeSizeThreshold):
2206         (WebKit::ViewGestureController::didRestoreScrollPosition):
2207         (WebKit::ViewGestureController::didReachMainFrameLoadTerminalState):
2208         (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
2209         (WebKit::ViewGestureController::checkForActiveLoads):
2210         (WebKit::ViewGestureController::SnapshotRemovalTracker::SnapshotRemovalTracker):
2211         (WebKit::ViewGestureController::SnapshotRemovalTracker::eventsDescription):
2212         (WebKit::ViewGestureController::SnapshotRemovalTracker::log const):
2213         (WebKit::ViewGestureController::SnapshotRemovalTracker::resume):
2214         (WebKit::ViewGestureController::SnapshotRemovalTracker::start):
2215         (WebKit::ViewGestureController::SnapshotRemovalTracker::reset):
2216         (WebKit::ViewGestureController::SnapshotRemovalTracker::stopWaitingForEvent):
2217         (WebKit::ViewGestureController::SnapshotRemovalTracker::eventOccurred):
2218         (WebKit::ViewGestureController::SnapshotRemovalTracker::cancelOutstandingEvent):
2219         (WebKit::ViewGestureController::SnapshotRemovalTracker::hasOutstandingEvent):
2220         (WebKit::ViewGestureController::SnapshotRemovalTracker::fireRemovalCallbackIfPossible):
2221         (WebKit::ViewGestureController::SnapshotRemovalTracker::fireRemovalCallbackImmediately):
2222         (WebKit::ViewGestureController::SnapshotRemovalTracker::watchdogTimerFired):
2223         (WebKit::ViewGestureController::SnapshotRemovalTracker::startWatchdog):
2224         (WebKit::deltaShouldCancelSwipe):
2225         (WebKit::ViewGestureController::PendingSwipeTracker::PendingSwipeTracker):
2226         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):
2227         (WebKit::ViewGestureController::PendingSwipeTracker::handleEvent):
2228         (WebKit::ViewGestureController::PendingSwipeTracker::eventWasNotHandledByWebCore):
2229         (WebKit::ViewGestureController::PendingSwipeTracker::tryToStartSwipe):
2230         (WebKit::ViewGestureController::PendingSwipeTracker::reset):
2231         (WebKit::ViewGestureController::startSwipeGesture):
2232         (WebKit::ViewGestureController::isPhysicallySwipingLeft const):
2233         (WebKit::ViewGestureController::shouldUseSnapshotForSize):
2234         (WebKit::ViewGestureController::forceRepaintIfNeeded):
2235         (WebKit::ViewGestureController::willEndSwipeGesture):
2236         (WebKit::ViewGestureController::endSwipeGesture):
2237         (WebKit::ViewGestureController::requestRenderTreeSizeNotificationIfNeeded):
2238         * UIProcess/ViewGestureController.h: Renamed from Source/WebKit/UIProcess/Cocoa/ViewGestureController.h.
2239         (WebKit::ViewGestureController::wheelEventWasNotHandledByWebCore):
2240         (WebKit::ViewGestureController::shouldIgnorePinnedState):
2241         (WebKit::ViewGestureController::setShouldIgnorePinnedState):
2242         (WebKit::ViewGestureController::hasActiveMagnificationGesture const):
2243         (WebKit::ViewGestureController::setCustomSwipeViews):
2244         (WebKit::ViewGestureController::setCustomSwipeViewsTopContentInset):
2245         (WebKit::ViewGestureController::setDidMoveSwipeSnapshotCallback):
2246         (WebKit::ViewGestureController::backgroundColorForCurrentSnapshot const):
2247         (WebKit::ViewGestureController::didFinishLoadForMainFrame):
2248         (WebKit::ViewGestureController::didFailLoadForMainFrame):
2249         (WebKit::ViewGestureController::setSwipeGestureEnabled):
2250         (WebKit::ViewGestureController::isSwipeGestureEnabled):
2251         (WebKit::ViewGestureController::SnapshotRemovalTracker::pause):
2252         (WebKit::ViewGestureController::SnapshotRemovalTracker::isPaused const):
2253         (WebKit::ViewGestureController::SnapshotRemovalTracker::hasRemovalCallback const):
2254         (WebKit::ViewGestureController::SnapshotRemovalTracker::renderTreeSizeThreshold const):
2255         (WebKit::ViewGestureController::SnapshotRemovalTracker::setRenderTreeSizeThreshold):
2256         (WebKit::ViewGestureController::PendingSwipeTracker::shouldIgnorePinnedState):
2257         (WebKit::ViewGestureController::PendingSwipeTracker::setShouldIgnorePinnedState):
2258         (WebKit::ViewGestureController::SwipeProgressTracker::progress const):
2259         (WebKit::ViewGestureController::SwipeProgressTracker::direction const):
2260         * UIProcess/ViewGestureController.messages.in: Renamed from Source/WebKit/UIProcess/Cocoa/ViewGestureController.messages.in.
2261         * UIProcess/ViewSnapshotStore.cpp: Copied from Source/WebKit/UIProcess/mac/ViewSnapshotStore.mm.
2262         (WebKit::ViewSnapshotStore::ViewSnapshotStore):
2263         (WebKit::ViewSnapshotStore::~ViewSnapshotStore):
2264         (WebKit::ViewSnapshotStore::singleton):
2265         (WebKit::ViewSnapshotStore::didAddImageToSnapshot):
2266         (WebKit::ViewSnapshotStore::willRemoveImageFromSnapshot):
2267         (WebKit::ViewSnapshotStore::pruneSnapshots):
2268         (WebKit::ViewSnapshotStore::recordSnapshot):
2269         (WebKit::ViewSnapshotStore::discardSnapshotImages):
2270         (WebKit::ViewSnapshot::~ViewSnapshot):
2271         * UIProcess/ViewSnapshotStore.h: Renamed from Source/WebKit/UIProcess/mac/ViewSnapshotStore.h.
2272         (WebKit::ViewSnapshot::setRenderTreeSize):
2273         (WebKit::ViewSnapshot::renderTreeSize const):
2274         (WebKit::ViewSnapshot::setBackgroundColor):
2275         (WebKit::ViewSnapshot::backgroundColor const):
2276         (WebKit::ViewSnapshot::setViewScrollPosition):
2277         (WebKit::ViewSnapshot::viewScrollPosition const):
2278         (WebKit::ViewSnapshot::setDeviceScaleFactor):
2279         (WebKit::ViewSnapshot::deviceScaleFactor const):
2280         (WebKit::ViewSnapshot::surface const):
2281         (WebKit::ViewSnapshot::imageSizeInBytes const):
2282         (WebKit::ViewSnapshot::size const):
2283         (WebKit::ViewSnapshotStore::setDisableSnapshotVolatilityForTesting):
2284         (WebKit::ViewSnapshotStore::disableSnapshotVolatilityForTesting const):
2285         * UIProcess/WebBackForwardList.cpp:
2286         (WebKit::WebBackForwardList::didRemoveItem): Unset snapshot for GTK.
2287         * UIProcess/WebMemoryPressureHandler.cpp: Copied from Source/WebKit/UIProcess/Cocoa/WebMemoryPressureHandlerCocoa.mm.
2288         (WebKit::installMemoryPressureHandler):
2289         * UIProcess/WebMemoryPressureHandler.h: Renamed from Source/WebKit/UIProcess/Cocoa/WebMemoryPressureHandlerCocoa.h.
2290         * UIProcess/WebPageProxy.cpp:
2291         (WebKit::WebPageProxy::recordNavigationSnapshot): Take snapshots for GTK.
2292         * UIProcess/WebPageProxy.h:
2293         * UIProcess/gtk/ViewGestureControllerGtk.cpp: Added. This is a port of
2294         UIProcess/mac/ViewGestureControllerMac.mm. SwipeProgressTracker class is a
2295         re-implementation of trackSwipeEventWithOptions.
2296         (WebKit::isEventStop):
2297         (WebKit::ViewGestureController::platformTeardown):
2298         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanStartSwipe):
2299         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanEndSwipe):
2300         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanInfluenceSwipe):
2301         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventGetScrollingDeltas):
2302         (WebKit::ViewGestureController::handleScrollWheelEvent):
2303         (WebKit::ViewGestureController::trackSwipeGesture):
2304         (WebKit::ViewGestureController::SwipeProgressTracker::SwipeProgressTracker):
2305         (WebKit::ViewGestureController::SwipeProgressTracker::startTracking):
2306         (WebKit::ViewGestureController::SwipeProgressTracker::reset):
2307         (WebKit::ViewGestureController::SwipeProgressTracker::handleEvent):
2308         (WebKit::ViewGestureController::SwipeProgressTracker::startAnimation):
2309         (WebKit::easeOutCubic):
2310         (WebKit::ViewGestureController::SwipeProgressTracker::onAnimationTick):
2311         (WebKit::ViewGestureController::SwipeProgressTracker::endAnimation):
2312         (WebKit::ViewGestureController::beginSwipeGesture):
2313         (WebKit::ViewGestureController::handleSwipeGesture):
2314         (WebKit::ViewGestureController::draw):
2315         (WebKit::ViewGestureController::removeSwipeSnapshot):
2316         (WebKit::ViewGestureController::beginSimulatedSwipeInDirectionForTesting):
2317         (WebKit::ViewGestureController::completeSimulatedSwipeInDirectionForTesting):
2318         * UIProcess/gtk/ViewSnapshotStoreGtk.cpp: Renamed from Source/WebKit/UIProcess/Cocoa/WebMemoryPressureHandlerCocoa.mm.
2319         (WebKit::ViewSnapshot::create):
2320         (WebKit::ViewSnapshot::ViewSnapshot):
2321         (WebKit::ViewSnapshot::hasImage const):
2322         (WebKit::ViewSnapshot::clearImage):
2323         (WebKit::ViewSnapshot::imageSizeInBytes const):
2324         (WebKit::ViewSnapshot::size const):
2325         * UIProcess/gtk/WebProcessPoolGtk.cpp:
2326         (WebKit::memoryPressureMonitorDisabled): Added.
2327         (WebKit::WebProcessPool::platformInitialize): Install memory pressure handler.
2328         (WebKit::WebProcessPool::platformInitializeWebProcess): Use memoryPressureMonitorDisabled().
2329         * UIProcess/mac/ViewGestureControllerMac.mm:
2330         Moved many functions into UIProcess/ViewGestureController.cpp
2331         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanStartSwipe):
2332         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanEndSwipe):
2333         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanInfluenceSwipe):
2334         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventGetScrollingDeltas):
2335         (WebKit::ViewGestureController::trackSwipeGesture):
2336         (WebKit::scrollEventCanInfluenceSwipe): Deleted.
2337         (WebKit::deltaShouldCancelSwipe): Deleted.
2338         (WebKit::ViewGestureController::PendingSwipeTracker::PendingSwipeTracker): Deleted.
2339         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe): Deleted.
2340         (WebKit::ViewGestureController::PendingSwipeTracker::handleEvent): Deleted.
2341         (WebKit::ViewGestureController::PendingSwipeTracker::eventWasNotHandledByWebCore): Deleted.
2342         (WebKit::ViewGestureController::PendingSwipeTracker::tryToStartSwipe): Deleted.
2343         (WebKit::ViewGestureController::PendingSwipeTracker::reset): Deleted.
2344         (WebKit::ViewGestureController::willEndSwipeGesture): Deleted.
2345         (WebKit::ViewGestureController::shouldUseSnapshotForSize): Deleted.
2346         (WebKit::ViewGestureController::isPhysicallySwipingLeft const): Deleted.
2347         (WebKit::ViewGestureController::endSwipeGesture): Deleted.
2348         (WebKit::ViewGestureController::forceRepaintIfNeeded): Deleted.
2349         (WebKit::ViewGestureController::requestRenderTreeSizeNotificationIfNeeded): Deleted.
2350         * UIProcess/mac/ViewSnapshotStoreMac.mm: Renamed from Source/WebKit/UIProcess/mac/ViewSnapshotStore.mm.
2351         (WebKit::ViewSnapshotStore::snapshottingContext):
2352         (WebKit::ViewSnapshot::create):
2353         (WebKit::ViewSnapshot::ViewSnapshot):
2354         (WebKit::ViewSnapshot::setSurface):
2355         (WebKit::ViewSnapshot::hasImage const):
2356         (WebKit::ViewSnapshot::clearImage):
2357         (WebKit::ViewSnapshot::setVolatile):
2358         (WebKit::ViewSnapshot::asLayerContents):
2359         (WebKit::ViewSnapshot::asImageForTesting):
2360         * WebKit.xcodeproj/project.pbxproj:
2361         * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
2362         Make SetRenderTreeSizeNotificationThreshold() cross-platform.
2363         (WebKit::ViewGestureGeometryCollector::ViewGestureGeometryCollector):
2364         (WebKit::ViewGestureGeometryCollector::computeMinimumAndMaximumViewportScales const):
2365         (WebKit::ViewGestureGeometryCollector::mainFrameDidLayout):
2366         * WebProcess/WebPage/ViewGestureGeometryCollector.h:
2367         * WebProcess/WebPage/ViewGestureGeometryCollector.messages.in:
2368         * WebProcess/WebPage/WebPage.cpp:
2369         Start using ViewGestureGeometryCollector for GTK.
2370         (WebKit::WebPage::mainFrameDidLayout):
2371         * WebProcess/WebPage/WebPage.h:
2372
2373 2019-02-08  Alex Christensen  <achristensen@webkit.org>
2374
2375         Add SPI to use networking daemon instead of XPC service
2376         https://bugs.webkit.org/show_bug.cgi?id=194427
2377
2378         Reviewed by Geoffrey Garen.
2379
2380         There is still work to be done, but with the proper plist it starts and loads webpages!
2381
2382         * NetworkProcess/EntryPoint/Cocoa/Daemon/DaemonEntryPoint.mm:
2383         (WebKit::DaemonMain):
2384         * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h:
2385         * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
2386         (WebKit::XPCEventHandler):
2387         (WebKit::XPCInitializationHandler):
2388         (WebKit::XPCServiceMain):
2389         (WebKit::XPCServiceEventHandler): Deleted.
2390         * UIProcess/API/APIProcessPoolConfiguration.h:
2391         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
2392         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
2393         (-[_WKProcessPoolConfiguration usesNetworkingDaemon]):
2394         (-[_WKProcessPoolConfiguration setUsesNetworkingDaemon:]):
2395         * UIProcess/AuxiliaryProcessProxy.cpp:
2396         (WebKit::AuxiliaryProcessProxy::getLaunchOptions):
2397         * UIProcess/Launcher/ProcessLauncher.h:
2398         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2399         (WebKit::serviceName):
2400         (WebKit::ProcessLauncher::launchProcess):
2401         * UIProcess/Network/NetworkProcessProxy.cpp:
2402         (WebKit::NetworkProcessProxy::getLaunchOptions):
2403         * UIProcess/WebProcessPool.cpp:
2404         (WebKit::WebProcessPool::usesNetworkingDaemon const):
2405         * UIProcess/WebProcessPool.h:
2406
2407 2019-02-08  Truitt Savell  <tsavell@apple.com>
2408
2409         Unreviewed, rolling out r241197.
2410
2411         Broke iOS Simulator Debug build and casued 1 API failure on
2412         High Sierra
2413
2414         Reverted changeset:
2415
2416         "Add SPI to use networking daemon instead of XPC service"
2417         https://bugs.webkit.org/show_bug.cgi?id=194427
2418         https://trac.webkit.org/changeset/241197
2419
2420 2019-02-08  Beth Dakin  <bdakin@apple.com>
2421
2422         Abstract and discussion comments needed for afterScreenUpdates
2423         https://bugs.webkit.org/show_bug.cgi?id=194442
2424
2425         Reviewed by Wenson Hsieh.
2426
2427         Forgot to add these comments with https://bugs.webkit.org/show_bug.cgi?id=194362
2428         * UIProcess/API/Cocoa/WKSnapshotConfiguration.h:
2429
2430 2019-02-08  Beth Dakin  <bdakin@apple.com>
2431
2432         Add afterScreenUpdates to WKSnapshotConfiguration
2433         https://bugs.webkit.org/show_bug.cgi?id=194362
2434         -and corresponding-
2435         <rdar://problem/40655528> Please add an "after screen updates" property to 
2436         WKSnapshotConfiguration (to solve blank snapshots)
2437
2438         Reviewed by Tim Horton.
2439
2440         This is the WebKit equivalent of - (UIView *)snapshotViewAfterScreenUpdates:(BOOL)afterUpdates;
2441         This makes our snapshotting API more predictable and reliable on iOS devices, 
2442         which is why the new configuration property defaults to YES.
2443
2444         New property that defaults to YES.
2445         * UIProcess/API/Cocoa/WKSnapshotConfiguration.h:
2446         * UIProcess/API/Cocoa/WKSnapshotConfiguration.mm:
2447         (-[WKSnapshotConfiguration init]):
2448         (-[WKSnapshotConfiguration copyWithZone:]):
2449
2450         When afterScreenUpdates is set, invoke the snapshot via 
2451         callAfterNextPresentationUpdate.
2452         * UIProcess/API/Cocoa/WKWebView.mm:
2453         (-[WKWebView takeSnapshotWithConfiguration:completionHandler:]):
2454         (-[WKWebView _callCompletionHandler:withSnapshotImage:atDeviceScale:]):
2455
2456 2019-02-08  Alex Christensen  <achristensen@webkit.org>
2457
2458         Add SPI to use networking daemon instead of XPC service
2459         https://bugs.webkit.org/show_bug.cgi?id=194427
2460
2461         Reviewed by Geoffrey Garen.
2462
2463         There is still work to be done, but with the proper plist it starts and loads webpages!
2464
2465         * NetworkProcess/EntryPoint/Cocoa/Daemon/DaemonEntryPoint.mm:
2466         (WebKit::DaemonMain):
2467         * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h:
2468         * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
2469         (WebKit::XPCEventHandler):
2470         (WebKit::XPCInitializationHandler):
2471         (WebKit::XPCServiceMain):
2472         (WebKit::XPCServiceEventHandler): Deleted.
2473         * UIProcess/API/APIProcessPoolConfiguration.h:
2474         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
2475         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
2476         (-[_WKProcessPoolConfiguration usesNetworkingDaemon]):
2477         (-[_WKProcessPoolConfiguration setUsesNetworkingDaemon:]):
2478         * UIProcess/AuxiliaryProcessProxy.cpp:
2479         (WebKit::AuxiliaryProcessProxy::getLaunchOptions):
2480         * UIProcess/Launcher/ProcessLauncher.h:
2481         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2482         (WebKit::serviceName):
2483         (WebKit::ProcessLauncher::launchProcess):
2484         * UIProcess/Network/NetworkProcessProxy.cpp:
2485         (WebKit::NetworkProcessProxy::getLaunchOptions):
2486         * UIProcess/WebProcessPool.cpp:
2487         (WebKit::WebProcessPool::usesNetworkingDaemon const):
2488         * UIProcess/WebProcessPool.h:
2489
2490 2019-02-08  Keith Rollin  <krollin@apple.com>
2491
2492         Unreviewed build fix.
2493
2494         r241135 modified how entitlements were built up for the macOS. Those
2495         changes broke the iOSMac builds. Bring back some deletions in order to
2496         fix iOSMac.
2497
2498         * Configurations/PluginService.64.xcconfig:
2499         * Configurations/PluginService.entitlements: Added.
2500         * WebKit.xcodeproj/project.pbxproj:
2501
2502 2019-02-07  Chris Dumez  <cdumez@apple.com>
2503
2504         Mark more heap-allocated classes as fast allocated
2505         https://bugs.webkit.org/show_bug.cgi?id=194422
2506
2507         Reviewed by Ryosuke Niwa.
2508
2509         * NetworkProcess/NetworkLoad.cpp:
2510         * NetworkProcess/NetworkLoadChecker.h:
2511         * NetworkProcess/NetworkResourceLoader.cpp:
2512         * Platform/IPC/Connection.h:
2513         * Platform/IPC/mac/ImportanceAssertion.h:
2514         * PluginProcess/PluginCreationParameters.h:
2515         * Shared/API/Cocoa/RemoteObjectRegistry.h:
2516         * Shared/WebEvent.h:
2517         * UIProcess/API/APIHTTPCookieStore.cpp:
2518         * UIProcess/API/APINotificationProvider.h:
2519         * UIProcess/API/Cocoa/PageLoadStateObserver.h:
2520         * UIProcess/API/Cocoa/WKHTTPCookieStore.mm:
2521         * UIProcess/API/Cocoa/WKWebView.mm:
2522         (-[WKWebView _setInputDelegate:]):
2523         * UIProcess/API/gtk/PageClientImpl.h:
2524         * UIProcess/BackingStore.h:
2525         * UIProcess/Cocoa/AutomationClient.h:
2526         * UIProcess/Cocoa/DiagnosticLoggingClient.h:
2527         * UIProcess/Cocoa/DownloadClient.h:
2528         * UIProcess/Cocoa/FindClient.h:
2529         * UIProcess/Cocoa/NavigationState.h:
2530         * UIProcess/Cocoa/UIDelegate.h:
2531         * UIProcess/Cocoa/ViewGestureController.h:
2532         * UIProcess/DeviceIdHashSaltStorage.h:
2533         * UIProcess/Downloads/DownloadProxyMap.h:
2534         * UIProcess/Gamepad/UIGamepad.h:
2535         * UIProcess/Notifications/WebNotificationProvider.h:
2536         * UIProcess/ProcessAssertion.h:
2537         * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.h:
2538         * UIProcess/WebContextInjectedBundleClient.h:
2539         * UIProcess/WebFormClient.h:
2540         * UIProcess/WebGeolocationProvider.h:
2541         * UIProcess/WebPageProxy.h:
2542         * WebProcess/Automation/WebAutomationSessionProxy.h:
2543         * WebProcess/InjectedBundle/API/APIInjectedBundleBundleClient.h:
2544         * WebProcess/InjectedBundle/API/APIInjectedBundleEditorClient.h:
2545         * WebProcess/InjectedBundle/API/APIInjectedBundlePageContextMenuClient.h:
2546         * WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h:
2547         * WebProcess/InjectedBundle/API/APIInjectedBundlePageResourceLoadClient.h:
2548         * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
2549         * WebProcess/InjectedBundle/APIInjectedBundleFormClient.h:
2550         * WebProcess/Network/webrtc/LibWebRTCNetwork.h:
2551         * WebProcess/Network/webrtc/LibWebRTCSocket.h:
2552         * WebProcess/Network/webrtc/WebRTCResolver.h:
2553         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2554         * WebProcess/WebPage/DrawingArea.h:
2555
2556 2019-02-07  Wenson Hsieh  <wenson_hsieh@apple.com>
2557
2558         [iOS] [WK2] Modernize code for applying autocorrection
2559         https://bugs.webkit.org/show_bug.cgi?id=194397
2560
2561         Reviewed by Tim Horton.
2562
2563         * UIProcess/ios/WKContentViewInteraction.h:
2564         * UIProcess/ios/WKContentViewInteraction.mm:
2565         (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
2566         (-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
2567
2568         Use BlockPtr instead of temporarily storing the completion handler.
2569
2570         * WebProcess/WebPage/WebPage.h:
2571         * WebProcess/WebPage/WebPage.messages.in:
2572
2573         Change a LegacySync to Delayed.
2574
2575         * WebProcess/WebPage/ios/WebPageIOS.mm:
2576         (WebKit::WebPage::applyAutocorrection):
2577         (WebKit::WebPage::syncApplyAutocorrection):
2578         (WebKit::WebPage::applyAutocorrectionInternal):
2579
2580 2019-02-07  Wenson Hsieh  <wenson_hsieh@apple.com>
2581
2582         [iOS] Clicking links in Safari using Apple Pencil is much more difficult after r238475
2583         https://bugs.webkit.org/show_bug.cgi?id=194415
2584         <rdar://problem/47550281>
2585
2586         Reviewed by Tim Horton.
2587
2588         Fix the bug by not firing the Apple-pencil-exclusive tap gesture recognizer in the case where editable images
2589         are disabled. This gesture recognizer is only used for inserting editable images, and currently conflicts with
2590         the synthetic click gesture recognizer used to recognize clicks from generic digitizer inputs.
2591
2592         * UIProcess/ios/WKContentViewInteraction.mm:
2593         (-[WKContentView gestureRecognizerShouldBegin:]):
2594         (-[WKContentView _stylusSingleTapRecognized:]):
2595
2596 2019-02-07  Per Arne Vollan  <pvollan@apple.com>
2597
2598         [macOS] Block coreservicesd in sandbox.
2599         https://bugs.webkit.org/show_bug.cgi?id=192670
2600
2601         Reviewed by Alexey Proskuryakov.
2602
2603         We should block CoreServices in newer versions of macOS. In order to achieve this we need to avoid calling
2604         _RegisterApplication before entering the sandbox, since this call will open up a connection to CoreServices.
2605         The call to _RegisterApplication is moved to ChildProcess::updateProcessName, since it is needed to
2606         successfully update the process name. The call to ChildProcess::updateProcessName is made after entering
2607         the sandbox.
2608
2609         * Shared/AuxiliaryProcess.cpp:
2610         (WebKit::AuxiliaryProcess::initialize):
2611         * WebProcess/cocoa/WebProcessCocoa.mm:
2612         (WebKit::WebProcess::initializeProcessName):
2613         (WebKit::WebProcess::platformInitializeProcess):
2614         * WebProcess/com.apple.WebProcess.sb.in:
2615
2616 2019-02-07  Youenn Fablet  <youenn@apple.com>
2617
2618         Filter out Overconstrainederror.constraint when getUserMedia is not granted
2619         https://bugs.webkit.org/show_bug.cgi?id=194240
2620
2621         Reviewed by Eric Carlson.
2622
2623         Make sure in UIProcess to filter out constraint if either the page was not granted gum access or it has no persistent access.
2624
2625         Refactor UserMediaPermissionRequestManagerProxy to make the implementation easier to understand.
2626
2627         Covered by added test.
2628
2629         * UIProcess/UserMediaPermissionCheckProxy.cpp:
2630         (WebKit::UserMediaPermissionCheckProxy::setUserMediaAccessInfo):
2631         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2632         (WebKit::UserMediaPermissionRequestManagerProxy::captureDevicesChanged):
2633         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted):
2634         (WebKit::UserMediaPermissionRequestManagerProxy::grantAccess):
2635         (WebKit::UserMediaPermissionRequestManagerProxy::getRequestAction):
2636         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
2637         (WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionRequest):
2638         (WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionInvalidRequest):
2639         (WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionValidRequest):
2640         (WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo):
2641         (WebKit::UserMediaPermissionRequestManagerProxy::wasGrantedVideoOrAudioAccess):
2642         (WebKit::UserMediaPermissionRequestManagerProxy::computeFilteredDeviceList):
2643         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
2644         (WebKit::UserMediaPermissionRequestManagerProxy::createPermissionRequest): Deleted.
2645         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
2646         * UIProcess/UserMediaPermissionRequestProxy.h:
2647         (WebKit::UserMediaPermissionRequestProxy::isPending const):
2648         (WebKit::UserMediaPermissionRequestProxy::setEligibleVideoDeviceUIDs):
2649         (WebKit::UserMediaPermissionRequestProxy::setEligibleAudioDeviceUIDs):
2650         (WebKit::UserMediaPermissionRequestProxy::hasAudioDevice const):
2651         (WebKit::UserMediaPermissionRequestProxy::hasVideoDevice const):
2652         (WebKit::UserMediaPermissionRequestProxy::hasPersistentAccess const):
2653         (WebKit::UserMediaPermissionRequestProxy::setHasPersistentAccess):
2654         (WebKit::UserMediaPermissionRequestProxy::userMediaID const):
2655         (WebKit::UserMediaPermissionRequestProxy::topLevelDocumentSecurityOrigin const):
2656         (WebKit::UserMediaPermissionRequestProxy::userMediaDocumentSecurityOrigin const):
2657         (WebKit::UserMediaPermissionRequestProxy::userRequest const):
2658         (WebKit::UserMediaPermissionRequestProxy::setDeviceIdentifierHashSalt):
2659         (WebKit::UserMediaPermissionRequestProxy::deviceIdentifierHashSalt const):
2660         (WebKit::UserMediaPermissionRequestProxy::audioDevice const):
2661         (WebKit::UserMediaPermissionRequestProxy::videoDevice const):
2662         * UIProcess/WebPageProxy.cpp:
2663         (WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
2664         * UIProcess/WebPageProxy.h:
2665
2666 2019-02-07  Wenson Hsieh  <wenson_hsieh@apple.com>
2667
2668         [iOS] [WK2] Modernize autocorrection context code
2669         https://bugs.webkit.org/show_bug.cgi?id=194373
2670
2671         Reviewed by Tim Horton.
2672
2673         * Shared/ios/WebAutocorrectionContext.h: Added.
2674         (WebKit::WebAutocorrectionContext::encode const):
2675         (WebKit::WebAutocorrectionContext::decode):
2676
2677         Introduce a WebAutocorrectionContext struct that encapsulates the individual pieces of autocorrection context.
2678         Change to use this instead of a long list of arguments when propagating autocorrection context information over
2679         IPC.
2680
2681         * UIProcess/AutoCorrectionCallback.h:
2682         * UIProcess/WebPageProxy.h:
2683         * UIProcess/WebPageProxy.messages.in:
2684         * UIProcess/ios/WKContentViewInteraction.h:
2685         * UIProcess/ios/WKContentViewInteraction.mm:
2686         (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
2687         (+[WKAutocorrectionContext autocorrectionContextWithContext:]):
2688         (+[WKAutocorrectionContext autocorrectionContextWithData:markedText:selectedText:afterText:selectedRangeInMarkedText:]): Deleted.
2689
2690         Change this constructor to take an entire WebAutocorrectionContext.
2691
2692         * UIProcess/ios/WebPageProxyIOS.mm:
2693         (WebKit::WebPageProxy::autocorrectionContextCallback):
2694         (WebKit::WebPageProxy::requestAutocorrectionContext):
2695         (WebKit::WebPageProxy::autocorrectionContextSync):
2696         (WebKit::WebPageProxy::getAutocorrectionContext): Deleted.
2697         * WebKit.xcodeproj/project.pbxproj:
2698         * WebProcess/WebPage/WebPage.h:
2699         * WebProcess/WebPage/WebPage.messages.in:
2700
2701         Use Delayed instead of LegacySync.
2702
2703         * WebProcess/WebPage/ios/WebPageIOS.mm:
2704         (WebKit::WebPage::autocorrectionContext):
2705
2706         Renamed from computeAutocorrectionContext. This is now a private method on WebPage that uses the focused or main
2707         frame to compute and return a WebAutocorrectionContext.
2708
2709         (WebKit::WebPage::requestAutocorrectionContext):
2710         (WebKit::WebPage::autocorrectionContextSync):
2711
2712         Renamed getAutocorrectionContext to autocorrectionContextSync.
2713
2714         (WebKit::computeAutocorrectionContext): Deleted.
2715         (WebKit::WebPage::getAutocorrectionContext): Deleted.
2716
2717 2019-02-07  Youenn Fablet  <youenn@apple.com>
2718
2719         Simplify applyConstraints callbacks
2720         https://bugs.webkit.org/show_bug.cgi?id=194297
2721
2722         Reviewed by Eric Carlson.
2723
2724         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
2725         (WebKit::UserMediaCaptureManagerProxy::applyConstraints):
2726         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
2727         (WebKit::UserMediaCaptureManager::Source::applyConstraintsSucceeded):
2728         (WebKit::UserMediaCaptureManager::Source::applyConstraintsFailed):
2729         (WebKit::UserMediaCaptureManager::applyConstraintsFailed):
2730         * WebProcess/cocoa/UserMediaCaptureManager.h:
2731
2732 2019-02-07  Brent Fulgham  <bfulgham@apple.com>
2733
2734         Permit additional IOKit Properties needed by Media PlugIns on older Mac Hardware
2735         https://bugs.webkit.org/show_bug.cgi?id=194412
2736         <rdar://problem/47820615>
2737
2738         Reviewed by Per Arne Vollan.
2739
2740         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
2741
2742 2019-02-07  Brent Fulgham  <bfulgham@apple.com>
2743
2744         Permit additional IOKit Properties needed by older Mac Hardware
2745         https://bugs.webkit.org/show_bug.cgi?id=194410
2746         <rdar://problem/47820620>
2747
2748         Reviewed by Per Arne Vollan.
2749
2750         * WebProcess/com.apple.WebProcess.sb.in:
2751
2752 2019-02-07  Brady Eidson  <beidson@apple.com>
2753
2754         Rename the TAKE_DOWNLOAD_ASSERTION macro.
2755
2756         Rubberstamped by Andy Estes.
2757
2758         * NetworkProcess/Downloads/DownloadMap.cpp:
2759         * NetworkProcess/Downloads/DownloadMap.h:
2760
2761 2019-02-07  Keith Rollin  <krollin@apple.com>
2762
2763         Fix XCBuild issue related to codesigning WebContent process
2764         https://bugs.webkit.org/show_bug.cgi?id=193799
2765         <rdar://problem/47533890>
2766
2767         Reviewed by Brent Fulgham.
2768
2769         Building with XCBuild enabled results in the error message "cannot
2770         read entitlement data" when trying to codesign the macOS XPC
2771         processes. The reason for this error message is that there is a build
2772         step that deletes any previous "stale" generated .xcent file before
2773         building up a new one. With XCBuild enabled, the build steps got
2774         re-ordered, such that the step that deletes this file could get
2775         executed after the steps that build up the file. The built-up set of
2776         entitlements is now gone, and the build process fails when `codesign`
2777         tries to access it.
2778
2779         The apparent quick-fix to this problem -- of tweaking dependencies so
2780         that the build steps execute in the desired order -- wouldn't work
2781         with XCBuild. Establishing these dependencies would require both
2782         having multiple build phases produce the same .xcent file as output,
2783         as well as a build phase that has this file as an input and an output.
2784         XCBuild either forbids or frowns upon these configurations.
2785
2786         Ultimately, the solution that worked was to take over complete control
2787         of the codesigning process. This means (a) not specifying a base
2788         .entitlements file that XCode uses to start with (and which was
2789         subsequently altered via custom build scripts), (b) not letting XCode
2790         automatically and silently inject a 'get-task-all' entitlement used to
2791         facilitate debugging (we now add that entitlement by hand), and (c)
2792         building up all of our entitlements by hand via a single custom
2793         script. Because of the addition of this custom script, many other
2794         scripts and entitlements files could now be removed.
2795
2796         * Configurations/BaseXPCService.xcconfig:
2797         * Configurations/Databases-iOS.entitlements: Removed.
2798         * Configurations/Network-OSX-restricted.entitlements: Removed.
2799         * Configurations/Network-OSX-sandbox.entitlements: Removed.
2800         * Configurations/Network-OSX.entitlements: Removed.
2801         * Configurations/NetworkService.xcconfig:
2802         * Configurations/PluginService.64.xcconfig:
2803         * Configurations/PluginService.entitlements: Removed.
2804         * Configurations/WebContent-OSX-sandbox.entitlements: Removed.
2805         * Configurations/WebContent-OSX.entitlements: Removed.
2806         * Configurations/WebContent-or-Plugin-OSX-restricted.entitlements: Removed.
2807         * Configurations/WebContentService.xcconfig:
2808         * Scripts/copy-webcontent-resources-to-private-headers.sh:
2809         * Scripts/process-entitlements.sh: Added.
2810         * Scripts/process-network-sandbox-entitlements.sh: Removed.
2811         * Scripts/process-webcontent-or-plugin-entitlements.sh: Removed.
2812         * Scripts/process-webcontent-sandbox-entitlements.sh: Removed.
2813         * WebKit.xcodeproj/project.pbxproj:
2814
2815 2019-02-07  Alex Christensen  <achristensen@webkit.org>
2816
2817         Fix internal build after r241127
2818         https://bugs.webkit.org/show_bug.cgi?id=191394
2819
2820         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
2821         Add some (un)availability macros.
2822
2823 2019-02-07  Youenn Fablet  <youenn@apple.com>
2824
2825         Make to clear sources from UserMediaCaptureManagerProxy and UserMediaCaptureManager when no longer needed
2826         https://bugs.webkit.org/show_bug.cgi?id=194312
2827
2828         Reviewed by Eric Carlson.
2829
2830         Sources in UserMediaCaptureManager and Proxy are never removed once added to their HashMap.
2831         Use the 'ended' mechanism to do the clean-up on WebProcess side.
2832         As part of this clean-up, send IPC to UIProcess to do clean-up on proxy side.
2833         On WebProcess crash case, clean-up the proxy as well.
2834
2835         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
2836         (WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):
2837         (WebKit::UserMediaCaptureManagerProxy::end):
2838         (WebKit::UserMediaCaptureManagerProxy::clear):
2839         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
2840         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
2841         * UIProcess/WebProcessProxy.cpp:
2842         (WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch):
2843         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
2844         (WebKit::UserMediaCaptureManager::sourceEnded):
2845         * WebProcess/cocoa/UserMediaCaptureManager.h:
2846
2847 2019-02-07  Alex Christensen  <achristensen@webkit.org>
2848
2849         Print backgrounds preference should be honored instead of WKWebViewConfiguration value
2850         https://bugs.webkit.org/show_bug.cgi?id=194364
2851         <rdar://problem/47627599>
2852
2853         Reviewed by Tim Horton.
2854
2855         Without this patch, changing the preference for printing the background has no effect.
2856         This patch fixes that, and I verified it manually by checking "Print backgrounds" in Safari's print menu.
2857         Unfortunately, the only way to test this is actually printing because only values from WebPageProxy::preferences
2858         or WebPageProxy::configuration's preferences are exposed to the API, but values from WebPageProxy::preferencesStore
2859         are used when printing.  Actually printing verifies this change fixes the bug.
2860
2861         * UIProcess/API/Cocoa/WKWebView.mm:
2862         (-[WKWebView _initializeWithConfiguration:]):
2863
2864 2019-02-07  Chris Dumez  <cdumez@apple.com>
2865
2866         Mark DisplayLink as fast allocated
2867         https://bugs.webkit.org/show_bug.cgi?id=194400
2868
2869         Reviewed by Geoffrey Garen.
2870
2871         * UIProcess/mac/DisplayLink.h:
2872
2873 2019-02-07  Per Arne Vollan  <pvollan@apple.com>
2874
2875         [macOS] API test times out after r241026
2876         https://bugs.webkit.org/show_bug.cgi?id=194372
2877
2878         Reviewed by Alex Christensen.
2879
2880         The API test TestWebKitAPI.RenderingProgress.FirstMeaningfulPaint times out after r241026.
2881         A new function pointer, layoutMilestones, is added to WKBundlePageLoaderClient, in order
2882         for clients to decide which milestones they would like to listen for.
2883
2884         * WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h:
2885         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2886         (layoutMilestones):
2887         (setUpPageLoaderClient):
2888         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
2889         (WebKit::InjectedBundlePageLoaderClient::layoutMilestones const):
2890         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
2891
2892 2019-02-07  Alex Christensen  <achristensen@webkit.org>
2893
2894         Deprecate WKBundlePageSetDefersLoading
2895         https://bugs.webkit.org/show_bug.cgi?id=191394
2896
2897         Reviewed by Dean Jackson.
2898
2899         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2900         (WKBundlePageSetDefersLoading):
2901         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
2902         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2903         (-[WKWebProcessPlugInBrowserContextController _defersLoading]):
2904         (-[WKWebProcessPlugInBrowserContextController _setDefersLoading:]):
2905         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
2906
2907 2019-02-07  Alex Christensen  <achristensen@webkit.org>
2908
2909         Digital crown should scroll safe browsing warning on watchOS
2910         https://bugs.webkit.org/show_bug.cgi?id=194363
2911         <rdar://problem/47348124>
2912
2913         Reviewed by Wenson Hsieh.
2914
2915         * UIProcess/Cocoa/WKSafeBrowsingWarning.h:
2916         * UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
2917         (-[WKSafeBrowsingWarning initWithFrame:safeBrowsingWarning:completionHandler:]):
2918         (-[WKSafeBrowsingWarning addContent]):
2919
2920 2019-02-07  Alex Christensen  <achristensen@webkit.org>
2921
2922         Shrink and hyphenate safe browsing warning text on watchOS
2923         https://bugs.webkit.org/show_bug.cgi?id=194361
2924         <rdar://problem/47466549>
2925
2926         Reviewed by Geoffrey Garen.
2927
2928         Some internationalizations use long words that didn't fit on small watches.
2929
2930         * UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
2931         (fontOfSize):
2932         (-[WKSafeBrowsingWarning addContent]):
2933         (-[WKSafeBrowsingTextView initWithAttributedString:forWarning:]):
2934
2935 2019-02-07  Miguel Gomez  <magomez@igalia.com>
2936
2937         [WPE] Implement GStreamer based holepunch
2938         https://bugs.webkit.org/show_bug.cgi?id=193715
2939
2940         Reviewed by Xabier Rodriguez-Calvar.
2941
2942         Add a new parameter to the calls of TextureMapper::drawSolidColor().
2943
2944         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
2945         (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
2946
2947 2019-02-06  Benjamin Poulain  <benjamin@webkit.org>
2948
2949         Unreviewed, rolling out r240759 and r240944.
2950
2951         Some timer uses are done off the main thread, WebCore::Timer
2952         cannot be used
2953
2954         Reverted changesets:
2955
2956         "<rdar://problem/47570443> Responsiveness timers are too
2957         expensive for frequent events"
2958         https://bugs.webkit.org/show_bug.cgi?id=194003
2959         https://trac.webkit.org/changeset/240759
2960
2961         "Use deferrable timer to restart the Responsiveness Timer on
2962         each wheel event"
2963         https://bugs.webkit.org/show_bug.cgi?id=194135
2964         https://trac.webkit.org/changeset/240944
2965
2966 2019-02-06  chris fleizach  <cfleizach@apple.com>
2967
2968         AX:  com.apple.WebKit.WebContent at WebKit: -[WKAccessibilityWebPageObjectBase axObjectCache]
2969         https://bugs.webkit.org/show_bug.cgi?id=194306
2970         <rdar://problem/47764549>
2971
2972         Reviewed by Zalan Bujtas.
2973
2974         Check the page reference is still valid.
2975         Modernize code in this area.
2976
2977         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
2978
2979 2019-02-06  Daniel Bates  <dabates@apple.com>
2980
2981         Move toNSEventModifierFlags() and toNSButtonNumber() to WebEventFactory.mm
2982         https://bugs.webkit.org/show_bug.cgi?id=194321
2983
2984         Reviewed by Jer Noble.
2985
2986         Move some code to WebEventFactory so that it can be shared by both WKNavigationAction.mm
2987         and UIDelegate.mm among other benefits.
2988
2989         * Shared/mac/WebEventFactory.h:
2990         * Shared/mac/WebEventFactory.mm:
2991         (WebKit::WebEventFactory::toNSEventModifierFlags):
2992         (WebKit::WebEventFactory::toNSButtonNumber):
2993         * UIProcess/API/Cocoa/WKNavigationAction.mm:
2994         (-[WKNavigationAction modifierFlags]):
2995         (-[WKNavigationAction buttonNumber]):
2996         (toNSEventModifierFlags): Deleted.
2997         (toNSButtonNumber): Deleted.
2998         * UIProcess/Cocoa/UIDelegate.mm:
2999         (WebKit::UIDelegate::UIClient::mouseDidMoveOverElement):
3000         (WebKit::toNSEventModifierFlags): Deleted.
3001
3002 2019-02-06  Andy Estes  <aestes@apple.com>
3003
3004         [Payment Request] It should be possible to require a phonetic name for shipping contacts
3005         https://bugs.webkit.org/show_bug.cgi?id=194311
3006         <rdar://46733045>
3007
3008         Reviewed by Alex Christensen.
3009
3010         * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
3011         (WebKit::WebPaymentCoordinator::supportsVersion): Deleted.
3012         * WebProcess/ApplePay/WebPaymentCoordinator.h:
3013
3014 2019-02-06  Keith Rollin  <krollin@apple.com>
3015
3016         Really enable the automatic checking and regenerations of .xcfilelists during builds
3017         https://bugs.webkit.org/show_bug.cgi?id=194357
3018         <rdar://problem/47861231>
3019
3020         Reviewed by Chris Dumez.
3021
3022         Bug 194124 was supposed to enable the automatic checking and
3023         regenerating of .xcfilelist files during the build. While related
3024         changes were included in that patch, the change to actually enable the
3025         operation somehow was omitted. This patch actually enables the
3026         operation. The check-xcfilelist.sh scripts now check
3027         WK_DISABLE_CHECK_XCFILELISTS, and if it's "1", opts-out the developer
3028         from the checking.
3029
3030         * Scripts/check-xcfilelists.sh:
3031
3032 2019-02-06  John Wilander  <wilander@apple.com>
3033
3034         Forward Ad Click Attribution data from HTMLAnchorElement::handleClick() to WebKit::NavigationActionData
3035         https://bugs.webkit.org/show_bug.cgi?id=194325
3036         <rdar://problem/47840283>
3037
3038         Reviewed by Chris Dumez.
3039
3040         * Shared/NavigationActionData.cpp:
3041         (WebKit::NavigationActionData::encode const):
3042         (WebKit::NavigationActionData::decode):
3043         * Shared/NavigationActionData.h:
3044             Now holds an optional WebCore::AdClickAttribution object.
3045
3046 2019-02-06  Daniel Bates  <dabates@apple.com>
3047
3048         Fix the Apple Internal build. See <rdar://problem/47860943> for more details.
3049
3050         * UIProcess/ios/fullscreen/WKFullscreenStackView.mm:
3051         (-[WKFullscreenStackView init]):
3052
3053 2019-02-06  Daniel Bates  <dabates@apple.com>
3054
3055         Standardize on ControlKey instead of CtrlKey
3056         https://bugs.webkit.org/show_bug.cgi?id=194317
3057
3058         Reviewed by Tim Horton.
3059
3060         * Shared/WebEventConversion.cpp:
3061         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
3062         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
3063         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
3064         (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
3065         (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
3066         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
3067         (WebKit::WebEditorClient::handleKeyboardEvent):
3068         * WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp:
3069         (WebKit::handleKeyPress):
3070
3071 2019-02-06  Per Arne Vollan  <pvollan@apple.com>
3072
3073         Roll out parts of r238819 since it is a PLT performance regression.
3074         https://bugs.webkit.org/show_bug.cgi?id=194346
3075
3076         Unreviewed performance fix.
3077
3078         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
3079         (didStartProvisionalLoadForFrame):
3080         (didReceiveServerRedirectForProvisionalLoadForFrame):
3081         (didFinishLoadForFrame):
3082         (globalObjectIsAvailableForFrame):
3083         (didRemoveFrameFromHierarchy):
3084         (didCommitLoadForFrame):
3085         (didFinishDocumentLoadForFrame):
3086         (didFailProvisionalLoadWithErrorForFrame):
3087         (didFailLoadWithErrorForFrame):
3088         (didSameDocumentNavigationForFrame):
3089         (didLayoutForFrame):
3090         (didReachLayoutMilestone):
3091         (didFirstVisuallyNonEmptyLayoutForFrame):
3092         (didHandleOnloadEventsForFrame):
3093         (userAgentForURL):
3094         (setUpPageLoaderClient):
3095         (willSendRequestForFrame):
3096         (didInitiateLoadForResource):
3097         (didFinishLoadForResource):
3098         (didFailLoadForResource):
3099         (setUpResourceLoadClient):
3100         (-[WKWebProcessPlugInBrowserContextController setLoadDelegate:]):
3101         (ResourceLoadClient::ResourceLoadClient): Deleted.
3102         (ResourceLoadClient::loadDelegate const): Deleted.
3103         (ResourceLoadClient::pluginContextController const): Deleted.
3104         (PageLoaderClient::PageLoaderClient): Deleted.
3105         (PageLoaderClient::loadDelegate const): Deleted.
3106         (PageLoaderClient::pluginContextController const): Deleted.
3107         (PageLoaderClient::didStartProvisionalLoadForFrame): Deleted.
3108         (PageLoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame): Deleted.
3109         (PageLoaderClient::didFinishLoadForFrame): Deleted.
3110         (PageLoaderClient::globalObjectIsAvailableForFrame): Deleted.
3111         (PageLoaderClient::didRemoveFrameFromHierarchy): Deleted.
3112         (PageLoaderClient::didCommitLoadForFrame): Deleted.
3113         (PageLoaderClient::didFinishDocumentLoadForFrame): Deleted.
3114         (PageLoaderClient::didFailProvisionalLoadWithErrorForFrame): Deleted.
3115         (PageLoaderClient::didFailLoadWithErrorForFrame): Deleted.
3116         (PageLoaderClient::didSameDocumentNavigationForFrame): Deleted.
3117         (PageLoaderClient::didLayoutForFrame): Deleted.
3118         (PageLoaderClient::didReachLayoutMilestone): Deleted.
3119         (PageLoaderClient::didFirstVisuallyNonEmptyLayoutForFrame): Deleted.
3120         (PageLoaderClient::layoutMilestones const): Deleted.
3121         (PageLoaderClient::didHandleOnloadEventsForFrame): Deleted.
3122         (PageLoaderClient::userAgentForURL const): Deleted.
3123         (ResourceLoadClient::willSendRequestForFrame): Deleted.
3124         (ResourceLoadClient::didInitiateLoadForResource): Deleted.
3125         (ResourceLoadClient::didFinishLoadForResource): Deleted.
3126         (ResourceLoadClient::didFailLoadForResource): Deleted.
3127
3128 2019-02-06  Michael Catanzaro  <mcatanzaro@igalia.com>
3129
3130         REGRESSION(r240785): [SOUP] Broke cookie persistent storage
3131         https://bugs.webkit.org/show_bug.cgi?id=194209
3132
3133         Reviewed by Carlos Garcia Campos.
3134
3135         I missed a spot when moving the persistent storage parameters from NetworkProcess to
3136         NetworkSession. They have to be initialized separately for the default session.
3137
3138         * UIProcess/soup/WebProcessPoolSoup.cpp:
3139         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
3140
3141 2019-02-05  Alex Christensen  <achristensen@webkit.org>
3142
3143         Stop using blobRegistry in NetworkProcess
3144         https://bugs.webkit.org/show_bug.cgi?id=194027
3145
3146         Reviewed by Youenn Fablet.
3147
3148         * NetworkProcess/Downloads/DownloadManager.cpp:
3149         (WebKit::DownloadManager::startDownload):
3150         * NetworkProcess/Downloads/PendingDownload.cpp:
3151         (WebKit::PendingDownload::PendingDownload):
3152         * NetworkProcess/Downloads/PendingDownload.h:
3153         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
3154         (WebKit::NetworkBlobRegistry::registerFileBlobURL):
3155         (WebKit::NetworkBlobRegistry::registerBlobURL):
3156         (WebKit::NetworkBlobRegistry::registerBlobURLOptionallyFileBacked):
3157         (WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
3158         (WebKit::NetworkBlobRegistry::unregisterBlobURL):
3159         (WebKit::NetworkBlobRegistry::blobSize):
3160         (WebKit::NetworkBlobRegistry::writeBlobsToTemporaryFiles):
3161         (WebKit::NetworkBlobRegistry::writeBlobToFilePath):
3162         (WebKit::NetworkBlobRegistry::connectionToWebProcessDidClose):
3163         (WebKit::NetworkBlobRegistry::filesInBlob):
3164         (WebKit::NetworkBlobRegistry::singleton): Deleted.
3165         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
3166         (WebKit::NetworkBlobRegistry::blobRegistry):
3167         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3168         (WebKit::NetworkConnectionToWebProcess::didClose):
3169         (WebKit::NetworkConnectionToWebProcess::resolveBlobReferences):
3170         (WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
3171         (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
3172         (WebKit::NetworkConnectionToWebProcess::loadPing):
3173         (WebKit::NetworkConnectionToWebProcess::preconnectTo):
3174         (WebKit::NetworkConnectionToWebProcess::registerFileBlobURL):
3175         (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
3176         (WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL):
3177         (WebKit::NetworkConnectionToWebProcess::registerBlobURLOptionallyFileBacked):
3178         (WebKit::NetworkConnectionToWebProcess::registerBlobURLForSlice):
3179         (WebKit::NetworkConnectionToWebProcess::unregisterBlobURL):
3180         (WebKit::NetworkConnectionToWebProcess::blobSize):
3181         (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
3182         (WebKit::NetworkConnectionToWebProcess::filesInBlob):
3183         (WebKit::NetworkConnectionToWebProcess::blobRegistry):
3184         * NetworkProcess/NetworkConnectionToWebProcess.h:
3185         * NetworkProcess/NetworkDataTask.cpp:
3186         (WebKit::NetworkDataTask::create):
3187         * NetworkProcess/NetworkDataTaskBlob.cpp:
3188         (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
3189         * NetworkProcess/NetworkDataTaskBlob.h:
3190         * NetworkProcess/NetworkLoad.cpp:
3191         (WebKit::NetworkLoad::NetworkLoad):
3192         (WebKit::NetworkLoad::initialize):
3193         * NetworkProcess/NetworkLoad.h:
3194         * NetworkProcess/NetworkProcess.cpp:
3195         (WebKit::NetworkProcess::NetworkProcess):
3196         (WebKit::NetworkProcess::removeNetworkConnectionToWebProcess):
3197         * NetworkProcess/NetworkProcess.h:
3198         (WebKit::NetworkProcess::networkBlobRegistry):
3199         * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
3200         (WebKit::NetworkProcessPlatformStrategies::createBlobRegistry):
3201         * NetworkProcess/NetworkResourceLoader.cpp:
3202         (WebKit::m_shouldCaptureExtraNetworkLoadMetrics):
3203         (WebKit::NetworkResourceLoader::startNetworkLoad):
3204         * NetworkProcess/PreconnectTask.cpp:
3205         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
3206         (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
3207
3208 2019-02-05  Daniel Bates  <dabates@apple.com>
3209
3210         Fix a typo in r241006. Substitute Modifier for Modifiers.
3211
3212         * Shared/mac/NativeWebGestureEventMac.mm:
3213         (WebKit::NativeWebGestureEvent::NativeWebGestureEvent):
3214
3215 2019-02-05  Daniel Bates  <dabates@apple.com>
3216
3217         Attempt to fix the build following r241000
3218         (https://bugs.webkit.org/show_bug.cgi?id=194241)
3219
3220         Substitute OptionSet<WebEvent::Modifier> for Modifiers.
3221
3222         * Shared/mac/NativeWebGestureEventMac.mm:
3223         (WebKit::NativeWebGestureEvent::NativeWebGestureEvent):
3224         * Shared/mac/WebGestureEvent.h:
3225         (WebKit::WebGestureEvent::WebGestureEvent):
3226
3227 2019-02-05  Truitt Savell  <tsavell@apple.com>
3228
3229         Unreviewed, rolling out r240984.
3230
3231         Revision casued two API timeouts
3232
3233         Reverted changeset:
3234
3235         "Stop using blobRegistry in NetworkProcess"
3236         https://bugs.webkit.org/show_bug.cgi?id=194027
3237         https://trac.webkit.org/changeset/240984
3238
3239 2019-02-05  Youenn Fablet  <youenn@apple.com>
3240
3241         UserMediaPermissionRequestManagerProxy lambdas should check for 'this' being valid
3242         https://bugs.webkit.org/show_bug.cgi?id=194246
3243
3244         Reviewed by Eric Carlson.
3245
3246         With PSON enabled, the manager proxy can be destroyed.
3247         It is thus important for its callbacks to check for 'this' to be valid.
3248
3249         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
3250         (WebKit::UserMediaPermissionRequestManagerProxy::captureDevicesChanged):
3251         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
3252         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
3253
3254 2019-02-05  Daniel Bates  <dabates@apple.com>
3255
3256         Attempt to fix the build following r241000
3257         (https://bugs.webkit.org/show_bug.cgi?id=194241)
3258
3259         Substitute WebEvent::Modifier::CapsLockKey for WebEvent::CapsLockKey.
3260
3261         * Shared/gtk/WebEventFactory.cpp:
3262         (WebKit::modifiersForEvent):
3263         * Shared/mac/WebEventFactory.mm:
3264         (WebKit::modifiersForEvent):
3265         * UIProcess/API/Cocoa/WKNavigationAction.mm:
3266         (toNSEventModifierFlags):
3267         * UIProcess/Automation/WebAutomationSession.cpp:
3268         (WebKit::protocolModifierToWebEventModifier):
3269         * UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp:
3270         (WebKit::modifiersToEventState):
3271         * UIProcess/Automation/mac/WebAutomationSessionMac.mm:
3272         (WebKit::WebAutomationSession::platformSimulateMouseInteraction):
3273         * UIProcess/Cocoa/UIDelegate.mm:
3274         (WebKit::toNSEventModifierFlags):
3275
3276 2019-02-05  Daniel Bates  <dabates@apple.com>
3277
3278         Make WebEvent::Modifiers an OptionSet
3279         https://bugs.webkit.org/show_bug.cgi?id=194241
3280
3281         Reviewed by Simon Fraser.
3282
3283         Use an OptionSet to represent the bitmask of keyboard modifier flags. This improves type safety
3284         and makes debugging more enjoyable because our LLDB pretty-printers have built-in support for
3285         OptionSet.
3286
3287         While I am at it, make WebEvent::Modifier an enum class. It is currently an enum. This makes
3288         this enum more closely match WebCore::PlatformEvent::Modifier.
3289
3290         * Shared/API/c/WKSharedAPICast.h:
3291         (WebKit::toAPI):
3292         * Shared/NavigationActionData.cpp:
3293         (WebKit::NavigationActionData::encode const):
3294         (WebKit::NavigationActionData::decode):
3295         * Shared/NavigationActionData.h:
3296         * Shared/WebEvent.cpp:
3297         (WebKit::WebEvent::WebEvent):
3298         * Shared/WebEvent.h:
3299         (WebKit::WebEvent::shiftKey const):
3300         (WebKit::WebEvent::controlKey const):
3301         (WebKit::WebEvent::altKey const):
3302         (WebKit::WebEvent::metaKey const):
3303         (WebKit::WebEvent::capsLockKey const):
3304         (WebKit::WebEvent::modifiers const):
3305         (WebKit::WebTouchEvent::WebTouchEvent):
3306         * Shared/WebEventConversion.cpp:
3307         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
3308         * Shared/WebKeyboardEvent.cpp:
3309         (WebKit::WebKeyboardEvent::WebKeyboardEvent):
3310         * Shared/WebMouseEvent.cpp:
3311         (WebKit::WebMouseEvent::WebMouseEvent):
3312         * Shared/WebTouchEvent.cpp:
3313         (WebKit::WebTouchEvent::WebTouchEvent):
3314         * Shared/WebWheelEvent.cpp:
3315         (WebKit::WebWheelEvent::WebWheelEvent):
3316         * Shared/gtk/WebEventFactory.cpp:
3317         (WebKit::modifiersForEvent):
3318         * Shared/ios/NativeWebTouchEventIOS.mm:
3319         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
3320         * Shared/ios/WebIOSEventFactory.mm:
3321         (modifiersForEvent):
3322         (WebIOSEventFactory::createWebKeyboardEvent):
3323         (WebIOSEventFactory::createWebMouseEvent):
3324         * Shared/libwpe/WebEventFactory.cpp:
3325         (WebKit::modifiersForEventModifiers):
3326         (WebKit::WebEventFactory::createWebWheelEvent):
3327         (WebKit::WebEventFactory::createWebTouchEvent):
3328         * Shared/mac/WebEventFactory.mm:
3329         (WebKit::modifiersForEvent):
3330         (WebKit::WebEventFactory::createWebMouseEvent):
3331         (WebKit::WebEventFactory::createWebWheelEvent):
3332         (WebKit::WebEventFactory::createWebKeyboardEvent):
3333         * Shared/win/WebEventFactory.cpp:
3334         (WebKit::modifiersForEvent):
3335         (WebKit::modifiersForCurrentKeyState):
3336         (WebKit::WebEventFactory::createWebMouseEvent):
3337         (WebKit::WebEventFactory::createWebWheelEvent):
3338         (WebKit::WebEventFactory::createWebKeyboardEvent):
3339         * UIProcess/API/APINavigationAction.h:
3340         * UIProcess/API/APIUIClient.h:
3341         (API::UIClient::mouseDidMoveOverElement):
3342         * UIProcess/API/C/WKPage.cpp:
3343         (WKPageSetPageUIClient):
3344         * UIProcess/API/Cocoa/WKNavigationAction.mm:
3345         (toNSEventModifierFlags):
3346         * UIProcess/API/glib/WebKitPrivate.cpp:
3347         (toPlatformModifiers):
3348         * UIProcess/API/glib/WebKitPrivate.h:
3349         * UIProcess/API/glib/WebKitUIClient.cpp:
3350         * UIProcess/API/glib/WebKitWebView.cpp:
3351         (webkitWebViewMouseTargetChanged):
3352         * UIProcess/API/glib/WebKitWebViewPrivate.h:
3353         * UIProcess/Automation/WebAutomationSession.cpp:
3354         (WebKit::WebAutomationSession::simulateMouseInteraction):
3355         (WebKit::protocolModifierToWebEventModifier):
3356         (WebKit::WebAutomationSession::performMouseInteraction):
3357         * UIProcess/Automation/WebAutomationSession.h:
3358         * UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp:
3359         (WebKit::modifiersToEventState):
3360         (WebKit::WebAutomationSession::platformSimulateMouseInteraction):
3361         * UIProcess/Automation/mac/WebAutomationSessionMac.mm:
3362         (WebKit::WebAutomationSession::platformSimulateMouseInteraction):
3363         * UIProcess/Automation/wpe/WebAutomationSessionWPE.cpp:
3364         (WebKit::modifiersToEventState):
3365         (WebKit::WebAutomationSession::platformSimulateMouseInteraction):
3366         * UIProcess/Cocoa/UIDelegate.h:
3367         * UIProcess/Cocoa/UIDelegate.mm:
3368         (WebKit::toNSEventModifierFlags):
3369         (WebKit::UIDelegate::UIClient::mouseDidMoveOverElement):
3370         * UIProcess/WebPageProxy.cpp:
3371         (WebKit::WebPageProxy::mouseDidMoveOverElement):
3372         * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
3373         (API::InjectedBundle::PageUIClient::mouseDidMoveOverElement):
3374         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
3375         (WebKit::InjectedBundleNavigationAction::modifiersForNavigationAction):
3376         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
3377         (WebKit::InjectedBundleNavigationAction::modifiers const):
3378         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
3379         (WebKit::InjectedBundlePageUIClient::mouseDidMoveOverElement):
3380         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
3381         * WebProcess/Plugins/PDF/PDFPlugin.mm:
3382         (WebKit::PDFPlugin::showContextMenuAtPoint):
3383         * WebProcess/Plugins/PluginView.cpp:
3384         (WebKit::PluginView::createWebEvent const):
3385         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3386         (WebKit::WebChromeClient::mouseDidMoveOverElement):
3387         * WebProcess/WebPage/WebPage.cpp:
3388         (WebKit::WebPage::simulateMouseDown):
3389         (WebKit::WebPage::simulateMouseUp):
3390         (WebKit::WebPage::simulateMouseMotion):
3391
3392 2019-02-05  Tim Horton  <timothy_horton@apple.com>
3393
3394         Reproducible crash under WKShareSheet presentWithParameters when cancelling a share
3395         https://bugs.webkit.org/show_bug.cgi?id=194301
3396         <rdar://problem/47719379>
3397
3398         Reviewed by Beth Dakin.
3399
3400         * UIProcess/Cocoa/WKShareSheet.mm:
3401         (-[WKShareSheet presentWithParameters:completionHandler:]):
3402         NSSharingServicePicker's delegate callbacks can be called synchronously.
3403         We release the WKShareSheet (which holds our reference to the NSSharingServicePicker)
3404         under sharingServicePicker:didChooseSharingService:. On older versions of macOS,
3405         there was nothing keeping the NSSharingServicePicker alive inside
3406         showRelativeToRect:ofView:preferredEdge:, thus the whole chain of references would
3407         fall and result in sending a message to a released NSSharingServicePicker.
3408         To resolve this, keep an extra reference to the WKShareSheet until
3409         presentation is complete.
3410
3411 2019-02-05  Keith Rollin  <krollin@apple.com>
3412
3413         Enable the automatic checking and regenerations of .xcfilelists during builds
3414         https://bugs.webkit.org/show_bug.cgi?id=194124
3415         <rdar://problem/47721277>
3416
3417         Reviewed by Tim Horton.
3418
3419         Bug 193790 add a facility for checking -- during build time -- that
3420         any needed .xcfilelist files are up-to-date and for updating them if
3421         they are not. This facility was initially opt-in by setting
3422         WK_ENABLE_CHECK_XCFILELISTS until other pieces were in place and until
3423         the process seemed robust. Its now time to enable this facility and
3424         make it opt-out. If there is a need to disable this facility, set and
3425         export WK_DISABLE_CHECK_XCFILELISTS=1 in your environment before
3426         running `make` or `build-webkit`, or before running Xcode from the
3427         command line.
3428
3429         Additionally, remove the step that generates a list of source files
3430         going into the UnifiedSources build step. It's only necessarily to
3431         specify Sources.txt and SourcesCocoa.txt as inputs.
3432
3433         * UnifiedSources-input.xcfilelist: Removed.
3434         * WebKit.xcodeproj/project.pbxproj:
3435
3436 2019-02-05  Brady Eidson  <beidson@apple.com>
3437
3438         Add a new DownloadMap type that manages taking an assertion automatically.
3439         https://bugs.webkit.org/show_bug.cgi?id=194294
3440
3441         Reviewed by Alex Christensen.
3442
3443         If we don't need the download assertion, we use a vanilla HashMap like today.
3444         If we need the download assertion, we use the new DownloadMap class instead.
3445
3446         The new DownloadMap is a wrapper around a HashMap that also creates/destroys the assertion as needed.
3447
3448         * NetworkProcess/Downloads/DownloadManager.cpp:
3449         (WebKit::DownloadManager::dataTaskBecameDownloadTask):
3450         (WebKit::DownloadManager::downloadFinished):
3451         * NetworkProcess/Downloads/DownloadManager.h:
3452
3453         * NetworkProcess/Downloads/DownloadMap.cpp: Added.
3454         (WebKit::DownloadMap::get const):
3455         (WebKit::DownloadMap::isEmpty const):
3456         (WebKit::DownloadMap::size const):
3457         (WebKit::DownloadMap::contains const):
3458         (WebKit::DownloadMap::add):
3459         (WebKit::DownloadMap::remove):
3460         * NetworkProcess/Downloads/DownloadMap.h: Added.
3461
3462         * Sources.txt:
3463
3464         * UIProcess/ios/ProcessAssertionIOS.mm:
3465         (WebKit::ProcessAssertion::ProcessAssertion):
3466
3467         * WebKit.xcodeproj/project.pbxproj:
3468
3469 2019-02-05  Brady Eidson  <beidson@apple.com>
3470
3471         Fix iOS simulator build after r240954
3472
3473         Unreviewed.
3474
3475         * UIProcess/ios/ProcessAssertionIOS.mm:
3476         (WebKit::ProcessAssertion::ProcessAssertion): Implement the new constructor.
3477
3478 2019-02-05  Alex Christensen  <achristensen@webkit.org>
3479
3480         Stop using blobRegistry in NetworkProcess
3481         https://bugs.webkit.org/show_bug.cgi?id=194027
3482
3483         Reviewed by Youenn Fablet.
3484
3485         * NetworkProcess/Downloads/DownloadManager.cpp:
3486         (WebKit::DownloadManager::startDownload):
3487         * NetworkProcess/Downloads/PendingDownload.cpp:
3488         (WebKit::PendingDownload::PendingDownload):
3489         * NetworkProcess/Downloads/PendingDownload.h:
3490         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
3491         (WebKit::NetworkBlobRegistry::registerFileBlobURL):
3492         (WebKit::NetworkBlobRegistry::registerBlobURL):
3493         (WebKit::NetworkBlobRegistry::registerBlobURLOptionallyFileBacked):
3494         (WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
3495         (WebKit::NetworkBlobRegistry::unregisterBlobURL):
3496         (WebKit::NetworkBlobRegistry::blobSize):
3497         (WebKit::NetworkBlobRegistry::writeBlobsToTemporaryFiles):
3498         (WebKit::NetworkBlobRegistry::writeBlobToFilePath):
3499         (WebKit::NetworkBlobRegistry::connectionToWebProcessDidClose):
3500         (WebKit::NetworkBlobRegistry::filesInBlob):
3501         (WebKit::NetworkBlobRegistry::singleton): Deleted.
3502         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
3503         (WebKit::NetworkBlobRegistry::blobRegistry):
3504         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3505         (WebKit::NetworkConnectionToWebProcess::didClose):
3506         (WebKit::NetworkConnectionToWebProcess::resolveBlobReferences):
3507         (WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
3508         (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
3509         (WebKit::NetworkConnectionToWebProcess::loadPing):
3510         (WebKit::NetworkConnectionToWebProcess::preconnectTo):
3511         (WebKit::NetworkConnectionToWebProcess::registerFileBlobURL):
3512         (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
3513         (WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL):
3514         (WebKit::NetworkConnectionToWebProcess::registerBlobURLOptionallyFileBacked):
3515         (WebKit::NetworkConnectionToWebProcess::registerBlobURLForSlice):
3516         (WebKit::NetworkConnectionToWebProcess::unregisterBlobURL):
3517         (WebKit::NetworkConnectionToWebProcess::blobSize):
3518         (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
3519         (WebKit::NetworkConnectionToWebProcess::filesInBlob):
3520         (WebKit::NetworkConnectionToWebProcess::blobRegistry):
3521         * NetworkProcess/NetworkConnectionToWebProcess.h:
3522         * NetworkProcess/NetworkDataTask.cpp:
3523         (WebKit::NetworkDataTask::create):
3524         * NetworkProcess/NetworkDataTaskBlob.cpp:
3525         (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
3526         * NetworkProcess/NetworkDataTaskBlob.h:
3527         * NetworkProcess/NetworkLoad.cpp:
3528         (WebKit::NetworkLoad::NetworkLoad):
3529         (WebKit::NetworkLoad::initialize):
3530         * NetworkProcess/NetworkLoad.h:
3531         * NetworkProcess/NetworkProcess.cpp:
3532         (WebKit::NetworkProcess::NetworkProcess):
3533         (WebKit::NetworkProcess::removeNetworkConnectionToWebProcess):
3534         * NetworkProcess/NetworkProcess.h:
3535         (WebKit::NetworkProcess::networkBlobRegistry):
3536         * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
3537         (WebKit::NetworkProcessPlatformStrategies::createBlobRegistry):
3538         * NetworkProcess/NetworkResourceLoader.cpp:
3539         (WebKit::m_shouldCaptureExtraNetworkLoadMetrics):
3540         (WebKit::NetworkResourceLoader::startNetworkLoad):
3541         * NetworkProcess/PreconnectTask.cpp:
3542         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
3543         (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
3544
3545 2019-02-05  Ryan Haddad  <ryanhaddad@apple.com>
3546
3547         Unreviewed, rolling out r240742.
3548
3549         Causes crashes on iOS simulator.
3550
3551         Reverted changeset:
3552
3553         "[iOS] Keyups for non-modifier keys identified as "Dead" when
3554         not focused in a content-editable element"
3555         https://bugs.webkit.org/show_bug.cgi?id=192824
3556         https://trac.webkit.org/changeset/240742
3557
3558 2019-02-05  Alex Christensen  <achristensen@webkit.org>
3559
3560         Protect globalWebSocketStreamMap with a Lock
3561         https://bugs.webkit.org/show_bug.cgi?id=194224
3562         <rdar://problem/47581081>
3563
3564         Reviewed by Ryosuke Niwa.
3565
3566         * WebProcess/Network/WebSocketStream.cpp:
3567         (WebKit::WebSocketStream::streamWithIdentifier):
3568         (WebKit::WebSocketStream::networkProcessCrashed):
3569         (WebKit::WebSocketStream::WebSocketStream):
3570         (WebKit::WebSocketStream::~WebSocketStream):
3571
3572 2019-02-04  Alex Christensen  <achristensen@webkit.org>
3573
3574         Add Networking Daemon skeleton
3575         https://bugs.webkit.org/show_bug.cgi?id=194278
3576
3577         Reviewed by Zalan Bujtas.
3578
3579         Daemon skeletons? This is spooky stuff.
3580
3581         * NetworkProcess/EntryPoint/Cocoa/Daemon/DaemonEntryPoint.h: Added.
3582         * NetworkProcess/EntryPoint/Cocoa/Daemon/DaemonEntryPoint.mm: Added.
3583         (WebKit::DaemonMain):
3584         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
3585         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
3586         (WebKit::NetworkDataTaskCocoa::restrictRequestReferrerToOriginIfNeeded):
3587         * Shared/API/Cocoa/WKMain.h:
3588         * Shared/API/Cocoa/WKMain.mm:
3589         (WKDaemonMain):
3590         * Shared/EntryPointUtilities/Cocoa/AuxiliaryProcessMain.cpp:
3591         (main):
3592         * SourcesCocoa.txt:
3593         * UnifiedSources-input.xcfilelist:
3594         * WebKit.xcodeproj/project.pbxproj:
3595
3596 2019-02-04  Yusuke Suzuki  <ysuzuki@apple.com>
3597
3598         [JSC] Shrink size of VM by lazily allocating IsoSubspaces for non-common types
3599         https://bugs.webkit.org/show_bug.cgi?id=193993
3600
3601         Reviewed by Keith Miller.
3602
3603         * WebProcess/Plugins/Netscape/JSNPMethod.h:
3604         * WebProcess/Plugins/Netscape/JSNPObject.h:
3605
3606 2019-02-04  Simon Fraser  <simon.fraser@apple.com>
3607
3608         Move some macOS/iOS scrolling code into the scrolling/cocoa directory
3609         https://bugs.webkit.org/show_bug.cgi?id=194245
3610
3611         Reviewed by Zalan Bujtas.
3612
3613         Use PLATFORM(MAC), not !PLATFORM(IOS_FAMILY).
3614
3615         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
3616         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3617
3618 2019-02-04  Ms2ger  <Ms2ger@igalia.com>
3619
3620         [GTK][WPE] Need a function to convert internal URI to display ("pretty") URI
3621         https://bugs.webkit.org/show_bug.cgi?id=174816
3622
3623         Reviewed by Michael Catanzaro.
3624
3625         Add webkit_uri_for_display for GTK and WPE.
3626
3627         * PlatformGTK.cmake:
3628         * PlatformWPE.cmake:
3629         * SourcesGTK.txt:
3630         * SourcesWPE.txt:
3631         * UIProcess/API/glib/WebKitURIUtilities.cpp: Added.
3632         (webkit_uri_for_display):
3633         * UIProcess/API/gtk/WebKitURIUtilities.h: Added.
3634         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
3635         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
3636         * UIProcess/API/gtk/webkit2.h:
3637         * UIProcess/API/wpe/WebKitURIUtilities.h: Added.
3638         * UIProcess/API/wpe/docs/wpe-0.1-sections.txt:
3639         * UIProcess/API/wpe/docs/wpe-docs.sgml:
3640         * UIProcess/API/wpe/webkit.h:
3641
3642 2019-02-04  Alex Christensen  <achristensen@webkit.org>
3643
3644         Move XPCService main to a shared file calling a C function
3645         https://bugs.webkit.org/show_bug.cgi?id=194256
3646
3647         Reviewed by Brady Eidson.
3648
3649         This not only reduces a few kilobytes of duplicated binary from the XPCService executables,
3650         It will allow me to introduce a new kind of executable which will need to parse argv and call a different C function.
3651         This is similar to r236075 but more general.
3652
3653         * Shared/API/Cocoa/WKMain.h: Added.
3654         * Shared/API/Cocoa/WKMain.mm: Added.
3655         (WKXPCServiceMain):
3656         * Shared/EntryPointUtilities/Cocoa/AuxiliaryProcessMain.cpp: Added.
3657         (main):
3658         * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
3659         (main): Deleted.
3660         * SourcesCocoa.txt:
3661         * WebKit.xcodeproj/project.pbxproj:
3662
3663 2019-02-04  Alex Christensen  <achristensen@webkit.org>
3664
3665         Make MessageSender functions const
3666         https://bugs.webkit.org/show_bug.cgi?id=194247
3667
3668         Reviewed by Brady Eidson.
3669
3670         * NetworkProcess/Downloads/Download.cpp:
3671         (WebKit::Download::messageSenderConnection const):
3672         (WebKit::Download::messageSenderDestinationID const):
3673         (WebKit::Download::messageSenderConnection): Deleted.
3674         (WebKit::Download::messageSenderDestinationID): Deleted.
3675         * NetworkProcess/Downloads/Download.h:
3676         * NetworkProcess/Downloads/PendingDownload.cpp:
3677         (WebKit::PendingDownload::messageSenderConnection const):
3678         (WebKit::PendingDownload::messageSenderDestinationID const):
3679         (WebKit::PendingDownload::messageSenderConnection): Deleted.
3680         (WebKit::PendingDownload::messageSenderDestinationID): Deleted.
3681         * NetworkProcess/Downloads/PendingDownload.h:
3682         * NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:
3683         (WebKit::WebIDBConnectionToClient::messageSenderConnection const):
3684         (WebKit::WebIDBConnectionToClient::messageSenderConnection): Deleted.
3685         * NetworkProcess/IndexedDB/WebIDBConnectionToClient.h:
3686         * NetworkProcess/NetworkResourceLoader.cpp:
3687         (WebKit::NetworkResourceLoader::messageSenderConnection const):
3688         (WebKit::NetworkResourceLoader::messageSenderConnection): Deleted.
3689         * NetworkProcess/NetworkResourceLoader.h:
3690         * NetworkProcess/NetworkSocketStream.cpp:
3691         (WebKit::NetworkSocketStream::messageSenderConnection const):
3692         (WebKit::NetworkSocketStream::messageSenderDestinationID const):
3693         (WebKit::NetworkSocketStream::messageSenderConnection): Deleted.
3694         (WebKit::NetworkSocketStream::messageSenderDestinationID): Deleted.
3695         * NetworkProcess/NetworkSocketStream.h:
3696         * NetworkProcess/ServiceWorker/WebSWServerConnection.h:
3697         * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
3698         (WebKit::WebSWServerToContextConnection::messageSenderConnection const):
3699         (WebKit::WebSWServerToContextConnection::messageSenderDestinationID const):
3700         (WebKit::WebSWServerToContextConnection::messageSenderConnection): Deleted.
3701         (WebKit::WebSWServerToContextConnection::messageSenderDestinationID): Deleted.
3702         * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
3703         * Platform/IPC/MessageSender.h:
3704         * Shared/AuxiliaryProcess.cpp:
3705         (WebKit::AuxiliaryProcess::messageSenderConnection const):
3706         (WebKit::AuxiliaryProcess::messageSenderDestinationID const):
3707         (WebKit::AuxiliaryProcess::messageSenderConnection): Deleted.
3708         (WebKit::AuxiliaryProcess::messageSenderDestinationID): Deleted.
3709         * Shared/AuxiliaryProcess.h:
3710         * UIProcess/WebConnectionToWebProcess.cpp:
3711         (WebKit::WebConnectionToWebProcess::messageSenderConnection const):
3712         (WebKit::WebConnectionToWebProcess::messageSenderDestinationID const):
3713         (WebKit::WebConnectionToWebProcess::messageSenderConnection): Deleted.
3714         (WebKit::WebConnectionToWebProcess::messageSenderDestinationID): Deleted.
3715         * UIProcess/WebConnectionToWebProcess.h:
3716         * UIProcess/WebPageProxy.cpp:
3717         (WebKit::WebPageProxy::messageSenderConnection const):
3718         (WebKit::WebPageProxy::messageSenderDestinationID const):
3719         (WebKit::WebPageProxy::messageSenderConnection): Deleted.
3720         (WebKit::WebPageProxy::messageSenderDestinationID): Deleted.
3721         * UIProcess/WebPageProxy.h:
3722         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
3723         (WebKit::WebIDBConnectionToServer::messageSenderConnection const):
3724         (WebKit::WebIDBConnectionToServer::messageSenderConnection): Deleted.
3725         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
3726         * WebProcess/Network/WebResourceLoader.cpp:
3727         (WebKit::WebResourceLoader::messageSenderConnection const):
3728         (WebKit::WebResourceLoader::messageSenderDestinationID const):
3729         (WebKit::WebResourceLoader::messageSenderConnection): Deleted.
3730         (WebKit::WebResourceLoader::messageSenderDestinationID): Deleted.
3731         * WebProcess/Network/WebResourceLoader.h:
3732         * WebProcess/Network/WebSocketStream.cpp:
3733         (WebKit::WebSocketStream::messageSenderConnection const):
3734         (WebKit::WebSocketStream::messageSenderDestinationID const):
3735         (WebKit::WebSocketStream::messageSenderConnection): Deleted.
3736         (WebKit::WebSocketStream::messageSenderDestinationID): Deleted.
3737         * WebProcess/Network/WebSocketStream.h:
3738         * WebProcess/Storage/WebSWClientConnection.h:
3739         * WebProcess/WebConnectionToUIProcess.cpp:
3740         (WebKit::WebConnectionToUIProcess::messageSenderConnection const):
3741         (WebKit::WebConnectionToUIProcess::messageSenderDestinationID const):
3742         (WebKit::WebConnectionToUIProcess::messageSenderConnection): Deleted.
3743         (WebKit::WebConnectionToUIProcess::messageSenderDestinationID): Deleted.
3744         * WebProcess/WebConnectionToUIProcess.h:
3745         * WebProcess/WebPage/WebPage.cpp:
3746         (WebKit::WebPage::messageSenderConnection const):
3747         (WebKit::WebPage::messageSenderDestinationID const):
3748         (WebKit::WebPage::messageSenderConnection): Deleted.
3749         (WebKit::WebPage::messageSenderDestinationID): Deleted.
3750         * WebProcess/WebPage/WebPage.h:
3751
3752 2019-02-04  Brady Eidson  <beidson@apple.com>
3753
3754         Take additional process assertion while downloading.
3755         <rdar://problem/47741356> and https://bugs.webkit.org/show_bug.cgi?id=194239
3756
3757         Reviewed by Chris Dumez.
3758
3759         When the first download starts, grab this new assertion.
3760         When the last download ends, release it.
3761
3762         * Configurations/Network-iOS.entitlements:
3763
3764         * NetworkProcess/Downloads/DownloadManager.cpp:
3765         (WebKit::DownloadManager::dataTaskBecameDownloadTask):
3766         (WebKit::DownloadManager::downloadFinished):
3767         * NetworkProcess/Downloads/DownloadManager.h:
3768
3769         * Platform/spi/ios/AssertionServicesSPI.h:
3770
3771         * UIProcess/ProcessAssertion.cpp:
3772         (WebKit::ProcessAssertion::ProcessAssertion):
3773         * UIProcess/ProcessAssertion.h:
3774         (WebKit::ProcessAssertion::ProcessAssertion):
3775
3776         * UIProcess/WebProcessProxy.cpp:
3777         (WebKit::WebProcessProxy::didSetAssertionState):
3778
3779         * UIProcess/ios/ProcessAssertionIOS.mm:
3780         (WebKit::flagsForState):
3781         (WebKit::reasonForState):
3782         (WebKit::ProcessAssertion::ProcessAssertion):
3783
3784 2019-02-04  Said Abou-Hallawa  <said@apple.com>
3785
3786         [CG] Enable setAdditionalSupportedImageTypes for WK1
3787         https://bugs.webkit.org/show_bug.cgi?id=194190
3788
3789         Reviewed by Tim Horton.
3790
3791         Move the function webCoreStringVectorFromNSStringArray from WebKit to
3792         WebCore so it can be used by both WebKit and WebKitLegacy.
3793
3794         * Platform/mac/StringUtilities.h:
3795         * Platform/mac/StringUtilities.mm:
3796         (WebKit::webCoreStringVectorFromNSStringArray): Deleted.
3797         * UIProcess/API/Cocoa/WKWebView.mm:
3798         (-[WKWebView _initializeWithConfiguration:]):
3799
3800 2019-02-04  Benjamin Poulain  <benjamin@webkit.org>
3801
3802         Use deferrable timer to restart the Responsiveness Timer on each wheel event
3803         https://bugs.webkit.org/show_bug.cgi?id=194135
3804
3805         Reviewed by Simon Fraser.
3806
3807         Simon Fraser suggested a neat improvement over my previous optimization
3808         of ResponsivenessTimer.
3809
3810         Instead of reseting the deadline with every event, we can let the timer
3811         fire and add the missing time from the last start.
3812
3813         I implemented that behavior in the new Deferrable Timer class and use
3814         it from ResponsivenessTimer.
3815
3816         * NetworkProcess/watchos/NetworkProximityAssertion.h:
3817         * UIProcess/ResponsivenessTimer.h:
3818         * WebProcess/Plugins/PluginView.h:
3819
3820 2019-02-04  Simon Fraser  <simon.fraser@apple.com>
3821
3822         PageOverlayController's layers should be created lazily
3823         https://bugs.webkit.org/show_bug.cgi?id=194199
3824         rdar://problem/46571593
3825
3826         Reviewed by Tim Horton.
3827         
3828         Expose PageOverlayController::hasDocumentOverlays() and hasViewOverlays()
3829         and use them to only parent the overlay-hosting layers when necessary.
3830
3831         For document overlays, RenderLayerCompositor::appendDocumentOverlayLayers() can
3832         simply do nothing if there are none. Updates are triggered via Page::installedPageOverlaysChanged(),
3833         which calls FrameView::setNeedsCompositingConfigurationUpdate() to trigger the root layer
3834         compositing updates that parents the layerWithDocumentOverlays().
3835
3836         View overlays are added to the layer tree via the DrawingArea. When we go between having
3837         none and some view overlays, Page::installedPageOverlaysChanged() calls attachViewOverlayGraphicsLayer()
3838         on the ChromeClient, and the DrawingArea responds by calling updateRootLayers() and scheduling a
3839         compositing flush (this has to be done manually because view overlay layers are outside the
3840         subtree managed by RenderLayerCompositor).
3841         
3842         Now that GraphicsLayers are ref-counted, we can let the DrawingArea simply retain its m_viewOverlayRootLayer;
3843         there is no need for RenderLayerCompositor::attachRootLayer()/detachRootLayer() to do anything with view
3844         overlay layers. This implies that a page can navigate (new FrameView) and view overlays will persist, without
3845         having to be manually removed and re-added. We can also remove the Frame argument to attachViewOverlayGraphicsLayer().
3846
3847         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3848         (WebKit::WebChromeClient::attachViewOverlayGraphicsLayer):
3849         * WebProcess/WebCoreSupport/WebChromeClient.h:
3850         * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
3851         (WebKit::AcceleratedDrawingArea::attachViewOverlayGraphicsLayer):
3852         * WebProcess/WebPage/AcceleratedDrawingArea.h:
3853         * WebProcess/WebPage/DrawingArea.h:
3854         (WebKit::DrawingArea::attachViewOverlayGraphicsLayer):
3855         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
3856         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
3857         (WebKit::RemoteLayerTreeDrawingArea::attachViewOverlayGraphicsLayer):
3858         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
3859         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3860         (WebKit::TiledCoreAnimationDrawingArea::attachViewOverlayGraphicsLayer):
3861         (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):
3862
3863 2019-02-04  Michael Catanzaro  <mcatanzaro@igalia.com>
3864
3865         Unreviewed, improve preprocessor guard
3866         https://bugs.webkit.org/show_bug.cgi?id=194166
3867         <rdar://problem/47694328>
3868
3869         AC mode is only optional in GTK port. Requested by Zan.
3870
3871         * WebProcess/WebPage/WebPage.cpp:
3872         (WebKit::WebPage::updatePreferences):
3873
3874 2019-02-04  Sihui Liu  <sihui_liu@apple.com>
3875
3876         IndexedDB: leak WebIDBConnectionToServer in layout tests
3877         https://bugs.webkit.org/show_bug.cgi?id=193688
3878         <rdar://problem/47353263>
3879
3880         Reviewed by Geoffrey Garen.
3881
3882         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3883         (WebKit::NetworkConnectionToWebProcess::didClose):
3884         (WebKit::NetworkConnectionToWebProcess::establishIDBConnectionToServer):
3885         (WebKit::NetworkConnectionToWebProcess::removeIDBConnectionToServer): Deleted.
3886         * NetworkProcess/NetworkConnectionToWebProcess.h:
3887         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
3888         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
3889         (WebKit::WebIDBConnectionToServer::~WebIDBConnectionToServer):
3890
3891 2019-02-04  Antoine Quint  <graouts@apple.com>
3892
3893         <rdar://problem/47788802>
3894
3895         Unreviewed build fix.
3896
3897         * Platform/spi/ios/UIKitSPI.h:
3898
3899 2019-02-04  Youenn Fablet  <youenn@apple.com>
3900
3901         Capture state should be managed consistently when doing process swapping
3902         https://bugs.webkit.org/show_bug.cgi?id=194122
3903         <rdar://problem/47609293>
3904
3905         Reviewed by Eric Carlson.
3906
3907         When doing PSON, WebPageProxy::resetState is called.
3908         It resets the media state, but does not call the client delegates.
3909         Instead of directly updating the media state, call the routine used to update it so that client delegates are called.
3910
3911         Covered by new API test and layout test.
3912
3913         * UIProcess/API/Cocoa/WKWebView.mm:
3914         (-[WKWebView _mediaCaptureState]):
3915         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3916         * UIProcess/WebPageProxy.cpp:
3917         (WebKit::WebPageProxy::resetState):
3918         (WebKit::WebPageProxy::isPlayingMediaDidChange):
3919         (WebKit::WebPageProxy::updatePlayingMediaDidChange):
3920         * UIProcess/WebPageProxy.h:
3921
3922 2019-02-04  Antoine Quint  <graouts@apple.com>
3923
3924         Use a dedicated type instead of int32_t for pointer identifiers
3925         https://bugs.webkit.org/show_bug.cgi?id=194217
3926
3927         Reviewed by Antti Koivisto.
3928
3929         * Scripts/webkit/messages.py:
3930         * UIProcess/WebPageProxy.cpp:
3931         (WebKit::WebPageProxy::cancelPointer):
3932         * UIProcess/WebPageProxy.h:
3933         * WebProcess/WebPage/WebPage.cpp:
3934         (WebKit::WebPage::cancelPointer):
3935         * WebProcess/WebPage/WebPage.h:
3936         * WebProcess/WebPage/WebPage.messages.in:
3937
3938 2019-02-04  Michael Catanzaro  <mcatanzaro@igalia.com>
3939
3940         Unreviewed, avoid -Wswitch warnings introduced in r240880
3941         https://bugs.webkit.org/show_bug.cgi?id=193740
3942         <rdar://problem/47527267>
3943
3944         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
3945         (WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse):
3946
3947 2019-02-04  Alexander Mikhaylenko  <exalm7659@gmail.com>
3948
3949         [GTK] Allow pinch zoom on touchpad
3950         https://bugs.webkit.org/show_bug.cgi?id=194201
3951
3952         Reviewed by Michael Catanzaro.
3953
3954         Enable touchpad events for WebkitWebViewBase, then feed touchpad
3955         pinch events to GestureController.
3956
3957         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3958         (webkitWebViewBaseRealize): Added GDK_TOUCHPAD_GESTURE_MASK to event mask.
3959         (webkitWebViewBaseEvent): Added.
3960         (webkit_web_view_base_class_init): Override event vfunc.
3961
3962 2019-02-04  Michael Catanzaro  <mcatanzaro@igalia.com>
3963
3964         Unreviewed, only force settings.acceleratedCompositingEnabled() to true for Cocoa ports
3965         https://bugs.webkit.org/show_bug.cgi?id=194166
3966         <rdar://problem/47694328>
3967
3968         Accelerated compositing is broken for me at least. We're a long way from being able to force
3969         it.
3970
3971         * WebProcess/WebPage/WebPage.cpp:
3972         (WebKit::WebPage::updatePreferences):
3973
3974 2019-02-04  Abderrahim Kitouni  <akitouni@gnome.org>
3975
3976         [GTK] Remove last python2 dependency from CMake build process
3977         https://bugs.webkit.org/show_bug.cgi?id=194218
3978
3979         Reviewed by Michael Catanzaro.
3980
3981         * InspectorGResources.cmake:
3982
3983 2019-02-04  Antti Koivisto  <antti@apple.com>
3984
3985         Rename GraphicsLayer and PlatformCALayer type enum values to match "scroll container layer" convention
3986         https://bugs.webkit.org/show_bug.cgi?id=194215
3987
3988         Reviewed by Frédéric Wang.
3989
3990         * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
3991         (WebKit::RemoteLayerBackingStore::drawInContext):
3992         * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
3993         (WebKit::RemoteLayerTreeHost::makeNode):
3994         * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
3995         (WebKit::RemoteLayerTreeHost::makeNode):