[iOS] [WK2] Modernize autocorrection context code
[WebKit-https.git] / Source / WebKit / ChangeLog
1 2019-02-07  Wenson Hsieh  <wenson_hsieh@apple.com>
2
3         [iOS] [WK2] Modernize autocorrection context code
4         https://bugs.webkit.org/show_bug.cgi?id=194373
5
6         Reviewed by Tim Horton.
7
8         * Shared/ios/WebAutocorrectionContext.h: Added.
9         (WebKit::WebAutocorrectionContext::encode const):
10         (WebKit::WebAutocorrectionContext::decode):
11
12         Introduce a WebAutocorrectionContext struct that encapsulates the individual pieces of autocorrection context.
13         Change to use this instead of a long list of arguments when propagating autocorrection context information over
14         IPC.
15
16         * UIProcess/AutoCorrectionCallback.h:
17         * UIProcess/WebPageProxy.h:
18         * UIProcess/WebPageProxy.messages.in:
19         * UIProcess/ios/WKContentViewInteraction.h:
20         * UIProcess/ios/WKContentViewInteraction.mm:
21         (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
22         (+[WKAutocorrectionContext autocorrectionContextWithContext:]):
23         (+[WKAutocorrectionContext autocorrectionContextWithData:markedText:selectedText:afterText:selectedRangeInMarkedText:]): Deleted.
24
25         Change this constructor to take an entire WebAutocorrectionContext.
26
27         * UIProcess/ios/WebPageProxyIOS.mm:
28         (WebKit::WebPageProxy::autocorrectionContextCallback):
29         (WebKit::WebPageProxy::requestAutocorrectionContext):
30         (WebKit::WebPageProxy::autocorrectionContextSync):
31         (WebKit::WebPageProxy::getAutocorrectionContext): Deleted.
32         * WebKit.xcodeproj/project.pbxproj:
33         * WebProcess/WebPage/WebPage.h:
34         * WebProcess/WebPage/WebPage.messages.in:
35
36         Use Delayed instead of LegacySync.
37
38         * WebProcess/WebPage/ios/WebPageIOS.mm:
39         (WebKit::WebPage::autocorrectionContext):
40
41         Renamed from computeAutocorrectionContext. This is now a private method on WebPage that uses the focused or main
42         frame to compute and return a WebAutocorrectionContext.
43
44         (WebKit::WebPage::requestAutocorrectionContext):
45         (WebKit::WebPage::autocorrectionContextSync):
46
47         Renamed getAutocorrectionContext to autocorrectionContextSync.
48
49         (WebKit::computeAutocorrectionContext): Deleted.
50         (WebKit::WebPage::getAutocorrectionContext): Deleted.
51
52 2019-02-07  Youenn Fablet  <youenn@apple.com>
53
54         Simplify applyConstraints callbacks
55         https://bugs.webkit.org/show_bug.cgi?id=194297
56
57         Reviewed by Eric Carlson.
58
59         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
60         (WebKit::UserMediaCaptureManagerProxy::applyConstraints):
61         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
62         (WebKit::UserMediaCaptureManager::Source::applyConstraintsSucceeded):
63         (WebKit::UserMediaCaptureManager::Source::applyConstraintsFailed):
64         (WebKit::UserMediaCaptureManager::applyConstraintsFailed):
65         * WebProcess/cocoa/UserMediaCaptureManager.h:
66
67 2019-02-07  Brent Fulgham  <bfulgham@apple.com>
68
69         Permit additional IOKit Properties needed by Media PlugIns on older Mac Hardware
70         https://bugs.webkit.org/show_bug.cgi?id=194412
71         <rdar://problem/47820615>
72
73         Reviewed by Per Arne Vollan.
74
75         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
76
77 2019-02-07  Brent Fulgham  <bfulgham@apple.com>
78
79         Permit additional IOKit Properties needed by older Mac Hardware
80         https://bugs.webkit.org/show_bug.cgi?id=194410
81         <rdar://problem/47820620>
82
83         Reviewed by Per Arne Vollan.
84
85         * WebProcess/com.apple.WebProcess.sb.in:
86
87 2019-02-07  Brady Eidson  <beidson@apple.com>
88
89         Rename the TAKE_DOWNLOAD_ASSERTION macro.
90
91         Rubberstamped by Andy Estes.
92
93         * NetworkProcess/Downloads/DownloadMap.cpp:
94         * NetworkProcess/Downloads/DownloadMap.h:
95
96 2019-02-07  Keith Rollin  <krollin@apple.com>
97
98         Fix XCBuild issue related to codesigning WebContent process
99         https://bugs.webkit.org/show_bug.cgi?id=193799
100         <rdar://problem/47533890>
101
102         Reviewed by Brent Fulgham.
103
104         Building with XCBuild enabled results in the error message "cannot
105         read entitlement data" when trying to codesign the macOS XPC
106         processes. The reason for this error message is that there is a build
107         step that deletes any previous "stale" generated .xcent file before
108         building up a new one. With XCBuild enabled, the build steps got
109         re-ordered, such that the step that deletes this file could get
110         executed after the steps that build up the file. The built-up set of
111         entitlements is now gone, and the build process fails when `codesign`
112         tries to access it.
113
114         The apparent quick-fix to this problem -- of tweaking dependencies so
115         that the build steps execute in the desired order -- wouldn't work
116         with XCBuild. Establishing these dependencies would require both
117         having multiple build phases produce the same .xcent file as output,
118         as well as a build phase that has this file as an input and an output.
119         XCBuild either forbids or frowns upon these configurations.
120
121         Ultimately, the solution that worked was to take over complete control
122         of the codesigning process. This means (a) not specifying a base
123         .entitlements file that XCode uses to start with (and which was
124         subsequently altered via custom build scripts), (b) not letting XCode
125         automatically and silently inject a 'get-task-all' entitlement used to
126         facilitate debugging (we now add that entitlement by hand), and (c)
127         building up all of our entitlements by hand via a single custom
128         script. Because of the addition of this custom script, many other
129         scripts and entitlements files could now be removed.
130
131         * Configurations/BaseXPCService.xcconfig:
132         * Configurations/Databases-iOS.entitlements: Removed.
133         * Configurations/Network-OSX-restricted.entitlements: Removed.
134         * Configurations/Network-OSX-sandbox.entitlements: Removed.
135         * Configurations/Network-OSX.entitlements: Removed.
136         * Configurations/NetworkService.xcconfig:
137         * Configurations/PluginService.64.xcconfig:
138         * Configurations/PluginService.entitlements: Removed.
139         * Configurations/WebContent-OSX-sandbox.entitlements: Removed.
140         * Configurations/WebContent-OSX.entitlements: Removed.
141         * Configurations/WebContent-or-Plugin-OSX-restricted.entitlements: Removed.
142         * Configurations/WebContentService.xcconfig:
143         * Scripts/copy-webcontent-resources-to-private-headers.sh:
144         * Scripts/process-entitlements.sh: Added.
145         * Scripts/process-network-sandbox-entitlements.sh: Removed.
146         * Scripts/process-webcontent-or-plugin-entitlements.sh: Removed.
147         * Scripts/process-webcontent-sandbox-entitlements.sh: Removed.
148         * WebKit.xcodeproj/project.pbxproj:
149
150 2019-02-07  Alex Christensen  <achristensen@webkit.org>
151
152         Fix internal build after r241127
153         https://bugs.webkit.org/show_bug.cgi?id=191394
154
155         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
156         Add some (un)availability macros.
157
158 2019-02-07  Youenn Fablet  <youenn@apple.com>
159
160         Make to clear sources from UserMediaCaptureManagerProxy and UserMediaCaptureManager when no longer needed
161         https://bugs.webkit.org/show_bug.cgi?id=194312
162
163         Reviewed by Eric Carlson.
164
165         Sources in UserMediaCaptureManager and Proxy are never removed once added to their HashMap.
166         Use the 'ended' mechanism to do the clean-up on WebProcess side.
167         As part of this clean-up, send IPC to UIProcess to do clean-up on proxy side.
168         On WebProcess crash case, clean-up the proxy as well.
169
170         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
171         (WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):
172         (WebKit::UserMediaCaptureManagerProxy::end):
173         (WebKit::UserMediaCaptureManagerProxy::clear):
174         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
175         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
176         * UIProcess/WebProcessProxy.cpp:
177         (WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch):
178         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
179         (WebKit::UserMediaCaptureManager::sourceEnded):
180         * WebProcess/cocoa/UserMediaCaptureManager.h:
181
182 2019-02-07  Alex Christensen  <achristensen@webkit.org>
183
184         Print backgrounds preference should be honored instead of WKWebViewConfiguration value
185         https://bugs.webkit.org/show_bug.cgi?id=194364
186         <rdar://problem/47627599>
187
188         Reviewed by Tim Horton.
189
190         Without this patch, changing the preference for printing the background has no effect.
191         This patch fixes that, and I verified it manually by checking "Print backgrounds" in Safari's print menu.
192         Unfortunately, the only way to test this is actually printing because only values from WebPageProxy::preferences
193         or WebPageProxy::configuration's preferences are exposed to the API, but values from WebPageProxy::preferencesStore
194         are used when printing.  Actually printing verifies this change fixes the bug.
195
196         * UIProcess/API/Cocoa/WKWebView.mm:
197         (-[WKWebView _initializeWithConfiguration:]):
198
199 2019-02-07  Chris Dumez  <cdumez@apple.com>
200
201         Mark DisplayLink as fast allocated
202         https://bugs.webkit.org/show_bug.cgi?id=194400
203
204         Reviewed by Geoffrey Garen.
205
206         * UIProcess/mac/DisplayLink.h:
207
208 2019-02-07  Per Arne Vollan  <pvollan@apple.com>
209
210         [macOS] API test times out after r241026
211         https://bugs.webkit.org/show_bug.cgi?id=194372
212
213         Reviewed by Alex Christensen.
214
215         The API test TestWebKitAPI.RenderingProgress.FirstMeaningfulPaint times out after r241026.
216         A new function pointer, layoutMilestones, is added to WKBundlePageLoaderClient, in order
217         for clients to decide which milestones they would like to listen for.
218
219         * WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h:
220         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
221         (layoutMilestones):
222         (setUpPageLoaderClient):
223         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
224         (WebKit::InjectedBundlePageLoaderClient::layoutMilestones const):
225         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
226
227 2019-02-07  Alex Christensen  <achristensen@webkit.org>
228
229         Deprecate WKBundlePageSetDefersLoading
230         https://bugs.webkit.org/show_bug.cgi?id=191394
231
232         Reviewed by Dean Jackson.
233
234         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
235         (WKBundlePageSetDefersLoading):
236         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
237         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
238         (-[WKWebProcessPlugInBrowserContextController _defersLoading]):
239         (-[WKWebProcessPlugInBrowserContextController _setDefersLoading:]):
240         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
241
242 2019-02-07  Alex Christensen  <achristensen@webkit.org>
243
244         Digital crown should scroll safe browsing warning on watchOS
245         https://bugs.webkit.org/show_bug.cgi?id=194363
246         <rdar://problem/47348124>
247
248         Reviewed by Wenson Hsieh.
249
250         * UIProcess/Cocoa/WKSafeBrowsingWarning.h:
251         * UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
252         (-[WKSafeBrowsingWarning initWithFrame:safeBrowsingWarning:completionHandler:]):
253         (-[WKSafeBrowsingWarning addContent]):
254
255 2019-02-07  Alex Christensen  <achristensen@webkit.org>
256
257         Shrink and hyphenate safe browsing warning text on watchOS
258         https://bugs.webkit.org/show_bug.cgi?id=194361
259         <rdar://problem/47466549>
260
261         Reviewed by Geoffrey Garen.
262
263         Some internationalizations use long words that didn't fit on small watches.
264
265         * UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
266         (fontOfSize):
267         (-[WKSafeBrowsingWarning addContent]):
268         (-[WKSafeBrowsingTextView initWithAttributedString:forWarning:]):
269
270 2019-02-07  Miguel Gomez  <magomez@igalia.com>
271
272         [WPE] Implement GStreamer based holepunch
273         https://bugs.webkit.org/show_bug.cgi?id=193715
274
275         Reviewed by Xabier Rodriguez-Calvar.
276
277         Add a new parameter to the calls of TextureMapper::drawSolidColor().
278
279         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
280         (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
281
282 2019-02-06  Benjamin Poulain  <benjamin@webkit.org>
283
284         Unreviewed, rolling out r240759 and r240944.
285
286         Some timer uses are done off the main thread, WebCore::Timer
287         cannot be used
288
289         Reverted changesets:
290
291         "<rdar://problem/47570443> Responsiveness timers are too
292         expensive for frequent events"
293         https://bugs.webkit.org/show_bug.cgi?id=194003
294         https://trac.webkit.org/changeset/240759
295
296         "Use deferrable timer to restart the Responsiveness Timer on
297         each wheel event"
298         https://bugs.webkit.org/show_bug.cgi?id=194135
299         https://trac.webkit.org/changeset/240944
300
301 2019-02-06  chris fleizach  <cfleizach@apple.com>
302
303         AX:  com.apple.WebKit.WebContent at WebKit: -[WKAccessibilityWebPageObjectBase axObjectCache]
304         https://bugs.webkit.org/show_bug.cgi?id=194306
305         <rdar://problem/47764549>
306
307         Reviewed by Zalan Bujtas.
308
309         Check the page reference is still valid.
310         Modernize code in this area.
311
312         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
313
314 2019-02-06  Daniel Bates  <dabates@apple.com>
315
316         Move toNSEventModifierFlags() and toNSButtonNumber() to WebEventFactory.mm
317         https://bugs.webkit.org/show_bug.cgi?id=194321
318
319         Reviewed by Jer Noble.
320
321         Move some code to WebEventFactory so that it can be shared by both WKNavigationAction.mm
322         and UIDelegate.mm among other benefits.
323
324         * Shared/mac/WebEventFactory.h:
325         * Shared/mac/WebEventFactory.mm:
326         (WebKit::WebEventFactory::toNSEventModifierFlags):
327         (WebKit::WebEventFactory::toNSButtonNumber):
328         * UIProcess/API/Cocoa/WKNavigationAction.mm:
329         (-[WKNavigationAction modifierFlags]):
330         (-[WKNavigationAction buttonNumber]):
331         (toNSEventModifierFlags): Deleted.
332         (toNSButtonNumber): Deleted.
333         * UIProcess/Cocoa/UIDelegate.mm:
334         (WebKit::UIDelegate::UIClient::mouseDidMoveOverElement):
335         (WebKit::toNSEventModifierFlags): Deleted.
336
337 2019-02-06  Andy Estes  <aestes@apple.com>
338
339         [Payment Request] It should be possible to require a phonetic name for shipping contacts
340         https://bugs.webkit.org/show_bug.cgi?id=194311
341         <rdar://46733045>
342
343         Reviewed by Alex Christensen.
344
345         * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
346         (WebKit::WebPaymentCoordinator::supportsVersion): Deleted.
347         * WebProcess/ApplePay/WebPaymentCoordinator.h:
348
349 2019-02-06  Keith Rollin  <krollin@apple.com>
350
351         Really enable the automatic checking and regenerations of .xcfilelists during builds
352         https://bugs.webkit.org/show_bug.cgi?id=194357
353         <rdar://problem/47861231>
354
355         Reviewed by Chris Dumez.
356
357         Bug 194124 was supposed to enable the automatic checking and
358         regenerating of .xcfilelist files during the build. While related
359         changes were included in that patch, the change to actually enable the
360         operation somehow was omitted. This patch actually enables the
361         operation. The check-xcfilelist.sh scripts now check
362         WK_DISABLE_CHECK_XCFILELISTS, and if it's "1", opts-out the developer
363         from the checking.
364
365         * Scripts/check-xcfilelists.sh:
366
367 2019-02-06  John Wilander  <wilander@apple.com>
368
369         Forward Ad Click Attribution data from HTMLAnchorElement::handleClick() to WebKit::NavigationActionData
370         https://bugs.webkit.org/show_bug.cgi?id=194325
371         <rdar://problem/47840283>
372
373         Reviewed by Chris Dumez.
374
375         * Shared/NavigationActionData.cpp:
376         (WebKit::NavigationActionData::encode const):
377         (WebKit::NavigationActionData::decode):
378         * Shared/NavigationActionData.h:
379             Now holds an optional WebCore::AdClickAttribution object.
380
381 2019-02-06  Daniel Bates  <dabates@apple.com>
382
383         Fix the Apple Internal build. See <rdar://problem/47860943> for more details.
384
385         * UIProcess/ios/fullscreen/WKFullscreenStackView.mm:
386         (-[WKFullscreenStackView init]):
387
388 2019-02-06  Daniel Bates  <dabates@apple.com>
389
390         Standardize on ControlKey instead of CtrlKey
391         https://bugs.webkit.org/show_bug.cgi?id=194317
392
393         Reviewed by Tim Horton.
394
395         * Shared/WebEventConversion.cpp:
396         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
397         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
398         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
399         (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
400         (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
401         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
402         (WebKit::WebEditorClient::handleKeyboardEvent):
403         * WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp:
404         (WebKit::handleKeyPress):
405
406 2019-02-06  Per Arne Vollan  <pvollan@apple.com>
407
408         Roll out parts of r238819 since it is a PLT performance regression.
409         https://bugs.webkit.org/show_bug.cgi?id=194346
410
411         Unreviewed performance fix.
412
413         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
414         (didStartProvisionalLoadForFrame):
415         (didReceiveServerRedirectForProvisionalLoadForFrame):
416         (didFinishLoadForFrame):
417         (globalObjectIsAvailableForFrame):
418         (didRemoveFrameFromHierarchy):
419         (didCommitLoadForFrame):
420         (didFinishDocumentLoadForFrame):
421         (didFailProvisionalLoadWithErrorForFrame):
422         (didFailLoadWithErrorForFrame):
423         (didSameDocumentNavigationForFrame):
424         (didLayoutForFrame):
425         (didReachLayoutMilestone):
426         (didFirstVisuallyNonEmptyLayoutForFrame):
427         (didHandleOnloadEventsForFrame):
428         (userAgentForURL):
429         (setUpPageLoaderClient):
430         (willSendRequestForFrame):
431         (didInitiateLoadForResource):
432         (didFinishLoadForResource):
433         (didFailLoadForResource):
434         (setUpResourceLoadClient):
435         (-[WKWebProcessPlugInBrowserContextController setLoadDelegate:]):
436         (ResourceLoadClient::ResourceLoadClient): Deleted.
437         (ResourceLoadClient::loadDelegate const): Deleted.
438         (ResourceLoadClient::pluginContextController const): Deleted.
439         (PageLoaderClient::PageLoaderClient): Deleted.
440         (PageLoaderClient::loadDelegate const): Deleted.
441         (PageLoaderClient::pluginContextController const): Deleted.
442         (PageLoaderClient::didStartProvisionalLoadForFrame): Deleted.
443         (PageLoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame): Deleted.
444         (PageLoaderClient::didFinishLoadForFrame): Deleted.
445         (PageLoaderClient::globalObjectIsAvailableForFrame): Deleted.
446         (PageLoaderClient::didRemoveFrameFromHierarchy): Deleted.
447         (PageLoaderClient::didCommitLoadForFrame): Deleted.
448         (PageLoaderClient::didFinishDocumentLoadForFrame): Deleted.
449         (PageLoaderClient::didFailProvisionalLoadWithErrorForFrame): Deleted.
450         (PageLoaderClient::didFailLoadWithErrorForFrame): Deleted.
451         (PageLoaderClient::didSameDocumentNavigationForFrame): Deleted.
452         (PageLoaderClient::didLayoutForFrame): Deleted.
453         (PageLoaderClient::didReachLayoutMilestone): Deleted.
454         (PageLoaderClient::didFirstVisuallyNonEmptyLayoutForFrame): Deleted.
455         (PageLoaderClient::layoutMilestones const): Deleted.
456         (PageLoaderClient::didHandleOnloadEventsForFrame): Deleted.
457         (PageLoaderClient::userAgentForURL const): Deleted.
458         (ResourceLoadClient::willSendRequestForFrame): Deleted.
459         (ResourceLoadClient::didInitiateLoadForResource): Deleted.
460         (ResourceLoadClient::didFinishLoadForResource): Deleted.
461         (ResourceLoadClient::didFailLoadForResource): Deleted.
462
463 2019-02-06  Michael Catanzaro  <mcatanzaro@igalia.com>
464
465         REGRESSION(r240785): [SOUP] Broke cookie persistent storage
466         https://bugs.webkit.org/show_bug.cgi?id=194209
467
468         Reviewed by Carlos Garcia Campos.
469
470         I missed a spot when moving the persistent storage parameters from NetworkProcess to
471         NetworkSession. They have to be initialized separately for the default session.
472
473         * UIProcess/soup/WebProcessPoolSoup.cpp:
474         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
475
476 2019-02-05  Alex Christensen  <achristensen@webkit.org>
477
478         Stop using blobRegistry in NetworkProcess
479         https://bugs.webkit.org/show_bug.cgi?id=194027
480
481         Reviewed by Youenn Fablet.
482
483         * NetworkProcess/Downloads/DownloadManager.cpp:
484         (WebKit::DownloadManager::startDownload):
485         * NetworkProcess/Downloads/PendingDownload.cpp:
486         (WebKit::PendingDownload::PendingDownload):
487         * NetworkProcess/Downloads/PendingDownload.h:
488         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
489         (WebKit::NetworkBlobRegistry::registerFileBlobURL):
490         (WebKit::NetworkBlobRegistry::registerBlobURL):
491         (WebKit::NetworkBlobRegistry::registerBlobURLOptionallyFileBacked):
492         (WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
493         (WebKit::NetworkBlobRegistry::unregisterBlobURL):
494         (WebKit::NetworkBlobRegistry::blobSize):
495         (WebKit::NetworkBlobRegistry::writeBlobsToTemporaryFiles):
496         (WebKit::NetworkBlobRegistry::writeBlobToFilePath):
497         (WebKit::NetworkBlobRegistry::connectionToWebProcessDidClose):
498         (WebKit::NetworkBlobRegistry::filesInBlob):
499         (WebKit::NetworkBlobRegistry::singleton): Deleted.
500         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
501         (WebKit::NetworkBlobRegistry::blobRegistry):
502         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
503         (WebKit::NetworkConnectionToWebProcess::didClose):
504         (WebKit::NetworkConnectionToWebProcess::resolveBlobReferences):
505         (WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
506         (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
507         (WebKit::NetworkConnectionToWebProcess::loadPing):
508         (WebKit::NetworkConnectionToWebProcess::preconnectTo):
509         (WebKit::NetworkConnectionToWebProcess::registerFileBlobURL):
510         (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
511         (WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL):
512         (WebKit::NetworkConnectionToWebProcess::registerBlobURLOptionallyFileBacked):
513         (WebKit::NetworkConnectionToWebProcess::registerBlobURLForSlice):
514         (WebKit::NetworkConnectionToWebProcess::unregisterBlobURL):
515         (WebKit::NetworkConnectionToWebProcess::blobSize):
516         (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
517         (WebKit::NetworkConnectionToWebProcess::filesInBlob):
518         (WebKit::NetworkConnectionToWebProcess::blobRegistry):
519         * NetworkProcess/NetworkConnectionToWebProcess.h:
520         * NetworkProcess/NetworkDataTask.cpp:
521         (WebKit::NetworkDataTask::create):
522         * NetworkProcess/NetworkDataTaskBlob.cpp:
523         (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
524         * NetworkProcess/NetworkDataTaskBlob.h:
525         * NetworkProcess/NetworkLoad.cpp:
526         (WebKit::NetworkLoad::NetworkLoad):
527         (WebKit::NetworkLoad::initialize):
528         * NetworkProcess/NetworkLoad.h:
529         * NetworkProcess/NetworkProcess.cpp:
530         (WebKit::NetworkProcess::NetworkProcess):
531         (WebKit::NetworkProcess::removeNetworkConnectionToWebProcess):
532         * NetworkProcess/NetworkProcess.h:
533         (WebKit::NetworkProcess::networkBlobRegistry):
534         * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
535         (WebKit::NetworkProcessPlatformStrategies::createBlobRegistry):
536         * NetworkProcess/NetworkResourceLoader.cpp:
537         (WebKit::m_shouldCaptureExtraNetworkLoadMetrics):
538         (WebKit::NetworkResourceLoader::startNetworkLoad):
539         * NetworkProcess/PreconnectTask.cpp:
540         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
541         (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
542
543 2019-02-05  Daniel Bates  <dabates@apple.com>
544
545         Fix a typo in r241006. Substitute Modifier for Modifiers.
546
547         * Shared/mac/NativeWebGestureEventMac.mm:
548         (WebKit::NativeWebGestureEvent::NativeWebGestureEvent):
549
550 2019-02-05  Daniel Bates  <dabates@apple.com>
551
552         Attempt to fix the build following r241000
553         (https://bugs.webkit.org/show_bug.cgi?id=194241)
554
555         Substitute OptionSet<WebEvent::Modifier> for Modifiers.
556
557         * Shared/mac/NativeWebGestureEventMac.mm:
558         (WebKit::NativeWebGestureEvent::NativeWebGestureEvent):
559         * Shared/mac/WebGestureEvent.h:
560         (WebKit::WebGestureEvent::WebGestureEvent):
561
562 2019-02-05  Truitt Savell  <tsavell@apple.com>
563
564         Unreviewed, rolling out r240984.
565
566         Revision casued two API timeouts
567
568         Reverted changeset:
569
570         "Stop using blobRegistry in NetworkProcess"
571         https://bugs.webkit.org/show_bug.cgi?id=194027
572         https://trac.webkit.org/changeset/240984
573
574 2019-02-05  Youenn Fablet  <youenn@apple.com>
575
576         UserMediaPermissionRequestManagerProxy lambdas should check for 'this' being valid
577         https://bugs.webkit.org/show_bug.cgi?id=194246
578
579         Reviewed by Eric Carlson.
580
581         With PSON enabled, the manager proxy can be destroyed.
582         It is thus important for its callbacks to check for 'this' to be valid.
583
584         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
585         (WebKit::UserMediaPermissionRequestManagerProxy::captureDevicesChanged):
586         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
587         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
588
589 2019-02-05  Daniel Bates  <dabates@apple.com>
590
591         Attempt to fix the build following r241000
592         (https://bugs.webkit.org/show_bug.cgi?id=194241)
593
594         Substitute WebEvent::Modifier::CapsLockKey for WebEvent::CapsLockKey.
595
596         * Shared/gtk/WebEventFactory.cpp:
597         (WebKit::modifiersForEvent):
598         * Shared/mac/WebEventFactory.mm:
599         (WebKit::modifiersForEvent):
600         * UIProcess/API/Cocoa/WKNavigationAction.mm:
601         (toNSEventModifierFlags):
602         * UIProcess/Automation/WebAutomationSession.cpp:
603         (WebKit::protocolModifierToWebEventModifier):
604         * UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp:
605         (WebKit::modifiersToEventState):
606         * UIProcess/Automation/mac/WebAutomationSessionMac.mm:
607         (WebKit::WebAutomationSession::platformSimulateMouseInteraction):
608         * UIProcess/Cocoa/UIDelegate.mm:
609         (WebKit::toNSEventModifierFlags):
610
611 2019-02-05  Daniel Bates  <dabates@apple.com>
612
613         Make WebEvent::Modifiers an OptionSet
614         https://bugs.webkit.org/show_bug.cgi?id=194241
615
616         Reviewed by Simon Fraser.
617
618         Use an OptionSet to represent the bitmask of keyboard modifier flags. This improves type safety
619         and makes debugging more enjoyable because our LLDB pretty-printers have built-in support for
620         OptionSet.
621
622         While I am at it, make WebEvent::Modifier an enum class. It is currently an enum. This makes
623         this enum more closely match WebCore::PlatformEvent::Modifier.
624
625         * Shared/API/c/WKSharedAPICast.h:
626         (WebKit::toAPI):
627         * Shared/NavigationActionData.cpp:
628         (WebKit::NavigationActionData::encode const):
629         (WebKit::NavigationActionData::decode):
630         * Shared/NavigationActionData.h:
631         * Shared/WebEvent.cpp:
632         (WebKit::WebEvent::WebEvent):
633         * Shared/WebEvent.h:
634         (WebKit::WebEvent::shiftKey const):
635         (WebKit::WebEvent::controlKey const):
636         (WebKit::WebEvent::altKey const):
637         (WebKit::WebEvent::metaKey const):
638         (WebKit::WebEvent::capsLockKey const):
639         (WebKit::WebEvent::modifiers const):
640         (WebKit::WebTouchEvent::WebTouchEvent):
641         * Shared/WebEventConversion.cpp:
642         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
643         * Shared/WebKeyboardEvent.cpp:
644         (WebKit::WebKeyboardEvent::WebKeyboardEvent):
645         * Shared/WebMouseEvent.cpp:
646         (WebKit::WebMouseEvent::WebMouseEvent):
647         * Shared/WebTouchEvent.cpp:
648         (WebKit::WebTouchEvent::WebTouchEvent):
649         * Shared/WebWheelEvent.cpp:
650         (WebKit::WebWheelEvent::WebWheelEvent):
651         * Shared/gtk/WebEventFactory.cpp:
652         (WebKit::modifiersForEvent):
653         * Shared/ios/NativeWebTouchEventIOS.mm:
654         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
655         * Shared/ios/WebIOSEventFactory.mm:
656         (modifiersForEvent):
657         (WebIOSEventFactory::createWebKeyboardEvent):
658         (WebIOSEventFactory::createWebMouseEvent):
659         * Shared/libwpe/WebEventFactory.cpp:
660         (WebKit::modifiersForEventModifiers):
661         (WebKit::WebEventFactory::createWebWheelEvent):
662         (WebKit::WebEventFactory::createWebTouchEvent):
663         * Shared/mac/WebEventFactory.mm:
664         (WebKit::modifiersForEvent):
665         (WebKit::WebEventFactory::createWebMouseEvent):
666         (WebKit::WebEventFactory::createWebWheelEvent):
667         (WebKit::WebEventFactory::createWebKeyboardEvent):
668         * Shared/win/WebEventFactory.cpp:
669         (WebKit::modifiersForEvent):
670         (WebKit::modifiersForCurrentKeyState):
671         (WebKit::WebEventFactory::createWebMouseEvent):
672         (WebKit::WebEventFactory::createWebWheelEvent):
673         (WebKit::WebEventFactory::createWebKeyboardEvent):
674         * UIProcess/API/APINavigationAction.h:
675         * UIProcess/API/APIUIClient.h:
676         (API::UIClient::mouseDidMoveOverElement):
677         * UIProcess/API/C/WKPage.cpp:
678         (WKPageSetPageUIClient):
679         * UIProcess/API/Cocoa/WKNavigationAction.mm:
680         (toNSEventModifierFlags):
681         * UIProcess/API/glib/WebKitPrivate.cpp:
682         (toPlatformModifiers):
683         * UIProcess/API/glib/WebKitPrivate.h:
684         * UIProcess/API/glib/WebKitUIClient.cpp:
685         * UIProcess/API/glib/WebKitWebView.cpp:
686         (webkitWebViewMouseTargetChanged):
687         * UIProcess/API/glib/WebKitWebViewPrivate.h:
688         * UIProcess/Automation/WebAutomationSession.cpp:
689         (WebKit::WebAutomationSession::simulateMouseInteraction):
690         (WebKit::protocolModifierToWebEventModifier):
691         (WebKit::WebAutomationSession::performMouseInteraction):
692         * UIProcess/Automation/WebAutomationSession.h:
693         * UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp:
694         (WebKit::modifiersToEventState):
695         (WebKit::WebAutomationSession::platformSimulateMouseInteraction):
696         * UIProcess/Automation/mac/WebAutomationSessionMac.mm:
697         (WebKit::WebAutomationSession::platformSimulateMouseInteraction):
698         * UIProcess/Automation/wpe/WebAutomationSessionWPE.cpp:
699         (WebKit::modifiersToEventState):
700         (WebKit::WebAutomationSession::platformSimulateMouseInteraction):
701         * UIProcess/Cocoa/UIDelegate.h:
702         * UIProcess/Cocoa/UIDelegate.mm:
703         (WebKit::toNSEventModifierFlags):
704         (WebKit::UIDelegate::UIClient::mouseDidMoveOverElement):
705         * UIProcess/WebPageProxy.cpp:
706         (WebKit::WebPageProxy::mouseDidMoveOverElement):
707         * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
708         (API::InjectedBundle::PageUIClient::mouseDidMoveOverElement):
709         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
710         (WebKit::InjectedBundleNavigationAction::modifiersForNavigationAction):
711         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
712         (WebKit::InjectedBundleNavigationAction::modifiers const):
713         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
714         (WebKit::InjectedBundlePageUIClient::mouseDidMoveOverElement):
715         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
716         * WebProcess/Plugins/PDF/PDFPlugin.mm:
717         (WebKit::PDFPlugin::showContextMenuAtPoint):
718         * WebProcess/Plugins/PluginView.cpp:
719         (WebKit::PluginView::createWebEvent const):
720         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
721         (WebKit::WebChromeClient::mouseDidMoveOverElement):
722         * WebProcess/WebPage/WebPage.cpp:
723         (WebKit::WebPage::simulateMouseDown):
724         (WebKit::WebPage::simulateMouseUp):
725         (WebKit::WebPage::simulateMouseMotion):
726
727 2019-02-05  Tim Horton  <timothy_horton@apple.com>
728
729         Reproducible crash under WKShareSheet presentWithParameters when cancelling a share
730         https://bugs.webkit.org/show_bug.cgi?id=194301
731         <rdar://problem/47719379>
732
733         Reviewed by Beth Dakin.
734
735         * UIProcess/Cocoa/WKShareSheet.mm:
736         (-[WKShareSheet presentWithParameters:completionHandler:]):
737         NSSharingServicePicker's delegate callbacks can be called synchronously.
738         We release the WKShareSheet (which holds our reference to the NSSharingServicePicker)
739         under sharingServicePicker:didChooseSharingService:. On older versions of macOS,
740         there was nothing keeping the NSSharingServicePicker alive inside
741         showRelativeToRect:ofView:preferredEdge:, thus the whole chain of references would
742         fall and result in sending a message to a released NSSharingServicePicker.
743         To resolve this, keep an extra reference to the WKShareSheet until
744         presentation is complete.
745
746 2019-02-05  Keith Rollin  <krollin@apple.com>
747
748         Enable the automatic checking and regenerations of .xcfilelists during builds
749         https://bugs.webkit.org/show_bug.cgi?id=194124
750         <rdar://problem/47721277>
751
752         Reviewed by Tim Horton.
753
754         Bug 193790 add a facility for checking -- during build time -- that
755         any needed .xcfilelist files are up-to-date and for updating them if
756         they are not. This facility was initially opt-in by setting
757         WK_ENABLE_CHECK_XCFILELISTS until other pieces were in place and until
758         the process seemed robust. Its now time to enable this facility and
759         make it opt-out. If there is a need to disable this facility, set and
760         export WK_DISABLE_CHECK_XCFILELISTS=1 in your environment before
761         running `make` or `build-webkit`, or before running Xcode from the
762         command line.
763
764         Additionally, remove the step that generates a list of source files
765         going into the UnifiedSources build step. It's only necessarily to
766         specify Sources.txt and SourcesCocoa.txt as inputs.
767
768         * UnifiedSources-input.xcfilelist: Removed.
769         * WebKit.xcodeproj/project.pbxproj:
770
771 2019-02-05  Brady Eidson  <beidson@apple.com>
772
773         Add a new DownloadMap type that manages taking an assertion automatically.
774         https://bugs.webkit.org/show_bug.cgi?id=194294
775
776         Reviewed by Alex Christensen.
777
778         If we don't need the download assertion, we use a vanilla HashMap like today.
779         If we need the download assertion, we use the new DownloadMap class instead.
780
781         The new DownloadMap is a wrapper around a HashMap that also creates/destroys the assertion as needed.
782
783         * NetworkProcess/Downloads/DownloadManager.cpp:
784         (WebKit::DownloadManager::dataTaskBecameDownloadTask):
785         (WebKit::DownloadManager::downloadFinished):
786         * NetworkProcess/Downloads/DownloadManager.h:
787
788         * NetworkProcess/Downloads/DownloadMap.cpp: Added.
789         (WebKit::DownloadMap::get const):
790         (WebKit::DownloadMap::isEmpty const):
791         (WebKit::DownloadMap::size const):
792         (WebKit::DownloadMap::contains const):
793         (WebKit::DownloadMap::add):
794         (WebKit::DownloadMap::remove):
795         * NetworkProcess/Downloads/DownloadMap.h: Added.
796
797         * Sources.txt:
798
799         * UIProcess/ios/ProcessAssertionIOS.mm:
800         (WebKit::ProcessAssertion::ProcessAssertion):
801
802         * WebKit.xcodeproj/project.pbxproj:
803
804 2019-02-05  Brady Eidson  <beidson@apple.com>
805
806         Fix iOS simulator build after r240954
807
808         Unreviewed.
809
810         * UIProcess/ios/ProcessAssertionIOS.mm:
811         (WebKit::ProcessAssertion::ProcessAssertion): Implement the new constructor.
812
813 2019-02-05  Alex Christensen  <achristensen@webkit.org>
814
815         Stop using blobRegistry in NetworkProcess
816         https://bugs.webkit.org/show_bug.cgi?id=194027
817
818         Reviewed by Youenn Fablet.
819
820         * NetworkProcess/Downloads/DownloadManager.cpp:
821         (WebKit::DownloadManager::startDownload):
822         * NetworkProcess/Downloads/PendingDownload.cpp:
823         (WebKit::PendingDownload::PendingDownload):
824         * NetworkProcess/Downloads/PendingDownload.h:
825         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
826         (WebKit::NetworkBlobRegistry::registerFileBlobURL):
827         (WebKit::NetworkBlobRegistry::registerBlobURL):
828         (WebKit::NetworkBlobRegistry::registerBlobURLOptionallyFileBacked):
829         (WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
830         (WebKit::NetworkBlobRegistry::unregisterBlobURL):
831         (WebKit::NetworkBlobRegistry::blobSize):
832         (WebKit::NetworkBlobRegistry::writeBlobsToTemporaryFiles):
833         (WebKit::NetworkBlobRegistry::writeBlobToFilePath):
834         (WebKit::NetworkBlobRegistry::connectionToWebProcessDidClose):
835         (WebKit::NetworkBlobRegistry::filesInBlob):
836         (WebKit::NetworkBlobRegistry::singleton): Deleted.
837         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
838         (WebKit::NetworkBlobRegistry::blobRegistry):
839         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
840         (WebKit::NetworkConnectionToWebProcess::didClose):
841         (WebKit::NetworkConnectionToWebProcess::resolveBlobReferences):
842         (WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
843         (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
844         (WebKit::NetworkConnectionToWebProcess::loadPing):
845         (WebKit::NetworkConnectionToWebProcess::preconnectTo):
846         (WebKit::NetworkConnectionToWebProcess::registerFileBlobURL):
847         (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
848         (WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL):
849         (WebKit::NetworkConnectionToWebProcess::registerBlobURLOptionallyFileBacked):
850         (WebKit::NetworkConnectionToWebProcess::registerBlobURLForSlice):
851         (WebKit::NetworkConnectionToWebProcess::unregisterBlobURL):
852         (WebKit::NetworkConnectionToWebProcess::blobSize):
853         (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
854         (WebKit::NetworkConnectionToWebProcess::filesInBlob):
855         (WebKit::NetworkConnectionToWebProcess::blobRegistry):
856         * NetworkProcess/NetworkConnectionToWebProcess.h:
857         * NetworkProcess/NetworkDataTask.cpp:
858         (WebKit::NetworkDataTask::create):
859         * NetworkProcess/NetworkDataTaskBlob.cpp:
860         (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
861         * NetworkProcess/NetworkDataTaskBlob.h:
862         * NetworkProcess/NetworkLoad.cpp:
863         (WebKit::NetworkLoad::NetworkLoad):
864         (WebKit::NetworkLoad::initialize):
865         * NetworkProcess/NetworkLoad.h:
866         * NetworkProcess/NetworkProcess.cpp:
867         (WebKit::NetworkProcess::NetworkProcess):
868         (WebKit::NetworkProcess::removeNetworkConnectionToWebProcess):
869         * NetworkProcess/NetworkProcess.h:
870         (WebKit::NetworkProcess::networkBlobRegistry):
871         * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
872         (WebKit::NetworkProcessPlatformStrategies::createBlobRegistry):
873         * NetworkProcess/NetworkResourceLoader.cpp:
874         (WebKit::m_shouldCaptureExtraNetworkLoadMetrics):
875         (WebKit::NetworkResourceLoader::startNetworkLoad):
876         * NetworkProcess/PreconnectTask.cpp:
877         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
878         (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
879
880 2019-02-05  Ryan Haddad  <ryanhaddad@apple.com>
881
882         Unreviewed, rolling out r240742.
883
884         Causes crashes on iOS simulator.
885
886         Reverted changeset:
887
888         "[iOS] Keyups for non-modifier keys identified as "Dead" when
889         not focused in a content-editable element"
890         https://bugs.webkit.org/show_bug.cgi?id=192824
891         https://trac.webkit.org/changeset/240742
892
893 2019-02-05  Alex Christensen  <achristensen@webkit.org>
894
895         Protect globalWebSocketStreamMap with a Lock
896         https://bugs.webkit.org/show_bug.cgi?id=194224
897         <rdar://problem/47581081>
898
899         Reviewed by Ryosuke Niwa.
900
901         * WebProcess/Network/WebSocketStream.cpp:
902         (WebKit::WebSocketStream::streamWithIdentifier):
903         (WebKit::WebSocketStream::networkProcessCrashed):
904         (WebKit::WebSocketStream::WebSocketStream):
905         (WebKit::WebSocketStream::~WebSocketStream):
906
907 2019-02-04  Alex Christensen  <achristensen@webkit.org>
908
909         Add Networking Daemon skeleton
910         https://bugs.webkit.org/show_bug.cgi?id=194278
911
912         Reviewed by Zalan Bujtas.
913
914         Daemon skeletons? This is spooky stuff.
915
916         * NetworkProcess/EntryPoint/Cocoa/Daemon/DaemonEntryPoint.h: Added.
917         * NetworkProcess/EntryPoint/Cocoa/Daemon/DaemonEntryPoint.mm: Added.
918         (WebKit::DaemonMain):
919         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
920         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
921         (WebKit::NetworkDataTaskCocoa::restrictRequestReferrerToOriginIfNeeded):
922         * Shared/API/Cocoa/WKMain.h:
923         * Shared/API/Cocoa/WKMain.mm:
924         (WKDaemonMain):
925         * Shared/EntryPointUtilities/Cocoa/AuxiliaryProcessMain.cpp:
926         (main):
927         * SourcesCocoa.txt:
928         * UnifiedSources-input.xcfilelist:
929         * WebKit.xcodeproj/project.pbxproj:
930
931 2019-02-04  Yusuke Suzuki  <ysuzuki@apple.com>
932
933         [JSC] Shrink size of VM by lazily allocating IsoSubspaces for non-common types
934         https://bugs.webkit.org/show_bug.cgi?id=193993
935
936         Reviewed by Keith Miller.
937
938         * WebProcess/Plugins/Netscape/JSNPMethod.h:
939         * WebProcess/Plugins/Netscape/JSNPObject.h:
940
941 2019-02-04  Simon Fraser  <simon.fraser@apple.com>
942
943         Move some macOS/iOS scrolling code into the scrolling/cocoa directory
944         https://bugs.webkit.org/show_bug.cgi?id=194245
945
946         Reviewed by Zalan Bujtas.
947
948         Use PLATFORM(MAC), not !PLATFORM(IOS_FAMILY).
949
950         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
951         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
952
953 2019-02-04  Ms2ger  <Ms2ger@igalia.com>
954
955         [GTK][WPE] Need a function to convert internal URI to display ("pretty") URI
956         https://bugs.webkit.org/show_bug.cgi?id=174816
957
958         Reviewed by Michael Catanzaro.
959
960         Add webkit_uri_for_display for GTK and WPE.
961
962         * PlatformGTK.cmake:
963         * PlatformWPE.cmake:
964         * SourcesGTK.txt:
965         * SourcesWPE.txt:
966         * UIProcess/API/glib/WebKitURIUtilities.cpp: Added.
967         (webkit_uri_for_display):
968         * UIProcess/API/gtk/WebKitURIUtilities.h: Added.
969         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
970         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
971         * UIProcess/API/gtk/webkit2.h:
972         * UIProcess/API/wpe/WebKitURIUtilities.h: Added.
973         * UIProcess/API/wpe/docs/wpe-0.1-sections.txt:
974         * UIProcess/API/wpe/docs/wpe-docs.sgml:
975         * UIProcess/API/wpe/webkit.h:
976
977 2019-02-04  Alex Christensen  <achristensen@webkit.org>
978
979         Move XPCService main to a shared file calling a C function
980         https://bugs.webkit.org/show_bug.cgi?id=194256
981
982         Reviewed by Brady Eidson.
983
984         This not only reduces a few kilobytes of duplicated binary from the XPCService executables,
985         It will allow me to introduce a new kind of executable which will need to parse argv and call a different C function.
986         This is similar to r236075 but more general.
987
988         * Shared/API/Cocoa/WKMain.h: Added.
989         * Shared/API/Cocoa/WKMain.mm: Added.
990         (WKXPCServiceMain):
991         * Shared/EntryPointUtilities/Cocoa/AuxiliaryProcessMain.cpp: Added.
992         (main):
993         * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
994         (main): Deleted.
995         * SourcesCocoa.txt:
996         * WebKit.xcodeproj/project.pbxproj:
997
998 2019-02-04  Alex Christensen  <achristensen@webkit.org>
999
1000         Make MessageSender functions const
1001         https://bugs.webkit.org/show_bug.cgi?id=194247
1002
1003         Reviewed by Brady Eidson.
1004
1005         * NetworkProcess/Downloads/Download.cpp:
1006         (WebKit::Download::messageSenderConnection const):
1007         (WebKit::Download::messageSenderDestinationID const):
1008         (WebKit::Download::messageSenderConnection): Deleted.
1009         (WebKit::Download::messageSenderDestinationID): Deleted.
1010         * NetworkProcess/Downloads/Download.h:
1011         * NetworkProcess/Downloads/PendingDownload.cpp:
1012         (WebKit::PendingDownload::messageSenderConnection const):
1013         (WebKit::PendingDownload::messageSenderDestinationID const):
1014         (WebKit::PendingDownload::messageSenderConnection): Deleted.
1015         (WebKit::PendingDownload::messageSenderDestinationID): Deleted.
1016         * NetworkProcess/Downloads/PendingDownload.h:
1017         * NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:
1018         (WebKit::WebIDBConnectionToClient::messageSenderConnection const):
1019         (WebKit::WebIDBConnectionToClient::messageSenderConnection): Deleted.
1020         * NetworkProcess/IndexedDB/WebIDBConnectionToClient.h:
1021         * NetworkProcess/NetworkResourceLoader.cpp:
1022         (WebKit::NetworkResourceLoader::messageSenderConnection const):
1023         (WebKit::NetworkResourceLoader::messageSenderConnection): Deleted.
1024         * NetworkProcess/NetworkResourceLoader.h:
1025         * NetworkProcess/NetworkSocketStream.cpp:
1026         (WebKit::NetworkSocketStream::messageSenderConnection const):
1027         (WebKit::NetworkSocketStream::messageSenderDestinationID const):
1028         (WebKit::NetworkSocketStream::messageSenderConnection): Deleted.
1029         (WebKit::NetworkSocketStream::messageSenderDestinationID): Deleted.
1030         * NetworkProcess/NetworkSocketStream.h:
1031         * NetworkProcess/ServiceWorker/WebSWServerConnection.h:
1032         * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
1033         (WebKit::WebSWServerToContextConnection::messageSenderConnection const):
1034         (WebKit::WebSWServerToContextConnection::messageSenderDestinationID const):
1035         (WebKit::WebSWServerToContextConnection::messageSenderConnection): Deleted.
1036         (WebKit::WebSWServerToContextConnection::messageSenderDestinationID): Deleted.
1037         * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
1038         * Platform/IPC/MessageSender.h:
1039         * Shared/AuxiliaryProcess.cpp:
1040         (WebKit::AuxiliaryProcess::messageSenderConnection const):
1041         (WebKit::AuxiliaryProcess::messageSenderDestinationID const):
1042         (WebKit::AuxiliaryProcess::messageSenderConnection): Deleted.
1043         (WebKit::AuxiliaryProcess::messageSenderDestinationID): Deleted.
1044         * Shared/AuxiliaryProcess.h:
1045         * UIProcess/WebConnectionToWebProcess.cpp:
1046         (WebKit::WebConnectionToWebProcess::messageSenderConnection const):
1047         (WebKit::WebConnectionToWebProcess::messageSenderDestinationID const):
1048         (WebKit::WebConnectionToWebProcess::messageSenderConnection): Deleted.
1049         (WebKit::WebConnectionToWebProcess::messageSenderDestinationID): Deleted.
1050         * UIProcess/WebConnectionToWebProcess.h:
1051         * UIProcess/WebPageProxy.cpp:
1052         (WebKit::WebPageProxy::messageSenderConnection const):
1053         (WebKit::WebPageProxy::messageSenderDestinationID const):
1054         (WebKit::WebPageProxy::messageSenderConnection): Deleted.
1055         (WebKit::WebPageProxy::messageSenderDestinationID): Deleted.
1056         * UIProcess/WebPageProxy.h:
1057         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
1058         (WebKit::WebIDBConnectionToServer::messageSenderConnection const):
1059         (WebKit::WebIDBConnectionToServer::messageSenderConnection): Deleted.
1060         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
1061         * WebProcess/Network/WebResourceLoader.cpp:
1062         (WebKit::WebResourceLoader::messageSenderConnection const):
1063         (WebKit::WebResourceLoader::messageSenderDestinationID const):
1064         (WebKit::WebResourceLoader::messageSenderConnection): Deleted.
1065         (WebKit::WebResourceLoader::messageSenderDestinationID): Deleted.
1066         * WebProcess/Network/WebResourceLoader.h:
1067         * WebProcess/Network/WebSocketStream.cpp:
1068         (WebKit::WebSocketStream::messageSenderConnection const):
1069         (WebKit::WebSocketStream::messageSenderDestinationID const):
1070         (WebKit::WebSocketStream::messageSenderConnection): Deleted.
1071         (WebKit::WebSocketStream::messageSenderDestinationID): Deleted.
1072         * WebProcess/Network/WebSocketStream.h:
1073         * WebProcess/Storage/WebSWClientConnection.h:
1074         * WebProcess/WebConnectionToUIProcess.cpp:
1075         (WebKit::WebConnectionToUIProcess::messageSenderConnection const):
1076         (WebKit::WebConnectionToUIProcess::messageSenderDestinationID const):
1077         (WebKit::WebConnectionToUIProcess::messageSenderConnection): Deleted.
1078         (WebKit::WebConnectionToUIProcess::messageSenderDestinationID): Deleted.
1079         * WebProcess/WebConnectionToUIProcess.h:
1080         * WebProcess/WebPage/WebPage.cpp:
1081         (WebKit::WebPage::messageSenderConnection const):
1082         (WebKit::WebPage::messageSenderDestinationID const):
1083         (WebKit::WebPage::messageSenderConnection): Deleted.
1084         (WebKit::WebPage::messageSenderDestinationID): Deleted.
1085         * WebProcess/WebPage/WebPage.h:
1086
1087 2019-02-04  Brady Eidson  <beidson@apple.com>
1088
1089         Take additional process assertion while downloading.
1090         <rdar://problem/47741356> and https://bugs.webkit.org/show_bug.cgi?id=194239
1091
1092         Reviewed by Chris Dumez.
1093
1094         When the first download starts, grab this new assertion.
1095         When the last download ends, release it.
1096
1097         * Configurations/Network-iOS.entitlements:
1098
1099         * NetworkProcess/Downloads/DownloadManager.cpp:
1100         (WebKit::DownloadManager::dataTaskBecameDownloadTask):
1101         (WebKit::DownloadManager::downloadFinished):
1102         * NetworkProcess/Downloads/DownloadManager.h:
1103
1104         * Platform/spi/ios/AssertionServicesSPI.h:
1105
1106         * UIProcess/ProcessAssertion.cpp:
1107         (WebKit::ProcessAssertion::ProcessAssertion):
1108         * UIProcess/ProcessAssertion.h:
1109         (WebKit::ProcessAssertion::ProcessAssertion):
1110
1111         * UIProcess/WebProcessProxy.cpp:
1112         (WebKit::WebProcessProxy::didSetAssertionState):
1113
1114         * UIProcess/ios/ProcessAssertionIOS.mm:
1115         (WebKit::flagsForState):
1116         (WebKit::reasonForState):
1117         (WebKit::ProcessAssertion::ProcessAssertion):
1118
1119 2019-02-04  Said Abou-Hallawa  <said@apple.com>
1120
1121         [CG] Enable setAdditionalSupportedImageTypes for WK1
1122         https://bugs.webkit.org/show_bug.cgi?id=194190
1123
1124         Reviewed by Tim Horton.
1125
1126         Move the function webCoreStringVectorFromNSStringArray from WebKit to
1127         WebCore so it can be used by both WebKit and WebKitLegacy.
1128
1129         * Platform/mac/StringUtilities.h:
1130         * Platform/mac/StringUtilities.mm:
1131         (WebKit::webCoreStringVectorFromNSStringArray): Deleted.
1132         * UIProcess/API/Cocoa/WKWebView.mm:
1133         (-[WKWebView _initializeWithConfiguration:]):
1134
1135 2019-02-04  Benjamin Poulain  <benjamin@webkit.org>
1136
1137         Use deferrable timer to restart the Responsiveness Timer on each wheel event
1138         https://bugs.webkit.org/show_bug.cgi?id=194135
1139
1140         Reviewed by Simon Fraser.
1141
1142         Simon Fraser suggested a neat improvement over my previous optimization
1143         of ResponsivenessTimer.
1144
1145         Instead of reseting the deadline with every event, we can let the timer
1146         fire and add the missing time from the last start.
1147
1148         I implemented that behavior in the new Deferrable Timer class and use
1149         it from ResponsivenessTimer.
1150
1151         * NetworkProcess/watchos/NetworkProximityAssertion.h:
1152         * UIProcess/ResponsivenessTimer.h:
1153         * WebProcess/Plugins/PluginView.h:
1154
1155 2019-02-04  Simon Fraser  <simon.fraser@apple.com>
1156
1157         PageOverlayController's layers should be created lazily
1158         https://bugs.webkit.org/show_bug.cgi?id=194199
1159         rdar://problem/46571593
1160
1161         Reviewed by Tim Horton.
1162         
1163         Expose PageOverlayController::hasDocumentOverlays() and hasViewOverlays()
1164         and use them to only parent the overlay-hosting layers when necessary.
1165
1166         For document overlays, RenderLayerCompositor::appendDocumentOverlayLayers() can
1167         simply do nothing if there are none. Updates are triggered via Page::installedPageOverlaysChanged(),
1168         which calls FrameView::setNeedsCompositingConfigurationUpdate() to trigger the root layer
1169         compositing updates that parents the layerWithDocumentOverlays().
1170
1171         View overlays are added to the layer tree via the DrawingArea. When we go between having
1172         none and some view overlays, Page::installedPageOverlaysChanged() calls attachViewOverlayGraphicsLayer()
1173         on the ChromeClient, and the DrawingArea responds by calling updateRootLayers() and scheduling a
1174         compositing flush (this has to be done manually because view overlay layers are outside the
1175         subtree managed by RenderLayerCompositor).
1176         
1177         Now that GraphicsLayers are ref-counted, we can let the DrawingArea simply retain its m_viewOverlayRootLayer;
1178         there is no need for RenderLayerCompositor::attachRootLayer()/detachRootLayer() to do anything with view
1179         overlay layers. This implies that a page can navigate (new FrameView) and view overlays will persist, without
1180         having to be manually removed and re-added. We can also remove the Frame argument to attachViewOverlayGraphicsLayer().
1181
1182         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1183         (WebKit::WebChromeClient::attachViewOverlayGraphicsLayer):
1184         * WebProcess/WebCoreSupport/WebChromeClient.h:
1185         * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
1186         (WebKit::AcceleratedDrawingArea::attachViewOverlayGraphicsLayer):
1187         * WebProcess/WebPage/AcceleratedDrawingArea.h:
1188         * WebProcess/WebPage/DrawingArea.h:
1189         (WebKit::DrawingArea::attachViewOverlayGraphicsLayer):
1190         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
1191         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
1192         (WebKit::RemoteLayerTreeDrawingArea::attachViewOverlayGraphicsLayer):
1193         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1194         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1195         (WebKit::TiledCoreAnimationDrawingArea::attachViewOverlayGraphicsLayer):
1196         (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):
1197
1198 2019-02-04  Michael Catanzaro  <mcatanzaro@igalia.com>
1199
1200         Unreviewed, improve preprocessor guard
1201         https://bugs.webkit.org/show_bug.cgi?id=194166
1202         <rdar://problem/47694328>
1203
1204         AC mode is only optional in GTK port. Requested by Zan.
1205
1206         * WebProcess/WebPage/WebPage.cpp:
1207         (WebKit::WebPage::updatePreferences):
1208
1209 2019-02-04  Sihui Liu  <sihui_liu@apple.com>
1210
1211         IndexedDB: leak WebIDBConnectionToServer in layout tests
1212         https://bugs.webkit.org/show_bug.cgi?id=193688
1213         <rdar://problem/47353263>
1214
1215         Reviewed by Geoffrey Garen.
1216
1217         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1218         (WebKit::NetworkConnectionToWebProcess::didClose):
1219         (WebKit::NetworkConnectionToWebProcess::establishIDBConnectionToServer):
1220         (WebKit::NetworkConnectionToWebProcess::removeIDBConnectionToServer): Deleted.
1221         * NetworkProcess/NetworkConnectionToWebProcess.h:
1222         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1223         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
1224         (WebKit::WebIDBConnectionToServer::~WebIDBConnectionToServer):
1225
1226 2019-02-04  Antoine Quint  <graouts@apple.com>
1227
1228         <rdar://problem/47788802>
1229
1230         Unreviewed build fix.
1231
1232         * Platform/spi/ios/UIKitSPI.h:
1233
1234 2019-02-04  Youenn Fablet  <youenn@apple.com>
1235
1236         Capture state should be managed consistently when doing process swapping
1237         https://bugs.webkit.org/show_bug.cgi?id=194122
1238         <rdar://problem/47609293>
1239
1240         Reviewed by Eric Carlson.
1241
1242         When doing PSON, WebPageProxy::resetState is called.
1243         It resets the media state, but does not call the client delegates.
1244         Instead of directly updating the media state, call the routine used to update it so that client delegates are called.
1245
1246         Covered by new API test and layout test.
1247
1248         * UIProcess/API/Cocoa/WKWebView.mm:
1249         (-[WKWebView _mediaCaptureState]):
1250         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1251         * UIProcess/WebPageProxy.cpp:
1252         (WebKit::WebPageProxy::resetState):
1253         (WebKit::WebPageProxy::isPlayingMediaDidChange):
1254         (WebKit::WebPageProxy::updatePlayingMediaDidChange):
1255         * UIProcess/WebPageProxy.h:
1256
1257 2019-02-04  Antoine Quint  <graouts@apple.com>
1258
1259         Use a dedicated type instead of int32_t for pointer identifiers
1260         https://bugs.webkit.org/show_bug.cgi?id=194217
1261
1262         Reviewed by Antti Koivisto.
1263
1264         * Scripts/webkit/messages.py:
1265         * UIProcess/WebPageProxy.cpp:
1266         (WebKit::WebPageProxy::cancelPointer):
1267         * UIProcess/WebPageProxy.h:
1268         * WebProcess/WebPage/WebPage.cpp:
1269         (WebKit::WebPage::cancelPointer):
1270         * WebProcess/WebPage/WebPage.h:
1271         * WebProcess/WebPage/WebPage.messages.in:
1272
1273 2019-02-04  Michael Catanzaro  <mcatanzaro@igalia.com>
1274
1275         Unreviewed, avoid -Wswitch warnings introduced in r240880
1276         https://bugs.webkit.org/show_bug.cgi?id=193740
1277         <rdar://problem/47527267>
1278
1279         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
1280         (WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse):
1281
1282 2019-02-04  Alexander Mikhaylenko  <exalm7659@gmail.com>
1283
1284         [GTK] Allow pinch zoom on touchpad
1285         https://bugs.webkit.org/show_bug.cgi?id=194201
1286
1287         Reviewed by Michael Catanzaro.
1288
1289         Enable touchpad events for WebkitWebViewBase, then feed touchpad
1290         pinch events to GestureController.
1291
1292         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1293         (webkitWebViewBaseRealize): Added GDK_TOUCHPAD_GESTURE_MASK to event mask.
1294         (webkitWebViewBaseEvent): Added.
1295         (webkit_web_view_base_class_init): Override event vfunc.
1296
1297 2019-02-04  Michael Catanzaro  <mcatanzaro@igalia.com>
1298
1299         Unreviewed, only force settings.acceleratedCompositingEnabled() to true for Cocoa ports
1300         https://bugs.webkit.org/show_bug.cgi?id=194166
1301         <rdar://problem/47694328>
1302
1303         Accelerated compositing is broken for me at least. We're a long way from being able to force
1304         it.
1305
1306         * WebProcess/WebPage/WebPage.cpp:
1307         (WebKit::WebPage::updatePreferences):
1308
1309 2019-02-04  Abderrahim Kitouni  <akitouni@gnome.org>
1310
1311         [GTK] Remove last python2 dependency from CMake build process
1312         https://bugs.webkit.org/show_bug.cgi?id=194218
1313
1314         Reviewed by Michael Catanzaro.
1315
1316         * InspectorGResources.cmake:
1317
1318 2019-02-04  Antti Koivisto  <antti@apple.com>
1319
1320         Rename GraphicsLayer and PlatformCALayer type enum values to match "scroll container layer" convention
1321         https://bugs.webkit.org/show_bug.cgi?id=194215
1322
1323         Reviewed by Frédéric Wang.
1324
1325         * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
1326         (WebKit::RemoteLayerBackingStore::drawInContext):
1327         * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
1328         (WebKit::RemoteLayerTreeHost::makeNode):
1329         * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
1330         (WebKit::RemoteLayerTreeHost::makeNode):
1331
1332 2019-02-03  Antti Koivisto  <antti@apple.com>
1333
1334         [iOS] Tiles not created in large scrollable iframes
1335         https://bugs.webkit.org/show_bug.cgi?id=193665
1336
1337         Reviewed by Simon Fraser.
1338
1339         * UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm:
1340         (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateBeforeChildren):
1341         * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
1342         (WebKit::ScrollingTreeScrollingNodeDelegateIOS::commitStateBeforeChildren):
1343
1344         We now use scrollContainerLayer consistently so remove the special cases.
1345
1346 2019-02-03  Fujii Hironori  <Hironori.Fujii@sony.com>
1347
1348         [curl] [WebKit] Assertion failures of missing networkStorageSession for storage/indexeddb tests
1349         https://bugs.webkit.org/show_bug.cgi?id=194141
1350
1351         Reviewed by Ross Kirsling.
1352
1353         Implemented WebKit::NetworkProcess::switchToNewTestingSession and
1354         WebKit::NetworkProcess::ensureSession for curl port.
1355
1356         * NetworkProcess/NetworkProcess.cpp:
1357         (WebKit::NetworkProcess::switchToNewTestingSession):
1358         (WebKit::NetworkProcess::ensureSession):
1359
1360 2019-02-03  Simon Fraser  <simon.fraser@apple.com>
1361
1362         Make setNeedsLayout on the root more explicitly about triggering its side-effects
1363         https://bugs.webkit.org/show_bug.cgi?id=194198
1364
1365         Reviewed by Antti Koivisto.
1366
1367         Call the newly named functions.
1368
1369         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1370         (WebKit::PDFPlugin::updateScrollbars):
1371         * WebProcess/Plugins/PluginView.cpp:
1372         (WebKit::PluginView::didInitializePlugin):
1373         * WebProcess/WebPage/WebPage.cpp:
1374         (WebKit::WebPage::setHeaderBannerHeightForTesting):
1375         (WebKit::WebPage::setFooterBannerHeightForTesting):
1376         * WebProcess/WebPage/mac/PageBannerMac.mm:
1377         (WebKit::PageBanner::addToPage):
1378         (WebKit::PageBanner::detachFromPage):
1379         (WebKit::PageBanner::hide):
1380
1381 2019-02-03  Ryosuke Niwa  <rniwa@webkit.org>
1382
1383         Validate navigation policy decisions to avoid crashes in continueLoadAfterNavigationPolicy
1384         https://bugs.webkit.org/show_bug.cgi?id=194189
1385
1386         Reviewed by Geoffrey Garen.
1387
1388         Pass the policy check identifier around functions and store it in PolicyDecisionSender
1389         so that we can send it back to WebCore with the navigation policy decision.
1390
1391         We also store it in WebFrame in the case the policy decision had to be invalidated
1392         before the decision was received (via WebFrame::invalidatePolicyListener).
1393
1394         * Scripts/webkit/messages.py:
1395         * UIProcess/ProvisionalPageProxy.cpp:
1396         (WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionAsync):
1397         (WebKit::ProvisionalPageProxy::decidePolicyForResponse):
1398         * UIProcess/ProvisionalPageProxy.h:
1399         * UIProcess/WebPageProxy.cpp:
1400         (WebKit::WebPageProxy::PolicyDecisionSender): Added PolicyCheckIdentifier as a member.
1401         (WebKit::WebPageProxy::PolicyDecisionSender::create):
1402         (WebKit::WebPageProxy::PolicyDecisionSender::send):
1403         (WebKit::WebPageProxy::PolicyDecisionSender::PolicyDecisionSender):
1404         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
1405         (WebKit::WebPageProxy::decidePolicyForNavigationActionAsync):
1406         (WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared):
1407         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1408         (WebKit::WebPageProxy::decidePolicyForNavigationActionSync):
1409         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
1410         (WebKit::WebPageProxy::decidePolicyForResponse):
1411         (WebKit::WebPageProxy::decidePolicyForResponseShared):
1412         * UIProcess/WebPageProxy.h:
1413         * UIProcess/WebPageProxy.messages.in:
1414         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1415         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
1416         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
1417         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1418         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1419         * WebProcess/WebPage/WebFrame.cpp:
1420         (WebKit::WebFrame::setUpPolicyListener):
1421         (WebKit::WebFrame::invalidatePolicyListener):
1422         (WebKit::WebFrame::didReceivePolicyDecision):
1423         * WebProcess/WebPage/WebFrame.h:
1424         * WebProcess/WebPage/WebPage.cpp:
1425         (WebKit::WebPage::didReceivePolicyDecision):
1426         * WebProcess/WebPage/WebPage.h:
1427         * WebProcess/WebPage/WebPage.messages.in:
1428
1429 2019-02-03  Megan Gardner  <megan_gardner@apple.com>
1430
1431         Turn on Smart Paste
1432         https://bugs.webkit.org/show_bug.cgi?id=193786
1433
1434         Reviewed by Ryosuke Niwa.
1435
1436         * Platform/spi/ios/UIKitSPI.h:
1437         * UIProcess/ios/TextCheckerIOS.mm:
1438         (WebKit::TextChecker::isSmartInsertDeleteEnabled):
1439         Use the flag from UIKit to determine if smart copy paste should be
1440         turned on.
1441
1442 2019-02-02  Simon Fraser  <simon.fraser@apple.com>
1443
1444         Tidy up data memebers of FrameView and related classes to shrink class sizes
1445         https://bugs.webkit.org/show_bug.cgi?id=194197
1446
1447         Reviewed by Zalan Bujtas.
1448
1449         * UIProcess/PageClient.h: Declare enum size.
1450
1451 2018-12-16  Darin Adler  <darin@apple.com>
1452
1453         Convert additional String::format clients to alternative approaches
1454         https://bugs.webkit.org/show_bug.cgi?id=192746
1455
1456         Reviewed by Alexey Proskuryakov.
1457
1458         * UIProcess/Cocoa/ViewGestureController.cpp:
1459         (WebKit::ViewGestureController::SnapshotRemovalTracker::startWatchdog):
1460         Use makeString and FormattedNumber.
1461
1462         * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
1463         (WebKit::LocalAuthenticator::getAssertion): Added a comment about an
1464         incorrect format specifier and left this code as is for now.
1465
1466 2019-02-01  David Kilzer  <ddkilzer@apple.com>
1467
1468         Move soft-linking of TelephonyUtilities.framework out of TUCallSPI.h
1469         <https://webkit.org/b/193866>
1470
1471         Reviewed by Alex Christensen.
1472
1473         * Platform/mac/MenuUtilities.mm:
1474         - Update for rename of TUCallSPI.h to TelephonyUtilitiesSPI.h.
1475         - Add soft-linking code formerly in TUCallSPI.h.
1476
1477 2019-02-01  Alex Christensen  <achristensen@webkit.org>
1478
1479         Move XPCService entry points from mac directory to new Cocoa directory
1480         https://bugs.webkit.org/show_bug.cgi?id=194129
1481
1482         Reviewed by Chris Dumez.
1483
1484         * Configurations/NetworkService.xcconfig:
1485         * Configurations/PluginService.64.xcconfig:
1486         * Configurations/WebContentService.xcconfig:
1487         * NetworkProcess/EntryPoint/Cocoa: Copied from Source/WebKit/NetworkProcess/EntryPoint/mac.
1488         * NetworkProcess/EntryPoint/mac: Removed.
1489         * PluginProcess/EntryPoint/Cocoa: Copied from Source/WebKit/PluginProcess/EntryPoint/mac.
1490         * PluginProcess/EntryPoint/mac: Removed.
1491         * Shared/EntryPointUtilities/Cocoa: Copied from Source/WebKit/Shared/EntryPointUtilities/mac.
1492         * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h:
1493         * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.mm:
1494         * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
1495         * Shared/EntryPointUtilities/mac: Removed.
1496         * SourcesCocoa.txt:
1497         * WebKit.xcodeproj/project.pbxproj:
1498         * WebProcess/EntryPoint/Cocoa: Copied from Source/WebKit/WebProcess/EntryPoint/mac.
1499         * WebProcess/EntryPoint/mac: Removed.
1500
1501 2019-02-01  Wenson Hsieh  <wenson_hsieh@apple.com>
1502
1503         [iOS] Consistent 1 sec hang when triggering modal alerts while handling synchronous touch events
1504         https://bugs.webkit.org/show_bug.cgi?id=194140
1505         <rdar://problem/47728098>
1506
1507         Reviewed by Tim Horton.
1508
1509         Currently, the UI process hangs when attempting to synchronously present modal UI from the web process while the
1510         UI process is waiting for sync IPC in the web process. While we have logic to generally mitigate IPC deadlock in
1511         this scenario by dispatching the web process' sync IPC immediately with the intention of allowing the web
1512         process to finish processing sync IPC (and consequently unblock the UI process), this fails in the case where
1513         the sync IPC message from the web process to the UI process requires main thread execution for an arbitrary
1514         amount of time (for instance, modal alert dialogs). In this case, we'll end up in a state where we've handled
1515         the web process' sync IPC in the UI process, yet we can't resume execution since the web process is still
1516         blocked.
1517
1518         By far the most egregious scenario in which this manifests is during synchronous gesture recognizer IPC, i.e.
1519         grabbing position information from the UI process, and handling touch events synchronously. Luckily, these are
1520         also cases where (1) we know sync IPC may safely time out, and (2) the presentation of modal UI from the web
1521         process should cause the gesture recognizers to fail anyways. As such, we can mitigate these scenarios in the
1522         web process by responding to the these pending sync IPC messages *before* sending our own sync IPC to the UI
1523         process.
1524
1525         Test: fast/events/touch/ios/show-modal-alert-during-touch-start.html
1526
1527         * Shared/ios/InteractionInformationAtPosition.h:
1528         (WebKit::InteractionInformationAtPosition::invalidInformation):
1529         * Shared/ios/InteractionInformationAtPosition.mm:
1530         (WebKit::InteractionInformationAtPosition::encode const):
1531         (WebKit::InteractionInformationAtPosition::decode):
1532
1533         Add a new flag to indicate whether an interaction information response can be valid. Interaction information
1534         cannot be valid in the case where the interaction information request was interrupted by certain sync IPC
1535         messages from the web process.
1536
1537         * UIProcess/API/C/WKContextConfigurationRef.cpp:
1538         (WKContextConfigurationIgnoreSynchronousMessagingTimeoutsForTesting):
1539         (WKContextConfigurationSetIgnoreSynchronousMessagingTimeoutsForTesting):
1540
1541         Add some testing SPI to ignore sync IPC timeouts, for the purposes of testing. Rather than use the existing
1542         Objective-C SPI in WKWebProcessPoolConfiguration, I decided to add C API plumbing for this flag, so that other
1543         non-Cocoa ports may also support the new layout test option to ignore sync IPC timeouts.
1544
1545         * UIProcess/API/C/WKContextConfigurationRef.h:
1546         * UIProcess/ios/WKContentViewInteraction.mm:
1547         (-[WKContentView ensurePositionInformationIsUpToDate:]):
1548         (-[WKContentView _positionInformationDidChange:]):
1549         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1550         (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
1551         (WebKit::WebChromeClient::runJavaScriptAlert):
1552         (WebKit::WebChromeClient::runJavaScriptConfirm):
1553         (WebKit::WebChromeClient::runJavaScriptPrompt):
1554         (WebKit::WebChromeClient::print):
1555         (WebKit::WebChromeClient::exceededDatabaseQuota):
1556         (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):
1557
1558         Cancel any pending sync IPC replies prior to sending sync IPC messages to the UI process which may result in
1559         sync IPC deadlock, by using the new helper method, sendSyncWithDelayedReply, instead of just sendSync.
1560
1561         * WebProcess/WebPage/WebPage.cpp:
1562         (WebKit::WebPage::cancelGesturesBlockedOnSynchronousReplies):
1563
1564         Add a helper to cancel pending sync messages coming in from the UI process that are being called from within
1565         gesture recognizer delegate hooks.
1566
1567         (WebKit::WebPage::touchEventSync):
1568         * WebProcess/WebPage/WebPage.h:
1569
1570         Add a new helper, sendSyncWithDelayedReply, to be used when sending a sync IPC message to the UI process that
1571         cannot be immediately completed upon arrival. Importantly, this cancels pending sync replies, and also passes
1572         IPC::SendSyncOption::InformPlatformProcessWillSuspend.
1573
1574         * WebProcess/WebPage/WebPage.messages.in:
1575
1576         Change these from LegacySync to Delayed messages.
1577
1578         * WebProcess/WebPage/ios/WebPageIOS.mm:
1579         (WebKit::WebPage::getPositionInformation):
1580
1581         Make this sync IPC handler (as well as WebPage::touchEventSync) store the IPC reply during the scope of the
1582         method, and invoke the stored reply at the end of the method if it wasn't interrupted due to something calling
1583         cancelGesturesBlockedOnSynchronousReplies().
1584
1585         (WebKit::WebPage::positionInformation):
1586
1587         Refactor getPositionInformation by pulling out the logic for building an InteractionInformationAtPosition into
1588         a separate helper.
1589
1590         (WebKit::WebPage::requestPositionInformation):
1591
1592 2019-02-01  David Quesada  <david_quesada@apple.com>
1593
1594         Network Process crash when resuming downloads: '-[__NSDictionaryI setObject:forKey:]: unrecognized selector sent to instance %p'
1595         https://bugs.webkit.org/show_bug.cgi?id=194144
1596         rdar://problem/47553456
1597
1598         Reviewed by Geoffrey Garen.
1599
1600         * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
1601         (WebKit::Download::resume):
1602             Make a mutable copy of the root object decoded from the resume data.
1603             It might have been originally encoded as an immutable dictionary.
1604
1605 2019-02-01  Chris Dumez  <cdumez@apple.com>
1606
1607         REGRESSION: Flaky ASSERTION FAILED: m_uncommittedState.state == State::Committed on http/tests/cookies/same-site/fetch-after-top-level-navigation-initiated-from-iframe-in-cross-origin-page.html
1608         https://bugs.webkit.org/show_bug.cgi?id=193740
1609         <rdar://problem/47527267>
1610
1611         Reviewed by Alex Christensen.
1612
1613         The issue was happening when the page is triggering a cross-site navigation while in the middle of parsing. This would cause us to
1614         start a new provisional load in a new process before the previous process sends the DidFinishLoadForFrame() IPC to the UIProcess.
1615         Getting such IPC after a provisional load has started would mess up our state machine and trip assertions.
1616
1617         This patch restores non-PSON behavior which is that the previous load in the old process now gets stopped so that no DidFinishLoadForFrame()
1618         / DidFailLoadForFrame() gets sent. To achieve this behavior, I introduced a new "StopAllLoads" PolicyAction that we now send the old
1619         process when the load is continuing in a new process, instead of sending it "Ignore".
1620
1621         * NetworkProcess/NetworkDataTaskBlob.cpp:
1622         (WebKit::NetworkDataTaskBlob::dispatchDidReceiveResponse):
1623         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1624         (toNSURLSessionResponseDisposition):
1625         * UIProcess/WebPageProxy.cpp:
1626         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
1627
1628 2019-02-01  Jer Noble  <jer.noble@apple.com>
1629
1630         Unreviewed build fix; Respect the 'condition:' field in the WebPreferences.yaml when generating
1631         WebPreferencesStoreDefaultsMap.cpp.
1632
1633         * page/SettingsBase.h:
1634
1635 2019-02-01  Antoine Quint  <graouts@apple.com>
1636
1637         Dispatch pointercancel events when content is panned or zoomed on iOS
1638         https://bugs.webkit.org/show_bug.cgi?id=193962
1639         <rdar://problem/47629134>
1640
1641         Reviewed by Dean Jackson.
1642
1643         When a user-agent-provided interaction, such as panning or zooming on iOS, uses a set of touches, we should dispatch a pointercancel
1644         event for the pointer ids of the touches involved. To facilitate this, we add a new method on WKContentView to cancel all the pointers
1645         matching active touches for a provided UIGestureRecognizer through an async IPC call into the Web process using the new method
1646         PointerCaptureController::cancelPointer().
1647
1648         * Platform/spi/ios/UIKitSPI.h: Add the necessary forward declaration for a necessary UIKit SPI allowing us to get the set of last-seen
1649         UITouches by the identifier generated for the matching WebKit touch.
1650         * UIProcess/API/Cocoa/WKWebView.mm:
1651         (-[WKWebView scrollViewWillBeginZooming:withView:]): Dispatch touchcancel events for all pointers involved in a pinch gesture on the
1652         top-level UIScrollView.
1653         (-[WKWebView _scrollView:adjustedOffsetForOffset:translation:startPoint:locationInView:horizontalVelocity:verticalVelocity:]): Dispatch
1654         touchcancel events for all pointers involved in a pan gesture on the top-level UIScrollView. We can infer this by looking at whether the
1655         adjusted content offset, after accounting for the permitted touch actions, is different from the original content offset.
1656         * UIProcess/PageClient.h: Expose a new virtual cancelPointersForGestureRecognizer() method which will allow the iOS implementation to
1657         forward the call to WKContentViewInteraction.
1658         (WebKit::PageClient::cancelPointersForGestureRecognizer):
1659         * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h: Expose the WebPageProxy such that we may access it to cancel pointers for
1660         a given gesture recognizer from within ScrollingTreeScrollingNodeDelegateIOS.
1661         (WebKit::RemoteScrollingCoordinatorProxy::webPageProxy const):
1662         * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h:
1663         * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
1664         (-[WKScrollingNodeScrollViewDelegate _scrollView:adjustedOffsetForOffset:translation:startPoint:locationInView:horizontalVelocity:verticalVelocity:]):
1665         Dispatch touchcancel events for all pointers involved in a pan gesture on a nested UIScrollView. We can infer this by looking at
1666         whether the adjusted content offset, after accounting for the permitted touch actions, is different from the original content offset.
1667         (-[WKScrollingNodeScrollViewDelegate scrollViewWillBeginZooming:withView:]): Dispatch touchcancel events for all pointers involved in a
1668         pinch gesture on a nested UIScrollView.
1669         (-[WKScrollingNodeScrollViewDelegate cancelPointersForGestureRecognizer:]):
1670         (WebKit::ScrollingTreeScrollingNodeDelegateIOS::cancelPointersForGestureRecognizer):
1671         * UIProcess/WebPageProxy.cpp:
1672         (WebKit::WebPageProxy::cancelPointer):
1673         * UIProcess/WebPageProxy.h:
1674         * UIProcess/ios/PageClientImplIOS.h:
1675         * UIProcess/ios/PageClientImplIOS.mm:
1676         (WebKit::PageClientImpl::cancelPointersForGestureRecognizer):
1677         * UIProcess/ios/WKContentViewInteraction.h:
1678         * UIProcess/ios/WKContentViewInteraction.mm:
1679         (-[WKContentView cancelPointersForGestureRecognizer:]): Obtain all active UITouch objects for the view and dispatch a pointercancel event,
1680         through the WebPageProxy, for all touches associated with the provided gesture recognizer.
1681         * WebProcess/WebPage/WebPage.cpp:
1682         (WebKit::WebPage::cancelPointer):
1683         * WebProcess/WebPage/WebPage.h:
1684         * WebProcess/WebPage/WebPage.messages.in:
1685
1686 2019-02-01  Jer Noble  <jer.noble@apple.com>
1687
1688         Make the WebKit default for media source based on the WebCore default.
1689         https://bugs.webkit.org/show_bug.cgi?id=194172
1690
1691         Reviewed by Eric Carlson.
1692
1693         * Shared/WebPreferences.yaml:
1694         * UIProcess/API/Cocoa/WKPreferences.mm:
1695         (-[WKPreferences _setMediaSourceEnabled:]):
1696         (-[WKPreferences _mediaSourceEnabled]):
1697         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1698
1699 2019-02-01  Simon Fraser  <simon.fraser@apple.com>
1700
1701         Force settings.acceleratedCompositingEnabled() to true for WebKit
1702         https://bugs.webkit.org/show_bug.cgi?id=194166
1703         rdar://problem/47694328
1704
1705         Reviewed by Tim Horton.
1706
1707         WebKit relies on accelerated compositing for its drawing areas to function correctly,
1708         and sometimes clients (*cough* Safari *cough*) have bugs where they clobber the settings,
1709         so force this setting to be always on (and release log if this happens).
1710
1711         * WebProcess/WebPage/WebPage.cpp:
1712         (WebKit::WebPage::updatePreferences):
1713
1714 2019-02-01  Antti Koivisto  <antti@apple.com>
1715
1716         Don't use base layer() as the scroll layer in scrolling tree.
1717         https://bugs.webkit.org/show_bug.cgi?id=194160
1718
1719         Reviewed by Simon Fraser.
1720
1721         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
1722         (ArgumentCoder<ScrollingStateNode>::encode):
1723         (ArgumentCoder<ScrollingStateNode>::decode):
1724         (ArgumentCoder<ScrollingStateScrollingNode>::encode):
1725         (ArgumentCoder<ScrollingStateScrollingNode>::decode):
1726         (WebKit::dump):
1727         * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
1728         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
1729         * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
1730         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
1731         * UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm:
1732         (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateBeforeChildren):
1733         * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
1734         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateBeforeChildren):
1735         * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
1736         (WebKit::ScrollingTreeScrollingNodeDelegateIOS::commitStateBeforeChildren):
1737         (WebKit::ScrollingTreeScrollingNodeDelegateIOS::commitStateAfterChildren):
1738
1739 2019-02-01  Michael Catanzaro  <mcatanzaro@igalia.com>
1740
1741         [SOUP] Improve use of SoupCookiePersistentStorageType
1742         https://bugs.webkit.org/show_bug.cgi?id=194103
1743
1744         Reviewed by Carlos Garcia Campos.
1745
1746         Turn it into an enum class, and stop casting it to and from uint32_t.
1747
1748         * NetworkProcess/Cookies/WebCookieManager.h:
1749         * NetworkProcess/Cookies/WebCookieManager.messages.in:
1750         * NetworkProcess/Cookies/soup/WebCookieManagerSoup.cpp:
1751         (WebKit::WebCookieManager::setCookiePersistentStorage):
1752         * NetworkProcess/NetworkSessionCreationParameters.cpp:
1753         (WebKit::NetworkSessionCreationParameters::privateSessionParameters):
1754         (WebKit::NetworkSessionCreationParameters::decode):
1755         * NetworkProcess/NetworkSessionCreationParameters.h:
1756         * Shared/soup/SoupCookiePersistentStorageType.h:
1757         (): Deleted.
1758         * UIProcess/API/glib/WebKitCookieManager.cpp:
1759         * UIProcess/WebCookieManagerProxy.h:
1760         * UIProcess/soup/WebCookieManagerProxySoup.cpp:
1761         (WebKit::WebCookieManagerProxy::setCookiePersistentStorage):
1762         (WebKit::WebCookieManagerProxy::getCookiePersistentStorage const):
1763
1764 2019-02-01  Per Arne Vollan  <pvollan@apple.com>
1765
1766         [macOS] Revert parts of r240811, since it causes kernel panics.
1767         https://bugs.webkit.org/show_bug.cgi?id=194061
1768
1769         Unreviewed crash fix.
1770
1771         * WebProcess/com.apple.WebProcess.sb.in:
1772
1773 2019-02-01  Michael Catanzaro  <mcatanzaro@igalia.com>
1774
1775         [SOUP] Improve use of PAL::SessionID in WebKitCookieManager
1776         https://bugs.webkit.org/show_bug.cgi?id=194092
1777
1778         Reviewed by Carlos Garcia Campos.
1779
1780         Always get it from the data store instead of assuming the default session ID, and add a
1781         helper function for this.
1782
1783         * UIProcess/API/glib/WebKitCookieManager.cpp:
1784         (_WebKitCookieManagerPrivate::sessionID const):
1785         (_WebKitCookieManagerPrivate::~_WebKitCookieManagerPrivate):
1786         (webkitCookieManagerCreate):
1787         (webkit_cookie_manager_set_persistent_storage):
1788         (webkit_cookie_manager_set_accept_policy):
1789         (webkit_cookie_manager_get_accept_policy):
1790         (webkit_cookie_manager_add_cookie):
1791         (webkit_cookie_manager_get_cookies):
1792         (webkit_cookie_manager_delete_cookie):
1793
1794 2019-01-31  Takashi Komori  <Takashi.Komori@sony.com>
1795
1796         [Curl] Remove unnecessary member from NetworkStorageSession.
1797         https://bugs.webkit.org/show_bug.cgi?id=194137
1798
1799         Reviewed by Don Olmstead.
1800
1801         * NetworkProcess/curl/NetworkProcessCurl.cpp:
1802         (WebKit::NetworkProcess::platformCreateDefaultStorageSession const):
1803
1804 2019-01-31  Jiewen Tan  <jiewen_tan@apple.com>
1805
1806         Unreviewed, build fix after r240805
1807
1808         This patch reverts the BlockPtr change since it breaks iOS builds.
1809
1810         * UIProcess/Cocoa/NavigationState.mm:
1811         (WebKit::tryInterceptNavigation):
1812
1813 2019-01-31  Chris Dumez  <cdumez@apple.com>
1814
1815         Page zoom level is lost after a process swap or a crash
1816         https://bugs.webkit.org/show_bug.cgi?id=194105
1817         <rdar://problem/47610781>
1818
1819         Reviewed by Alex Christensen.
1820
1821         Previously, when the client would call setPageAndTextZoomFactors() on the WebPageProxy,
1822         we would update the WebPageProxy's corresponding data members and send an IPC to the
1823         WebProcess to apply the zoom factors.
1824
1825         The issue is that on process crash or process-swap, we never communicate those zoom factors
1826         to the new WebProcess. Even if the client were to call setPageAndTextZoomFactors() with
1827         the same factors again, it would be a no-op since the WebPageProxy's data members already
1828         reflect the expected values.
1829
1830         To address the issue, pass both the page zoom and the text zoom factors to the WebProcess
1831         via WebPageCreationParameters. This way, there is no need to send an extra IPC and we're
1832         sure the WebPageProxy's factors are properly applied to the WebPage on WebContent process
1833         side upon creation (whether after a crash or a process swap).
1834
1835         * Shared/WebPageCreationParameters.cpp:
1836         (WebKit::WebPageCreationParameters::encode const):
1837         (WebKit::WebPageCreationParameters::decode):
1838         * Shared/WebPageCreationParameters.h:
1839         * UIProcess/WebPageProxy.cpp:
1840         (WebKit::WebPageProxy::creationParameters):
1841         * WebProcess/WebPage/WebPage.cpp:
1842
1843 2019-01-31  Per Arne Vollan  <pvollan@apple.com>
1844
1845         [macOS] Disable permissive call logging in sandbox
1846         https://bugs.webkit.org/show_bug.cgi?id=194061
1847
1848         Reviewed by Alexey Proskuryakov.
1849
1850         Strict call filtering should be reenabled.
1851
1852         * WebProcess/com.apple.WebProcess.sb.in:
1853
1854 2019-01-31  Per Arne Vollan  <pvollan@apple.com>
1855
1856         [macOS] Crash when control-clicking or copying text rendered with a web font
1857         https://bugs.webkit.org/show_bug.cgi?id=193913
1858         <rdar://problem/47541039>
1859
1860         Reviewed by Brent Fulgham.
1861
1862         On older versions of macOS, allowing mach lookup to com.apple.FontObjectsServer is needed.
1863
1864         * WebProcess/com.apple.WebProcess.sb.in:
1865
1866 2019-01-31  Benjamin Poulain  <benjamin@webkit.org>
1867
1868         Remove WKPageIsWebProcessResponsive
1869         https://bugs.webkit.org/show_bug.cgi?id=194096
1870
1871         Reviewed by Alex Christensen.
1872
1873         It is not used by any client.
1874
1875         It is also bad API. It is better to let WebKit track
1876         responsiveness and tell the client with processDidBecomeResponsive.
1877
1878         * UIProcess/API/C/WKPage.cpp:
1879         (WKPageIsWebProcessResponsive): Deleted.
1880         * UIProcess/API/C/WKPagePrivate.h:
1881         * UIProcess/WebPageProxy.cpp:
1882         (WebKit::WebPageProxy::isWebProcessResponsive): Deleted.
1883         * UIProcess/WebPageProxy.h:
1884
1885 2019-01-31  Alex Christensen  <achristensen@webkit.org>
1886
1887         Revert r238819 which is unneeded and caused a performance regression.
1888         https://bugs.webkit.org/show_bug.cgi?id=192272
1889         <rdar://problem/46664625>
1890
1891         * WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h:
1892         (API::InjectedBundle::PageLoaderClient::didStartProvisionalLoadForFrame):
1893         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
1894         * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
1895         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1896         (PageLoaderClient::didStartProvisionalLoadForFrame):
1897         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1898         (WebKit::InjectedBundlePageLoaderClient::didStartProvisionalLoadForFrame):
1899         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
1900         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1901         (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
1902         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1903
1904 2019-01-31  Jiewen Tan  <jiewen_tan@apple.com>
1905
1906         Formalize WebKitAdditions mechanism of LoadOptimizer
1907         https://bugs.webkit.org/show_bug.cgi?id=193886
1908         <rdar://problem/47696809>
1909
1910         Reviewed by Brent Fulgham.
1911
1912         This patch does the following few things:
1913         1) formalizes WebKitAdditions mechanism of LoadOptimizer;
1914         2) modernizes AppLinks code in tryInterceptNavigation to use BlockPtr;
1915         3) lets AppLinks have higher precedence than LoadOptimizer.
1916
1917         * SourcesCocoa.txt:
1918         * UIProcess/Cocoa/LoadOptimizer.h: Removed.
1919         * UIProcess/Cocoa/LoadOptimizer.mm: Removed.
1920         * UIProcess/Cocoa/NavigationState.mm:
1921         (WebKit::tryOptimizingLoad):
1922         (WebKit::tryInterceptNavigation):
1923         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1924         (WebKit::WebsiteDataStore::WebsiteDataStore):
1925         * UIProcess/WebsiteData/WebsiteDataStore.h:
1926         (WebKit::WebsiteDataStore::loadOptimizer): Deleted.
1927         * WebKit.xcodeproj/project.pbxproj:
1928
1929 2019-01-31  Chris Dumez  <cdumez@apple.com>
1930
1931         Regression(PSON) Crash under WebProcessProxy::canTerminateChildProcess()
1932         https://bugs.webkit.org/show_bug.cgi?id=194094
1933         <rdar://problem/47580753>
1934
1935         Reviewed by Ryosuke Niwa.
1936
1937         If a SuspendedPageProxy gets destroyed while a WebPageProxy is waiting for its to finish to suspend,
1938         call the "failure to suspend" completion handler asynchronously instead of synchronouly to make sure
1939         the completion handler cannot try and use the suspended page proxy while it is being destroyed.
1940
1941         * UIProcess/SuspendedPageProxy.cpp:
1942         (WebKit::SuspendedPageProxy::~SuspendedPageProxy):
1943
1944 2019-01-31  Timothy Hatcher  <timothy@apple.com>
1945
1946         Fix LSAppLink deprecation warnings.
1947         https://bugs.webkit.org/show_bug.cgi?id=194097
1948
1949         Unreviewed build fix.
1950
1951         * UIProcess/ios/WKActionSheetAssistant.mm:
1952         (-[WKActionSheetAssistant _appendOpenActionsForURL:actions:elementInfo:]):
1953
1954 2019-01-30  Simon Fraser  <simon.fraser@apple.com>
1955
1956         [Mac] Implement basic hit testing in the scrolling tree
1957         https://bugs.webkit.org/show_bug.cgi?id=172917
1958         <rdar://problem/34215516>
1959
1960         Reviewed by Antti Koivisto.
1961
1962         Changed return types, "using namespace WebCore" in ScrollingTreeFrameScrollingNodeRemoteMac.cpp.
1963
1964         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
1965         (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
1966         * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
1967         * UIProcess/RemoteLayerTree/mac/ScrollerPairMac.h:
1968         * UIProcess/RemoteLayerTree/mac/ScrollerPairMac.mm:
1969         (WebKit::ScrollerPairMac::handleWheelEvent):
1970         (WebKit::ScrollerPairMac::handleMouseEvent):
1971         * UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.cpp:
1972         (WebKit::ScrollingTreeFrameScrollingNodeRemoteMac::handleWheelEvent):
1973         (WebKit::ScrollingTreeFrameScrollingNodeRemoteMac::handleMouseEvent):
1974         * UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.h:
1975
1976 2019-01-31  Michael Catanzaro  <mcatanzaro@igalia.com>
1977
1978         [SOUP] Move cookiePersistentStoragePath and cookiePersistentStorageType from NetworkProcess to NetworkSession
1979         https://bugs.webkit.org/show_bug.cgi?id=194075
1980
1981         Reviewed by Alex Christensen.
1982
1983         Move cookiePersistentStoragePath and cookiePersistentStorageType from NetworkProcess to
1984         NetworkSession to reduce globals. This removes two of the six soup-specific variables in
1985         NetworkProcessCreationParameters
1986
1987         * NetworkProcess/Cookies/WebCookieManager.h:
1988         * NetworkProcess/Cookies/WebCookieManager.messages.in:
1989         * NetworkProcess/Cookies/soup/WebCookieManagerSoup.cpp:
1990         (WebKit::WebCookieManager::setCookiePersistentStorage):
1991         * NetworkProcess/NetworkProcessCreationParameters.cpp:
1992         (WebKit::NetworkProcessCreationParameters::encode const):
1993         (WebKit::NetworkProcessCreationParameters::decode):
1994         * NetworkProcess/NetworkProcessCreationParameters.h:
1995         * NetworkProcess/NetworkSessionCreationParameters.cpp:
1996         (WebKit::NetworkSessionCreationParameters::privateSessionParameters):
1997         (WebKit::NetworkSessionCreationParameters::encode const):
1998         (WebKit::NetworkSessionCreationParameters::decode):
1999         * NetworkProcess/NetworkSessionCreationParameters.h:
2000         * NetworkProcess/soup/NetworkProcessSoup.cpp:
2001         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
2002         * NetworkProcess/soup/NetworkSessionSoup.cpp:
2003         (WebKit::NetworkSessionSoup::NetworkSessionSoup):
2004         * SourcesGTK.txt:
2005         * SourcesWPE.txt:
2006         * UIProcess/API/glib/WebKitCookieManager.cpp:
2007         (webkit_cookie_manager_set_persistent_storage):
2008         * UIProcess/WebCookieManagerProxy.cpp:
2009         (WebKit::WebCookieManagerProxy::WebCookieManagerProxy):
2010         * UIProcess/WebCookieManagerProxy.h:
2011         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2012         (WebKit::WebsiteDataStore::parameters):
2013         * UIProcess/WebsiteData/WebsiteDataStore.h:
2014         * UIProcess/WebsiteData/curl/WebsiteDataStoreCurl.cpp:
2015         (WebKit::WebsiteDataStore::platformSetNetworkParameters):
2016         (WebKit::WebsiteDataStore::platformSetParameters): Deleted.
2017         * UIProcess/soup/WebCookieManagerProxySoup.cpp:
2018         (WebKit::WebCookieManagerProxy::setCookiePersistentStorage):
2019         (WebKit::WebCookieManagerProxy::getCookiePersistentStorage const):
2020         * UIProcess/soup/WebProcessPoolSoup.cpp:
2021         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
2022
2023 2019-01-31  Ryosuke Niwa  <rniwa@webkit.org>
2024
2025         iOS: Crash in InteractiveUpdateHandler set by ViewGestureController::beginSwipeGesture
2026         https://bugs.webkit.org/show_bug.cgi?id=194083
2027
2028         Reviewed by Tim Horton.
2029
2030         We think this crash is a regression from r236966. Prior to r236966, we could only called
2031         removeSwipeSnapshot() only when m_provisionalOrSameDocumentLoadCallback was set but now
2032         we can call it either when m_snapshotRemovalTracker::start was called, or it had been reset.
2033         This can result in m_webPageProxyForBackForwardListForCurrentSwipe getting cleared before
2034         InteractiveUpdateHandler is called by UIGestureRecognizer, resulting in the crash.
2035
2036         This patch tries to restore the behavior prior to r236966 by only invoking removeSwipeSnapshot()
2037         when SnapshotRemovalTracker has a valid removal callback set.
2038
2039         Unfortunately no new tests since there is no reproducible test case, and neither API tests
2040         nor layout tests seem to have the capability to trigger swipe gestures via UIGestureRecognizer,
2041         which is required for this crash to occur. Notably, back-forward swipe tests I enabled in
2042         r240765 bypass UIKit and emulates the action instead.
2043
2044         * UIProcess/Cocoa/ViewGestureController.cpp:
2045         (WebKit::ViewGestureController::didReachMainFrameLoadTerminalState):
2046         * UIProcess/Cocoa/ViewGestureController.h:
2047         (WebKit::ViewGestureController::SnapshotRemovalTracker::hasRemovalCallback const):
2048
2049 2019-01-30  Benjamin Poulain  <benjamin@webkit.org>
2050
2051         <rdar://problem/47570443> Responsiveness timers are too expensive for frequent events
2052         https://bugs.webkit.org/show_bug.cgi?id=194003
2053
2054         Reviewed by Geoffrey Garen.
2055
2056         The problem here is specific to wheel events.
2057
2058         For every wheel event, we start a responsiveness timer and send
2059         a ping to the WebProcess. When the WebProcess respond, we stop the timer.
2060
2061         The cost of setting up the timers adds up since we get many events.
2062
2063         The first step to improve the situation was to switch ResponsivenessTimer
2064         to WebCore::Timer. Since WebCore::Timer reuse the same CFRunLoopTimerRef,
2065         we save the allocation/deallocation, insertion in the event loop, etc.
2066
2067         Using WebCore::Timer saves some instructions but we were still hitting
2068         the kernel at 120hz to set up then kill each timer.
2069         The second improvement of the patch is to avoid that by not killing the timer
2070         when we hear back from the WebProcess.
2071
2072         Instead of killing the timer, we let it run and ignore the result.
2073         When the next event comes, we reschedule the existing timer.
2074         This brings down the timers to 60Hz, the same rate as the events.
2075
2076         The very last event does time out. In that case, we have a bad idle wake up:
2077         we wake up a sleeping CPU do do nothing.
2078         In the case of wheel events, this is fine since we saved a bunch of CPU already.
2079         For all the other cases, I kept the normal operating mode to avoid the idle wake.
2080
2081         * UIProcess/ResponsivenessTimer.cpp:
2082         (WebKit::ResponsivenessTimer::ResponsivenessTimer):
2083         (WebKit::ResponsivenessTimer::invalidate):
2084         (WebKit::ResponsivenessTimer::timerFired):
2085         (WebKit::ResponsivenessTimer::start):
2086         (WebKit::ResponsivenessTimer::startWithLazyStop):
2087         (WebKit::ResponsivenessTimer::stop):
2088         (WebKit::ResponsivenessTimer::processTerminated):
2089         (WebKit::ResponsivenessTimer::~ResponsivenessTimer): Deleted.
2090         * UIProcess/ResponsivenessTimer.h:
2091         * UIProcess/WebPageProxy.cpp:
2092         (WebKit::WebPageProxy::sendWheelEvent):
2093         * UIProcess/WebProcessProxy.cpp:
2094         (WebKit::WebProcessProxy::isResponsiveWithLazyStop):
2095         * UIProcess/WebProcessProxy.h:
2096
2097 2019-01-30  Daniel Bates  <dabates@apple.com>
2098
2099         [iOS] REGRESSION (r238635): Text area fails to re-focus after dismissal of keyboard on support.apple.com
2100         https://bugs.webkit.org/show_bug.cgi?id=193987
2101         <rdar://problem/47230785>
2102
2103         Reviewed by Tim Horton.
2104
2105         It is unnecessary to relinquish first responder status when a user explicitly dismissing
2106         the keyboard. Moreover, doing so prevents key commands from being intercepted when a
2107         hardware keyboard is subsequently attached.
2108         
2109         Following r238635 a page becomes focused (accepting of keyboard input) and defocused
2110         when the WKContentView becomes first responder and resigns first responder, respectively.
2111         When a user explicitly dismisses the keyboard by tapping Done (iPhone) or the hide keyboard
2112         button (iPad) then UIKit tells WKContentView to resign its first responder status only
2113         to make its superview, WKWebView, first responder. When a person subsequently taps on the
2114         page again, the WKContentView requests to become the first responder. However changes to
2115         page focus are not guaranteed to be sent to the WebProcess immediately (WebPageProxy::activityStateDidChange()
2116         will schedule an update). In particular, they are not guaranteed to be sent before the
2117         WebProcess is told about a tap. Therefore, the WebProcess has out-of-date information on
2118         focus state of the page. Instead we should detect when WKWebView is being asked to resign
2119         as a result of the keyboard dismissal and refuse the request, taking care to end the current
2120         editing session, blur the focused element, and dismiss the on-screen keyboard.
2121
2122         * Platform/spi/ios/UIKitSPI.h: Expose some SPI.
2123         * UIProcess/ios/WKContentViewInteraction.h:
2124         * UIProcess/ios/WKContentViewInteraction.mm:
2125         (-[WKContentView setupInteraction]): Register to receive notifications whenever a user
2126         explicitly dismisses the keyboard.
2127         (-[WKContentView resignFirstResponderForWebView]): If we are being asked to resign as a
2128         result of a user explicitly dismissing the keyboard then refuse to resign.
2129         (-[WKContentView _keyboardDidRequestDismissal:]): Update state, if applicable.
2130
2131 2019-01-30  Keith Rollin  <krollin@apple.com>
2132
2133         Add default constructor for NetworkActivityTracker
2134         https://bugs.webkit.org/show_bug.cgi?id=194058
2135         <rdar://problem/47685457>
2136
2137         Reviewed by Chris Dumez.
2138
2139         ResourceNetworkActivityTracker has a default constructor. It also has
2140         a NetworkActivityTracker data member, which does not have a default
2141         constructor. This will cause some compilers to complain -- they can't
2142         default-create a ResourceNetworkActivityTracker because they can't
2143         default-create its data members. Address this by adding a default
2144         constructor for NetworkActivityTracker.
2145
2146         * NetworkProcess/NetworkActivityTracker.h:
2147
2148 2019-01-30  Daniel Steffen  <dsteffen@apple.com>
2149
2150         <rdar://problem/29471922> Safari should switch from the legacy denap SPI to handling vouchers
2151         https://bugs.webkit.org/show_bug.cgi?id=193992
2152
2153         Reviewed by Geoffrey Garen.
2154
2155         The denap SPI is deprecated.
2156         The new way of staying out of AppNap is through a voucher.
2157
2158         * Platform/IPC/mac/ConnectionMac.mm:
2159         (IPC::readFromMachPort):
2160         * Platform/IPC/mac/ImportanceAssertion.h:
2161         (IPC::ImportanceAssertion::ImportanceAssertion):
2162         (IPC::ImportanceAssertion::~ImportanceAssertion):
2163
2164 2019-01-30  Chris Dumez  <cdumez@apple.com>
2165
2166         Fix crashes when trying to ref the CallbackAggregator in NetworkProcess
2167         https://bugs.webkit.org/show_bug.cgi?id=194054
2168
2169         Reviewed by Brent Fulgham.
2170
2171         The callback aggregators should be ThreadSafeRefCounted since they are passed to other threads.
2172
2173         * NetworkProcess/NetworkProcess.cpp:
2174         (WebKit::NetworkProcess::fetchWebsiteData):
2175         (WebKit::NetworkProcess::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores):
2176         (WebKit::NetworkProcess::topPrivatelyControlledDomainsWithWebsiteData):
2177
2178 2019-01-30  Daniel Bates  <dabates@apple.com>
2179
2180         [iOS] Keyups for non-modifier keys identified as "Dead" when not focused in a content-editable element
2181         https://bugs.webkit.org/show_bug.cgi?id=192824
2182         <rdar://problem/47100332>
2183
2184         Reviewed by Wenson Hsieh.
2185
2186         Use the same code path for key events to editable elements and non-editable elements.
2187
2188         Currently we have different code paths for hardware key events depending on whether the active element
2189         is editable or non-editable. Historically to support dispatching DOM keyboard events for hardware key
2190         presses this differentiation was a necessary workaround for UIKit's event processing precedence of
2191         interpreting key events for system text editing commands and app commands before dispatching unhandled
2192         key events to WebKit. This workaround intercepted raw key UIEvents and manually reconstructed a
2193         WebEvent from it. However there is not enough information in an UIEvent to reconstruct a WebEvent that
2194         is identical to the WebEvent that UIKit would have dispatched. In particular, keyup UIEvents always have
2195         empty modified and unmodified input strings. The UIKit keyboard machinery maintains additional state
2196         that is necessary to manufacture the correct WebEvent corresponding to a UIEvent.
2197
2198         As a side benefit of this change, with the exception of modifier flag changes, both hardware and software
2199         key events use the same code path.
2200
2201         * UIProcess/ios/WKContentViewInteraction.h:
2202         * UIProcess/ios/WKContentViewInteraction.mm:
2203         (-[WKContentView shouldShowAutomaticKeyboardUI]): Extracted code from _requiresKeyboardWhenFirstResponder
2204         (-[WKContentView _disableAutomaticKeyboardUI]): Implement UIKit SPI to prevent showing the keyboard UI
2205         when there is no focused element now that we are no longer intercepting key UIEvents. Formerly the
2206         keyboard UI was disabled as a side effect of not becoming first responder when there was no focused
2207         element (by returning NO in -_requiresKeyboardWhenFirstResponder).
2208         (-[WKContentView _requiresKeyboardWhenFirstResponder]): Always return YES when building with USE(UIKIT_KEYBOARD_ADDITIONS)
2209         so that we always accept key events. Instead of selectively replying to create a keyboard as a means of
2210         hiding the automatic keyboard UI we now implement _disableAutomaticKeyboardUI to selectively hide the
2211         automatic keyboard UI.
2212         (-[WKContentView textInputTraits]): Do not update traits when the keyboard is going to be dismissed
2213         now that we require a keyboard when first responder even if the focused element is non-editable.
2214         (-[WKContentView _didHandleKeyEvent:eventWasHandled:]): Skip logic for re-sending UIEvents to UIKit
2215         as UIKit now processes the event first. This logic was necessary in order to finally allow UIKit
2216         its chance to interpret the UIEvent, we intercepted, for app key commands.
2217         (-[WKContentView _elementDidBlur]): Call [self _endEditing] so that we dismiss any open form controls
2218         (e.g. a <select> popover menu). Currently this happens either by -_requiresKeyboardWhenFirstResponder
2219         responding NO when switching to another field or pressing Tab or Shift + Tab key command, which we will
2220         no longer use when building with USE(UIKIT_KEYBOARD_ADDITIONS) once I land <https://bugs.webkit.org/show_bug.cgi?id=193048>.
2221         * UIProcess/ios/forms/WKFormSelectPopover.mm:
2222         (-[WKSelectPopover initWithView:hasGroups:]): Do not assign ourself as the keyboard delegate. Otherwise,
2223         type ahead and tab cycling will not work. Currently type ahead and tab cycling work by using the non-
2224         editable code path via -_handleKeyUIEvent. Now that we no longer differentiate between key events for
2225         editable and non-editable elements we need to ensure that the WKContentView is the keyboard delegate
2226         when the popover is presented.
2227
2228 2019-01-30  Per Arne Vollan  <pvollan@apple.com>
2229
2230         [macOS] Sandbox fails to compile on 10.12
2231         https://bugs.webkit.org/show_bug.cgi?id=194035
2232         <rdar://problem/47651260>
2233
2234         Reviewed by Brent Fulgham.
2235
2236         This was caused by the commit <https://trac.webkit.org/changeset/239994>, which is only valid for
2237         10.14 and later.
2238
2239         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
2240         * WebProcess/com.apple.WebProcess.sb.in:
2241
2242 2019-01-29  Conrad Shultz  <conrad_shultz@apple.com>
2243
2244         Ensure image picker sourceType is set before cameraDevice
2245         https://bugs.webkit.org/show_bug.cgi?id=193998
2246
2247         Reviewed by Beth Dakin.
2248
2249         * UIProcess/ios/forms/WKFileUploadPanel.mm:
2250         (-[WKFileUploadPanel _showPhotoPickerWithSourceType:]):
2251
2252 2019-01-30  Chris Dumez  <cdumez@apple.com>
2253
2254         Regression(PSON) Load hang can occur on history navigation
2255         https://bugs.webkit.org/show_bug.cgi?id=194030
2256         <rdar://problem/47656939>
2257
2258         Reviewed by Antti Koivisto.
2259
2260         We do not support having more than one WebPage in a WebProcess with the same page ID. As a result,
2261         if we decide to reuse an existing process on process-swap, we need to make sure that we either use
2262         its suspended page (when possible, meaning that it is for the right HistoryItem / page) or we need
2263         make sure we drop the existing suspended page for this process / pagePID combination, so that the
2264         WebPage on WebProcess side gets closed before we attempt to do the new load.
2265
2266         We were doing this correctly in 2 places in WebProcessPool::processForNavigationInternal() but failed
2267         to do so in a third place, when doing back to a HistoryItem which does not have a SuspendedPage but
2268         whose process is still alive (presumably because it is kept alive by another suspended page). This
2269         patch fixes this third place to remove any suspended page in the process for the current page before
2270         reusing the process. An assertion was also added to the call site in
2271         WebPageProxy::receivedNavigationPolicyDecision() to make sure we catch this more easily in the
2272         future.
2273
2274         * UIProcess/WebPageProxy.cpp:
2275         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
2276         * UIProcess/WebProcessPool.cpp:
2277         (WebKit::WebProcessPool::processForNavigationInternal):
2278         (WebKit::WebProcessPool::removeAllSuspendedPagesForPage):
2279         (WebKit::WebProcessPool::hasSuspendedPageFor const):
2280         * UIProcess/WebProcessPool.h:
2281
2282 2019-01-30  Carlos Garcia Campos  <cgarcia@igalia.com>
2283
2284         [GTK][Wayland] REGRESSION(r240712): Clear the GL context if it's the current one on dispose
2285         https://bugs.webkit.org/show_bug.cgi?id=194024
2286
2287         Reviewed by Michael Catanzaro.
2288
2289         Fixes a crash in gdk_gl_context_dispose().
2290
2291         * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
2292         (WebKit::AcceleratedBackingStoreWayland::~AcceleratedBackingStoreWayland):
2293
2294 2019-01-30  Antti Koivisto  <antti@apple.com>
2295
2296         Crash in WebKit::RemoteLayerTreePropertyApplier::updateChildren
2297         https://bugs.webkit.org/show_bug.cgi?id=193897
2298         <rdar://problem/47427750>
2299
2300         Reviewed by Simon Fraser.
2301
2302         There has been some null pointer crashes where we fail to find a remote layer tree node that matches
2303         the transaction properties.
2304
2305         * Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
2306         (WebKit::RemoteLayerTreePropertyApplier::updateChildren):
2307
2308         Null check the nodes.
2309
2310 2019-01-30  Simon Fraser  <simon.fraser@apple.com>
2311
2312         Add some basic geometry information to the scrolling tree
2313         https://bugs.webkit.org/show_bug.cgi?id=194002
2314
2315         Reviewed by Antti Koivisto.
2316
2317         Add a comment explaining why we don't need to encode/decode ParentRelativeScrollableRect.
2318
2319         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
2320         (ArgumentCoder<ScrollingStateFrameHostingNode>::encode):
2321
2322 2019-01-30  Carlos Garcia Campos  <cgarcia@igalia.com>
2323
2324         [GTK] gdk_cairo_draw_from_gl() in AcceleratedBackingStoreWayland fails in GtkInspector's magnifier
2325         https://bugs.webkit.org/show_bug.cgi?id=193903
2326
2327         Reviewed by Michael Catanzaro.
2328
2329         The problem is that the GL context used by WaylandCompositor can't share resources with the one used by GTK+
2330         when painting with gdk_cairo_draw_from_gl(). Accelerated compositing in Wayland works only because
2331         WaylandCompositor makes the context current only once on initialization. So, when we render the first frame on
2332         accelerated compositing mode, GTK+ is rendering in non-GL mode, and switches to the GL mode when
2333         gdk_cairo_draw_from_gl() is called. Since GTK+ didn't have a GL context yet, the first frame is always rendered
2334         by GTK+ using the software fallback (glReadPixels). The thing is that the first time gdk_cairo_draw_from_gl() is
2335         called, GTK+ creates a GL context for painting that is made current, and it will remain the current one
2336         forever. The first frame fails to render with "GL_INVALID_OPERATION in glBindTexture(non-gen name)" because the
2337         texture created in WaylandCompositor GL context can't be accessed from GTK+ GL context. The following frames are
2338         handled with the GTK+ GL context. I would say this works by casuality and it could be the cause of other
2339         accelerated compositing issues in Wayland.
2340
2341         We need to create our own GdkGLContext for the WebView, and use that in the WaylandCompositor. When the
2342         GdkGLContext is created, the GTK+ GL context for painting is used as a shared context, ensuring that resources
2343         created in the new context will be accessible from the painting one.
2344
2345         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2346         (webkitWebViewBaseMakeGLContextCurrent): Call AcceleratedBackingStore::makeContextCurrent().
2347         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
2348         * UIProcess/WebPageProxy.h:
2349         * UIProcess/gtk/AcceleratedBackingStore.h:
2350         (WebKit::AcceleratedBackingStore::makeContextCurrent): New virtual method only implemented by Wayland backend.
2351         * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
2352         (WebKit::AcceleratedBackingStoreWayland::tryEnsureGLContext): Try to create a GL context with
2353         gdk_window_create_gl_context(), falling back to a WebCore::GLContext if it fails or GTK+ version is not new enough.
2354         (WebKit::AcceleratedBackingStoreWayland::makeContextCurrent): Make the GL context current.
2355         (WebKit::AcceleratedBackingStoreWayland::paint): Check if we have a GdkGLContext before trying to use gdk_cairo_draw_from_gl().
2356         (WebKit::AcceleratedBackingStoreWayland::canGdkUseGL const): Deleted.
2357         * UIProcess/gtk/AcceleratedBackingStoreWayland.h:
2358         * UIProcess/gtk/WaylandCompositor.cpp:
2359         (WebKit::WaylandCompositor::Surface::Surface): Move the texture creation to setWebPage(), since we need the
2360         WebView GL context.
2361         (WebKit::WaylandCompositor::Surface::~Surface): Move the code to destroy GL resources to setWebPage().
2362         (WebKit::WaylandCompositor::Surface::setWebPage): Create the texture when a new page is set and destroy GL
2363         resources when unset.
2364         (WebKit::WaylandCompositor::Surface::prepareTextureForPainting): Make WebView GL context current.
2365         (WebKit::WaylandCompositor::Surface::commit): Ditto.
2366         (WebKit::WaylandCompositor::initializeEGL): Use a temporary GLContext.
2367         * UIProcess/gtk/WaylandCompositor.h:
2368         * UIProcess/gtk/WebPageProxyGtk.cpp:
2369         (WebKit::WebPageProxy::makeGLContextCurrent): Call webkitWebViewBaseMakeGLContextCurrent().
2370
2371 2019-01-29  Ryosuke Niwa  <rniwa@webkit.org>
2372
2373         iOS: Nullptr crash in WebPage::getPositionInformation dereferencing an input element for data list
2374         https://bugs.webkit.org/show_bug.cgi?id=193996
2375
2376         Reviewed by Wenson Hsieh.
2377
2378         Added a missing nullptr check.
2379
2380         * WebProcess/WebPage/ios/WebPageIOS.mm:
2381         (WebKit::WebPage::getPositionInformation):
2382
2383 2019-01-29  Simon Fraser  <simon.fraser@apple.com>
2384
2385         Add nodes to the scrolling tree in z-index order.
2386         https://bugs.webkit.org/show_bug.cgi?id=192529
2387         <rdar://problem/47402708>
2388
2389         Reviewed by Dean Jackson.
2390
2391         FrameHosting nodes have layers, so need to update them.
2392
2393         * Platform/Logging.cpp:
2394         (WebKit::initializeLogChannelsIfNecessary):
2395         * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
2396         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
2397
2398 2019-01-29  Alex Christensen  <achristensen@webkit.org>
2399
2400         Change NetworkConnectionToWebProcess* to NetworkConnectionToWebProcess& where possible
2401         https://bugs.webkit.org/show_bug.cgi?id=193974
2402
2403         Reviewed by Tim Horton.
2404
2405         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
2406         (WebKit::NetworkBlobRegistry::registerFileBlobURL):
2407         (WebKit::NetworkBlobRegistry::registerBlobURL):
2408         (WebKit::NetworkBlobRegistry::registerBlobURLOptionallyFileBacked):
2409         (WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
2410         (WebKit::NetworkBlobRegistry::unregisterBlobURL):
2411         (WebKit::NetworkBlobRegistry::blobSize):
2412         (WebKit::NetworkBlobRegistry::connectionToWebProcessDidClose):
2413         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
2414         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2415         (WebKit::NetworkConnectionToWebProcess::didClose):
2416         (WebKit::NetworkConnectionToWebProcess::registerFileBlobURL):
2417         (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
2418         (WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL):
2419         (WebKit::NetworkConnectionToWebProcess::registerBlobURLOptionallyFileBacked):
2420         (WebKit::NetworkConnectionToWebProcess::registerBlobURLForSlice):
2421         (WebKit::NetworkConnectionToWebProcess::unregisterBlobURL):
2422         (WebKit::NetworkConnectionToWebProcess::blobSize):
2423         * NetworkProcess/NetworkProcess.cpp:
2424         (WebKit::NetworkProcess::removeNetworkConnectionToWebProcess):
2425         * NetworkProcess/NetworkProcess.h:
2426
2427 2019-01-29  Youenn Fablet  <youenn@apple.com>
2428
2429         Adopt new SPI to evaluate server certificate trust
2430         https://bugs.webkit.org/show_bug.cgi?id=193355
2431
2432         Reviewed by Alex Christensen.
2433
2434         Use new SPI provided in NSURLSession to evaluate server certificates.
2435         If successful, let loading proceed as usual.
2436         Otherwise, go to the UIProcess to ask for a decision on continuing the load or not.
2437
2438         * NetworkProcess/cocoa/NetworkSessionCocoa.h:
2439         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2440         (canNSURLSessionTrustEvaluate):
2441         (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
2442         (WebKit::NetworkSessionCocoa::continueDidReceiveChallenge):
2443
2444 2019-01-29  Tim Horton  <timothy_horton@apple.com>
2445
2446         Fix the build
2447
2448         * UIProcess/ios/WKDrawingCoordinator.h:
2449         * UIProcess/ios/WKDrawingCoordinator.mm:
2450         * UIProcess/ios/WKDrawingView.mm:
2451
2452 2019-01-29  Alex Christensen  <achristensen@webkit.org>
2453
2454         Remove unused NetworkProcessProxy::writeBlobToFilePath
2455         https://bugs.webkit.org/show_bug.cgi?id=193990
2456
2457         Reviewed by Wenson Hsieh.
2458
2459         This code was only used in code that was introduced in r235202
2460         but that has since been refactored to not use blobs.  Its tests still pass.
2461         This removes the only UIProcess-controlled code that uses NetworkBlobRegistry::singleton.
2462
2463         * NetworkProcess/NetworkProcess.cpp:
2464         (WebKit::NetworkProcess::writeBlobToFilePath): Deleted.
2465         * NetworkProcess/NetworkProcess.h:
2466         * NetworkProcess/NetworkProcess.messages.in:
2467         * UIProcess/Cocoa/WebViewImpl.mm:
2468         (WebKit::WebViewImpl::writeToURLForFilePromiseProvider):
2469         * UIProcess/Network/NetworkProcessProxy.cpp:
2470         (WebKit::NetworkProcessProxy::writeBlobToFilePath): Deleted.
2471         * UIProcess/Network/NetworkProcessProxy.h:
2472         * UIProcess/WebPageProxy.cpp:
2473         (WebKit::WebPageProxy::writeBlobToFilePath): Deleted.
2474         * UIProcess/WebPageProxy.h:
2475
2476 2019-01-29  Devin Rousso  <drousso@apple.com>
2477
2478         Web Inspector: expose a way of determining if a detached frontend is for a remote target
2479         https://bugs.webkit.org/show_bug.cgi?id=193951
2480         <rdar://problem/47621366>
2481
2482         Reviewed by Joseph Pecoraro.
2483
2484         * UIProcess/WebInspectorProxy.h:
2485         (WebKit::WebInspectorProxy::InspectionTargetType): Added.
2486         (WebKit::WebInspectorProxy::createFrontendWindow):
2487         * UIProcess/mac/WebInspectorProxyMac.mm:
2488         (WebKit::WebInspectorProxy::createFrontendWindow):
2489         (WebKit::WebInspectorProxy::platformCreateFrontendWindow):
2490         * UIProcess/mac/RemoteWebInspectorProxyMac.mm:
2491         (WebKit::RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow):
2492
2493         * UIProcess/API/Cocoa/_WKInspectorWindow.h: Moved from UIProcess/mac/WKInspectorWindow.h.
2494         * UIProcess/API/Cocoa/_WKInspectorWindow.mm: Moved from UIProcess/mac/WKInspectorWindow.mm.
2495         (-[WKInspectorWindow isRemote]): Added.
2496
2497         * Shared/API/Cocoa/_WKNSWindowExtras.mm:
2498         (-[NSWindow _web_isWebInspectorWindow]):
2499
2500         * PlatformMac.cmake:
2501         * SourcesCocoa.txt:
2502         * UnifiedSources-input.xcfilelist:
2503         * WebKit.xcodeproj/project.pbxproj:
2504
2505 2019-01-29  Alex Christensen  <achristensen@webkit.org>
2506
2507         Rename ChildProcess to AuxiliaryProcess
2508         https://bugs.webkit.org/show_bug.cgi?id=193943
2509
2510         Reviewed by Andy Estes.
2511
2512         "Child" implies that there is a parent, but I'm about to introduce a type of NetworkProcess that
2513         doesn't always have a parent, and may have many UIProcesses that it is the auxiliary for.
2514
2515         * CMakeLists.txt:
2516         * DerivedSources-input.xcfilelist:
2517         * DerivedSources-output.xcfilelist:
2518         * DerivedSources.make:
2519         * NetworkProcess/Cookies/WebCookieManager.cpp:
2520         * NetworkProcess/Cookies/soup/WebCookieManagerSoup.cpp:
2521         * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
2522         (WebKit::initializeAuxiliaryProcess<NetworkProcess>):
2523         (WebKit::initializeChildProcess<NetworkProcess>): Deleted.
2524         * NetworkProcess/NetworkProcess.cpp:
2525         (WebKit::callExitSoon):
2526         (WebKit::NetworkProcess::NetworkProcess):
2527         (WebKit::NetworkProcess::didReceiveMessage):
2528         (WebKit::NetworkProcess::initializeConnection):
2529         (WebKit::NetworkProcess::terminate):
2530         (WebKit::NetworkProcess::initializeProcess):
2531         (WebKit::NetworkProcess::initializeProcessName):
2532         (WebKit::NetworkProcess::initializeSandbox):
2533         * NetworkProcess/NetworkProcess.h:
2534         * NetworkProcess/NetworkProcessSupplement.h:
2535         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2536         (WebKit::NetworkCache::Storage::deleteOldVersions):
2537         * NetworkProcess/ios/NetworkProcessIOS.mm:
2538         (WebKit::NetworkProcess::initializeProcess):
2539         (WebKit::NetworkProcess::initializeProcessName):
2540         (WebKit::NetworkProcess::initializeSandbox):
2541         * NetworkProcess/mac/NetworkProcessMac.mm:
2542         (WebKit::NetworkProcess::initializeProcess):
2543         (WebKit::NetworkProcess::initializeProcessName):
2544         (WebKit::NetworkProcess::initializeSandbox):
2545         * NetworkProcess/soup/NetworkProcessMainSoup.cpp:
2546         (WebKit::initializeAuxiliaryProcess<NetworkProcess>):
2547         (WebKit::NetworkProcessMainUnix):
2548         (WebKit::initializeChildProcess<NetworkProcess>): Deleted.
2549         * NetworkProcess/watchos/NetworkProximityManager.h:
2550         * NetworkProcess/watchos/NetworkProximityManager.mm:
2551         (WebKit::NetworkProximityManager::NetworkProximityManager):
2552         * NetworkProcess/win/NetworkProcessMainWin.cpp:
2553         (WebKit::initializeAuxiliaryProcess<NetworkProcess>):
2554         (WebKit::NetworkProcessMainWin):
2555         (WebKit::initializeChildProcess<NetworkProcess>): Deleted.
2556         * PlatformGTK.cmake:
2557         * PlatformMac.cmake:
2558         * PlatformWin.cmake:
2559         * PluginProcess/PluginProcess.cpp:
2560         (WebKit::PluginProcess::initializeProcess):
2561         (WebKit::PluginProcess::initializeConnection):
2562         (WebKit::PluginProcess::didReceiveMessage):
2563         (WebKit::PluginProcess::initializeProcessName):
2564         (WebKit::PluginProcess::initializeSandbox):
2565         * PluginProcess/PluginProcess.h:
2566         * PluginProcess/mac/PluginProcessMac.mm:
2567         (WebKit::PluginProcess::platformInitializeProcess):
2568         (WebKit::PluginProcess::initializeProcessName):
2569         (WebKit::PluginProcess::initializeSandbox):
2570         (WebKit::PluginProcess::stopRunLoop):
2571         * PluginProcess/unix/PluginProcessMainUnix.cpp:
2572         (WebKit::PluginProcessMainUnix):
2573         * PluginProcess/unix/PluginProcessUnix.cpp:
2574         (WebKit::PluginProcess::platformInitializeProcess):
2575         * Shared/Authentication/AuthenticationManager.cpp:
2576         (WebKit::AuthenticationManager::AuthenticationManager):
2577         * Shared/Authentication/AuthenticationManager.h:
2578         * Shared/AuxiliaryProcess.cpp: Copied from Source/WebKit/Shared/ChildProcess.cpp.
2579         (WebKit::AuxiliaryProcess::AuxiliaryProcess):
2580         (WebKit::AuxiliaryProcess::~AuxiliaryProcess):
2581         (WebKit::AuxiliaryProcess::didClose):
2582         (WebKit::AuxiliaryProcess::initialize):
2583         (WebKit::AuxiliaryProcess::setProcessSuppressionEnabled):
2584         (WebKit::AuxiliaryProcess::initializeProcess):
2585         (WebKit::AuxiliaryProcess::initializeProcessName):
2586         (WebKit::AuxiliaryProcess::initializeConnection):
2587         (WebKit::AuxiliaryProcess::addMessageReceiver):
2588         (WebKit::AuxiliaryProcess::removeMessageReceiver):
2589         (WebKit::AuxiliaryProcess::disableTermination):
2590         (WebKit::AuxiliaryProcess::enableTermination):
2591         (WebKit::AuxiliaryProcess::messageSenderConnection):
2592         (WebKit::AuxiliaryProcess::messageSenderDestinationID):
2593         (WebKit::AuxiliaryProcess::terminationTimerFired):
2594         (WebKit::AuxiliaryProcess::stopRunLoop):
2595         (WebKit::AuxiliaryProcess::platformStopRunLoop):
2596         (WebKit::AuxiliaryProcess::terminate):
2597         (WebKit::AuxiliaryProcess::shutDown):
2598         (WebKit::AuxiliaryProcess::registerURLSchemeServiceWorkersCanHandle const):
2599         (WebKit::AuxiliaryProcess::platformInitialize):
2600         (WebKit::AuxiliaryProcess::initializeSandbox):
2601         (WebKit::AuxiliaryProcess::didReceiveInvalidMessage):
2602         (WebKit::AuxiliaryProcess::didReceiveMemoryPressureEvent):
2603         (WebKit::ChildProcess::ChildProcess): Deleted.
2604         (WebKit::ChildProcess::~ChildProcess): Deleted.
2605         (WebKit::ChildProcess::didClose): Deleted.
2606         (WebKit::ChildProcess::initialize): Deleted.
2607         (WebKit::ChildProcess::setProcessSuppressionEnabled): Deleted.
2608         (WebKit::ChildProcess::initializeProcess): Deleted.
2609         (WebKit::ChildProcess::initializeProcessName): Deleted.
2610         (WebKit::ChildProcess::initializeConnection): Deleted.
2611         (WebKit::ChildProcess::addMessageReceiver): Deleted.
2612         (WebKit::ChildProcess::removeMessageReceiver): Deleted.
2613         (WebKit::ChildProcess::disableTermination): Deleted.
2614         (WebKit::ChildProcess::enableTermination): Deleted.
2615         (WebKit::ChildProcess::messageSenderConnection): Deleted.
2616         (WebKit::ChildProcess::messageSenderDestinationID): Deleted.
2617         (WebKit::ChildProcess::terminationTimerFired): Deleted.
2618         (WebKit::ChildProcess::stopRunLoop): Deleted.
2619         (WebKit::ChildProcess::platformStopRunLoop): Deleted.
2620         (WebKit::ChildProcess::terminate): Deleted.
2621         (WebKit::ChildProcess::shutDown): Deleted.
2622         (WebKit::ChildProcess::registerURLSchemeServiceWorkersCanHandle const): Deleted.
2623         (WebKit::ChildProcess::platformInitialize): Deleted.
2624         (WebKit::ChildProcess::initializeSandbox): Deleted.
2625         (WebKit::ChildProcess::didReceiveInvalidMessage): Deleted.
2626         (WebKit::ChildProcess::didReceiveMemoryPressureEvent): Deleted.
2627         * Shared/AuxiliaryProcess.h: Copied from Source/WebKit/Shared/ChildProcess.h.
2628         (WebKit::ChildProcess::parentProcessConnection const): Deleted.
2629         (WebKit::ChildProcess::messageReceiverMap): Deleted.
2630         (WebKit::ChildProcess::setTerminationTimeout): Deleted.
2631         (WebKit::ChildProcess::shouldOverrideQuarantine): Deleted.
2632         * Shared/AuxiliaryProcess.messages.in: Copied from Source/WebKit/Shared/ChildProcess.messages.in.
2633         * Shared/AuxiliaryProcessSupplement.h: Copied from Source/WebKit/Shared/ChildProcessSupplement.h.
2634         (WebKit::AuxiliaryProcessSupplement::~AuxiliaryProcessSupplement):
2635         (WebKit::ChildProcessSupplement::~ChildProcessSupplement): Deleted.
2636         (WebKit::ChildProcessSupplement::initializeConnection): Deleted.
2637         * Shared/ChildProcess.cpp: Removed.
2638         * Shared/ChildProcess.h: Removed.
2639         * Shared/ChildProcess.messages.in: Removed.
2640         * Shared/ChildProcessSupplement.h: Removed.
2641         * Shared/Cocoa/AuxiliaryProcessCocoa.mm: Copied from Source/WebKit/Shared/Cocoa/ChildProcessCocoa.mm.
2642         (WebKit::AuxiliaryProcess::didReceiveInvalidMessage):
2643         (WebKit::ChildProcess::didReceiveInvalidMessage): Deleted.
2644         * Shared/Cocoa/ChildProcessCocoa.mm: Removed.
2645         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
2646         (WebKit::initializeAuxiliaryProcess):
2647         (WebKit::XPCServiceInitializer):
2648         (WebKit::initializeChildProcess): Deleted.
2649         * Shared/WebSQLiteDatabaseTracker.cpp:
2650         (WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker):
2651         (WebKit::WebSQLiteDatabaseTracker::hysteresisUpdated):
2652         (WebKit::m_childProcessType): Deleted.
2653         * Shared/WebSQLiteDatabaseTracker.h:
2654         * Shared/ios/AuxiliaryProcessIOS.mm: Copied from Source/WebKit/Shared/ios/ChildProcessIOS.mm.
2655         (WebKit::AuxiliaryProcess::platformInitialize):
2656         (WebKit::AuxiliaryProcess::initializeSandbox):
2657         (WebKit::AuxiliaryProcess::setQOS):
2658         (WebKit::AuxiliaryProcess::platformStopRunLoop):
2659         (WebKit::ChildProcess::platformInitialize): Deleted.
2660         (WebKit::ChildProcess::initializeSandbox): Deleted.
2661         (WebKit::ChildProcess::setQOS): Deleted.
2662         (WebKit::ChildProcess::platformStopRunLoop): Deleted.
2663         * Shared/ios/ChildProcessIOS.mm: Removed.
2664         * Shared/mac/AuxiliaryProcessMac.mm: Copied from Source/WebKit/Shared/mac/ChildProcessMac.mm.
2665         (WebKit::SandboxInfo::SandboxInfo):
2666         (WebKit::AuxiliaryProcess::launchServicesCheckIn):
2667         (WebKit::AuxiliaryProcess::platformInitialize):
2668         (WebKit::processStorageClass):
2669         (WebKit::sandboxDirectory):
2670         (WebKit::applySandbox):
2671         (WebKit::initializeSandboxParameters):
2672         (WebKit::AuxiliaryProcess::initializeSandbox):
2673         (WebKit::AuxiliaryProcess::stopNSAppRunLoop):
2674         (WebKit::AuxiliaryProcess::stopNSRunLoop):
2675         (WebKit::AuxiliaryProcess::platformStopRunLoop):
2676         (WebKit::AuxiliaryProcess::setQOS):
2677         (WebKit::AuxiliaryProcess::isSystemWebKit):
2678         (WebKit::ChildProcess::launchServicesCheckIn): Deleted.
2679         (WebKit::ChildProcess::platformInitialize): Deleted.
2680         (WebKit::ChildProcess::initializeSandbox): Deleted.
2681         (WebKit::ChildProcess::stopNSAppRunLoop): Deleted.
2682         (WebKit::ChildProcess::stopNSRunLoop): Deleted.
2683         (WebKit::ChildProcess::platformStopRunLoop): Deleted.
2684         (WebKit::ChildProcess::setQOS): Deleted.
2685         (WebKit::ChildProcess::isSystemWebKit): Deleted.
2686         * Shared/mac/ChildProcessMac.mm: Removed.
2687         * Shared/mac/SecItemShim.cpp:
2688         (WebKit::globalNetworkProcess):
2689         (WebKit::sendSecItemRequest):
2690         (WebKit::initializeSecItemShim):
2691         * Shared/mac/SecItemShim.h:
2692         * Shared/unix/AuxiliaryProcessMain.cpp: Copied from Source/WebKit/Shared/unix/ChildProcessMain.cpp.
2693         (WebKit::AuxiliaryProcessMainBase::parseCommandLine):
2694         (WebKit::ChildProcessMainBase::parseCommandLine): Deleted.
2695         * Shared/unix/AuxiliaryProcessMain.h: Copied from Source/WebKit/Shared/unix/ChildProcessMain.h.
2696         (WebKit::AuxiliaryProcessMainBase::takeInitializationParameters):
2697         (WebKit::initializeAuxiliaryProcess):
2698         (WebKit::AuxiliaryProcessMain):
2699         (WebKit::ChildProcessMainBase::platformInitialize): Deleted.
2700         (WebKit::ChildProcessMainBase::platformFinalize): Deleted.
2701         (WebKit::ChildProcessMainBase::takeInitializationParameters): Deleted.
2702         (WebKit::initializeChildProcess): Deleted.
2703         (WebKit::ChildProcessMain): Deleted.
2704         * Shared/unix/ChildProcessMain.cpp: Removed.
2705         * Shared/unix/ChildProcessMain.h: Removed.
2706         * Shared/win/AuxiliaryProcessMainWin.cpp: Copied from Source/WebKit/Shared/win/ChildProcessMainWin.cpp.
2707         (WebKit::AuxiliaryProcessMainBase::parseCommandLine):
2708         (WebKit::ChildProcessMainBase::parseCommandLine): Deleted.
2709         * Shared/win/ChildProcessMainWin.cpp: Removed.
2710         * Sources.txt:
2711         * SourcesCocoa.txt:
2712         * SourcesGTK.txt:
2713         * SourcesWPE.txt:
2714         * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
2715         * UIProcess/Authentication/AuthenticationChallengeProxy.h:
2716         * UIProcess/AuxiliaryProcessProxy.cpp: Copied from Source/WebKit/UIProcess/ChildProcessProxy.cpp.
2717         (WebKit::AuxiliaryProcessProxy::AuxiliaryProcessProxy):
2718         (WebKit::AuxiliaryProcessProxy::~AuxiliaryProcessProxy):
2719         (WebKit::AuxiliaryProcessProxy::getLaunchOptions):
2720         (WebKit::AuxiliaryProcessProxy::connect):
2721         (WebKit::AuxiliaryProcessProxy::terminate):
2722         (WebKit::AuxiliaryProcessProxy::state const):
2723         (WebKit::AuxiliaryProcessProxy::sendMessage):
2724         (WebKit::AuxiliaryProcessProxy::addMessageReceiver):
2725         (WebKit::AuxiliaryProcessProxy::removeMessageReceiver):
2726         (WebKit::AuxiliaryProcessProxy::dispatchMessage):
2727         (WebKit::AuxiliaryProcessProxy::dispatchSyncMessage):
2728         (WebKit::AuxiliaryProcessProxy::didFinishLaunching):
2729         (WebKit::AuxiliaryProcessProxy::shutDownProcess):
2730         (WebKit::AuxiliaryProcessProxy::setProcessSuppressionEnabled):
2731         (WebKit::AuxiliaryProcessProxy::connectionWillOpen):
2732         (WebKit::ChildProcessProxy::ChildProcessProxy): Deleted.
2733         (WebKit::ChildProcessProxy::~ChildProcessProxy): Deleted.
2734         (WebKit::ChildProcessProxy::getLaunchOptions): Deleted.
2735         (WebKit::ChildProcessProxy::connect): Deleted.
2736         (WebKit::ChildProcessProxy::terminate): Deleted.
2737         (WebKit::ChildProcessProxy::state const): Deleted.
2738         (WebKit::ChildProcessProxy::sendMessage): Deleted.
2739         (WebKit::ChildProcessProxy::addMessageReceiver): Deleted.
2740         (WebKit::ChildProcessProxy::removeMessageReceiver): Deleted.
2741         (WebKit::ChildProcessProxy::dispatchMessage): Deleted.
2742         (WebKit::ChildProcessProxy::dispatchSyncMessage): Deleted.
2743         (WebKit::ChildProcessProxy::didFinishLaunching): Deleted.
2744         (WebKit::ChildProcessProxy::shutDownProcess): Deleted.
2745         (WebKit::ChildProcessProxy::setProcessSuppressionEnabled): Deleted.
2746         (WebKit::ChildProcessProxy::connectionWillOpen): Deleted.
2747         * UIProcess/AuxiliaryProcessProxy.h: Copied from Source/WebKit/UIProcess/ChildProcessProxy.h.
2748         (WebKit::AuxiliaryProcessProxy::send):
2749         (WebKit::AuxiliaryProcessProxy::sendSync):
2750         (WebKit::AuxiliaryProcessProxy::sendWithAsyncReply):
2751         (WebKit::ChildProcessProxy::send): Deleted.
2752         (WebKit::ChildProcessProxy::sendSync): Deleted.
2753         (WebKit::ChildProcessProxy::connection const): Deleted.
2754         (WebKit::ChildProcessProxy::hasConnection const): Deleted.
2755         (WebKit::ChildProcessProxy::processIdentifier const): Deleted.
2756         (WebKit::ChildProcessProxy::canSendMessage const): Deleted.
2757         (WebKit::ChildProcessProxy::coreProcessIdentifier const): Deleted.
2758         (WebKit::ChildProcessProxy::platformGetLaunchOptions): Deleted.
2759         (WebKit::ChildProcessProxy::sendWithAsyncReply): Deleted.
2760         * UIProcess/ChildProcessProxy.cpp: Removed.
2761         * UIProcess/ChildProcessProxy.h: Removed.
2762         * UIProcess/Downloads/DownloadProxyMap.cpp:
2763         (WebKit::DownloadProxyMap::DownloadProxyMap):
2764         * UIProcess/Downloads/DownloadProxyMap.h:
2765         * UIProcess/Network/NetworkProcessProxy.cpp:
2766         (WebKit::NetworkProcessProxy::NetworkProcessProxy):
2767         (WebKit::NetworkProcessProxy::getLaunchOptions):
2768         (WebKit::NetworkProcessProxy::createDownloadProxy):
2769         (WebKit::NetworkProcessProxy::didFinishLaunching):
2770         * UIProcess/Network/NetworkProcessProxy.h:
2771         * UIProcess/Plugins/PluginProcessProxy.cpp:
2772         (WebKit::PluginProcessProxy::getLaunchOptions):
2773         (WebKit::PluginProcessProxy::sendMemoryPressureEvent):
2774         * UIProcess/Plugins/PluginProcessProxy.h:
2775         * UIProcess/ServiceWorkerProcessProxy.h:
2776         * UIProcess/WebPageProxy.cpp:
2777         (WebKit::WebPageProxy::finishAttachingToWebProcess):
2778         * UIProcess/WebProcessPool.cpp:
2779         (WebKit::WebProcessPool::sendMemoryPressureEvent):
2780         (WebKit::WebProcessPool::registerURLSchemeServiceWorkersCanHandle):
2781         * UIProcess/WebProcessProxy.cpp:
2782         (WebKit::WebProcessProxy::WebProcessProxy):
2783         (WebKit::WebProcessProxy::getLaunchOptions):
2784         (WebKit::WebProcessProxy::didFinishLaunching):
2785         (WebKit::WebProcessProxy::maybeShutDown):
2786         (WebKit::WebProcessProxy::canTerminateAuxiliaryProcess):
2787         (WebKit::WebProcessProxy::shouldTerminate):
2788         (WebKit::WebProcessProxy::requestTermination):
2789         (WebKit::WebProcessProxy::canTerminateChildProcess): Deleted.
2790         * UIProcess/WebProcessProxy.h:
2791         * UnifiedSources-input.xcfilelist:
2792         * WebKit.xcodeproj/project.pbxproj:
2793         * WebProcess/WebProcess.cpp:
2794         (WebKit::WebProcess::initializeProcess):
2795         (WebKit::WebProcess::initializeConnection):
2796         (WebKit::WebProcess::terminate):
2797         (WebKit::WebProcess::didReceiveMessage):
2798         (WebKit::WebProcess::initializeProcessName):
2799         (WebKit::WebProcess::initializeSandbox):
2800         (WebKit::WebProcess::platformInitializeProcess):
2801         * WebProcess/WebProcess.h:
2802         * WebProcess/WebProcessSupplement.h:
2803         * WebProcess/cocoa/WebProcessCocoa.mm:
2804         (WebKit::WebProcess::initializeProcessName):
2805         (WebKit::WebProcess::platformInitializeProcess):
2806         (WebKit::WebProcess::stopRunLoop):
2807         (WebKit::WebProcess::initializeSandbox):
2808         * WebProcess/gtk/WebProcessMainGtk.cpp:
2809         (WebKit::WebProcessMainUnix):
2810         * WebProcess/win/WebProcessMainWin.cpp:
2811         (WebKit::WebProcessMainWin):
2812         * WebProcess/wpe/WebProcessMainWPE.cpp:
2813         (WebKit::WebProcessMainUnix):
2814
2815 2019-01-29  Simon Fraser  <simon.fraser@apple.com>
2816
2817         REGRESSION(r240553): [iOS] Crash in ScrollingTree::updateTreeFromStateNode when attempting to log in to icloud.com
2818         https://bugs.webkit.org/show_bug.cgi?id=193907
2819
2820         Reviewed by Frédéric Wang.
2821
2822         Remove encode/decode of removedNodes.
2823
2824         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
2825         (WebKit::RemoteScrollingCoordinatorTransaction::encode const):
2826         (WebKit::RemoteScrollingCoordinatorTransaction::decode):
2827         (WebKit::dump):
2828
2829 2019-01-29  Brent Fulgham  <bfulgham@apple.com>
2830
2831         StorageAccess API calls should be direct to the Network Process
2832         https://bugs.webkit.org/show_bug.cgi?id=193924
2833         <rdar://problem/47611249>
2834
2835         Reviewed by Alex Christensen.
2836
2837         Now that the ResourceLoadStatistics data lives in the Network Process, calls to Storage Access
2838         API should happen directly between the WebContent and Network processes.
2839
2840         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
2841         (WebKit::WebResourceLoadStatisticsStore::requestStorageAccessGranted):
2842         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
2843         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2844         (WebKit::NetworkConnectionToWebProcess::removeStorageAccessForFrame):
2845         (WebKit::NetworkConnectionToWebProcess::removeStorageAccessForAllFramesOnPage):
2846         (WebKit::NetworkConnectionToWebProcess::logUserInteraction):
2847         (WebKit::NetworkConnectionToWebProcess::logWebSocketLoading):
2848         (WebKit::NetworkConnectionToWebProcess::logSubresourceLoading):
2849         (WebKit::NetworkConnectionToWebProcess::logSubresourceRedirect):
2850         (WebKit::NetworkConnectionToWebProcess::requestResourceLoadStatisticsUpdate):
2851         (WebKit::NetworkConnectionToWebProcess::hasStorageAccess):
2852         (WebKit::NetworkConnectionToWebProcess::requestStorageAccess):
2853         * NetworkProcess/NetworkConnectionToWebProcess.h:
2854         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
2855         * NetworkProcess/NetworkProcess.cpp:
2856         (WebKit::NetworkProcess::requestStorageAccess):
2857         (WebKit::NetworkProcess::requestStorageAccessGranted):
2858         * NetworkProcess/NetworkProcess.h:
2859         * UIProcess/Network/NetworkProcessProxy.cpp:
2860         (WebKit::NetworkProcessProxy::requestStorageAccessConfirm):
2861         * UIProcess/Network/NetworkProcessProxy.h:
2862         * UIProcess/Network/NetworkProcessProxy.messages.in:
2863         * UIProcess/WebPageProxy.cpp:
2864         (WebKit::WebPageProxy::requestStorageAccessConfirm):
2865         (WebKit::WebPageProxy::hasStorageAccess): Deleted.
2866         (WebKit::WebPageProxy::requestStorageAccess): Deleted.
2867         * UIProcess/WebPageProxy.h:
2868         * UIProcess/WebPageProxy.messages.in:
2869         * WebProcess/WebPage/WebPage.cpp:
2870         (WebKit::WebPage::hasStorageAccess):
2871         (WebKit::WebPage::requestStorageAccess):
2872         (WebKit::nextRequestStorageAccessContextId): Deleted.
2873         (WebKit::WebPage::storageAccessResponse): Deleted.
2874         * WebProcess/WebPage/WebPage.h:
2875         * WebProcess/WebPage/WebPage.messages.in:
2876
2877 2019-01-29  Chris Dumez  <cdumez@apple.com>
2878
2879         Regression (r240046): [PSON] Spurious changes to [WKWebView url] and [WKWebView loading] after [WKWebView loadRequest]
2880         https://bugs.webkit.org/show_bug.cgi?id=193967
2881         <rdar://problem/47635348>
2882
2883         Reviewed by Alex Christensen.
2884
2885         Update WebPageProxy::receivedPolicyDecision() to no longer clear the pending URL when we send PolicyAction::Ignore to
2886         the old process when the load is continuing in a new process due to PSON.
2887
2888         * UIProcess/WebPageProxy.cpp:
2889         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
2890         (WebKit::WebPageProxy::receivedPolicyDecision):
2891         * UIProcess/WebPageProxy.h:
2892
2893 2019-01-29  Keith Rollin  <krollin@apple.com>
2894
2895         Add .xcfilelists to Run Script build phases
2896         https://bugs.webkit.org/show_bug.cgi?id=193792
2897         <rdar://problem/47201785>
2898
2899         Reviewed by Alex Christensen.
2900
2901         As part of supporting XCBuild, update the necessary Run Script build
2902         phases in their Xcode projects to refer to their associated
2903         .xcfilelist files.
2904
2905         Note that the addition of these files bumps the Xcode project version
2906         number to something that's Xcode 10 compatible. This change means that
2907         older versions of the Xcode IDE can't read these projects. Nor can it
2908         fully load workspaces that refer to these projects (the updated
2909         projects are shown as non-expandable placeholders). `xcodebuild` can
2910         still build these projects; it's just that the IDE can't open them.
2911
2912         Make special accommodations for incorporating .xcfilelists from
2913         WebKitAdditions.
2914
2915         * Configurations/Base.xcconfig:
2916         * Configurations/DebugRelease.xcconfig:
2917         * WebKit.xcodeproj/project.pbxproj:
2918
2919 2019-01-29  Antti Koivisto  <antti@apple.com>
2920
2921         REGRESSION (PSON): Flash on link navigation on Mac
2922         https://bugs.webkit.org/show_bug.cgi?id=193961
2923         <rdar://problem/47482507>
2924
2925         Reviewed by Chris Dumez.
2926
2927         The target page sends EnterAcceleratedCompositingMode message too early, before we have a valid layer tree.
2928
2929         * WebProcess/WebPage/DrawingArea.h:
2930         (WebKit::DrawingArea::attach): Deleted.
2931
2932         Not needed anymore.
2933
2934         * WebProcess/WebPage/WebPage.cpp:
2935         (WebKit::WebPage::reinitializeWebPage):
2936         (WebKit::WebPage::didCompletePageTransition):
2937         (WebKit::m_shouldAttachDrawingAreaOnPageTransition): Deleted.
2938
2939         Move message sending logic fully to TiledCoreAnimationDrawingArea.
2940         Unfreezing the layer tree is sufficient to trigger the message.
2941
2942         * WebProcess/WebPage/WebPage.h:
2943         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2944         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2945         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
2946
2947         There is no need to treat process swap case differently.
2948
2949         (WebKit::TiledCoreAnimationDrawingArea::sendEnterAcceleratedCompositingModeIfNeeded):
2950
2951         Send this after the first successful layer flush with the root layer set.
2952
2953         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2954         (WebKit::TiledCoreAnimationDrawingArea::attach): Deleted.
2955
2956 2019-01-29  Timothy Hatcher  <timothy@apple.com>
2957
2958         Add back some includes that got removed at some point.
2959         https://bugs.webkit.org/show_bug.cgi?id=193942
2960
2961         Reviewed by Tim Horton.
2962
2963         * UIProcess/API/Cocoa/WKWebView.mm:
2964         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2965         * UIProcess/ios/PageClientImplIOS.h:
2966         * UIProcess/ios/PageClientImplIOS.mm:
2967
2968 2019-01-29  Chris Dumez  <cdumez@apple.com>
2969
2970         Make sure WTF::generateObjectIdentifier() internal counter does not get duplicated
2971         https://bugs.webkit.org/show_bug.cgi?id=193848
2972
2973         Reviewed by Youenn Fablet.
2974
2975         * Platform/IPC/Connection.cpp:
2976         (IPC::Connection::Connection):
2977         * UIProcess/ChildProcessProxy.h:
2978         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
2979         (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
2980         * UIProcess/WebBackForwardList.cpp:
2981         (WebKit::WebBackForwardList::restoreFromState):
2982         * UIProcess/WebProcessPool.cpp:
2983         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
2984         (WebKit::UserMediaPermissionRequestManager::addDeviceChangeObserver):
2985
2986 2019-01-29  Chris Dumez  <cdumez@apple.com>
2987
2988         REGRESSION (PSON): Twitter link gets stuck at t.co after navigating back in tab
2989         https://bugs.webkit.org/show_bug.cgi?id=193932
2990         <rdar://problem/47598947>
2991
2992         Reviewed by Brady Eidson.
2993
2994         When doing a client side redirect from origin A to origin B, we would swap process and
2995         create a SuspendedPageProxy and save it on the source BackForwardListItem. The issue is
2996         that the BackForwardList is locked for such redirect so we end up updating the current
2997         BackForwardListItem with origin B's URL while origin A's suspended page remained on
2998         the item. When going to another URL in the same origin A, we would not create a suspended
2999         page since no process-swap would occur. When pressing the back button, we would go back
3000         to the previous BackForwardListItem and use its SuspendedPageProxy, which is for the
3001         wrong URL (The pre-client redirect one).
3002
3003         To address the issue, we no longer create a SuspendedPageProxy for cross-site client side
3004         redirects. There will be no way no go back to this suspended page anyway since the
3005         back/forward list item will be updated with the redirection URL.
3006
3007         * UIProcess/WebPageProxy.cpp:
3008         (WebKit::WebPageProxy::suspendCurrentPageIfPossible):
3009
3010 2019-01-29  Chris Dumez  <cdumez@apple.com>
3011
3012         Regression(r240046) VoiceOver is no longer working after a process swap
3013         https://bugs.webkit.org/show_bug.cgi?id=193953
3014         <rdar://problem/47612398>
3015
3016         Reviewed by Alex Christensen.
3017
3018         ProvisionalPageProxy used to forward the RegisterWebProcessAccessibilityToken IPC from
3019         the provisional WebProcess to the WebPageProxy right away. This in turn would notify
3020         the PageClient whose logic would rely on WebPageProxy::process(), which returns the
3021         committed process instead of the provisional one.
3022
3023         To address the issue, the ProvisionalPageProxy now stores the token sent by the
3024         provisional WebProcess and we only call registerWebProcessAccessibilityToken()
3025         on the WebPageProxy *after* we've swapped to the provisional process.
3026
3027         * UIProcess/ProvisionalPageProxy.cpp:
3028         (WebKit::ProvisionalPageProxy::registerWebProcessAccessibilityToken):
3029         (WebKit::ProvisionalPageProxy::didReceiveMessage):
3030         * UIProcess/ProvisionalPageProxy.h:
3031         (WebKit::ProvisionalPageProxy::takeAccessibilityToken):
3032         * UIProcess/WebPageProxy.cpp:
3033         (WebKit::WebPageProxy::commitProvisionalPage):
3034
3035 2019-01-28  Ryosuke Niwa  <rniwa@webkit.org>
3036
3037         User agent string override for navigator.userAgent should be site specific quirks
3038         https://bugs.webkit.org/show_bug.cgi?id=193950
3039
3040         Reviewed by Brent Fulgham.
3041
3042         Renamed the various member variables, functions, properties and selectors.
3043
3044         * Shared/WebsitePoliciesData.cpp:
3045         (WebKit::WebsitePoliciesData::encode const):
3046         (WebKit::WebsitePoliciesData::decode):
3047         (WebKit::WebsitePoliciesData::applyToDocumentLoader):
3048         * Shared/WebsitePoliciesData.h:
3049         * UIProcess/API/APIWebsitePolicies.cpp:
3050         (API::WebsitePolicies::data):
3051         * UIProcess/API/APIWebsitePolicies.h:
3052         * UIProcess/API/Cocoa/_WKWebsitePolicies.h:
3053         * UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
3054         (-[_WKWebsitePolicies setCustomJavaScriptUserAgentAsSiteSpecificQuirks:]): Renamed from setCustomJavaScriptUserAgent.
3055         (-[_WKWebsitePolicies customJavaScriptUserAgentAsSiteSpecificQuirks]): Renamed from customJavaScriptUserAgent.
3056
3057 2019-01-28  Commit Queue  <commit-queue@webkit.org>
3058
3059         Unreviewed, rolling out r240630.
3060         https://bugs.webkit.org/show_bug.cgi?id=193958
3061
3062         Broke Apple internal builds (Requested by rniwa on #webkit).
3063
3064         Reverted changeset:
3065
3066         "Add back some includes that got removed at some point."
3067         https://bugs.webkit.org/show_bug.cgi?id=193942
3068         https://trac.webkit.org/changeset/240630
3069
3070 2019-01-28  Devin Rousso  <drousso@apple.com>
3071
3072         Web Inspector: provide a way to edit page WebRTC settings on a remote target
3073         https://bugs.webkit.org/show_bug.cgi?id=193863
3074         <rdar://problem/47572764>
3075
3076         Reviewed by Joseph Pecoraro.
3077
3078         * Shared/WebPreferences.yaml:
3079         Add page-level settings for WebRTC preferences.
3080
3081 2019-01-28  Ross Kirsling  <ross.kirsling@sony.com>
3082
3083         Remove unnecessary `using namespace WTF`s (or at least restrict their scope).
3084         https://bugs.webkit.org/show_bug.cgi?id=193941
3085
3086         Reviewed by Alex Christensen.
3087
3088         * Shared/linux/WebMemorySamplerLinux.cpp:
3089
3090 2019-01-28  Fujii Hironori  <Hironori.Fujii@sony.com>
3091
3092         [Win] WebCore/platform/Process.h is conflicting with process.h
3093         https://bugs.webkit.org/show_bug.cgi?id=193944
3094
3095         Reviewed by Ross Kirsling.
3096
3097         * Shared/ChildProcess.h:
3098         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
3099         * Shared/unix/ChildProcessMain.cpp:
3100         * UIProcess/API/APINavigation.h:
3101         * UIProcess/ChildProcessProxy.h:
3102         * UIProcess/Launcher/ProcessLauncher.h:
3103         * UIProcess/WebProcessPool.cpp:
3104         * UIProcess/WebProcessProxy.h:
3105
3106 2019-01-28  Jon Lee  <jonlee@apple.com>
3107
3108         Update Screen Capture preference
3109         https://bugs.webkit.org/show_bug.cgi?id=193947
3110         rdar://problem/47620199
3111
3112         Reviewed by Youenn Fablet.
3113
3114         * Shared/WebPreferences.yaml:
3115
3116 2019-01-28  Andy Estes  <aestes@apple.com>
3117
3118         [watchOS] Enable Parental Controls content filtering
3119         https://bugs.webkit.org/show_bug.cgi?id=193939
3120         <rdar://problem/46641912>
3121
3122         Reviewed by Ryosuke Niwa.
3123
3124         * Configurations/FeatureDefines.xcconfig:
3125
3126 2019-01-28  David Kilzer  <ddkilzer@apple.com>
3127
3128         REGRESSION (r236481): Move soft-linking of LocalAuthentication.framework out of LocalAuthenticationSoftLink.h
3129         <https://webkit.org/b/193884>
3130
3131         Reviewed by Jiewen Tan.
3132
3133         * SourcesCocoa.txt:
3134         * UnifiedSources-input.xcfilelist:
3135         * WebKit.xcodeproj/project.pbxproj:
3136         - Add LocalAuthenticationSoftLink.mm to the project.
3137
3138         * UIProcess/WebAuthentication/Cocoa/LocalAuthenticationSoftLink.h:
3139         * UIProcess/WebAuthentication/Cocoa/LocalAuthenticationSoftLink.mm: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticationSoftLink.h.
3140         - Move soft-linking implementation to
3141           LocalAuthenticationSoftLink.mm.
3142
3143 2019-01-28  Timothy Hatcher  <timothy@apple.com>
3144
3145         Add back some includes that got removed at some point.
3146         https://bugs.webkit.org/show_bug.cgi?id=193942
3147
3148         Reviewed by Tim Horton.
3149
3150         * UIProcess/API/Cocoa/WKWebView.mm:
3151         * UIProcess/API/Cocoa/WKWebViewInternal.h:
3152         * UIProcess/ios/PageClientImplIOS.h:
3153         * UIProcess/ios/PageClientImplIOS.mm:
3154
3155 2019-01-28  Timothy Hatcher  <timothy@apple.com>
3156
3157         Make it easier for non-Apple ports to enable dark mode CSS support.
3158         https://bugs.webkit.org/show_bug.cgi?id=193882
3159
3160         Reviewed by Megan Gardner.
3161
3162         Make modern WebKit code for dark mode usable by other ports, to match
3163         the WebCore parts that have been cross-platform all along.
3164
3165         * Shared/WebPageCreationParameters.cpp:
3166         (WebKit::WebPageCreationParameters::encode const):
3167         (WebKit::WebPageCreationParameters::decode):
3168         * Shared/WebPageCreationParameters.h:
3169         * UIProcess/PageClient.h:
3170         (WebKit::PageClient::effectiveAppearanceIsDark const):
3171         * UIProcess/WebPageProxy.cpp:
3172         (WebKit::WebPageProxy::creationParameters):
3173         (WebKit::WebPageProxy::useDarkAppearance const):
3174         (WebKit::WebPageProxy::effectiveAppearanceDidChange):
3175         * UIProcess/WebPageProxy.h:
3176         * WebProcess/WebPage/WebPage.cpp:
3177         (WebKit::m_shouldAttachDrawingAreaOnPageTransition):
3178         (WebKit::WebPage::setUseDarkAppearance):
3179         * WebProcess/WebPage/WebPage.h:
3180         * WebProcess/WebPage/WebPage.messages.in:
3181
3182 2019-01-28  Andy Estes  <aestes@apple.com>
3183
3184         [Cocoa] Add SPI to _WKUserContentExtensionStore to retrieve its underlying WKContentRuleListStore
3185         https://bugs.webkit.org/show_bug.cgi?id=193927
3186
3187         Reviewed by Tim Horton.
3188
3189         This is useful for clients migrating from _WKUserContentExtensionStore to the modern
3190         WKContentRuleList* APIs.
3191
3192         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
3193         (-[_WKUserContentExtensionStore _contentRuleListStore]):
3194         * UIProcess/API/Cocoa/_WKUserContentExtensionStorePrivate.h:
3195
3196 2019-01-28  David Kilzer  <ddkilzer@apple.com>
3197
3198         Move soft-linking of ManagedConfiguration.framework out of ManagedConfigurationSPI.h
3199         <https://webkit.org/b/193868>
3200
3201         Reviewed by Daniel Bates.
3202
3203         * Platform/spi/ios/ManagedConfigurationSPI.h:
3204         - Remove soft-linking code from header.
3205         - Add PLATFORM(IOS_FAMILY) && !PLATFORM(IOSMAC) guard.
3206
3207         * UIProcess/ios/WKContentViewInteraction.mm:
3208         (-[WKContentView canPerformActionForWebView:withSender:]):
3209         (-[WKContentView _defineForWebView:]):
3210         - Add soft-linking code formerly in ManagedConfigurationSPI.h.
3211         - Change MCFeatureDefinitionLookupAllowed to use soft-link
3212           function getMCFeatureDefinitionLookupAllowed() to remove the
3213           #define.
3214
3215 2019-01-28  Per Arne Vollan  <pvollan@apple.com>
3216
3217         REGRESSION (r240348): Loading netflix home page panics device
3218         https://bugs.webkit.org/show_bug.cgi?id=193936
3219
3220         Reviewed by Alexey Proskuryakov.
3221
3222         Temporarily enable permissive call filtering.
3223
3224         * WebProcess/com.apple.WebProcess.sb.in:
3225
3226 2019-01-28  Joseph Pecoraro  <pecoraro@apple.com>
3227
3228         [iOS] Attempting to open a Keynote document to iCloud.com from iCloud Files causes crash
3229         https://bugs.webkit.org/show_bug.cgi?id=193456
3230         <rdar://problem/47275642>
3231
3232         Reviewed by Brent Fulgham.
3233
3234         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
3235         Allow access to iconservices.
3236
3237 2019-01-28  Daniel Bates  <dabates@apple.com>
3238
3239         [iOS] Make Window virtual key code computation match Mac
3240         https://bugs.webkit.org/show_bug.cgi?id=193452
3241
3242         Reviewed by Ryosuke Niwa.
3243
3244         Compute the Windows virtual key code from the WebEvent.
3245
3246         * Shared/ios/WebIOSEventFactory.mm:
3247         (WebIOSEventFactory::createWebKeyboardEvent):
3248
3249 2019-01-28  Brent Fulgham  <bfulgham@apple.com>
3250
3251         REGRESSION (r240498): Storage Access API prompts result is not remembered
3252         https://bugs.webkit.org/show_bug.cgi?id=193922
3253         <rdar://problem/47608767>
3254
3255         Reviewed by Chris Dumez.
3256
3257         The refactoring in r240498 bypassed bookkeeping in ResourceLoadStatisticsMemoryStore
3258         that kept track of whether a successful user prompt had been encountered. This
3259         patch corrects this codepath so the user is not prompted repeatedly after approving
3260         use of the Storage Access API.
3261
3262         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
3263         (WebKit::WebResourceLoadStatisticsStore::grantStorageAccess): Switch from Move operator to
3264         const reference to allow the method to be called by the NetworkProcess.
3265         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
3266         * NetworkProcess/NetworkProcess.cpp:
3267         (WebKit::NetworkProcess::grantStorageAccess): Request access through the WebResourceLoadStatistics
3268         object, rather than jumping directly to the NetworkStorageSession.
3269
3270 2019-01-28  Chris Dumez  <cdumez@apple.com>
3271
3272         Regression(PSON) Crash under WebPageProxy::didStartProgress()
3273         https://bugs.webkit.org/show_bug.cgi?id=193915
3274         <rdar://problem/47560907>
3275
3276         Reviewed by Alex Christensen.
3277
3278         * UIProcess/WebPageProxy.cpp:
3279         (WebKit::WebPageProxy::close):
3280         Make sure we destroy the ProvisionalPageProxy if the page gets closed as we do not want to keep receiving
3281         IPC after this or even worse, commit the provisional page.
3282
3283         (WebKit::WebPageProxy::didStartProgress):
3284         Add an assertion in didStartProgress() to make sure we do not receive this IPC after the page has been
3285         closed.
3286
3287 2019-01-28  Antoine Quint  <graouts@apple.com>
3288
3289         Limit user-agent interactions based on the touch-action property on iOS
3290         https://bugs.webkit.org/show_bug.cgi?id=193447
3291
3292         Unreviewed build fix.
3293
3294         * UIProcess/API/Cocoa/WKWebView.mm:
3295
3296 2019-01-28  Antoine Quint  <graouts@apple.com>
3297
3298         Limit user-agent interactions based on the touch-action property on iOS
3299         https://bugs.webkit.org/show_bug.cgi?id=193447
3300
3301         Unreviewed build fix.
3302
3303         * UIProcess/ios/WKContentViewInteraction.mm:
3304
3305 2019-01-28  Brent Fulgham  <bfulgham@apple.com>
3306
3307         Remove the UIProcess components of the ResourceLoadStatistics code
3308         https://bugs.webkit.org/show_bug.cgi?id=193303
3309         <rdar://problem/47160073>
3310
3311         Reviewed by Chris Dumez.
3312
3313         Now that the ResourceLoadStatistics code is running in the NetworkProcess, we can get rid
3314         of the UIProcess copies of these routines.
3315
3316         Tested by existing ResourceLoadStatistics and StorageAccess tests.
3317
3318         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
3319         (WebKit::ResourceLoadStatisticsMemoryStore::updateClientSideCookiesAgeCap):
3320         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
3321         (WebKit::WebResourceLoadStatisticsStore::callHasStorageAccessForFrameHandler):
3322         (WebKit::WebResourceLoadStatisticsStore::callGrantStorageAccessHandler):
3323         (WebKit::WebResourceLoadStatisticsStore::removeAllStorageAccess):
3324         (WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCap):
3325         (WebKit::WebResourceLoadStatisticsStore::callUpdatePrevalentDomainsToBlockCookiesForHandler):
3326         (WebKit::WebResourceLoadStatisticsStore::callRemoveDomainsHandler):
3327         (WebKit::WebResourceLoadStatisticsStore::logTestingEvent):
3328         (WebKit::WebResourceLoadStatisticsStore::notifyResourceLoadStatisticsProcessed):
3329         (WebKit::WebResourceLoadStatisticsStore::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores):
3330         (WebKit::WebResourceLoadStatisticsStore::topPrivatelyControlledDomainsWithWebsiteData):
3331         (WebKit::WebResourceLoadStatisticsStore::sendDiagnosticMessageWithValue const):
3332         (WebKit::WebResourceLoadStatisticsStore::notifyPageStatisticsTelemetryFinished const):
3333         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
3334         * UIProcess/WebProcessProxy.cpp:
3335         (WebKit::WebProcessProxy::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores): Deleted.
3336         (WebKit::WebProcessProxy::topPrivatelyControlledDomainsWithWebsiteData): Deleted.
3337         * UIProcess/WebProcessProxy.h:
3338         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3339         (WebKit::WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains):
3340         (WebKit::WebsiteDataStore::removeData):
3341         (WebKit::WebsiteDataStore::setMaxStatisticsEntries):
3342         (WebKit::WebsiteDataStore::setPruneEntriesDownTo):
3343         (WebKit::WebsiteDataStore::setGrandfatheringTime):
3344         (WebKit::WebsiteDataStore::setMinimumTimeBetweenDataRecordsRemoval):
3345         (WebKit::WebsiteDataStore::dumpResourceLoadStatistics):
3346         (WebKit::WebsiteDataStore::isPrevalentResource):
3347         (WebKit::WebsiteDataStore::setPrevalentResource):
3348         (WebKit::WebsiteDataStore::setPrevalentResourceForDebugMode):
3349         (WebKit::WebsiteDataStore::isVeryPrevalentResource):
3350         (WebKit::WebsiteDataStore::setVeryPrevalentResource):
3351         (WebKit::WebsiteDataStore::setShouldClassifyResourcesBeforeDataRecordsRemoval):
3352         (WebKit::WebsiteDataStore::setSubframeUnderTopFrameOrigin):
3353         (WebKit::WebsiteDataStore::isRegisteredAsSubFrameUnder):
3354         (WebKit::WebsiteDataStore::setSubresourceUnderTopFrameOrigin):
3355         (WebKit::WebsiteDataStore::isRegisteredAsSubresourceUnder):
3356         (WebKit::WebsiteDataStore::setSubresourceUniqueRedirectTo):
3357         (WebKit::WebsiteDataStore::setSubresourceUniqueRedirectFrom):
3358         (WebKit::WebsiteDataStore::setTopFrameUniqueRedirectTo):
3359         (WebKit::WebsiteDataStore::setTopFrameUniqueRedirectFrom):
3360         (WebKit::WebsiteDataStore::isRegisteredAsRedirectingTo):
3361         (WebKit::WebsiteDataStore::clearPrevalentResource):
3362         (WebKit::WebsiteDataStore::resetParametersToDefaultValues):
3363         (WebKit::WebsiteDataStore::submitTelemetry):
3364         (WebKit::WebsiteDataStore::scheduleClearInMemoryAndPersistent):
3365         (WebKit::WebsiteDataStore::scheduleCookieBlockingUpdate):
3366         (WebKit::WebsiteDataStore::scheduleStatisticsAndDataRecordsProcessing):
3367         (WebKit::WebsiteDataStore::setLastSeen):
3368         (WebKit::WebsiteDataStore::setNotifyPagesWhenDataRecordsWereScanned):
3369         (WebKit::WebsiteDataStore::setNotifyPagesWhenTelemetryWasCaptured):
3370         (WebKit::WebsiteDataStore::hasStorageAccess):
3371         (WebKit::WebsiteDataStore::requestStorageAccess):
3372         (WebKit::WebsiteDataStore::grantStorageAccess):
3373         (WebKit::WebsiteDataStore::setTimeToLiveUserInteraction):
3374         (WebKit::WebsiteDataStore::logUserInteraction):
3375         (WebKit::WebsiteDataStore::hasHadUserInteraction):
3376         (WebKit::WebsiteDataStore::clearUserInteraction):
3377         (WebKit::WebsiteDataStore::setGrandfathered):
3378         (WebKit::WebsiteDataStore::webProcessWillOpenConnection):
3379         (WebKit::WebsiteDataStore::webProcessDidCloseConnection):
3380         (WebKit::WebsiteDataStore::setResourceLoadStatisticsDebugMode):
3381         (WebKit::WebsiteDataStore::didCreateNetworkProcess):
3382         (WebKit::WebsiteDataStore::topPrivatelyControlledDomainsWithWebsiteData): Deleted.
3383         (WebKit::WebsiteDataStore::removeDataForTopPrivatelyControlledDomains): Deleted.
3384         (WebKit::WebsiteDataStore::setCacheMaxAgeCap): Deleted.
3385         (WebKit::WebsiteDataStore::updatePrevalentDomainsToBlockCookiesFor): Deleted.
3386         (WebKit::WebsiteDataStore::setAgeCapForClientSideCookies): Deleted.
3387         (WebKit::WebsiteDataStore::hasStorageAccessForFrameHandler): Deleted.
3388         (WebKit::WebsiteDataStore::grantStorageAccessHandler): Deleted.
3389         (WebKit::WebsiteDataStore::removeAllStorageAccessHandler): Deleted.
3390         (WebKit::WebsiteDataStore::removePrevalentDomains): Deleted.
3391         (WebKit::WebsiteDataStore::isGrandfathered): Deleted.
3392         * UIProcess/WebsiteData/WebsiteDataStore.h:
3393
3394 2019-01-28  Antoine Quint  <graouts@apple.com>
3395
3396         Limit user-agent interactions based on the touch-action property on iOS
3397         https://bugs.webkit.org/show_bug.cgi?id=193447
3398         <rdar://problem/47283874>
3399
3400         Reviewed by Antti Koivisto and Simon Fraser.
3401
3402         Handle the "none", "pan-x", "pan-y" and "pinch-zoom" values for the touch-action property by querying the scrolling tree whenever a touch begins
3403         to identify whether its point is contained within the region of an element with a non-auto touch-action property. If it is, we use the list of
3404         permitted touch actions such to then customize the behavior of the nearest scroll view to pan or zoom only as instructed.
3405
3406         * Shared/WebCoreArgumentCoders.cpp:
3407         (IPC::ArgumentCoder<TouchActionData>::encode):
3408         (IPC::ArgumentCoder<TouchActionData>::decode):
3409         (IPC::ArgumentCoder<EventTrackingRegions>::encode):
3410         (IPC::ArgumentCoder<EventTrackingRegions>::decode):
3411         (IPC::ArgumentCoder<Region>::decode):
3412         * Shared/WebCoreArgumentCoders.h:
3413         * UIProcess/API/Cocoa/WKWebView.mm:
3414         (-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]): Account for panning constraints set on the content view to prevent deceleration
3415         to pan the view if it ought not.
3416         (-[WKWebView _scrollView:adjustedOffsetForOffset:translation:startPoint:locationInView:horizontalVelocity:verticalVelocity:]): Implement an additional
3417         UIScrollView delegation method to apply the panning constraints set on the content view while panning.
3418         * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
3419         (WebKit::RemoteScrollingCoordinatorProxy::touchActionDataAtPoint const):
3420         (WebKit::RemoteScrollingCoordinatorProxy::touchActionDataForScrollNodeID const):
3421         (WebKit::RemoteScrollingCoordinatorProxy::setTouchDataForTouchIdentifier):
3422         (WebKit::RemoteScrollingCoordinatorProxy::clearTouchDataForTouchIdentifier):
3423         * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
3424         * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h:
3425         * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
3426         (-[WKScrollingNodeScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]): Apply the same logic as in WKWebView.
3427         (-[WKScrollingNodeScrollViewDelegate _scrollView:adjustedOffsetForOffset:translation:startPoint:locationInView:horizontalVelocity:verticalVelocity:]): Apply
3428         the same logic as in WKWebView.
3429         (WebKit::ScrollingTreeScrollingNodeDelegateIOS::touchActionData const):
3430         * UIProcess/WebPageProxy.h:
3431         (WebKit::WebPageProxy::isScrollingOrZooming const):
3432         * UIProcess/ios/WKContentViewInteraction.h:
3433         * UIProcess/ios/WKContentViewInteraction.mm:
3434         (-[WKContentView preventsPanningInXAxis]):
3435         (-[WKContentView preventsPanningInYAxis]):
3436         (-[WKContentView cleanupInteraction]):
3437         (-[WKContentView _webTouchEventsRecognized:]):
3438         (-[WKContentView _handleTouchActionsForTouchEvent:]): As we process touches, check whether there are touch actions set for this touch's points' locations. Based
3439         on those touch actions, either setDefaultPrevented on the _touchEventGestureRecognizer if the touch action is "none" or selectively disable panning and zooming.
3440         (-[WKContentView _resetPanningPreventionFlags]):
3441         (-[WKContentView _didEndScrollingOrZooming]):
3442
3443 2019-01-28  Antti Koivisto  <antti@apple.com>
3444
3445         WebUserContentController::removeUserScriptMessageHandlerInternal may deref and delete itself
3446         https://bugs.webkit.org/show_bug.cgi?id=193901
3447         <rdar://problem/47338669>
3448
3449         Reviewed by David Kilzer.
3450
3451         Don't know how to repro.
3452
3453         * WebProcess/UserContent/WebUserContentController.cpp:
3454         (WebKit::WebUserContentController::removeUserScriptMessageHandlerInternal):
3455
3456         Calling userMessageHandlers.removeFirstMatching() may remove the last ref to this
3457         (because WebUserMessageHandlerDescriptorProxy refs WebUserContentController).
3458         Fix by protecting this over the function.
3459
3460 2018-12-15  Darin Adler  <darin@apple.com>
3461
3462         Replace many uses of String::format with more type-safe alternatives
3463         https://bugs.webkit.org/show_bug.cgi?id=192742
3464
3465         Reviewed by Mark Lam.
3466
3467         * Shared/WebMemorySampler.cpp:
3468         (WebKit::WebMemorySampler::writeHeaders): Use makeString.
3469
3470         * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
3471         (WebKit::LocalAuthenticator::makeCredential): Use string concatentation.
3472
3473         * UIProcess/WebInspectorUtilities.cpp:
3474         (WebKit::inspectorPageGroupIdentifierForPage): Use makeString.
3475         * UIProcess/WebProcessPool.cpp:
3476         (WebKit::WebProcessPool::processDidFinishLaunching): Ditto.
3477         (WebKit::WebProcessPool::startMemorySampler): Ditto.
3478
3479 2019-01-27  Jiewen Tan  <jiewen_tan@apple.com>
3480
3481         Use a load optimizer for some sites
3482         https://bugs.webkit.org/show_bug.cgi?id=193881
3483         <rdar://problem/46325455>
3484
3485         Reviewed by Brent Fulgham.
3486
3487         We will try to speed up some sites with a dedicated load optimizer. The load optimizer lives
3488         within the WebsiteDataStore as one client instance should have only one and it should live
3489         as long as the client lives. How does the load optimizer work? It intercepts every load in
3490         the navigation state. If a request meets some requirements, it will then fetch the request
3491         from its own cache. Once the fetch succeeds, the original load will be ignored and the
3492         optimizer will display the cached content.
3493
3494         Covered by API tests.
3495
3496         * SourcesCocoa.txt:
3497         * UIProcess/Cocoa/LoadOptimizer.h: Added.
3498         * UIProcess/Cocoa/LoadOptimizer.mm: Added.
3499         * UIProcess/Cocoa/MediaCaptureUtilities.h:
3500         * UIProcess/Cocoa/NavigationState.mm:
3501         (WebKit::tryInterceptNavigation):
3502         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
3503         (WebKit::tryAppLink): Deleted.
3504         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3505         (WebKit::WebsiteDataStore::WebsiteDataStore):
3506         * UIProcess/WebsiteData/WebsiteDataStore.h:
3507         (WebKit::WebsiteDataStore::loadOptimizer):
3508         * WebKit.xcodeproj/project.pbxproj:
3509
3510 2019-01-25  Brian Burg  <bburg@apple.com>
3511
3512         Web Automation: add support for simulating single touches to Automation.performInteractionSequence
3513         https://bugs.webkit.org/show_bug.cgi?id=193852
3514         <rdar://problem/28360781>
3515
3516         Reviewed by Joseph Pecoraro and Simon Fraser.
3517
3518         This patch makes it possible to simulate touches via the Actions API. The approach is to
3519         use a stripped down version of HIDEventGenerator to send HID events to the UIWindow.
3520         The initial version supports a single touch point; this may be expanded if needed, but
3521         so far it hasn't been an impediment when running desktop-oriented WebDriver test suites.
3522
3523         As part of implementing this support, I went through and added [somewhat obnoxious] ENABLE()
3524         guards so that we don't mistakenly compile mouse support on iOS and touch on Mac,
3525         and vice versa. Each of the interaction methods---touch, mouse, keyboard---can be independently
3526         compiled out. If none is supported (i.e., Windows), then we don't even try to compile
3527         platformSimulate*Interaction methods or SimulatedInputDispatcher. This allows WebAutomationSession
3528         to not include members and code that are never going to be used on a particular platform.
3529
3530         This functionality is covered by existing WebDriver test suites that use Element Click command.
3531         Additional tests that explicitly include 'touch' pointerType will be submitted to WPT later.
3532
3533         * UIProcess/Automation/Automation.json: Update comment.
3534
3535         * UIProcess/Automation/SimulatedInputDispatcher.h:
3536         * UIProcess/Automation/SimulatedInputDispatcher.cpp:
3537         (WebKit::SimulatedInputDispatcher::transitionInputSourceToState):
3538         - Add appropriate guards for code specific to each interaction type.
3539         - Handle SimulatedInputSourceType::Touch and call out to dispatch events.
3540
3541         * UIProcess/Automation/WebAutomationSession.h:
3542         * UIProcess/Automation/WebAutomationSession.cpp:
3543         (WebKit::WebAutomationSession::WebAutomationSession):
3544         (WebKit::WebAutomationSession::terminate):
3545         (WebKit::WebAutomationSession::willShowJavaScriptDialog):
3546         (WebKit::WebAutomationSession::mouseEventsFlushedForPage):
3547         (WebKit::WebAutomationSession::keyboardEventsFlushedForPage):
3548         (WebKit::WebAutomationSession::willClosePage):
3549         Add appropriate guards for code specific to each interaction type.
3550
3551         (WebKit::WebAutomationSession::isSimulatingUserInteraction const):
3552         Add new hook so that we can detect when a touch simulation is in progress.
3553         We don't rely on checking WebKit's event queue, so use a flag.
3554
3555         (WebKit::WebAutomationSession::simulateTouchInteraction):
3556         (WebKit::WebAutomationSession::performMouseInteraction):
3557         (WebKit::WebAutomationSession::performKeyboardInteractions):
3558         (WebKit::WebAutomationSession::cancelInteractionSequence):
3559         (WebKit::WebAutomationSession::performInteractionSequence):
3560         - Add appropriate guards for code specific to each interaction type.
3561         - Bail out immediately if a requested interaction type is not supported.
3562         - Shim Touch input type to Mouse if mouse is not supported but touches are.
3563         Nearly all WebDriver tests in the wild will be requesting a 'mouse' pointerType,
3564         so this is necessary for compatibility. It's easier to shim at this level than try
3565         to implement platformSimulateMouseInteraction for iOS because
3566         platformSimulateMouseinteraction does not use a completion handler but the iOS
3567         implementation would require that.
3568
3569         (WebKit::WebAutomationSession::platformSimulateMouseInteraction): Deleted.
3570         (WebKit::WebAutomationSession::platformSimulateKeyboardInteraction): Deleted.
3571         - Remove these stubs. Platform methods of this class are no longer being filled
3572         with stubs on unsupported platforms because we expect the command to fail earlier.
3573
3574         * UIProcess/Automation/ios/WebAutomationSessionIOS.mm:
3575         (WebKit::WebAutomationSession::platformSimulateTouchInteraction):
3576         - Add appropriate guards for code specific to each interaction type.
3577         - Implement new platform method to simulate touches. This uses _WKTouchEventGenerator.
3578
3579         * UIProcess/Automation/mac/WebAutomationSessionMac.mm:
3580         Add appropriate guards for code specific to each interaction type.
3581
3582         * UIProcess/_WKTouchEventGenerator.h: Added.
3583         * UIProcess/_WKTouchEventGenerator.mm: Added.
3584         (simpleCurveInterpolation):
3585         (calculateNextCurveLocation):
3586         (delayBetweenMove):
3587         (+[_WKTouchEventGenerator sharedTouchEventGenerator]):
3588         (+[_WKTouchEventGenerator nextEventCallbackID]):
3589         (-[_WKTouchEventGenerator init]):
3590         (-[_WKTouchEventGenerator dealloc]):
3591         (-[_WKTouchEventGenerator _createIOHIDEventType:]):
3592         (-[_WKTouchEventGenerator _sendHIDEvent:]):
3593         (-[_WKTouchEventGenerator _sendMarkerHIDEventWithCompletionBlock:]):
3594         (-[_WKTouchEventGenerator _updateTouchPoints:count:]):
3595         (-[_WKTouchEventGenerator touchDownAtPoints:touchCount:]):
3596         (-[_WKTouchEventGenerator touchDown:touchCount:]):
3597         (-[_WKTouchEventGenerator touchDown:]):
3598         (-[_WKTouchEventGenerator liftUpAtPoints:touchCount:]):
3599         (-[_WKTouchEventGenerator liftUp:touchCount:]):
3600         (-[_WKTouchEventGenerator liftUp:]):
3601         (-[_WKTouchEventGenerator moveToPoints:touchCount:duration:]):
3602         (-[_WKTouchEventGenerator touchDown:completionBlock:]):
3603         (-[_WKTouchEventGenerator liftUp:completionBlock:]):
3604         (-[_WKTouchEventGenerator moveToPoint:duration:completionBlock:]):
3605         (-[_WKTouchEventGenerator receivedHIDEvent:]):
3606         Copied and simplified from HIDEventGenerator in WebKitTestRunner.
3607
3608         * WebKit.xcodeproj/project.pbxproj:
3609         Add _WKTouchEventGenerator.{h,mm} and make it a private header. The client needs to
3610         route received HID events to -receivedHIDEvent: in order to detect when the marker
3611         HID event has been processed (and thus the interaction is completed).
3612
3613         * config.h: Add ENABLE(WEBDRIVER_*_INTERACTIONS) macros here.
3614
3615 2019-01-26  Simon Fraser  <simon.fraser@apple.com>
3616
3617         Have composited RenderIFrame layers make FrameHosting scrolling tree nodes to parent the iframe's scrolling node
3618         https://bugs.webkit.org/show_bug.cgi?id=193879
3619
3620         Reviewed by Antti Koivisto.
3621
3622         Need a specialization of dump() for ScrollingStateFrameHostingNode to avoid infinite recursion.
3623
3624         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
3625         (WebKit::dump):
3626
3627 2019-01-27  Chris Fleizach  <cfleizach@apple.com>
3628
3629         AX: Introduce a static accessibility tree
3630         https://bugs.webkit.org/show_bug.cgi?id=193348
3631         <rdar://problem/47203295>
3632
3633         Reviewed by Ryosuke Niwa.
3634
3635         * Configurations/FeatureDefines.xcconfig:
3636         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
3637         (-[WKAccessibilityWebPageObjectBase accessibilityRootObjectWrapper]):
3638
3639 2019-01-26  Simon Fraser  <simon.fraser@apple.com>
3640
3641         Allow scrolling tree nodes to exist in a detached state
3642         https://bugs.webkit.org/show_bug.cgi?id=193754
3643
3644         Reviewed by Zalan Bujtas.
3645
3646         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
3647         (WebKit::RemoteScrollingCoordinatorTransaction::decode):
3648
3649 2019-01-25  Tim Horton  <timothy_horton@apple.com>
3650
3651         REGRESSION (r238818): Snapshot is removed too late after swiping back on Twitter
3652         https://bugs.webkit.org/show_bug.cgi?id=193860
3653         <rdar://problem/47535022>
3654
3655         Reviewed by Antti Koivisto.
3656
3657         * UIProcess/Cocoa/ViewGestureController.cpp:
3658         (WebKit::ViewGestureController::didStartProvisionalOrSameDocumentLoadForMainFrame):
3659         (WebKit::ViewGestureController::didStartProvisionalLoadForMainFrame):
3660         (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
3661         * UIProcess/Cocoa/ViewGestureController.h:
3662         Treat provisional load and same document load the same: they already both
3663         unpause the snapshot removal tracker, request render tree size notifications,
3664         but same-document navigation was missing the call to dispatchAfterEnsuringDrawing
3665         and thus would get stuck waiting for RepaintAfterNavigation.
3666
3667 2019-01-25  Ryosuke Niwa  <rniwa@webkit.org>
3668
3669         Need a mechanism to override navigator.userAgent
3670         https://bugs.webkit.org/show_bug.cgi?id=193762
3671         <rdar://problem/47504939>
3672
3673         Reviewed by Brent Fulgham.
3674
3675         This patch adds a new _WKWebsitePolicies SPI to specify the user agent string returned by
3676         navigator.userAgent without affecting the user agent string used to send network requests.
3677
3678         Tests: WebKit.WebsitePoliciesCustomJavaScriptUserAgent
3679                WebKit.WebsitePoliciesCustomUserAgents
3680
3681         * Shared/WebsitePoliciesData.cpp:
3682         (WebKit::WebsitePoliciesData::encode const):
3683         (WebKit::WebsitePoliciesData::decode):
3684         (WebKit::WebsitePoliciesData::applyToDocumentLoader):
3685         * Shared/WebsitePoliciesData.h:
3686         * UIProcess/API/APIWebsitePolicies.cpp:
3687         (API::WebsitePolicies::data):
3688         * UIProcess/API/APIWebsitePolicies.h:
3689         * UIProcess/API/Cocoa/_WKWebsitePolicies.h:
3690         * UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
3691         (-[_WKWebsitePolicies setCustomJavaScriptUserAgent:]):
3692         (-[_WKWebsitePolicies customJavaScriptUserAgent]):
3693
3694 2019-01-25  Devin Rousso  <drousso@apple.com>
3695
3696         Web Inspector: provide a way to edit page settings on a remote target
3697         https://bugs.webkit.org/show_bug.cgi?id=193813
3698         <rdar://problem/47359510>
3699
3700         Reviewed by Joseph Pecoraro.
3701
3702         * WebProcess/WebPage/WebInspectorUI.h:
3703         (WebKit::WebInspectorUI::isRemote() const): Added.
3704         * WebProcess/WebPage/RemoteWebInspectorUI.h:
3705         (WebKit::RemoteWebInspectorUI::isRemote() const): Added.
3706
3707 2019-01-25  Dean Jackson  <dino@apple.com>
3708
3709         REGRESSION: Some USDz from 3rd party websites don't go directly to AR QL
3710         https://bugs.webkit.org/show_bug.cgi?id=193831
3711         <rdar://problem/47399263>
3712
3713         Reviewed by Chris Dumez.
3714
3715         A System Preview (<a rel="ar">) displays in a modal and doesn't trigger
3716         a navigation. If the link was cross origin, it was causing a process swap,
3717         which meant that the response defaulted back to a navigation.
3718
3719         The fix is to not cause a PSON when the navigation is a system preview.
3720
3721         * UIProcess/API/APINavigation.h:
3722         (API::Navigation::shouldForceDownload const): This is now just tracking
3723         the "download" attribute, and not including System Preview.
3724         (API::Navigation::isSystemPreview const): New method to check for a
3725         navigation triggered as a System Preview.
3726         * UIProcess/WebPageProxy.cpp: Move the code from receivedPolicyDecision to
3727         receivedNavigationPolicyDecision, so that downloads and System Previews are
3728         detected before we decide to change process.
3729         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
3730         (WebKit::WebPageProxy::receivedPolicyDecision):
3731
3732 2019-01-25  Tim Horton  <timothy_horton@apple.com>
3733
3734         Find-in-page on nyt.com scrolls around without touching the screen when find holes are visible
3735         https://bugs.webkit.org/show_bug.cgi?id=193853
3736
3737         Reviewed by Simon Fraser.
3738
3739         * WebProcess/WebPage/ios/FindControllerIOS.mm:
3740         (WebKit::FindController::updateFindIndicator):
3741         There is no reason to scroll/zoom to the find indicator just because the
3742         holes are up, we should only do it on initial indicator presentation.
3743         This was a mistake in r178755 that was previously never exercised because
3744         isShowingOverlay was always false.
3745
3746 2019-01-25  Keith Rollin  <krollin@apple.com>
3747
3748         Update Xcode projects with "Check .xcfilelists" build phase
3749         https://bugs.webkit.org/show_bug.cgi?id=193790
3750         <rdar://problem/47201374>
3751
3752         Reviewed by Alex Christensen.
3753
3754         Support for XCBuild includes specifying inputs and outputs to various
3755         Run Script build phases. These inputs and outputs are specified as
3756         .xcfilelist files. Once created, these .xcfilelist files need to be
3757         kept up-to-date. In order to check that they are up-to-date or not,
3758         add an Xcode build step that invokes an external script that performs
3759         the checking. If the .xcfilelists are found to be out-of-date, update
3760         them, halt the build, and instruct the developer to restart the build
3761         with up-to-date files.
3762
3763         At this time, the checking and regenerating is performed only if the
3764         WK_ENABLE_CHECK_XCFILELISTS environment variable is set to 1. People
3765         who want to use this facility can set this variable and test out the
3766         checking/regenerating. Once it seems like there are no egregious
3767         issues that upset a developer's workflow, we'll unconditionally enable
3768         this facility.
3769
3770         * Scripts/check-xcfilelists.sh: Added.
3771         * WebKit.xcodeproj/project.pbxproj:
3772
3773 2019-01-25  Alex Christensen  <achristensen@webkit.org>
3774
3775         Move logic from ChildProcess::setApplicationIsDaemon to NetworkProcess::initializeProcess
3776         https://bugs.webkit.org/show_bug.cgi?id=193844
3777
3778         Reviewed by Andy Estes.
3779
3780         This simplifies ChildProcess and removes NetworkProcess-specific code from this generic abstraction.
3781
3782         * NetworkProcess/mac/NetworkProcessMac.mm:
3783         (WebKit::NetworkProcess::initializeProcess):
3784         * Shared/ios/ChildProcessIOS.mm:
3785         (WebKit::ChildProcess::setApplicationIsDaemon): Deleted.
3786         * Shared/mac/ChildProcessMac.mm:
3787         (WebKit::ChildProcess::setApplicationIsDaemon): Deleted.
3788
3789 2019-01-25  Keith Rollin  <krollin@apple.com>
3790
3791         Update Xcode projects with "Apply Configuration to XCFileLists" build target
3792         https://bugs.webkit.org/show_bug.cgi?id=193781
3793         <rdar://problem/47201153>
3794
3795         Reviewed by Alex Christensen.
3796
3797         Part of generating the .xcfilelists used as part of adopting XCBuild
3798         includes running `make DerivedSources.make` from a standalone script.
3799         It’s important for this invocation to have the same environment as
3800         when the actual build invokes `make DerivedSources.make`. If the
3801         environments are different, then the two invocations will provide
3802         different results. In order to get the same environment in the
3803         standalone script, have the script launch xcodebuild targeting the
3804         "Apply Configuration to XCFileLists" build target, which will then
3805         re-invoke our standalone script. The script is now running again, this
3806         time in an environment with all workspace, project, target, xcconfig
3807         and other environment variables established.
3808
3809         The "Apply Configuration to XCFileLists" build target accomplishes
3810         this task via a small embedded shell script that consists only of:
3811
3812             eval "${WK_SUBLAUNCH_SCRIPT_PARAMETERS[@]}"
3813
3814         The process that invokes "Apply Configuration to XCFileLists" first
3815         sets WK_SUBLAUNCH_SCRIPT_PARAMETERS to an array of commands to be
3816         evaluated and exports it into the shell environment. When xcodebuild
3817         is invoked, it inherits the value of this variable and can `eval` the
3818         contents of that variable. Our external standalone script can then set
3819         WK_SUBLAUNCH_SCRIPT_PARAMETERS to the path to itself, along with a set
3820         of command-line parameters needed to restart itself in the appropriate
3821         state.
3822
3823         * WebKit.xcodeproj/project.pbxproj:
3824
3825 2019-01-25  Alex Christensen  <achristensen@webkit.org>
3826
3827         Add SPI to inform an application that "Go Back" has been clicked from a safe browsing warning
3828         https://bugs.webkit.org/show_bug.cgi?id=193802
3829         <rdar://problem/46010580>
3830
3831         Reviewed by Andy Estes.
3832
3833         * UIProcess/API/APIUIClient.h:
3834         (API::UIClient::didClickGoBackFromSafeBrowsingWarning):
3835         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
3836         * UIProcess/Cocoa/UIDelegate.h:
3837         * UIProcess/Cocoa/UIDelegate.mm:
3838         (WebKit::UIDelegate::setDelegate):
3839         (WebKit::UIDelegate::UIClient::didClickGoBackFromSafeBrowsingWarning):
3840         * UIProcess/WebPageProxy.cpp:
3841         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
3842
3843 2019-01-25  Daniel Bates  <dabates@apple.com>
3844
3845         [iOS] Pressing Tab key doesn't move to next cell with Google Sheets
3846         https://bugs.webkit.org/show_bug.cgi?id=193048
3847         <rdar://problem/46433836>
3848
3849         Reviewed by Brent Fulgham.
3850
3851         WebCore knows how interpret the Tab and Shift + Tab keys. When building with UIKit keyboard additions
3852         we do not need to register key commands for handling them from the UIProcess code. Instead UIKit will
3853         sends key events for these commands to us. This will make the behavior of these key commands when executed
3854         in an editable field match the behavior of these command when executed in a non-editable field since
3855         both code paths will now go through WebCore.
3856
3857         * UIProcess/ios/WKContentViewInteraction.mm:
3858         (-[WKContentView keyCommands]): Only compile when building with !USE(UIKIT_KEYBOARD_ADDITIONS).
3859
3860 2019-01-25  Alex Christensen  <achristensen@webkit.org>
3861
3862         Fix Linux build.
3863
3864         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3865         (WebKit::NetworkConnectionToWebProcess::requestResourceLoadStatisticsUpdate):
3866
3867 2019-01-25  Keith Rollin  <krollin@apple.com>
3868
3869         Update WebKitAdditions.xcconfig with correct order of variable definitions
3870         https://bugs.webkit.org/show_bug.cgi?id=193793
3871         <rdar://problem/47532439>
3872
3873         Reviewed by Alex Christensen.
3874
3875         XCBuild changes the way xcconfig variables are evaluated. In short,
3876         all config file assignments are now considered in part of the
3877         evaluation. When using the new build system and an .xcconfig file
3878         contains multiple assignments of the same build setting:
3879
3880         - Later assignments using $(inherited) will inherit from earlier
3881           assignments in the xcconfig file.
3882         - Later assignments not using $(inherited) will take precedence over
3883           earlier assignments. An assignment to a more general setting will
3884           mask an earlier assignment to a less general setting. For example,
3885           an assignment without a condition ('FOO = bar') will completely mask
3886           an earlier assignment with a condition ('FOO[sdk=macos*] = quux').
3887
3888         This affects some of our .xcconfig files, in that sometimes platform-
3889         or sdk-specific definitions appear before the general definitions.
3890         Under the new evaluations rules, the general definitions alway take
3891         effect because they always overwrite the more-specific definitions. The
3892         solution is to swap the order, so that the general definitions are
3893         established first, and then conditionally overwritten by the
3894         more-specific definitions.
3895
3896         * Configurations/BaseTarget.xcconfig:
3897         * Configurations/Version.xcconfig:
3898         * Configurations/WebKit.xcconfig:
3899
3900 2019-01-25  Keith Rollin  <krollin@apple.com>
3901
3902         Update existing .xcfilelists
3903         https://bugs.webkit.org/show_bug.cgi?id=193791
3904         <rdar://problem/47201706>
3905
3906         Reviewed by Alex Christensen.
3907
3908         Many .xcfilelist files were added in r238824 in order to support
3909         XCBuild. Update these with recent changes to the set of build files
3910         and with the current generate-xcfilelist script.
3911
3912         * DerivedSources-input.xcfilelist:
3913         * DerivedSources-output.xcfilelist:
3914         * UnifiedSources-input.xcfilelist:
3915         * UnifiedSources-output.xcfilelist:
3916
3917 2019-01-25  Per Arne Vollan  <pvollan@apple.com>
3918
3919         [iOS] Deny mach lookups to services not used.
3920         https://bugs.webkit.org/show_bug.cgi?id=193828
3921
3922         Reviewed by Brent Fulgham.
3923
3924         Start denying mach lookups to iOS services, which were previously allowed with reporting.
3925         Living-on has indicated that these services are not used.
3926
3927         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
3928
3929 2019-01-25  Brent Fulgham  <bfulgham@apple.com>
3930
3931         Activate the WebResourceLoadStatisticsStore in the NetworkProcess and deactivate it in the UIProcess.
3932         https://bugs.webkit.org/show_bug.cgi?id=193297
3933         <rdar://problem/47158841>
3934
3935         Reviewed by Alex Christensen.
3936
3937         This patch activates the ResourceLoadStatistics code in the NetworkProcess, and turns
3938         it off in the UIProcess. It also updates test infrastructure to work with this change
3939         in architecture.
3940
3941         * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
3942         (WebKit::ResourceLoadStatisticsMemoryStore::logSubresourceLoading): Added.
3943         (WebKit::ResourceLoadStatisticsMemoryStore::logSubresourceRedirect): Added.
3944         (WebKit::ResourceLoadStatisticsMemoryStore::logWebSocketLoading): Added.
3945         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
3946         (WebKit::WebResourceLoadStatisticsStore::logSubresourceLoading): Added.
3947         (WebKit::WebResourceLoadStatisticsStore::logSubresourceRedirect): Added.
3948         (WebKit::WebResourceLoadStatisticsStore::logWebSocketLoading): Added.
3949         (WebKit::WebResourceLoadStatisticsStore::removeAllStorageAccess):
3950         (WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCap):
3951         (WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCapForPrevalentResources): Deleted.
3952         * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
3953         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3954         (WebKit::NetworkConnectionToWebProcess::logSubresourceLoading): Added.
3955         (WebKit::NetworkConnectionToWebProcess::logSubresourceRedirect): Added.
3956         (WebKit::NetworkConnectionToWebProcess::logWebSocketLoading): Added.
3957         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
3958         * NetworkProcess/NetworkSession.cpp:
3959         (WebKit::NetworkSession::setResourceLoadStatisticsEnabled):
3960         * UIProcess/WebProcessPool.cpp:
3961         (WebKit::WebProcessPool::ensureNetworkProcess):
3962         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
3963         (WebKit::WebsiteDataStore::parameters):
3964         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3965         (WebKit::WebsiteDataStore::removeData):
3966         (WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):
3967         (WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):
3968         * Webprocess/WebProcess.cpp:
3969         (WebKit::WebProcess::initializeWebProcess): Register new ResourceLoadObserver callbacks.
3970
3971 2019-01-25  Ryosuke Niwa  <rniwa@webkit.org>
3972
3973         iOS: inputmode="none" disables hardware keyboard's globe key
3974         https://bugs.webkit.org/show_bug.cgi?id=193811