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