Use OptionSet for layout milestones
[WebKit-https.git] / Source / WebKit / ChangeLog
1 2018-11-09  Antti Koivisto  <antti@apple.com>
2
3         Use OptionSet for layout milestones
4         https://bugs.webkit.org/show_bug.cgi?id=191470
5
6         Reviewed by Dean Jackson.
7
8         * Shared/API/Cocoa/_WKRenderingProgressEventsInternal.h:
9         (renderingProgressEvents):
10         * Shared/API/c/WKSharedAPICast.h:
11         (WebKit::toWKLayoutMilestones):
12         (WebKit::toLayoutMilestones):
13         * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:
14         (WebKit::RemoteLayerTreeTransaction::newlyReachedLayoutMilestones const):
15         (WebKit::RemoteLayerTreeTransaction::setNewlyReachedLayoutMilestones):
16         * Shared/WebPageCreationParameters.cpp:
17         (WebKit::WebPageCreationParameters::encode const):
18         (WebKit::WebPageCreationParameters::decode):
19         * Shared/WebPageCreationParameters.h:
20         * UIProcess/API/APILoaderClient.h:
21         (API::LoaderClient::didReachLayoutMilestone):
22         * UIProcess/API/APINavigationClient.h:
23         (API::NavigationClient::renderingProgressDidChange):
24         * UIProcess/API/C/WKPage.cpp:
25         (WKPageSetPageLoaderClient):
26         (WKPageSetPageNavigationClient):
27         * UIProcess/API/C/WKPageRenderingProgressEventsInternal.h:
28         (pageRenderingProgressEvents):
29         * UIProcess/API/Cocoa/WKWebView.mm:
30         (layoutMilestones):
31         * UIProcess/Cocoa/NavigationState.h:
32         * UIProcess/Cocoa/NavigationState.mm:
33         (WebKit::NavigationState::NavigationClient::renderingProgressDidChange):
34         * UIProcess/WebPageProxy.cpp:
35         (WebKit::WebPageProxy::listenForLayoutMilestones):
36         (WebKit::WebPageProxy::didLayoutForCustomContentProvider):
37         (WebKit::WebPageProxy::didReachLayoutMilestone):
38         * UIProcess/WebPageProxy.h:
39         * UIProcess/WebPageProxy.messages.in:
40         * UIProcess/ios/WebPageProxyIOS.mm:
41         (WebKit::WebPageProxy::didCommitLayerTree):
42         * WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h:
43         (API::InjectedBundle::PageLoaderClient::didReachLayoutMilestone):
44         (API::InjectedBundle::PageLoaderClient::layoutMilestones const):
45         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
46         (WebKit::InjectedBundlePageLoaderClient::didReachLayoutMilestone):
47         (WebKit::InjectedBundlePageLoaderClient::layoutMilestones const):
48         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
49         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
50         (WebKit::WebFrameLoaderClient::dispatchDidReachLayoutMilestone):
51         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
52         * WebProcess/WebPage/DrawingArea.h:
53         (WebKit::DrawingArea::dispatchDidReachLayoutMilestone):
54         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
55         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
56         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
57         (WebKit::RemoteLayerTreeDrawingArea::dispatchDidReachLayoutMilestone):
58         * WebProcess/WebPage/WebPage.cpp:
59         (WebKit::m_shouldAttachDrawingAreaOnPageTransition):
60         (WebKit::WebPage::listenForLayoutMilestones):
61         (WebKit::WebPage::dispatchDidReachLayoutMilestone):
62         * WebProcess/WebPage/WebPage.h:
63         * WebProcess/WebPage/WebPage.messages.in:
64         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
65         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
66         (WebKit::TiledCoreAnimationDrawingArea::sendPendingNewlyReachedLayoutMilestones):
67         (WebKit::TiledCoreAnimationDrawingArea::dispatchDidReachLayoutMilestone):
68
69 2018-11-09  Daniel Bates  <dabates@apple.com>
70
71         [iOS] Draw caps lock indicator in password fields
72         https://bugs.webkit.org/show_bug.cgi?id=190565
73         <rdar://problem/45262343>
74
75         Reviewed by Dean Jackson.
76
77         Notify the WebContent process with the current modifer state on window activation changes. Notify
78         the WebContent process when hardware keyboard availability changes (e.g. a keyboard is attached).
79
80         * UIProcess/API/Cocoa/WKWebView.mm:
81         (-[WKWebView _initializeWithConfiguration:]): Register for hardware keyboard availability changed notifications.
82         (-[WKWebView dealloc]): Unregister from hardware availability changed notifications.
83         (hardwareKeyboardAvailabilityChangedCallback): Added.
84         * UIProcess/WebPageProxy.cpp:
85         (WebKit::WebPageProxy::updateCurrentModifierState): Compile this code when building for iOS.
86         * UIProcess/WebPageProxy.h:
87         * UIProcess/ios/WKContentViewInteraction.mm:
88         (-[WKContentView _handleKeyUIEvent:]): Update the current modifier state if this event is a hardware
89         keyboard flags changed event.
90         * UIProcess/ios/WebPageProxyIOS.mm:
91         (WebKit::WebPageProxy::hardwareKeyboardAvailabilityChanged): Added.
92
93         * WebProcess/WebPage/WebPage.h:
94         * WebProcess/WebPage/WebPage.messages.in:
95         * WebProcess/WebPage/ios/WebPageIOS.mm:
96         (WebKit::WebPage::hardwareKeyboardAvailabilityChanged):
97         Added new message HardwareKeyboardAvailabilityChanged. Notify the focused HTML input element (if we have
98         one) that the caps lock state may have changed when we receive message HardwareKeyboardAvailabilityChanged
99         so that we toggle visibility of the caps lock indicator.
100
101 2018-11-09  Tim Horton  <timothy_horton@apple.com>
102
103         Make use of _UIRemoteView instead of CALayerHost if possible for WKRemoteView
104         https://bugs.webkit.org/show_bug.cgi?id=191449
105         <rdar://problem/45884977>
106
107         Reviewed by Eric Carlson.
108
109         UIRemoteView has some nice process assertion management that it would
110         be nice to not duplicate. So, we can just use it instead of CALayerHost!
111
112         * Platform/spi/ios/UIKitSPI.h:
113         * UIProcess/DrawingAreaProxy.h:
114         (WebKit::DrawingAreaProxy::page const):
115         * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
116         (-[WKUIRemoteView hitTest:withEvent:]):
117         (-[WKUIRemoteView description]):
118         (createRemoteView):
119         (WebKit::RemoteLayerTreeHost::createLayer):
120
121 2018-11-09  Eric Carlson  <eric.carlson@apple.com>
122
123         [MediaStream] Make screen capture an experimental feature
124         https://bugs.webkit.org/show_bug.cgi?id=191472
125         <rdar://problem/45946499>
126
127         Reviewed by Jer Noble.
128
129         * Shared/WebPreferences.yaml: Make ScreenCaptureEnabled an experimental feature.
130
131 2018-11-09  Daniel Bates  <dabates@apple.com>
132
133         [iOS] Pressing forward delete key in text field does nothing and we should not invoke an editor
134         action when forward delete is pressed outside a text field
135         https://bugs.webkit.org/show_bug.cgi?id=190566
136         <rdar://problem/45262367>
137
138         Reviewed by Wenson Hsieh.
139
140         Override -_deleteForwardAndNotify to perform a forward deletion and remove the dead code that
141         expected UIKit to send us a character string with 0xF728 for the forward delete key. UIKit
142         ceased doing this many years ago. We may revist this decision once <rdar://problem/45772078>
143         is fixed.
144
145         * UIProcess/ios/WKContentViewInteraction.mm:
146         (-[WKContentView _interpretKeyEvent:isCharEvent:]):
147         (-[WKContentView _deleteForwardAndNotify:]):
148
149 2018-11-08  Wenson Hsieh  <wenson_hsieh@apple.com>
150
151         Unreviewed, try to fix the 32-bit macOS build
152
153         * WebProcess/Plugins/PDF/PDFPlugin.mm:
154         (WebKit::PDFPlugin::showDefinitionForAttributedString):
155
156 2018-11-08  Said Abou-Hallawa  <sabouhallawa@apple.com>
157
158         Add an SPI to allow WebView clients to add additional supported image formats
159         https://bugs.webkit.org/show_bug.cgi?id=190454
160
161         Reviewed by Simon Fraser.
162
163         * Platform/mac/StringUtilities.h:
164         * Platform/mac/StringUtilities.mm:
165         (WebKit::webCoreStringVectorFromNSStringArray):
166         A helper function which converts an NSArray of NSStrings to a Vector of
167         WTFString.
168
169         * Shared/WebPageCreationParameters.cpp:
170         (WebKit::WebPageCreationParameters::encode const):
171         (WebKit::WebPageCreationParameters::decode):
172         * Shared/WebPageCreationParameters.h:
173         Handle encoding and decoding the AdditionalSupportedImageTypes which will
174         allow transferring it from the UI process to the web process.
175
176         * UIProcess/API/APIPageConfiguration.h:
177         (API::PageConfiguration::additionalSupportedImageTypes const):
178         (API::PageConfiguration::setAdditionalSupportedImageTypes):
179         Store the AdditionalSupportedImageTypes in the APIPageConfiguration
180         which is used when creating the WebPageProxy in the UIPorcess.
181
182         * UIProcess/API/Cocoa/WKWebView.mm:
183         (-[WKWebView _initializeWithConfiguration:]):
184         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
185         (-[WKWebViewConfiguration copyWithZone:]):
186         (-[WKWebViewConfiguration _additionalSupportedImageTypes]):
187         (-[WKWebViewConfiguration _setAdditionalSupportedImageTypes:]):
188         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
189         Setter/Getter for the AdditionalSupportedImageTypes.
190
191         * UIProcess/WebPageProxy.cpp:
192         (WebKit::WebPageProxy::creationParameters):
193         Copy the AdditionalSupportedImageTypes from APIPageConfiguration to 
194         WebPageCreationParameters.
195
196         * UIProcess/WebPageProxy.h:
197         Delete unimplemented function.
198
199         * WebProcess/WebPage/WebPage.cpp:
200         (WebKit::m_shouldAttachDrawingAreaOnPageTransition):
201         Copy the AdditionalSupportedImageTypes from WebPageCreationParameters to
202         WebCore.
203
204 2018-11-08  Megan Gardner  <megan_gardner@apple.com>
205
206         Adopt Reveal Framework to replace Lookup
207         https://bugs.webkit.org/show_bug.cgi?id=191097
208         <rdar://problem/45924508>
209
210         Reviewed by Tim Horton.
211
212         Pass in what it needed to clear the textIndicators. This is better than
213         the current notification structure.
214
215         * UIProcess/Cocoa/WebViewImpl.mm:
216         (-[WKWindowVisibilityObserver dealloc]):
217         (-[WKWindowVisibilityObserver startObservingLookupDismissalIfNeeded]):
218         * UIProcess/mac/PageClientImplMac.mm:
219         (WebKit::PageClientImpl::didPerformDictionaryLookup):
220         * UIProcess/mac/WKImmediateActionController.mm:
221         (-[WKImmediateActionController _animationControllerForText]):
222         * WebProcess/Plugins/PDF/PDFPlugin.mm:
223         (WebKit::PDFPlugin::showDefinitionForAttributedString):
224
225         Generate and pass in the text indicator information, as this is needed now.
226
227         * WebProcess/WebPage/mac/WebPageMac.mm:
228         (WebKit::WebPage::dictionaryPopupInfoForSelectionInPDFPlugin):
229
230 2018-11-08  Keith Rollin  <krollin@apple.com>
231
232         Create .xcfilelist files
233         https://bugs.webkit.org/show_bug.cgi?id=191324
234         <rdar://problem/45852819>
235
236         Reviewed by Alex Christensen.
237
238         As part of preparing for enabling XCBuild, create and use .xcfilelist
239         files. These files are using during Run Script build phases in an
240         Xcode project. If a Run Script build phase produces new files that are
241         used later as inputs to subsequent build phases, XCBuild needs to know
242         about these files. These files can be either specified in an "output
243         files" section of the Run Script phase editor, or in .xcfilelist files
244         that are associated with the Run Script build phase.
245
246         This patch takes the second approach. It consists of three sets of changes:
247
248         - Modify the DerivedSources.make files to have a
249           'print_all_generated_files" target that produces a list of the files
250           they create.
251
252         - Create a shell script that produces .xcfilelist files from the
253           output of the previous step, as well as for the files created in the
254           Generate Unified Sources build steps.
255
256         - Add the new .xcfilelist files to the associated projects.
257
258         Note that, with these changes, the Xcode workspace and projects can no
259         longer be fully loaded into Xcode 9. Xcode will attempt to load the
260         projects that have .xcfilelist files associated with them, but will
261         fail and display a placeholder for those projects instead. It's
262         expected that all developers are using Xcode 10 by now and that not
263         being able to load into Xcode 9 is not a practical issue. Keep in mind
264         that this is strictly an IDE issue, and that the projects can still be
265         built with `xcodebuild`.
266
267         Also note that the shell script that creates the .xcfilelist files can
268         also be used to verify that the set of files that's currently checked
269         in is up-to-date. This checking can be used as part of a check-in hook
270         or part of check-webkit-style to sooner catch cases where the
271         .xcfilelist files need to be regenerated.
272
273         * DerivedSources.make:
274         * DerivedSources.xcfilelist: Added.
275         * UnifiedSources.xcfilelist: Added.
276         * WebKit.xcodeproj/project.pbxproj:
277
278 2018-11-08  Timothy Hatcher  <timothy@apple.com>
279
280         Add experimental support for a `supported-color-schemes` CSS property.
281         https://bugs.webkit.org/show_bug.cgi?id=191319
282         rdar://problem/45852261
283
284         Reviewed by Dean Jackson.
285
286         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
287         (WebKit::InjectedBundleRangeHandle::renderedImage):
288         * WebProcess/WebPage/WebPage.cpp:
289         (WebKit::WebPage::drawRect):
290
291 2018-11-08  Eric Carlson  <eric.carlson@apple.com>
292
293         [MediaStream] Use DeviceIdHashSaltStorage to generate device ID hash salt
294         https://bugs.webkit.org/show_bug.cgi?id=190825
295         <rdar://problem/45486085>
296
297         Reviewed by Youenn Fablet.
298
299         * UIProcess/API/C/WKUserMediaPermissionCheck.cpp:
300         (WKUserMediaPermissionCheckSetUserMediaAccessInfo):
301         * UIProcess/API/glib/WebKitDeviceInfoPermissionRequest.cpp:
302         (webkitDeviceInfoPermissionRequestAllow):
303         (webkitDeviceInfoPermissionRequestDeny):
304         * UIProcess/Cocoa/UIDelegate.mm:
305         (WebKit::UIDelegate::UIClient::checkUserMediaPermissionForOrigin):
306         * UIProcess/DeviceIdHashSaltStorage.cpp:
307         (WebKit::DeviceIdHashSaltStorage::regenerateDeviceIdHashSaltForOrigin):
308         (WebKit::DeviceIdHashSaltStorage::deleteDeviceIdHashSaltForOrigin):
309         * UIProcess/DeviceIdHashSaltStorage.h:
310         * UIProcess/UserMediaPermissionCheckProxy.cpp:
311         (WebKit::UserMediaPermissionCheckProxy::setUserMediaAccessInfo):
312         * UIProcess/UserMediaPermissionCheckProxy.h:
313         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
314         (WebKit::UserMediaPermissionRequestManagerProxy::createPermissionRequest):
315         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted):
316         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
317         (WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo):
318         (WebKit::UserMediaPermissionRequestManagerProxy::updateDeviceIDHashSalt):
319         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
320         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
321         * UIProcess/UserMediaPermissionRequestProxy.cpp:
322         (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):
323         * UIProcess/UserMediaPermissionRequestProxy.h:
324         (WebKit::UserMediaPermissionRequestProxy::create):
325         (WebKit::UserMediaPermissionRequestProxy::deviceIdentifierHashSalt const): Deleted.
326
327 2018-11-08  Carlos Garcia Campos  <cgarcia@igalia.com>
328
329         [GTK] Crash when running with sandbox enabled
330         https://bugs.webkit.org/show_bug.cgi?id=191353
331
332         Reviewed by Michael Catanzaro.
333
334         g_key_file_set_string_list() expects a null-terminated array as parameter.
335
336         * UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
337         (WebKit::createFlatpakInfo): Append nullptr to sharedPermissions array.
338
339 2018-11-07  Chris Dumez  <cdumez@apple.com>
340
341         Unreviewed, fix iOS build with recent SDKs.
342
343         * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
344         (-[WKFullScreenWindowController _EVOrganizationName]):
345
346 2018-11-07  John Wilander  <wilander@apple.com>
347
348         Resource Load Statistics: Enable cap on partitioned cache max age
349         https://bugs.webkit.org/show_bug.cgi?id=191395
350         <rdar://problem/45885977>
351
352         Reviewed by Chris Dumez.
353
354         This change does not bump the network cache revision number.
355         It's not needed since it was done just a week ago.
356
357         * UIProcess/ResourceLoadStatisticsMemoryStore.cpp:
358         (WebKit::ResourceLoadStatisticsMemoryStore::setCacheMaxAgeCap):
359         (WebKit::ResourceLoadStatisticsMemoryStore::updateCacheMaxAgeCap):
360         * UIProcess/ResourceLoadStatisticsMemoryStore.h:
361         * UIProcess/WebResourceLoadStatisticsStore.cpp:
362         (WebKit::WebResourceLoadStatisticsStore::didCreateNetworkProcess):
363
364 2018-11-07  Daniel Bates  <dabates@apple.com>
365
366         [iOS] Support deleting to the start of the line and to the end of the line
367         https://bugs.webkit.org/show_bug.cgi?id=191389
368         <rdar://problem/45883972>
369
370         Reviewed by Wenson Hsieh.
371
372         Add support for the key commands Command + Delete and Control + K to delete to the start
373         of the line and to delete to the end of the line, respectively.
374
375         * UIProcess/ios/WKContentViewInteraction.mm:
376         (-[WKContentView _deleteToStartOfLine]): Added.
377         (-[WKContentView _deleteToEndOfLine]): Added.
378
379 2018-11-07  Daniel Bates  <dabates@apple.com>
380
381         [iOS] Option + Delete should delete previous word
382         https://bugs.webkit.org/show_bug.cgi?id=191381
383         <rdar://problem/23681351>
384
385         Reviewed by Wenson Hsieh.
386
387         Implement support for pressing Option + Delete to delete the previous word. This makes text editing
388         in WebKit more closely match the platform conventions.
389
390         * UIProcess/ios/WKContentViewInteraction.mm:
391         (-[WKContentView _deleteByWord]):
392
393 2018-11-07  Daniel Bates  <dabates@apple.com>
394
395         Override +[UIKeyboard isInHardwareKeyboardMode] in WebKitTestRunner and DumpRenderTree
396         https://bugs.webkit.org/show_bug.cgi?id=190141
397
398         Reviewed by Darin Adler.
399
400         Directly use +[UIKeyboard isInHardwareKeyboardMode]. We will override this class method
401         in DumpRenderTree and WebKitTestRunner to always return NO so as to make test runs
402         deterministic regardless of whether a hardware keyboard is attached.
403
404         * Shared/NativeWebKeyboardEvent.h:
405         * Shared/ios/NativeWebKeyboardEventIOS.mm:
406         (WebKit::isInHardwareKeyboardMode): Deleted.
407         * UIProcess/ios/WKContentViewInteraction.mm:
408         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
409         * WebProcess/WebPage/ios/WebPageIOS.mm:
410         (WebKit::WebPage::platformEditorState const):
411
412 2018-11-07  Zamiul Haque  <zhaque@apple.com>
413
414         Force a gregorian calendar to show for credit card expiration date inputs
415         (autocomplete='cc-exp'*) regardless of default system settings.
416         https://bugs.webkit.org/show_bug.cgi?id=191096
417         rdar://problem/42640256
418
419         Reviewed by Tim Horton.
420
421         Added some plumbing code to expose the calendar identifier of the calendar used by a
422         presented date picker. Added shouldPresentGregorianCalendar:, to be used for
423         determining what property values a date input control must present a Gregorian
424         calendar for.
425
426         * UIProcess/ios/WKContentViewInteraction.mm:
427         (-[WKContentView formInputPeripheral]):
428         * UIProcess/ios/forms/WKFormInputControl.mm:
429
430 2018-11-07  Carlos Garcia Campos  <cgarcia@igalia.com>
431
432         Unreviewed. Fix GTK/WPE build when memfd is not available after r237922.
433
434         * Platform/unix/SharedMemoryUnix.cpp:
435         (WebKit::createSharedMemory):
436
437 2018-11-07  Carlos Garcia Campos  <cgarcia@igalia.com>
438
439         [Linux] Use memfd_create when available in SharedMemory implementation
440         https://bugs.webkit.org/show_bug.cgi?id=189741
441
442         Reviewed by Michael Catanzaro.
443
444         If memfd is available, use it instead of shm_open.
445
446         * Platform/unix/SharedMemoryUnix.cpp:
447         (WebKit::createSharedMemory): Helper to create the shared memory, trying first with memfd and falling back to
448         shm if it's not available.
449         (WebKit::SharedMemory::create): Use createSharedMemory() helper.
450
451 2018-11-06  Justin Fan  <justin_fan@apple.com>
452
453         [WebGPU] Experimental prototype for WebGPURenderPipeline and WebGPUSwapChain
454         https://bugs.webkit.org/show_bug.cgi?id=191291
455
456         Reviewed by Myles Maxfield.
457
458         Properly disable WEBGPU on all non-Metal platforms for now.
459
460         * Configurations/FeatureDefines.xcconfig:
461
462 2018-11-06  Youenn Fablet  <youenn@apple.com>
463
464         Make mDNS ICE Candidate an experimental flag again
465         https://bugs.webkit.org/show_bug.cgi?id=191262
466
467         Reviewed by Dean Jackson.
468
469         * Shared/WebPreferences.yaml:
470         * UIProcess/API/C/WKPreferences.cpp:
471         (WKPreferencesSetWebRTCMDNSICECandidatesEnabled):
472         (WKPreferencesGetWebRTCMDNSICECandidatesEnabled):
473         * WebProcess/InjectedBundle/InjectedBundle.cpp:
474         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
475
476 2018-11-06  Suresh Koppisetty  <skoppisetty@apple.com>
477
478         Don’t use the main queue to create an XPC connection.
479         https://bugs.webkit.org/show_bug.cgi?id=191160
480         <rdar://problem/45736262>
481
482         Reviewed by Geoffrey Garen.
483
484         Don't use the main queue to create an XPC connection. xpc_connection_set_bootstrap does
485         dispatch_mach_send_barrier_f on this queue which delays the sending of the subsequent
486         bootstrap message (sent to launchd for launching a new target process) when the main queue is busy.
487
488         Now that the XPC connection runs on the default concurrent queue, errorHandler could be invoked
489         by any thread. The job of errorHandler is to dispatch errorHandlerImpl to the main thread,
490         where errorHandlerImpl is responsible for the actual handling of errors if any.
491
492         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
493         (WebKit::ProcessLauncher::launchProcess):
494
495 2018-11-06  Brian Burg  <bburg@apple.com>
496
497         Add missing iOS availability macro to _WKAutomationSessionConfiguration
498         https://bugs.webkit.org/show_bug.cgi?id=191320
499
500         Reviewed by Tim Horton.
501
502         * UIProcess/API/Cocoa/_WKAutomationSessionConfiguration.h:
503
504 2018-11-06  John Wilander  <wilander@apple.com>
505
506         Resource Load Statistics: Remove cap on partitioned cache max age if it matches a network reload (redirect-only)
507         https://bugs.webkit.org/show_bug.cgi?id=189760
508         <rdar://problem/44612242>
509
510         Reviewed by Youenn Fablet and Antti Koivisto.
511
512         When a redirect cache entry for a prevalent resource reaches its max
513         age cap, it is loaded again from the network and the network response
514         is compared with what's in the cache. If it's a match, the cache entry
515         is fully accepted. If not, a new capped cache entry is created.
516
517         This feature is still off by default.
518
519         * NetworkProcess/NetworkResourceLoader.cpp:
520         (WebKit::NetworkResourceLoader::canUseCachedRedirect const):
521             Now checks the new member m_cacheEntryForMaxAgeCapValidation.
522         (WebKit::NetworkResourceLoader::retrieveCacheEntry):
523             New case handled for entry->hasReachedPrevalentResourceAgeCap().
524         (WebKit::NetworkResourceLoader::validateCacheEntryForMaxAgeCapValidation):
525             This is where the new logic compares the incoming redirect with the
526             cached one. If they match, an uncapped entry is allowed to be stored.
527             If they don't match, a new capped entry will be stored.
528         (WebKit::NetworkResourceLoader::willSendRedirectedRequest):
529             Now calls the new
530             NetworkResourceLoader::validateCacheEntryForMaxAgeCapValidation()
531             function.
532         * NetworkProcess/NetworkResourceLoader.h:
533             Added the m_cacheEntryForMaxAgeCapValidation member.
534         * NetworkProcess/cache/NetworkCache.cpp:
535         (WebKit::NetworkCache::makeUseDecision):
536             Restored to previous behavior which means
537             UseDecision::NoDueToPrevalentResourceAgeCap was removed.
538         (WebKit::NetworkCache::Cache::retrieve):
539             Restored to previous behavior.
540         (WebKit::NetworkCache::Cache::storeRedirect):
541             Now takes the optional maxAgeCap and caps the entry's max age if it's set.
542         (WebKit::NetworkCache::hasReachedPrevalentResourceAgeCap): Deleted.
543         * NetworkProcess/cache/NetworkCache.h:
544         * NetworkProcess/cache/NetworkCacheEntry.cpp:
545         (WebKit::NetworkCache::Entry::encodeAsStorageRecord const):
546             Now encodes m_maxAgeCap.
547         (WebKit::NetworkCache::Entry::decodeStorageRecord):
548             Now decodes m_maxAgeCap.
549         (WebKit::NetworkCache::Entry::hasReachedPrevalentResourceAgeCap const):
550             Added.
551         (WebKit::NetworkCache::Entry::capMaxAge):
552             Added.
553         * NetworkProcess/cache/NetworkCacheEntry.h:
554             Added the optional m_maxAgeCap.
555         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
556         (WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):
557             Now gets the optional max age cap from the NetworkStorageSession and sends it
558             to Cache::storeRedirect().
559         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
560         (WebKit::NetworkCache::cachedEntryReuseFailureToDiagnosticKey):
561             Removed handling of UseDecision::NoDueToPrevalentResourceAgeCap.
562
563 2018-11-06  Per Arne Vollan  <pvollan@apple.com>
564
565         REGRESSION (r230523): Caps lock indicator not shown in password field
566         https://bugs.webkit.org/show_bug.cgi?id=190056
567
568         Reviewed by Ryosuke Niwa.
569
570         Update cached modifier state in the WebProcess when WebKit::WebPage::keyEvent is called, and
571         when the window becomes active.
572
573         * UIProcess/WebPageProxy.cpp:
574         (WebKit::WebPageProxy::dispatchActivityStateChange):
575         (WebKit::WebPageProxy::updateCurrentModifierState):
576         * UIProcess/WebPageProxy.h:
577         * WebProcess/WebPage/WebPage.cpp:
578         (WebKit::WebPage::keyEvent):
579         (WebKit::WebPage::updateCurrentModifierState):
580         * WebProcess/WebPage/WebPage.h:
581         * WebProcess/WebPage/WebPage.messages.in:
582
583 2018-11-06  Alex Christensen  <achristensen@webkit.org>
584
585         Add ObjC SPI equivalent of WKContextHandlesSafeBrowsing
586         https://bugs.webkit.org/show_bug.cgi?id=191329
587
588         Reviewed by Tim Horton.
589
590         Like WKContextHandlesSafeBrowsing, this is so I can make one change in WebKit and enable safe browsing
591         in WKWebView and disable it in Safari at the same time without broken revisions between landing two changes
592         in two repositories.
593
594         * UIProcess/API/Cocoa/WKWebView.mm:
595         (+[WKWebView handlesSafeBrowsing]):
596         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
597
598 2018-11-06  Eric Carlson  <eric.carlson@apple.com>
599
600         [MediaStream] User should not be prompted again after denying getDisplayMedia request
601         https://bugs.webkit.org/show_bug.cgi?id=191227
602         <rdar://problem/45784512>
603
604         Reviewed by Youenn Fablet.
605
606         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
607         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasDenied):
608         (WebKit::UserMediaPermissionRequestManagerProxy::wasRequestDenied):
609         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
610         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
611
612 2018-11-06  Fujii Hironori  <Hironori.Fujii@sony.com>
613
614         [MediaStream] User should not be prompted again after denying getDisplayMedia request
615         https://bugs.webkit.org/show_bug.cgi?id=191227
616         <rdar://problem/45784512>
617
618         Unreviewed build fix of ports not ENABLE(MEDIA_STREAM).
619
620         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: Define getRequestAction only if ENABLE(MEDIA_STREAM).
621         * UIProcess/UserMediaPermissionRequestManagerProxy.h: Ditto.
622
623 2018-11-03  Alex Christensen  <achristensen@webkit.org>
624
625         [Mac] Implement safe browsing in WebKit
626         https://bugs.webkit.org/show_bug.cgi?id=188871
627
628         Reviewed by Tim Horton.
629
630         * Platform/spi/Cocoa/SafeBrowsingSPI.h:
631         * Resources/SafeBrowsing.xcassets: Added.
632         * Resources/SafeBrowsing.xcassets/Contents.json: Added.
633         * Resources/SafeBrowsing.xcassets/WKSafeBrowsingWarningBackground.colorset: Added.
634         * Resources/SafeBrowsing.xcassets/WKSafeBrowsingWarningBackground.colorset/Contents.json: Added.
635         * Resources/SafeBrowsing.xcassets/WKSafeBrowsingWarningText.colorset: Added.
636         * Resources/SafeBrowsing.xcassets/WKSafeBrowsingWarningText.colorset/Contents.json: Added.
637         * Resources/SafeBrowsing.xcassets/WKSafeBrowsingWarningTitle.colorset: Added.
638         * Resources/SafeBrowsing.xcassets/WKSafeBrowsingWarningTitle.colorset/Contents.json: Added.
639         * Shared/WebPreferences.yaml:
640         * Shared/WebPreferencesDefaultValues.h:
641         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
642         (WKContextHandlesSafeBrowsing):
643         * UIProcess/Cocoa/SafeBrowsingResultCocoa.mm:
644         (WebKit::malwareDetailsBase):
645         (WebKit::learnMore):
646         (WebKit::reportAnErrorBase):
647         (WebKit::localizedProvider):
648         (WebKit::SafeBrowsingResult::SafeBrowsingResult):
649         * UIProcess/Cocoa/WKSafeBrowsingWarning.h: Added.
650         * UIProcess/Cocoa/WKSafeBrowsingWarning.mm: Added.
651         (confirmMalwareSentinel):
652         (visitUnsafeWebsiteSentinel):
653         (colorNamed):
654         (replace):
655         (addLinkAndReplace):
656         (-[WKSafeBrowsingExclamationPoint drawRect:]):
657         (-[WKSafeBrowsingExclamationPoint intrinsicContentSize]):
658         (reportAnErrorURL):
659         (malwareDetailsURL):
660         (titleText):
661         (warningText):
662         (detailsText):
663         (-[WKSafeBrowsingWarning initWithFrame:safeBrowsingResult:completionHandler:]):
664         (-[WKSafeBrowsingWarning dealloc]):
665         (-[WKSafeBrowsingWarning goBackClicked]):
666         (-[WKSafeBrowsingWarning clickedOnLink:]):
667         (-[WKSafeBrowsingWarning showDetailsClicked]):
668         (+[WKSafeBrowsingTextView viewWithAttributedString:linkTarget:]):
669         (+[WKSafeBrowsingTextView viewWithString:]):
670         (-[WKSafeBrowsingTextView intrinsicContentSize]):
671         (-[WKSafeBrowsingTextView clickedOnLink:atIndex:]):
672         * UIProcess/Cocoa/WebViewImpl.h:
673         * UIProcess/Cocoa/WebViewImpl.mm:
674         (WebKit::WebViewImpl::showSafeBrowsingWarning):
675         (WebKit::WebViewImpl::clearSafeBrowsingWarning):
676         (WebKit::WebViewImpl::setFrameSize):
677         * UIProcess/PageClient.h:
678         (WebKit::PageClient::showSafeBrowsingWarning):
679         (WebKit::PageClient::clearSafeBrowsingWarning):
680         * UIProcess/SafeBrowsingResult.h:
681         (WebKit::SafeBrowsingResult::url const):
682         (WebKit::SafeBrowsingResult::provider const):
683         (WebKit::SafeBrowsingResult::localizedProviderName const):
684         (WebKit::SafeBrowsingResult::malwareDetailsURLBase const):
685         (WebKit::SafeBrowsingResult::reportAnErrorURLBase const):
686         (WebKit::SafeBrowsingResult::learnMoreURL const):
687         (WebKit::SafeBrowsingResult::needsSafeBrowsingWarning const):
688         (WebKit::SafeBrowsingResult::isKnownToBeUnsafe const): Deleted.
689         * UIProcess/WebPageProxy.cpp:
690         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
691         * UIProcess/ios/PageClientImplIOS.h:
692         * UIProcess/ios/PageClientImplIOS.mm:
693         (WebKit::PageClientImpl::showSafeBrowsingWarning):
694         (WebKit::PageClientImpl::clearSafeBrowsingWarning):
695         * UIProcess/mac/PageClientImplMac.h:
696         * UIProcess/mac/PageClientImplMac.mm:
697         (WebKit::PageClientImpl::setImpl):
698         (WebKit::PageClientImpl::showSafeBrowsingWarning):
699         (WebKit::PageClientImpl::clearSafeBrowsingWarning):
700         * WebKit.xcodeproj/project.pbxproj:
701
702 2018-11-05  Zan Dobersek  <zdobersek@igalia.com>
703
704         [WPE] Remove BackingStore, BackingStoreCairo implementation files from build
705         https://bugs.webkit.org/show_bug.cgi?id=191269
706
707         Reviewed by Michael Catanzaro.
708
709         * SourcesWPE.txt: Drop the BackingStore.cpp and BackingStoreCairo.cpp
710         files from the WPE build. These are not used at all in WPE configuration
711         as they are only used by the GTK+ port for non-AC functionality.
712
713 2018-11-05  Chris Dumez  <cdumez@apple.com>
714
715         Use same limit for page cache and suspended pages
716         https://bugs.webkit.org/show_bug.cgi?id=191266
717
718         Reviewed by Geoffrey Garen.
719
720         Use same limit for page cache and suspended pages as they serve the same purpose.
721
722         * UIProcess/API/Cocoa/WKProcessPool.mm:
723         (-[WKProcessPool _maximumSuspendedPageCount]):
724         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
725         * UIProcess/WebProcessPool.cpp:
726         (WebKit::WebProcessPool::updateMaxSuspendedPageCount):
727         (WebKit::WebProcessPool::setCacheModel):
728         (WebKit::WebProcessPool::addSuspendedPageProxy):
729         * UIProcess/WebProcessPool.h:
730
731 2018-11-05  Wenson Hsieh  <wenson_hsieh@apple.com>
732
733         [iOS] Allow WKWebView clients to customize bar button item groups in the accessory view when editing
734         https://bugs.webkit.org/show_bug.cgi?id=191240
735         <rdar://problem/44872806>
736
737         Reviewed by Tim Horton.
738
739         Allow WKWebView clients to override WKContentView's default input assistant item by plumbing the call to
740         `-inputAssistantItem` through `-[WKWebView inputAssistantItem]`, such that if a client asks WKWebView for its
741         input assistant item and changes its leading or trailing bar button groups, the changes will be reflected by
742         WKContentView; additionally, this allows clients to achieve the same effect by overriding `-inputAssistantItem`
743         on WKWebView.
744
745         Test:   KeyboardInputTests.ModifyInputAssistantItemBarButtonGroups
746                 KeyboardInputTests.OverrideInputAssistantItemBarButtonGroups
747
748         * UIProcess/API/Cocoa/WKWebView.mm:
749         (-[WKWebView inputAssistantItem]):
750         * UIProcess/ios/WKContentViewInteraction.h:
751         * UIProcess/ios/WKContentViewInteraction.mm:
752         (-[WKContentView inputAssistantItem]):
753
754         Route the call to `[super inputAssistantItem]` through `-[WKWebView inputAssistantItem]`, so that the input
755         assistant item may be overridden via WKWebView.
756
757         (-[WKContentView inputAssistantItemForWebView]):
758
759 2018-11-05  Ryan Haddad  <ryanhaddad@apple.com>
760
761         Unreviewed, rolling out r237785.
762
763         Introduced layout test and API test failures on macOS and iOS.
764
765         Reverted changeset:
766
767         "[iOS] Issue initial paint soon after the visuallyNonEmpty
768         milestone is fired."
769         https://bugs.webkit.org/show_bug.cgi?id=191078
770         https://trac.webkit.org/changeset/237785
771
772 2018-11-05  Commit Queue  <commit-queue@webkit.org>
773
774         Unreviewed, rolling out r237784 and r237788.
775         https://bugs.webkit.org/show_bug.cgi?id=191270
776
777         Caused mediastream layout test failures (Requested by
778         ryanhaddad on #webkit).
779
780         Reverted changesets:
781
782         "[MediaStream] User should not be prompted again after denying
783         getDisplayMedia request"
784         https://bugs.webkit.org/show_bug.cgi?id=191227
785         https://trac.webkit.org/changeset/237784
786
787         "[MediaStream] User should not be prompted again after denying
788         getDisplayMedia request"
789         https://bugs.webkit.org/show_bug.cgi?id=191227
790         https://trac.webkit.org/changeset/237788
791
792 2018-11-04  Fujii Hironori  <Hironori.Fujii@sony.com>
793
794         [MediaStream] User should not be prompted again after denying getDisplayMedia request
795         https://bugs.webkit.org/show_bug.cgi?id=191227
796         <rdar://problem/45784512>
797
798         Unreviewed build fix of ports not ENABLE(MEDIA_STREAM).
799
800         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: Define getRequestAction only if ENABLE(MEDIA_STREAM).
801         * UIProcess/UserMediaPermissionRequestManagerProxy.h: Ditto.
802
803 2018-11-04  Zalan Bujtas  <zalan@apple.com>
804
805         [iOS] Issue initial paint soon after the visuallyNonEmpty milestone is fired.
806         https://bugs.webkit.org/show_bug.cgi?id=191078
807         <rdar://problem/45736178>
808
809         Reviewed by Antti Koivisto.
810
811         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
812         (WebKit::WebChromeClient::layerFlushThrottlingIsActive const):
813         * WebProcess/WebCoreSupport/WebChromeClient.h:
814         * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
815         (WebKit::AcceleratedDrawingArea::scheduleInitialDeferredPaint):
816         * WebProcess/WebPage/AcceleratedDrawingArea.h:
817         * WebProcess/WebPage/DrawingArea.h:
818         (WebKit::DrawingArea::layerFlushThrottlingIsActive const):
819         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
820         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
821         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
822         (WebKit::RemoteLayerTreeDrawingArea::setLayerTreeStateIsFrozen):
823         (WebKit::RemoteLayerTreeDrawingArea::initialDeferredPaint):
824         (WebKit::RemoteLayerTreeDrawingArea::scheduleInitialDeferredPaint):
825         (WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlush):
826         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
827         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
828         (WebKit::TiledCoreAnimationDrawingArea::scheduleInitialDeferredPaint):
829
830 2018-11-04  Eric Carlson  <eric.carlson@apple.com>
831
832         [MediaStream] User should not be prompted again after denying getDisplayMedia request
833         https://bugs.webkit.org/show_bug.cgi?id=191227
834         <rdar://problem/45784512>
835
836         Reviewed by Youenn Fablet.
837
838         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
839         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasDenied):
840         (WebKit::UserMediaPermissionRequestManagerProxy::wasRequestDenied):
841         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
842         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
843
844 2018-11-03  Alex Christensen  <achristensen@webkit.org>
845
846         Mac production builds should sign the network process xpc service with entitlements
847         https://bugs.webkit.org/show_bug.cgi?id=191209
848         <rdar://problem/45377609>
849
850         Reviewed by Geoff Garen.
851
852         * Configurations/Network-OSX.entitlements: Copied from Configurations/Network-OSX-sandbox.entitlements.
853         * Configurations/NetworkService.xcconfig:
854         Set CODE_SIGN_ENTITLEMENTS_COCOA_TOUCH_NO like we do for the web process,
855         except with the corresponoding network process entitlements file.
856         * UIProcess/API/Cocoa/WKProcessPool.mm:
857         (-[WKProcessPool _networkProcessHasEntitlementForTesting:]):
858         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
859         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
860         (WebKit::WebProcessPool::networkProcessHasEntitlementForTesting):
861         * UIProcess/WebProcessPool.h:
862         * WebKit.xcodeproj/project.pbxproj:
863         Add infrastructure to test that the network process actually has an entitlement.
864
865 2018-11-03  Philippe Normand  <pnormand@igalia.com>
866
867         [WPE] Add the WebKitVersion.h header
868         https://bugs.webkit.org/show_bug.cgi?id=191015
869         <rdar://problem/45647211>
870
871         Reviewed by Michael Catanzaro.
872
873         * PlatformWPE.cmake: Install the generated header as well.
874
875 2018-11-02  Alex Christensen  <achristensen@webkit.org>
876
877         Unreviewed, rolling out r237761.
878
879         Makes most API tests timeout and WK2 tests crash
880
881         Reverted changeset:
882
883         "Mac production builds should sign the network process xpc
884         service with entitlements"
885         https://bugs.webkit.org/show_bug.cgi?id=191209
886         https://trac.webkit.org/changeset/237761
887
888 2018-11-02  Ryan Haddad  <ryanhaddad@apple.com>
889
890         Unreviewed, attempt to fix the build with recent SDKs.
891
892         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
893         (WebKit::XPCServiceExit):
894
895 2018-11-02  Alex Christensen  <achristensen@webkit.org>
896
897         Mac production builds should sign the network process xpc service with entitlements
898         https://bugs.webkit.org/show_bug.cgi?id=191209
899         <rdar://problem/45377609>
900
901         Reviewed by Geoff Garen.
902
903         * Configurations/NetworkService.xcconfig:
904         Set CODE_SIGN_ENTITLEMENTS_COCOA_TOUCH_NO like we do for the web process,
905         except with the corresponoding network process entitlements file.
906         * UIProcess/API/Cocoa/WKProcessPool.mm:
907         (-[WKProcessPool _networkProcessHasEntitlementForTesting:]):
908         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
909         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
910         (WebKit::WebProcessPool::networkProcessHasEntitlementForTesting):
911         * UIProcess/WebProcessPool.h:
912         Add infrastructure to test that the network process actually has an entitlement.
913
914 2018-11-02  Daniel Bates  <dabates@apple.com>
915
916         [iOS] WebKit should dispatch DOM events when a modifier key is pressed
917         https://bugs.webkit.org/show_bug.cgi?id=190487
918
919         Reviewed by Tim Horton.
920
921         Add support for modifier flags change events dispatched by UIKit.
922
923         * Shared/ios/WebIOSEventFactory.mm:
924         (modifiersForEvent): Update for renamed enumerations.
925         (WebIOSEventFactory::createWebKeyboardEvent): Modifier keys do not have an associated
926         character and do not participate in key repeat.
927         * UIProcess/Automation/ios/WebAutomationSessionIOS.mm:
928         (WebKit::WebAutomationSession::platformSimulateKeyboardInteraction): Update for renamed enumerations.
929         * UIProcess/ios/WKContentViewInteraction.mm:
930         (-[WKContentView _interpretKeyEvent:isCharEvent:]): Return NO if the event represents a
931         modifier flags change to allow the default handling.
932         * UIProcess/ios/WKKeyboardScrollingAnimator.mm:
933         (-[WKKeyboardScrollingAnimator keyboardScrollForEvent:]): Update for renamed enumerations.
934
935 2018-11-02  Chris Dumez  <cdumez@apple.com>
936
937         [PSON] Reuse SuspendedPages' process when possible, for performance
938         https://bugs.webkit.org/show_bug.cgi?id=191166
939
940         Reviewed by Geoffrey Garen.
941
942         When process-swapping check if there is an existing SuspendedPage for the domain we're going to.
943         If there is, use this SuspendedPage's process for the navigation instead of a fresh new process.
944         This change should be beneficial for performance as it:
945         - Avoids spinning up a new process (CPU & memory cost)
946         - Likely better leverages caches since this process already loaded this domain in the past
947
948         Due to current limitations, using a SuspendedPage's proxy may consume the SuspendedPage, which
949         means that it can no longer be used for PageCache on history navigations. We need to do this when
950         the SuspendedPageProxy in question was created for the current WebPageProxy because:
951         - This SuspendedPageProxy's process already has a suspended WebPage with this WebPageProxy's pageID
952         and
953         - We do not currently support having more than one WebPage with a given pageID within a single
954           WebProcess.
955
956         * UIProcess/SuspendedPageProxy.cpp:
957         (WebKit::SuspendedPageProxy::SuspendedPageProxy):
958         * UIProcess/SuspendedPageProxy.h:
959         * UIProcess/WebProcessPool.cpp:
960         (WebKit::WebProcessPool::processForNavigationInternal):
961
962 2018-11-01  Fujii Hironori  <Hironori.Fujii@sony.com>
963
964         Rename <wtf/unicode/UTF8.h> to <wtf/unicode/UTF8Conversion.h> in order to avoid conflicting with ICU's unicode/utf8.h
965         https://bugs.webkit.org/show_bug.cgi?id=189693
966
967         Reviewed by Yusuke Suzuki.
968
969         * Shared/API/APIString.h: Replaced <wtf/unicode/UTF8.h> with <wtf/unicode/UTF8Conversion.h>.
970
971 2018-11-01  Daniel Bates  <dabates@apple.com>
972
973         Cleanup: Extraneous platform guarding of -_setUpSQLiteDatabaseTrackerClient
974         https://bugs.webkit.org/show_bug.cgi?id=191124
975
976         Reviewed by Tim Horton.
977
978         Remove the platform guard around the call to -_setUpSQLiteDatabaseTrackerClient as the
979         implementation of that message is already guarded.
980
981         * UIProcess/API/Cocoa/WKWebView.mm:
982         (-[WKWebView _initializeWithConfiguration:]):
983
984 2018-11-01  Ryan Haddad  <ryanhaddad@apple.com>
985
986         Unreviewed, attempt to fix the build with recent SDKs.
987
988         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
989         (WebKit::XPCServiceInitializer):
990
991 2018-11-01  Sihui Liu  <sihui_liu@apple.com>
992
993         Add a storage limit for IndexedDB
994         https://bugs.webkit.org/show_bug.cgi?id=190598
995         <rdar://problem/44654715>
996
997         Reviewed by Chris Dumez.
998
999         Add SPI for testing.
1000
1001         * NetworkProcess/NetworkProcess.cpp:
1002         (WebKit::NetworkProcess::NetworkProcess):
1003         (WebKit::NetworkProcess::idbServer):
1004         (WebKit::NetworkProcess::setIDBPerOriginQuota):
1005         * NetworkProcess/NetworkProcess.h:
1006         * NetworkProcess/NetworkProcess.messages.in:
1007         * UIProcess/API/C/WKContext.cpp:
1008         (WKContextSetIDBPerOriginQuota):
1009         * UIProcess/API/C/WKContextPrivate.h:
1010         * UIProcess/WebProcessPool.cpp:
1011         (WebKit::WebProcessPool::setIDBPerOriginQuota):
1012         * UIProcess/WebProcessPool.h:
1013
1014 2018-11-01  Chris Dumez  <cdumez@apple.com>
1015
1016         [PSON] WebPageProxy::receivedNavigationPolicyDecision() should not schedule the new load asynchronously when process-swapping
1017         https://bugs.webkit.org/show_bug.cgi?id=191076
1018
1019         Reviewed by Geoffrey Garen.
1020
1021         WebPageProxy::receivedNavigationPolicyDecision() should not schedule the new load asynchronously when process-swapping.
1022         The client can request a new load synchronously after answering the policy decision, in which case we'd end up loading
1023         the wrong URL.
1024
1025         * UIProcess/WebPageProxy.cpp:
1026         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
1027         * UIProcess/WebProcessPool.cpp:
1028         (WebKit::WebProcessPool::processForNavigation):
1029         (WebKit::WebProcessPool::processForNavigationInternal):
1030         * UIProcess/WebProcessPool.h:
1031
1032 2018-11-01  Chris Dumez  <cdumez@apple.com>
1033
1034         [PSON] Unable to submit a file in FormData cross-site
1035         https://bugs.webkit.org/show_bug.cgi?id=191138
1036
1037         Reviewed by Alex Christensen.
1038
1039         When PSON is enabled, we are unable to submit a file in FormData cross-site. Although we encode the
1040         request body over IPC since r237639, we're missing the right sandbox extensions for its to work for
1041         files.
1042
1043         Update FormDataReference encoder to pass along the necessary sandbox extensions for files in the
1044         FormData, and have its decoder consume those extensions so that the recipient has access to those
1045         files. Also update LoadParameters's IPC encoder / decoder to encoder an IPC::FormDataReference
1046         (which encodes both FormData and sandbox extensions) instead of a FormData.
1047
1048         * Platform/IPC/FormDataReference.h:
1049         (IPC::FormDataReference::encode const):
1050         (IPC::FormDataReference::decode):
1051         * Shared/LoadParameters.cpp:
1052         (WebKit::LoadParameters::encode const):
1053         (WebKit::LoadParameters::decode):
1054
1055 2018-11-01  Claudio Saavedra  <csaavedra@igalia.com>
1056
1057         ERROR: ResourceLoadStatisticsPersistentStorage: Unable to delete statistics file
1058         https://bugs.webkit.org/show_bug.cgi?id=191152
1059
1060         Reviewed by Chris Dumez.
1061
1062         The statistics file is not created unconditionally, so
1063         make sure it exists before logging an error.
1064
1065         * UIProcess/ResourceLoadStatisticsPersistentStorage.cpp:
1066         (WebKit::ResourceLoadStatisticsPersistentStorage::clear):
1067         Check that the file exists before logging an error.
1068
1069 2018-11-01  Claudio Saavedra  <csaavedra@igalia.com>
1070
1071         [GLIB] Silent a build warning when not using Wayland
1072
1073         Unreviewed.
1074
1075         * UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
1076
1077 2018-11-01  Frederic Wang  <fwang@igalia.com>
1078
1079         [WebAuthN] Make AuthenticatorManager
1080         https://bugs.webkit.org/show_bug.cgi?id=189279
1081
1082         Unreviewed build fix.
1083
1084         * UIProcess/WebAuthentication/Cocoa/LocalConnection.h: Add missing headers.
1085
1086 2018-10-31  Wenson Hsieh  <wenson_hsieh@apple.com>
1087
1088         API test WKAttachmentTests.CopyAndPasteBetweenWebViews fails on macOS 10.13
1089         https://bugs.webkit.org/show_bug.cgi?id=191114
1090         <rdar://problem/45700410>
1091
1092         Reviewed by Dean Jackson.
1093
1094         Followup to r237648: also make sure that we insecurely unarchive NSFileWrapper on platforms that don't support
1095         secure archiving of file wrappers.
1096
1097         * UIProcess/API/Cocoa/APIAttachmentCocoa.mm:
1098         (API::Attachment::updateFromSerializedRepresentation):
1099
1100 2018-10-31  Dean Jackson  <dino@apple.com>
1101
1102         Forward original fragment identifier into System Preview
1103         https://bugs.webkit.org/show_bug.cgi?id=191141
1104         <rdar://problem/45717542>
1105
1106         Reviewed by Wenson Hsieh.
1107
1108         If the URL used by the page includes a fragment identifier, use
1109         it when telling QuickLook to open a local file.
1110
1111         * UIProcess/Cocoa/DownloadClient.mm:
1112         (WebKit::DownloadClient::didFinish): Append original fragment identifier
1113         to the destination URL.
1114
1115 2018-10-31  Zalan Bujtas  <zalan@apple.com>
1116
1117         [iOS] Do not paint tap highlight unless it is above a certain threshold
1118         https://bugs.webkit.org/show_bug.cgi?id=191134
1119         <rdar://problem/43615142>
1120
1121         Flashing a large portion of the screen on every tap looks unpleasant.
1122         This patch impoves the existing heuristic by adding area check and a % threshold.  
1123
1124         Reviewed by Tim Horton.
1125
1126         * UIProcess/ios/WKContentViewInteraction.mm:
1127         (-[WKContentView _showTapHighlight]):
1128         (highlightedQuadsAreSmallerThanRect): Deleted.
1129
1130 2018-10-31  Wenson Hsieh  <wenson_hsieh@apple.com>
1131
1132         API test WKAttachmentTests.CopyAndPasteBetweenWebViews fails on macOS 10.13
1133         https://bugs.webkit.org/show_bug.cgi?id=191114
1134         <rdar://problem/45700410>
1135
1136         Reviewed by Dean Jackson.
1137
1138         On macOS 10.12, we don't attempt secure archival at all because SECURE_ARCHIVER_API is turned off, and on macOS
1139         10.14, NSFileWrapper supports secure coding. However, on macOS 10.13, SECURE_ARCHIVER_API is on despite
1140         NSFileWrapper not being securely codable, so we're unable to serialize attachment data.
1141
1142         To fix this, we only use the secure archiver on ≥ macOS 10.14 and ≥ iOS 12.
1143
1144         * UIProcess/API/Cocoa/APIAttachmentCocoa.mm:
1145         (API::Attachment::createSerializedRepresentation const):
1146
1147 2018-10-31  Zach Li  <zacharyli323@gmail.com>
1148
1149         Add credit card autofill button
1150         https://bugs.webkit.org/show_bug.cgi?id=191051
1151         <rdar://problem/45657011>
1152
1153         Reviewed by Wenson Hsieh.
1154
1155         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
1156         (toAutoFillButtonType):
1157         (toWKAutoFillButtonType):
1158         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandlePrivate.h:
1159         Introduce a new button type for credit card autofill.
1160         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
1161         (toAutoFillButtonType):
1162         (toWKAutoFillButtonType):
1163         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
1164
1165 2018-10-31  Chris Dumez  <cdumez@apple.com>
1166
1167         [PSON] When process-swapping for a POST request the HTTP body gets dropped
1168         https://bugs.webkit.org/show_bug.cgi?id=191046
1169         <rdar://problem/45229732>
1170
1171         Reviewed by Alex Christensen.
1172
1173         For performance reasons, the ResourceRequest IPC encoder does not encode the request's HTTP body (aka form data).
1174         When we decide to process-swap for a POST request in WebPageProxy::decidePolicyForNavigationAction(), the request
1175         we pass the new WebProcess thus no longer has a HTTP body and the load will likely fail in the new process.
1176
1177         To address the issue, we now pass the request body along with the request when sending the DecidePolicyForNavigationActionAsync
1178         / DecidePolicyForNavigationActionSync IPC from the WebProcess to the UIProcess. No action is needed for the
1179         LoadRequest IPC to the new WebProcess since the LoadParameters' IPC encoder takes care of encoding the request's
1180         body already.
1181
1182         * UIProcess/WebPageProxy.cpp:
1183         (WebKit::WebPageProxy::decidePolicyForNavigationActionAsync):
1184         (WebKit::WebPageProxy::decidePolicyForNavigationActionSync):
1185         * UIProcess/WebPageProxy.h:
1186         * UIProcess/WebPageProxy.messages.in:
1187         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1188         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1189
1190 2018-10-31  Antti Koivisto  <antti@apple.com>
1191
1192         Stop using LayerFlushScheduler in WK2
1193         https://bugs.webkit.org/show_bug.cgi?id=191065
1194
1195         Reviewed by Tim Horton.
1196
1197         Code gets more understandable when TiledCoreAnimationDrawingArea simply uses RunLoopObserver
1198         directly for flush scheduling. LayerFlushScheduler can be later moved to WK1.
1199
1200         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1201         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1202         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
1203         (WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea):
1204         (WebKit::TiledCoreAnimationDrawingArea::setLayerTreeStateIsFrozen):
1205         (WebKit::TiledCoreAnimationDrawingArea::scheduleCompositingLayerFlush):
1206         (WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
1207         (WebKit::TiledCoreAnimationDrawingArea::layerFlushRunLoopCallback):
1208         (WebKit::TiledCoreAnimationDrawingArea::invalidateLayerFlushRunLoopObserver):
1209         (WebKit::TiledCoreAnimationDrawingArea::scheduleLayerFlushRunLoopObserver):
1210
1211 2018-10-31  Claudio Saavedra  <csaavedra@igalia.com>
1212
1213         [WPE][GTK] Certificates loaded from the cache don't include the certificate chain
1214         https://bugs.webkit.org/show_bug.cgi?id=190956
1215
1216         Reviewed by Youenn Fablet.
1217
1218         Similarly to what was done for the IPC coders, serialize
1219         the entire certificate chain in the cache coder. Bump
1220         the cache version due to the caching format changes.
1221
1222         * NetworkProcess/cache/NetworkCacheCoders.h: Add GRefPtr<GByteArray> coders.
1223         * NetworkProcess/cache/NetworkCacheCodersSoup.cpp:
1224         (WTF::Persistence::certificatesDataListFromCertificateInfo):
1225         (WTF::Persistence::certificateFromCertificatesDataList): Helpers.
1226         (WTF::Persistence::Coder<WebCore::CertificateInfo>::encode):
1227         (WTF::Persistence::Coder<WebCore::CertificateInfo>::decode):
1228         (WTF::Persistence::Coder<GRefPtr<GByteArray>>::encode):
1229         (WTF::Persistence::Coder<GRefPtr<GByteArray>>::decode):
1230         * NetworkProcess/cache/NetworkCacheStorage.h: Bump the cache version.
1231
1232 2018-10-30  Wenson Hsieh  <wenson_hsieh@apple.com>
1233
1234         [Cocoa] Attachment dropped from one web view to another is missing its file wrapper
1235         https://bugs.webkit.org/show_bug.cgi?id=190530
1236         <rdar://problem/45232149>
1237
1238         Reviewed by Tim Horton.
1239
1240         See WebCore ChangeLog for more details.
1241
1242         * Shared/WebCoreArgumentCoders.cpp:
1243         (IPC::ArgumentCoder<SerializedAttachmentData>::encode):
1244         (IPC::ArgumentCoder<SerializedAttachmentData>::decode):
1245         * Shared/WebCoreArgumentCoders.h:
1246
1247         Add IPC encoding/decoding support for SerializedAttachmentData.
1248
1249         * UIProcess/API/APIAttachment.cpp:
1250         (API::Attachment::createSerializedRepresentation const):
1251         (API::Attachment::updateFromSerializedRepresentation):
1252         * UIProcess/API/APIAttachment.h:
1253         * UIProcess/API/Cocoa/APIAttachmentCocoa.mm:
1254         (API::Attachment::createSerializedRepresentation const):
1255
1256         Add a method to serialize and return attachment info as a blob of data.
1257
1258         (API::Attachment::updateFromSerializedRepresentation):
1259
1260         Add a method to update the attachment, given a serialized blob of data. On Cocoa platforms, this fails
1261         gracefully if the serialized data cannot be decoded.
1262
1263         * UIProcess/Cocoa/PageClientImplCocoa.h:
1264         * UIProcess/Cocoa/PageClientImplCocoa.mm:
1265         (WebKit::PageClientImplCocoa::allocFileWrapperInstance const):
1266         (WebKit::PageClientImplCocoa::serializableFileWrapperClasses const):
1267         (WebKit::PageClientImplCocoa::allocFileWrapperInstance): Deleted.
1268
1269         Add an additional hook to return the list of NSFileWrapper subclasses suitable for deserialization. This
1270         array contains (at minimum) NSFileWrapper, but may additionally include a custom NSFileWrapper subclass, if
1271         configured.
1272
1273         * UIProcess/PageClient.h:
1274         (WebKit::PageClient::allocFileWrapperInstance const):
1275         (WebKit::PageClient::serializableFileWrapperClasses const):
1276         (WebKit::PageClient::allocFileWrapperInstance): Deleted.
1277         * UIProcess/WebPageProxy.cpp:
1278         (WebKit::WebPageProxy::registerAttachmentsFromSerializedData):
1279
1280         Registers the given serialized attachment data, creating new _WKAttachment instances if necessary. Currently,
1281         this does not update the file wrappers of existing _WKAttachments; we should revisit this in the future to see
1282         if we can additionally update file wrappers for existing attachments, without breaking the case where the user
1283         copies and pastes or drags and drops attachments within a single web view and the client expects _WKAttachment
1284         instances to be reused.
1285
1286         (WebKit::WebPageProxy::serializedAttachmentDataForIdentifiers):
1287         * UIProcess/WebPageProxy.h:
1288         * UIProcess/WebPageProxy.messages.in:
1289         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1290         (WebKit::WebEditorClient::registerAttachments):
1291         (WebKit::WebEditorClient::serializedAttachmentDataForIdentifiers):
1292
1293         Implement a new IPC hook to fetch an array of serialized attachment data blobs, given a list of attachment
1294         identifiers.
1295
1296         * WebProcess/WebCoreSupport/WebEditorClient.h:
1297
1298 2018-10-30  Chris Dumez  <cdumez@apple.com>
1299
1300         [PSON] View gesture snapshot gets taken down early when process-swapping
1301         https://bugs.webkit.org/show_bug.cgi?id=191083
1302         <rdar://problem/45058738>
1303
1304         Reviewed by Alex Christensen.
1305
1306         When process-swapping, we would call WebViewImpl::processDidExit(), which would destroy
1307         the ViewGestureController and thus take down the swipe navigation snapshot before it
1308         should. We now call WebViewImpl::processDidSwap() instead, which does the same thing,
1309         except for destroying the ViewGestureController. As a result, the view snapshot stays
1310         visible as long as it is needed, even in case of process swap.
1311
1312         * UIProcess/Cocoa/WebViewImpl.h:
1313         * UIProcess/Cocoa/WebViewImpl.mm:
1314         (WebKit::WebViewImpl::handleProcessSwapOrExit):
1315         (WebKit::WebViewImpl::processWillSwap):
1316         (WebKit::WebViewImpl::processDidExit):
1317         * UIProcess/mac/PageClientImplMac.mm:
1318         (WebKit::PageClientImpl::processWillSwap):
1319
1320 2018-10-30  Chris Dumez  <cdumez@apple.com>
1321
1322         [PSON] WebView renders with incorrect dimensions after back or forward
1323         https://bugs.webkit.org/show_bug.cgi?id=191071
1324         <rdar://problem/45058950>
1325
1326         Reviewed by Alex Christensen.
1327
1328         Make sure WebPage::reinitializeWebPage() updates the page's dimensions if needed using the
1329         WebPageCreationParameters it is provided.
1330
1331         * WebProcess/WebPage/WebPage.cpp:
1332         (WebKit::WebPage::reinitializeWebPage):
1333
1334 2018-10-30  Dewei Zhu  <dewei_zhu@apple.com>
1335
1336         Move 'ProcessSwapOnCrossSiteNavigationEnabled' to 'experimental' category.
1337         https://bugs.webkit.org/show_bug.cgi?id=191049
1338
1339         Reviewed by Dean Jackson.
1340
1341         Move the feature flag to experimental feature section.
1342
1343         * Shared/WebPreferences.yaml:
1344
1345 2018-10-30  Alexey Proskuryakov  <ap@apple.com>
1346
1347         Enable InstallAPI for iOS unconditionally
1348         https://bugs.webkit.org/show_bug.cgi?id=191043
1349         rdar://problem/32728423
1350
1351         Reviewed by Dan Bernstein.
1352
1353         * Configurations/Base.xcconfig: Enabled it. Added NSURLDownloadSPI.h as an
1354         excluded header - WebKit doesn't export NSURLDownload, so the definition
1355         shouldn't be processed by InstallAPI.
1356
1357 2018-10-30  Alexey Proskuryakov  <ap@apple.com>
1358
1359         Clean up some obsolete MAX_ALLOWED macros
1360         https://bugs.webkit.org/show_bug.cgi?id=190916
1361
1362         Reviewed by Tim Horton.
1363
1364         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
1365         (WebKit::NetworkDataTaskCocoa::applySniffingPoliciesAndBindRequestToInferfaceIfNeeded):
1366         * Platform/spi/Cocoa/DeviceIdentitySPI.h:
1367         * Platform/spi/ios/UIKitSPI.h:
1368         * Shared/WebPreferencesDefaultValues.cpp:
1369         (defaultCustomPasteboardDataEnabled):
1370         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
1371         (WebKit::toPKPaymentRequest):
1372         * UIProcess/ios/WKContentViewInteraction.mm:
1373         (-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:]): Deleted.
1374
1375 2018-10-30  Commit Queue  <commit-queue@webkit.org>
1376
1377         Unreviewed, rolling out r237600 and r237604.
1378         https://bugs.webkit.org/show_bug.cgi?id=191086
1379
1380         Breaks internal iOS builds (Requested by ryanhadd_ on
1381         #webkit).
1382
1383         Reverted changesets:
1384
1385         "Enable InstallAPI for iOS unconditionally"
1386         https://bugs.webkit.org/show_bug.cgi?id=191043
1387         https://trac.webkit.org/changeset/237600
1388
1389         "Build fix attempt after enabling InstallAPI for iOS."
1390         https://bugs.webkit.org/show_bug.cgi?id=191043
1391         https://trac.webkit.org/changeset/237604
1392
1393 2018-10-30  Alexey Proskuryakov  <ap@apple.com>
1394
1395         Build fix attempt after enabling InstallAPI for iOS.
1396         https://bugs.webkit.org/show_bug.cgi?id=191043
1397         rdar://problem/32728423
1398
1399         * Configurations/WebKit.xcconfig: Skip NSURLDownloadSPI.h here too.
1400
1401 2018-10-30  Alexey Proskuryakov  <ap@apple.com>
1402
1403         Enable InstallAPI for iOS unconditionally
1404         https://bugs.webkit.org/show_bug.cgi?id=191043
1405         rdar://problem/32728423
1406
1407         Reviewed by Dan Bernstein.
1408
1409         * Configurations/Base.xcconfig: Enabled it.
1410
1411 2018-10-30  Zan Dobersek  <zdobersek@igalia.com>
1412
1413         [CoordGraphics] CoordinatedLayerTreeHost::flushLayersAndForceRepaint() should schedule the flush
1414         https://bugs.webkit.org/show_bug.cgi?id=191066
1415
1416         Reviewed by Michael Catanzaro.
1417
1418         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1419         (WebKit::CoordinatedLayerTreeHost::flushLayersAndForceRepaint):
1420         Only schedule the layer flush in this call, don't perform it on the
1421         spot. This avoids re-entry of the layer flushing process in cases when
1422         the associated display refresh monitor is requested a callback during
1423         the layout phase that's executed under the initial layer flush.
1424
1425 2018-10-29  Dewei Zhu  <dewei_zhu@apple.com>
1426
1427         Move 'ProcessSwapOnCrossSiteNavigationEnabled' to 'experimental' category.
1428         https://bugs.webkit.org/show_bug.cgi?id=191049
1429
1430         Reviewed by Chris Dumez.
1431
1432         Move 'ProcessSwapOnCrossSiteNavigationEnabled' from 'internal' to 'experimental' category.
1433
1434         * Shared/WebPreferences.yaml:
1435
1436 2018-10-29  Youenn Fablet  <youenn@apple.com>
1437
1438         Handle MDNS resolution of candidates through libwebrtc directly
1439         https://bugs.webkit.org/show_bug.cgi?id=190681
1440
1441         Reviewed by Eric Carlson.
1442
1443         Add support for AsyncResolver to resolve MDNS.
1444         This basically reuse the code path used to resolve STUN server addresses.
1445         Removed MDNS specific resolution.
1446         Use existing CFHost resolution mechanism to do the actual resolution.
1447
1448         Make sure that a resolver is kept alive while iterating through its clients when signaling done.
1449         Some of its clients may indeed call Destroy() on the resolver during that iteration.
1450
1451         * NetworkProcess/webrtc/NetworkMDNSRegister.cpp:
1452         (WebKit::NetworkMDNSRegister::registerMDNSName):
1453         * NetworkProcess/webrtc/NetworkMDNSRegister.messages.in:
1454         * WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
1455         (WebKit::LibWebRTCResolver::Destroy):
1456         (WebKit::LibWebRTCResolver::doDestroy):
1457         (WebKit::LibWebRTCResolver::setResolvedAddress):
1458         (WebKit::LibWebRTCResolver::setError):
1459         (WebKit::LibWebRTCProvider::createPeerConnection):
1460         * WebProcess/Network/webrtc/LibWebRTCProvider.h:
1461         * WebProcess/Network/webrtc/LibWebRTCSocketFactory.h:
1462         * WebProcess/Network/webrtc/WebMDNSRegister.cpp:
1463         * WebProcess/Network/webrtc/WebMDNSRegister.h:
1464         * WebProcess/Network/webrtc/WebMDNSRegister.messages.in:
1465
1466 2018-10-29  Tim Horton  <timothy_horton@apple.com>
1467
1468         Modernize WebKit nibs and lprojs for localization's sake
1469         https://bugs.webkit.org/show_bug.cgi?id=190911
1470         <rdar://problem/45349466>
1471
1472         Reviewed by Dan Bernstein.
1473
1474         * Resources/WebContentProcess.xib:
1475         * WebKit.xcodeproj/project.pbxproj:
1476         * en.lproj/InfoPlist.strings: Renamed from Source/WebKit/English.lproj/InfoPlist.strings.
1477         English->en
1478
1479 2018-10-29  Tim Horton  <timothy_horton@apple.com>
1480
1481         Make FindOptionsShowOverlay work on iOS
1482         https://bugs.webkit.org/show_bug.cgi?id=190551
1483
1484         Reviewed by Andy Estes.
1485
1486         * WebProcess/WebPage/FindController.cpp:
1487         (WebKit::FindController::updateFindUIAfterPageScroll):
1488         Update the find indicator after installing the page overlay for the find holes.
1489         This ensures that if the find indicator mechanism also uses page overlays,
1490         as it does on iOS, that they are installed in the correct order (because
1491         order of installation directly affects z-order).
1492
1493         (WebKit::FindController::findIndicatorRadius const):
1494         (WebKit::FindController::shouldHideFindIndicatorOnScroll const):
1495         Add two getters for design differences between find-in-page on iOS vs. other platforms.
1496
1497         (WebKit::FindController::rectsForTextMatchesInRect):
1498         Return FloatRects instead of IntRects for ease of use in the caller.
1499         Don't clip rects for matches that intersect the current tile. We still
1500         drop ones that don't intersect at all, but if they do intersect, we
1501         provide the full rect (which may overlap a different tile), so that
1502         e.g. border drawing will work correctly.
1503
1504         (WebKit::FindController::drawRect):
1505         Adopt shrink-wrapping for find holes. This has minimal impact on macOS,
1506         where the holes don't have rounded corners, but on iOS this makes
1507         overlapping or adjacent holes look great. We already do this for the indicator,
1508         so it only makes sense to do the same for the holes.
1509
1510         In order to support shrink-wrapping here, switch to using a Clear operator
1511         with a path-fill instead of clearRect to clear out the holes.
1512
1513         Avoid hiding the find indicator on scroll if the platform says not to.
1514
1515         * WebProcess/WebPage/FindController.h:
1516         * WebProcess/WebPage/ios/FindControllerIOS.mm:
1517         (WebKit::FindController::findIndicatorRadius const):
1518         (WebKit::FindController::shouldHideFindIndicatorOnScroll const):
1519         Slightly adjust the find indicator's parameters to be compatible with having holes.
1520         Reduce the horizontal margin by half a point so that it fits precisely in the hole.
1521         Drop the "TightlyFitContent" text indicator parameter, because we want 
1522         rects that match the holes, and they do not tightly fit the content's height.
1523         This matches macOS's behavior.
1524
1525 2018-10-29  Jer Noble  <jer.noble@apple.com>
1526
1527         CRASH in CoreGraphics: ERROR_CGDataProvider_BufferIsNotBigEnough
1528         https://bugs.webkit.org/show_bug.cgi?id=190954
1529
1530         Reviewed by Simon Fraser.
1531
1532         * Shared/cg/ShareableBitmapCG.cpp:
1533         (WebKit::ShareableBitmap::makeCGImage):
1534
1535 2018-10-29  Youenn Fablet  <youenn@apple.com>
1536
1537         Guard H264 simulcast with a runtime flag
1538         https://bugs.webkit.org/show_bug.cgi?id=191025
1539
1540         Reviewed by Eric Carlson.
1541
1542         * Shared/WebPreferences.yaml:
1543
1544 2018-10-29  Chris Dumez  <cdumez@apple.com>
1545
1546         [PSON] When Safari restores session state after launching, going back and forward does not swap processes
1547         https://bugs.webkit.org/show_bug.cgi?id=190975
1548         <rdar://problem/45059256>
1549
1550         Reviewed by Antti Koivisto.
1551
1552         When deciding to process-swap or not on a history navigation, we normally check the BackForwardListItems'
1553         process identifiers do check if they come from different WebProcesses or not. However, the check was invalid
1554         in the case where the BackForwardListItems were restored by the client. After a session restore, the
1555         items' process identifier is the UIProcess one. Therefore, we need to disable the BackForwardListItems'
1556         process identifiers check if if the process identifier is the one of the UIProcess.
1557
1558         * UIProcess/WebProcessPool.cpp:
1559         (WebKit::WebProcessPool::processForNavigationInternal):
1560
1561 2018-10-29  Youenn Fablet  <youenn@apple.com>
1562
1563         [WebRTC] Enable VP8 by default
1564         https://bugs.webkit.org/show_bug.cgi?id=190672
1565
1566         Reviewed by Eric Carlson.
1567
1568         * Shared/WebPreferences.yaml:
1569
1570 2018-10-28  Zan Dobersek  <zdobersek@igalia.com>
1571
1572         [WPE] Add the WebKitVersion.h header
1573         https://bugs.webkit.org/show_bug.cgi?id=191015
1574
1575         Reviewed by Michael Catanzaro.
1576
1577         Add the WebKitVersion.h API header for the WPE port. As with other
1578         headers providing the GLib API, we have to provide a WPE-specific
1579         version, but the implementation file can be shared with the GTK port,
1580         and is moved under the UIProcess/API/glib/ directory accordingly.
1581
1582         * PlatformWPE.cmake:
1583         * SourcesWPE.txt:
1584         * UIProcess/API/glib/WebKitVersion.cpp: Renamed from Source/WebKit/UIProcess/API/gtk/WebKitVersion.cpp.
1585         * UIProcess/API/wpe/WebKitVersion.h.in: Added.
1586         * UIProcess/API/wpe/webkit.h:
1587
1588 2018-10-26  Megan Gardner  <megan_gardner@apple.com>
1589
1590         Remove Unused WebSelectionAssistant
1591         https://bugs.webkit.org/show_bug.cgi?id=190939
1592
1593         Reviewed by Tim Horton.
1594
1595         We made webSelectionAssistant alwasys nil last year when we moved to using
1596         the textSelectionAssistant for all text selection on the web. This patch merely 
1597         goes through and cleans out all the references to this object that is always nil.
1598         No functionality should change.
1599
1600         * UIProcess/ios/WKContentView.mm:
1601         (-[WKContentView _didExitStableState]):
1602         * UIProcess/ios/WKContentViewInteraction.h:
1603         * UIProcess/ios/WKContentViewInteraction.mm:
1604         (-[WKContentView cleanupInteraction]):
1605         (-[WKContentView resignFirstResponderForWebView]):
1606         (-[WKContentView _scrollingNodeScrollingWillBegin]):
1607         (-[WKContentView _scrollingNodeScrollingDidEnd]):
1608         (-[WKContentView gestureRecognizer:canBePreventedByGestureRecognizer:]):
1609         (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
1610         (-[WKContentView _uiTextSelectionRects]):
1611         (-[WKContentView _singleTapCommited:]):
1612         (-[WKContentView _willStartScrollingOrZooming]):
1613         (-[WKContentView _didEndScrollingOrZooming]):
1614         (-[WKContentView _lookupForWebView:]):
1615         (-[WKContentView _shareForWebView:]):
1616         (-[WKContentView _addShortcutForWebView:]):
1617         (-[WKContentView _showDictionary:]):
1618         (selectionChangedWithGesture):
1619         (selectionChangedWithTouch):
1620         (-[WKContentView selectionInteractionAssistant]):
1621         (-[WKContentView _stopAssistingNode]):
1622         (-[WKContentView _updateChangedSelection:]):
1623         (-[WKContentView actionSheetAssistant:shareElementWithURL:rect:]):
1624         (-[WKContentView _restoreCalloutBarIfNeeded]):
1625         (-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
1626         (-[WKContentView webSelectionAssistant]): Deleted.
1627
1628 2018-10-26  Commit Queue  <commit-queue@webkit.org>
1629
1630         Unreviewed, rolling out r237458.
1631         https://bugs.webkit.org/show_bug.cgi?id=190973
1632
1633         broke internal iOS builds (Requested by zalan on #webkit).
1634
1635         Reverted changeset:
1636
1637         "Adopt -setOverrideRouteSharingPolicy:routingContextUID: SPI"
1638         https://bugs.webkit.org/show_bug.cgi?id=190951
1639         https://trac.webkit.org/changeset/237458
1640
1641 2018-10-26  Chris Dumez  <cdumez@apple.com>
1642
1643         [PSON] Only delay attaching drawingArea in case of process swap and drop DidCompletePageTransition IPC handshake
1644         https://bugs.webkit.org/show_bug.cgi?id=190971
1645
1646         Reviewed by Geoffrey Garen.
1647
1648         Only delay attaching drawingArea in case of process swap and drop DidCompletePageTransition IPC handshake.
1649
1650         Since r236257, the WebProcess would always delay attaching the drawing area when a new WebPage is created. The
1651         WebProcess would send a DidCompletePageTransition IPC to the UIProcess when the page transition is complete and
1652         the UIProcess would then send an IPC back to attach the drawing area.
1653
1654         In the new design, WebPageCreationParameters contains a flag indicating if the WebPage should delay attaching
1655         the drawing area or not. We only delay attaching in case of process swap and we've successfuly suspended the
1656         previous page. Then when WebPage::didCompletePageTransition(), we stop sending the DidCompletePageTransition
1657         IPC to the UIProcess and instead have the WebProcess attach the drawing area right away if we've delayed
1658         attaching until then.
1659
1660         * Shared/WebPageCreationParameters.cpp:
1661         (WebKit::WebPageCreationParameters::encode const):
1662         (WebKit::WebPageCreationParameters::decode):
1663         * Shared/WebPageCreationParameters.h:
1664         * UIProcess/DrawingAreaProxy.h:
1665         * UIProcess/WebPageProxy.cpp:
1666         (WebKit::WebPageProxy::suspendCurrentPageIfPossible):
1667         (WebKit::WebPageProxy::swapToWebProcess):
1668         (WebKit::WebPageProxy::finishAttachingToWebProcess):
1669         (WebKit::WebPageProxy::initializeWebPage):
1670         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
1671         * UIProcess/WebPageProxy.h:
1672         * UIProcess/WebPageProxy.messages.in:
1673         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
1674         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
1675         * WebProcess/WebPage/DrawingArea.messages.in:
1676         * WebProcess/WebPage/WebPage.cpp:
1677         (WebKit::m_shouldAttachDrawingAreaOnPageTransition):
1678         (WebKit::WebPage::reinitializeWebPage):
1679         (WebKit::WebPage::didCompletePageTransition):
1680         * WebProcess/WebPage/WebPage.h:
1681         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1682         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
1683
1684 2018-10-26  Chris Dumez  <cdumez@apple.com>
1685
1686         [PSON] Avoid tearing down the drawing area when suspending a WebPage due to process-swap
1687         https://bugs.webkit.org/show_bug.cgi?id=190879
1688
1689         Reviewed by Antti Koivisto.
1690
1691         Avoid tearing down the drawing area when suspending a WebPage due to process-swap. We really only need to reset
1692         the drawing area upon resuming the WebPage. There is no strict need to destroy the drawing area on suspension
1693         and this has caused various crashes because code usually assumes we always have a drawing area.
1694
1695         This patch also drops various drawing area null checks that were added to address PSON crashes.
1696
1697         * UIProcess/SuspendedPageProxy.cpp:
1698         (WebKit::SuspendedPageProxy::tearDownDrawingAreaInWebProcess): Deleted.
1699         * UIProcess/SuspendedPageProxy.h:
1700         * UIProcess/WebPageProxy.cpp:
1701         (WebKit::WebPageProxy::suspendCurrentPageIfPossible):
1702         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
1703         (WebKit::WebPageProxy::didCompletePageTransition):
1704         (WebKit::WebPageProxy::enterAcceleratedCompositingMode):
1705         * UIProcess/WebPageProxy.h:
1706         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1707         (WebKit::WebChromeClient::invalidateContentsAndRootView):
1708         (WebKit::WebChromeClient::invalidateContentsForSlowScroll):
1709         (WebKit::WebChromeClient::contentsSizeChanged const):
1710         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1711         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
1712         * WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.mm:
1713         (WebKit::RemoteScrollingCoordinator::scheduleTreeStateCommit):
1714         * WebProcess/WebPage/WebPage.cpp:
1715         (WebKit::WebPage::reinitializeWebPage):
1716         (WebKit::WebPage::exitAcceleratedCompositingMode):
1717         (WebKit::WebPage::setIsSuspended):
1718         (WebKit::WebPage::tearDownDrawingAreaForSuspend): Deleted.
1719         * WebProcess/WebPage/WebPage.h:
1720         * WebProcess/WebPage/WebPage.messages.in:
1721
1722 2018-10-26  Antti Koivisto  <antti@apple.com>
1723
1724         Use random() instead of begin() to limit cache sizes
1725         https://bugs.webkit.org/show_bug.cgi?id=190957
1726
1727         Reviewed by Chris Dumez.
1728
1729         * UIProcess/WebProcessPool.cpp:
1730         (WebKit::WebProcessPool::didCollectPrewarmInformation):
1731
1732 2018-10-26  Chris Dumez  <cdumez@apple.com>
1733
1734         Modernize / Simplify IPC::Connection::sendOutgoingMessage()
1735         https://bugs.webkit.org/show_bug.cgi?id=190931
1736
1737         Reviewed by Alex Christensen.
1738
1739         * Platform/IPC/mac/ConnectionMac.mm:
1740         (IPC::Connection::sendOutgoingMessage):
1741
1742 2018-10-26  Jer Noble  <jer.noble@apple.com>
1743
1744         Adopt -setOverrideRouteSharingPolicy:routingContextUID: SPI
1745         https://bugs.webkit.org/show_bug.cgi?id=190951
1746         <rdar://problem/45213065>
1747
1748         Reviewed by Alex Christensen.
1749
1750         Add an asyncronous reply request to VideoFullscreenManager.
1751
1752         Drive-by fix: messages.py generates "WTFMove(*arg1, *arg2)" instead of "WTFMove(*arg1), WTFMove(*arg2)"
1753         in its reply handler generation.
1754
1755         * Platform/IPC/MessageSender.h:
1756         (IPC::MessageSender::sendWithAsyncReply):
1757         * Scripts/webkit/messages.py:
1758         * UIProcess/Cocoa/VideoFullscreenManagerProxy.h:
1759         * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
1760         (WebKit::VideoFullscreenModelContext::requestRouteSharingPolicyAndContextUID):
1761         * WebProcess/cocoa/VideoFullscreenManager.h:
1762         * WebProcess/cocoa/VideoFullscreenManager.messages.in:
1763         * WebProcess/cocoa/VideoFullscreenManager.mm:
1764         (WebKit::VideoFullscreenManager::requestRouteSharingPolicyAndContextUID):
1765
1766 2018-10-25  Michael Catanzaro  <mcatanzaro@igalia.com>
1767
1768         Unreviewed, another try at fixing the GTK build with sandbox enabled
1769
1770         * UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
1771         (WebKit::memfd_create): Deleted.
1772
1773 2018-10-25  Antoine Quint  <graouts@apple.com>
1774
1775         [Web Animations] Turn Web Animations CSS Integration off by default
1776         https://bugs.webkit.org/show_bug.cgi?id=190901
1777
1778         Reviewed by Dean Jackson.
1779
1780         * Shared/WebPreferences.yaml:
1781
1782 2018-10-25  Michael Catanzaro  <mcatanzaro@igalia.com>
1783
1784         Unreviewed, try to fix GTK build with sandbox enabled
1785
1786         * UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
1787
1788 2018-10-25  Claudio Saavedra  <csaavedra@igalia.com>
1789
1790         [WPE][GTK] Follow-up fixes to the certificate coders
1791         https://bugs.webkit.org/show_bug.cgi?id=190900
1792
1793         Reviewed by Michael Catanzaro.
1794
1795         Cleanup the GRefPtr mess I created earlier. Also we now bail out
1796         if any certificate in the chain has no data instead of returning a
1797         cropped chain.
1798
1799         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
1800         (IPC::ArgumentCoder<CertificateInfo>::encode):
1801         (IPC::ArgumentCoder<CertificateInfo>::decode):
1802
1803 2018-10-25  Zan Dobersek  <zdobersek@igalia.com>
1804
1805         [GTK][AC] Resizing the window doesn't always update the visible rect
1806         https://bugs.webkit.org/show_bug.cgi?id=189743
1807
1808         Reviewed by Michael Catanzaro.
1809
1810         Disassociate resizing that can be done on an AcceleratedSurface object
1811         between "host resizes" and "client resizes".
1812
1813         The former is done from ThreadedCoordinatedLayerTreeHost directly, and
1814         is currently used only for GTK on X11, where a new pixmap object is
1815         created on each resize, which affects the context ID that is based on
1816         that pixmap object's address.
1817
1818         The latter is done from the composition thread. It's used for GTK on
1819         Wayland and WPE. In both cases, the underlying window object does not
1820         change on each resize, but it's necessary to perform the actual resize
1821         on the composition thread.
1822
1823         So far it hasn't been performed there, which ended up pushing sizes of
1824         the WebKit view and the underlying window object out of sync during
1825         resizing, leaving parts of window unrendered.
1826
1827         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
1828         (WebKit::ThreadedCompositor::renderLayerTree):
1829         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
1830         * WebProcess/WebPage/AcceleratedSurface.cpp:
1831         (WebKit::AcceleratedSurface::hostResize):
1832         (WebKit::AcceleratedSurface::resize): Deleted.
1833         * WebProcess/WebPage/AcceleratedSurface.h:
1834         (WebKit::AcceleratedSurface::clientResize):
1835         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
1836         (WebKit::ThreadedCoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
1837         (WebKit::ThreadedCoordinatedLayerTreeHost::sizeDidChange):
1838         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
1839         * WebProcess/WebPage/gtk/AcceleratedSurfaceWayland.cpp:
1840         (WebKit::AcceleratedSurfaceWayland::clientResize):
1841         (WebKit::AcceleratedSurfaceWayland::resize): Deleted.
1842         * WebProcess/WebPage/gtk/AcceleratedSurfaceWayland.h:
1843         * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.cpp:
1844         (WebKit::AcceleratedSurfaceX11::hostResize):
1845         (WebKit::AcceleratedSurfaceX11::resize): Deleted.
1846         * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.h:
1847         * WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.cpp:
1848         (WebKit::AcceleratedSurfaceWPE::clientResize):
1849         (WebKit::AcceleratedSurfaceWPE::resize): Deleted.
1850         * WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.h:
1851
1852 2018-10-24  Alexey Proskuryakov  <ap@apple.com>
1853
1854         Clean up some obsolete macOS version guards
1855         https://bugs.webkit.org/show_bug.cgi?id=190887
1856
1857         Reviewed by Dan Bernstein.
1858
1859         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
1860         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1861         (WebKit::WebProcessPool::platformInitializeWebProcess):
1862
1863 2018-10-24  Megan Gardner  <megan_gardner@apple.com>
1864
1865         Turn on Conic Gradients
1866         https://bugs.webkit.org/show_bug.cgi?id=190810
1867
1868         Reviewed by Tim Horton.
1869
1870         Remove conic gradients from experimental features and turn it on always.
1871
1872         * Configurations/FeatureDefines.xcconfig:
1873         * Shared/WebPreferences.yaml:
1874
1875 2018-10-24  Said Abou-Hallawa  <sabouhallawa@apple.com>
1876
1877         Cleanup: MIMETypeRegistry functions
1878         https://bugs.webkit.org/show_bug.cgi?id=190838
1879
1880         Reviewed by Simon Fraser.
1881
1882         * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:
1883         (-[WKWebViewContentProviderRegistry initWithConfiguration:]):
1884
1885 2018-10-24  Chris Dumez  <cdumez@apple.com>
1886
1887         REGRESSION (r237257): [iOS] Crashes in com.apple.WebKit: WebKit::RemoteScrollingCoordinator::scheduleTreeStateCommit
1888         https://bugs.webkit.org/show_bug.cgi?id=190804
1889
1890         Reviewed by Alex Christensen.
1891
1892         Fix null-dereference of the drawing area in RemoteScrollingCoordinator::scheduleTreeStateCommit.
1893         With process-swap-on-navigation enabled, suspended pages' drawing area gets torn down.
1894
1895         * WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.mm:
1896         (WebKit::RemoteScrollingCoordinator::scheduleTreeStateCommit):
1897
1898 2018-10-24  Claudio Saavedra  <csaavedra@igalia.com>
1899
1900         [WPE][GTK] Cleanups to the certificate decoder
1901         https://bugs.webkit.org/show_bug.cgi?id=190867
1902
1903         Reviewed by Žan Doberšek.
1904
1905         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
1906         (IPC::ArgumentCoder<CertificateInfo>::decode):
1907
1908 2018-10-24  Claudio Saavedra  <csaavedra@igalia.com>
1909
1910         [WPE][GTK] Cleanups to the certificate encoder
1911         https://bugs.webkit.org/show_bug.cgi?id=190865
1912
1913         Reviewed by Žan Doberšek.
1914
1915         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
1916         (IPC::ArgumentCoder<CertificateInfo>::encode):
1917
1918 2018-10-23  Ryan Haddad  <ryanhaddad@apple.com>
1919
1920         Unreviewed, rolling out r237261.
1921
1922         The layout test for this change crashes under GuardMalloc.
1923
1924         Reverted changeset:
1925
1926         "Handle MDNS resolution of candidates through libwebrtc
1927         directly"
1928         https://bugs.webkit.org/show_bug.cgi?id=190681
1929         https://trac.webkit.org/changeset/237261
1930
1931 2018-10-23  David Kilzer  <ddkilzer@apple.com>
1932
1933         Fix false positive leaks when using custom -init methods that don't start with -init
1934         <https://webkit.org/b/190818>
1935         <rdar://problem/45476042>
1936
1937         Reviewed by Dan Bernstein.
1938
1939         * UIProcess/Cocoa/WKWebViewContentProvider.h:
1940         (-[WKWebViewContentProvider web_initWithFrame:webView:mimeType:]):
1941         Add attribute to make this behave like an -init method.
1942
1943 2018-10-23  Chris Dumez  <cdumez@apple.com>
1944
1945         [PSON] Add support for cross-site client-side redirects
1946         https://bugs.webkit.org/show_bug.cgi?id=190806
1947         <rdar://problem/45047344>
1948
1949         Reviewed by Geoffrey Garen.
1950
1951         * Shared/LoadParameters.cpp:
1952         (WebKit::LoadParameters::encode const):
1953         (WebKit::LoadParameters::decode):
1954         * Shared/LoadParameters.h:
1955         * Shared/NavigationActionData.cpp:
1956         (WebKit::NavigationActionData::encode const):
1957         (WebKit::NavigationActionData::decode):
1958         * Shared/NavigationActionData.h:
1959         * Shared/WebBackForwardListItem.cpp:
1960         (WebKit::WebBackForwardListItem::setSuspendedPage):
1961         * UIProcess/API/APINavigation.h:
1962         (API::Navigation::setLockHistory):
1963         (API::Navigation::lockHistory const):
1964         (API::Navigation::setLockBackForwardList):
1965         (API::Navigation::lockBackForwardList const):
1966         (API::Navigation::setClientRedirectSourceForHistory):
1967         (API::Navigation::clientRedirectSourceForHistory const):
1968         * UIProcess/API/APINavigationClient.h:
1969         (API::NavigationClient::willPerformClientRedirect):
1970         (API::NavigationClient::didPerformClientRedirect):
1971         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
1972         * UIProcess/Cocoa/NavigationState.h:
1973         * UIProcess/Cocoa/NavigationState.mm:
1974         (WebKit::NavigationState::setNavigationDelegate):
1975         (WebKit::NavigationState::NavigationClient::didPerformClientRedirect):
1976         * UIProcess/FrameLoadState.h:
1977         (WebKit::FrameLoadState::setURL):
1978         * UIProcess/WebPageProxy.cpp:
1979         (WebKit::WebPageProxy::loadRequestWithNavigation):
1980         (WebKit::WebPageProxy::continueNavigationInNewProcess):
1981         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1982         (WebKit::WebPageProxy::didPerformClientRedirect):
1983         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1984         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1985         * WebProcess/WebPage/WebPage.cpp:
1986         (WebKit::WebPage::loadRequest):
1987         (WebKit::WebPage::setCurrentHistoryItemForReattach):
1988         * WebProcess/WebPage/WebPage.h:
1989         * WebProcess/WebPage/WebPage.messages.in:
1990
1991 2018-10-23  Claudio Saavedra  <csaavedra@igalia.com>
1992
1993         [WPE][GTK] Pass full certificate chain in CertificateInfo coder
1994         https://bugs.webkit.org/show_bug.cgi?id=190789
1995
1996         Reviewed by Michael Catanzaro.
1997
1998         When the network process serializes certificate data to other
1999         processes through the argument coders, the certificate chain, if
2000         present, is lost. In practice this means that applications using
2001         the public API to process certificate info have no details on the
2002         certificate chain, other than the very basics included in the
2003         certificate. Serialize the entire chain if available in the
2004         certificate.
2005
2006         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
2007         (IPC::ArgumentCoder<CertificateInfo>::encode): Encode the
2008         certificate chain if present.
2009         (IPC::ArgumentCoder<CertificateInfo>::decode): Decode the
2010         entire certificate chain and rebuild it.
2011
2012 2018-10-22  Keith Rollin  <krollin@apple.com>
2013
2014         Use Location = "Relative to Build Products" rather than "Relative to Group"
2015         https://bugs.webkit.org/show_bug.cgi?id=190781
2016
2017         Reviewed by Alexey Proskuryakov.
2018
2019         Almost all Derived Files are included in Xcode projects with the
2020         Location attribute set to "Relative to Group". While this currently
2021         works, the Derived Files can no longer be found when enabling XCBuild
2022         (which has stricter requirements). Fix this by setting the Location
2023         attribute to "Relative to Build Products".
2024
2025         * WebKit.xcodeproj/project.pbxproj:
2026
2027 2018-10-22  Tim Horton  <timothy_horton@apple.com>
2028
2029         Don't waste time under -setupInteraction under -initWithFrame for unparented WKWebViews
2030         https://bugs.webkit.org/show_bug.cgi?id=190801
2031         <rdar://problem/43674361>
2032
2033         Reviewed by Megan Gardner.
2034
2035         * UIProcess/ios/WKContentView.mm:
2036         (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
2037         (-[WKContentView didMoveToWindow]):
2038         Defer the first call to WKContentViewInteraction's -setupInteraction
2039         until the view is parented. This avoids a few milliseconds of unnecessary
2040         work for views that are never parented.
2041
2042         * UIProcess/ios/WKContentViewInteraction.h:
2043         * UIProcess/ios/WKContentViewInteraction.mm:
2044         (-[WKContentView setupInteraction]):
2045         (-[WKContentView cleanupInteraction]):
2046         Keep track of the current state of WKContentViewInteraction's gestures.
2047         Use this to make it OK to call -setupInteraction multiple times.
2048
2049 2018-10-22  Chris Dumez  <cdumez@apple.com>
2050
2051         Deque's contains() and findIf() should be const
2052         https://bugs.webkit.org/show_bug.cgi?id=190796
2053
2054         Reviewed by Antti Koivisto.
2055
2056         Mark method as const now that Deque's implementation allows it to be.
2057
2058         * UIProcess/WebProcessPool.cpp:
2059         (WebKit::WebProcessPool::hasSuspendedPageProxyFor const):
2060         (WebKit::WebProcessPool::hasSuspendedPageProxyFor): Deleted.
2061         * UIProcess/WebProcessPool.h:
2062
2063 2018-10-19  Brent Fulgham  <bfulgham@apple.com>
2064
2065         Allow WebContent process to check some file system features
2066         https://bugs.webkit.org/show_bug.cgi?id=190768
2067         <rdar://problem/45377609>
2068
2069         Reviewed by Alexey Proskuryakov.
2070
2071         This patch unblocks some IOKit properties that are needed by lower level frameworks to make decisions
2072         about how to efficiently use the file system.
2073
2074         * WebProcess/com.apple.WebProcess.sb.in:
2075
2076 2018-10-19  Stephan Szabo  <stephan.szabo@sony.com>
2077
2078         [WinCairo] Search terms are not saved for <input type="search">
2079         https://bugs.webkit.org/show_bug.cgi?id=188174
2080
2081         Reviewed by Fujii Hironori.
2082
2083         Add support for saving the search terms for <input
2084         type="search"> to a SQLite database, replacing the
2085         CF-based implementation for Windows and adding support
2086         for non-legacy WebKit.
2087
2088         * UIProcess/win/WebPageProxyWin.cpp:
2089         (WebKit::WebPageProxy::saveRecentSearches): Use SQLite database
2090         implementation in WebCore::SearchPopupMenuDB to save search
2091         terms
2092         (WebKit::WebPageProxy::loadRecentSearches): Use SQLite database
2093         implementation in WebCore::SearchPopupMenuDB to load search
2094         terms
2095
2096 2018-10-19  Alex Christensen  <achristensen@webkit.org>
2097
2098         WebDataListSuggestionsDropdown should use a WeakPtr
2099         https://bugs.webkit.org/show_bug.cgi?id=190763
2100         <rdar://problem/45417449>
2101
2102         Reviewed by Tim Horton.
2103
2104         Nothing suspicious here. It's just good practice to not keep raw pointers that aren't reset when the object they point to are destroyed.
2105
2106         * UIProcess/WebDataListSuggestionsDropdown.cpp:
2107         (WebKit::WebDataListSuggestionsDropdown::WebDataListSuggestionsDropdown):
2108         (WebKit::WebDataListSuggestionsDropdown::close):
2109         * UIProcess/WebDataListSuggestionsDropdown.h:
2110         (WebKit::WebDataListSuggestionsDropdown::Client::~Client): Deleted.
2111         * UIProcess/WebPageProxy.h:
2112         * UIProcess/ios/WebDataListSuggestionsDropdownIOS.h:
2113         * UIProcess/ios/WebDataListSuggestionsDropdownIOS.mm:
2114         (WebKit::WebDataListSuggestionsDropdownIOS::create):
2115         (WebKit::WebDataListSuggestionsDropdownIOS::WebDataListSuggestionsDropdownIOS):
2116         (WebKit::WebDataListSuggestionsDropdownIOS::close):
2117         (WebKit::WebDataListSuggestionsDropdownIOS::didSelectOption):
2118         * UIProcess/mac/WebDataListSuggestionsDropdownMac.h:
2119         * UIProcess/mac/WebDataListSuggestionsDropdownMac.mm:
2120         (WebKit::WebDataListSuggestionsDropdownMac::create):
2121         (WebKit::WebDataListSuggestionsDropdownMac::WebDataListSuggestionsDropdownMac):
2122         (WebKit::WebDataListSuggestionsDropdownMac::didSelectOption):
2123         (WebKit::WebDataListSuggestionsDropdownMac::selectOption):
2124
2125 2018-10-19  Wenson Hsieh  <wenson_hsieh@apple.com>
2126
2127         [iOS] [Datalist] Can't pick datalist suggestions in a stock WKWebView
2128         https://bugs.webkit.org/show_bug.cgi?id=190621
2129         <rdar://problem/45310649>
2130
2131         Reviewed by Tim Horton.
2132
2133         Fixes the bug by refactoring datalist suggestion information on iOS; currently, we override text suggestions on
2134         _WKFormInputSession. This only works for a few internal clients (including Safari) that set a _WKInputDelegate
2135         and also implement either -_webView:willStartInputSession: or -_webView:didStartInputSession:, which is
2136         necessary in order to ensure that WebKit creates and maintains a form input session.
2137
2138         The two pieces of information that datalist code needs to vend to WKContentView are a list of UITextSuggestions
2139         and a custom input view, which are both currently properties of _WKFormInputSession. This patch lifts these out
2140         of the input session and makes them properties of WKContentView, which are used in
2141         WebDataListSuggestionsDropdownIOS.
2142
2143         Test: fast/forms/datalist/datalist-textinput-suggestions-order.html
2144
2145         * UIProcess/ios/WKContentViewInteraction.h:
2146         * UIProcess/ios/WKContentViewInteraction.mm:
2147
2148         Add new properties to WKContentView: an input view for datalist suggestions, and a list of text suggestions.
2149
2150         (-[WKFormInputSession setSuggestions:]):
2151         (-[WKContentView setupInteraction]):
2152         (-[WKContentView cleanupInteraction]):
2153         (-[WKContentView _endEditing]):
2154
2155         Pull out common logic when resigning first responder or tabbing to the next or previous text field into a new
2156         helper. This helper notifies `_inputPeripheral`, `_formInputSession`, and `_dataListTextSuggestionsInputView`
2157         when editing has ended; the input peripheral and suggestions input view use this chance to send the value of the
2158         form control to the web process.
2159
2160         (-[WKContentView resignFirstResponderForWebView]):
2161         (-[WKContentView inputView]):
2162
2163         If a custom input view is not set but we have an input view for a datalist's text suggestions, use the datalist
2164         input view.
2165
2166         (-[WKContentView accessoryTab:]):
2167         (-[WKContentView _stopAssistingNode]):
2168
2169         Clear datalist state on WKContentView.
2170
2171         (-[WKContentView dataListTextSuggestionsInputView]):
2172         (-[WKContentView dataListTextSuggestions]):
2173         (-[WKContentView setDataListTextSuggestionsInputView:]):
2174         (-[WKContentView setDataListTextSuggestions:]):
2175         (-[WKContentView updateTextSuggestionsForInputDelegate]):
2176
2177         Pull out logic for setting suggestions on UIKit's `inputDelegate` (i.e. UIKeyboardImpl). We now first consult
2178         internally-vended text suggestions from _WKFormInputSession; if an internal client has not overridden our text
2179         suggestions, then we simply use suggestions from the current datalist (if present).
2180
2181         * UIProcess/ios/WebDataListSuggestionsDropdownIOS.mm:
2182         (-[WKDataListSuggestionsPicker updateWithInformation:]):
2183         (-[WKDataListSuggestionsPicker showSuggestionsDropdown:activationType:]):
2184         (-[WKDataListSuggestionsPicker invalidate]):
2185         (-[WKDataListSuggestionsPopover updateWithInformation:]):
2186         (-[WKDataListSuggestionsPopover showSuggestionsDropdown:activationType:]):
2187         (-[WKDataListSuggestionsPopover didSelectOptionAtIndex:]):
2188
2189         Change all the places that currently manipulate WKContentView's form input session to directly set text
2190         suggestions and the text suggestion input view on the content view instead.
2191
2192 2018-10-19  John Wilander  <wilander@apple.com>
2193
2194         Only cap lifetime of persistent cookies created client-side through document.cookie when resource load statistics is enabled
2195         https://bugs.webkit.org/show_bug.cgi?id=190687
2196         <rdar://problem/45349024>
2197
2198         Reviewed by Alex Christensen.
2199
2200         This patch adds the following:
2201         - The WebProcessPool now tells the WebsiteDataStore when a network process has
2202             been created.
2203         - The WebsiteDataStore in turn tells the WebResourceLoadStatisticsStore when
2204             a network process has been created.
2205         - The WebResourceLoadStatisticsStore makes sure to update the network processes
2206             with its cookie policy when it's notified that a network process has been
2207             created.
2208
2209         In addition, this patch changes the following:
2210         - The ResourceLoadStatisticsMemoryStore no longer keeps track of which domains
2211             it has told the network process to block cookies for. The reason is that
2212             we cannot assume that there is only one network process so we should
2213             always send complete blocking data.
2214         - The ResourceLoadStatisticsMemoryStore's functions for communicating cookie
2215             blocking state to the network process no longer take and forward the
2216             "clear first" parameter. This is because complete data is sent every time
2217             and thus the network process' set is always cleared on an update.
2218         - Removes WebsiteDataStore::networkProcessDidCrash() and
2219             WebResourceLoadStatisticsStore::scheduleCookieBlockingStateReset() since
2220             the call site---WebProcessPool::ensureNetworkProcess()---now calls
2221             WebsiteDataStore::didCreateNetworkProcess() after a network process
2222             crash and the state sync for cookie blocking is triggered.
2223
2224         * NetworkProcess/NetworkProcess.cpp:
2225         (WebKit::NetworkProcess::updatePrevalentDomainsToBlockCookiesFor):
2226         (WebKit::NetworkProcess::setShouldCapLifetimeForClientSideCookies):
2227         * NetworkProcess/NetworkProcess.h:
2228         * NetworkProcess/NetworkProcess.messages.in:
2229         * UIProcess/Network/NetworkProcessProxy.cpp:
2230         (WebKit::NetworkProcessProxy::updatePrevalentDomainsToBlockCookiesFor):
2231         (WebKit::NetworkProcessProxy::setShouldCapLifetimeForClientSideCookies):
2232         (WebKit::NetworkProcessProxy::didSetShouldCapLifetimeForClientSideCookies):
2233         * UIProcess/Network/NetworkProcessProxy.h:
2234         * UIProcess/Network/NetworkProcessProxy.messages.in:
2235         * UIProcess/ResourceLoadStatisticsMemoryStore.cpp:
2236         (WebKit::ResourceLoadStatisticsMemoryStore::clear):
2237         (WebKit::ResourceLoadStatisticsMemoryStore::updateCookieBlocking):
2238         (WebKit::ResourceLoadStatisticsMemoryStore::updateCookieBlockingForDomains):
2239         (WebKit::ResourceLoadStatisticsMemoryStore::clearBlockingStateForDomains):
2240         (WebKit::ResourceLoadStatisticsMemoryStore::resetCookieBlockingState): Deleted.
2241         * UIProcess/ResourceLoadStatisticsMemoryStore.h:
2242         * UIProcess/WebProcessPool.cpp:
2243         (WebKit::WebProcessPool::ensureNetworkProcess):
2244         * UIProcess/WebResourceLoadStatisticsStore.cpp:
2245         (WebKit::WebResourceLoadStatisticsStore::didCreateNetworkProcess):
2246         (WebKit::WebResourceLoadStatisticsStore::scheduleCookieBlockingUpdateForDomains):
2247         (WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent):
2248         (WebKit::WebResourceLoadStatisticsStore::callUpdatePrevalentDomainsToBlockCookiesForHandler):
2249         (WebKit::WebResourceLoadStatisticsStore::scheduleCookieBlockingStateReset): Deleted.
2250         * UIProcess/WebResourceLoadStatisticsStore.h:
2251         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2252         (WebKit::WebsiteDataStore::updatePrevalentDomainsToBlockCookiesFor):
2253         (WebKit::WebsiteDataStore::setShouldCapLifetimeForClientSideCookies):
2254         (WebKit::WebsiteDataStore::didCreateNetworkProcess):
2255         (WebKit::WebsiteDataStore::networkProcessDidCrash): Deleted.
2256         * UIProcess/WebsiteData/WebsiteDataStore.h:
2257
2258 2018-10-19  Alex Christensen  <achristensen@webkit.org>
2259
2260         Rebase python tests.
2261
2262         * Scripts/webkit/messages_unittest.py:
2263
2264 2018-10-19  Alex Christensen  <achristensen@webkit.org>
2265
2266         Rebase python tests.
2267
2268         * Scripts/Makefile:
2269         * Scripts/webkit/MessageReceiver-expected.cpp:
2270         * Scripts/webkit/Messages-expected.h:
2271
2272 2018-10-19  Alex Christensen  <achristensen@webkit.org>
2273
2274         Mark LegacySync IPC messages
2275         https://bugs.webkit.org/show_bug.cgi?id=190759
2276
2277         Reviewed by Tim Horton.
2278
2279         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
2280         * NetworkProcess/NetworkProcess.messages.in:
2281         * NetworkProcess/ServiceWorker/WebSWServerConnection.messages.in:
2282         * Platform/IPC/HandleMessage.h:
2283         (IPC::handleMessageLegacySync):
2284         * PluginProcess/PluginControllerProxy.messages.in:
2285         * Scripts/webkit/messages.py:
2286         * Shared/Plugins/NPObjectMessageReceiver.messages.in:
2287         * UIProcess/ApplePay/WebPaymentCoordinatorProxy.messages.in:
2288         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
2289         * UIProcess/Plugins/PluginProcessProxy.messages.in:
2290         * UIProcess/WebFullScreenManagerProxy.messages.in:
2291         * UIProcess/WebPageProxy.messages.in:
2292         * UIProcess/WebPasteboardProxy.messages.in:
2293         * UIProcess/WebProcessPool.messages.in:
2294         * UIProcess/WebProcessProxy.messages.in:
2295         * UIProcess/WebStorage/StorageManager.messages.in:
2296         * UIProcess/mac/SecItemShimProxy.messages.in:
2297         * WebProcess/Plugins/PluginProcessConnection.messages.in:
2298         * WebProcess/Plugins/PluginProxy.messages.in:
2299         * WebProcess/WebPage/WebPage.messages.in:
2300         * WebProcess/WebProcess.messages.in:
2301
2302 2018-10-19  Alex Christensen  <achristensen@webkit.org>
2303
2304         Update and add python tests after r237294
2305         https://bugs.webkit.org/show_bug.cgi?id=190746
2306
2307         * Scripts/Makefile: Added to help updating expectations.
2308         * Scripts/webkit/LegacyMessageReceiver-expected.cpp:
2309         * Scripts/webkit/MessageReceiverSuperclass-expected.cpp:
2310         (Messages::WebPage::TestAsyncMessage::callReply):
2311         (Messages::WebPage::TestAsyncMessage::cancelReply):
2312         (Messages::WebPage::TestAsyncMessage::send):
2313         (WebKit::WebPage::didReceiveMessage):
2314         * Scripts/webkit/MessagesSuperclass-expected.h:
2315         (Messages::WebPage::TestAsyncMessage::receiverName):
2316         (Messages::WebPage::TestAsyncMessage::name):
2317         (Messages::WebPage::TestAsyncMessage::asyncMessageReplyName):
2318         (Messages::WebPage::TestAsyncMessage::TestAsyncMessage):
2319         (Messages::WebPage::TestAsyncMessage::arguments const):
2320         * Scripts/webkit/test-superclass-messages.in:
2321         Adding the extra newline made python tests fail.
2322         I also added more tests for the new functionality introduced in r237924.
2323
2324 2018-10-19  Alex Christensen  <achristensen@webkit.org>
2325
2326         Introduce CompletionHandler-based Async IPC messages with replies
2327         https://bugs.webkit.org/show_bug.cgi?id=190746
2328
2329         Reviewed by Tim Horton.
2330
2331         Before this patch, to make an asynchronous IPC message with a reply you had to find two objects that
2332         can talk to each other, make two new message types, send a generated identifier, keep track of that
2333         identifier, make a HashMap somewhere to store the object waiting for the response, and hook it all up.
2334         What a mess.  No wonder people take shortcuts and make strange design decisions.
2335
2336         Now, you can just use a CompletionHandler and mark the reply as Async in *.messages.in.
2337         I've adopted this with a message whose behavior is covered by the storage/indexeddb/modern/blob-cursor.html
2338         layout test and many others.  I intent to refine and further adopt this incrementally.
2339
2340         * NetworkProcess/NetworkProcess.cpp:
2341         (WebKit::NetworkProcess::getSandboxExtensionsForBlobFiles):
2342         (WebKit::NetworkProcess::didGetSandboxExtensionsForBlobFiles): Deleted.
2343         * NetworkProcess/NetworkProcess.h:
2344         * NetworkProcess/NetworkProcess.messages.in:
2345         This is representative of how code will be simplified with greater adoption. 
2346         * NetworkProcess/NetworkResourceLoadParameters.cpp:
2347         (WebKit::NetworkResourceLoadParameters::decode):
2348         Modernize HandleArray decoding.
2349         * Platform/IPC/Connection.cpp:
2350         (IPC::Connection::dispatchMessage):
2351         (IPC::nextAsyncReplyHandlerID):
2352         (IPC::asyncReplyHandlerMap):
2353         Handle async replies when looking at incoming messages from the sending process.
2354         * Platform/IPC/Connection.h:
2355         (IPC::Connection::sendWithAsyncReply):
2356         Send a message with an async reply and prepare the reply receiver.
2357         * Platform/IPC/Encoder.h:
2358         Make the uint64_t encoder public so we can use it when encoding the listenerID.
2359         * Platform/IPC/HandleMessage.h:
2360         (IPC::handleMessageAsync):
2361         Handle an asynchronous message with a reply from the receiving process.
2362         This is similar to how DelayedReply messages are handled, but the listenerID is automatically captured and sent back.
2363         * Scripts/webkit/messages.py:
2364         Generate code for async message replies.
2365         * Shared/Databases/IndexedDB/WebIDBResult.cpp:
2366         (WebKit::WebIDBResult::decode):
2367         * Shared/SandboxExtension.h:
2368         (WebKit::SandboxExtension::HandleArray::at):
2369         (WebKit::SandboxExtension::HandleArray::decode):
2370         * Shared/WebProcessCreationParameters.cpp:
2371         (WebKit::WebProcessCreationParameters::decode):
2372         * Shared/mac/SandboxExtensionMac.mm:
2373         (WebKit::SandboxExtension::HandleArray::decode):
2374         Modernize the decoding of HandleArray to work with generated decoding.
2375         * UIProcess/Network/NetworkProcessProxy.cpp:
2376         (WebKit::NetworkProcessProxy::getSandboxExtensionsForBlobFiles):
2377         * UIProcess/Network/NetworkProcessProxy.h:
2378         * UIProcess/Network/NetworkProcessProxy.messages.in:
2379         This is also representative of how code will be simplified with greater adoption.
2380         * WebProcess/MediaStream/MediaDeviceSandboxExtensions.cpp:
2381         (WebKit::MediaDeviceSandboxExtensions::decode):
2382         Modernize HandleArray decoding.
2383
2384 2018-10-19  Chris Dumez  <cdumez@apple.com>
2385
2386         [PSON] WebPageProxy::didCompletePageTransition() may interact with a SuspendedPageProxy from a previous navigation
2387         https://bugs.webkit.org/show_bug.cgi?id=190717
2388
2389         Reviewed by Antti Koivisto.
2390
2391         WebPageProxy::didCompletePageTransition() may interact with a SuspendedPageProxy from a previous navigation. We need
2392         to reset m_lastSuspendedPage whenever the page starts a new navigation as m_lastSuspendedPage is only updated when
2393         we process-swap otherwise.
2394
2395         Also rename the data member to m_pageSuspendedDueToCurrentNavigation for clarity.
2396
2397         In a follow-up, I will see if I can get rid of this data member entirely or maybe move it to the Navigation
2398         object.
2399
2400         * UIProcess/WebPageProxy.cpp:
2401         (WebKit::WebPageProxy::suspendCurrentPageIfPossible):
2402         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
2403         (WebKit::WebPageProxy::didCompletePageTransition):
2404         (WebKit::WebPageProxy::enterAcceleratedCompositingMode):
2405
2406 2018-10-18  Eric Carlson  <eric.carlson@apple.com>
2407
2408         [MediaStream] Allow ports to optionally do screen capture in the UI process
2409         https://bugs.webkit.org/show_bug.cgi?id=190728
2410         <rdar://problem/45376824>
2411
2412         Reviewed by Jer Noble and Tim Horton.
2413
2414         * Shared/WebProcessCreationParameters.cpp:
2415         (WebKit::WebProcessCreationParameters::encode const): Encode shouldCaptureDisplayInUIProcess.
2416         (WebKit::WebProcessCreationParameters::decode): Decode shouldCaptureDisplayInUIProcess.
2417         * Shared/WebProcessCreationParameters.h:
2418
2419         * UIProcess/API/APIProcessPoolConfiguration.cpp:
2420         (API::ProcessPoolConfiguration::copy): Copy shouldCaptureDisplayInUIProcess.
2421         * UIProcess/API/APIProcessPoolConfiguration.h:
2422
2423         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
2424         (WebKit::UserMediaCaptureManagerProxy::SourceProxy::remoteVideoSampleAvailable):
2425         (WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints): Remove
2426         RealtimeMediaSource::Type parameter, CaptureDevice has the same information. Deal with display
2427         capture "devices".
2428         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
2429         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
2430
2431         * UIProcess/WebProcessPool.cpp:
2432         (WebKit::WebProcessPool::initializeNewWebProcess): Copy shouldCaptureDisplayInUIProcess.
2433
2434         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
2435         (WebKit::UserMediaCaptureManager::Source::Source): Only allocate a ring buffer for Audio sources.
2436         (WebKit::UserMediaCaptureManager::Source::~Source): Same for deallocate.
2437         (WebKit::UserMediaCaptureManager::Source::storage): m_ringBuffer is a pointer.
2438         (WebKit::UserMediaCaptureManager::Source::setStorage): Ditto.
2439         (WebKit::UserMediaCaptureManager::Source::setRingBufferFrameBounds): Ditto.
2440         (WebKit::UserMediaCaptureManager::Source::audioSamplesAvailable): Ditto.
2441         (WebKit::UserMediaCaptureManager::Source::remoteVideoSampleAvailable): Create a 
2442         PixelBuffer-backed media sample and call videoSampleAvailable.
2443         (WebKit::UserMediaCaptureManager::~UserMediaCaptureManager): Clear the audio and display capture
2444         factory overrides.
2445         (WebKit::UserMediaCaptureManager::initialize): Set the audio and display capture factory overrides.
2446         (WebKit::UserMediaCaptureManager::createCaptureSource):
2447         (WebKit::UserMediaCaptureManager::remoteVideoSampleAvailable):
2448         * WebProcess/cocoa/UserMediaCaptureManager.h:
2449         * WebProcess/cocoa/UserMediaCaptureManager.messages.in:
2450
2451 2018-10-18  Truitt Savell  <tsavell@apple.com>
2452
2453         Unreviewed, rolling out r237272.
2454
2455         Broke on device iOS builds and Windows builds
2456
2457         Reverted changeset:
2458
2459         "[MediaStream] Allow ports to optionally do screen capture in
2460         the UI process"
2461         https://bugs.webkit.org/show_bug.cgi?id=190728
2462         https://trac.webkit.org/changeset/237272
2463
2464 2018-10-18  Jer Noble  <jer.noble@apple.com>
2465
2466         Enable WKPreferences._lowPowerVideoAudioBufferSizeEnabled by default
2467         https://bugs.webkit.org/show_bug.cgi?id=190315
2468
2469         Reviewed by Eric Carlson.
2470
2471         This preference is disabled for WebKitLegacy because it can interact poorly with clients' own use of audio.
2472         It can be enabled for WebKit since it will only affect the WebProcess and not the client process.
2473
2474         * Shared/WebPreferences.yaml:
2475
2476 2018-10-18  Eric Carlson  <eric.carlson@apple.com>
2477
2478         [MediaStream] Allow ports to optionally do screen capture in the UI process
2479         https://bugs.webkit.org/show_bug.cgi?id=190728
2480         <rdar://problem/45376824>
2481
2482         Reviewed by Jer Noble and Tim Horton.
2483
2484         * Shared/WebProcessCreationParameters.cpp:
2485         (WebKit::WebProcessCreationParameters::encode const): Encode shouldCaptureDisplayInUIProcess.
2486         (WebKit::WebProcessCreationParameters::decode): Decode shouldCaptureDisplayInUIProcess.
2487         * Shared/WebProcessCreationParameters.h:
2488
2489         * UIProcess/API/APIProcessPoolConfiguration.cpp:
2490         (API::ProcessPoolConfiguration::copy): Copy shouldCaptureDisplayInUIProcess.
2491         * UIProcess/API/APIProcessPoolConfiguration.h:
2492
2493         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
2494         (WebKit::UserMediaCaptureManagerProxy::SourceProxy::remoteVideoSampleAvailable):
2495         (WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints): Remove
2496         RealtimeMediaSource::Type parameter, CaptureDevice has the same information. Deal with display
2497         capture "devices".
2498         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
2499         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
2500
2501         * UIProcess/WebProcessPool.cpp:
2502         (WebKit::WebProcessPool::initializeNewWebProcess): Copy shouldCaptureDisplayInUIProcess.
2503
2504         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
2505         (WebKit::UserMediaCaptureManager::Source::Source): Only allocate a ring buffer for Audio sources.
2506         (WebKit::UserMediaCaptureManager::Source::~Source): Same for deallocate.
2507         (WebKit::UserMediaCaptureManager::Source::storage): m_ringBuffer is a pointer.
2508         (WebKit::UserMediaCaptureManager::Source::setStorage): Ditto.
2509         (WebKit::UserMediaCaptureManager::Source::setRingBufferFrameBounds): Ditto.
2510         (WebKit::UserMediaCaptureManager::Source::audioSamplesAvailable): Ditto.
2511         (WebKit::UserMediaCaptureManager::Source::remoteVideoSampleAvailable): Create a 
2512         PixelBuffer-backed media sample and call videoSampleAvailable.
2513         (WebKit::UserMediaCaptureManager::~UserMediaCaptureManager): Clear the audio and display capture
2514         factory overrides.
2515         (WebKit::UserMediaCaptureManager::initialize): Set the audio and display capture factory overrides.
2516         (WebKit::UserMediaCaptureManager::createCaptureSource):
2517         (WebKit::UserMediaCaptureManager::remoteVideoSampleAvailable):
2518         * WebProcess/cocoa/UserMediaCaptureManager.h:
2519         * WebProcess/cocoa/UserMediaCaptureManager.messages.in:
2520
2521 2018-10-18  Chris Dumez  <cdumez@apple.com>
2522
2523         [PSON] SuspendedPages do not report meaningful domains in Activity Monitor
2524         https://bugs.webkit.org/show_bug.cgi?id=190721
2525         <rdar://problem/45059699>
2526
2527         Reviewed by Alex Christensen.
2528
2529         SuspendedPages do not report meaningful domains in Activity Monitor, which makes
2530         debugging harder.
2531
2532         * WebProcess/cocoa/WebProcessCocoa.mm:
2533         (WebKit::origin):
2534         (WebKit::WebProcess::updateActivePages):
2535
2536 2018-10-18  Alexey Proskuryakov  <ap@apple.com>
2537
2538         Switch from PLATFORM(IOS) to PLATFORM(IOS_FAMILY)
2539         https://bugs.webkit.org/show_bug.cgi?id=190729
2540
2541         Reviewed by Tim Horton.
2542
2543         * DerivedSources.make:
2544         * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
2545         (WebKit::Download::resume):
2546         * NetworkProcess/NetworkActivityTracker.h:
2547         * NetworkProcess/NetworkProcess.h:
2548         * NetworkProcess/NetworkProcessCreationParameters.cpp:
2549         (WebKit::NetworkProcessCreationParameters::encode const):
2550         (WebKit::NetworkProcessCreationParameters::decode):
2551         * NetworkProcess/NetworkProcessCreationParameters.h:
2552         * NetworkProcess/cache/NetworkCacheFileSystem.cpp:
2553         (WebKit::NetworkCache::isSafeToUseMemoryMapForPath):
2554         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
2555         (WebKit::updateTaskWithFirstPartyForSameSiteCookies):
2556         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2557         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
2558         (WebKit::NetworkProcess::sourceApplicationAuditData const):
2559         (WebKit::NetworkProcess::platformSyncAllCookies):
2560         * NetworkProcess/cocoa/NetworkSessionCocoa.h:
2561         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2562         (-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):
2563         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
2564         * NetworkProcess/ios/NetworkProcessIOS.mm:
2565         * Platform/IPC/mac/ConnectionMac.mm:
2566         (IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog):
2567         (IPC::Connection::receiveSourceEventHandler):
2568         (IPC::AccessibilityProcessSuspendedNotification):
2569         * Platform/ios/AccessibilityIOS.mm:
2570         * Platform/mac/LayerHostingContext.mm:
2571         (WebKit::LayerHostingContext::createForExternalHostingProcess):
2572         * Platform/spi/Cocoa/DeviceIdentitySPI.h:
2573         * Platform/spi/ios/CelestialSPI.h:
2574         * Platform/spi/ios/FrontBoardServicesSPI.h:
2575         * PluginProcess/mac/PluginProcessShim.mm:
2576         * Shared/API/Cocoa/WKDataDetectorTypesInternal.h:
2577         * Shared/API/Cocoa/WebKit.m:
2578         * Shared/AssistedNodeInformation.cpp:
2579         * Shared/AssistedNodeInformation.h:
2580         * Shared/CacheModel.cpp:
2581         (WebKit::calculateURLCacheSizes):
2582         * Shared/ChildProcess.cpp:
2583         * Shared/Cocoa/APIObject.mm:
2584         (API::Object::newObject):
2585         * Shared/Cocoa/WebKit2InitializeCocoa.mm:
2586         (WebKit::runInitializationCode):
2587         * Shared/DrawingAreaInfo.h:
2588         * Shared/EditorState.cpp:
2589         (WebKit::EditorState::encode const):
2590         (WebKit::EditorState::decode):
2591         (WebKit::EditorState::PostLayoutData::encode const):
2592         (WebKit::EditorState::PostLayoutData::decode):
2593         (WebKit::operator<<):
2594         * Shared/EditorState.h:
2595         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
2596         (WebKit::XPCServiceInitializerDelegate::checkEntitlements):
2597         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
2598         (WebKit::XPCServiceMain):
2599         * Shared/NativeWebKeyboardEvent.h:
2600         * Shared/NativeWebMouseEvent.h:
2601         * Shared/NativeWebTouchEvent.h:
2602         * Shared/PrintInfo.cpp:
2603         (WebKit::PrintInfo::encode const):
2604         (WebKit::PrintInfo::decode):
2605         * Shared/PrintInfo.h:
2606         * Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.h:
2607         * Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
2608         (WebKit::RemoteLayerTreePropertyApplier::applyProperties):
2609         * Shared/SessionState.cpp:
2610         (WebKit::FrameState::encode const):
2611         (WebKit::FrameState::decode):
2612         * Shared/SessionState.h:
2613         * Shared/WebCoreArgumentCoders.cpp:
2614         * Shared/WebCoreArgumentCoders.h:
2615         * Shared/WebEvent.h:
2616         * Shared/WebEventConversion.cpp:
2617         (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
2618         * Shared/WebKeyboardEvent.cpp:
2619         * Shared/WebPageCreationParameters.cpp:
2620         (WebKit::WebPageCreationParameters::encode const):
2621         (WebKit::WebPageCreationParameters::decode):
2622         * Shared/WebPageCreationParameters.h:
2623         * Shared/WebPlatformTouchPoint.cpp:
2624         * Shared/WebPreferences.yaml:
2625         * Shared/WebPreferencesDefaultValues.cpp:
2626         (defaultPassiveTouchListenersAsDefaultOnDocument):
2627         (defaultCustomPasteboardDataEnabled):
2628         * Shared/WebPreferencesDefaultValues.h:
2629         * Shared/WebProcessCreationParameters.cpp:
2630         (WebKit::WebProcessCreationParameters::encode const):
2631         (WebKit::WebProcessCreationParameters::decode):
2632         * Shared/WebProcessCreationParameters.h:
2633         * Shared/WebTouchEvent.cpp:
2634         * Shared/cf/ArgumentCodersCF.cpp:
2635         (IPC::encode):
2636         (IPC::decode):
2637         * Shared/cf/ArgumentCodersCF.h:
2638         * Shared/ios/ChildProcessIOS.mm:
2639         * Shared/ios/InteractionInformationAtPosition.h:
2640         * Shared/ios/InteractionInformationAtPosition.mm:
2641         * Shared/ios/InteractionInformationRequest.cpp:
2642         * Shared/ios/InteractionInformationRequest.h:
2643         * Shared/ios/NativeWebKeyboardEventIOS.mm:
2644         * Shared/ios/NativeWebMouseEventIOS.mm:
2645         * Shared/ios/NativeWebTouchEventIOS.mm:
2646         * Shared/ios/WebIOSEventFactory.h:
2647         * Shared/ios/WebIOSEventFactory.mm:
2648         * Shared/ios/WebIconUtilities.h:
2649         * Shared/ios/WebIconUtilities.mm:
2650         * Shared/mac/ArgumentCodersMac.h:
2651         * Shared/mac/ArgumentCodersMac.mm:
2652         * Shared/mac/SandboxExtensionMac.mm:
2653         * Shared/mac/SecItemShim.cpp:
2654         (WebKit::initializeSecItemShim):
2655         * UIProcess/API/APIPageConfiguration.cpp:
2656         (API::PageConfiguration::copy const):
2657         * UIProcess/API/APIPageConfiguration.h:
2658         * UIProcess/API/APIProcessPoolConfiguration.cpp:
2659         (API::ProcessPoolConfiguration::copy):
2660         * UIProcess/API/APIProcessPoolConfiguration.h:
2661         * UIProcess/API/APIUIClient.h:
2662         * UIProcess/API/C/WKInspector.cpp:
2663         * UIProcess/API/C/WKPage.cpp:
2664         (WKPageSetIgnoresViewportScaleLimits):
2665         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
2666         (WKContextIsPlugInUpdateAvailable):
2667         * UIProcess/API/Cocoa/APIAttachmentCocoa.mm:
2668         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
2669         (API::WebsiteDataStore::defaultApplicationCacheDirectory):
2670         (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory):
2671         (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory):
2672         * UIProcess/API/Cocoa/WKNavigationAction.mm:
2673         (-[WKNavigationAction description]):
2674         * UIProcess/API/Cocoa/WKPreviewActionItemIdentifiers.mm:
2675         * UIProcess/API/Cocoa/WKPreviewElementInfo.mm:
2676         * UIProcess/API/Cocoa/WKProcessGroup.mm:
2677         (IGNORE_WARNINGS_BEGIN):
2678         * UIProcess/API/Cocoa/WKProcessPool.mm:
2679         (-[WKProcessPool _pluginProcessCount]):
2680         * UIProcess/API/Cocoa/WKWebView.mm:
2681         (shouldRequireUserGestureToLoadVideo):
2682         (validate):
2683         (-[WKWebView _initializeWithConfiguration:]):
2684         (-[WKWebView _setUpSQLiteDatabaseTrackerClient]):
2685         (-[WKWebView dealloc]):
2686         (-[WKWebView allowsLinkPreview]):
2687         (-[WKWebView setAllowsLinkPreview:]):
2688         (-[WKWebView _countStringMatches:options:maxCount:]):
2689         (-[WKWebView _findString:options:maxCount:]):
2690         (-[WKWebView _hideFindUI]):
2691         (-[WKWebView _scrollPerformanceData]):
2692         (-[WKWebView _allowsMediaDocumentInlinePlayback]):
2693         (-[WKWebView _setAllowsMediaDocumentInlinePlayback:]):
2694         (-[WKWebView _contentsOfUserInterfaceItem:]):
2695         (-[WKWebView _internalDoAfterNextPresentationUpdate:withoutWaitingForPainting:withoutWaitingForAnimatedResize:]):
2696         (-[WKWebView _doAfterNextVisibleContentRectUpdate:]):
2697         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2698         (-[WKWebViewConfiguration init]):
2699         (-[WKWebViewConfiguration encodeWithCoder:]):
2700         (-[WKWebViewConfiguration initWithCoder:]):
2701         (-[WKWebViewConfiguration copyWithZone:]):
2702         (defaultApplicationNameForUserAgent):
2703         * UIProcess/API/Cocoa/WKWebViewConfigurationInternal.h:
2704         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2705         * UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
2706         (-[_WKActivatedElementInfo _initWithType:URL:location:title:ID:rect:image:userInfo:]):
2707         * UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h:
2708         * UIProcess/API/Cocoa/_WKAttachment.mm:
2709         * UIProcess/API/Cocoa/_WKContextMenuElementInfo.mm:
2710         * UIProcess/API/Cocoa/_WKElementAction.mm:
2711         * UIProcess/API/Cocoa/_WKElementActionInternal.h:
2712         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
2713         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h:
2714         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
2715         (-[WKPaymentAuthorizationViewControllerDelegate invalidate]):
2716         (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didAuthorizePayment:handler:]):
2717         (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectPaymentMethod:handler:]):
2718         (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingMethod:handler:]):
2719         (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingContact:handler:]):
2720         (WebKit::WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard):
2721         (WebKit::toPKPaymentRequest):
2722         (WebKit::WebPaymentCoordinatorProxy::platformCompletePaymentSession):
2723         (WebKit::WebPaymentCoordinatorProxy::platformCompleteShippingMethodSelection):
2724         (WebKit::WebPaymentCoordinatorProxy::platformCompleteShippingContactSelection):
2725         (WebKit::WebPaymentCoordinatorProxy::platformCompletePaymentMethodSelection):
2726         * UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm:
2727         * UIProcess/ApplicationStateTracker.h:
2728         * UIProcess/ApplicationStateTracker.mm:
2729         * UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm:
2730         * UIProcess/Automation/ios/WebAutomationSessionIOS.mm:
2731         * UIProcess/BackgroundProcessResponsivenessTimer.cpp:
2732         (WebKit::BackgroundProcessResponsivenessTimer::shouldBeActive const):
2733         * UIProcess/ChildProcessProxy.cpp:
2734         (WebKit::ChildProcessProxy::shutDownProcess):
2735         * UIProcess/Cocoa/DownloadClient.h:
2736         * UIProcess/Cocoa/DownloadClient.mm:
2737         (WebKit::DownloadClient::takeActivityToken):
2738         (WebKit::DownloadClient::releaseActivityTokenIfNecessary):
2739         * UIProcess/Cocoa/LayerRepresentation.h:
2740         * UIProcess/Cocoa/NavigationState.h:
2741         * UIProcess/Cocoa/NavigationState.mm:
2742         (WebKit::NavigationState::NavigationState):
2743         (WebKit::NavigationState::didChangeIsLoading):
2744         * UIProcess/Cocoa/PlaybackSessionManagerProxy.h:
2745         * UIProcess/Cocoa/PlaybackSessionManagerProxy.messages.in:
2746         * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm:
2747         * UIProcess/Cocoa/UIDelegate.h:
2748         * UIProcess/Cocoa/UIDelegate.mm:
2749         (WebKit::UIDelegate::setDelegate):
2750         (WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest):
2751         * UIProcess/Cocoa/VersionChecks.h:
2752         * UIProcess/Cocoa/VersionChecks.mm:
2753         (WebKit::linkedOnOrAfter):
2754         * UIProcess/Cocoa/VideoFullscreenManagerProxy.h:
2755         * UIProcess/Cocoa/VideoFullscreenManagerProxy.messages.in:
2756         * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
2757         (WebKit::VideoFullscreenManagerProxy::setupFullscreenWithID):
2758         (WebKit::VideoFullscreenManagerProxy::exitFullscreen):
2759         (WebKit::VideoFullscreenManagerProxy::preparedToReturnToInline):
2760         (WebKit::VideoFullscreenManagerProxy::setVideoLayerFrame):
2761         * UIProcess/Cocoa/ViewGestureController.h:
2762         * UIProcess/Cocoa/WKShareSheet.mm:
2763         (-[WKShareSheet presentWithParameters:completionHandler:]):
2764         * UIProcess/Cocoa/WKWebViewContentProvider.h:
2765         * UIProcess/Cocoa/WKWebViewContentProviderRegistry.h:
2766         * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:
2767         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
2768         * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
2769         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2770         (WebKit::WebProcessPool::platformResolvePathsForSandboxExtensions):
2771         (WebKit::WebProcessPool::platformInitializeWebProcess):
2772         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
2773         (WebKit::WebProcessPool::registerNotificationObservers):
2774         (WebKit::WebProcessPool::unregisterNotificationObservers):
2775         * UIProcess/Gamepad/cocoa/UIGamepadProviderCocoa.mm:
2776         (WebKit::UIGamepadProvider::platformSetDefaultGamepadProvider):
2777         * UIProcess/Gamepad/ios/UIGamepadProviderIOS.mm:
2778         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2779         (WebKit::shouldLeakBoost):
2780         (WebKit::systemDirectoryPath):
2781         (WebKit::ProcessLauncher::launchProcess):
2782         * UIProcess/Network/NetworkProcessProxy.cpp:
2783         (WebKit::NetworkProcessProxy::didFinishLaunching):
2784         * UIProcess/PageClient.h:
2785         * UIProcess/ProcessAssertion.cpp:
2786         * UIProcess/ProcessAssertion.h:
2787         * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
2788         * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
2789         (WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
2790         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
2791         (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation const):
2792         (WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
2793         (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
2794         (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateActivityState):
2795         * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
2796         (WebKit::RemoteLayerTreeHost::clearLayers):
2797         (WebKit::RemoteLayerTreeHost::detachRootLayer):
2798         * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
2799         (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll):
2800         * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
2801         * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:
2802         (WebKit::RemoteScrollingTree::createScrollingTreeNode):
2803         * UIProcess/RemoteLayerTree/RemoteScrollingTree.h:
2804         * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
2805         * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
2806         * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
2807         * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
2808         * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h:
2809         * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
2810         * UIProcess/ResourceLoadStatisticsPersistentStorage.cpp:
2811         * UIProcess/WKImagePreviewViewController.h:
2812         * UIProcess/WKImagePreviewViewController.mm:
2813         * UIProcess/WKInspectorHighlightView.h:
2814         * UIProcess/WKInspectorHighlightView.mm:
2815         * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
2816         (WebKit::LocalAuthenticatorInternal::buildAuthData):
2817         (WebKit::LocalAuthenticator::makeCredential):
2818         (WebKit::LocalAuthenticator::continueMakeCredentialAfterUserConsented):
2819         (WebKit::LocalAuthenticator::continueMakeCredentialAfterAttested):
2820         (WebKit::LocalAuthenticator::getAssertion):
2821         (WebKit::LocalAuthenticator::continueGetAssertionAfterUserConsented):
2822         * UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:
2823         (WebKit::LocalConnection::getUserConsent const):
2824         (WebKit::LocalConnection::getAttestation const):
2825         * UIProcess/WebAuthentication/Cocoa/LocalService.mm:
2826         (WebKit::LocalService::isAvailable):
2827         * UIProcess/WebFullScreenManagerProxy.cpp:
2828         (WebKit::WebFullScreenManagerProxy::supportsFullScreen):
2829         * UIProcess/WebGeolocationManagerProxy.cpp:
2830         * UIProcess/WebGeolocationManagerProxy.h:
2831         * UIProcess/WebInspectorProxy.cpp:
2832         * UIProcess/WebOpenPanelResultListenerProxy.cpp:
2833         * UIProcess/WebOpenPanelResultListenerProxy.h:
2834         * UIProcess/WebPageProxy.cpp:
2835         (WebKit::m_resetRecentCrashCountTimer):
2836         (WebKit::WebPageProxy::finishAttachingToWebProcess):
2837         (WebKit::WebPageProxy::initializeWebPage):
2838         (WebKit::WebPageProxy::close):
2839         (WebKit::WebPageProxy::viewDidLeaveWindow):
2840         (WebKit::WebPageProxy::updateThrottleState):
2841         (WebKit::WebPageProxy::waitForDidUpdateActivityState):
2842         (WebKit::WebPageProxy::didCommitLoadForFrame):
2843         (WebKit::WebPageProxy::exitFullscreenImmediately):
2844         (WebKit::WebPageProxy::runJavaScriptAlert):
2845         (WebKit::WebPageProxy::runJavaScriptConfirm):
2846         (WebKit::WebPageProxy::runJavaScriptPrompt):
2847         (WebKit::WebPageProxy::pageDidScroll):
2848         (WebKit::WebPageProxy::processDidTerminate):
2849         (WebKit::WebPageProxy::resetState):
2850         (WebKit::WebPageProxy::resetStateAfterProcessExited):
2851         (WebKit::WebPageProxy::creationParameters):
2852         (WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
2853         (WebKit::WebPageProxy::hasActiveVideoForControlsManager const):
2854         (WebKit::WebPageProxy::requestControlledElementID const):
2855         (WebKit::WebPageProxy::isPlayingVideoInEnhancedFullscreen const):
2856         * UIProcess/WebPageProxy.h:
2857         * UIProcess/WebPageProxy.messages.in:
2858         * UIProcess/WebPasteboardProxy.h:
2859         * UIProcess/WebPasteboardProxy.messages.in:
2860         * UIProcess/WebProcessPool.cpp:
2861         (WebKit::WebProcessPool::ensureNetworkProcess):
2862         (WebKit::WebProcessPool::initializeNewWebProcess):
2863         (WebKit::WebProcessPool::updateProcessAssertions):
2864         (WebKit::WebProcessPool::reinstateNetworkProcessAssertionState):
2865         * UIProcess/WebProcessPool.h:
2866         * UIProcess/WebProcessProxy.cpp:
2867         (WebKit::isMainThreadOrCheckDisabled):
2868         (WebKit::WebProcessProxy::didFinishLaunching):
2869         (WebKit::WebProcessProxy::didSetAssertionState):
2870         * UIProcess/WebProcessProxy.h:
2871         * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp:
2872         (WebKit::LocalStorageDatabaseTracker::databasePath const):
2873         * UIProcess/WebStorage/LocalStorageDatabaseTracker.h:
2874         * UIProcess/WebStorage/ios/LocalStorageDatabaseTrackerIOS.mm:
2875         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
2876         * UIProcess/_WKWebViewPrintFormatter.mm:
2877         * UIProcess/_WKWebViewPrintFormatterInternal.h:
2878         * UIProcess/ios/DragDropInteractionState.h:
2879         * UIProcess/ios/DragDropInteractionState.mm:
2880         * UIProcess/ios/InputViewUpdateDeferrer.h:
2881         * UIProcess/ios/InputViewUpdateDeferrer.mm:
2882         * UIProcess/ios/LayerRepresentation.mm:
2883         * UIProcess/ios/PageClientImplIOS.h:
2884         * UIProcess/ios/PageClientImplIOS.mm:
2885         * UIProcess/ios/ProcessAssertionIOS.mm:
2886         * UIProcess/ios/ResourceLoadStatisticsPersistentStorageIOS.mm:
2887         * UIProcess/ios/SmartMagnificationController.h:
2888         * UIProcess/ios/SmartMagnificationController.messages.in:
2889         * UIProcess/ios/SmartMagnificationController.mm:
2890         * UIProcess/ios/TextCheckerIOS.mm:
2891         * UIProcess/ios/ViewGestureControllerIOS.mm:
2892         * UIProcess/ios/WKActionSheet.h:
2893         * UIProcess/ios/WKActionSheet.mm:
2894         * UIProcess/ios/WKActionSheetAssistant.h:
2895         * UIProcess/ios/WKActionSheetAssistant.mm:
2896         * UIProcess/ios/WKApplicationStateTrackingView.h:
2897         * UIProcess/ios/WKApplicationStateTrackingView.mm:
2898         * UIProcess/ios/WKContentView.mm:
2899         * UIProcess/ios/WKContentViewInteraction.h:
2900         * UIProcess/ios/WKContentViewInteraction.mm:
2901         * UIProcess/ios/WKGeolocationProviderIOS.h:
2902         * UIProcess/ios/WKGeolocationProviderIOS.mm:
2903         * UIProcess/ios/WKGeolocationProviderIOSObjCSecurityOrigin.mm:
2904         * UIProcess/ios/WKInspectorNodeSearchGestureRecognizer.h:
2905         * UIProcess/ios/WKInspectorNodeSearchGestureRecognizer.mm:
2906         * UIProcess/ios/WKKeyboardScrollingAnimator.h:
2907         * UIProcess/ios/WKKeyboardScrollingAnimator.mm:
2908         * UIProcess/ios/WKPDFPageNumberIndicator.h:
2909         * UIProcess/ios/WKPDFPageNumberIndicator.mm:
2910         * UIProcess/ios/WKPasswordView.h:
2911         * UIProcess/ios/WKPasswordView.mm:
2912         * UIProcess/ios/WKScrollView.h:
2913         * UIProcess/ios/WKScrollView.mm:
2914         * UIProcess/ios/WKSyntheticClickTapGestureRecognizer.h:
2915         * UIProcess/ios/WKSyntheticClickTapGestureRecognizer.m:
2916         * UIProcess/ios/WKWebEvent.h:
2917         * UIProcess/ios/WKWebEvent.mm:
2918         * UIProcess/ios/WebDataListSuggestionsDropdownIOS.h:
2919         * UIProcess/ios/WebDataListSuggestionsDropdownIOS.mm:
2920         * UIProcess/ios/WebPageProxyIOS.mm:
2921         * UIProcess/ios/WebProcessProxyIOS.mm:
2922         * UIProcess/ios/forms/WKAirPlayRoutePicker.h:
2923         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
2924         * UIProcess/ios/forms/WKFileUploadPanel.h:
2925         * UIProcess/ios/forms/WKFileUploadPanel.mm:
2926         * UIProcess/ios/forms/WKFormColorControl.h:
2927         * UIProcess/ios/forms/WKFormColorControl.mm:
2928         * UIProcess/ios/forms/WKFormColorPicker.h:
2929         * UIProcess/ios/forms/WKFormColorPicker.mm:
2930         * UIProcess/ios/forms/WKFormInputControl.h:
2931         * UIProcess/ios/forms/WKFormInputControl.mm:
2932         * UIProcess/ios/forms/WKFormPopover.h:
2933         * UIProcess/ios/forms/WKFormPopover.mm:
2934         * UIProcess/ios/forms/WKFormSelectControl.h:
2935         * UIProcess/ios/forms/WKFormSelectControl.mm:
2936         * UIProcess/ios/forms/WKFormSelectPicker.h:
2937         * UIProcess/ios/forms/WKFormSelectPicker.mm:
2938         * UIProcess/ios/forms/WKFormSelectPopover.h:
2939         * UIProcess/ios/forms/WKFormSelectPopover.mm:
2940         * UIProcess/ios/fullscreen/FullscreenTouchSecheuristic.cpp:
2941         * UIProcess/ios/fullscreen/FullscreenTouchSecheuristic.h:
2942         * UIProcess/ios/fullscreen/WKFullScreenViewController.h:
2943         * UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
2944         * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.h:
2945         * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
2946         * UIProcess/ios/fullscreen/WKFullscreenStackView.h:
2947         * UIProcess/ios/fullscreen/WKFullscreenStackView.mm:
2948         * UIProcess/mac/LegacySessionStateCoding.cpp:
2949         (WebKit::encodeFrameStateNode):
2950         (WebKit::decodeBackForwardTreeNode):
2951         * UIProcess/mac/PageClientImplMac.h:
2952         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
2953         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
2954         * UIProcess/mac/ViewSnapshotStore.mm:
2955         * UIProcess/mac/WKFullScreenWindowController.mm:
2956         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
2957         (WebContentServiceInitializer):
2958         * WebProcess/FullScreen/WebFullScreenManager.cpp:
2959         (WebKit::WebFullScreenManager::videoControlsManagerDidChange):
2960         (WebKit::WebFullScreenManager::willEnterFullScreen):
2961         (WebKit::WebFullScreenManager::didEnterFullScreen):
2962         (WebKit::WebFullScreenManager::willExitFullScreen):
2963         * WebProcess/Geolocation/WebGeolocationManager.cpp:
2964         * WebProcess/Geolocation/WebGeolocationManager.h:
2965         * WebProcess/Geolocation/WebGeolocationManager.messages.in:
2966         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
2967         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2968         * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm:
2969         * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
2970         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2971         (-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]):
2972         * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
2973         (WebKit::toFrameState):
2974         (WebKit::applyFrameState):
2975         * WebProcess/WebCoreSupport/WebAlternativeTextClient.h:
2976         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2977         (WebKit::WebChromeClient::windowRect):
2978         (WebKit::WebChromeClient::enterVideoFullscreenForVideoElement):
2979         * WebProcess/WebCoreSupport/WebChromeClient.h:
2980         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2981         * WebProcess/WebCoreSupport/WebEditorClient.h:
2982         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2983         (WebKit::WebFrameLoaderClient::dispatchDidLayout):
2984         (WebKit::WebFrameLoaderClient::saveViewStateToItem):
2985         (WebKit::WebFrameLoaderClient::restoreViewState):
2986         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
2987         (WebKit::WebFrameLoaderClient::objectContentType):
2988         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2989         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2990         (WebKit::WebInspectorClient::highlight):
2991         (WebKit::WebInspectorClient::hideHighlight):
2992         * WebProcess/WebCoreSupport/WebInspectorClient.h:
2993         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2994         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2995         * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
2996         * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
2997         * WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
2998         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
2999         * WebProcess/WebPage/DrawingArea.cpp:
3000         (WebKit::DrawingArea::create):
3001         * WebProcess/WebPage/DrawingArea.h:
3002         * WebProcess/WebPage/FindController.cpp:
3003         (WebKit::FindController::findString):
3004         * WebProcess/WebPage/FindController.h:
3005         * WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm:
3006         (WebKit::PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
3007         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
3008         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
3009         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
3010         (WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect):
3011         * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
3012         (WebKit::ViewGestureGeometryCollector::dispatchDidCollectGeometryForSmartMagnificationGesture):
3013         (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
3014         (WebKit::ViewGestureGeometryCollector::mainFrameDidLayout):
3015         * WebProcess/WebPage/ViewGestureGeometryCollector.h:
3016         * WebProcess/WebPage/ViewGestureGeometryCollector.messages.in:
3017         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
3018         * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.h:
3019         * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
3020         * WebProcess/WebPage/WebFrame.h:
3021         * WebProcess/WebPage/WebOpenPanelResultListener.cpp:
3022         * WebProcess/WebPage/WebOpenPanelResultListener.h:
3023         * WebProcess/WebPage/WebPage.cpp:
3024         (WebKit::m_cpuLimit):
3025         (WebKit::WebPage::~WebPage):
3026         (WebKit::WebPage::scalePage):
3027         (WebKit::WebPage::setUseFixedLayout):
3028         (WebKit::WebPage::disabledAdaptationsDidChange):
3029         (WebKit::WebPage::viewportPropertiesDidChange):
3030         (WebKit::WebPage::pageDidScroll):
3031         (WebKit::WebPage::mouseEvent):
3032         (WebKit::WebPage::updatePreferences):
3033         (WebKit::WebPage::willCommitLayerTree):
3034         (WebKit::WebPage::didFlushLayerTreeAtTime):
3035         (WebKit::WebPage::mainFrameDidLayout):
3036         (WebKit::WebPage::resetAssistedNodeForFrame):
3037         (WebKit::WebPage::elementDidFocus):
3038         (WebKit::WebPage::elementDidBlur):
3039         (WebKit::WebPage::willReplaceMultipartContent):
3040         (WebKit::WebPage::didReplaceMultipartContent):
3041         (WebKit::WebPage::didCommitLoad):
3042         * WebProcess/WebPage/WebPage.h:
3043         * WebProcess/WebPage/WebPage.messages.in:
3044         * WebProcess/WebPage/ios/FindControllerIOS.mm:
3045         * WebProcess/WebPage/ios/WebPageIOS.mm:
3046         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
3047         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3048         (WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect):
3049         * WebProcess/WebPage/mac/WebPageMac.mm:
3050         * WebProcess/WebProcess.cpp:
3051         (WebKit::WebProcess::WebProcess):
3052         (WebKit::WebProcess::initializeConnection):
3053         (WebKit::WebProcess::initializeWebProcess):
3054         (WebKit::WebProcess::actualPrepareToSuspend):
3055         (WebKit::WebProcess::cancelPrepareToSuspend):
3056         (WebKit::WebProcess::processDidResume):
3057         * WebProcess/WebProcess.h:
3058         * WebProcess/cocoa/PlaybackSessionManager.h:
3059         * WebProcess/cocoa/PlaybackSessionManager.messages.in:
3060         * WebProcess/cocoa/PlaybackSessionManager.mm:
3061         * WebProcess/cocoa/VideoFullscreenManager.h:
3062         * WebProcess/cocoa/VideoFullscreenManager.messages.in:
3063         * WebProcess/cocoa/VideoFullscreenManager.mm:
3064         (WebKit::VideoFullscreenManager::supportsVideoFullscreen const):
3065         (WebKit::VideoFullscreenManager::supportsVideoFullscreenStandby const):
3066         (WebKit::VideoFullscreenManager::didSetupFullscreen):
3067         (WebKit::VideoFullscreenManager::didExitFullscreen):
3068         * WebProcess/cocoa/WebProcessCocoa.mm:
3069         (WebKit::WebProcess::platformInitializeWebProcess):
3070         (WebKit::WebProcess::initializeProcessName):
3071         (WebKit::registerWithAccessibility):
3072         (WebKit::WebProcess::sourceApplicationAuditData const):
3073         (WebKit::WebProcess::initializeSandbox):
3074         * WebProcess/mac/SecItemShimLibrary.mm:
3075         * config.h:
3076
3077 2018-10-18  Alex Christensen  <achristensen@webkit.org>
3078
3079         Clean up FrameLoader two-state enums
3080         https://bugs.webkit.org/show_bug.cgi?id=190731
3081
3082         Reviewed by Chris Dumez.
3083
3084         * NetworkProcess/NetworkProcess.h:
3085         * NetworkProcess/NetworkProcess.messages.in:
3086         * Shared/WebCoreArgumentCoders.h:
3087         * UIProcess/WebPageProxy.cpp:
3088         (WebKit::WebPageProxy::willPerformClientRedirectForFrame):
3089         * UIProcess/WebPageProxy.h:
3090         * UIProcess/WebPageProxy.messages.in:
3091         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3092         (WebKit::WebFrameLoaderClient::dispatchWillPerformClientRedirect):
3093         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3094
3095 2018-10-18  Youenn Fablet  <youenn@apple.com>
3096
3097         Handle MDNS resolution of candidates through libwebrtc directly
3098         https://bugs.webkit.org/show_bug.cgi?id=190681
3099
3100         Reviewed by Eric Carlson.
3101
3102         Add support for AsyncResolver to resolve MDNS.
3103         This basically reuse the code path used to resolve STUN server addresses.
3104         Removed MDNS specific resolution.
3105         Use existing CFHost resolution mechanism to do the actual resolution.
3106
3107         * NetworkProcess/webrtc/NetworkMDNSRegister.cpp:
3108         (WebKit::NetworkMDNSRegister::registerMDNSName):
3109         * NetworkProcess/webrtc/NetworkMDNSRegister.messages.in:
3110         * WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
3111         (WebKit::LibWebRTCProvider::createPeerConnection):
3112         * WebProcess/Network/webrtc/LibWebRTCProvider.h:
3113         * WebProcess/Network/webrtc/LibWebRTCSocketFactory.h:
3114         * WebProcess/Network/webrtc/WebMDNSRegister.cpp:
3115         * WebProcess/Network/webrtc/WebMDNSRegister.h:
3116         * WebProcess/Network/webrtc/WebMDNSRegister.messages.in:
3117
3118 2018-10-18  Chris Dumez  <cdumez@apple.com>
3119
3120         [PSON] Cap number of SuspendedPageProxy objects and allow a WebPageProxy to have more than one
3121         https://bugs.webkit.org/show_bug.cgi?id=190688
3122         <rdar://problem/45354095>
3123
3124         Reviewed by Antti Koivisto.
3125
3126         Cap number of SuspendedPageProxy objects to 3 to avoid accumulating too many "suspended" processes.
3127
3128         Also allow a WebPageProxy to have more than one SuspendedPageProxy so that PageCache now works for
3129         more than 1 history navigation (up to 3 with the suspended page limit in this patch).
3130
3131         The following cleanup / refactoring was made to support this:
3132         - The SuspendedPageProxy objects are now owned by the WebProcessPool instead of the WebPageProxy.
3133           The WebProcessPool is in charge of limiting the number of SuspendedPageProxy objects by dropping
3134           the oldest one whenever a WebPageProxy tries to add a new one and we've already reached the limit.
3135         - WebProcessProxy no longer needs to know anything about suspended pages, which simplifies the
3136           code quite a bit. Instead, the SuspendedPageProxy objects now register themselves as
3137           IPC::MessageReceivers with their WebProcessProxy. The SuspendedPageProxy also take care of
3138           calling maybeShutdown() on their WebProcessProxy when they get destroyed.
3139
3140         * UIProcess/SuspendedPageProxy.cpp:
3141         (WebKit::SuspendedPageProxy::~SuspendedPageProxy):
3142         (WebKit::SuspendedPageProxy::tearDownDrawingAreaInWebProcess):
3143         (WebKit::SuspendedPageProxy::unsuspend):
3144         (WebKit::SuspendedPageProxy::didFinishLoad):
3145         (WebKit::SuspendedPageProxy::didReceiveSyncMessage):
3146         * UIProcess/SuspendedPageProxy.h:
3147         * UIProcess/WebPageProxy.cpp:
3148         (WebKit::WebPageProxy::suspendCurrentPageIfPossible):
3149         (WebKit::WebPageProxy::swapToWebProcess):
3150         (WebKit::WebPageProxy::close):
3151         (WebKit::WebPageProxy::continueNavigationInNewProcess):
3152         (WebKit::WebPageProxy::didCompletePageTransition):
3153         (WebKit::WebPageProxy::enterAcceleratedCompositingMode):
3154         * UIProcess/WebPageProxy.h:
3155         * UIProcess/WebProcessPool.cpp:
3156         (WebKit::WebProcessPool::disconnectProcess):
3157         (WebKit::WebProcessPool::processForNavigationInternal):
3158         (WebKit::WebProcessPool::addSuspendedPageProxy):
3159         (WebKit::WebProcessPool::removeAllSuspendedPageProxiesForPage):
3160         (WebKit::WebProcessPool::takeSuspendedPageProxy):
3161         (WebKit::WebProcessPool::hasSuspendedPageProxyFor):
3162         * UIProcess/WebProcessPool.h:
3163         * UIProcess/WebProcessProxy.cpp:
3164         (WebKit::WebProcessProxy::didReceiveMessage):
3165         (WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch):
3166         (WebKit::WebProcessProxy::canTerminateChildProcess):
3167         (WebKit::WebProcessProxy::requestTermination):
3168         * UIProcess/WebProcessProxy.h:
3169
3170 2018-10-17  Wenson Hsieh  <wenson_hsieh@apple.com>
3171
3172         Enable the datalist element by default on iOS and macOS
3173         https://bugs.webkit.org/show_bug.cgi?id=190594
3174         <rdar://problem/45281159>
3175
3176         Reviewed by Ryosuke Niwa and Tim Horton.
3177
3178         * Configurations/FeatureDefines.xcconfig:
3179         * Platform/spi/ios/UIKitSPI.h:
3180
3181         Add SPI to UITextSuggestion.
3182
3183         * Shared/WebPreferences.yaml:
3184         * Shared/WebPreferencesDefaultValues.h:
3185         * UIProcess/mac/WebDataListSuggestionsDropdownMac.mm:
3186         (-[WKDataListSuggestionCell setText:]):
3187         (-[WKDataListSuggestionTable initWithElementRect:]):
3188
3189         Fix the 32-bit macOS build with ENABLE(DATALIST_ELEMENT).
3190
3191 2018-10-17  Andy Estes  <aestes@apple.com>
3192
3193         [Apple Pay] Increment the API version to 5
3194         https://bugs.webkit.org/show_bug.cgi?id=190686
3195         <rdar://problem/45348523>
3196
3197         Reviewed by Simon Fraser.
3198
3199         * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
3200         (WebKit::WebPaymentCoordinator::supportsVersion):
3201
3202 2018-10-17  Alex Christensen  <achristensen@webkit.org>
3203
3204         BackForwardClient needs to be able to support UIProcess-only back/forward lists
3205         https://bugs.webkit.org/show_bug.cgi?id=190675
3206
3207         Reviewed by Chris Dumez.
3208
3209         * UIProcess/WebBackForwardList.cpp:
3210         (WebKit::WebBackForwardList::itemAtIndex const):
3211         (WebKit::WebBackForwardList::backListCount const):
3212         (WebKit::WebBackForwardList::forwardListCount const):
3213         * UIProcess/WebBackForwardList.h:
3214         * UIProcess/WebPageProxy.cpp:
3215         (WebKit::WebPageProxy::backForwardBackListCount):
3216         (WebKit::WebPageProxy::backForwardForwardListCount):
3217         * UIProcess/WebPageProxy.h:
3218         * UIProcess/WebPageProxy.messages.in:
3219         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
3220         (WebKit::WebBackForwardListProxy::itemAtIndex):
3221         (WebKit::WebBackForwardListProxy::backListCount const):
3222         (WebKit::WebBackForwardListProxy::forwardListCount const):
3223         * WebProcess/WebPage/WebBackForwardListProxy.h:
3224         * WebProcess/WebPage/WebPage.cpp:
3225         (WebKit::WebPage::dumpHistoryForTesting):
3226
3227 2018-10-17  Ali Juma  <ajuma@chromium.org>
3228
3229         Flaky IntersectionObserver web platform tests involving style updates
3230         https://bugs.webkit.org/show_bug.cgi?id=189091
3231
3232         Reviewed by Simon Fraser.
3233
3234         Add a WebPage::willDisplayPage bottleneck that gets called when flushing layers
3235         or, in the non-composited case, when rendering the page into a bitmap.
3236
3237         * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
3238         (WebKit::AcceleratedDrawingArea::updateBackingStoreState):
3239         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
3240         (WebKit::CoordinatedLayerTreeHost::layerFlushTimerFired):
3241         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3242         (WebKit::DrawingAreaImpl::display):
3243         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
3244         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
3245         * WebProcess/WebPage/WebPage.cpp:
3246         (WebKit::WebPage::willDisplayPage):
3247         * WebProcess/WebPage/WebPage.h:
3248         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3249         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
3250
3251 2018-10-16  Patrick Griffis  <pgriffis@igalia.com>
3252
3253         [GTK][WPE] Fix xdg-desktop-portal permissions from a sandbox
3254         https://bugs.webkit.org/show_bug.cgi?id=190619
3255
3256         Reviewed by Michael Catanzaro.
3257
3258         We have to generate a /.flatpak-info file for xdg-desktop-portal
3259         to properly treat us as a sandboxed application.
3260
3261         * UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
3262         (WebKit::createSealedMemFdWithData):
3263         (WebKit::argsToFd):
3264         (WebKit::XDGDBusProxyLauncher::setPermissions):
3265         (WebKit::createFlatpakInfo):
3266         (WebKit::bubblewrapSpawn):
3267
3268 2018-10-16  Sihui Liu  <sihui_liu@apple.com>
3269
3270         Add a switch for Web SQL
3271         https://bugs.webkit.org/show_bug.cgi?id=190271
3272
3273         Reviewed by Ryosuke Niwa.
3274
3275         * Shared/WebPreferences.yaml:
3276         * UIProcess/API/C/WKPreferences.cpp:
3277         (WKPreferencesSetWebSQLDisabled):
3278         (WKPreferencesGetWebSQLDisabled):
3279         * UIProcess/API/C/WKPreferencesRef.h:
3280
3281 2018-10-16  Alex Christensen  <achristensen@webkit.org>
3282
3283         Remove InjectedBundleBackForwardList
3284         https://bugs.webkit.org/show_bug.cgi?id=190640
3285
3286         Reviewed by Chris Dumez.
3287
3288         These objects are only used in testing now, so I made a replacement to be used for testing,
3289         WKBundlePageDumpHistoryForTesting and WKBundleClearHistoryForTesting.
3290         The existence of these objects is problematic with process swapping and the true back/forward list being in the UIProcess.
3291
3292         * Sources.txt:
3293         * WebProcess/InjectedBundle/API/c/WKBundleBackForwardList.cpp:
3294         (WKBundleBackForwardListGetTypeID):
3295         (WKBundleBackForwardListCopyItemAtIndex):
3296         (WKBundleBackForwardListGetBackListCount):
3297         (WKBundleBackForwardListGetForwardListCount):
3298         (WKBundleBackForwardListClear):
3299         * WebProcess/InjectedBundle/API/c/WKBundleBackForwardList.h:
3300         * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
3301         (WKBundleBackForwardListItemGetTypeID):
3302         (WKBundleBackForwardListItemIsSame):
3303         (WKBundleBackForwardListItemCopyURL):
3304         (WKBundleBackForwardListItemCopyTarget):
3305         (WKBundleBackForwardListItemIsTargetItem):
3306         (WKBundleBackForwardListItemCopyChildren):
3307         * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.h:
3308         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3309         (WKBundlePageDumpHistoryForTesting):
3310         (WKBundleClearHistoryForTesting):
3311         (WKBundlePageGetBackForwardList):
3312         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3313         * WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp: Removed.
3314         * WebProcess/InjectedBundle/InjectedBundleBackForwardList.h: Removed.
3315         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp: Removed.
3316         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h: Removed.
3317         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
3318         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3319         * WebProcess/WebPage/WebPage.cpp:
3320         (WebKit::WebPage::~WebPage):
3321         (WebKit::dumpHistoryItem):
3322         (WebKit::WebPage::dumpHistoryForTesting):
3323         (WebKit::WebPage::clearHistory):
3324         (WebKit::WebPage::didReceiveSyncMessage):
3325         (WebKit::WebPage::backForwardList): Deleted.
3326         * WebProcess/WebPage/WebPage.h:
3327
3328 2018-10-16  Timothy Hatcher  <timothy@apple.com>
3329
3330         Add <meta name="supported-color-schemes"> to control what color schemes the page supports
3331         https://bugs.webkit.org/show_bug.cgi?id=190526
3332         rdar://problem/45230140
3333
3334         Reviewed by Dean Jackson.
3335
3336         * UIProcess/mac/WKPrintingView.mm:
3337         (-[WKPrintingView drawRect:]): Update use of LocalDefaultSystemAppearance.
3338         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
3339         (WebKit::InjectedBundleRangeHandle::renderedImage): Ditto.
3340         * WebProcess/Plugins/PDF/PDFPlugin.mm:
3341         (WebKit::PDFPlugin::paintControlForLayerInContext): Ditto.
3342         * WebProcess/WebPage/WebPage.cpp:
3343         (WebKit::WebPage::drawRect): Ditto.
3344
3345 2018-10-16  Justin Michaud  <justin_michaud@apple.com>
3346
3347         Implement feature flag and bindings for CSS Painting API
3348         https://bugs.webkit.org/show_bug.cgi?id=190237
3349
3350         Reviewed by Ryosuke Niwa.
3351
3352         * Configurations/FeatureDefines.xcconfig:
3353         * Shared/WebPreferences.yaml:
3354         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3355         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
3356
3357 2018-10-16  Philippe Normand  <pnormand@igalia.com>
3358
3359         [GLib] Build error with RemoteInspector disabled
3360         https://bugs.webkit.org/show_bug.cgi?id=190623
3361
3362         Reviewed by Michael Catanzaro.
3363
3364         Compilation guards added to ensure the build still works when the
3365         Remote WebInspector has been disabled.
3366
3367         * UIProcess/API/glib/WebKitAutomationSession.cpp:
3368         * UIProcess/API/glib/WebKitAutomationSessionPrivate.h:
3369         * UIProcess/RemoteWebInspectorProxy.cpp:
3370
3371 2018-10-16  Patrick Griffis  <pgriffis@igalia.com>
3372
3373         [GTK][WPE] Fix sandbox on distros with suid bubblewrap
3374         https://bugs.webkit.org/show_bug.cgi?id=190616
3375
3376         Reviewed by Michael Catanzaro.
3377
3378         * UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
3379         (WebKit::bubblewrapSpawn):
3380
3381 2018-10-16  Alex Christensen  <achristensen@webkit.org>
3382
3383         Replace HistoryItem* with HistoryItem& where possible
3384         https://bugs.webkit.org/show_bug.cgi?id=190617
3385
3386         Reviewed by Chris Dumez.
3387
3388         * WebProcess/WebCoreSupport/SessionStateConversion.h:
3389         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
3390         (WebKit::WK2NotifyHistoryItemChanged):
3391         (WebKit::WebBackForwardListProxy::goToItem):
3392         * WebProcess/WebPage/WebBackForwardListProxy.h:
3393
3394 2018-10-16  Philippe Normand  <pnormand@igalia.com>
3395
3396         Unreviewed, another GTK build fix after r237146
3397
3398         * UIProcess/gtk/RemoteWebInspectorProxyGtk.cpp:
3399         (WebKit::RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow):
3400
3401 2018-10-15  Justin Fan  <justin_fan@apple.com>
3402
3403         Add WebGPU 2018 feature flag and experimental feature flag
3404         https://bugs.webkit.org/show_bug.cgi?id=190509
3405
3406         Reviewed by Dean Jackson.
3407
3408         Re-add ENABLE_WEBGPU, an experimental feature flag, and a RuntimeEnabledFeature
3409         for the 2018 WebGPU prototype.
3410
3411         * Configurations/FeatureDefines.xcconfig:
3412         * Shared/WebPreferences.yaml:
3413         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3414         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
3415
3416 2018-10-15  Alex Christensen  <achristensen@webkit.org>
3417
3418         Fix API tests after r237146
3419
3420         * Shared/WebPageGroupData.cpp:
3421         (WebKit::WebPageGroupData::decode):
3422         I accidentally changed the decoder.
3423
3424 2018-10-15  Sihui Liu  <sihui_liu@apple.com>
3425
3426         HSTS cache entries cannot be removed by origin
3427         https://bugs.webkit.org/show_bug.cgi?id=190455
3428         <rdar://problem/45181322>
3429
3430         Reviewed by Chris Dumez.
3431
3432         The SPI _CFNetworkResetHSTS does not recognize url without protocol, so we need to add protocol manually.
3433
3434         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3435         (WebKit::NetworkProcess::deleteHSTSCacheForHostNames):
3436
3437 2018-10-15  Alex Christensen  <achristensen@webkit.org>
3438
3439         Fix GTK build, even though bots are not working right now.
3440
3441         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
3442         (WebKit::WebInspectorProxy::platformCreateFrontendPage):
3443
3444 2018-10-15  Alex Christensen  <achristensen@webkit.org>
3445 </