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