70f0bcce0e8a7cd0a2e3a41983bda708ee836eec
[WebKit-https.git] / Source / WebKit / ChangeLog
1 2018-12-17  Matt Lewis  <jlewis3@apple.com>
2
3         Unreviewed, rolling out r239254.
4
5         This broke the Windows 10 Debug build
6
7         Reverted changeset:
8
9         "Replace many uses of String::format with more type-safe
10         alternatives"
11         https://bugs.webkit.org/show_bug.cgi?id=192742
12         https://trac.webkit.org/changeset/239254
13
14 2018-12-17  David Kilzer  <ddkilzer@apple.com>
15
16         clang-tidy: loop variable is copied but only used as const reference in WebCore, WebKit, Tools
17         <https://webkit.org/b/192751>
18         <rdar://problem/46771623>
19
20         Reviewed by Daniel Bates.
21
22         Change loop variables to const references to avoid unnecessary
23         copies.
24
25         * NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
26         (WebKit::WebSWServerConnection::~WebSWServerConnection):
27         * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:
28         (WebKit::RemoteLayerTreeTransaction::encode const):
29         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
30         (WebKit::toNSErrors):
31         * UIProcess/Automation/WebAutomationSession.cpp:
32         (WebKit::WebAutomationSession::setFilesToSelectForFileUpload):
33         (WebKit::WebAutomationSession::performKeyboardInteractions):
34         (WebKit::WebAutomationSession::performInteractionSequence):
35         * UIProcess/Plugins/PluginProcessManager.cpp:
36         (WebKit::PluginProcessManager::getPluginProcess):
37         * UIProcess/ResourceLoadStatisticsMemoryStore.cpp:
38         (WebKit::ResourceLoadStatisticsMemoryStore::removeDataRecords):
39         (WebKit::ResourceLoadStatisticsMemoryStore::shouldRemoveDataRecords const):
40         * UIProcess/WebPageProxy.cpp:
41         (WebKit::WebPageProxy::serializedAttachmentDataForIdentifiers):
42         * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp:
43         (WebKit::LocalStorageDatabaseTracker::deleteAllDatabases):
44         (WebKit::LocalStorageDatabaseTracker::origins const):
45         (WebKit::LocalStorageDatabaseTracker::originDetails):
46         * WebProcess/WebPage/WebPage.cpp:
47         (WebKit::m_shouldAttachDrawingAreaOnPageTransition):
48         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
49         (WebKit::TiledCoreAnimationDrawingArea::didUpdateActivityStateTimerFired):
50
51 2018-12-17  Ms2ger  <Ms2ger@igalia.com>
52
53         [GTK][WPE] Need a function to convert internal URI to display ("pretty") URI
54         https://bugs.webkit.org/show_bug.cgi?id=174816
55
56         Reviewed by Michael Catanzaro.
57
58         Add webkit_uri_for_display for GTK and WPE.
59
60         * PlatformGTK.cmake:
61         * PlatformWPE.cmake:
62         * SourcesGTK.txt:
63         * SourcesWPE.txt:
64         * UIProcess/API/glib/WebKitURIUtilities.cpp: Added.
65         (webkit_uri_for_display):
66         * UIProcess/API/gtk/WebKitURIUtilities.h: Added.
67         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
68         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
69         * UIProcess/API/gtk/webkit2.h:
70         * UIProcess/API/wpe/WebKitURIUtilities.h: Added.
71         * UIProcess/API/wpe/docs/wpe-0.1-sections.txt:
72         * UIProcess/API/wpe/docs/wpe-docs.sgml:
73         * UIProcess/API/wpe/webkit.h:
74
75 2018-12-17  Carlos Garcia Campos  <cgarcia@igalia.com>
76
77         [WPE] Add API to notify about frame displayed view backend callback
78         https://bugs.webkit.org/show_bug.cgi?id=192224
79
80         Reviewed by Michael Catanzaro.
81
82         Add API to add a callback to the view to be called when the view backend notifies that a frame has been
83         displayed.
84
85         * UIProcess/API/glib/WebKitWebView.cpp:
86         (FrameDisplayedCallback::FrameDisplayedCallback):
87         (FrameDisplayedCallback::~FrameDisplayedCallback):
88         (webkit_web_view_add_frame_displayed_callback):
89         (webkit_web_view_remove_frame_displayed_callback):
90         * UIProcess/API/wpe/WebKitWebView.h:
91         * UIProcess/API/wpe/docs/wpe-0.1-sections.txt:
92
93 2018-12-16  Chris Fleizach  <cfleizach@apple.com>
94
95         AX: Support keyboard access preference for iOS in WebKit
96         https://bugs.webkit.org/show_bug.cgi?id=192373
97         <rdar://problem/46462670>
98
99         Reviewed by Tim Horton.
100
101         * Platform/spi/ios/AccessibilitySupportSPI.h:
102         * PlatformMac.cmake:
103         * SourcesCocoa.txt:
104         * UIProcess/Cocoa/WKFullKeyboardAccessWatcher.h: Added.
105         * UIProcess/Cocoa/WKFullKeyboardAccessWatcher.mm: Added.
106         (platformIsFullKeyboardAccessEnabled):
107         (-[WKFullKeyboardAccessWatcher notifyAllProcessPools]):
108         (-[WKFullKeyboardAccessWatcher retrieveKeyboardUIModeFromPreferences:]):
109         (-[WKFullKeyboardAccessWatcher init]):
110         (+[WKFullKeyboardAccessWatcher fullKeyboardAccessEnabled]):
111         * UIProcess/ios/WebProcessProxyIOS.mm:
112         (WebKit::WebProcessProxy::fullKeyboardAccessEnabled):
113         * UIProcess/mac/WKFullKeyboardAccessWatcher.h: Removed.
114         * UIProcess/mac/WKFullKeyboardAccessWatcher.mm: Removed.
115         * WebKit.xcodeproj/project.pbxproj:
116
117 2018-12-16  Adrian Perez de Castro  <aperez@igalia.com>
118
119         Unreviewed follow up after r239260
120         https://bugs.webkit.org/show_bug.cgi?id=192714
121         <rdar://problem/46762407>
122
123         * Platform/win/SharedMemoryWin.cpp:
124         (WebKit::SharedMemory::allocate): Use PAGE_READWRITE directly instead
125         of going through the protectAttribute() function, which is removed
126         because it is now unused.
127
128 2018-12-16  Adrian Perez de Castro  <aperez@igalia.com>
129
130         Unify SharedMemory factory functions
131         https://bugs.webkit.org/show_bug.cgi?id=192714
132
133         Reviewed by Darin Adler.
134
135         This unifies SharedMemory so in the following way, across platforms:
136
137         - SharedMemory::create() is removed, to avoid ambiguity.
138         - SharedMemory::allocate() always allocates a new block of shared memory.
139         - SharedMemory::wrapMap() always creates a SharedMemory object which refers to an
140           existing region of memory resulting from memory-mapping a file.
141
142         * NetworkProcess/cache/NetworkCacheDataCocoa.mm:
143         (WebKit::NetworkCache::Data::tryCreateSharedMemory const): Use SharedMemory::wrapMap().
144         * Platform/SharedMemory.h: Remove the definition of SharedMemory::create(), and make
145         SharedMemory::wrapMap() available on OS(DARWIN) as well.
146         * Platform/cocoa/SharedMemoryCocoa.cpp:
147         (WebKit::SharedMemory::wrapMap): Renamed from ::create().
148         * Platform/unix/SharedMemoryUnix.cpp:
149         (WebKit::SharedMemory::allocate): Renamed from ::create().
150         * Platform/win/SharedMemoryWin.cpp:
151         (WebKit::SharedMemory::allocate): Renamed from ::create()
152         * UIProcess/API/APIContentRuleListStore.cpp:
153         (API::createExtension): Use NetworkCache::Data::tryCreateSharedMemory() instead of
154         SharedMemory::create().
155
156 2018-12-15  Chris Fleizach  <cfleizach@apple.com>
157
158         [meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
159         https://bugs.webkit.org/show_bug.cgi?id=192449
160         <rdar://problem/46595508>
161
162         Reviewed by Darin Adler.
163
164         Part 7: Files in UIProcess/API
165
166         * UIProcess/API/APIContentRuleListStore.cpp:
167         * UIProcess/API/APIHitTestResult.cpp:
168         * UIProcess/API/APINavigation.cpp:
169         * UIProcess/API/APIOpenPanelParameters.cpp:
170         * UIProcess/API/APIPageConfiguration.cpp:
171         * UIProcess/API/C/WKApplicationCacheManager.cpp:
172         (WKApplicationCacheManagerGetTypeID):
173         (WKApplicationCacheManagerGetApplicationCacheOrigins):
174         (WKApplicationCacheManagerDeleteEntriesForOrigin):
175         (WKApplicationCacheManagerDeleteAllEntries):
176         * UIProcess/API/C/WKAuthenticationDecisionListener.cpp:
177         (WKAuthenticationDecisionListenerGetTypeID):
178         (WKAuthenticationDecisionListenerUseCredential):
179         (WKAuthenticationDecisionListenerCancel):
180         (WKAuthenticationDecisionListenerRejectProtectionSpaceAndContinue):
181         * UIProcess/API/C/WKBackForwardListItemRef.cpp:
182         (WKBackForwardListItemGetTypeID):
183         (WKBackForwardListItemCopyURL):
184         (WKBackForwardListItemCopyTitle):
185         (WKBackForwardListItemCopyOriginalURL):
186         * UIProcess/API/C/WKContext.cpp:
187         (WKContextGetTypeID):
188         (WKContextCreate):
189         (WKContextCreateWithInjectedBundlePath):
190         (WKContextCreateWithConfiguration):
191         (WKContextSetClient):
192         (WKContextSetInjectedBundleClient):
193         (WKContextSetHistoryClient):
194         (WKContextSetDownloadClient):
195         (WKContextSetConnectionClient):
196         (WKContextDownloadURLRequest):
197         (WKContextResumeDownload):
198         (WKContextSetInitializationUserDataForInjectedBundle):
199         (WKContextPostMessageToInjectedBundle):
200         (WKContextGetGlobalStatistics):
201         (WKContextAddVisitedLink):
202         (WKContextClearVisitedLinks):
203         (WKContextSetCacheModel):
204         (WKContextGetCacheModel):
205         (WKContextSetMaximumNumberOfProcesses):
206         (WKContextGetMaximumNumberOfProcesses):
207         (WKContextSetAlwaysUsesComplexTextCodePath):
208         (WKContextSetShouldUseFontSmoothing):
209         (WKContextSetAdditionalPluginsDirectory):
210         (WKContextRefreshPlugIns):
211         (WKContextRegisterURLSchemeAsEmptyDocument):
212         (WKContextRegisterURLSchemeAsSecure):
213         (WKContextRegisterURLSchemeAsBypassingContentSecurityPolicy):
214         (WKContextRegisterURLSchemeAsCachePartitioned):
215         (WKContextRegisterURLSchemeAsCanDisplayOnlyIfCanRequest):
216         (WKContextSetDomainRelaxationForbiddenForURLScheme):
217         (WKContextSetCanHandleHTTPSServerTrustEvaluation):
218         (WKContextSetPrewarmsProcessesAutomatically):
219         (WKContextSetCustomWebContentServiceBundleIdentifier):
220         (WKContextSetDiskCacheSpeculativeValidationEnabled):
221         (WKContextPreconnectToServer):
222         (WKContextGetCookieManager):
223         (WKContextGetWebsiteDataStore):
224         (WKContextGetGeolocationManager):
225         (WKContextGetMediaSessionFocusManager):
226         (WKContextGetNotificationManager):
227         (WKContextStartMemorySampler):
228         (WKContextStopMemorySampler):
229         (WKContextAllowSpecificHTTPSCertificateForHost):
230         (WKContextDisableProcessTermination):
231         (WKContextEnableProcessTermination):
232         (WKContextSetHTTPPipeliningEnabled):
233         (WKContextWarmInitialProcess):
234         (WKContextGetStatistics):
235         (WKContextGetStatisticsWithOptions):
236         (WKContextJavaScriptConfigurationFileEnabled):
237         (WKContextSetJavaScriptConfigurationFileEnabled):
238         (WKContextGarbageCollectJavaScriptObjects):
239         (WKContextSetJavaScriptGarbageCollectorTimerEnabled):
240         (WKContextUseTestingNetworkSession):
241         (WKContextSetAllowsAnySSLCertificateForWebSocketTesting):
242         (WKContextSetAllowsAnySSLCertificateForServiceWorkerTesting):
243         (WKContextClearCachedCredentials):
244         (WKContextCopyPlugInAutoStartOriginHashes):
245         (WKContextSetPlugInAutoStartOriginHashes):
246         (WKContextSetPlugInAutoStartOriginsFilteringOutEntriesAddedAfterTime):
247         (WKContextSetPlugInAutoStartOrigins):
248         (WKContextSetInvalidMessageFunction):
249         (WKContextSetMemoryCacheDisabled):
250         (WKContextSetFontWhitelist):
251         (WKContextTerminateNetworkProcess):
252         (WKContextTerminateServiceWorkerProcess):
253         (WKContextGetNetworkProcessIdentifier):
254         (WKContextAddSupportedPlugin):
255         (WKContextClearSupportedPlugins):
256         (WKContextSetIDBPerOriginQuota):
257         * UIProcess/API/C/WKPage.cpp:
258         (WKPageLoadURLWithShouldOpenExternalURLsPolicy):
259         (WKPageLoadURLWithUserData):
260         (WKPageLoadURLRequestWithUserData):
261         (WKPageSetPaginationMode):
262         (WKPageGetPaginationMode):
263         (WKPageSetPageLoaderClient):
264         (WKPageSetPagePolicyClient):
265         * UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
266
267 2018-12-15  Darin Adler  <darin@apple.com>
268
269         Use warning-ignoring macros more consistently and simply
270         https://bugs.webkit.org/show_bug.cgi?id=192743
271
272         Reviewed by Mark Lam.
273
274         * UIProcess/ios/WKDrawingView.mm:
275         (-[WKDrawingView initWithEmbeddedViewID:webPageProxy:]):
276         Use ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END.
277         * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
278         (-[WKFullScreenWindowController _EVOrganizationName]): Ditto.
279
280         * WebProcess/WebCoreSupport/WebAlternativeTextClient.h: Use
281         IGNORE_WARNINGS_BEGIN/END instead of IGNORE_CLANG_WARNINGS_BEGIN/END
282         because there is no need to accomodate non-clang compilers here.
283         Also use #pragma once, add a missing "explicit", and fix conditionals.
284
285 2018-12-15  Darin Adler  <darin@apple.com>
286
287         Replace many uses of String::format with more type-safe alternatives
288         https://bugs.webkit.org/show_bug.cgi?id=192742
289
290         Reviewed by Mark Lam.
291
292         * Shared/WebMemorySampler.cpp:
293         (WebKit::WebMemorySampler::writeHeaders): Use makeString.
294
295         * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
296         (WebKit::LocalAuthenticator::makeCredential): Use string concatentation.
297
298         * UIProcess/WebInspectorUtilities.cpp:
299         (WebKit::inspectorPageGroupIdentifierForPage): Use makeString.
300         * UIProcess/WebProcessPool.cpp:
301         (WebKit::WebProcessPool::processDidFinishLaunching): Ditto.
302         (WebKit::WebProcessPool::startMemorySampler): Ditto.
303
304 2018-12-14  Ryan Haddad  <ryanhaddad@apple.com>
305
306         Unreviewed, fix the build with recent SDKs.
307
308         * UIProcess/ios/WKDrawingView.mm:
309         (-[WKDrawingView initWithEmbeddedViewID:webPageProxy:]):
310
311 2018-12-14  Jiewen Tan  <jiewen_tan@apple.com>
312
313         [Mac] Layout Test http/wpt/webauthn/public-key-credential-create-success-hid.https.html and http/wpt/webauthn/public-key-credential-get-success-hid.https.html are flaky
314         https://bugs.webkit.org/show_bug.cgi?id=192061
315
316         Reviewed by Dewei Zhu.
317
318         Part 2.
319
320         Add some additional temporary logging info. Since the failure cannot be reproduced easily by human, we have to
321         rely on the test infrastructure to reporoduce it. Once the bug is determined and fixed, we should remove all
322         logging added in this patch.
323
324         * UIProcess/WebAuthentication/Cocoa/HidService.mm:
325         (WebKit::HidService::deviceAdded):
326         * UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp:
327         (WebKit::CtapHidAuthenticator::makeCredential):
328         (WebKit::CtapHidAuthenticator::getAssertion):
329         * UIProcess/WebAuthentication/fido/CtapHidDriver.cpp:
330         (WebKit::CtapHidDriver::Worker::write):
331         (WebKit::CtapHidDriver::Worker::read):
332         (WebKit::CtapHidDriver::Worker::returnMessage):
333         (WebKit::CtapHidDriver::transact):
334         (WebKit::CtapHidDriver::continueAfterChannelAllocated):
335         (WebKit::CtapHidDriver::continueAfterResponseReceived):
336
337 2018-12-14  Adrian Perez de Castro  <aperez@igalia.com>
338
339         [GTK] Unreviewed build fix.
340
341         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: Add missing WebPolicyAction.h include.
342
343 2018-12-14  Chris Dumez  <cdumez@apple.com>
344
345         Unreviewed, fix assertion failure in API test after r239210.
346
347         * WebProcess/WebPage/WebPage.cpp:
348         (WebKit::WebPage::createDocumentLoader):
349
350 2018-12-14  Adrian Perez de Castro  <aperez@igalia.com>
351
352         [SOUP] Unreviewed build fix after r239219
353
354         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
355         (WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse): Remove
356         handling of PolicyAction::Suspend, which is no longer available.
357
358 2018-12-14  Joseph Pecoraro  <pecoraro@apple.com>
359
360         Unreviewed, apply post-landing review comments after r239221.
361
362         * UIProcess/WebPageDebuggable.cpp:
363         (WebKit::WebPageDebuggable::url const):
364         Switch to WTF::blankURL() instead of using "about:blank" directly.
365
366 2018-12-14  Chris Dumez  <cdumez@apple.com>
367
368         [PSON] Process-swapping on a loadHTMLString causes duplicate decidePolicyForNavigationAction delegate calls
369         https://bugs.webkit.org/show_bug.cgi?id=192704
370
371         Reviewed by Geoffrey Garen.
372
373         Process-swapping on a loadHTMLString causes duplicate decidePolicyForNavigationAction delegate calls. This
374         is because we were failing to pass the ShouldTreatAsContinuingLoad flag to the WebContent process when
375         doing a LoadData.
376
377         * UIProcess/WebPageProxy.cpp:
378         (WebKit::WebPageProxy::loadData):
379         (WebKit::WebPageProxy::loadDataWithNavigation):
380         (WebKit::WebPageProxy::continueNavigationInNewProcess):
381         * UIProcess/WebPageProxy.h:
382         * WebProcess/WebPage/WebPage.cpp:
383         (WebKit::WebPage::loadDataImpl):
384         (WebKit::WebPage::loadData):
385         (WebKit::WebPage::loadAlternateHTML):
386         * WebProcess/WebPage/WebPage.h:
387
388 2018-12-14  Joseph Pecoraro  <pecoraro@apple.com>
389
390         Web Inspector: Prefer "about:blank" instead of an empty string for WebPageDebuggable url
391         https://bugs.webkit.org/show_bug.cgi?id=192691
392         <rdar://problem/46719798>
393
394         Reviewed by Darin Adler.
395
396         * UIProcess/WebPageDebuggable.cpp:
397         (WebKit::WebPageDebuggable::url const):
398         Instead of an empty string, return "about:blank" in bail cases.
399         When inspecting the page that matches the contents.
400
401 2018-12-14  Chris Dumez  <cdumez@apple.com>
402
403         [PSON] Stop exposing PolicyAction::Suspend to WebCore
404         https://bugs.webkit.org/show_bug.cgi?id=192701
405
406         Reviewed by Brady Eidson.
407
408         Introduce a new WebPolicyAction enum that is used at WebKit2 layer and augments
409         WebCore::PolicyAction with a "Suspend" value.
410
411         * NetworkProcess/NetworkDataTaskBlob.cpp:
412         (WebKit::NetworkDataTaskBlob::dispatchDidReceiveResponse):
413         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
414         (toNSURLSessionResponseDisposition):
415         * Shared/WebPolicyAction.h: Added.
416         * UIProcess/WebFramePolicyListenerProxy.cpp:
417         (WebKit::WebFramePolicyListenerProxy::didReceiveSafeBrowsingResults):
418         (WebKit::WebFramePolicyListenerProxy::use):
419         (WebKit::WebFramePolicyListenerProxy::download):
420         (WebKit::WebFramePolicyListenerProxy::ignore):
421         * UIProcess/WebFramePolicyListenerProxy.h:
422         * UIProcess/WebFrameProxy.cpp:
423         (WebKit::WebFrameProxy::setUpPolicyListenerProxy):
424         * UIProcess/WebFrameProxy.h:
425         * UIProcess/WebPageProxy.cpp:
426         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
427         (WebKit::WebPageProxy::receivedPolicyDecision):
428         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
429         (WebKit::WebPageProxy::decidePolicyForNavigationActionSync):
430         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
431         (WebKit::WebPageProxy::decidePolicyForResponse):
432         * UIProcess/WebPageProxy.h:
433         * UIProcess/WebPageProxy.messages.in:
434         * WebKit.xcodeproj/project.pbxproj:
435         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
436         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
437         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
438         * WebProcess/WebPage/WebFrame.cpp:
439         (WebKit::toPolicyAction):
440         (WebKit::WebFrame::didReceivePolicyDecision):
441         * WebProcess/WebPage/WebFrame.h:
442         * WebProcess/WebPage/WebPage.cpp:
443         (WebKit::WebPage::didReceivePolicyDecision):
444         * WebProcess/WebPage/WebPage.h:
445         * WebProcess/WebPage/WebPage.messages.in:
446
447 2018-12-14  David Quesada  <david_quesada@apple.com>
448
449         Remove a global 'using namespace WebKit' in WebViewImpl.mm
450         https://bugs.webkit.org/show_bug.cgi?id=192690
451
452         Reviewed by Tim Horton.
453
454         * UIProcess/Cocoa/WebViewImpl.mm:
455         (-[WKTextListTouchBarViewController initWithWebViewImpl:]):
456         (-[WKTextListTouchBarViewController _selectList:]):
457         (-[WKTextListTouchBarViewController setCurrentListType:]):
458         (-[WKTextTouchBarItemController initWithWebViewImpl:]):
459
460 2018-12-14  Chris Dumez  <cdumez@apple.com>
461
462         [PSON] WebsitePolicies are lost on process-swap
463         https://bugs.webkit.org/show_bug.cgi?id=192694
464         <rdar://problem/46715748>
465
466         Reviewed by Brady Eidson.
467
468         In case of process-swap on navigation, instead of sending the websitePolicies to the old
469         process, send them to the new process as we trigger the navigation. We tell the new process
470         that it is continuing a load and it will therefore not re-trigger a decidePolicyForNavigationAction.
471
472         * Shared/LoadParameters.cpp:
473         (WebKit::LoadParameters::encode const):
474         (WebKit::LoadParameters::decode):
475         * Shared/LoadParameters.h:
476         * UIProcess/WebPageProxy.cpp:
477         (WebKit::WebPageProxy::reattachToWebProcessForReload):
478         (WebKit::WebPageProxy::reattachToWebProcessWithItem):
479         (WebKit::WebPageProxy::loadRequestWithNavigation):
480         (WebKit::WebPageProxy::loadDataWithNavigation):
481         (WebKit::WebPageProxy::goToBackForwardItem):
482         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
483         (WebKit::WebPageProxy::continueNavigationInNewProcess):
484         * UIProcess/WebPageProxy.h:
485         * WebProcess/WebPage/WebPage.cpp:
486         (WebKit::WebPage::loadRequest):
487         (WebKit::WebPage::loadDataImpl):
488         (WebKit::WebPage::loadData):
489         (WebKit::WebPage::loadAlternateHTML):
490         (WebKit::WebPage::goToBackForwardItem):
491         (WebKit::WebPage::createDocumentLoader):
492         * WebProcess/WebPage/WebPage.h:
493         * WebProcess/WebPage/WebPage.messages.in:
494
495 2018-12-14  Patrick Griffis  <pgriffis@igalia.com>
496
497         [GTK][WPE] Fix forwarding webkit socket to flatpak sandbox
498         https://bugs.webkit.org/show_bug.cgi?id=192622
499
500         Reviewed by Michael Catanzaro.
501
502         This fixes running with the sandbox enabled in Flatpak.
503
504         * UIProcess/Launcher/glib/FlatpakLauncher.cpp:
505         (WebKit::flatpakSpawn):
506         * UIProcess/Launcher/glib/FlatpakLauncher.h:
507         * UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:
508         (WebKit::ProcessLauncher::launchProcess):
509
510 2018-12-14  Carlos Garcia Campos  <cgarcia@igalia.com>
511
512         [WPE] Use new view state API from libwpe
513         https://bugs.webkit.org/show_bug.cgi?id=191906
514
515         Reviewed by Žan Doberšek.
516
517         Remove WKViewSetViewState from the C API.
518
519         * UIProcess/API/C/wpe/WKAPICastWPE.h:
520         * UIProcess/API/C/wpe/WKView.cpp:
521         * UIProcess/API/C/wpe/WKView.h:
522         * UIProcess/API/wpe/WPEView.cpp:
523         (WKWPE::View::View): Add implementation for activity_state_changed vfunc of the view backend client.):
524         (WKWPE::View::setViewState): Remove the default flags.
525         * UIProcess/API/wpe/WPEView.h:
526         (WKWPE::View::setViewState const): Make it private.
527
528 2018-12-13  Joseph Pecoraro  <pecoraro@apple.com>
529
530         [iOS] Web Inspector: Occasional UIProcess crashes under WebPageProxy::showInspectorIndication
531         https://bugs.webkit.org/show_bug.cgi?id=192689
532         <rdar://problem/46323610>
533
534         Reviewed by Simon Fraser.
535
536         * UIProcess/WebPageProxy.cpp:
537         (WebKit::WebPageProxy::close):
538         * UIProcess/WebPageProxy.h:
539         Don't wait until ~WebPageProxy to destroy the WebPageProxyDebuggable
540         which broadcasts it as a remote inspector target. Terminate this
541         as soon as the WebPageProxy closes and becomes invalid.
542
543 2018-12-13  Chris Dumez  <cdumez@apple.com>
544
545         Unreviewed build fix for tvOS.
546
547         * Platform/cocoa/WKCrashReporter.mm:
548
549 2018-12-13  Chris Dumez  <cdumez@apple.com>
550
551         Unreviewed build fix for tvOS.
552
553         * Platform/cocoa/WKCrashReporter.mm:
554
555 2018-12-13  Chris Dumez  <cdumez@apple.com>
556
557         [PSON] We should not need to navigate to 'about:blank' to suspend pages
558         https://bugs.webkit.org/show_bug.cgi?id=192668
559         <rdar://problem/46701466>
560
561         Reviewed by Alex Christensen.
562
563         To support PageCache when process-swap on cross-site navigation is enabled,
564         we've been navigating the previous process to 'about:blank' when swapping.
565         This would trigger PageCaching of the page in the old process. While
566         convenient, this design has led to a lot of bugs because we did not really
567         want a navigation to happen in the old process.
568
569         To address the issue, when a WebPage is asked to suspend (for process-swap),
570         we now attempt to add it to PageCache and save it on the current HistoryItem,
571         *without* triggering any navigation. Any pending navigation gets cancelled
572         and we just suspend in place.
573
574         Later on, when we want to go back to this HistoryItem, we simply leverage the
575         existing WebPage::goToBackForwardItem() code path. The only subtlety is that
576         we're actually asking the WebPage to load a HistoryItem that is the current
577         one in the History. I had to tweak a some logic / assertions to support this
578         as this is not something we usually do. However, it actually works with very
579         little changes and successfully restores the PageCache entry on the current
580         HistoryItem.
581
582         There is no expected overall behavior change and ProcessSwap API tests (which
583         cover PageCache) still pass. This is merely a simpler design because it avoids
584         navigating to about:blank.
585
586         * UIProcess/SuspendedPageProxy.cpp:
587         (WebKit::SuspendedPageProxy::didSuspend):
588         (WebKit::SuspendedPageProxy::didReceiveMessage):
589         * UIProcess/SuspendedPageProxy.h:
590         * UIProcess/WebPageProxy.cpp:
591         (WebKit::WebPageProxy::didSuspendAfterProcessSwap):
592         * UIProcess/WebPageProxy.h:
593         * UIProcess/WebPageProxy.messages.in:
594         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
595         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
596         * WebProcess/WebPage/WebDocumentLoader.cpp:
597         (WebKit::WebDocumentLoader::setNavigationID):
598         * WebProcess/WebPage/WebFrame.cpp:
599         (WebKit::WebFrame::didReceivePolicyDecision):
600         * WebProcess/WebPage/WebPage.cpp:
601         (WebKit::WebPage::suspendForProcessSwap):
602         * WebProcess/WebPage/WebPage.h:
603         * WebProcess/cocoa/WebProcessCocoa.mm:
604         (WebKit::origin):
605
606 2018-12-13  Per Arne Vollan  <pvollan@apple.com>
607
608         [macOS] Remove with-report from 3 services that are currently needed on macOS
609         https://bugs.webkit.org/show_bug.cgi?id=192593
610         <rdar://problem/46604752>
611
612         Reviewed by Brent Fulgham.
613
614         * WebProcess/com.apple.WebProcess.sb.in:
615
616 2018-12-13  Youenn Fablet  <youenn@apple.com>
617
618         On page close, WebPage::m_userMediaPermissionRequestManager is nullified too early
619         https://bugs.webkit.org/show_bug.cgi?id=192657
620
621         Reviewed by Eric Carlson.
622
623         Instead of nullifying the manager, make it a UniqueRef and clear it on closing the page.
624         This ensures we revoke the sandbox extensions as early as possible and keep the manager lifetime simple.
625
626         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
627         (WebKit::UserMediaPermissionRequestManager::~UserMediaPermissionRequestManager):
628         (WebKit::UserMediaPermissionRequestManager::clear):
629         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
630         * WebProcess/WebPage/WebPage.cpp:
631         (WebKit::WebPage::close):
632         * WebProcess/WebPage/WebPage.h:
633         (WebKit::WebPage::userMediaPermissionRequestManager):
634
635 2018-12-13  Chris Fleizach  <cfleizach@apple.com>
636
637         [meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
638         https://bugs.webkit.org/show_bug.cgi?id=192449
639         <rdar://problem/46595508>
640
641         Reviewed by Darin Adler.
642
643         Part 6: Files in plugin process and UI process.
644
645         * PluginProcess/PluginControllerProxy.cpp:
646         * PluginProcess/PluginProcess.cpp:
647         * PluginProcess/WebProcessConnection.cpp:
648         * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
649         * UIProcess/WebStorage/LocalStorageDatabase.cpp:
650         * UIProcess/mac/WebPageProxyMac.mm:
651
652 2018-12-13  Eric Carlson  <eric.carlson@apple.com>
653
654         [MediaStream] Calculate width or height when constraints contain only the other
655         https://bugs.webkit.org/show_bug.cgi?id=192632
656         <rdar://problem/46665734>
657
658         Reviewed by Youenn Fablet.
659
660         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
661         (WebKit::UserMediaCaptureManagerProxy::SourceProxy::remoteVideoSampleAvailable): Deleted,
662         replaced with videoSampleAvailable.
663
664         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
665         (WebKit::UserMediaCaptureManager::Source::remoteVideoSampleAvailable): Use original frame
666         size if necessary when calculating new frame size.
667
668 2018-12-12  Chris Fleizach  <cfleizach@apple.com>
669
670         [meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
671         https://bugs.webkit.org/show_bug.cgi?id=192449
672         <rdar://problem/46595508>
673
674         Reviewed by Darin Adler.
675
676         Part 5: Files in WebProcess folder.
677
678         * WebProcess/Cache/WebCacheStorageConnection.cpp:
679         * WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:
680         (mediaTimeToCurrentTime):
681         (-[WKAnimationDelegate initWithLayerID:layerTreeHost:]):
682         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
683         (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
684
685 2018-12-12  Ross Kirsling  <ross.kirsling@sony.com>
686
687         [MSVC] Unreviewed build fix for r239080.
688
689         * UIProcess/WebPageProxy.cpp:
690         (WebKit::WebPageProxy::didFailToSuspendAfterProcessSwap):
691
692 2018-12-12  Chris Fleizach  <cfleizach@apple.com>
693
694         [meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
695         https://bugs.webkit.org/show_bug.cgi?id=192449
696         <rdar://problem/46595508>
697
698         Reviewed by Darin Adler.
699
700         Part 4: Handling NetworkProcess folder.
701
702         * NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
703         * NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:
704         * NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
705         * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
706         * NetworkProcess/ios/NetworkProcessIOS.mm:
707         * NetworkProcess/mac/NetworkProcessMac.mm:
708         * NetworkProcess/mac/RemoteNetworkingContext.mm:
709
710 2018-12-12  Chris Fleizach  <cfleizach@apple.com>
711
712         [meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
713         https://bugs.webkit.org/show_bug.cgi?id=192449
714         <rdar://problem/46595508>
715
716         Reviewed by Tim Horton.
717
718         Fix iosmac build.
719
720         * UIProcess/ios/WKContentViewInteraction.mm:
721         (-[WKContentView _hoverGestureRecognizerChanged:]):
722
723 2018-12-12  Alex Christensen  <achristensen@webkit.org>
724
725         Implement safe browsing in WebKit on WatchOS
726         https://bugs.webkit.org/show_bug.cgi?id=192641
727         <rdar://problem/46376188>
728
729         Reviewed by Geoff Garen.
730
731         WatchOS has a few special requirements:
732         1. The margin size needs to be smaller and the title font smaller to fit on the screen.
733         2. The exclamation point cannot be beside the title or it won't fit on the screen.  I put it above the title.
734         3. The application must be told when the safe browsing warning has been shown.  I added a new delegate callback.
735         4. The UIScrollView's contentSize must be set even before the details are shown to be able to scroll down to the buttons.
736            This was already an issue on small WKWebViews on iOS, so this fixes both operating systems.
737
738         * Configurations/WebKit.xcconfig:
739         * UIProcess/API/APIUIClient.h:
740         (API::UIClient::didShowSafeBrowsingWarning):
741         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
742         * UIProcess/Cocoa/UIDelegate.h:
743         * UIProcess/Cocoa/UIDelegate.mm:
744         (WebKit::UIDelegate::setDelegate):
745         (WebKit::UIDelegate::UIClient::didShowSafeBrowsingWarning):
746         * UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
747         (fontOfSize):
748         (buttonSize):
749         (-[WKSafeBrowsingWarning addContent]):
750         (-[WKSafeBrowsingWarning showDetailsClicked]):
751         (-[WKSafeBrowsingWarning updateContentSize]):
752         (buttonWidth): Deleted.
753         * UIProcess/WebPageProxy.cpp:
754         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
755
756 2018-12-12  Commit Queue  <commit-queue@webkit.org>
757
758         Unreviewed, rolling out r239129 and r239131.
759         https://bugs.webkit.org/show_bug.cgi?id=192646
760
761         Casued macOS and iOS Debug testing to fail early (Requested by
762         Truitt on #webkit).
763
764         Reverted changesets:
765
766         "Unreviewed build fix for WinCairo Debug after r239080(?)."
767         https://trac.webkit.org/changeset/239129
768
769         "Unreviewed fix for Cocoa Debug test instability following
770         r239129."
771         https://trac.webkit.org/changeset/239131
772
773 2018-12-12  Vivek Seth  <v_seth@apple.com>
774
775         HTTPS Upgrade: Figure out if/how to tell clients that the HTTPS upgrade happened
776         https://bugs.webkit.org/show_bug.cgi?id=192375
777         <rdar://problem/45851159>
778
779         Reviewed by Chris Dumez.
780
781         Use simulated redirect to tell clients that HTTPS Upgrade happened.
782
783         * NetworkProcess/NetworkLoadChecker.cpp:
784         (WebKit::NetworkLoadChecker::NetworkLoadChecker):
785         (WebKit::NetworkLoadChecker::checkRedirection):
786         (WebKit::NetworkLoadChecker::accessControlErrorForValidationHandler):
787         (WebKit::NetworkLoadChecker::applyHTTPSUpgradeIfNeeded const):
788         (WebKit::NetworkLoadChecker::checkRequest):
789         (WebKit::NetworkLoadChecker::continueCheckingRequestOrDoSyntheticRedirect):
790         (WebKit::NetworkLoadChecker::checkCORSRequestWithPreflight):
791         (WebKit::NetworkLoadChecker::applyHTTPSUpgradeIfNeeded): Deleted.
792         * NetworkProcess/NetworkLoadChecker.h:
793         * NetworkProcess/NetworkResourceLoader.cpp:
794         (WebKit::NetworkResourceLoader::start):
795         * NetworkProcess/PingLoad.cpp:
796
797 2018-12-12  Ross Kirsling  <ross.kirsling@sony.com>
798
799         Unreviewed fix for Cocoa Debug test instability following r239129.
800
801         * UIProcess/WebPageProxy.cpp:
802         (WebKit::WebPageProxy::didFailToSuspendAfterProcessSwap): Deleted.
803         * UIProcess/WebPageProxy.h:
804         (WebKit::WebPageProxy::didFailToSuspendAfterProcessSwap):
805         Move the whole assertion to the declaration site.
806
807 2018-12-12  Chris Dumez  <cdumez@apple.com>
808
809         Add a preference to enable / disable devicemotion and deviceorientation events
810         https://bugs.webkit.org/show_bug.cgi?id=192631
811         <rdar://problem/46646244>
812
813         Reviewed by Geoffrey Garen.
814
815         Add setting to toggle support for the deviceorientation / devicemotion events:
816         - https://w3c.github.io/deviceorientation/
817
818         * Shared/WebPreferences.yaml:
819         * UIProcess/API/Cocoa/WKPreferences.mm:
820         (-[WKPreferences _setDeviceOrientationEventEnabled:]):
821         (-[WKPreferences _deviceOrientationEventEnabled]):
822         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
823
824 2018-12-12  Ross Kirsling  <ross.kirsling@sony.com>
825
826         Unreviewed build fix for WinCairo Debug after r239080(?).
827
828         MSVC gives a redefinition error if noreturn is specified on the definition instead of the declaration.
829
830         * UIProcess/WebPageProxy.cpp:
831         (WebKit::WebPageProxy::didFailToSuspendAfterProcessSwap):
832         * UIProcess/WebPageProxy.h:
833         Move NO_RETURN_DUE_TO_ASSERT to the declaration site.
834
835 2018-12-12  Chris Fleizach  <cfleizach@apple.com>
836
837         [meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
838         https://bugs.webkit.org/show_bug.cgi?id=192449
839         <rdar://problem/46595508>
840
841         Reviewed by Darin Adler.
842
843         Part 2: UIProcess/Cocoa and UIProcess/ios folders.
844
845         * UIProcess/Cocoa/WebViewImpl.h:
846         * UIProcess/Cocoa/WebViewImpl.mm:
847         * UIProcess/ios/WKContentView.mm:
848         (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
849         (-[WKContentView initWithFrame:processPool:configuration:webView:]):
850         (-[WKContentView dealloc]):
851         (-[WKContentView page]):
852         (-[WKContentView updateFixedClippingView:]):
853         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
854         (-[WKContentView _updateForScreen:]):
855         (-[WKContentView _accessibilityRegisterUIProcessTokens]):
856         (-[WKContentView _createDrawingAreaProxy]):
857         (-[WKContentView _didCommitLayerTree:]):
858         (-[WKContentView _wk_pageCountForPrintFormatter:]):
859         * UIProcess/ios/WKContentViewInteraction.mm:
860         (-[WKFocusedElementInfo initWithAssistedNodeInformation:isUserInitiated:userObject:]):
861         (hasAssistedNode):
862         (-[WKContentView setupInteraction]):
863         (-[WKContentView positionInformation]):
864         (-[WKContentView _webTouchEventsRecognized:]):
865         (inflateQuad):
866         (-[WKContentView _updateTapHighlight]):
867         (-[WKContentView _showTapHighlight]):
868         (-[WKContentView _requiresKeyboardWhenFirstResponder]):
869         (-[WKContentView _displayFormNodeInputView]):
870         (-[WKContentView inputView]):
871         (-[WKContentView _actionForLongPressFromPositionInformation:]):
872         (-[WKContentView currentPositionInformation]):
873         (-[WKContentView doAfterPositionInformationUpdate:forRequest:]):
874         (-[WKContentView _currentPositionInformationIsValidForRequest:]):
875         (-[WKContentView _hasValidOutstandingPositionInformationRequest:]):
876         (-[WKContentView _currentPositionInformationIsApproximatelyValidForRequest:]):
877         (-[WKContentView gestureRecognizerShouldBegin:]):
878         (-[WKContentView hasSelectablePositionAtPoint:]):
879         (-[WKContentView pointIsNearMarkedText:]):
880         (-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
881         (-[WKContentView webSelectionRectsForSelectionRects:]):
882         (-[WKContentView _twoFingerSingleTapGestureRecognized:]):
883         (-[WKContentView _stylusSingleTapRecognized:]):
884         (-[WKContentView _singleTapCommited:]):
885         (-[WKContentView _attemptClickAtLocation:]):
886         (-[WKContentView _positionInformationDidChange:]):
887         (-[WKContentView requiresAccessoryView]):
888         (-[WKContentView supportedPasteboardTypesForCurrentSelection]):
889         (-[WKContentView _lookupForWebView:]):
890         (-[WKContentView _shareForWebView:]):
891         (-[WKContentView textStylingAtPosition:inDirection:]):
892         (-[WKContentView canPerformActionForWebView:withSender:]):
893         (-[WKContentView selectForWebView:]):
894         (-[WKContentView _accessibilityRetrieveRectsEnclosingSelectionOffset:withGranularity:]):
895         (-[WKContentView _accessibilityRetrieveRectsAtSelectionOffset:withText:completionHandler:]):
896         (toGestureType):
897         (toUIWKGestureType):
898         (toSelectionTouch):
899         (toUIWKSelectionTouch):
900         (toGestureRecognizerState):
901         (toUIGestureRecognizerState):
902         (toUIWKSelectionFlags):
903         (toWKTextGranularity):
904         (toWKSelectionDirection):
905         (selectionChangedWithGesture):
906         (selectionChangedWithTouch):
907         (-[WKContentView changeSelectionWithGestureAt:withGesture:withState:withFlags:]):
908         (-[WKContentView autocorrectionData]):
909         (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
910         (-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
911         (-[WKContentView _updateAccessory]):
912         (-[WKContentView selectedTextRange]):
913         (-[WKContentView setMarkedText:selectedRange:]):
914         (coreWritingDirection):
915         (-[WKContentView closestPositionToPoint:]):
916         (-[WKContentView insertText:]):
917         (-[WKContentView textInputTraits]):
918         (-[WKContentView handleKeyWebEvent:]):
919         (-[WKContentView handleKeyWebEvent:withCompletionHandler:]):
920         (-[WKContentView isScrollableForKeyboardScrollViewAnimator:]):
921         (-[WKContentView keyboardScrollViewAnimator:distanceForIncrement:]):
922         (-[WKContentView assistedNodeInformation]):
923         (-[WKContentView assistedNodeSelectOptions]):
924         (isAssistableInputType):
925         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
926         (-[WKContentView _stopAssistingNode]):
927         (-[WKContentView updateCurrentAssistedNodeInformation:]):
928         (-[WKContentView presentViewControllerForCurrentAssistedNode]):
929         (-[WKContentView actionNameForFocusedFormControlView:]):
930         (-[WKContentView selectWordForReplacement]):
931         (-[WKContentView _updateChangedSelection:]):
932         (-[WKContentView _beginSuppressingSelectionAssistantForReason:]):
933         (-[WKContentView _stopSuppressingSelectionAssistantForReason:]):
934         (-[WKContentView _showPlaybackTargetPicker:fromRect:routeSharingPolicy:routingContextUID:]):
935         (-[WKContentView _showRunOpenPanel:resultListener:]):
936         (-[WKContentView _showShareSheet:completionHandler:]):
937         (-[WKContentView positionInformationForActionSheetAssistant:]):
938         (-[WKContentView updatePositionInformationForActionSheetAssistant:]):
939         (-[WKContentView _startDrag:item:]):
940         (-[WKContentView _didHandleAdditionalDragItemsRequest:]):
941         (-[WKContentView _didHandleStartDataInteractionRequest:]):
942         (dropOperationForWebCoreDragOperation):
943         (-[WKContentView dragDataForDropSession:dragDestinationAction:]):
944         (-[WKContentView _didConcludeEditDataInteraction:]):
945         (-[WKContentView _didPerformDragOperation:]):
946         (-[WKContentView _prepareToDragPromisedAttachment:]):
947         (-[WKContentView _itemsForBeginningOrAddingToSessionWithRegistrationList:stagedDragSource:]):
948         (-[WKContentView _autofillContext]):
949         (-[WKContentView _dragInteraction:itemsForAddingToSession:withTouchAtPoint:completion:]):
950         (-[WKContentView _dragInteraction:prepareForSession:completion:]):
951         (-[WKContentView dragInteraction:itemsForBeginningSession:]):
952         (-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
953         (-[WKContentView dragInteraction:session:didEndWithOperation:]):
954         (-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
955         (-[WKContentView dropInteraction:performDrop:]):
956         (-[WKContentView dropInteraction:sessionDidEnd:]):
957         (-[WKContentView allowsLanguageSelectionMenuForListViewController:]):
958         (-[WKContentView shouldDisplayInputContextViewForListViewController:]):
959         (-[WKContentView numericInputModeForListViewController:]):
960         (-[WKContentView textContentTypeForListViewController:]):
961         (-[WKContentView allowsDictationInputForListViewController:]):
962         (-[WKContentView _simulateLongPressActionAtLocation:]):
963         (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
964         (-[WKContentView _presentationRectsForPreviewItemController:]):
965         * UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
966         (WKFullScreenViewControllerPlaybackSessionModelClient::setInterface):
967         (WKFullScreenViewControllerVideoFullscreenModelClient::setInterface):
968         (WKFullScreenViewControllerVideoFullscreenModelClient::interface const):
969         (-[WKFullScreenViewController videoControlsManagerDidChange]):
970         (-[WKFullScreenViewController _manager]):
971         (-[WKFullScreenViewController _togglePiPAction:]):
972         * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
973         (-[WKFullscreenAnimationController configureInitialAndFinalStatesForTransition:]):
974         (-[WKFullScreenWindowController isFullScreen]):
975         (-[WKFullScreenWindowController enterFullScreen]):
976         (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
977         (-[WKFullScreenWindowController exitFullScreen]):
978         (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
979         (-[WKFullScreenWindowController _completedExitFullScreen]):
980         (-[WKFullScreenWindowController webViewDidRemoveFromSuperviewWhileInFullscreen]):
981         (-[WKFullScreenWindowController _exitFullscreenImmediately]):
982         (-[WKFullScreenWindowController _manager]):
983
984 2018-12-12  Chris Fleizach  <cfleizach@apple.com>
985
986         [meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
987         https://bugs.webkit.org/show_bug.cgi?id=192449
988         <rdar://problem/46595508>
989
990         Reviewed by Darin Adler.
991
992         Part 1: Files in Shared folder.
993
994         * Shared/API/c/WKRenderLayer.cpp:
995         (WKRenderLayerGetFrameContentsLayer):
996         * Shared/API/c/cf/WKErrorCF.cpp:
997         (WKErrorCreateWithCFError):
998         (WKErrorCopyCFError):
999         * Shared/API/c/cg/WKImageCG.cpp:
1000         (WKImageCreateCGImage):
1001         (WKImageCreateFromCGImage):
1002         * Shared/API/c/mac/WKWebArchive.cpp:
1003         (WKWebArchiveGetTypeID):
1004         (WKWebArchiveCreate):
1005         (WKWebArchiveCreateWithData):
1006         (WKWebArchiveCreateFromRange):
1007         (WKWebArchiveCopyMainResource):
1008         (WKWebArchiveCopySubresources):
1009         (WKWebArchiveCopySubframeArchives):
1010         (WKWebArchiveCopyData):
1011         * Shared/API/c/mac/WKWebArchiveResource.cpp:
1012         (WKWebArchiveResourceGetTypeID):
1013         (WKWebArchiveResourceCreate):
1014         (WKWebArchiveResourceCopyData):
1015         (WKWebArchiveResourceCopyURL):
1016         (WKWebArchiveResourceCopyMIMEType):
1017         (WKWebArchiveResourceCopyTextEncoding):
1018         * Shared/ChildProcess.cpp:
1019         * Shared/ContextMenuContextData.cpp:
1020         * Shared/EditorState.cpp:
1021         * Shared/Plugins/NPIdentifierData.cpp:
1022         * Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
1023         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
1024         * Shared/SessionState.cpp:
1025         * Shared/SessionTracker.cpp:
1026         * Shared/ShareableBitmap.cpp:
1027         * Shared/ShareableResource.cpp:
1028         * Shared/VisibleContentRectUpdateInfo.cpp:
1029         * Shared/WebBackForwardListItem.cpp:
1030         * Shared/WebContextMenuItemData.cpp:
1031         * Shared/WebCoreArgumentCoders.cpp:
1032         * Shared/WebHitTestResultData.cpp:
1033         * Shared/WebImage.cpp:
1034         * Shared/WebMediaSessionMetadata.cpp:
1035         * Shared/WebMemorySampler.cpp:
1036         * Shared/WebMouseEvent.cpp:
1037         * Shared/WebRenderObject.cpp:
1038         * Shared/WebSQLiteDatabaseTracker.cpp:
1039         * Shared/WebWheelEvent.cpp:
1040         * Shared/cf/ArgumentCodersCF.cpp:
1041         * Shared/ios/WebPlatformTouchPointIOS.cpp:
1042
1043 2018-12-12  Chris Fleizach  <cfleizach@apple.com>
1044
1045         [meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
1046         https://bugs.webkit.org/show_bug.cgi?id=192449
1047         <rdar://problem/46595508>
1048
1049         Reviewed by Darin Adler.
1050
1051         Part 1: Files in NetworkProcess.
1052
1053         * NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
1054         * NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:
1055         * NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
1056         * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
1057         * NetworkProcess/ios/NetworkProcessIOS.mm:
1058         * NetworkProcess/mac/NetworkProcessMac.mm:
1059         * NetworkProcess/mac/RemoteNetworkingContext.mm:
1060
1061 2018-12-12  Chris Dumez  <cdumez@apple.com>
1062
1063         Unreviewed build with with recent macOS SDKs.
1064
1065         * Platform/cocoa/WKCrashReporter.mm:
1066
1067 2018-12-12  Chris Dumez  <cdumez@apple.com>
1068
1069         Unreviewed attempt to fix GTK build after r239104.
1070
1071         * UIProcess/WebPageProxy.cpp:
1072         (WebKit::WebPageProxy::performDragControllerAction):
1073
1074 2018-12-12  Chris Dumez  <cdumez@apple.com>
1075
1076         Unreviewed attempt to fix build with older SDKs after r239110.
1077
1078         * Platform/cocoa/WKCrashReporter.mm:
1079
1080 2018-12-12  Chris Dumez  <cdumez@apple.com>
1081
1082         Unreviewed, fix build with recent SDKs.
1083
1084         * Platform/cocoa/WKCrashReporter.mm:
1085
1086 2018-12-09  Darin Adler  <darin@apple.com>
1087
1088         [iOS] Zero memory containing the password for PDF documents when a WKPDFView is deallocated
1089         https://bugs.webkit.org/show_bug.cgi?id=192536
1090         rdar://problem/41174451
1091
1092         Reviewed by Tim Horton.
1093
1094         * UIProcess/ios/WKPDFView.mm: Took out PLATFORM(IOSMAC) since
1095         this class is not compiled on that platform at this time. Can always
1096         add it back later.
1097         (-[WKPDFView dealloc]): Zero out characters of _passwordForPrinting.
1098         (-[WKPDFView pdfHostViewController:documentDidUnlockWithPassword:]):
1099         Initialize _passwordForPrinting; use a CString instead of retaining
1100         an NSString since we can zero that out easily.
1101         (-[WKPDFView _ensureDocumentForPrinting]): Use _passwordForPrinting.
1102
1103 2018-12-12  Commit Queue  <commit-queue@webkit.org>
1104
1105         Unreviewed, rolling out r239103.
1106         https://bugs.webkit.org/show_bug.cgi?id=192627
1107
1108         It broke the built because it depends on another patch that
1109         didn't land yet (Requested by KaL on #webkit).
1110
1111         Reverted changeset:
1112
1113         "[WPE] Add API to notify about frame displayed view backend
1114         callback"
1115         https://bugs.webkit.org/show_bug.cgi?id=192224
1116         https://trac.webkit.org/changeset/239103
1117
1118 2018-12-12  Chris Dumez  <cdumez@apple.com>
1119
1120         Restore MESSAGE_CHECK_URL() security check on sourceURL in didPerformClientRedirect()
1121         https://bugs.webkit.org/show_bug.cgi?id=191982
1122         <rdar://problem/46258054>
1123
1124         Reviewed by Alex Christensen.
1125
1126         Have the WebPageProxy remember the local paths it previously visited so that the
1127         MESSAGE_CHECK_URL() checks still work when process-swap on navigation is enabled.
1128
1129         Add back MESSAGE_CHECK_URL() on sourceURL in didPerformClientRedirect().
1130
1131         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
1132         (WebKit::WebPageProxy::createSandboxExtensionsIfNeeded):
1133         * UIProcess/RemoteWebInspectorProxy.cpp:
1134         (WebKit::RemoteWebInspectorProxy::createFrontendPageAndWindow):
1135         * UIProcess/WebInspectorProxy.cpp:
1136         (WebKit::WebInspectorProxy::createFrontendPage):
1137         * UIProcess/WebPageProxy.cpp:
1138         (WebKit::WebPageProxy::loadRequestWithNavigation):
1139         (WebKit::WebPageProxy::loadFile):
1140         (WebKit::WebPageProxy::loadDataWithNavigation):
1141         (WebKit::WebPageProxy::loadAlternateHTML):
1142         (WebKit::WebPageProxy::reload):
1143         (WebKit::WebPageProxy::didPerformClientRedirect):
1144         (WebKit::WebPageProxy::backForwardGoToItem):
1145         (WebKit::WebPageProxy::checkURLReceivedFromCurrentOrPreviousWebProcess):
1146         (WebKit::WebPageProxy::addPreviouslyVisitedPath):
1147         (WebKit::WebPageProxy::willAcquireUniversalFileReadSandboxExtension):
1148         * UIProcess/WebPageProxy.h:
1149         * UIProcess/WebProcessProxy.cpp:
1150         (WebKit::WebProcessProxy::assumeReadAccessToBaseURL):
1151         * UIProcess/WebProcessProxy.h:
1152         * UIProcess/mac/WebPageProxyMac.mm:
1153
1154 2018-11-30  Carlos Garcia Campos  <cgarcia@igalia.com>
1155
1156         [WPE] Add API to notify about frame displayed view backend callback
1157         https://bugs.webkit.org/show_bug.cgi?id=192224
1158
1159         Reviewed by Michael Catanzaro.
1160
1161         Add API to add a callback to the view to be called when the view backend notifies that a frame has been
1162         displayed.
1163
1164         * UIProcess/API/glib/WebKitWebView.cpp:
1165         (FrameDisplayedCallback::FrameDisplayedCallback):
1166         (FrameDisplayedCallback::~FrameDisplayedCallback):
1167         (webkit_web_view_add_frame_displayed_callback):
1168         (webkit_web_view_remove_frame_displayed_callback):
1169         * UIProcess/API/wpe/WebKitWebView.h:
1170
1171 2018-12-11  Justin Michaud  <justin_michaud@apple.com>
1172
1173         Implement feature flag for CSS Typed OM
1174         https://bugs.webkit.org/show_bug.cgi?id=192610
1175
1176         Reviewed by Ryosuke Niwa.
1177
1178         * Configurations/FeatureDefines.xcconfig:
1179         * Shared/WebPreferences.yaml:
1180         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1181         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
1182
1183 2018-12-11  Fujii Hironori  <Hironori.Fujii@sony.com>
1184
1185         [Win][Clang] Fix warning -Wmissing-field-initializers
1186         https://bugs.webkit.org/show_bug.cgi?id=192584
1187
1188         Reviewed by Yusuke Suzuki.
1189
1190         Initialize a struct with '{ }' instead of '= {0}'.
1191
1192         * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
1193         (WebKit::ProcessLauncher::launchProcess):
1194         * UIProcess/win/WebPopupMenuProxyWin.cpp:
1195         (WebKit::WebPopupMenuProxyWin::showPopupMenu):
1196         * UIProcess/win/WebView.cpp:
1197         (WebKit::WebView::initializeToolTipWindow):
1198         (WebKit::WebView::setToolTip):
1199
1200 2018-12-11  Chris Dumez  <cdumez@apple.com>
1201
1202         PSON logic gets confused by concurrent decidePolicyForNavigationAction requests
1203         https://bugs.webkit.org/show_bug.cgi?id=192482
1204         <rdar://problem/46470145>
1205
1206         Reviewed by Antti Koivisto.
1207
1208         It is possible to get 2 parallel decidePolicyForNavigationAction() requests from the
1209         WebProcess when a new load is started before responding to the existing policy
1210         decision. This would lead to several issues with regards to PSON:
1211         - We would decide to swap for the first policy decision and tell the WebProcess to
1212           suspend. However, because the WebProcess issued a new decidePolicyForNavigationAction
1213           since for the same frame, the previous one is invalidated and the WebProcess would
1214           ignore our request to suspend.
1215         - We would hit assertions later on because the navigation has been destroyed and yet
1216           we're getting a didStartProvisionalLoad for it.
1217         - swapToWebProcess() was asynchronous so that it would wait for the destination
1218           SuspendedPage to finish suspending before asking it to unsuspend. This led to various
1219           problems because anything can happen in the UIProcess while we're waiting for the
1220           suspension (e.g. another load). Also, we may create the SuspendedPageProxy for
1221           the current page too late and start getting IPC from the previous process about
1222           the suspension load to about:blank.
1223
1224         To address these issues, the following design is now implemented:
1225         - swapToWebProcess() is no longer asynchronous
1226         - instead, WebProcessPool::processForNavigation() is now asynchronous. This is better
1227           because at this point we have not yet told the WebProcess about the policy decision.
1228           We already properly deal with the policy decision being made asynchronously. This
1229           also allows us to choose another process if the SuspendedPage we'd like to use
1230           failed to suspend.
1231         - If the WebProcess receives a PolicyAction::Suspend but ignores it, have it send an
1232           IPC to the UIProcess so that the SuspendedPageProxy knows about it. We then destroy
1233           the SuspendedPageProxy and make sure it is not used.
1234         - After the asynchronous process selection, if the navigation has been destroy, abort
1235           the process-swap to avoid hitting assertions later on due to doing a load for a
1236           destroyed navigation.
1237
1238         * UIProcess/SuspendedPageProxy.cpp:
1239         (WebKit::SuspendedPageProxy::~SuspendedPageProxy):
1240         Make sure m_whenReadyToConsume completion handler gets called if necessary if the
1241         SuspendedPageProxy gets destroyed. We pass null so that the SuspendedPage is not
1242         used.
1243
1244         (WebKit::SuspendedPageProxy::whenReadyToConsume):
1245         Add whenReadyToConsume() utility method to get a completion handler called when
1246         the SuspendedPageProxy is ready to be used. This basically means we have to wait
1247         for the page to finish its about:blank suspension load. If the suspension fails
1248         then we call the completion handler with null to indicate that the suspended
1249         page is not usable.
1250
1251         (WebKit::SuspendedPageProxy::unsuspendAndConsume):
1252         Rename unsuspend() to unsuspendAndConsume() and make it synchronous. This only gets
1253         called after whenReadyToConsume()'s completion handler has been called and if we
1254         do decide to use the SuspendedPageProxy. It tells the WebProcess to unsuspend and
1255         removes the SuspendedPageProxy from the WebProcessPool.
1256
1257         (WebKit::SuspendedPageProxy::didFinishLoad):
1258         rename m_finishedSuspendingHandler to m_whenReadyToConsume.
1259
1260         (WebKit::SuspendedPageProxy::didFailToSuspend):
1261         Add new didFailToSuspend() that gets called when the WebProcess sends us an IPC telling
1262         us it ignored our request to suspend. We then call m_whenReadyToConsume completion
1263         handler with null and destroy the SuspendedPageProxy.
1264
1265         (WebKit::SuspendedPageProxy::didReceiveMessage):
1266         * UIProcess/SuspendedPageProxy.h:
1267
1268         * UIProcess/WebNavigationState.h:
1269         (WebKit::WebNavigationState::hasNavigation const):
1270         Add utility function to query if a navigation is still valid.
1271
1272         * UIProcess/WebPageProxy.cpp:
1273         (WebKit::WebPageProxy::swapToWebProcess):
1274         Update method so that it is no longer asynchronous. Some of its code was also moved to
1275         continueNavigationInNewProcess() for clarity.
1276
1277         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
1278         Deal with WebProcessPool::processForNavigation() now being asynchronous.
1279
1280         (WebKit::WebPageProxy::continueNavigationInNewProcess):
1281         Update code now that swapToWebProcess() is no longer asynchronous. Some of the swapToWebProcess()
1282         code was also moved here for clarity.
1283
1284         (WebKit::WebPageProxy::didFailToSuspendAfterProcessSwap):
1285
1286         * UIProcess/WebPageProxy.h:
1287         * UIProcess/WebPageProxy.messages.in:
1288         Add new DidFailToSuspendAfterProcessSwap IPC message.
1289
1290         * UIProcess/WebProcessPool.cpp:
1291         (WebKit::WebProcessPool::processForNavigation):
1292         (WebKit::WebProcessPool::processForNavigationInternal):
1293         * UIProcess/WebProcessPool.h:
1294         Make asynchronous. If we decide to use a SuspendedPageProxy's process, then call
1295         whenReadyToConsume() on it to wait for it to suspend. If the SuspendedPageProxy
1296         fails to suspend use a new process instead.
1297
1298         * WebProcess/WebPage/WebFrame.cpp:
1299         (WebKit::WebFrame::didReceivePolicyDecision):
1300         If we ignore the policy decision and the decision was "Suspend", send the DidFailToSuspendAfterProcessSwap
1301         IPC to the UIProcess so that the SuspendedPageProxy knows about it.
1302
1303 2018-12-11  Andy Estes  <aestes@apple.com>
1304
1305         Introduce makeBlockPtr for lambdas
1306         https://bugs.webkit.org/show_bug.cgi?id=192594
1307
1308         Reviewed by Alex Christensen.
1309
1310         Adopted makeBlockPtr.
1311
1312         * NetworkProcess/Downloads/cocoa/WKDownloadProgress.mm:
1313         (-[WKDownloadProgress initWithDownloadTask:download:URL:sandboxExtension:]):
1314         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
1315         (WebKit::NetworkCache::IOChannel::read):
1316         (WebKit::NetworkCache::IOChannel::write):
1317         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1318         (WebKit::NetworkProcess::clearDiskCache):
1319         (WebKit::saveCookies):
1320         * NetworkProcess/watchos/NetworkProximityAssertion.mm:
1321         (WebKit::BluetoothProximityAssertion::suspend):
1322         * UIProcess/API/Cocoa/WKWebView.mm:
1323         (-[WKWebView _setInputDelegate:]):
1324         * UIProcess/API/mac/WKView.mm:
1325         (-[WKView maybeInstallIconLoadingClient]):
1326         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
1327         (WebKit::WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard):
1328         (WebKit::WebPaymentCoordinatorProxy::platformOpenPaymentSetup):
1329         * UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
1330         (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
1331         * UIProcess/Cocoa/AutomationSessionClient.mm:
1332         (WebKit::AutomationSessionClient::requestNewPageWithOptions):
1333         (WebKit::AutomationSessionClient::requestSwitchToPage):
1334         (WebKit::AutomationSessionClient::requestHideWindowOfPage):
1335         (WebKit::AutomationSessionClient::requestRestoreWindowOfPage):
1336         (WebKit::AutomationSessionClient::requestMaximizeWindowOfPage):
1337         * UIProcess/Cocoa/DownloadClient.mm:
1338         (WebKit::DownloadClient::didReceiveAuthenticationChallenge):
1339         (WebKit::DownloadClient::decideDestinationWithSuggestedFilename):
1340         * UIProcess/Cocoa/IconLoadingDelegate.mm:
1341         (WebKit::IconLoadingDelegate::IconLoadingClient::getLoadDecisionForIcon):
1342         * UIProcess/Cocoa/NavigationState.mm:
1343         (WebKit::NavigationState::NavigationClient::decidePolicyForPluginLoad):
1344         (WebKit::NavigationState::NavigationClient::webGLLoadPolicy const):
1345         (WebKit::NavigationState::NavigationClient::resolveWebGLLoadPolicy const):
1346         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
1347         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationResponse):
1348         (WebKit::NavigationState::NavigationClient::didReceiveAuthenticationChallenge):
1349         * UIProcess/Cocoa/UIDelegate.mm:
1350         (WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
1351         (WebKit::UIDelegate::UIClient::createNewPage):
1352         (WebKit::UIDelegate::UIClient::runJavaScriptAlert):
1353         (WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
1354         (WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
1355         (WebKit::UIDelegate::UIClient::requestStorageAccessConfirm):
1356         (WebKit::UIDelegate::UIClient::decidePolicyForGeolocationPermissionRequest):
1357         (WebKit::UIDelegate::UIClient::runBeforeUnloadConfirmPanel):
1358         (WebKit::UIDelegate::UIClient::exceededDatabaseQuota):
1359         (WebKit::UIDelegate::UIClient::windowFrame):
1360         (WebKit::UIDelegate::UIClient::toolbarsAreVisible):
1361         (WebKit::UIDelegate::UIClient::decidePolicyForNotificationPermissionRequest):
1362         (WebKit::UIDelegate::UIClient::runOpenPanel):
1363         (WebKit::requestUserMediaAuthorizationForDevices):
1364         (WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest):
1365         (WebKit::UIDelegate::UIClient::checkUserMediaPermissionForOrigin):
1366         (WebKit::UIDelegate::UIClient::reachedApplicationCacheOriginQuota):
1367         (WebKit::UIDelegate::UIClient::requestPointerLock):
1368         * UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
1369         (-[WKSafeBrowsingWarning clickedOnLink:]):
1370         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
1371         (WebKit::WebPageProxy::beginSafeBrowsingCheck):
1372         * UIProcess/WebAuthentication/Cocoa/HidConnection.mm:
1373         (WebKit::HidConnection::send):
1374         * UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:
1375         (WebKit::LocalConnection::getUserConsent const):
1376         (WebKit::LocalConnection::getAttestation const):
1377         * UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:
1378         (WebKit::MockHidConnection::send):
1379         * UIProcess/ios/PageClientImplIOS.mm:
1380         (WebKit::PageClientImpl::requestPasswordForQuickLookDocument):
1381         * UIProcess/ios/WKGeolocationProviderIOS.mm:
1382         (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]):
1383         * UIProcess/mac/ServicesController.mm:
1384         (WebKit::hasCompatibleServicesForItems):
1385         (WebKit::ServicesController::refreshExistingServices):
1386         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1387         (PageLoaderClient::didStartProvisionalLoadForFrame):
1388
1389 2018-12-11  Alex Christensen  <achristensen@webkit.org>
1390
1391         Fix an internal build failure after r239014
1392         https://bugs.webkit.org/show_bug.cgi?id=192205
1393
1394         * UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
1395         (fontOfSize):
1396         There's a system that doesn't have safe browsing or UIFontTextStyleLargeTitle.
1397
1398 2018-12-11  Brian Burg  <bburg@apple.com>
1399
1400         SimulatedInputDispatcher::transitionInputSourceToState() can reuse a moved-from completion handler
1401         https://bugs.webkit.org/show_bug.cgi?id=191155
1402         <rdar://problem/45745569>
1403
1404         Reviewed by Joseph Pecoraro.
1405
1406         * UIProcess/Automation/SimulatedInputDispatcher.cpp:
1407         (WebKit::SimulatedInputDispatcher::transitionInputSourceToState):
1408         Add an ASSERT to guard against unexpected inputs where >1 VirtualKey changes per state.
1409         webkitdriver needs to be updated to not produce such states in this scenario, but this will
1410         avoid a runtime crash caused by trying to call a moved-out completion handler a second time.
1411
1412 2018-12-11  Commit Queue  <commit-queue@webkit.org>
1413
1414         Unreviewed, rolling out r239071.
1415         https://bugs.webkit.org/show_bug.cgi?id=192588
1416
1417         Broke WPE build due to undefined references to toAPI() and
1418         toImpl() inside the C API (Requested by magomez on #webkit).
1419
1420         Reverted changeset:
1421
1422         "[meta][WebKit] Remove using namespace WebCore and WebKit in
1423         the global scope for unified source builds"
1424         https://bugs.webkit.org/show_bug.cgi?id=192449
1425         https://trac.webkit.org/changeset/239071
1426
1427 2018-12-10  Chris Fleizach  <cfleizach@apple.com>
1428
1429         [meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
1430         https://bugs.webkit.org/show_bug.cgi?id=192449
1431
1432         Reviewed by Darin Adler.
1433
1434         * NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
1435         * NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:
1436         * NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
1437         * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
1438         * NetworkProcess/ios/NetworkProcessIOS.mm:
1439         * NetworkProcess/mac/NetworkProcessMac.mm:
1440         * NetworkProcess/mac/RemoteNetworkingContext.mm:
1441         * Platform/spi/ios/AccessibilitySupportSPI.h:
1442         * PlatformMac.cmake:
1443         * PluginProcess/PluginControllerProxy.cpp:
1444         * PluginProcess/PluginProcess.cpp:
1445         * PluginProcess/WebProcessConnection.cpp:
1446         * Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb:
1447         * Shared/API/c/cf/WKErrorCF.cpp:
1448         (WKErrorCreateWithCFError):
1449         (WKErrorCopyCFError):
1450         * Shared/API/c/cg/WKImageCG.cpp:
1451         (WKImageCreateCGImage):
1452         (WKImageCreateFromCGImage):
1453         * Shared/ChildProcess.cpp:
1454         * Shared/ContextMenuContextData.cpp:
1455         * Shared/EditorState.cpp:
1456         * Shared/Plugins/NPIdentifierData.cpp:
1457         * Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
1458         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
1459         * Shared/SessionState.cpp:
1460         * Shared/SessionTracker.cpp:
1461         * Shared/ShareableBitmap.cpp:
1462         * Shared/ShareableResource.cpp:
1463         * Shared/VisibleContentRectUpdateInfo.cpp:
1464         * Shared/WebBackForwardListItem.cpp:
1465         * Shared/WebContextMenuItemData.cpp:
1466         * Shared/WebCoreArgumentCoders.cpp:
1467         * Shared/WebHitTestResultData.cpp:
1468         * Shared/WebImage.cpp:
1469         * Shared/WebMediaSessionMetadata.cpp:
1470         * Shared/WebMemorySampler.cpp:
1471         * Shared/WebMouseEvent.cpp:
1472         * Shared/WebRenderObject.cpp:
1473         * Shared/WebSQLiteDatabaseTracker.cpp:
1474         * Shared/WebWheelEvent.cpp:
1475         * Shared/cf/ArgumentCodersCF.cpp:
1476         * Shared/ios/WebPlatformTouchPointIOS.cpp:
1477         * SourcesCocoa.txt:
1478         * UIProcess/API/APIContentRuleListStore.cpp:
1479         * UIProcess/API/APIHitTestResult.cpp:
1480         * UIProcess/API/APINavigation.cpp:
1481         * UIProcess/API/APIOpenPanelParameters.cpp:
1482         * UIProcess/API/APIPageConfiguration.cpp:
1483         * UIProcess/API/C/WKPage.cpp:
1484         (WKPageLoadURLWithShouldOpenExternalURLsPolicy):
1485         (WKPageLoadURLWithUserData):
1486         (WKPageLoadURLRequestWithUserData):
1487         (WKPageSetPaginationMode):
1488         (WKPageGetPaginationMode):
1489         (WKPageSetPageLoaderClient):
1490         (WKPageSetPagePolicyClient):
1491         * UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
1492         * UIProcess/Cocoa/WebViewImpl.h:
1493         * UIProcess/Cocoa/WebViewImpl.mm:
1494         * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
1495         * UIProcess/WebStorage/LocalStorageDatabase.cpp:
1496         * UIProcess/ios/WKContentView.mm:
1497         (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
1498         (-[WKContentView initWithFrame:processPool:configuration:webView:]):
1499         (-[WKContentView dealloc]):
1500         (-[WKContentView page]):
1501         (-[WKContentView updateFixedClippingView:]):
1502         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
1503         (-[WKContentView _updateForScreen:]):
1504         (-[WKContentView _accessibilityRegisterUIProcessTokens]):
1505         (-[WKContentView _createDrawingAreaProxy]):
1506         (-[WKContentView _didCommitLayerTree:]):
1507         (-[WKContentView _wk_pageCountForPrintFormatter:]):
1508         * UIProcess/ios/WKContentViewInteraction.mm:
1509         (-[WKFocusedElementInfo initWithAssistedNodeInformation:isUserInitiated:userObject:]):
1510         (hasAssistedNode):
1511         (-[WKContentView setupInteraction]):
1512         (-[WKContentView positionInformation]):
1513         (-[WKContentView _webTouchEventsRecognized:]):
1514         (inflateQuad):
1515         (-[WKContentView _updateTapHighlight]):
1516         (-[WKContentView _showTapHighlight]):
1517         (-[WKContentView _requiresKeyboardWhenFirstResponder]):
1518         (-[WKContentView _displayFormNodeInputView]):
1519         (-[WKContentView inputView]):
1520         (-[WKContentView _actionForLongPressFromPositionInformation:]):
1521         (-[WKContentView currentPositionInformation]):
1522         (-[WKContentView doAfterPositionInformationUpdate:forRequest:]):
1523         (-[WKContentView _currentPositionInformationIsValidForRequest:]):
1524         (-[WKContentView _hasValidOutstandingPositionInformationRequest:]):
1525         (-[WKContentView _currentPositionInformationIsApproximatelyValidForRequest:]):
1526         (-[WKContentView gestureRecognizerShouldBegin:]):
1527         (-[WKContentView hasSelectablePositionAtPoint:]):
1528         (-[WKContentView pointIsNearMarkedText:]):
1529         (-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
1530         (-[WKContentView webSelectionRectsForSelectionRects:]):
1531         (-[WKContentView _twoFingerSingleTapGestureRecognized:]):
1532         (-[WKContentView _stylusSingleTapRecognized:]):
1533         (-[WKContentView _singleTapCommited:]):
1534         (-[WKContentView _attemptClickAtLocation:]):
1535         (-[WKContentView _positionInformationDidChange:]):
1536         (-[WKContentView requiresAccessoryView]):
1537         (-[WKContentView supportedPasteboardTypesForCurrentSelection]):
1538         (-[WKContentView _lookupForWebView:]):
1539         (-[WKContentView _shareForWebView:]):
1540         (-[WKContentView textStylingAtPosition:inDirection:]):
1541         (-[WKContentView canPerformActionForWebView:withSender:]):
1542         (-[WKContentView selectForWebView:]):
1543         (-[WKContentView _accessibilityRetrieveRectsEnclosingSelectionOffset:withGranularity:]):
1544         (-[WKContentView _accessibilityRetrieveRectsAtSelectionOffset:withText:completionHandler:]):
1545         (toGestureType):
1546         (toUIWKGestureType):
1547         (toSelectionTouch):
1548         (toUIWKSelectionTouch):
1549         (toGestureRecognizerState):
1550         (toUIGestureRecognizerState):
1551         (toUIWKSelectionFlags):
1552         (toWKTextGranularity):
1553         (toWKSelectionDirection):
1554         (selectionChangedWithGesture):
1555         (selectionChangedWithTouch):
1556         (-[WKContentView changeSelectionWithGestureAt:withGesture:withState:withFlags:]):
1557         (-[WKContentView autocorrectionData]):
1558         (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
1559         (-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
1560         (-[WKContentView _updateAccessory]):
1561         (-[WKContentView selectedTextRange]):
1562         (-[WKContentView setMarkedText:selectedRange:]):
1563         (coreWritingDirection):
1564         (-[WKContentView closestPositionToPoint:]):
1565         (-[WKContentView insertText:]):
1566         (-[WKContentView textInputTraits]):
1567         (-[WKContentView handleKeyWebEvent:]):
1568         (-[WKContentView handleKeyWebEvent:withCompletionHandler:]):
1569         (-[WKContentView isScrollableForKeyboardScrollViewAnimator:]):
1570         (-[WKContentView keyboardScrollViewAnimator:distanceForIncrement:]):
1571         (-[WKContentView assistedNodeInformation]):
1572         (-[WKContentView assistedNodeSelectOptions]):
1573         (isAssistableInputType):
1574         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
1575         (-[WKContentView _stopAssistingNode]):
1576         (-[WKContentView updateCurrentAssistedNodeInformation:]):
1577         (-[WKContentView presentViewControllerForCurrentAssistedNode]):
1578         (-[WKContentView actionNameForFocusedFormControlView:]):
1579         (-[WKContentView selectWordForReplacement]):
1580         (-[WKContentView _updateChangedSelection:]):
1581         (-[WKContentView _beginSuppressingSelectionAssistantForReason:]):
1582         (-[WKContentView _stopSuppressingSelectionAssistantForReason:]):
1583         (-[WKContentView _showPlaybackTargetPicker:fromRect:routeSharingPolicy:routingContextUID:]):
1584         (-[WKContentView _showRunOpenPanel:resultListener:]):
1585         (-[WKContentView _showShareSheet:completionHandler:]):
1586         (-[WKContentView positionInformationForActionSheetAssistant:]):
1587         (-[WKContentView updatePositionInformationForActionSheetAssistant:]):
1588         (-[WKContentView _startDrag:item:]):
1589         (-[WKContentView _didHandleAdditionalDragItemsRequest:]):
1590         (-[WKContentView _didHandleStartDataInteractionRequest:]):
1591         (dropOperationForWebCoreDragOperation):
1592         (-[WKContentView dragDataForDropSession:dragDestinationAction:]):
1593         (-[WKContentView _didConcludeEditDataInteraction:]):
1594         (-[WKContentView _didPerformDragOperation:]):
1595         (-[WKContentView _prepareToDragPromisedAttachment:]):
1596         (-[WKContentView _itemsForBeginningOrAddingToSessionWithRegistrationList:stagedDragSource:]):
1597         (-[WKContentView _autofillContext]):
1598         (-[WKContentView _dragInteraction:itemsForAddingToSession:withTouchAtPoint:completion:]):
1599         (-[WKContentView _dragInteraction:prepareForSession:completion:]):
1600         (-[WKContentView dragInteraction:itemsForBeginningSession:]):
1601         (-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
1602         (-[WKContentView dragInteraction:session:didEndWithOperation:]):
1603         (-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
1604         (-[WKContentView dropInteraction:performDrop:]):
1605         (-[WKContentView dropInteraction:sessionDidEnd:]):
1606         (-[WKContentView allowsLanguageSelectionMenuForListViewController:]):
1607         (-[WKContentView shouldDisplayInputContextViewForListViewController:]):
1608         (-[WKContentView numericInputModeForListViewController:]):
1609         (-[WKContentView textContentTypeForListViewController:]):
1610         (-[WKContentView allowsDictationInputForListViewController:]):
1611         (-[WKContentView _simulateLongPressActionAtLocation:]):
1612         (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
1613         (-[WKContentView _presentationRectsForPreviewItemController:]):
1614         * UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
1615         (WKFullScreenViewControllerPlaybackSessionModelClient::setInterface):
1616         (WKFullScreenViewControllerVideoFullscreenModelClient::setInterface):
1617         (WKFullScreenViewControllerVideoFullscreenModelClient::interface const):
1618         (-[WKFullScreenViewController videoControlsManagerDidChange]):
1619         (-[WKFullScreenViewController _manager]):
1620         (-[WKFullScreenViewController _togglePiPAction:]):
1621         * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
1622         (-[WKFullscreenAnimationController configureInitialAndFinalStatesForTransition:]):
1623         (-[WKFullScreenWindowController isFullScreen]):
1624         (-[WKFullScreenWindowController enterFullScreen]):
1625         (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
1626         (-[WKFullScreenWindowController exitFullScreen]):
1627         (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
1628         (-[WKFullScreenWindowController _completedExitFullScreen]):
1629         (-[WKFullScreenWindowController webViewDidRemoveFromSuperviewWhileInFullscreen]):
1630         (-[WKFullScreenWindowController _exitFullscreenImmediately]):
1631         (-[WKFullScreenWindowController _manager]):
1632         * UIProcess/mac/WebPageProxyMac.mm:
1633         * WebKit.xcodeproj/project.pbxproj:
1634         * WebProcess/Cache/WebCacheStorageConnection.cpp:
1635         * WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:
1636         (mediaTimeToCurrentTime):
1637         (-[WKAnimationDelegate initWithLayerID:layerTreeHost:]):
1638         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
1639         (-[WKAccessibilityWebPageObjectBase accessibilityRootObjectWrapper]):
1640
1641 2018-12-10  Don Olmstead  <don.olmstead@sony.com>
1642
1643         Move ENABLE_RESOURCE_LOAD_STATISTICS to FeatureDefines.xcconfig
1644         https://bugs.webkit.org/show_bug.cgi?id=192573
1645
1646         Reviewed by Simon Fraser.
1647
1648         * Configurations/FeatureDefines.xcconfig:
1649
1650 2018-12-10  Youenn Fablet  <youenn@apple.com>
1651
1652         Remove derived classes of RealtimeMediaSourceCenter
1653         https://bugs.webkit.org/show_bug.cgi?id=192546
1654
1655         Reviewed by Eric Carlson.
1656
1657         pdate code according WebCore changes.
1658
1659         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
1660         (WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):
1661         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
1662         (WebKit::UserMediaCaptureManager::~UserMediaCaptureManager):
1663         (WebKit::UserMediaCaptureManager::initialize):
1664
1665 2018-12-10  Tim Horton  <timothy_horton@apple.com>
1666
1667         Animated scrolling on Google Maps scrolls the page in addition to moving the map
1668         https://bugs.webkit.org/show_bug.cgi?id=192521
1669         <rdar://problem/46382007>
1670
1671         Reviewed by Sam Weinig.
1672
1673         * Platform/spi/ios/UIKitSPI.h:
1674         * UIProcess/ios/WKKeyboardScrollingAnimator.mm:
1675         (-[WKKeyboardScrollViewAnimator rubberbandableDirections]):
1676         Only do keyboard-based rubber-banding in directions that we can actually
1677         scroll, not directions we can only finger-rubber-band in. This effectively
1678         means keyboard scrolling will ignore "alwaysBounce{Vertical, Horizontal}".
1679
1680 2018-12-10  Commit Queue  <commit-queue@webkit.org>
1681
1682         Unreviewed, rolling out r239023.
1683         https://bugs.webkit.org/show_bug.cgi?id=192571
1684
1685         Speculative rollout due to broken perf test (Requested by
1686         deanj on #webkit).
1687
1688         Reverted changeset:
1689
1690         "Enable HTTP and HTTPS proxies on iOS and make it a property
1691         of the NSURLSession"
1692         https://bugs.webkit.org/show_bug.cgi?id=192374
1693         https://trac.webkit.org/changeset/239023
1694
1695 2018-12-10  Wenson Hsieh  <wenson_hsieh@apple.com>
1696
1697         Unreviewed, fix the iOS build after r239039.
1698         https://bugs.webkit.org/show_bug.cgi?id=192568
1699
1700         * UIProcess/ios/WKContentViewInteraction.mm:
1701         (-[WKContentView dropInteraction:sessionDidUpdate:]):
1702
1703 2018-12-10  Alex Christensen  <achristensen@webkit.org>
1704
1705         Fix WatchOS build.
1706
1707         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1708         * UIProcess/ios/WKContentViewInteraction.mm:
1709         (-[WKContentView actionNameForFocusedFormControlView:]):
1710
1711 2018-12-10  Matt Lewis  <jlewis3@apple.com>
1712
1713         Unreviewed, rolling out r239029.
1714
1715         This patch caused internal build failures.
1716
1717         Reverted changeset:
1718
1719         "[meta][WebKit] Remove using namespace WebCore and WebKit in
1720         the global scope for unified source builds"
1721         https://bugs.webkit.org/show_bug.cgi?id=192449
1722         https://trac.webkit.org/changeset/239029
1723
1724 2018-12-10  Chris Dumez  <cdumez@apple.com>
1725
1726         Add SPI to allow the client to set the user-agent at main frame level, from the UIProcess
1727         https://bugs.webkit.org/show_bug.cgi?id=192509
1728         <rdar://problem/46500832>
1729
1730         Reviewed by Alex Christensen.
1731
1732         Add SPI to allow the client to set the user-agent at main frame level, from the UIProcess instead of doing
1733         it at resource-level from the injected bundle.
1734
1735         The custom user-agent string can now be set on _WKWebsitePolicies during the
1736         decidePolicyForNavigationAction for the main feame, and will impact this main resource load as well as its
1737         future subresource loads.
1738
1739         * Shared/WebsitePoliciesData.cpp:
1740         (WebKit::WebsitePoliciesData::encode const):
1741         (WebKit::WebsitePoliciesData::decode):
1742         (WebKit::WebsitePoliciesData::applyToDocumentLoader):
1743         * Shared/WebsitePoliciesData.h:
1744         * UIProcess/API/APIWebsitePolicies.cpp:
1745         (API::WebsitePolicies::data):
1746         * UIProcess/API/APIWebsitePolicies.h:
1747         * UIProcess/API/Cocoa/_WKWebsitePolicies.h:
1748         * UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
1749         (-[_WKWebsitePolicies setCustomUserAgent:]):
1750         (-[_WKWebsitePolicies customUserAgent]):
1751         * UIProcess/Cocoa/NavigationState.mm:
1752         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
1753
1754 2018-12-10  Alex Christensen  <achristensen@webkit.org>
1755
1756         Safe browsing warning should layout buttons vertically in narrow WKWebViews
1757         https://bugs.webkit.org/show_bug.cgi?id=192535
1758         <rdar://problem/46308364>
1759
1760         Reviewed by Tim Horton.
1761
1762         They're usually next to each other, but in narrow WKWebViews they currently get clipped.
1763         In order to make it more likely that both buttons are completely visible, put one above
1764         the other if the WKWebView is too narrow to completely show both.  This also helps with
1765         languages where the translations of "Go Back" or "Show Details" are rendered wider than English.
1766
1767         * UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
1768         (buttonWidth):
1769         (-[WKSafeBrowsingWarning addContent]):
1770
1771 2018-12-10  Simon Fraser  <simon.fraser@apple.com>
1772
1773         Allow control over child order when adding nodes to the scrolling tree
1774         https://bugs.webkit.org/show_bug.cgi?id=176914
1775         <rdar://problem/46542237>
1776         
1777         Re-land r239010 after over-zealous rollout.
1778
1779         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
1780         (WebKit::RemoteScrollingCoordinatorTransaction::decode):
1781
1782 2018-12-10  Wenson Hsieh  <wenson_hsieh@apple.com>
1783
1784         [iOS] Caret is obscured by finger when dragging over an editable element
1785         https://bugs.webkit.org/show_bug.cgi?id=192499
1786         <rdar://problem/46570101>
1787
1788         Reviewed by Tim Horton.
1789
1790         Add support for setting the `precise` property of `UIDropProposal` to YES when dragging over an editable area.
1791         When enabled, this property shifts the drop location up by a small amount, allowing the user to see the drop
1792         caret (currently, this is not the case, and it's difficult to drop text at a precise location on iOS). Changes
1793         are covered by adding to existing API tests.
1794
1795         * Scripts/webkit/messages.py:
1796         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1797
1798         Add a new version of `-_webView:willUpdateDataInteractionOperationToOperation:forSession:` that receives and
1799         returns a UIDropProposal, so that Mail can more easily port over existing logic in its legacy-WebKit-based
1800         compose implementation. iOS Safari is currently the only client of this private delegate, so the old version can
1801         be easily removed once Safari adopts this new version.
1802
1803         * UIProcess/WebPageProxy.cpp:
1804         (WebKit::WebPageProxy::didPerformDragControllerAction):
1805
1806         Add plumbing to send the latest drag handling method from WebPage to WebPageProxy.
1807
1808         (WebKit::WebPageProxy::resetCurrentDragInformation):
1809         * UIProcess/WebPageProxy.h:
1810         (WebKit::WebPageProxy::currentDragHandlingMethod const):
1811         * UIProcess/WebPageProxy.messages.in:
1812         * UIProcess/ios/WKContentViewInteraction.mm:
1813         (-[WKContentView dropInteraction:sessionDidUpdate:]):
1814
1815         Call the new UI delegate hook when determining the drop proposal to return to UIKit. Additionally set the
1816         `precise` bit on the drop proposal in the case where the drop handling method is either "editing rich text" or
1817         "editing plain text".
1818
1819         * WebProcess/WebPage/WebPage.cpp:
1820         (WebKit::WebPage::performDragControllerAction):
1821         * WebProcess/WebPage/WebPage.h:
1822
1823 2018-12-10  Youenn Fablet  <youenn@apple.com>
1824
1825         Make mock capture happen in the process used for real capture
1826         https://bugs.webkit.org/show_bug.cgi?id=192544
1827
1828         Reviewed by Eric Carlson.
1829
1830         Make mock capture happen in the right process by only overriding
1831         factories by mock factories for source types that UserMediaCaptureManager will not override.
1832         That way, UserMediaCaptureManager will be used to go to UIProcess, where mock will be used as if it was the real capture.
1833
1834         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
1835         (WebKit::UserMediaCaptureManager::initialize):
1836
1837 2018-12-10  Alexey Proskuryakov  <ap@apple.com>
1838
1839         Move ENABLE_SEC_ITEM_SHIM out of WebKit's config.h
1840         https://bugs.webkit.org/show_bug.cgi?id=192428
1841
1842         Reviewed by Tim Horton.
1843
1844         * config.h:
1845
1846 2018-12-10  Alexey Proskuryakov  <ap@apple.com>
1847
1848         Move more macros out of WebKit's config.h
1849         https://bugs.webkit.org/show_bug.cgi?id=192430
1850
1851         Reviewed by Tim Horton.
1852
1853         * config.h:
1854
1855 2018-12-10  Chris Fleizach  <cfleizach@apple.com>
1856
1857         [meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
1858         https://bugs.webkit.org/show_bug.cgi?id=192449
1859
1860         Reviewed by Darin Adler.
1861
1862         * NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
1863         * NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:
1864         * NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
1865         * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
1866         * NetworkProcess/ios/NetworkProcessIOS.mm:
1867         * NetworkProcess/mac/NetworkProcessMac.mm:
1868         * NetworkProcess/mac/RemoteNetworkingContext.mm:
1869         * Platform/spi/ios/AccessibilitySupportSPI.h:
1870         * PlatformMac.cmake:
1871         * PluginProcess/PluginControllerProxy.cpp:
1872         * PluginProcess/PluginProcess.cpp:
1873         * PluginProcess/WebProcessConnection.cpp:
1874         * Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb:
1875         * Shared/API/c/cf/WKErrorCF.cpp:
1876         (WKErrorCreateWithCFError):
1877         (WKErrorCopyCFError):
1878         * Shared/API/c/cg/WKImageCG.cpp:
1879         (WKImageCreateCGImage):
1880         (WKImageCreateFromCGImage):
1881         * Shared/ChildProcess.cpp:
1882         * Shared/ContextMenuContextData.cpp:
1883         * Shared/EditorState.cpp:
1884         * Shared/Plugins/NPIdentifierData.cpp:
1885         * Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
1886         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
1887         * Shared/SessionState.cpp:
1888         * Shared/SessionTracker.cpp:
1889         * Shared/ShareableBitmap.cpp:
1890         * Shared/ShareableResource.cpp:
1891         * Shared/VisibleContentRectUpdateInfo.cpp:
1892         * Shared/WebBackForwardListItem.cpp:
1893         * Shared/WebContextMenuItemData.cpp:
1894         * Shared/WebCoreArgumentCoders.cpp:
1895         * Shared/WebHitTestResultData.cpp:
1896         * Shared/WebImage.cpp:
1897         * Shared/WebMediaSessionMetadata.cpp:
1898         * Shared/WebMemorySampler.cpp:
1899         * Shared/WebMouseEvent.cpp:
1900         * Shared/WebRenderObject.cpp:
1901         * Shared/WebSQLiteDatabaseTracker.cpp:
1902         * Shared/WebWheelEvent.cpp:
1903         * Shared/cf/ArgumentCodersCF.cpp:
1904         * Shared/ios/WebPlatformTouchPointIOS.cpp:
1905         * SourcesCocoa.txt:
1906         * UIProcess/API/APIContentRuleListStore.cpp:
1907         * UIProcess/API/APIHitTestResult.cpp:
1908         * UIProcess/API/APINavigation.cpp:
1909         * UIProcess/API/APIOpenPanelParameters.cpp:
1910         * UIProcess/API/APIPageConfiguration.cpp:
1911         * UIProcess/API/C/WKPage.cpp:
1912         (WKPageLoadURLWithShouldOpenExternalURLsPolicy):
1913         (WKPageLoadURLWithUserData):
1914         (WKPageLoadURLRequestWithUserData):
1915         (WKPageSetPaginationMode):
1916         (WKPageGetPaginationMode):
1917         (WKPageSetPageLoaderClient):
1918         (WKPageSetPagePolicyClient):
1919         * UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
1920         * UIProcess/Cocoa/WebViewImpl.h:
1921         * UIProcess/Cocoa/WebViewImpl.mm:
1922         * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
1923         * UIProcess/WebStorage/LocalStorageDatabase.cpp:
1924         * UIProcess/ios/WKContentView.mm:
1925         (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
1926         (-[WKContentView initWithFrame:processPool:configuration:webView:]):
1927         (-[WKContentView dealloc]):
1928         (-[WKContentView page]):
1929         (-[WKContentView updateFixedClippingView:]):
1930         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
1931         (-[WKContentView _updateForScreen:]):
1932         (-[WKContentView _accessibilityRegisterUIProcessTokens]):
1933         (-[WKContentView _createDrawingAreaProxy]):
1934         (-[WKContentView _didCommitLayerTree:]):
1935         (-[WKContentView _wk_pageCountForPrintFormatter:]):
1936         * UIProcess/ios/WKContentViewInteraction.mm:
1937         (-[WKFocusedElementInfo initWithAssistedNodeInformation:isUserInitiated:userObject:]):
1938         (hasAssistedNode):
1939         (-[WKContentView setupInteraction]):
1940         (-[WKContentView positionInformation]):
1941         (-[WKContentView _webTouchEventsRecognized:]):
1942         (inflateQuad):
1943         (-[WKContentView _updateTapHighlight]):
1944         (-[WKContentView _showTapHighlight]):
1945         (-[WKContentView _requiresKeyboardWhenFirstResponder]):
1946         (-[WKContentView _displayFormNodeInputView]):
1947         (-[WKContentView inputView]):
1948         (-[WKContentView _actionForLongPressFromPositionInformation:]):
1949         (-[WKContentView currentPositionInformation]):
1950         (-[WKContentView doAfterPositionInformationUpdate:forRequest:]):
1951         (-[WKContentView _currentPositionInformationIsValidForRequest:]):
1952         (-[WKContentView _hasValidOutstandingPositionInformationRequest:]):
1953         (-[WKContentView _currentPositionInformationIsApproximatelyValidForRequest:]):
1954         (-[WKContentView gestureRecognizerShouldBegin:]):
1955         (-[WKContentView hasSelectablePositionAtPoint:]):
1956         (-[WKContentView pointIsNearMarkedText:]):
1957         (-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
1958         (-[WKContentView webSelectionRectsForSelectionRects:]):
1959         (-[WKContentView _twoFingerSingleTapGestureRecognized:]):
1960         (-[WKContentView _stylusSingleTapRecognized:]):
1961         (-[WKContentView _singleTapCommited:]):
1962         (-[WKContentView _attemptClickAtLocation:]):
1963         (-[WKContentView _positionInformationDidChange:]):
1964         (-[WKContentView requiresAccessoryView]):
1965         (-[WKContentView supportedPasteboardTypesForCurrentSelection]):
1966         (-[WKContentView _lookupForWebView:]):
1967         (-[WKContentView _shareForWebView:]):
1968         (-[WKContentView textStylingAtPosition:inDirection:]):
1969         (-[WKContentView canPerformActionForWebView:withSender:]):
1970         (-[WKContentView selectForWebView:]):
1971         (-[WKContentView _accessibilityRetrieveRectsEnclosingSelectionOffset:withGranularity:]):
1972         (-[WKContentView _accessibilityRetrieveRectsAtSelectionOffset:withText:completionHandler:]):
1973         (toGestureType):
1974         (toUIWKGestureType):
1975         (toSelectionTouch):
1976         (toUIWKSelectionTouch):
1977         (toGestureRecognizerState):
1978         (toUIGestureRecognizerState):
1979         (toUIWKSelectionFlags):
1980         (toWKTextGranularity):
1981         (toWKSelectionDirection):
1982         (selectionChangedWithGesture):
1983         (selectionChangedWithTouch):
1984         (-[WKContentView changeSelectionWithGestureAt:withGesture:withState:withFlags:]):
1985         (-[WKContentView autocorrectionData]):
1986         (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
1987         (-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
1988         (-[WKContentView _updateAccessory]):
1989         (-[WKContentView selectedTextRange]):
1990         (-[WKContentView setMarkedText:selectedRange:]):
1991         (coreWritingDirection):
1992         (-[WKContentView closestPositionToPoint:]):
1993         (-[WKContentView insertText:]):
1994         (-[WKContentView textInputTraits]):
1995         (-[WKContentView handleKeyWebEvent:]):
1996         (-[WKContentView handleKeyWebEvent:withCompletionHandler:]):
1997         (-[WKContentView isScrollableForKeyboardScrollViewAnimator:]):
1998         (-[WKContentView keyboardScrollViewAnimator:distanceForIncrement:]):
1999         (-[WKContentView assistedNodeInformation]):
2000         (-[WKContentView assistedNodeSelectOptions]):
2001         (isAssistableInputType):
2002         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
2003         (-[WKContentView _stopAssistingNode]):
2004         (-[WKContentView updateCurrentAssistedNodeInformation:]):
2005         (-[WKContentView presentViewControllerForCurrentAssistedNode]):
2006         (-[WKContentView actionNameForFocusedFormControlView:]):
2007         (-[WKContentView selectWordForReplacement]):
2008         (-[WKContentView _updateChangedSelection:]):
2009         (-[WKContentView _beginSuppressingSelectionAssistantForReason:]):
2010         (-[WKContentView _stopSuppressingSelectionAssistantForReason:]):
2011         (-[WKContentView _showPlaybackTargetPicker:fromRect:routeSharingPolicy:routingContextUID:]):
2012         (-[WKContentView _showRunOpenPanel:resultListener:]):
2013         (-[WKContentView _showShareSheet:completionHandler:]):
2014         (-[WKContentView positionInformationForActionSheetAssistant:]):
2015         (-[WKContentView updatePositionInformationForActionSheetAssistant:]):
2016         (-[WKContentView _startDrag:item:]):
2017         (-[WKContentView _didHandleAdditionalDragItemsRequest:]):
2018         (-[WKContentView _didHandleStartDataInteractionRequest:]):
2019         (dropOperationForWebCoreDragOperation):
2020         (-[WKContentView dragDataForDropSession:dragDestinationAction:]):
2021         (-[WKContentView _didConcludeEditDataInteraction:]):
2022         (-[WKContentView _didPerformDragOperation:]):
2023         (-[WKContentView _prepareToDragPromisedAttachment:]):
2024         (-[WKContentView _itemsForBeginningOrAddingToSessionWithRegistrationList:stagedDragSource:]):
2025         (-[WKContentView _autofillContext]):
2026         (-[WKContentView _dragInteraction:itemsForAddingToSession:withTouchAtPoint:completion:]):
2027         (-[WKContentView _dragInteraction:prepareForSession:completion:]):
2028         (-[WKContentView dragInteraction:itemsForBeginningSession:]):
2029         (-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
2030         (-[WKContentView dragInteraction:session:didEndWithOperation:]):
2031         (-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
2032         (-[WKContentView dropInteraction:performDrop:]):
2033         (-[WKContentView dropInteraction:sessionDidEnd:]):
2034         (-[WKContentView allowsLanguageSelectionMenuForListViewController:]):
2035         (-[WKContentView shouldDisplayInputContextViewForListViewController:]):
2036         (-[WKContentView numericInputModeForListViewController:]):
2037         (-[WKContentView textContentTypeForListViewController:]):
2038         (-[WKContentView allowsDictationInputForListViewController:]):
2039         (-[WKContentView _simulateLongPressActionAtLocation:]):
2040         (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
2041         (-[WKContentView _presentationRectsForPreviewItemController:]):
2042         * UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
2043         (WKFullScreenViewControllerPlaybackSessionModelClient::setInterface):
2044         (WKFullScreenViewControllerVideoFullscreenModelClient::setInterface):
2045         (WKFullScreenViewControllerVideoFullscreenModelClient::interface const):
2046         (-[WKFullScreenViewController videoControlsManagerDidChange]):
2047         (-[WKFullScreenViewController _manager]):
2048         (-[WKFullScreenViewController _togglePiPAction:]):
2049         * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
2050         (-[WKFullscreenAnimationController configureInitialAndFinalStatesForTransition:]):
2051         (-[WKFullScreenWindowController isFullScreen]):
2052         (-[WKFullScreenWindowController enterFullScreen]):
2053         (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
2054         (-[WKFullScreenWindowController exitFullScreen]):
2055         (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
2056         (-[WKFullScreenWindowController _completedExitFullScreen]):
2057         (-[WKFullScreenWindowController webViewDidRemoveFromSuperviewWhileInFullscreen]):
2058         (-[WKFullScreenWindowController _exitFullscreenImmediately]):
2059         (-[WKFullScreenWindowController _manager]):
2060         * UIProcess/mac/WebPageProxyMac.mm:
2061         * WebKit.xcodeproj/project.pbxproj:
2062         * WebProcess/Cache/WebCacheStorageConnection.cpp:
2063         * WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:
2064         (mediaTimeToCurrentTime):
2065         (-[WKAnimationDelegate initWithLayerID:layerTreeHost:]):
2066         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
2067         (-[WKAccessibilityWebPageObjectBase accessibilityRootObjectWrapper]):
2068
2069 2018-12-10  Tim Horton  <timothy_horton@apple.com>
2070
2071         WKWebView should support custom tintColor
2072         https://bugs.webkit.org/show_bug.cgi?id=192518
2073         <rdar://problem/37243261>
2074
2075         Reviewed by Wenson Hsieh.
2076
2077         * Platform/spi/ios/UIKitSPI.h:
2078         * UIProcess/ios/WKContentViewInteraction.mm:
2079         (-[WKContentView insertionPointColor]):
2080         (-[WKContentView selectionBarColor]):
2081         (-[WKContentView selectionHighlightColor]):
2082         Grab insertion point and selection colors from UITextInputTraits.
2083
2084         (-[WKContentView _updateInteractionTintColor]):
2085         Determine our effective tint color:
2086             - transparent if interaction is disabled
2087             - a CSS-derived color if caret-color style is applied
2088             - the _inheritedInteractionTintColor, which climbs up to the tintColor API
2089         Apply it to our UITextInputTraits.
2090
2091         (-[WKContentView tintColorDidChange]):
2092         (-[WKContentView textInputTraits]):
2093         Call _updateInteractionTintColor whenever we create a new UITextInputTraits
2094         or when the tint color changes.
2095
2096 2018-12-09  Youenn Fablet  <youenn@apple.com>
2097
2098         Move capture manager from RealtimeMediaSourceCenter to capture factory
2099         https://bugs.webkit.org/show_bug.cgi?id=192542
2100
2101         Reviewed by Eric Carlson.
2102
2103         Make sure to unregister for video capture as done for other capture types.
2104         Implement manager which should be doing nothing as the manager is used for enumeration of devices
2105         which should only happen in UIProcess.
2106
2107         Given that mock capture is interfering with UserMediaCaptureManager,
2108         switching on/off mock capture will require creating a new process.
2109         This shortcoming should be fixed once mock capture will be fully happening in
2110         the same process as regular capture.
2111
2112         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
2113         (WebKit::UserMediaCaptureManager::~UserMediaCaptureManager):
2114         * WebProcess/cocoa/UserMediaCaptureManager.h:
2115
2116 2018-12-09  Saam barati  <sbarati@apple.com>
2117
2118         Enable HTTP and HTTPS proxies on iOS and make it a property of the NSURLSession
2119         https://bugs.webkit.org/show_bug.cgi?id=192374
2120         <rdar://problem/46506286>
2121
2122         Reviewed by Alex Christensen.
2123
2124         This patch makes it so that we can use HTTP/HTTPS proxies on iOS as well.
2125         To enable on iOS, you can do something like:
2126         $ defaults write -g WebKit2HTTPProxy -string "http://localhost:8080"
2127         $ defaults write -g WebKit2HTTPSProxy -string "http://localhost:8080"
2128         
2129         This patch also changes the Proxy to be enabled on a per NSURLSession
2130         basis instead of a per process basis.
2131
2132         * NetworkProcess/NetworkProcess.cpp:
2133         (WebKit::NetworkProcess::initializeNetworkProcess):
2134         * NetworkProcess/NetworkSessionCreationParameters.cpp:
2135         (WebKit::NetworkSessionCreationParameters::privateSessionParameters):
2136         (WebKit::NetworkSessionCreationParameters::encode const):
2137         (WebKit::NetworkSessionCreationParameters::decode):
2138         * NetworkProcess/NetworkSessionCreationParameters.h:
2139         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2140         (WebKit::proxyDictionary):
2141         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
2142         * NetworkProcess/mac/NetworkProcessMac.mm:
2143         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
2144         (WebKit::overrideSystemProxies): Deleted.
2145         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2146         (-[WKWebsiteDataStore _initWithConfiguration:]):
2147         * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
2148         * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:
2149         (-[_WKWebsiteDataStoreConfiguration httpProxy]):
2150         (-[_WKWebsiteDataStoreConfiguration setHTTPProxy:]):
2151         (-[_WKWebsiteDataStoreConfiguration httpsProxy]):
2152         (-[_WKWebsiteDataStoreConfiguration setHTTPSProxy:]):
2153         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2154         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
2155         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
2156         (WebKit::WebsiteDataStore::parameters):
2157         * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:
2158         (WebKit::WebsiteDataStoreConfiguration::copy):
2159         * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:
2160         (WebKit::WebsiteDataStoreConfiguration::httpProxy const):
2161         (WebKit::WebsiteDataStoreConfiguration::setHTTPProxy):
2162         (WebKit::WebsiteDataStoreConfiguration::httpsProxy const):
2163         (WebKit::WebsiteDataStoreConfiguration::setHTTPSProxy):
2164
2165 2018-12-09  Adrian Perez de Castro  <aperez@igalia.com>
2166
2167         Build failure due to missing include of APIWebsiteDataStore.h
2168         https://bugs.webkit.org/show_bug.cgi?id=192541
2169
2170         Reviewed by Youenn Fablet.
2171
2172         * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp: Add missing
2173         include of APIWebsiteDataStore.h
2174
2175 2018-12-09  Wenson Hsieh  <wenson_hsieh@apple.com>
2176
2177         [iOS device] Crash when attempting to call -[_WKAttachment info] for an editable image
2178         https://bugs.webkit.org/show_bug.cgi?id=192538
2179
2180         Reviewed by Tim Horton.
2181
2182         Fix the crash by ensuring that the result of `-renderedDrawing` survives long enough to be wrapped by a
2183         `RetainPtr` in `-PNGRepresentation`. This isn't currently testable, since this codepath isn't supported on the
2184         iOS simulator; instead, I manually verified using MobileAttachments.app.
2185
2186         * UIProcess/ios/WKDrawingView.mm:
2187         (-[WKDrawingView renderedDrawing]):
2188
2189 2018-12-09  Commit Queue  <commit-queue@webkit.org>
2190
2191         Unreviewed, rolling out r239010.
2192         https://bugs.webkit.org/show_bug.cgi?id=192537
2193
2194         Breaks fast/visual-viewport/tiled-drawing/zoomed-fixed-
2195         scrolling-layers-state.html again (Requested by ap on
2196         #webkit).
2197
2198         Reverted changeset:
2199
2200         "Allow control over child order when adding nodes to the
2201         scrolling tree"
2202         https://bugs.webkit.org/show_bug.cgi?id=176914
2203         https://trac.webkit.org/changeset/239010
2204
2205 2018-12-08  Alex Christensen  <achristensen@webkit.org>
2206
2207         Don't programmatically capitalize safe browsing warning buttons
2208         https://bugs.webkit.org/show_bug.cgi?id=192531
2209         <rdar://problem/46417791>
2210
2211         Reviewed by Darin Adler.
2212
2213         * UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
2214         (makeButton):
2215
2216 2018-12-08  Alex Christensen  <achristensen@webkit.org>
2217
2218         Safe browsing warning should respect text size from settings
2219         https://bugs.webkit.org/show_bug.cgi?id=192205
2220
2221         Reviewed by Tim Horton.
2222
2223         * UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
2224         (fontWithSize):
2225         (makeButton):
2226         (-[WKSafeBrowsingWarning addContent]):
2227         (-[WKSafeBrowsingWarning showDetailsClicked]):
2228
2229 2018-12-08  Frederic Wang  <fwang@igalia.com>
2230
2231         Allow control over child order when adding nodes to the scrolling tree
2232         https://bugs.webkit.org/show_bug.cgi?id=176914
2233         <rdar://problem/46542237>
2234
2235         Reviewed by Simon Fraser.
2236
2237         Based on an earlier patch by Simon Fraser.
2238
2239         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
2240         (WebKit::RemoteScrollingCoordinatorTransaction::decode):
2241
2242 2018-12-07  Rob Buis  <rbuis@igalia.com>
2243
2244         Remove unused API in NetworkProcess
2245         https://bugs.webkit.org/show_bug.cgi?id=192415
2246
2247         Reviewed by Alex Christensen.
2248
2249         This patch removed some unused API and headers in NetworkProcess.
2250
2251         * NetworkProcess/NetworkCORSPreflightChecker.cpp:
2252         (WebKit::NetworkCORSPreflightChecker::startPreflight):
2253         * NetworkProcess/NetworkCORSPreflightChecker.h:
2254         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2255         * NetworkProcess/NetworkConnectionToWebProcess.h:
2256         * NetworkProcess/NetworkContentRuleListManager.h:
2257         * NetworkProcess/NetworkDataTask.cpp:
2258         * NetworkProcess/NetworkDataTask.h:
2259         * NetworkProcess/NetworkDataTaskBlob.cpp:
2260         * NetworkProcess/NetworkLoad.cpp:
2261         * NetworkProcess/NetworkLoad.h:
2262         * NetworkProcess/NetworkLoadChecker.cpp:
2263         * NetworkProcess/NetworkLoadChecker.h:
2264         * NetworkProcess/NetworkLoadClient.h:
2265         * NetworkProcess/NetworkLoadParameters.h:
2266         * NetworkProcess/NetworkProcess.cpp:
2267         * NetworkProcess/NetworkProcess.h:
2268         * NetworkProcess/NetworkProcessCreationParameters.h:
2269         * NetworkProcess/NetworkResourceLoadParameters.cpp:
2270         (WebKit::NetworkResourceLoadParameters::encode const):
2271         (WebKit::NetworkResourceLoadParameters::decode):
2272         * NetworkProcess/NetworkResourceLoadParameters.h:
2273         * NetworkProcess/NetworkResourceLoader.cpp:
2274         (WebKit::NetworkResourceLoader::didReceiveBuffer):
2275         * NetworkProcess/NetworkResourceLoader.h:
2276         * NetworkProcess/NetworkSession.cpp:
2277         * NetworkProcess/NetworkSession.h:
2278         * NetworkProcess/NetworkSocketStream.cpp:
2279         * NetworkProcess/NetworkSocketStream.h:
2280         * NetworkProcess/PingLoad.cpp:
2281         (WebKit::PingLoad::PingLoad):
2282         * NetworkProcess/PingLoad.h:
2283         * NetworkProcess/PreconnectTask.cpp:
2284         (WebKit::PreconnectTask::PreconnectTask):
2285         (WebKit::PreconnectTask::frameID const): Deleted.
2286         (WebKit::PreconnectTask::pageID const): Deleted.
2287         * NetworkProcess/PreconnectTask.h:
2288
2289 2018-12-07  Eric Carlson  <eric.carlson@apple.com>
2290
2291         [MediaStream] 'devicechange' event should not fire in frames that can't access capture devices
2292         https://bugs.webkit.org/show_bug.cgi?id=192511
2293         <rdar://problem/46562063>
2294
2295         Reviewed by Youenn Fablet.
2296
2297         * UIProcess/UserMediaPermissionCheckProxy.cpp:
2298         (WebKit::UserMediaPermissionCheckProxy::UserMediaPermissionCheckProxy): Remove userMediaID parameter.
2299         (WebKit::UserMediaPermissionCheckProxy::setUserMediaAccessInfo): ID not passed to callback.
2300         * UIProcess/UserMediaPermissionCheckProxy.h:
2301         (WebKit::UserMediaPermissionCheckProxy::create):
2302         (WebKit::UserMediaPermissionCheckProxy::completionHandler): Deleted.
2303
2304         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2305         (WebKit::generateRequestID): New.
2306         (WebKit::UserMediaPermissionRequestManagerProxy::captureDevicesChanged): Don't notify if
2307         the page does not have a granted request and does not have persistent access.
2308         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): Use generateRequestID.
2309         (WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo): Change variable name.
2310         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): Use generateRequestID.
2311         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
2312
2313 2018-12-07  Saam Barati  <sbarati@apple.com>
2314
2315         WKWebProcessPlugInLoadDelegate should have API for saying which rendering events it wants to listen for
2316         https://bugs.webkit.org/show_bug.cgi?id=192473
2317
2318         Reviewed by Andy Estes.
2319
2320         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
2321         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2322         (PageLoaderClient::layoutMilestones const):
2323
2324 2018-12-07  Youenn Fablet  <youenn@apple.com>
2325
2326         Update libwebrtc up to 0d007d7c4f
2327         https://bugs.webkit.org/show_bug.cgi?id=192316
2328
2329         Reviewed by Eric Carlson.
2330
2331         Update code base according new libwebrtc backend
2332         In particular, use directly int64_t for packet time.
2333
2334         * Configurations/WebKit.xcconfig:
2335         * NetworkProcess/webrtc/LibWebRTCSocketClient.cpp:
2336         (WebKit::LibWebRTCSocketClient::signalReadPacket):
2337         * NetworkProcess/webrtc/LibWebRTCSocketClient.h:
2338         * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
2339         * NetworkProcess/webrtc/NetworkRTCSocket.h:
2340         * WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
2341         (WebKit::LibWebRTCSocket::signalReadPacket):
2342
2343 2018-12-07  Truitt Savell  <tsavell@apple.com>
2344
2345         Unreviewed, rolling out r238947.
2346
2347         Revision caused fast/visual-viewport/tiled-drawing/zoomed-
2348         fixed-scrolling-layers-state.html to constantly fail
2349
2350         Reverted changeset:
2351
2352         "Allow control over child order when adding nodes to the
2353         scrolling tree"
2354         https://bugs.webkit.org/show_bug.cgi?id=176914
2355         https://trac.webkit.org/changeset/238947
2356
2357 2018-12-06  David Kilzer  <ddkilzer@apple.com>
2358
2359         Injected bundle for WebKitTestRunner leaks WKTypeRef objects
2360         <https://webkit.org/b/192481>
2361         <rdar://problem/46539059>
2362
2363         Reviewed by Simon Fraser.
2364
2365         Change function parameter name from `returnData[Ref]` to
2366         `returnRetainedData[Ref]` to document that the value returned is
2367         a +1 retained WKTypeRef object.
2368
2369         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
2370         (WKBundlePostSynchronousMessage):
2371         * WebProcess/InjectedBundle/API/c/WKBundle.h:
2372         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2373         (WKBundlePagePostSynchronousMessageForTesting):
2374         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2375
2376 2018-12-06  Frederic Wang  <fwang@igalia.com>
2377
2378         Allow control over child order when adding nodes to the scrolling tree
2379         https://bugs.webkit.org/show_bug.cgi?id=176914
2380
2381         Reviewed by Simon Fraser.
2382
2383         Based on an earlier patch by Simon Fraser.
2384
2385         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
2386         (WebKit::RemoteScrollingCoordinatorTransaction::decode): Make explicit that we want to append
2387         the new node at the end of child list.
2388
2389 2018-12-06  Yongjun Zhang  <yongjun_zhang@apple.com>
2390
2391         We should ignore minimumEffectiveDeviceWidth if the page specifies device-width in viewport meta-tag.
2392         https://bugs.webkit.org/show_bug.cgi?id=192377
2393         <rdar://problem/46364206>
2394
2395         Reviewed by Tim Horton.
2396
2397         Since we are using page's viewport arguments to decide the default viewport parameters and
2398         whether we can use mininum effective device width, we should always call setViewportArguments()
2399         regardless of shouldIgnoreMetaViewport settings.
2400
2401         * WebProcess/WebPage/WebPage.cpp:
2402         (WebKit::WebPage::viewportPropertiesDidChange): Always call setViewportArguments().
2403         (WebKit::WebPage::didCommitLoad): Ditto.
2404
2405 2018-12-06  Tim Horton  <timothy_horton@apple.com>
2406
2407         Web Share API: share overlay does not stick to the Safari window
2408         https://bugs.webkit.org/show_bug.cgi?id=192469
2409         <rdar://problem/46074833>
2410
2411         Reviewed by Wenson Hsieh.
2412
2413         * UIProcess/Cocoa/WKShareSheet.mm:
2414         (-[WKShareSheet sharingServicePicker:didChooseSharingService:]):
2415         (-[WKShareSheet sharingServicePicker:delegateForSharingService:]):
2416         (-[WKShareSheet sharingService:sourceWindowForShareItems:sharingContentScope:]):
2417         (-[WKShareSheet sharingService:didFailToShareItems:error:]):
2418         (-[WKShareSheet sharingService:didShareItems:]):
2419         Implement another NSSharingServicePickerDelegate method to return
2420         an *NSSharingService* delegate when needed.
2421
2422         Implement an NSSharingServiceDelegate method to return the window that
2423         the service's UI should attach to.
2424
2425         Also, instead of notifying the Web Content process when a service is picked
2426         (or not) in the NSSharingServicePicker, wait until the share has completed
2427         (or failed) to send didComplete. This both makes the return completion
2428         value more accurate (matching iOS, if you cancel the share during the
2429         recipient choice step, it will now fail), and avoids explicitly tearing
2430         down the NSSharingServicePicker too early, which breaks the UI attaching mechanism.
2431
2432 2018-12-06  Wenson Hsieh  <wenson_hsieh@apple.com>
2433
2434         [iOS] WKWebView should match UITextView behavior when editing text with an RTL keyboard
2435         https://bugs.webkit.org/show_bug.cgi?id=187554
2436         <rdar://problem/42075638>
2437
2438         Reviewed by Tim Horton.
2439
2440         Add support for automatically switching the base writing direction to the default writing direction with respect
2441         to the current keyboard in an editable WKWebView by implementing `-setBaseWritingDirection:forRange:`. On iOS 12
2442         and earlier, UIKit invokes this protocol method whenever the keyboard is changed to one with a different writing
2443         direction, although in some other versions of iOS, this only happens when first focusing an editable area.
2444
2445         Test: editing/input/ios/rtl-keyboard-input-on-focus.html
2446
2447         * Platform/spi/ios/UIKitSPI.h:
2448
2449         Declare UIKeyboardImpl IPI methods mostly for use in WebKitTestRunner (with the exception of
2450         `-setInitialDirection`, which we may invoke when we receive the first post-layout EditorState update after
2451         focusing an editable element).
2452
2453         * UIProcess/PageClient.h:
2454         * UIProcess/WebPageProxy.cpp:
2455         (WebKit::WebPageProxy::increaseListLevel):
2456         (WebKit::WebPageProxy::decreaseListLevel):
2457         (WebKit::WebPageProxy::changeListType):
2458         (WebKit::WebPageProxy::setBaseWritingDirection):
2459
2460         Drive-by style fixes: make these bail and return early if `!isValid()`.
2461
2462         (WebKit::WebPageProxy::resetStateAfterProcessExited):
2463
2464         Reset assisted node state in the UI process upon web process termination.
2465
2466         * UIProcess/WebPageProxy.h:
2467
2468         Add plumbing for `setBaseWritingDirection`, from `WebPageProxy` to `WebPage` to `Editor`.
2469
2470         * UIProcess/ios/PageClientImplIOS.h:
2471         * UIProcess/ios/PageClientImplIOS.mm:
2472         (WebKit::PageClientImpl::didReceiveEditorStateUpdateAfterFocus):
2473         * UIProcess/ios/WKContentViewInteraction.h:
2474         * UIProcess/ios/WKContentViewInteraction.mm:
2475         (-[WKContentView baseWritingDirectionForPosition:inDirection:]):
2476         (coreWritingDirection):
2477         (-[WKContentView setBaseWritingDirection:forRange:]):
2478
2479         Support `-setBaseWritingDirectionForPosition:forRange:`, but only in the case where the given range is the
2480         selected range. This is all that's currently needed to fulfill the requirements in <rdar://problem/42075638>,
2481         though we could potentially add full support for this in the future by mapping the given text range to a DOM
2482         range and moving the selection prior to setting the base writing direction.
2483
2484         (-[WKContentView _didReceiveEditorStateUpdateAfterFocus]):
2485
2486         Add a hook to notify WKContentView when the first post-layout EditorState has been received in the UI process.
2487         When this is invoked, if the web view is editable and the selection is not a range, we call into `UIKeyboardImpl`
2488         to change the initial writing direction if necessary.
2489
2490         * UIProcess/ios/WebPageProxyIOS.mm:
2491         (WebKit::WebPageProxy::startAssistingNode):
2492         (WebKit::WebPageProxy::stopAssistingNode):
2493         (WebKit::WebPageProxy::editorStateChanged):
2494         * WebProcess/WebPage/WebPage.cpp:
2495         (WebKit::WebPage::setBaseWritingDirection):
2496         * WebProcess/WebPage/WebPage.h:
2497         * WebProcess/WebPage/WebPage.messages.in:
2498
2499 2018-12-06  David Quesada  <david_quesada@apple.com>
2500
2501         -[WKProcessPool _resumeDownloadFromData:path:] should allow specifying the originating web view
2502         https://bugs.webkit.org/show_bug.cgi?id=192411
2503         rdar://problem/46492487
2504
2505         Reviewed by Alex Christensen.
2506
2507         * UIProcess/API/C/WKContext.cpp:
2508         (WKContextResumeDownload):
2509         * UIProcess/API/Cocoa/WKProcessPool.mm:
2510         (-[WKProcessPool _resumeDownloadFromData:path:originatingWebView:]):
2511         (-[WKProcessPool _resumeDownloadFromData:path:]): Deleted.
2512         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2513         * UIProcess/WebProcessPool.cpp:
2514         (WebKit::WebProcessPool::resumeDownload):
2515          - Set the originating page of the DownloadProxy.
2516          - If the originating page is non-null, use its session ID for the download.
2517          - Remove a FIXME. It's possible to do this now by providing the web view whose session
2518            should be used for the download.
2519         * UIProcess/WebProcessPool.h:
2520
2521 2018-12-06  Jiewen Tan  <jiewen_tan@apple.com>
2522
2523         Unreviewed, a quick fix after r238919
2524
2525         Add an early return such that the error message is actually meaningful.
2526
2527         * UIProcess/WebAuthentication/Mock/MockHidService.cpp:
2528         (WebKit::MockHidService::platformStartDiscovery):
2529
2530 2018-12-06  Alex Christensen  <achristensen@webkit.org>
2531
2532         Remove unused LoaderStrategy::storeDerivedDataToCache and associated dead code
2533         https://bugs.webkit.org/show_bug.cgi?id=192452
2534
2535         Reviewed by Anders Carlsson.
2536
2537         This was introduced in r210835 but never used.
2538         It's preventing me from making the disk cache associated with a SessionID/NetworkSession.
2539
2540         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2541         (WebKit::NetworkConnectionToWebProcess::storeDerivedDataToCache): Deleted.
2542         * NetworkProcess/NetworkConnectionToWebProcess.h:
2543         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
2544         * NetworkProcess/NetworkResourceLoadParameters.cpp:
2545         (WebKit::NetworkResourceLoadParameters::encode const):
2546         (WebKit::NetworkResourceLoadParameters::decode):
2547         * NetworkProcess/NetworkResourceLoadParameters.h:
2548         * NetworkProcess/NetworkResourceLoader.cpp:
2549         (WebKit::NetworkResourceLoader::continueDidReceiveResponse):
2550         (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
2551         (WebKit::NetworkResourceLoader::continueProcessingCachedEntryAfterDidReceiveResponse): Deleted.
2552         * NetworkProcess/NetworkResourceLoader.h:
2553         * WebProcess/Network/WebLoaderStrategy.cpp:
2554         (WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
2555         (WebKit::WebLoaderStrategy::storeDerivedDataToCache): Deleted.
2556         * WebProcess/Network/WebLoaderStrategy.h:
2557         * WebProcess/Network/WebResourceLoader.cpp:
2558         (WebKit::WebResourceLoader::didRetrieveDerivedData): Deleted.
2559         * WebProcess/Network/WebResourceLoader.messages.in:
2560
2561 2018-12-06  Carlos Eduardo Ramalho  <cadubentzen@gmail.com>
2562
2563         REGRESSION(r231043): [GTK] Undefined references to WebCore::LayerRepresentation::* with -DENABLE_OPENGL=OFF builds
2564         https://bugs.webkit.org/show_bug.cgi?id=191997
2565
2566         Reviewed by Philippe Normand.
2567
2568         Fix build with -DENABLE_OPENGL=OFF and -DENABLE_VIDEO=OFF.
2569
2570         * Shared/WebEventConversion.cpp:
2571         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent): add required #if ENABLE(ASYNC_SCROLLING)
2572
2573 2018-12-05  Ryosuke Niwa  <rniwa@webkit.org>
2574
2575         REGRESSION(PSON): Process swapping code doesn't set DisplayID in WebContent process
2576         https://bugs.webkit.org/show_bug.cgi?id=192290
2577
2578         Reviewed by Simon Fraser.
2579
2580         Fixed the bug by updating the DisplayID upon attaching to a WebContent process
2581         after a process swap as well as after the previous WebContent process had crashed.
2582
2583         Unfortunately no new tests since WebKitTestRunner / DumpRenderTree should use 0 as DisplayID
2584         as they have an off-screen NSWindow. The issue that this results in no fallback for
2585         the animation timer is tracked by webkit.org/b/192448.
2586
2587         * UIProcess/Cocoa/WebViewImpl.mm:
2588         (WebKit::WebViewImpl::didRelaunchProcess):
2589
2590 2018-12-05  Youenn Fablet  <youenn@apple.com>
2591
2592         Remove a document entry from NetworkMDNSRegister::m_services when document goes away
2593         https://bugs.webkit.org/show_bug.cgi?id=192429
2594
2595         Reviewed by Eric Carlson.
2596
2597         * NetworkProcess/webrtc/NetworkMDNSRegister.cpp:
2598         (WebKit::NetworkMDNSRegister::unregisterMDNSNames):
2599         We should remove the entry to limit the size of the map.
2600
2601 2018-12-05  Jiewen Tan  <jiewen_tan@apple.com>
2602
2603         [Mac] Layout Test http/wpt/webauthn/public-key-credential-create-success-hid.https.html and http/wpt/webauthn/public-key-credential-get-success-hid.https.html are flaky
2604         https://bugs.webkit.org/show_bug.cgi?id=192061
2605
2606         Reviewed by Dewei Zhu.
2607
2608         Part 1.
2609
2610         Add some loggings to determine possible causes for the flakiness.
2611
2612         * UIProcess/WebAuthentication/Cocoa/HidService.mm:
2613         (WebKit::HidService::continueAddDeviceAfterGetInfo):
2614         * UIProcess/WebAuthentication/Mock/MockHidService.cpp:
2615         (WebKit::MockHidService::platformStartDiscovery):
2616
2617 2018-12-05  Chris Dumez  <cdumez@apple.com>
2618
2619         Simplify logic inside WebPageProxy::continueNavigationInNewProcess()
2620         https://bugs.webkit.org/show_bug.cgi?id=192404
2621
2622         Reviewed by Alex Christensen.
2623
2624         Simplify get the item state from the current back/forward list item, instead of
2625         relying on WebBackForwardList::filteredItemStates().
2626
2627         * UIProcess/WebPageProxy.cpp:
2628         (WebKit::WebPageProxy::continueNavigationInNewProcess):
2629
2630 2018-12-05  Youenn Fablet  <youenn@apple.com>
2631
2632         Enable the possibility to do video capture in UIProcess
2633         https://bugs.webkit.org/show_bug.cgi?id=192394
2634
2635         Reviewed by Eric Carlson.
2636
2637         Add two web preferences to toggle audio/video capture in UIProcess or WebProcess.
2638         Add mechanism for video capture that was not implemented yet.
2639
2640         * Shared/WebPreferences.yaml:
2641         * Shared/WebPreferencesDefaultValues.h:
2642         * Shared/WebProcessCreationParameters.cpp:
2643         (WebKit::WebProcessCreationParameters::encode const):
2644         (WebKit::WebProcessCreationParameters::decode):
2645         * Shared/WebProcessCreationParameters.h:
2646         * UIProcess/API/APIProcessPoolConfiguration.h:
2647         * UIProcess/API/C/WKPreferences.cpp:
2648         (WKPreferencesSetCaptureAudioInUIProcessEnabled):
2649         (WKPreferencesGetCaptureAudioInUIProcessEnabled):
2650         (WKPreferencesSetCaptureVideoInUIProcessEnabled):
2651         (WKPreferencesGetCaptureVideoInUIProcessEnabled):
2652         * UIProcess/API/C/WKPreferencesRef.h:
2653         * UIProcess/WebPreferences.cpp:
2654         (WebKit::WebPreferences::updateBoolValueForInternalDebugFeatureKey):
2655         * UIProcess/WebProcessPool.cpp:
2656         (WebKit::WebProcessPool::initializeNewWebProcess):
2657         (WebKit::WebProcessPool::createWebPage):
2658         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
2659         (WebKit::UserMediaCaptureManager::initialize):
2660
2661 2018-12-05  Alex Christensen  <achristensen@webkit.org>
2662
2663         Make WebsiteDataStoreConfiguration a proper API object
2664         https://bugs.webkit.org/show_bug.cgi?id=192380
2665
2666         Reviewed by Youenn Fablet.
2667
2668         In the immediate future I'll need to add things to _WKWebsiteDataStoreConfiguration.
2669         Instead of making ivars, setting them, copying them to a local object, make this a wrapper of an API::Object
2670         like all our other ObjC API objects are.
2671
2672         * Shared/API/APIObject.h:
2673         (API::Object::wrapper const):
2674         (API::Object::wrapper): Deleted.
2675         * Shared/Cocoa/APIObject.mm:
2676         (API::Object::ref const):
2677         (API::Object::deref const):
2678         (API::Object::newObject):
2679         (API::Object::ref): Deleted.
2680         (API::Object::deref): Deleted.
2681         * Sources.txt:
2682         * UIProcess/API/APIProcessPoolConfiguration.cpp:
2683         (API::ProcessPoolConfiguration::createWithWebsiteDataStoreConfiguration):
2684         * UIProcess/API/APIProcessPoolConfiguration.h:
2685         * UIProcess/API/APIWebsiteDataStore.cpp:
2686         (API::WebsiteDataStore::createLegacy):
2687         (API::WebsiteDataStore::WebsiteDataStore):
2688         (API::WebsiteDataStore::legacyDefaultDataStoreConfiguration):
2689         * UIProcess/API/APIWebsiteDataStore.h:
2690         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
2691         (API::WebsiteDataStore::defaultDataStoreConfiguration):
2692         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2693         (-[WKWebsiteDataStore _initWithConfiguration:]):
2694         * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:
2695         (-[_WKWebsiteDataStoreConfiguration _webStorageDirectory]):
2696         (-[_WKWebsiteDataStoreConfiguration _setWebStorageDirectory:]):
2697         (-[_WKWebsiteDataStoreConfiguration _indexedDBDatabaseDirectory]):
2698         (-[_WKWebsiteDataStoreConfiguration _setIndexedDBDatabaseDirectory:]):
2699         (-[_WKWebsiteDataStoreConfiguration _webSQLDatabaseDirectory]):
2700         (-[_WKWebsiteDataStoreConfiguration _setWebSQLDatabaseDirectory:]):
2701         (-[_WKWebsiteDataStoreConfiguration _cookieStorageFile]):
2702         (-[_WKWebsiteDataStoreConfiguration _setCookieStorageFile:]):
2703         (-[_WKWebsiteDataStoreConfiguration _resourceLoadStatisticsDirectory]):
2704         (-[_WKWebsiteDataStoreConfiguration _setResourceLoadStatisticsDirectory:]):
2705         (-[_WKWebsiteDataStoreConfiguration _cacheStorageDirectory]):
2706         (-[_WKWebsiteDataStoreConfiguration _setCacheStorageDirectory:]):
2707         (-[_WKWebsiteDataStoreConfiguration _serviceWorkerRegistrationDirectory]):
2708         (-[_WKWebsiteDataStoreConfiguration _setServiceWorkerRegistrationDirectory:]):
2709         (-[_WKWebsiteDataStoreConfiguration setSourceApplicationBundleIdentifier:]):
2710         (-[_WKWebsiteDataStoreConfiguration sourceApplicationBundleIdentifier]):
2711         (-[_WKWebsiteDataStoreConfiguration sourceApplicationSecondaryIdentifier]):
2712         (-[_WKWebsiteDataStoreConfiguration setSourceApplicationSecondaryIdentifier:]):
2713         (-[_WKWebsiteDataStoreConfiguration _apiObject]):
2714         * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfigurationInternal.h: Added.
2715         * UIProcess/Network/NetworkProcessProxy.cpp:
2716         (WebKit::NetworkProcessProxy::retrieveCacheStorageParameters):
2717         * UIProcess/WebProcessPool.cpp:
2718         (WebKit::legacyWebsiteDataStoreConfiguration):
2719         (WebKit::WebProcessPool::mayHaveRegisteredServiceWorkers):
2720         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
2721         (WebKit::WebsiteDataStore::parameters):
2722         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2723         (WebKit::WebsiteDataStore::create):
2724         (WebKit::WebsiteDataStore::WebsiteDataStore):
2725         (WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary):
2726         (WebKit::WebsiteDataStore::fetchDataAndApply):
2727         (WebKit::WebsiteDataStore::removeData):
2728         (WebKit::WebsiteDataStore::parameters):
2729         (WebKit::WebsiteDataStore::Configuration::Configuration): Deleted.
2730         * UIProcess/WebsiteData/WebsiteDataStore.h:
2731         (WebKit::WebsiteDataStore::cacheStoragePerOriginQuota const):
2732         (WebKit::WebsiteDataStore::setCacheStoragePerOriginQuota):
2733         (WebKit::WebsiteDataStore::cacheStorageDirectory const):
2734         (WebKit::WebsiteDataStore::setCacheStorageDirectory):
2735         (WebKit::WebsiteDataStore::serviceWorkerRegistrationDirectory const):
2736         (WebKit::WebsiteDataStore::setServiceWorkerRegistrationDirectory):
2737         (WebKit::WebsiteDataStore::resolvedApplicationCacheDirectory const):
2738         (WebKit::WebsiteDataStore::resolvedMediaCacheDirectory const):
2739         (WebKit::WebsiteDataStore::resolvedMediaKeysDirectory const):
2740         (WebKit::WebsiteDataStore::resolvedDatabaseDirectory const):
2741         (WebKit::WebsiteDataStore::resolvedJavaScriptConfigurationDirectory const):
2742         (WebKit::WebsiteDataStore::resolvedCookieStorageFile const):
2743         (WebKit::WebsiteDataStore::resolvedIndexedDatabaseDirectory const):
2744         (WebKit::WebsiteDataStore::resolvedServiceWorkerRegistrationDirectory const):
2745         (WebKit::WebsiteDataStore::resolvedResourceLoadStatisticsDirectory const):
2746         * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp: Added.
2747         (WebKit::WebsiteDataStoreConfiguration::WebsiteDataStoreConfiguration):
2748         * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h: Added.
2749         (WebKit::WebsiteDataStoreConfiguration::create):
2750         (WebKit::WebsiteDataStoreConfiguration::cacheStoragePerOriginQuota):
2751         (WebKit::WebsiteDataStoreConfiguration::setCacheStoragePerOriginQuota):
2752         (WebKit::WebsiteDataStoreConfiguration::applicationCacheDirectory const):
2753         (WebKit::WebsiteDataStoreConfiguration::setApplicationCacheDirectory):
2754         (WebKit::WebsiteDataStoreConfiguration::mediaCacheDirectory const):
2755         (WebKit::WebsiteDataStoreConfiguration::setMediaCacheDirectory):
2756         (WebKit::WebsiteDataStoreConfiguration::mediaKeysStorageDirectory const):
2757         (WebKit::WebsiteDataStoreConfiguration::setMediaKeysStorageDirectory):
2758         (WebKit::WebsiteDataStoreConfiguration::javaScriptConfigurationDirectory const):
2759         (WebKit::WebsiteDataStoreConfiguration::setJavaScriptConfigurationDirectory):
2760         (WebKit::WebsiteDataStoreConfiguration::webStorageDirectory const):
2761         (WebKit::WebsiteDataStoreConfiguration::setWebStorageDirectory):
2762         (WebKit::WebsiteDataStoreConfiguration::indexedDBDatabaseDirectory const):
2763         (WebKit::WebsiteDataStoreConfiguration::setIndexedDBDatabaseDirectory):
2764         (WebKit::WebsiteDataStoreConfiguration::webSQLDatabaseDirectory const):
2765         (WebKit::WebsiteDataStoreConfiguration::setWebSQLDatabaseDirectory):
2766         (WebKit::WebsiteDataStoreConfiguration::localStorageDirectory const):
2767         (WebKit::WebsiteDataStoreConfiguration::setLocalStorageDirectory):
2768         (WebKit::WebsiteDataStoreConfiguration::cookieStorageFile const):
2769         (WebKit::WebsiteDataStoreConfiguration::setCookieStorageFile):
2770         (WebKit::WebsiteDataStoreConfiguration::resourceLoadStatisticsDirectory const):
2771         (WebKit::WebsiteDataStoreConfiguration::setResourceLoadStatisticsDirectory):
2772         (WebKit::WebsiteDataStoreConfiguration::networkCacheDirectory const):
2773         (WebKit::WebsiteDataStoreConfiguration::setNetworkCacheDirectory):
2774         (WebKit::WebsiteDataStoreConfiguration::cacheStorageDirectory const):
2775         (WebKit::WebsiteDataStoreConfiguration::setCacheStorageDirectory):
2776         (WebKit::WebsiteDataStoreConfiguration::applicationCacheFlatFileSubdirectoryName const):
2777         (WebKit::WebsiteDataStoreConfiguration::setApplicationCacheFlatFileSubdirectoryName):
2778         (WebKit::WebsiteDataStoreConfiguration::serviceWorkerRegistrationDirectory const):
2779         (WebKit::WebsiteDataStoreConfiguration::setServiceWorkerRegistrationDirectory):
2780         (WebKit::WebsiteDataStoreConfiguration::sourceApplicationBundleIdentifier const):
2781         (WebKit::WebsiteDataStoreConfiguration::setSourceApplicationBundleIdentifier):
2782         (WebKit::WebsiteDataStoreConfiguration::sourceApplicationSecondaryIdentifier const):
2783         (WebKit::WebsiteDataStoreConfiguration::setSourceApplicationSecondaryIdentifier):
2784         * WebKit.xcodeproj/project.pbxproj:
2785
2786 2018-12-05  Wenson Hsieh  <wenson_hsieh@apple.com>
2787
2788         Turn WritingDirection into an enum class
2789         https://bugs.webkit.org/show_bug.cgi?id=192401
2790         Work towards <rdar://problem/42075638>
2791
2792         Reviewed by Dan Bernstein.
2793
2794         Change WritingDirection from an enum to an enum class. No change in behavior.
2795
2796         * WebProcess/WebPage/WebFrame.cpp:
2797         (WebKit::WebFrame::setTextDirection):
2798
2799 2018-12-05  Rob Buis  <rbuis@igalia.com>
2800
2801         [Mac] HEAD requests changed to GET after 301, 302, and 303 redirections (http/tests/xmlhttprequest/head-redirection.html)
2802         https://bugs.webkit.org/show_bug.cgi?id=114965
2803
2804         Reviewed by Frédéric Wang.
2805
2806         HEAD requests should not be changed to GET after 303 redirects, see [1].
2807         This was fixed earlier for GTK [2].
2808
2809         Behavior matches Firefox and Chrome.
2810
2811         [1] http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21#section-7.4
2812         [2] https://bugs.webkit.org/show_bug.cgi?id=110127
2813
2814         Tests: web-platform-tests/fetch/api/redirect/redirect-method.html
2815                web-platform-tests/fetch/api/redirect/redirect-method-worker.html
2816                http/tests/xmlhttprequest/head-redirection.html
2817
2818         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
2819         (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
2820
2821 2018-12-04  Fujii Hironori  <Hironori.Fujii@sony.com>
2822
2823         Remove using namespace WebCore and WebKit under WebKit/Shared/API
2824         https://bugs.webkit.org/show_bug.cgi?id=192352
2825
2826         Reviewed by Alex Christensen.
2827
2828         Removed using namespace statements, and use namespace prefix
2829         instead.
2830
2831         * Shared/API/APIURLRequest.cpp:
2832         * Shared/API/APIURLResponse.cpp:
2833         * Shared/API/c/WKArray.cpp:
2834         * Shared/API/c/WKCertificateInfo.cpp:
2835         * Shared/API/c/WKConnectionRef.cpp:
2836         * Shared/API/c/WKContextMenuItem.cpp:
2837         * Shared/API/c/WKData.cpp:
2838         * Shared/API/c/WKDictionary.cpp:
2839         * Shared/API/c/WKErrorRef.cpp:
2840         * Shared/API/c/WKGeometry.cpp:
2841         * Shared/API/c/WKImage.cpp:
2842         * Shared/API/c/WKMutableArray.cpp:
2843         * Shared/API/c/WKMutableDictionary.cpp:
2844         * Shared/API/c/WKNumber.cpp:
2845         * Shared/API/c/WKPluginInformation.cpp:
2846         * Shared/API/c/WKRenderLayer.cpp:
2847         * Shared/API/c/WKRenderObject.cpp:
2848         * Shared/API/c/WKSecurityOriginRef.cpp:
2849         * Shared/API/c/WKSerializedScriptValue.cpp:
2850         * Shared/API/c/WKString.cpp:
2851         * Shared/API/c/WKType.cpp:
2852         * Shared/API/c/WKURL.cpp:
2853         * Shared/API/c/WKURLRequest.cpp:
2854         * Shared/API/c/WKURLResponse.cpp:
2855         * Shared/API/c/WKUserContentURLPattern.cpp:
2856         * Shared/API/c/cairo/WKImageCairo.cpp:
2857         * Shared/API/c/curl/WKCertificateInfoCurl.cpp:
2858
2859 2018-12-04  Alex Christensen  <achristensen@webkit.org>
2860
2861         Remove source application identifiers from NetworkProcessCreationParameters
2862         https://bugs.webkit.org/show_bug.cgi?id=192372
2863
2864         Reviewed by Brady Eidson.
2865
2866         The _WKWebProcessPoolConfiguration way of setting these was deprecated in http://trac.webkit.org/r235127
2867         The replacement was adopted in <rdar://problem/46359330>
2868         The transition process is done!  Time to remove the old code.
2869
2870         * NetworkProcess/NetworkProcessCreationParameters.cpp:
2871         (WebKit::NetworkProcessCreationParameters::encode const):
2872         (WebKit::NetworkProcessCreationParameters::decode):
2873         * NetworkProcess/NetworkProcessCreationParameters.h:
2874         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2875         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
2876         * NetworkProcess/cocoa/NetworkSessionCocoa.h:
2877         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2878         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
2879         (WebKit::globalSourceApplicationAuditTokenData): Deleted.
2880         (WebKit::globalSourceApplicationBundleIdentifier): Deleted.
2881         (WebKit::globalSourceApplicationSecondaryIdentifier): Deleted.
2882         (WebKit::NetworkSessionCocoa::setSourceApplicationAuditTokenData): Deleted.
2883         (WebKit::NetworkSessionCocoa::setSourceApplicationBundleIdentifier): Deleted.
2884         (WebKit::NetworkSessionCocoa::setSourceApplicationSecondaryIdentifier): Deleted.
2885         * UIProcess/API/APIProcessPoolConfiguration.cpp:
2886         (API::ProcessPoolConfiguration::copy):
2887         * UIProcess/API/APIProcessPoolConfiguration.h:
2888         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
2889         (-[_WKProcessPoolConfiguration sourceApplicationBundleIdentifier]):
2890         (-[_WKProcessPoolConfiguration setSourceApplicationBundleIdentifier:]):
2891         (-[_WKProcessPoolConfiguration sourceApplicationSecondaryIdentifier]):
2892         (-[_WKProcessPoolConfiguration setSourceApplicationSecondaryIdentifier:]):
2893         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
2894         (WebKit::WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard):
2895         (WebKit::toPKPaymentRequest):
2896         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2897         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
2898         * UIProcess/WebsiteData/WebsiteDataStore.h:
2899         (WebKit::WebsiteDataStore::configuration):
2900
2901 2018-12-04  Youenn Fablet  <youenn@apple.com>
2902
2903         Calling getUserMedia in a link that was opened with target="_blank" does not work the second time
2904         https://bugs.webkit.org/show_bug.cgi?id=188088
2905         <rdar://problem/42681448>
2906
2907         Reviewed by Eric Carlson.
2908
2909         On closing a page, we need to make sure to consider that the capture is ended,
2910         as otherwise WebPageProxy will not get noticed from WebPage, since WebPageProxy is no longer an IPC receiver.
2911
2912         * UIProcess/UserMediaProcessManager.cpp:
2913         (WebKit::UserMediaProcessManager::endedCaptureSession):
2914         * UIProcess/WebPageProxy.cpp:
2915         (WebKit::WebPageProxy::close):
2916
2917 2018-12-04  Chris Dumez  <cdumez@apple.com>
2918
2919         Regression(r238817) PSON Page Cache API tests are failing
2920         https://bugs.webkit.org/show_bug.cgi?id=192348
2921
2922         Reviewed by Alex Christensen.
2923
2924         Before suspending a WebProcess on iOS, we normally fake a memory pressure signal
2925         so that the suspended process uses as little memory as possible while suspended.
2926         Among other things, this will clear the page cache. This is an issue in the case
2927         of process-swap on navigation because we keep suspended web processes around to
2928         keep Page Cache functional.
2929
2930         To address the issue, when a WebProcess is about to get suspended, we check if
2931         the process has any suspended WebPage (WebPage used for PSON PageCache support)
2932         and we bypass the PageCache clearing if it does.
2933
2934         Our API tests did not catch this before r238817 because the NavigationState's
2935         assertion was preventing the old WebProcesses from suspending for 3 seconds,
2936         which was enough for those tests to complete.
2937
2938         * UIProcess/SuspendedPageProxy.cpp:
2939         (WebKit::SuspendedPageProxy::SuspendedPageProxy):
2940         (WebKit::SuspendedPageProxy::didFinishLoad):
2941         * UIProcess/SuspendedPageProxy.h:
2942         Take a background assertion until the suspension load is complete, to make sure
2943         the suspension load has a chance to complete before the process gets suspended.
2944
2945         * WebProcess/WebProcess.cpp:
2946         (WebKit::WebProcess::initializeWebProcess):
2947         (WebKit::WebProcess::hasPageRequiringPageCacheWhileSuspended const):
2948         (WebKit::WebProcess::actualPrepareToSuspend):
2949         * WebProcess/WebProcess.h:
2950
2951 2018-12-04  Youenn Fablet  <youenn@apple.com>
2952
2953         Device orientation may be wrong on page reload after crash
2954         https://bugs.webkit.org/show_bug.cgi?id=192349
2955         <rdar://problem/46359466>
2956
2957         Reviewed by Eric Carlson.
2958
2959         On page crash, the process is relaunched and the page is reloaded.
2960         At that point, the orientation information of the page is not reset until the next device orientation change.
2961         To fix that, add the device orientation to the page creation parameters so that we pass it everytime we create a page.
2962         Covered by manual testing.
2963
2964         * Shared/WebPageCreationParameters.cpp:
2965         (WebKit::WebPageCreationParameters::encode const):
2966         (WebKit::WebPageCreationParameters::decode):
2967         * Shared/WebPageCreationParameters.h:
2968         * UIProcess/WebPageProxy.cpp:
2969         (WebKit::WebPageProxy::creationParameters):
2970         * WebProcess/WebPage/WebPage.cpp:
2971
2972 2018-12-04  Carlos Eduardo Ramalho  <cadubentzen@gmail.com>
2973
2974         [WPE] Add gtk-doc
2975         https://bugs.webkit.org/show_bug.cgi?id=178900
2976
2977         Reviewed by Michael Catanzaro.
2978
2979         Add gtk-doc to WPE port. This patch tries to reuse as much code from
2980         WebKitGTK+ as possible.
2981
2982         * PlatformWPE.cmake: Write variables to gtkdoc-wpe.cfg and gtkdoc-webextensions that is used by python script later.
2983         * UIProcess/API/wpe/WebKitWebContext.h: Placed sandbox functions in the same location as in the WebKitGTK+ for consistency.
2984         * UIProcess/API/wpe/docs/wpe-0.1-sections.txt: Added.
2985         * UIProcess/API/wpe/docs/wpe-docs.sgml: Added.
2986         * WebProcess/InjectedBundle/API/wpe/WebKitWebPage.h: Placed webkit_web_page_get_dom_document
2987         in the same position as in the WebKitGTK+ for consistency.
2988         * WebProcess/InjectedBundle/API/wpe/docs/wpe-webextensions-0.1-sections.txt: Added.
2989         * WebProcess/InjectedBundle/API/wpe/docs/wpe-webextensions-docs.sgml: Added.
2990
2991 2018-12-04  Carlos Garcia Campos  <cgarcia@igalia.com>
2992
2993         [SOUP] Move URLSoup back to WebCore after r238771
2994         https://bugs.webkit.org/show_bug.cgi?id=192306
2995
2996         Reviewed by Michael Catanzaro.
2997
2998         Include GUniquePtrSoup from WebCore again and fix several build failures that showed up after removing the soup
2999         includes from URL header.
3000
3001         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
3002         (WebKit::NetworkDataTaskSoup::tlsConnectionAcceptCertificate):
3003         * PluginProcess/PluginProcess.cpp:
3004         * Shared/API/glib/WebKitURIRequest.cpp:
3005         * Shared/API/glib/WebKitURIResponse.cpp:
3006         * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp:
3007         * UIProcess/API/glib/WebKitURISchemeRequest.cpp:
3008         (webkit_uri_scheme_request_finish_error): Use soupURIToURL().
3009         * UIProcess/API/glib/WebKitWebView.cpp:
3010         (webkit_web_view_load_uri): Use soupURIToURL().
3011         * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
3012         * UIProcess/Launcher/glib/BubblewrapLauncher.h:
3013         * UIProcess/Launcher/glib/FlatpakLauncher.cpp:
3014         * UIProcess/Launcher/glib/FlatpakLauncher.h:
3015
3016 2018-12-04  Tim Horton  <timothy_horton@apple.com>
3017
3018         Fix the watchOS build; stop unnecessarily linking CorePDF
3019         https://bugs.webkit.org/show_bug.cgi?id=192356
3020         <rdar://problem/46427844>
3021
3022         Reviewed by Wenson Hsieh.
3023
3024         * Configurations/WebKit.xcconfig:
3025         * Platform/spi/ios/CorePDFSPI.h:
3026
3027 2018-12-03  Tim Horton  <timothy_horton@apple.com>
3028
3029         Make it possible to disable animated keyboard scrolling behavior
3030         https://bugs.webkit.org/show_bug.cgi?id=192331
3031         <rdar://problem/45586859>
3032
3033         Reviewed by Simon Fraser.
3034
3035         * UIProcess/API/Cocoa/WKWebView.mm:
3036         * UIProcess/ios/WKKeyboardScrollingAnimator.mm:
3037         (-[WKKeyboardScrollingAnimator invalidate]):
3038         (-[WKKeyboardScrollingAnimator beginWithEvent:]):
3039         (-[WKKeyboardScrollingAnimator stopAnimatedScroll]):
3040         (-[WKKeyboardScrollingAnimator willStartInteractiveScroll]):
3041         (-[WKKeyboardScrollingAnimator startRepeatTimerIfNeeded]):
3042         (-[WKKeyboardScrollingAnimator stopRepeatTimer]):
3043         (-[WKKeyboardScrollingAnimator performDiscreteScroll]):
3044         (-[WKKeyboardScrollViewAnimator scrollToContentOffset:animated:]):
3045         (-[WKKeyboardScrollViewAnimator scrollWithScrollToExtentAnimationTo:]):
3046         * WebKit.xcodeproj/project.pbxproj:
3047
3048 2018-12-03  Fujii Hironori  <Hironori.Fujii@sony.com>
3049
3050         Remove "using namespace WebKit" under Source/WebKit/WebProcess/InjectedBundle/API
3051         https://bugs.webkit.org/show_bug.cgi?id=192301
3052
3053         Reviewed by Alex Christensen.
3054
3055         Removed "using namespace WebKit" statement, and use "WebKit::"
3056         namespace prefix instead.
3057
3058         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
3059         * WebProcess/InjectedBundle/API/c/WKBundleBackForwardList.cpp:
3060         * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
3061         * WebProcess/InjectedBundle/API/c/WKBundleDOMWindowExtension.cpp:
3062         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3063         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
3064         * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
3065         * WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp:
3066         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
3067         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3068         * WebProcess/InjectedBundle/API/c/WKBundlePageBanner.cpp:
3069         * WebProcess/InjectedBundle/API/c/WKBundlePageGroup.cpp:
3070         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
3071         * WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.cpp:
3072         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
3073
3074 2018-12-03  Chris Dumez  <cdumez@apple.com>
3075
3076         Regression(PSON) Google OAuth is broken in private sessions
3077         https://bugs.webkit.org/show_bug.cgi?id=192337
3078         <rdar://problem/46353558>
3079
3080         Reviewed by Alex Christensen.
3081
3082         In WebPageProxy::swapToWebProcess(), we would call removeWebPage() on the old WebProcessProxy and then
3083         addExistingWebPage() on the new WebProcessProxy, as you would expect in case of process swap.
3084
3085         The issue is that WebProcessProxy::removeWebPage() calls WebProcessPool::pageEndUsingWebsiteDataStore()
3086         which would cause the session to get destroyed assuming this was the last page using it. We would
3087         therefore lose session cookies after a process-swap in private session.
3088
3089         To address the issue, a parameter to WebProcessPool::pageEndUsingWebsiteDataStore() and
3090         WebProcessPool::pageBeginUsingWebsiteDataStore() to control if we want to tell the WebProcessPool
3091         about the page beginning / ending its use of the session. In the case of a process-swap, we make
3092         sure the process pool is not notified.
3093
3094         * UIProcess/WebPageProxy.cpp:
3095         (WebKit::WebPageProxy::reattachToWebProcess):
3096         (WebKit::WebPageProxy::swapToWebProcess):
3097         (WebKit::WebPageProxy::finishAttachingToWebProcess):
3098         (WebKit::WebPageProxy::close):
3099         * UIProcess/WebProcessProxy.cpp:
3100         (WebKit::WebProcessProxy::createWebPage):
3101         (WebKit::WebProcessProxy::addExistingWebPage):
3102         (WebKit::WebProcessProxy::removeWebPage):
3103         * UIProcess/WebProcessProxy.h:
3104
3105 2018-12-03  Chris Dumez  <cdumez@apple.com>
3106
3107         [PSON] Request by the client to process-swap is ignored if the window has an opener
3108         https://bugs.webkit.org/show_bug.cgi?id=192267
3109         <rdar://problem/46386886>
3110
3111         Reviewed by Brady Eidson.
3112
3113         If the client forces a process-swap, we should process-swap, even if the browsing
3114         context has an opener (or openees). Previously, we would only bypass the cross-site
3115         check, not the openee / openees checks.
3116
3117         The issue when doing so is that the openee still has a opener link to the window
3118         in the old process. They would see that the window is still there and navigated
3119         to 'about:blank' due to our page suspension logic. To address the issue, we no
3120         longer suspend the old WebPage if the process swap was forced by the client and
3121         we make sure that the old WebPage gets closed.
3122
3123         * UIProcess/WebPageProxy.cpp:
3124         (WebKit::WebPageProxy::suspendCurrentPageIfPossible):
3125         (WebKit::WebPageProxy::swapToWebProcess):
3126         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
3127         (WebKit::WebPageProxy::continueNavigationInNewProcess):
3128         * UIProcess/WebPageProxy.h:
3129         * UIProcess/WebProcessPool.cpp:
3130         (WebKit::WebProcessPool::processForNavigationInternal):
3131
3132 2018-12-03  Keith Rollin  <krollin@apple.com>
3133
3134         Add .xcfilelist files
3135         https://bugs.webkit.org/show_bug.cgi?id=192082
3136         <rdar://problem/46312533>
3137
3138         Reviewed by Brent Fulgham.
3139
3140         Add .xcfilelist files for Generate Derived Sources and Generate
3141         Unified Sources build phases in Xcode. These are just being staged for
3142         now; they'll be added to the Xcode projects later.
3143
3144         * DerivedSources-input.xcfilelist: Added.
3145         * DerivedSources-output.xcfilelist: Added.
3146         * UnifiedSources-input.xcfilelist: Added.
3147         * UnifiedSources-output.xcfilelist: Added.
3148
3149 2018-12-03  Zalan Bujtas  <zalan@apple.com>
3150
3151         [iOS] Unreviewed build fix.
3152
3153         * Platform/Logging.h:
3154
3155 2018-12-03  Alex Christensen  <achristensen@webkit.org>
3156
3157         Remove unused NetworkProcessCreationParameters.diskCacheSizeOverride
3158         https://bugs.webkit.org/show_bug.cgi?id=192246
3159
3160         Reviewed by Chris Dumez.
3161
3162         The last use of this functionality was removed in rdar://problem/46344871
3163
3164         * NetworkProcess/NetworkProcess.cpp:
3165         (WebKit::NetworkProcess::initializeNetworkProcess):
3166         (WebKit::NetworkProcess::setCacheModel):
3167         * NetworkProcess/NetworkProcess.h:
3168         * NetworkProcess/NetworkProcessCreationParameters.cpp:
3169         (WebKit::NetworkProcessCreationParameters::encode const):
3170         (WebKit::NetworkProcessCreationParameters::decode):
3171         * NetworkProcess/NetworkProcessCreationParameters.h:
3172         * UIProcess/API/APIProcessPoolConfiguration.cpp:
3173         (API::ProcessPoolConfiguration::copy):
3174         * UIProcess/API/APIProcessPoolConfiguration.h:
3175         * UIProcess/API/C/WKContextConfigurationRef.cpp:
3176         (WKContextConfigurationDiskCacheSizeOverride):
3177         (WKContextConfigurationSetDiskCacheSizeOverride):
3178         * UIProcess/API/C/WKContextConfigurationRef.h:
3179         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
3180         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
3181         (-[_WKProcessPoolConfiguration diskCacheSizeOverride]):
3182         (-[_WKProcessPoolConfiguration setDiskCacheSizeOverride:]):
3183         * UIProcess/WebProcessPool.cpp:
3184         (WebKit::WebProcessPool::ensureNetworkProcess):
3185
3186 2018-12-03  Alex Christensen  <achristensen@webkit.org>
3187
3188         Add WKWebProcessPlugInLoadDelegate SPI willStartProvisionalLoadForFrame with a completion handler
3189         https://bugs.webkit.org/show_bug.cgi?id=192272
3190
3191         Reviewed by Brady Eidson.
3192
3193         * WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h:
3194         (API::InjectedBundle::PageLoaderClient::didStartProvisionalLoadForFrame):
3195         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
3196         * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
3197         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
3198         (ResourceLoadClient::ResourceLoadClient):
3199         (ResourceLoadClient::loadDelegate const):
3200         (ResourceLoadClient::pluginContextController const):
3201         (PageLoaderClient::PageLoaderClient):
3202         (PageLoaderClient::loadDelegate const):
3203         (PageLoaderClient::pluginContextController const):
3204         (PageLoaderClient::didStartProvisionalLoadForFrame):
3205         (PageLoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
3206         (PageLoaderClient::didFinishLoadForFrame):
3207         (PageLoaderClient::globalObjectIsAvailableForFrame):
3208         (PageLoaderClient::didRemoveFrameFromHierarchy):
3209         (PageLoaderClient::didCommitLoadForFrame):
3210         (PageLoaderClient::didFinishDocumentLoadForFrame):
3211         (PageLoaderClient::didFailProvisionalLoadWithErrorForFrame):
3212         (PageLoaderClient::didFailLoadWithErrorForFrame):
3213         (PageLoaderClient::didSameDocumentNavigationForFrame):
3214         (PageLoaderClient::didLayoutForFrame):
3215         (PageLoaderClient::didReachLayoutMilestone):
3216         (PageLoaderClient::didFirstVisuallyNonEmptyLayoutForFrame):
3217         (PageLoaderClient::didHandleOnloadEventsForFrame):
3218         (PageLoaderClient::userAgentForURL const):
3219         (ResourceLoadClient::willSendRequestForFrame):
3220         (ResourceLoadClient::didInitiateLoadForResource):
3221         (ResourceLoadClient::didFinishLoadForResource):
3222         (ResourceLoadClient::didFailLoadForResource):
3223         (-[WKWebProcessPlugInBrowserContextController setLoadDelegate:]):
3224         (didStartProvisionalLoadForFrame): Deleted.
3225         (didReceiveServerRedirectForProvisionalLoadForFrame): Deleted.
3226         (didFinishLoadForFrame): Deleted.
3227         (globalObjectIsAvailableForFrame): Deleted.
3228         (didRemoveFrameFromHierarchy): Deleted.
3229         (didCommitLoadForFrame): Deleted.
3230         (didFinishDocumentLoadForFrame): Deleted.
3231         (didFailProvisionalLoadWithErrorForFrame): Deleted.
3232         (didFailLoadWithErrorForFrame): Deleted.
3233         (didSameDocumentNavigationForFrame): Deleted.
3234         (didLayoutForFrame): Deleted.
3235         (didReachLayoutMilestone): Deleted.
3236         (didFirstVisuallyNonEmptyLayoutForFrame): Deleted.
3237         (didHandleOnloadEventsForFrame): Deleted.
3238         (userAgentForURL): Deleted.
3239         (setUpPageLoaderClient): Deleted.
3240         (willSendRequestForFrame): Deleted.
3241         (didInitiateLoadForResource): Deleted.
3242         (didFinishLoadForResource): Deleted.
3243         (didFailLoadForResource): Deleted.
3244         (setUpResourceLoadClient): Deleted.
3245         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
3246         (WebKit::InjectedBundlePageLoaderClient::didStartProvisionalLoadForFrame):
3247         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
3248         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3249         (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
3250         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3251
3252 2018-12-03  Tim Horton  <timothy_horton@apple.com>
3253
3254         Swipe snapshot stays up too long swiping around on apple.com (waiting for first paint)
3255         https://bugs.webkit.org/show_bug.cgi?id=192319
3256         <rdar://problem/45928708>
3257
3258         Reviewed by Simon Fraser.
3259
3260         * UIProcess/Cocoa/ViewGestureController.cpp:
3261         (WebKit::ViewGestureController::didStartProvisionalLoadForMainFrame):
3262         * UIProcess/Cocoa/ViewGestureController.h:
3263         * UIProcess/ios/ViewGestureControllerIOS.mm:
3264         (WebKit::ViewGestureController::endSwipeGesture):
3265         In r236966, I reverted slightly too much of r232416.
3266         We still need to defer requesting a presentation update callback until
3267         after the provisional load starts. Otherwise, we could get the callback
3268         while we're in the 'paused' state, and drop it on the floor. That would
3269         then mean that we time out instead of promptly removing the snapshot.
3270
3271 2018-12-03  Alex Christensen  <achristensen@webkit.org>
3272
3273         Update process assertions after swapping processes
3274         https://bugs.webkit.org/show_bug.cgi?id=192318
3275         <rdar://problem/46377552>
3276
3277         Reviewed by Chris Dumez.
3278
3279         If the previous WebProcess had a ProcessAssertion to prevent it from being suspended,
3280         after navigation and process swapping we need the new WebProcess to update its process assertions.
3281
3282         * UIProcess/API/Cocoa/PageLoadStateObserver.h:
3283         * UIProcess/Cocoa/NavigationState.h:
3284         * UIProcess/Cocoa/NavigationState.mm:
3285         (WebKit::NavigationState::didSwapWebProcesses):
3286         * UIProcess/PageLoadState.cpp:
3287         (WebKit::PageLoadState::didSwapWebProcesses):
3288         * UIProcess/PageLoadState.h:
3289         * UIProcess/WebPageProxy.cpp:
3290         (WebKit::WebPageProxy::finishAttachingToWebProcess):
3291
3292 2018-12-03  Daniel Bates  <dabates@apple.com>
3293
3294         [iOS] Do not handle key events that are key commands
3295         https://bugs.webkit.org/show_bug.cgi?id=191608
3296         <rdar://problem/46046013>
3297
3298         Reviewed by Ryosuke Niwa.
3299
3300         A key down event may be associated with a key command. If it is then we want to execute the
3301         key command instead of inserting or deleting text. We need to ask UIKit to handle the current
3302         event as a key command to find out.
3303
3304         * UIProcess/ios/WKContentViewInteraction.mm:
3305         (-[WKContentView _interpretKeyEvent:isCharEvent:]): Ask UIKit to handle the current event
3306         as a key command. If it handles it then we're done. Otherwise, do what we do now.
3307
3308 2018-12-03  Zalan Bujtas  <zalan@apple.com>
3309
3310         [iOS] Add logging channel for hover related content observation
3311         https://bugs.webkit.org/show_bug.cgi?id=192312
3312
3313         Reviewed by Simon Fraser.
3314
3315         * WebProcess/WebPage/ios/WebPageIOS.mm:
3316         (WebKit::WebPage::handleSyntheticClick):
3317         (WebKit::WebPage::completePendingSyntheticClickForContentChangeObserver):
3318
3319 2018-12-03  Tim Horton  <timothy_horton@apple.com>
3320
3321         Enable swipe snapshot removal logging in release builds
3322         https://bugs.webkit.org/show_bug.cgi?id=192313
3323
3324         Reviewed by Dean Jackson.
3325
3326         * UIProcess/Cocoa/ViewGestureController.cpp:
3327         (WebKit::ViewGestureController::SnapshotRemovalTracker::log const):
3328         This is super-low-traffic and super-helpful logging.
3329         Turn it on all the time.
3330
3331 2018-12-03  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
3332
3333         Use WallTime for file time
3334         https://bugs.webkit.org/show_bug.cgi?id=192287
3335
3336         Reviewed by Darin Adler.
3337
3338         * Shared/SessionState.h:
3339         * Shared/WebCoreArgumentCoders.cpp:
3340         (IPC::ArgumentCoder<DatabaseDetails>::decode):
3341         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
3342         (WKKeyValueStorageManagerGetStorageDetailsByOrigin):
3343         * UIProcess/API/glib/WebKitWebViewSessionState.cpp:
3344         (decodeHTTPBody):
3345         * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
3346         (WebKit::PluginInfoCache::getPluginInfo):
3347         (WebKit::PluginInfoCache::updatePluginInfo):
3348         * UIProcess/ResourceLoadStatisticsPersistentStorage.cpp:
3349         (WebKit::hasFileChangedSince):
3350         * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp:
3351         (WebKit::LocalStorageDatabaseTracker::databasesModifiedSince):
3352         (WebKit::LocalStorageDatabaseTracker::originDetails):
3353         * UIProcess/WebStorage/LocalStorageDatabaseTracker.h:
3354         * UIProcess/mac/LegacySessionStateCoding.cpp:
3355         (WebKit::encodeFormDataElement):
3356         (WebKit::decodeFormDataElement):
3357         * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
3358         (WebKit::removeAllMediaKeyStorageForOriginPath):
3359         (WebKit::WebMediaKeyStorageManager::deleteMediaKeyEntriesForOrigin):
3360         (WebKit::WebMediaKeyStorageManager::deleteMediaKeyEntriesModifiedBetweenDates):
3361         (WebKit::WebMediaKeyStorageManager::deleteAllMediaKeyEntries):
3362         * WebProcess/MediaCache/WebMediaKeyStorageManager.h:
3363         * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
3364         (WebKit::toHTTPBody):
3365         (WebKit::toFormData):
3366
3367 2018-12-03  Darin Adler  <darin@apple.com>
3368
3369         [Cocoa] Check message IDs when decoding Mach messages in IPC::Connection
3370         https://bugs.webkit.org/show_bug.cgi?id=192300
3371         rdar://problem/46215523
3372
3373         Reviewed by Chris Dumez.
3374
3375         * Platform/IPC/mac/ConnectionMac.mm:
3376         (IPC::Connection::sendOutgoingMessage): Use message IDs other than 0 and 1 for
3377         the messages, as suggested by an expert at Apple.
3378         (IPC::createMessageDecoder): Update for the new message IDs.
3379         (IPC::Connection::receiveSourceEventHandler): Ignore messages with unexpected
3380         message IDs.
3381
3382 2018-12-03  Darin Adler  <darin@apple.com>
3383
3384         [Cocoa] Check descriptor types in createMessageDecoder
3385         https://bugs.webkit.org/show_bug.cgi?id=192302
3386
3387         Reviewed by Chris Dumez.
3388
3389         Not sure how to construct a test case for Connection, so not adding any
3390         tests at this time.
3391
3392         * Platform/IPC/mac/ConnectionMac.mm:
3393         (IPC::createMessageDecoder): Check descriptor types and return nullptr if they
3394         are incorrect. Retained the assertions to help with debugging.
3395         (IPC::Connection::receiveSourceEventHandler): Ignore the message if no decoder
3396         is created, which means the message is invalid.
3397
3398 2018-12-03  Darin Adler  <darin@apple.com>
3399
3400         Alignment padding needs to be zeroed out in IPC::Encoder
3401         https://bugs.webkit.org/show_bug.cgi?id=192304
3402
3403         Reviewed by Chris Dumez.
3404
3405         Might be useful to make a regression test for this, but I couldn't find any
3406         other tests for this code.
3407
3408         * Platform/IPC/Encoder.cpp:
3409         (IPC::Encoder::grow): Use std::memset to zero-fill padding bytes.
3410
3411         * UIProcess/mac/LegacySessionStateCoding.cpp:
3412         (WebKit::HistoryEntryDataEncoder::grow): Ditto.
3413
3414 2018-12-03  Darin Adler  <darin@apple.com>
3415
3416         [Cocoa] Streamline sandbox code a tiny bit
3417         https://bugs.webkit.org/show_bug.cgi?id=192299
3418
3419         Reviewed by Anders Carlsson.
3420
3421         * Shared/mac/SandboxUtilities.mm:
3422         (WebKit::processHasContainer): Removed separate function, just use the
3423         pathForProcessContainer instead of repeating logic. This costs a tiny
3424         bit of memory allocation overhead the first time this function is called,
3425         but in return we can eliminate a second copy of the code to call
3426         sandbox_container_path_for_pid.
3427
3428 2018-12-03  Eric Carlson  <eric.carlson@apple.com>
3429
3430         [MediaStream] 'devicechange' event when more capture device information are revealed.
3431         https://bugs.webkit.org/show_bug.cgi?id=192268
3432
3433         Reviewed by Youenn Fablet.
3434
3435         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
3436         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Call captureDevicesChanged
3437         if a filtered device list was returned previously.
3438         (WebKit::UserMediaPermissionRequestManagerProxy::resetAccess): Clear m_hasFilteredDeviceList.
3439         (WebKit::UserMediaPermissionRequestManagerProxy::wasGrantedVideoOrAudioAccess): New.
3440         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): Filter device
3441         list and strip device IDs if gUM permission hasn't been given.
3442         (WebKit::UserMediaPermissionRequestManagerProxy::watchdogTimerFired): Clear m_hasFilteredDeviceList.
3443         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
3444
3445 2018-12-03  Keith Rollin  <krollin@apple.com>
3446
3447         Remove Network Capture
3448         https://bugs.webkit.org/show_bug.cgi?id=192296
3449         <rdar://problem/46408648>
3450
3451         Reviewed by Daniel Bates.
3452
3453         r209498 introduced an embedded record and replay facility for network
3454         resource loading. This facility was added in order to support a new
3455         implementation of the PLT and related performance tests. The PLT is
3456         currenty taking a different direction, and so this record/replace
3457         facility is no longer needed. Removing it as unused code.
3458
3459         * CMakeLists.txt:
3460         * NetworkProcess/NetworkLoad.cpp:
3461         (WebKit::NetworkLoad::NetworkLoad):
3462         (WebKit::NetworkLoad::setDefersLoading):
3463         (WebKit::NetworkLoad::continueWillSendRequest):
3464         (WebKit::NetworkLoad::willPerformHTTPRedirection):
3465         (WebKit::NetworkLoad::notifyDidReceiveResponse):
3466         (WebKit::NetworkLoad::didReceiveData):
3467         (WebKit::NetworkLoad::didCompleteWithError):
3468         (WebKit::NetworkLoad::initializeForRecord): Deleted.
3469         (WebKit::NetworkLoad::initializeForReplay): Deleted.
3470         * NetworkProcess/NetworkLoad.h:
3471         * NetworkProcess/NetworkProcess.cpp:
3472         (WebKit::NetworkProcess::initializeNetworkProcess):
3473         (WebKit::NetworkProcess::terminate):
3474         * NetworkProcess/NetworkProcessCreationParameters.cpp:
3475         (WebKit::NetworkProcessCreationParameters::encode const):
3476         (WebKit::NetworkProcessCreationParameters::decode):
3477         * NetworkProcess/NetworkProcessCreationParameters.h:
3478         * NetworkProcess/capture/NetworkCaptureEvent.cpp: Removed.
3479         * NetworkProcess/capture/NetworkCaptureEvent.h: Removed.
3480         * NetworkProcess/capture/NetworkCaptureLogging.h: Removed.
3481         * NetworkProcess/capture/NetworkCaptureManager.cpp: Removed.
3482         * NetworkProcess/capture/NetworkCaptureManager.h: Removed.
3483         * NetworkProcess/capture/NetworkCaptureRecorder.cpp: Removed.
3484         * NetworkProcess/capture/NetworkCaptureRecorder.h: Removed.
3485         * NetworkProcess/capture/NetworkCaptureReplayer.cpp: Removed.
3486         * NetworkProcess/capture/NetworkCaptureReplayer.h: Removed.
3487         * NetworkProcess/capture/NetworkCaptureResource.cpp: Removed.
3488         * NetworkProcess/capture/NetworkCaptureResource.h: Removed.
3489         * NetworkProcess/capture/NetworkDataTaskReplay.cpp: Removed.
3490         * NetworkProcess/capture/NetworkDataTaskReplay.h: Removed.
3491         * NetworkProcess/capture/json.hpp: Removed.
3492         * Sources.txt:
3493         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3494         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
3495         * WebKit.xcodeproj/project.pbxproj:
3496         * config.h:
3497
3498 2018-12-02  Zalan Bujtas  <zalan@apple.com>
3499
3500         Add a runtime feature flag for LayoutFormattingContext.
3501         https://bugs.webkit.org/show_bug.cgi?id=192280
3502
3503         Reviewed by Simon Fraser.
3504
3505         * Configurations/FeatureDefines.xcconfig:
3506         * Shared/WebPreferences.yaml:
3507         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3508         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
3509
3510 2018-12-01  Chris Dumez  <cdumez@apple.com>
3511
3512         [PSON] process-swapping may occur even though opener has handle to openee
3513         https://bugs.webkit.org/show_bug.cgi?id=192277
3514
3515         Reviewed by Antti Koivisto.
3516
3517         * Shared/NavigationActionData.cpp:
3518         (WebKit::NavigationActionData::encode const):
3519         (WebKit::NavigationActionData::decode):
3520         * Shared/NavigationActionData.h:
3521         * UIProcess/API/APINavigation.h:
3522         (API::Navigation::openedByDOMWithOpener const):
3523         (API::Navigation::openedViaWindowOpenWithOpener const): Deleted.
3524         (API::Navigation::opener const): Deleted.
3525         * UIProcess/WebProcessPool.cpp:
3526         (WebKit::WebProcessPool::processForNavigationInternal):
3527         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3528         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
3529
3530 2018-12-01  Alexey Proskuryakov  <ap@apple.com>
3531
3532         Modernize version check for _suppressedAutoAddedHTTPHeaders
3533         https://bugs.webkit.org/show_bug.cgi?id=192175
3534
3535         Reviewed by Tim Horton.
3536
3537         * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
3538         Also removed selector check - we only need to support running on 10.13.0 when building
3539         with 10.13.0 SDK.
3540
3541 2018-11-30  Alex Christensen  <achristensen@webkit.org>
3542
3543         Fix Windows build.
3544
3545         * UIProcess/API/C/curl/WKWebsiteDataStoreRefCurl.cpp:
3546         (WKWebsiteDataStoreEnableCustomNetworkProxySettings):
3547
3548 2018-11-30  Alex Christensen  <achristensen@webkit.org>
3549
3550         Move URL from WebCore to WTF
3551         https://bugs.webkit.org/show_bug.cgi?id=190234
3552
3553         Reviewed by Keith Miller.
3554
3555         * NetworkProcess/Cookies/WebCookieManager.cpp:
3556         * NetworkProcess/Cookies/WebCookieManager.h:
3557         * NetworkProcess/Cookies/WebCookieManager.messages.in:
3558         * NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm:
3559         * NetworkProcess/Downloads/Download.h:
3560         * NetworkProcess/Downloads/DownloadManager.cpp:
3561         (WebKit::DownloadManager::publishDownloadProgress):
3562         * NetworkProcess/Downloads/DownloadManager.h:
3563         * NetworkProcess/Downloads/PendingDownload.cpp:
3564         (WebKit::PendingDownload::publishProgress):
3565         * NetworkProcess/Downloads/PendingDownload.h:
3566         * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
3567         (WebKit::Download::publishProgress):
3568         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
3569         (WebKit::NetworkBlobRegistry::registerBlobURL):
3570         (WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
3571         (WebKit::NetworkBlobRegistry::unregisterBlobURL):
3572         (WebKit::NetworkBlobRegistry::blobSize):
3573         (WebKit::NetworkBlobRegistry::filesInBlob):
3574         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
3575         * NetworkProcess/NetworkConnectionToWebProcess.h:
3576         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
3577         * NetworkProcess/NetworkDataTask.cpp:
3578         (WebKit::NetworkDataTask::didReceiveResponse):
3579         * NetworkProcess/NetworkDataTaskBlob.cpp:
3580         * NetworkProcess/NetworkLoadChecker.h:
3581         (WebKit::NetworkLoadChecker::setContentExtensionController):
3582         (WebKit::NetworkLoadChecker::url const):
3583         * NetworkProcess/NetworkProcess.cpp:
3584         (WebKit::NetworkProcess::writeBlobToFilePath):
3585         (WebKit::NetworkProcess::publishDownloadProgress):
3586         (WebKit::NetworkProcess::preconnectTo):
3587         * NetworkProcess/NetworkProcess.h:
3588         * NetworkProcess/NetworkProcess.messages.in:
3589         * NetworkProcess/NetworkResourceLoadParameters.h:
3590         * NetworkProcess/NetworkResourceLoader.cpp:
3591         (WebKit::logBlockedCookieInformation):
3592         (WebKit::logCookieInformationInternal):
3593         * NetworkProcess/NetworkResourceLoader.h:
3594         * NetworkProcess/NetworkSocketStream.cpp:
3595         (WebKit::NetworkSocketStream::create):
3596         * NetworkProcess/NetworkSocketStream.h:
3597         * NetworkProcess/PingLoad.h:
3598         * NetworkProcess/ServiceWorker/WebSWServerConnection.h:
3599         * NetworkProcess/ServiceWorker/WebSWServerConnection.messages.in:
3600         * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.messages.in:
3601         * NetworkProcess/cache/CacheStorageEngine.cpp:
3602         (WebKit::CacheStorage::Engine::retrieveRecords):
3603         * NetworkProcess/cache/CacheStorageEngine.h:
3604         * NetworkProcess/cache/CacheStorageEngineCache.h:
3605         * NetworkProcess/cache/CacheStorageEngineConnection.cpp:
3606         (WebKit::CacheStorageEngineConnection::retrieveRecords):
3607         * NetworkProcess/cache/CacheStorageEngineConnection.h:
3608         * NetworkProcess/cache/CacheStorageEngineConnection.messages.in:
3609         * NetworkProcess/cache/NetworkCache.h:
3610         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
3611         (WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
3612         (WebKit::NetworkCache::Statistics::recordRevalidationSuccess):
3613         * NetworkProcess/cache/NetworkCacheSubresourcesEntry.h:
3614         (WebKit::NetworkCache::SubresourceInfo::firstPartyForCookies const):
3615         * NetworkProcess/capture/NetworkCaptureEvent.cpp:
3616         (WebKit::NetworkCapture::Request::operator WebCore::ResourceRequest const):
3617         (WebKit::NetworkCapture::Response::operator WebCore::ResourceResponse const):
3618         (WebKit::NetworkCapture::Error::operator WebCore::ResourceError const):
3619         * NetworkProcess/capture/NetworkCaptureManager.cpp:
3620         (WebKit::NetworkCapture::Manager::findBestFuzzyMatch):
3621         (WebKit::NetworkCapture::Manager::fuzzyMatchURLs):
3622         (WebKit::NetworkCapture::Manager::urlIdentifyingCommonDomain):
3623         * NetworkProcess/capture/NetworkCaptureManager.h:
3624         * NetworkProcess/capture/NetworkCaptureResource.cpp:
3625         (WebKit::NetworkCapture::Resource::url):
3626         (WebKit::NetworkCapture::Resource::queryParameters):
3627         * NetworkProcess/capture/NetworkCaptureResource.h:
3628         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
3629         (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
3630         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3631         (WebKit::NetworkProcess::deleteHSTSCacheForHostNames):
3632         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
3633         (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
3634         * PluginProcess/mac/PluginProcessMac.mm:
3635         (WebKit::openCFURLRef):
3636         (WebKit::replacedNSWorkspace_launchApplicationAtURL_options_configuration_error):
3637         * Shared/API/APIURL.h:
3638         (API::URL::create):
3639         (API::URL::equals):
3640         (API::URL::URL):
3641         (API::URL::url const):
3642         (API::URL::parseURLIfNecessary const):
3643         * Shared/API/APIUserContentURLPattern.h:
3644         (API::UserContentURLPattern::matchesURL const):
3645         * Shared/API/c/WKURLRequest.cpp:
3646         * Shared/API/c/WKURLResponse.cpp:
3647         * Shared/API/c/cf/WKURLCF.mm:
3648         (WKURLCreateWithCFURL):
3649         (WKURLCopyCFURL):
3650         * Shared/API/glib/WebKitURIRequest.cpp:
3651         * Shared/API/glib/WebKitURIResponse.cpp:
3652         * Shared/APIWebArchiveResource.mm:
3653         (API::WebArchiveResource::WebArchiveResource):
3654         * Shared/AssistedNodeInformation.h:
3655         * Shared/Cocoa/WKNSURLExtras.mm:
3656         (-[NSURL _web_originalDataAsWTFString]):
3657         (): Deleted.
3658         * Shared/SessionState.h:
3659         * Shared/WebBackForwardListItem.cpp:
3660         (WebKit::WebBackForwardListItem::itemIsInSameDocument const):
3661         * Shared/WebCoreArgumentCoders.cpp:
3662         * Shared/WebCoreArgumentCoders.h:
3663         * Shared/WebErrors.h:
3664         * Shared/WebHitTestResultData.cpp:
3665         * Shared/cf/ArgumentCodersCF.cpp:
3666         (IPC::encode):
3667         (IPC::decode):
3668         * Shared/gtk/WebErrorsGtk.cpp:
3669         * Shared/ios/InteractionInformationAtPosition.h:
3670         * UIProcess/API/APIHTTPCookieStore.h:
3671         * UIProcess/API/APINavigation.cpp:
3672         (API::Navigation::appendRedirectionURL):
3673         * UIProcess/API/APINavigation.h:
3674         (API::Navigation::takeRedirectChain):
3675         * UIProcess/API/APINavigationAction.h:
3676         * UIProcess/API/APINavigationClient.h:
3677         (API::NavigationClient::signedPublicKeyAndChallengeString):
3678         (API::NavigationClient::contentRuleListNotification):
3679         (API::NavigationClient::webGLLoadPolicy const):
3680         (API::NavigationClient::resolveWebGLLoadPolicy const):
3681         * UIProcess/API/APIUIClient.h:
3682         (API::UIClient::saveDataToFileInDownloadsFolder):
3683         * UIProcess/API/APIUserScript.cpp:
3684         (API::UserScript::generateUniqueURL):
3685         * UIProcess/API/APIUserScript.h:
3686         * UIProcess/API/APIUserStyleSheet.cpp:
3687         (API::UserStyleSheet::generateUniqueURL):
3688         * UIProcess/API/APIUserStyleSheet.h:
3689         * UIProcess/API/C/WKOpenPanelResultListener.cpp:
3690         (filePathsFromFileURLs):
3691         * UIProcess/API/C/WKPage.cpp:
3692         (WKPageLoadPlainTextStringWithUserData):
3693         (WKPageSetPageUIClient):
3694         (WKPageSetPageNavigationClient):
3695         * UIProcess/API/C/WKPageGroup.cpp:
3696         (WKPageGroupAddUserStyleSheet):
3697         (WKPageGroupAddUserScript):
3698         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
3699         (WKWebsiteDataStoreSetResourceLoadStatisticsPrevalentResourceForDebugMode):
3700         (WKWebsiteDataStoreSetStatisticsLastSeen):
3701         (WKWebsiteDataStoreSetStatisticsPrevalentResource):
3702         (WKWebsiteDataStoreSetStatisticsVeryPrevalentResource):
3703         (WKWebsiteDataStoreIsStatisticsPrevalentResource):
3704         (WKWebsiteDataStoreIsStatisticsVeryPrevalentResource):
3705         (WKWebsiteDataStoreIsStatisticsRegisteredAsSubresourceUnder):
3706         (WKWebsiteDataStoreIsStatisticsRegisteredAsSubFrameUnder):
3707         (WKWebsiteDataStoreIsStatisticsRegisteredAsRedirectingTo):
3708         (WKWebsiteDataStoreSetStatisticsHasHadUserInteraction):
3709         (WKWebsiteDataStoreIsStatisticsHasHadUserInteraction):
3710         (WKWebsiteDataStoreSetStatisticsGrandfathered):
3711         (WKWebsiteDataStoreIsStatisticsGrandfathered):
3712         (WKWebsiteDataStoreSetStatisticsSubframeUnderTopFrameOrigin):
3713         (WKWebsiteDataStoreSetStatisticsSubresourceUnderTopFrameOrigin):
3714         (WKWebsiteDataStoreSetStatisticsSubresourceUniqueRedirectTo):
3715         (WKWebsiteDataStoreSetStatisticsSubresourceUniqueRedirectFrom):
3716         (WKWebsiteDataStoreSetStatisticsTopFrameUniqueRedirectTo):
3717         (WKWebsiteDataStoreSetStatisticsTopFrameUniqueRedirectFrom):
3718         * UIProcess/API/Cocoa/WKHTTPCookieStore.mm:
3719         * UIProcess/API/Cocoa/WKUserScript.mm:
3720         (-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:associatedURL:userContentWorld:]):
3721         * UIProcess/API/Cocoa/WKWebView.mm:
3722         (-[WKWebView _showSafeBrowsingWarning:completionHandler:]):
3723         (-[WKWebView _showSafeBrowsingWarningWithTitle:warning:details:completionHandler:]):
3724         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3725         (-[WKWebViewConfiguration setURLSchemeHandler:forURLScheme:]):
3726         (-[WKWebViewConfiguration urlSchemeHandlerForURLScheme:]):
3727         * UIProcess/API/Cocoa/WKWebViewInternal.h:
3728         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
3729         * UIProcess/API/Cocoa/_WKApplicationManifest.mm:
3730         (-[_WKApplicationManifest initWithCoder:]):
3731         (+[_WKApplicationManifest applicationManifestFromJSON:manifestURL:documentURL:]):
3732         * UIProcess/API/Cocoa/_WKUserStyleSheet.mm:
3733         (-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:baseURL:userContentWorld:]):
3734         * UIProcess/API/glib/IconDatabase.cpp:
3735         * UIProcess/API/glib/WebKitCookieManager.cpp:
3736         (webkit_cookie_manager_get_cookies):
3737         * UIProcess/API/glib/WebKitFileChooserRequest.cpp:
3738         * UIProcess/API/glib/WebKitSecurityOrigin.cpp:
3739         (webkit_security_origin_new_for_uri):
3740         * UIProcess/API/glib/WebKitUIClient.cpp:
3741         * UIProcess/API/glib/WebKitURISchemeRequest.cpp:
3742         * UIProcess/API/glib/WebKitWebView.cpp:
3743         (webkit_web_view_load_plain_text):
3744         * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
3745         * UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:
3746         (WebKit::WebPaymentCoordinatorProxy::showPaymentUI):
3747         (WebKit::WebPaymentCoordinatorProxy::validateMerchant):
3748         * UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
3749         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h:
3750         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
3751         (WebKit::toPKPaymentRequest):
3752         * UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm:
3753         (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
3754         * UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
3755         (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
3756         * UIProcess/Automation/WebAutomationSession.cpp:
3757         (WebKit::WebAutomationSession::navigateBrowsingContext):
3758         (WebKit::domainByAddingDotPrefixIfNeeded):
3759         (WebKit::WebAutomationSession::addSingleCookie):
3760         (WebKit::WebAutomationSession::deleteAllCookies):
3761         * UIProcess/Cocoa/DownloadClient.mm:
3762         (WebKit::DownloadClient::didFinish):
3763         * UIProcess/Cocoa/NavigationState.h:
3764         * UIProcess/Cocoa/NavigationState.mm:
3765         (WebKit::NavigationState::NavigationClient::webGLLoadPolicy const):
3766         (WebKit::NavigationState::NavigationClient::resolveWebGLLoadPolicy const):
3767         (WebKit::NavigationState::NavigationClient::contentRuleListNotification):
3768         (WebKit::NavigationState::NavigationClient::willPerformClientRedirect):
3769         (WebKit::NavigationState::NavigationClient::didPerformClientRedirect):
3770         (WebKit::NavigationState::NavigationClient::signedPublicKeyAndChallengeString):
3771         * UIProcess/Cocoa/SafeBrowsingResultCocoa.mm: Copied from Source/WebKit/WebProcess/Network/WebSocketProvider.h.
3772         (WebKit::SafeBrowsingResult::SafeBrowsingResult):
3773         * UIProcess/Cocoa/SafeBrowsingWarningCocoa.mm:
3774         (WebKit::reportAnErrorURL):
3775         (WebKit::malwareDetailsURL):
3776         (WebKit::safeBrowsingDetailsText):
3777         (WebKit::SafeBrowsingWarning::SafeBrowsingWarning):
3778         * UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:
3779         (-[_WKPreviewControllerDataSource finish:]):
3780         (WebKit::SystemPreviewController::finish):
3781         * UIProcess/Cocoa/UIDelegate.h:
3782         * UIProcess/Cocoa/UIDelegate.mm:
3783         (WebKit::UIDelegate::UIClient::createNewPage):
3784         (WebKit::UIDelegate::UIClient::saveDataToFileInDownloadsFolder):
3785         (WebKit::requestUserMediaAuthorizationForDevices):
3786         (WebKit::UIDelegate::UIClient::checkUserMediaPermissionForOrigin):
3787         * UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.mm:
3788         (-[WKReloadFrameErrorRecoveryAttempter attemptRecovery]):
3789         * UIProcess/Cocoa/WKSafeBrowsingWarning.h:
3790         * UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
3791         (-[WKSafeBrowsingWarning initWithFrame:safeBrowsingWarning:completionHandler:]):
3792         * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
3793         * UIProcess/Cocoa/WebViewImpl.h:
3794         * UIProcess/Cocoa/WebViewImpl.mm:
3795         (WebKit::WebViewImpl::showSafeBrowsingWarning):
3796         (WebKit::WebViewImpl::writeToURLForFilePromiseProvider):
3797         * UIProcess/Downloads/DownloadProxy.cpp:
3798         (WebKit::DownloadProxy::publishProgress):
3799         * UIProcess/Downloads/DownloadProxy.h:
3800         (WebKit::DownloadProxy::setRedirectChain):
3801         (WebKit::DownloadProxy::redirectChain const):
3802         * UIProcess/FrameLoadState.cpp:
3803         (WebKit::FrameLoadState::didStartProvisionalLoad):
3804         (WebKit::FrameLoadState::didReceiveServerRedirectForProvisionalLoad):
3805         (WebKit::FrameLoadState::didSameDocumentNotification):
3806         (WebKit::FrameLoadState::setUnreachableURL):
3807         * UIProcess/FrameLoadState.h:
3808         (WebKit::FrameLoadState::url const):
3809         (WebKit::FrameLoadState::setURL):
3810         (WebKit::FrameLoadState::provisionalURL const):
3811         (WebKit::FrameLoadState::unreachableURL const):
3812         * UIProcess/Network/NetworkProcessProxy.cpp:
3813         (WebKit::NetworkProcessProxy::writeBlobToFilePath):
3814         * UIProcess/Network/NetworkProcessProxy.h:
3815         * UIProcess/PageClient.h:
3816         (WebKit::PageClient::showSafeBrowsingWarning):
3817         * UIProcess/PageLoadState.cpp:
3818         (WebKit::PageLoadState::hasOnlySecureContent):
3819         * UIProcess/Plugins/PluginInfoStore.cpp:
3820         * UIProcess/Plugins/PluginInfoStore.h:
3821         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
3822         * UIProcess/SafeBrowsingResult.h: Copied from Source/WebKit/UIProcess/SystemPreviewController.h.
3823         (WebKit::SafeBrowsingResult::create):
3824         (WebKit::SafeBrowsingResult::url const):
3825         (WebKit::SafeBrowsingResult::provider const):
3826         (WebKit::SafeBrowsingResult::isPhishing const):
3827         (WebKit::SafeBrowsingResult::isMalware const):
3828         (WebKit::SafeBrowsingResult::isUnwantedSoftware const):
3829         (WebKit::SafeBrowsingResult::isKnownToBeUnsafe const):
3830         * UIProcess/SafeBrowsingWarning.h:
3831         (WebKit::SafeBrowsingWarning::create):
3832         * UIProcess/SuspendedPageProxy.cpp:
3833         * UIProcess/SystemPreviewController.h:
3834         * UIProcess/WebCookieManagerProxy.h:
3835         * UIProcess/WebFrameProxy.h:
3836         (WebKit::WebFrameProxy::url const):
3837         (WebKit::WebFrameProxy::provisionalURL const):
3838         (WebKit::WebFrameProxy::unreachableURL const):
3839         * UIProcess/WebInspectorProxy.h:
3840         * UIProcess/WebOpenPanelResultListenerProxy.cpp:
3841         * UIProcess/WebPageProxy.cpp:
3842         (WebKit::WebPageProxy::loadDataWithNavigation):
3843         (WebKit::WebPageProxy::loadAlternateHTML):
3844         (WebKit::WebPageProxy::loadWebArchiveData):
3845         (WebKit::WebPageProxy::navigateToPDFLinkWithSimulatedClick):
3846         (WebKit::WebPageProxy::continueNavigationInNewProcess):
3847         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
3848         (WebKit::WebPageProxy::didChangeProvisionalURLForFrame):
3849         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
3850         (WebKit::WebPageProxy::contentRuleListNotification):
3851         (WebKit::WebPageProxy::processDidTerminate):
3852         (WebKit::WebPageProxy::signedPublicKeyAndChallengeString):
3853         (WebKit::WebPageProxy::setURLSchemeHandlerForScheme):
3854         * UIProcess/WebPageProxy.h:
3855         * UIProcess/WebPageProxy.messages.in:
3856         * UIProcess/WebProcessPool.cpp:
3857         (WebKit::WebProcessPool::tryPrewarmWithDomainInformation):
3858         * UIProcess/WebProcessPool.h:
3859         * UIProcess/WebProcessProxy.cpp:
3860         (WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch):
3861         * UIProcess/WebProcessProxy.h:
3862         * UIProcess/WebResourceLoadStatisticsStore.cpp:
3863         (WebKit::WebResourceLoadStatisticsStore::setPrevalentResourceForDebugMode):
3864         (WebKit::WebResourceLoadStatisticsStore::logFrameNavigation):
3865         * UIProcess/WebResourceLoadStatisticsStore.h:
3866         * UIProcess/ios/DragDropInteractionState.h:
3867         * UIProcess/ios/PageClientImplIOS.h:
3868         * UIProcess/ios/PageClientImplIOS.mm:
3869         (WebKit::PageClientImpl::showSafeBrowsingWarning):
3870         * UIProcess/ios/WKActionSheetAssistant.mm:
3871         (-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
3872         * UIProcess/ios/WKContentViewInteraction.mm:
3873         (-[WKContentView actionSheetAssistant:shareElementWithURL:rect:]):
3874         (-[WKContentView _presentedViewControllerForPreviewItemController:]):
3875         * UIProcess/ios/WKGeolocationProviderIOS.mm:
3876         (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]):
3877         * UIProcess/ios/WKLegacyPDFView.mm:
3878         (-[WKLegacyPDFView actionSheetAssistant:shareElementWithURL:rect:]):
3879         * UIProcess/ios/WKPDFView.mm:
3880         (-[WKPDFView actionSheetAssistant:shareElementWithURL:rect:]):
3881         * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
3882         (-[WKFullScreenWindowController _updateLocationInfo]):
3883         * UIProcess/mac/LegacySessionStateCoding.cpp:
3884         (WebKit::decodeLegacySessionState):
3885         * UIProcess/mac/PageClientImplMac.h:
3886         * UIProcess/mac/PageClientImplMac.mm:
3887         (WebKit::PageClientImpl::showSafeBrowsingWarning):
3888         * UIProcess/mac/WKImmediateActionController.mm:
3889         (-[WKImmediateActionController _defaultAnimationController]):
3890         * UIProcess/win/WebInspectorProxyWin.cpp:
3891         * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
3892         (WebKit::WebPaymentCoordinator::showPaymentUI):
3893         (WebKit::WebPaymentCoordinator::validateMerchant):
3894         * WebProcess/ApplePay/WebPaymentCoordinator.h:
3895         * WebProcess/Cache/WebCacheStorageConnection.cpp:
3896         (WebKit::WebCacheStorageConnection::doRetrieveRecords):
3897         * WebProcess/Cache/WebCacheStorageConnection.h:
3898         * WebProcess/FileAPI/BlobRegistryProxy.cpp:
3899         (WebKit::BlobRegistryProxy::registerFileBlobURL):
3900         * WebProcess/FileAPI/BlobRegistryProxy.h:
3901         * WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h:
3902         (API::InjectedBundle::PageLoaderClient::willLoadDataRequest):
3903         (API::InjectedBundle::PageLoaderClient::userAgentForURL const):
3904         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3905         (WKBundleFrameAllowsFollowingLink):
3906         (WKBundleFrameCopySuggestedFilenameForResourceWithURL):
3907         (WKBundleFrameCopyMIMETypeForResourceWithURL):
3908         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3909         (WKBundlePageHasLocalDataForURL):
3910         * WebProcess/InjectedBundle/API/gtk/DOM/ConvertToUTF8String.cpp:
3911         (convertToUTF8String):
3912         * WebProcess/InjectedBundle/API/gtk/DOM/ConvertToUTF8String.h:
3913         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
3914         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
3915         * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
3916         * WebProcess/Network/WebLoaderStrategy.cpp:
3917         (WebKit::WebLoaderStrategy::preconnectTo):
3918         * WebProcess/Network/WebLoaderStrategy.h:
3919         * WebProcess/Network/WebSocketProvider.h:
3920         * WebProcess/Network/WebSocketStream.cpp:
3921         (WebKit::WebSocketStream::WebSocketStream):
3922         * WebProcess/Network/WebSocketStream.h:
3923         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3924         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3925         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
3926         * WebProcess/Plugins/PDF/PDFPlugin.h:
3927         * WebProcess/Plugins/PDF/PDFPlugin.mm:
3928         (WebKit::PDFPlugin::clickedLink):
3929         * WebProcess/Plugins/Plugin.h:
3930         * WebProcess/Plugins/PluginController.h:
3931         * WebProcess/Plugins/PluginProxy.h:
3932         * WebProcess/Plugins/PluginView.cpp:
3933         (WebKit::PluginView::performURLRequest):
3934         (WebKit::PluginView::performJavaScriptURLRequest):
3935         * WebProcess/Plugins/WebPluginInfoProvider.cpp:
3936         (WebKit::WebPluginInfoProvider::webVisiblePluginInfo):
3937         * WebProcess/Plugins/WebPluginInfoProvider.h:
3938         * WebProcess/Storage/WebSWClientConnection.h:
3939         * WebProcess/Storage/WebSWContextManagerConnection.h:
3940         * WebProcess/UserContent/WebUserContentController.h:
3941         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3942         (WebKit::WebChromeClient::signedPublicKeyAndChallengeString const):
3943         * WebProcess/WebCoreSupport/WebChromeClient.h:
3944         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
3945         * WebProcess/WebCoreSupport/WebDragClient.h:
3946         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3947         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
3948         (WebKit::WebFrameLoaderClient::shouldForceUniversalAccessFromLocalURL):
3949         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3950         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3951         (WebKit::WebPlatformStrategies::readURLFromPasteboard):
3952         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3953         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
3954         (WebKit::WebDragClient::declareAndWriteDragImage):
3955         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
3956         * WebProcess/WebPage/VisitedLinkTableController.h:
3957         * WebProcess/WebPage/WebFrame.cpp:
3958         (WebKit::WebFrame::allowsFollowingLink const):
3959         * WebProcess/WebPage/WebFrame.h:
3960         * WebProcess/WebPage/WebPage.cpp:
3961         (WebKit::WebPage::loadURLInFrame):
3962         (WebKit::WebPage::loadData):
3963         (WebKit::WebPage::loadAlternateHTML):
3964         (WebKit::WebPage::dumpHistoryForTesting):
3965         (WebKit::WebPage::sendCSPViolationReport):
3966         (WebKit::WebPage::addUserScript):
3967         (WebKit::WebPage::addUserStyleSheet):
3968         * WebProcess/WebPage/WebPage.h:
3969         * WebProcess/WebPage/WebPage.messages.in:
3970         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
3971         (WebKit::WebPrintOperationGtk::frameURL const):
3972         * WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
3973         * WebProcess/WebProcess.cpp:
3974         (WebKit::WebProcess::sendPrewarmInformation):
3975         * WebProcess/WebProcess.h:
3976         * WebProcess/cocoa/WebProcessCocoa.mm:
3977         (WebKit::activePagesOrigins):
3978
3979 2018-11-30  Per Arne Vollan  <pvollan@apple.com>
3980
3981         [macOS] Add more logging of sandbox call entries.
3982         https://bugs.webkit.org/show_bug.cgi?id=192261
3983         rdar://problem/45772445
3984
3985         Reviewed by Dean Jackson.
3986
3987         * WebProcess/com.apple.WebProcess.sb.in:
3988
3989 2018-11-30  Tim Horton  <timothy_horton@apple.com>
3990
3991         Editable images should always return some data, even if the canvas doesn't have a size yet
3992         https://bugs.webkit.org/show_bug.cgi?id=192265
3993         <rdar://problem/46385911>
3994
3995         Reviewed by Wenson Hsieh.
3996
3997         * UIProcess/ios/WKDrawingView.mm:
3998         (-[WKDrawingView layoutSubviews]):
3999         (emptyImage):
4000         (-[WKDrawingView renderedDrawing]):
4001         (-[WKDrawingView PNGRepresentation]):
4002         Some clients strongly depend on there being some data in an image, even if
4003         it's not of a usable size yet. We'll invalidate the attachment when the
4004         canvas size changes, so it will eventually settle at a usable size (after
4005         the first layer tree commit that includes the editable image).
4006
4007 2018-11-30  Don Olmstead  <don.olmstead@sony.com>
4008
4009         Rename ENABLE_SUBTLE_CRYPTO to ENABLE_WEB_CRYPTO
4010         https://bugs.webkit.org/show_bug.cgi?id=192197
4011
4012         Reviewed by Jiewen Tan.
4013
4014         * Configurations/FeatureDefines.xcconfig:
4015         * UIProcess/API/C/WKPage.cpp:
4016         (WKPageSetPageNavigationClient):