[GTK] Fix typo in the newly added API
[WebKit-https.git] / Source / WebKit / ChangeLog
1 2019-02-09  Alexander Mikhaylenko  <exalm7659@gmail.com>
2
3         [GTK] Fix typo in the newly added API
4         https://bugs.webkit.org/show_bug.cgi?id=194472
5
6         Reviewed by Michael Catanzaro.
7
8         Fix a typo: enableed -> enabled.
9
10         * UIProcess/API/glib/WebKitSettings.cpp:
11         (webkit_settings_set_enable_back_forward_navigation_gestures):
12         * UIProcess/API/gtk/WebKitSettings.h:
13
14 2019-02-08  Alex Christensen  <achristensen@webkit.org>
15
16         Speculative fix for Mojave API test after r241223
17         https://bugs.webkit.org/show_bug.cgi?id=194427
18
19         * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
20         (WebKit::XPCInitializationHandler):
21         (WebKit::XPCServiceMain):
22         Set the __APPLEEVENTSSERVICENAME environment variable before handling any xpc messages like we used to.
23         I'll worry about making things right in the daemon later.
24
25 2019-02-08  Chris Dumez  <cdumez@apple.com>
26
27         [WK2][macOS] Avoid creating new CVDisplayLink objects for each WebProcess
28         https://bugs.webkit.org/show_bug.cgi?id=194463
29
30         Reviewed by Tim Horton.
31
32         Avoid creating new CVDisplayLink objects for each WebProcess. We really only need one per
33         display, creating such object is expensive and it is even worse in a PSON world where we
34         swap process on navigation.
35
36         This patch moves the DisplayLink storing from WebProcessProxy to WebProcessPool. Also,
37         a DisplayLink can now be associated to several IPC connections instead of having a 1:1
38         mapping. When a DisplayLink no longer has any observers, we now merely stop it instead
39         of destroying it.
40
41         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
42         (WebKit::WebProcessPool::startDisplayLink):
43         (WebKit::WebProcessPool::stopDisplayLink):
44         (WebKit::WebProcessPool::stopDisplayLinks):
45         * UIProcess/WebProcessPool.h:
46         * UIProcess/WebProcessProxy.cpp:
47         (WebKit::WebProcessProxy::~WebProcessProxy):
48         (WebKit::WebProcessProxy::processWillShutDown):
49         (WebKit::WebProcessProxy::shutDown):
50         * UIProcess/WebProcessProxy.h:
51         * UIProcess/mac/DisplayLink.cpp:
52         (WebKit::DisplayLink::DisplayLink):
53         (WebKit::DisplayLink::addObserver):
54         (WebKit::DisplayLink::removeObserver):
55         (WebKit::DisplayLink::removeObservers):
56         (WebKit::DisplayLink::hasObservers const):
57         (WebKit::DisplayLink::displayLinkCallback):
58         * UIProcess/mac/DisplayLink.h:
59         * UIProcess/mac/WebProcessProxyMac.mm:
60         (WebKit::WebProcessProxy::startDisplayLink):
61         (WebKit::WebProcessProxy::stopDisplayLink):
62
63 2019-02-08  Alexander Mikhaylenko  <exalm7659@gmail.com>
64
65         [GTK] Implement back/forward touchpad gesture
66         https://bugs.webkit.org/show_bug.cgi?id=193919
67
68         Reviewed by Michael Catanzaro.
69
70         Move ViewSnapshotStore and ViewGestureController from Cocoa/Mac directory
71         to UIProcess/, also move some parts of mac/ViewGestreControllerMac.mm to
72         ViewGestureController.cpp, split up Mac- and iOS-specific parts of
73         ViewSnapshotStore.cpp into mac/ViewSnapshotMac.mm, then implement 2-finger
74         touchpad swipe back-forward gesture for GTK based on that.
75
76         To avoid name conflict, rename existing ViewGestureController class inside
77         UIProcess/API/gtk/WebKitWebViewBase.cpp into TouchGestureController.
78
79         Since GTK gestures can only work with 3 or 4 fingers, treat horizontal
80         scrolling events as a swipe as long as there's nowhere to scroll in that
81         direction and web page doesn't handle the scrolling.
82
83         This is only allowed for touchpads, even though it can theoretically work
84         with touch mice and trackpoints.
85
86         The gesture requires every item in back-forward list to have a snapshot.
87         There's already an existing infrastructure for that, so the patch changes
88         a bunch of #if PLATFORM(COCOA) statements to also check for GTK platform.
89         The snapshots have to be taken in sync, so the implementation draws webview
90         widget into a Cairo image surface.
91
92         The gesture is disabled by default, and can be enabled by setting the newly
93         added 'enable-back-forward-navigation-gestures' property in WebKitSettings to
94         true.
95
96         Gesture drawing is implemented via Cairo. When the gesture is active, the
97         actual page is drawn into a Cairo group, which is then drawn together with
98         a given snapshot, as well as dimming and a drop shadow over the "lower" layer.
99
100         Also add a memory pressure handler that clears snapshot store when low on memory.
101
102         * DerivedSources-input.xcfilelist:
103         * PlatformGTK.cmake:
104         * PlatformMac.cmake:
105         * Shared/SessionState.h: Add snapshot to back-forward items for GTK.
106         * Shared/WebBackForwardListItem.h: Add snapshot to back-forward items for GTK.
107         * SourcesCocoa.txt:
108         * SourcesGTK.txt:
109         * UIProcess/API/glib/WebKitSettings.cpp:
110         Added 'enable-back-forward-navigation-gestures' property for enabling the gesture.
111         (webKitSettingsSetProperty):
112         (webKitSettingsGetProperty):
113         (webkit_settings_class_init):
114         (webkit_settings_get_enable_back_forward_navigation_gestures): Added, GTK only.
115         (webkit_settings_set_enable_back_forward_navigation_gestures): Added, GTK only.
116         * UIProcess/API/glib/WebKitWebView.cpp:
117         (enableBackForwardNavigationGesturesChanged): Added, GTK only.
118         (webkitWebViewUpdateSettings):
119         (webkitWebViewDisconnectSettingsSignalHandlers):
120         * UIProcess/API/gtk/PageClientImpl.cpp:
121         (WebKit::PageClientImpl::setViewNeedsDisplay): Redraw the whole screen instead of a region during the gesture.
122         (WebKit::PageClientImpl::takeViewSnapshot): Added.
123         (WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore): Pass unhandled events to the gesture controller.
124         (WebKit::PageClientImpl::didRemoveNavigationGestureSnapshot): Redraw the widget immediately after removing snapshot.
125         (WebKit::PageClientImpl::didStartProvisionalLoadForMainFrame): Added, send a notification to the gesture controller.
126         (WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):  Send a notification to the gesture controller.
127         (WebKit::PageClientImpl::didFinishLoadForMainFrame):  Send a notification to the gesture controller.
128         (WebKit::PageClientImpl::didFailLoadForMainFrame):  Added, send a notification to the gesture controller.
129         (WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):  Send a notification to the gesture controller.
130         (WebKit::PageClientImpl::didRestoreScrollPosition):  Added, send a notification to the gesture controller.
131         * UIProcess/API/gtk/PageClientImpl.h:
132         * UIProcess/API/gtk/WebKitSettings.h:
133         Add webkit_settings_get_enable_back_forward_navigation_gestures() and webkit_settings_get_enable_back_forward_navigation_gestures()
134         to public API.
135         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
136         (webkitWebViewBaseDraw): Pass drawing to ViewGestureController during the gesture.
137         (webkitWebViewBaseScrollEvent): Pass scroll events to ViewGestureController during the gesture.
138         (webkitWebViewBaseGestureController): Renamed ViewGestureController to TouchGestureController.
139         (webkitWebViewBaseViewGestureController): Added.
140         (webkitWebViewBaseCreateWebPage): Create an instance of ViewGestureController.
141         (webkitWebViewBaseTakeViewSnapshot): Added.
142         (webkitWebViewBaseDidStartProvisionalLoadForMainFrame): Added.
143         (webkitWebViewBaseDidFirstVisuallyNonEmptyLayoutForMainFrame): Added.
144         (webkitWebViewBaseDidFinishLoadForMainFrame): Added.
145         (webkitWebViewBaseDidFailLoadForMainFrame): Added.
146         (webkitWebViewBaseDidSameDocumentNavigationForMainFrame): Added.
147         (webkitWebViewBaseDidRestoreScrollPosition): Added.
148         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
149         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Mentioned the added functions in docs.
150         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
151         (WebKit::WebProcessPool::platformInitialize): Move the check from WebMemoryPressureHandlerCocoa.mm here.
152         * UIProcess/PageClient.h: Add takeViewSnapshot() for GTK.
153         * UIProcess/ViewGestureController.cpp: Renamed from Source/WebKit/UIProcess/Cocoa/ViewGestureController.cpp.
154         (WebKit::ViewGestureController::ViewGestureController):
155         (WebKit::ViewGestureController::~ViewGestureController):
156         (WebKit::ViewGestureController::disconnectFromProcess):
157         (WebKit::ViewGestureController::connectToProcess):
158         (WebKit::ViewGestureController::controllerForGesture):
159         (WebKit::ViewGestureController::takeNextGestureID):
160         (WebKit::ViewGestureController::willBeginGesture):
161         (WebKit::ViewGestureController::didEndGesture):
162         (WebKit::ViewGestureController::setAlternateBackForwardListSourcePage):
163         (WebKit::ViewGestureController::canSwipeInDirection const):
164         (WebKit::ViewGestureController::didStartProvisionalOrSameDocumentLoadForMainFrame):
165         (WebKit::ViewGestureController::didStartProvisionalLoadForMainFrame):
166         (WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame):
167         (WebKit::ViewGestureController::didRepaintAfterNavigation):
168         (WebKit::ViewGestureController::didHitRenderTreeSizeThreshold):
169         (WebKit::ViewGestureController::didRestoreScrollPosition):
170         (WebKit::ViewGestureController::didReachMainFrameLoadTerminalState):
171         (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
172         (WebKit::ViewGestureController::checkForActiveLoads):
173         (WebKit::ViewGestureController::SnapshotRemovalTracker::SnapshotRemovalTracker):
174         (WebKit::ViewGestureController::SnapshotRemovalTracker::eventsDescription):
175         (WebKit::ViewGestureController::SnapshotRemovalTracker::log const):
176         (WebKit::ViewGestureController::SnapshotRemovalTracker::resume):
177         (WebKit::ViewGestureController::SnapshotRemovalTracker::start):
178         (WebKit::ViewGestureController::SnapshotRemovalTracker::reset):
179         (WebKit::ViewGestureController::SnapshotRemovalTracker::stopWaitingForEvent):
180         (WebKit::ViewGestureController::SnapshotRemovalTracker::eventOccurred):
181         (WebKit::ViewGestureController::SnapshotRemovalTracker::cancelOutstandingEvent):
182         (WebKit::ViewGestureController::SnapshotRemovalTracker::hasOutstandingEvent):
183         (WebKit::ViewGestureController::SnapshotRemovalTracker::fireRemovalCallbackIfPossible):
184         (WebKit::ViewGestureController::SnapshotRemovalTracker::fireRemovalCallbackImmediately):
185         (WebKit::ViewGestureController::SnapshotRemovalTracker::watchdogTimerFired):
186         (WebKit::ViewGestureController::SnapshotRemovalTracker::startWatchdog):
187         (WebKit::deltaShouldCancelSwipe):
188         (WebKit::ViewGestureController::PendingSwipeTracker::PendingSwipeTracker):
189         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):
190         (WebKit::ViewGestureController::PendingSwipeTracker::handleEvent):
191         (WebKit::ViewGestureController::PendingSwipeTracker::eventWasNotHandledByWebCore):
192         (WebKit::ViewGestureController::PendingSwipeTracker::tryToStartSwipe):
193         (WebKit::ViewGestureController::PendingSwipeTracker::reset):
194         (WebKit::ViewGestureController::startSwipeGesture):
195         (WebKit::ViewGestureController::isPhysicallySwipingLeft const):
196         (WebKit::ViewGestureController::shouldUseSnapshotForSize):
197         (WebKit::ViewGestureController::forceRepaintIfNeeded):
198         (WebKit::ViewGestureController::willEndSwipeGesture):
199         (WebKit::ViewGestureController::endSwipeGesture):
200         (WebKit::ViewGestureController::requestRenderTreeSizeNotificationIfNeeded):
201         * UIProcess/ViewGestureController.h: Renamed from Source/WebKit/UIProcess/Cocoa/ViewGestureController.h.
202         (WebKit::ViewGestureController::wheelEventWasNotHandledByWebCore):
203         (WebKit::ViewGestureController::shouldIgnorePinnedState):
204         (WebKit::ViewGestureController::setShouldIgnorePinnedState):
205         (WebKit::ViewGestureController::hasActiveMagnificationGesture const):
206         (WebKit::ViewGestureController::setCustomSwipeViews):
207         (WebKit::ViewGestureController::setCustomSwipeViewsTopContentInset):
208         (WebKit::ViewGestureController::setDidMoveSwipeSnapshotCallback):
209         (WebKit::ViewGestureController::backgroundColorForCurrentSnapshot const):
210         (WebKit::ViewGestureController::didFinishLoadForMainFrame):
211         (WebKit::ViewGestureController::didFailLoadForMainFrame):
212         (WebKit::ViewGestureController::setSwipeGestureEnabled):
213         (WebKit::ViewGestureController::isSwipeGestureEnabled):
214         (WebKit::ViewGestureController::SnapshotRemovalTracker::pause):
215         (WebKit::ViewGestureController::SnapshotRemovalTracker::isPaused const):
216         (WebKit::ViewGestureController::SnapshotRemovalTracker::hasRemovalCallback const):
217         (WebKit::ViewGestureController::SnapshotRemovalTracker::renderTreeSizeThreshold const):
218         (WebKit::ViewGestureController::SnapshotRemovalTracker::setRenderTreeSizeThreshold):
219         (WebKit::ViewGestureController::PendingSwipeTracker::shouldIgnorePinnedState):
220         (WebKit::ViewGestureController::PendingSwipeTracker::setShouldIgnorePinnedState):
221         (WebKit::ViewGestureController::SwipeProgressTracker::progress const):
222         (WebKit::ViewGestureController::SwipeProgressTracker::direction const):
223         * UIProcess/ViewGestureController.messages.in: Renamed from Source/WebKit/UIProcess/Cocoa/ViewGestureController.messages.in.
224         * UIProcess/ViewSnapshotStore.cpp: Copied from Source/WebKit/UIProcess/mac/ViewSnapshotStore.mm.
225         (WebKit::ViewSnapshotStore::ViewSnapshotStore):
226         (WebKit::ViewSnapshotStore::~ViewSnapshotStore):
227         (WebKit::ViewSnapshotStore::singleton):
228         (WebKit::ViewSnapshotStore::didAddImageToSnapshot):
229         (WebKit::ViewSnapshotStore::willRemoveImageFromSnapshot):
230         (WebKit::ViewSnapshotStore::pruneSnapshots):
231         (WebKit::ViewSnapshotStore::recordSnapshot):
232         (WebKit::ViewSnapshotStore::discardSnapshotImages):
233         (WebKit::ViewSnapshot::~ViewSnapshot):
234         * UIProcess/ViewSnapshotStore.h: Renamed from Source/WebKit/UIProcess/mac/ViewSnapshotStore.h.
235         (WebKit::ViewSnapshot::setRenderTreeSize):
236         (WebKit::ViewSnapshot::renderTreeSize const):
237         (WebKit::ViewSnapshot::setBackgroundColor):
238         (WebKit::ViewSnapshot::backgroundColor const):
239         (WebKit::ViewSnapshot::setViewScrollPosition):
240         (WebKit::ViewSnapshot::viewScrollPosition const):
241         (WebKit::ViewSnapshot::setDeviceScaleFactor):
242         (WebKit::ViewSnapshot::deviceScaleFactor const):
243         (WebKit::ViewSnapshot::surface const):
244         (WebKit::ViewSnapshot::imageSizeInBytes const):
245         (WebKit::ViewSnapshot::size const):
246         (WebKit::ViewSnapshotStore::setDisableSnapshotVolatilityForTesting):
247         (WebKit::ViewSnapshotStore::disableSnapshotVolatilityForTesting const):
248         * UIProcess/WebBackForwardList.cpp:
249         (WebKit::WebBackForwardList::didRemoveItem): Unset snapshot for GTK.
250         * UIProcess/WebMemoryPressureHandler.cpp: Copied from Source/WebKit/UIProcess/Cocoa/WebMemoryPressureHandlerCocoa.mm.
251         (WebKit::installMemoryPressureHandler):
252         * UIProcess/WebMemoryPressureHandler.h: Renamed from Source/WebKit/UIProcess/Cocoa/WebMemoryPressureHandlerCocoa.h.
253         * UIProcess/WebPageProxy.cpp:
254         (WebKit::WebPageProxy::recordNavigationSnapshot): Take snapshots for GTK.
255         * UIProcess/WebPageProxy.h:
256         * UIProcess/gtk/ViewGestureControllerGtk.cpp: Added. This is a port of
257         UIProcess/mac/ViewGestureControllerMac.mm. SwipeProgressTracker class is a
258         re-implementation of trackSwipeEventWithOptions.
259         (WebKit::isEventStop):
260         (WebKit::ViewGestureController::platformTeardown):
261         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanStartSwipe):
262         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanEndSwipe):
263         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanInfluenceSwipe):
264         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventGetScrollingDeltas):
265         (WebKit::ViewGestureController::handleScrollWheelEvent):
266         (WebKit::ViewGestureController::trackSwipeGesture):
267         (WebKit::ViewGestureController::SwipeProgressTracker::SwipeProgressTracker):
268         (WebKit::ViewGestureController::SwipeProgressTracker::startTracking):
269         (WebKit::ViewGestureController::SwipeProgressTracker::reset):
270         (WebKit::ViewGestureController::SwipeProgressTracker::handleEvent):
271         (WebKit::ViewGestureController::SwipeProgressTracker::startAnimation):
272         (WebKit::easeOutCubic):
273         (WebKit::ViewGestureController::SwipeProgressTracker::onAnimationTick):
274         (WebKit::ViewGestureController::SwipeProgressTracker::endAnimation):
275         (WebKit::ViewGestureController::beginSwipeGesture):
276         (WebKit::ViewGestureController::handleSwipeGesture):
277         (WebKit::ViewGestureController::draw):
278         (WebKit::ViewGestureController::removeSwipeSnapshot):
279         (WebKit::ViewGestureController::beginSimulatedSwipeInDirectionForTesting):
280         (WebKit::ViewGestureController::completeSimulatedSwipeInDirectionForTesting):
281         * UIProcess/gtk/ViewSnapshotStoreGtk.cpp: Renamed from Source/WebKit/UIProcess/Cocoa/WebMemoryPressureHandlerCocoa.mm.
282         (WebKit::ViewSnapshot::create):
283         (WebKit::ViewSnapshot::ViewSnapshot):
284         (WebKit::ViewSnapshot::hasImage const):
285         (WebKit::ViewSnapshot::clearImage):
286         (WebKit::ViewSnapshot::imageSizeInBytes const):
287         (WebKit::ViewSnapshot::size const):
288         * UIProcess/gtk/WebProcessPoolGtk.cpp:
289         (WebKit::memoryPressureMonitorDisabled): Added.
290         (WebKit::WebProcessPool::platformInitialize): Install memory pressure handler.
291         (WebKit::WebProcessPool::platformInitializeWebProcess): Use memoryPressureMonitorDisabled().
292         * UIProcess/mac/ViewGestureControllerMac.mm:
293         Moved many functions into UIProcess/ViewGestureController.cpp
294         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanStartSwipe):
295         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanEndSwipe):
296         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanInfluenceSwipe):
297         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventGetScrollingDeltas):
298         (WebKit::ViewGestureController::trackSwipeGesture):
299         (WebKit::scrollEventCanInfluenceSwipe): Deleted.
300         (WebKit::deltaShouldCancelSwipe): Deleted.
301         (WebKit::ViewGestureController::PendingSwipeTracker::PendingSwipeTracker): Deleted.
302         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe): Deleted.
303         (WebKit::ViewGestureController::PendingSwipeTracker::handleEvent): Deleted.
304         (WebKit::ViewGestureController::PendingSwipeTracker::eventWasNotHandledByWebCore): Deleted.
305         (WebKit::ViewGestureController::PendingSwipeTracker::tryToStartSwipe): Deleted.
306         (WebKit::ViewGestureController::PendingSwipeTracker::reset): Deleted.
307         (WebKit::ViewGestureController::willEndSwipeGesture): Deleted.
308         (WebKit::ViewGestureController::shouldUseSnapshotForSize): Deleted.
309         (WebKit::ViewGestureController::isPhysicallySwipingLeft const): Deleted.
310         (WebKit::ViewGestureController::endSwipeGesture): Deleted.
311         (WebKit::ViewGestureController::forceRepaintIfNeeded): Deleted.
312         (WebKit::ViewGestureController::requestRenderTreeSizeNotificationIfNeeded): Deleted.
313         * UIProcess/mac/ViewSnapshotStoreMac.mm: Renamed from Source/WebKit/UIProcess/mac/ViewSnapshotStore.mm.
314         (WebKit::ViewSnapshotStore::snapshottingContext):
315         (WebKit::ViewSnapshot::create):
316         (WebKit::ViewSnapshot::ViewSnapshot):
317         (WebKit::ViewSnapshot::setSurface):
318         (WebKit::ViewSnapshot::hasImage const):
319         (WebKit::ViewSnapshot::clearImage):
320         (WebKit::ViewSnapshot::setVolatile):
321         (WebKit::ViewSnapshot::asLayerContents):
322         (WebKit::ViewSnapshot::asImageForTesting):
323         * WebKit.xcodeproj/project.pbxproj:
324         * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
325         Make SetRenderTreeSizeNotificationThreshold() cross-platform.
326         (WebKit::ViewGestureGeometryCollector::ViewGestureGeometryCollector):
327         (WebKit::ViewGestureGeometryCollector::computeMinimumAndMaximumViewportScales const):
328         (WebKit::ViewGestureGeometryCollector::mainFrameDidLayout):
329         * WebProcess/WebPage/ViewGestureGeometryCollector.h:
330         * WebProcess/WebPage/ViewGestureGeometryCollector.messages.in:
331         * WebProcess/WebPage/WebPage.cpp:
332         Start using ViewGestureGeometryCollector for GTK.
333         (WebKit::WebPage::mainFrameDidLayout):
334         * WebProcess/WebPage/WebPage.h:
335
336 2019-02-08  Alex Christensen  <achristensen@webkit.org>
337
338         Add SPI to use networking daemon instead of XPC service
339         https://bugs.webkit.org/show_bug.cgi?id=194427
340
341         Reviewed by Geoffrey Garen.
342
343         There is still work to be done, but with the proper plist it starts and loads webpages!
344
345         * NetworkProcess/EntryPoint/Cocoa/Daemon/DaemonEntryPoint.mm:
346         (WebKit::DaemonMain):
347         * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h:
348         * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
349         (WebKit::XPCEventHandler):
350         (WebKit::XPCInitializationHandler):
351         (WebKit::XPCServiceMain):
352         (WebKit::XPCServiceEventHandler): Deleted.
353         * UIProcess/API/APIProcessPoolConfiguration.h:
354         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
355         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
356         (-[_WKProcessPoolConfiguration usesNetworkingDaemon]):
357         (-[_WKProcessPoolConfiguration setUsesNetworkingDaemon:]):
358         * UIProcess/AuxiliaryProcessProxy.cpp:
359         (WebKit::AuxiliaryProcessProxy::getLaunchOptions):
360         * UIProcess/Launcher/ProcessLauncher.h:
361         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
362         (WebKit::serviceName):
363         (WebKit::ProcessLauncher::launchProcess):
364         * UIProcess/Network/NetworkProcessProxy.cpp:
365         (WebKit::NetworkProcessProxy::getLaunchOptions):
366         * UIProcess/WebProcessPool.cpp:
367         (WebKit::WebProcessPool::usesNetworkingDaemon const):
368         * UIProcess/WebProcessPool.h:
369
370 2019-02-08  Truitt Savell  <tsavell@apple.com>
371
372         Unreviewed, rolling out r241197.
373
374         Broke iOS Simulator Debug build and casued 1 API failure on
375         High Sierra
376
377         Reverted changeset:
378
379         "Add SPI to use networking daemon instead of XPC service"
380         https://bugs.webkit.org/show_bug.cgi?id=194427
381         https://trac.webkit.org/changeset/241197
382
383 2019-02-08  Beth Dakin  <bdakin@apple.com>
384
385         Abstract and discussion comments needed for afterScreenUpdates
386         https://bugs.webkit.org/show_bug.cgi?id=194442
387
388         Reviewed by Wenson Hsieh.
389
390         Forgot to add these comments with https://bugs.webkit.org/show_bug.cgi?id=194362
391         * UIProcess/API/Cocoa/WKSnapshotConfiguration.h:
392
393 2019-02-08  Beth Dakin  <bdakin@apple.com>
394
395         Add afterScreenUpdates to WKSnapshotConfiguration
396         https://bugs.webkit.org/show_bug.cgi?id=194362
397         -and corresponding-
398         <rdar://problem/40655528> Please add an "after screen updates" property to 
399         WKSnapshotConfiguration (to solve blank snapshots)
400
401         Reviewed by Tim Horton.
402
403         This is the WebKit equivalent of - (UIView *)snapshotViewAfterScreenUpdates:(BOOL)afterUpdates;
404         This makes our snapshotting API more predictable and reliable on iOS devices, 
405         which is why the new configuration property defaults to YES.
406
407         New property that defaults to YES.
408         * UIProcess/API/Cocoa/WKSnapshotConfiguration.h:
409         * UIProcess/API/Cocoa/WKSnapshotConfiguration.mm:
410         (-[WKSnapshotConfiguration init]):
411         (-[WKSnapshotConfiguration copyWithZone:]):
412
413         When afterScreenUpdates is set, invoke the snapshot via 
414         callAfterNextPresentationUpdate.
415         * UIProcess/API/Cocoa/WKWebView.mm:
416         (-[WKWebView takeSnapshotWithConfiguration:completionHandler:]):
417         (-[WKWebView _callCompletionHandler:withSnapshotImage:atDeviceScale:]):
418
419 2019-02-08  Alex Christensen  <achristensen@webkit.org>
420
421         Add SPI to use networking daemon instead of XPC service
422         https://bugs.webkit.org/show_bug.cgi?id=194427
423
424         Reviewed by Geoffrey Garen.
425
426         There is still work to be done, but with the proper plist it starts and loads webpages!
427
428         * NetworkProcess/EntryPoint/Cocoa/Daemon/DaemonEntryPoint.mm:
429         (WebKit::DaemonMain):
430         * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h:
431         * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
432         (WebKit::XPCEventHandler):
433         (WebKit::XPCInitializationHandler):
434         (WebKit::XPCServiceMain):
435         (WebKit::XPCServiceEventHandler): Deleted.
436         * UIProcess/API/APIProcessPoolConfiguration.h:
437         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
438         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
439         (-[_WKProcessPoolConfiguration usesNetworkingDaemon]):
440         (-[_WKProcessPoolConfiguration setUsesNetworkingDaemon:]):
441         * UIProcess/AuxiliaryProcessProxy.cpp:
442         (WebKit::AuxiliaryProcessProxy::getLaunchOptions):
443         * UIProcess/Launcher/ProcessLauncher.h:
444         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
445         (WebKit::serviceName):
446         (WebKit::ProcessLauncher::launchProcess):
447         * UIProcess/Network/NetworkProcessProxy.cpp:
448         (WebKit::NetworkProcessProxy::getLaunchOptions):
449         * UIProcess/WebProcessPool.cpp:
450         (WebKit::WebProcessPool::usesNetworkingDaemon const):
451         * UIProcess/WebProcessPool.h:
452
453 2019-02-08  Keith Rollin  <krollin@apple.com>
454
455         Unreviewed build fix.
456
457         r241135 modified how entitlements were built up for the macOS. Those
458         changes broke the iOSMac builds. Bring back some deletions in order to
459         fix iOSMac.
460
461         * Configurations/PluginService.64.xcconfig:
462         * Configurations/PluginService.entitlements: Added.
463         * WebKit.xcodeproj/project.pbxproj:
464
465 2019-02-07  Chris Dumez  <cdumez@apple.com>
466
467         Mark more heap-allocated classes as fast allocated
468         https://bugs.webkit.org/show_bug.cgi?id=194422
469
470         Reviewed by Ryosuke Niwa.
471
472         * NetworkProcess/NetworkLoad.cpp:
473         * NetworkProcess/NetworkLoadChecker.h:
474         * NetworkProcess/NetworkResourceLoader.cpp:
475         * Platform/IPC/Connection.h:
476         * Platform/IPC/mac/ImportanceAssertion.h:
477         * PluginProcess/PluginCreationParameters.h:
478         * Shared/API/Cocoa/RemoteObjectRegistry.h:
479         * Shared/WebEvent.h:
480         * UIProcess/API/APIHTTPCookieStore.cpp:
481         * UIProcess/API/APINotificationProvider.h:
482         * UIProcess/API/Cocoa/PageLoadStateObserver.h:
483         * UIProcess/API/Cocoa/WKHTTPCookieStore.mm:
484         * UIProcess/API/Cocoa/WKWebView.mm:
485         (-[WKWebView _setInputDelegate:]):
486         * UIProcess/API/gtk/PageClientImpl.h:
487         * UIProcess/BackingStore.h:
488         * UIProcess/Cocoa/AutomationClient.h:
489         * UIProcess/Cocoa/DiagnosticLoggingClient.h:
490         * UIProcess/Cocoa/DownloadClient.h:
491         * UIProcess/Cocoa/FindClient.h:
492         * UIProcess/Cocoa/NavigationState.h:
493         * UIProcess/Cocoa/UIDelegate.h:
494         * UIProcess/Cocoa/ViewGestureController.h:
495         * UIProcess/DeviceIdHashSaltStorage.h:
496         * UIProcess/Downloads/DownloadProxyMap.h:
497         * UIProcess/Gamepad/UIGamepad.h:
498         * UIProcess/Notifications/WebNotificationProvider.h:
499         * UIProcess/ProcessAssertion.h:
500         * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.h:
501         * UIProcess/WebContextInjectedBundleClient.h:
502         * UIProcess/WebFormClient.h:
503         * UIProcess/WebGeolocationProvider.h:
504         * UIProcess/WebPageProxy.h:
505         * WebProcess/Automation/WebAutomationSessionProxy.h:
506         * WebProcess/InjectedBundle/API/APIInjectedBundleBundleClient.h:
507         * WebProcess/InjectedBundle/API/APIInjectedBundleEditorClient.h:
508         * WebProcess/InjectedBundle/API/APIInjectedBundlePageContextMenuClient.h:
509         * WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h:
510         * WebProcess/InjectedBundle/API/APIInjectedBundlePageResourceLoadClient.h:
511         * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
512         * WebProcess/InjectedBundle/APIInjectedBundleFormClient.h:
513         * WebProcess/Network/webrtc/LibWebRTCNetwork.h:
514         * WebProcess/Network/webrtc/LibWebRTCSocket.h:
515         * WebProcess/Network/webrtc/WebRTCResolver.h:
516         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
517         * WebProcess/WebPage/DrawingArea.h:
518
519 2019-02-07  Wenson Hsieh  <wenson_hsieh@apple.com>
520
521         [iOS] [WK2] Modernize code for applying autocorrection
522         https://bugs.webkit.org/show_bug.cgi?id=194397
523
524         Reviewed by Tim Horton.
525
526         * UIProcess/ios/WKContentViewInteraction.h:
527         * UIProcess/ios/WKContentViewInteraction.mm:
528         (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
529         (-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
530
531         Use BlockPtr instead of temporarily storing the completion handler.
532
533         * WebProcess/WebPage/WebPage.h:
534         * WebProcess/WebPage/WebPage.messages.in:
535
536         Change a LegacySync to Delayed.
537
538         * WebProcess/WebPage/ios/WebPageIOS.mm:
539         (WebKit::WebPage::applyAutocorrection):
540         (WebKit::WebPage::syncApplyAutocorrection):
541         (WebKit::WebPage::applyAutocorrectionInternal):
542
543 2019-02-07  Wenson Hsieh  <wenson_hsieh@apple.com>
544
545         [iOS] Clicking links in Safari using Apple Pencil is much more difficult after r238475
546         https://bugs.webkit.org/show_bug.cgi?id=194415
547         <rdar://problem/47550281>
548
549         Reviewed by Tim Horton.
550
551         Fix the bug by not firing the Apple-pencil-exclusive tap gesture recognizer in the case where editable images
552         are disabled. This gesture recognizer is only used for inserting editable images, and currently conflicts with
553         the synthetic click gesture recognizer used to recognize clicks from generic digitizer inputs.
554
555         * UIProcess/ios/WKContentViewInteraction.mm:
556         (-[WKContentView gestureRecognizerShouldBegin:]):
557         (-[WKContentView _stylusSingleTapRecognized:]):
558
559 2019-02-07  Per Arne Vollan  <pvollan@apple.com>
560
561         [macOS] Block coreservicesd in sandbox.
562         https://bugs.webkit.org/show_bug.cgi?id=192670
563
564         Reviewed by Alexey Proskuryakov.
565
566         We should block CoreServices in newer versions of macOS. In order to achieve this we need to avoid calling
567         _RegisterApplication before entering the sandbox, since this call will open up a connection to CoreServices.
568         The call to _RegisterApplication is moved to ChildProcess::updateProcessName, since it is needed to
569         successfully update the process name. The call to ChildProcess::updateProcessName is made after entering
570         the sandbox.
571
572         * Shared/AuxiliaryProcess.cpp:
573         (WebKit::AuxiliaryProcess::initialize):
574         * WebProcess/cocoa/WebProcessCocoa.mm:
575         (WebKit::WebProcess::initializeProcessName):
576         (WebKit::WebProcess::platformInitializeProcess):
577         * WebProcess/com.apple.WebProcess.sb.in:
578
579 2019-02-07  Youenn Fablet  <youenn@apple.com>
580
581         Filter out Overconstrainederror.constraint when getUserMedia is not granted
582         https://bugs.webkit.org/show_bug.cgi?id=194240
583
584         Reviewed by Eric Carlson.
585
586         Make sure in UIProcess to filter out constraint if either the page was not granted gum access or it has no persistent access.
587
588         Refactor UserMediaPermissionRequestManagerProxy to make the implementation easier to understand.
589
590         Covered by added test.
591
592         * UIProcess/UserMediaPermissionCheckProxy.cpp:
593         (WebKit::UserMediaPermissionCheckProxy::setUserMediaAccessInfo):
594         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
595         (WebKit::UserMediaPermissionRequestManagerProxy::captureDevicesChanged):
596         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted):
597         (WebKit::UserMediaPermissionRequestManagerProxy::grantAccess):
598         (WebKit::UserMediaPermissionRequestManagerProxy::getRequestAction):
599         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
600         (WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionRequest):
601         (WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionInvalidRequest):
602         (WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionValidRequest):
603         (WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo):
604         (WebKit::UserMediaPermissionRequestManagerProxy::wasGrantedVideoOrAudioAccess):
605         (WebKit::UserMediaPermissionRequestManagerProxy::computeFilteredDeviceList):
606         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
607         (WebKit::UserMediaPermissionRequestManagerProxy::createPermissionRequest): Deleted.
608         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
609         * UIProcess/UserMediaPermissionRequestProxy.h:
610         (WebKit::UserMediaPermissionRequestProxy::isPending const):
611         (WebKit::UserMediaPermissionRequestProxy::setEligibleVideoDeviceUIDs):
612         (WebKit::UserMediaPermissionRequestProxy::setEligibleAudioDeviceUIDs):
613         (WebKit::UserMediaPermissionRequestProxy::hasAudioDevice const):
614         (WebKit::UserMediaPermissionRequestProxy::hasVideoDevice const):
615         (WebKit::UserMediaPermissionRequestProxy::hasPersistentAccess const):
616         (WebKit::UserMediaPermissionRequestProxy::setHasPersistentAccess):
617         (WebKit::UserMediaPermissionRequestProxy::userMediaID const):
618         (WebKit::UserMediaPermissionRequestProxy::topLevelDocumentSecurityOrigin const):
619         (WebKit::UserMediaPermissionRequestProxy::userMediaDocumentSecurityOrigin const):
620         (WebKit::UserMediaPermissionRequestProxy::userRequest const):
621         (WebKit::UserMediaPermissionRequestProxy::setDeviceIdentifierHashSalt):
622         (WebKit::UserMediaPermissionRequestProxy::deviceIdentifierHashSalt const):
623         (WebKit::UserMediaPermissionRequestProxy::audioDevice const):
624         (WebKit::UserMediaPermissionRequestProxy::videoDevice const):
625         * UIProcess/WebPageProxy.cpp:
626         (WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
627         * UIProcess/WebPageProxy.h:
628
629 2019-02-07  Wenson Hsieh  <wenson_hsieh@apple.com>
630
631         [iOS] [WK2] Modernize autocorrection context code
632         https://bugs.webkit.org/show_bug.cgi?id=194373
633
634         Reviewed by Tim Horton.
635
636         * Shared/ios/WebAutocorrectionContext.h: Added.
637         (WebKit::WebAutocorrectionContext::encode const):
638         (WebKit::WebAutocorrectionContext::decode):
639
640         Introduce a WebAutocorrectionContext struct that encapsulates the individual pieces of autocorrection context.
641         Change to use this instead of a long list of arguments when propagating autocorrection context information over
642         IPC.
643
644         * UIProcess/AutoCorrectionCallback.h:
645         * UIProcess/WebPageProxy.h:
646         * UIProcess/WebPageProxy.messages.in:
647         * UIProcess/ios/WKContentViewInteraction.h:
648         * UIProcess/ios/WKContentViewInteraction.mm:
649         (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
650         (+[WKAutocorrectionContext autocorrectionContextWithContext:]):
651         (+[WKAutocorrectionContext autocorrectionContextWithData:markedText:selectedText:afterText:selectedRangeInMarkedText:]): Deleted.
652
653         Change this constructor to take an entire WebAutocorrectionContext.
654
655         * UIProcess/ios/WebPageProxyIOS.mm:
656         (WebKit::WebPageProxy::autocorrectionContextCallback):
657         (WebKit::WebPageProxy::requestAutocorrectionContext):
658         (WebKit::WebPageProxy::autocorrectionContextSync):
659         (WebKit::WebPageProxy::getAutocorrectionContext): Deleted.
660         * WebKit.xcodeproj/project.pbxproj:
661         * WebProcess/WebPage/WebPage.h:
662         * WebProcess/WebPage/WebPage.messages.in:
663
664         Use Delayed instead of LegacySync.
665
666         * WebProcess/WebPage/ios/WebPageIOS.mm:
667         (WebKit::WebPage::autocorrectionContext):
668
669         Renamed from computeAutocorrectionContext. This is now a private method on WebPage that uses the focused or main
670         frame to compute and return a WebAutocorrectionContext.
671
672         (WebKit::WebPage::requestAutocorrectionContext):
673         (WebKit::WebPage::autocorrectionContextSync):
674
675         Renamed getAutocorrectionContext to autocorrectionContextSync.
676
677         (WebKit::computeAutocorrectionContext): Deleted.
678         (WebKit::WebPage::getAutocorrectionContext): Deleted.
679
680 2019-02-07  Youenn Fablet  <youenn@apple.com>
681
682         Simplify applyConstraints callbacks
683         https://bugs.webkit.org/show_bug.cgi?id=194297
684
685         Reviewed by Eric Carlson.
686
687         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
688         (WebKit::UserMediaCaptureManagerProxy::applyConstraints):
689         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
690         (WebKit::UserMediaCaptureManager::Source::applyConstraintsSucceeded):
691         (WebKit::UserMediaCaptureManager::Source::applyConstraintsFailed):
692         (WebKit::UserMediaCaptureManager::applyConstraintsFailed):
693         * WebProcess/cocoa/UserMediaCaptureManager.h:
694
695 2019-02-07  Brent Fulgham  <bfulgham@apple.com>
696
697         Permit additional IOKit Properties needed by Media PlugIns on older Mac Hardware
698         https://bugs.webkit.org/show_bug.cgi?id=194412
699         <rdar://problem/47820615>
700
701         Reviewed by Per Arne Vollan.
702
703         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
704
705 2019-02-07  Brent Fulgham  <bfulgham@apple.com>
706
707         Permit additional IOKit Properties needed by older Mac Hardware
708         https://bugs.webkit.org/show_bug.cgi?id=194410
709         <rdar://problem/47820620>
710
711         Reviewed by Per Arne Vollan.
712
713         * WebProcess/com.apple.WebProcess.sb.in:
714
715 2019-02-07  Brady Eidson  <beidson@apple.com>
716
717         Rename the TAKE_DOWNLOAD_ASSERTION macro.
718
719         Rubberstamped by Andy Estes.
720
721         * NetworkProcess/Downloads/DownloadMap.cpp:
722         * NetworkProcess/Downloads/DownloadMap.h:
723
724 2019-02-07  Keith Rollin  <krollin@apple.com>
725
726         Fix XCBuild issue related to codesigning WebContent process
727         https://bugs.webkit.org/show_bug.cgi?id=193799
728         <rdar://problem/47533890>
729
730         Reviewed by Brent Fulgham.
731
732         Building with XCBuild enabled results in the error message "cannot
733         read entitlement data" when trying to codesign the macOS XPC
734         processes. The reason for this error message is that there is a build
735         step that deletes any previous "stale" generated .xcent file before
736         building up a new one. With XCBuild enabled, the build steps got
737         re-ordered, such that the step that deletes this file could get
738         executed after the steps that build up the file. The built-up set of
739         entitlements is now gone, and the build process fails when `codesign`
740         tries to access it.
741
742         The apparent quick-fix to this problem -- of tweaking dependencies so
743         that the build steps execute in the desired order -- wouldn't work
744         with XCBuild. Establishing these dependencies would require both
745         having multiple build phases produce the same .xcent file as output,
746         as well as a build phase that has this file as an input and an output.
747         XCBuild either forbids or frowns upon these configurations.
748
749         Ultimately, the solution that worked was to take over complete control
750         of the codesigning process. This means (a) not specifying a base
751         .entitlements file that XCode uses to start with (and which was
752         subsequently altered via custom build scripts), (b) not letting XCode
753         automatically and silently inject a 'get-task-all' entitlement used to
754         facilitate debugging (we now add that entitlement by hand), and (c)
755         building up all of our entitlements by hand via a single custom
756         script. Because of the addition of this custom script, many other
757         scripts and entitlements files could now be removed.
758
759         * Configurations/BaseXPCService.xcconfig:
760         * Configurations/Databases-iOS.entitlements: Removed.
761         * Configurations/Network-OSX-restricted.entitlements: Removed.
762         * Configurations/Network-OSX-sandbox.entitlements: Removed.
763         * Configurations/Network-OSX.entitlements: Removed.
764         * Configurations/NetworkService.xcconfig:
765         * Configurations/PluginService.64.xcconfig:
766         * Configurations/PluginService.entitlements: Removed.
767         * Configurations/WebContent-OSX-sandbox.entitlements: Removed.
768         * Configurations/WebContent-OSX.entitlements: Removed.
769         * Configurations/WebContent-or-Plugin-OSX-restricted.entitlements: Removed.
770         * Configurations/WebContentService.xcconfig:
771         * Scripts/copy-webcontent-resources-to-private-headers.sh:
772         * Scripts/process-entitlements.sh: Added.
773         * Scripts/process-network-sandbox-entitlements.sh: Removed.
774         * Scripts/process-webcontent-or-plugin-entitlements.sh: Removed.
775         * Scripts/process-webcontent-sandbox-entitlements.sh: Removed.
776         * WebKit.xcodeproj/project.pbxproj:
777
778 2019-02-07  Alex Christensen  <achristensen@webkit.org>
779
780         Fix internal build after r241127
781         https://bugs.webkit.org/show_bug.cgi?id=191394
782
783         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
784         Add some (un)availability macros.
785
786 2019-02-07  Youenn Fablet  <youenn@apple.com>
787
788         Make to clear sources from UserMediaCaptureManagerProxy and UserMediaCaptureManager when no longer needed
789         https://bugs.webkit.org/show_bug.cgi?id=194312
790
791         Reviewed by Eric Carlson.
792
793         Sources in UserMediaCaptureManager and Proxy are never removed once added to their HashMap.
794         Use the 'ended' mechanism to do the clean-up on WebProcess side.
795         As part of this clean-up, send IPC to UIProcess to do clean-up on proxy side.
796         On WebProcess crash case, clean-up the proxy as well.
797
798         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
799         (WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):
800         (WebKit::UserMediaCaptureManagerProxy::end):
801         (WebKit::UserMediaCaptureManagerProxy::clear):
802         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
803         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
804         * UIProcess/WebProcessProxy.cpp:
805         (WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch):
806         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
807         (WebKit::UserMediaCaptureManager::sourceEnded):
808         * WebProcess/cocoa/UserMediaCaptureManager.h:
809
810 2019-02-07  Alex Christensen  <achristensen@webkit.org>
811
812         Print backgrounds preference should be honored instead of WKWebViewConfiguration value
813         https://bugs.webkit.org/show_bug.cgi?id=194364
814         <rdar://problem/47627599>
815
816         Reviewed by Tim Horton.
817
818         Without this patch, changing the preference for printing the background has no effect.
819         This patch fixes that, and I verified it manually by checking "Print backgrounds" in Safari's print menu.
820         Unfortunately, the only way to test this is actually printing because only values from WebPageProxy::preferences
821         or WebPageProxy::configuration's preferences are exposed to the API, but values from WebPageProxy::preferencesStore
822         are used when printing.  Actually printing verifies this change fixes the bug.
823
824         * UIProcess/API/Cocoa/WKWebView.mm:
825         (-[WKWebView _initializeWithConfiguration:]):
826
827 2019-02-07  Chris Dumez  <cdumez@apple.com>
828
829         Mark DisplayLink as fast allocated
830         https://bugs.webkit.org/show_bug.cgi?id=194400
831
832         Reviewed by Geoffrey Garen.
833
834         * UIProcess/mac/DisplayLink.h:
835
836 2019-02-07  Per Arne Vollan  <pvollan@apple.com>
837
838         [macOS] API test times out after r241026
839         https://bugs.webkit.org/show_bug.cgi?id=194372
840
841         Reviewed by Alex Christensen.
842
843         The API test TestWebKitAPI.RenderingProgress.FirstMeaningfulPaint times out after r241026.
844         A new function pointer, layoutMilestones, is added to WKBundlePageLoaderClient, in order
845         for clients to decide which milestones they would like to listen for.
846
847         * WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h:
848         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
849         (layoutMilestones):
850         (setUpPageLoaderClient):
851         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
852         (WebKit::InjectedBundlePageLoaderClient::layoutMilestones const):
853         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
854
855 2019-02-07  Alex Christensen  <achristensen@webkit.org>
856
857         Deprecate WKBundlePageSetDefersLoading
858         https://bugs.webkit.org/show_bug.cgi?id=191394
859
860         Reviewed by Dean Jackson.
861
862         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
863         (WKBundlePageSetDefersLoading):
864         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
865         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
866         (-[WKWebProcessPlugInBrowserContextController _defersLoading]):
867         (-[WKWebProcessPlugInBrowserContextController _setDefersLoading:]):
868         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
869
870 2019-02-07  Alex Christensen  <achristensen@webkit.org>
871
872         Digital crown should scroll safe browsing warning on watchOS
873         https://bugs.webkit.org/show_bug.cgi?id=194363
874         <rdar://problem/47348124>
875
876         Reviewed by Wenson Hsieh.
877
878         * UIProcess/Cocoa/WKSafeBrowsingWarning.h:
879         * UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
880         (-[WKSafeBrowsingWarning initWithFrame:safeBrowsingWarning:completionHandler:]):
881         (-[WKSafeBrowsingWarning addContent]):
882
883 2019-02-07  Alex Christensen  <achristensen@webkit.org>
884
885         Shrink and hyphenate safe browsing warning text on watchOS
886         https://bugs.webkit.org/show_bug.cgi?id=194361
887         <rdar://problem/47466549>
888
889         Reviewed by Geoffrey Garen.
890
891         Some internationalizations use long words that didn't fit on small watches.
892
893         * UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
894         (fontOfSize):
895         (-[WKSafeBrowsingWarning addContent]):
896         (-[WKSafeBrowsingTextView initWithAttributedString:forWarning:]):
897
898 2019-02-07  Miguel Gomez  <magomez@igalia.com>
899
900         [WPE] Implement GStreamer based holepunch
901         https://bugs.webkit.org/show_bug.cgi?id=193715
902
903         Reviewed by Xabier Rodriguez-Calvar.
904
905         Add a new parameter to the calls of TextureMapper::drawSolidColor().
906
907         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
908         (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
909
910 2019-02-06  Benjamin Poulain  <benjamin@webkit.org>
911
912         Unreviewed, rolling out r240759 and r240944.
913
914         Some timer uses are done off the main thread, WebCore::Timer
915         cannot be used
916
917         Reverted changesets:
918
919         "<rdar://problem/47570443> Responsiveness timers are too
920         expensive for frequent events"
921         https://bugs.webkit.org/show_bug.cgi?id=194003
922         https://trac.webkit.org/changeset/240759
923
924         "Use deferrable timer to restart the Responsiveness Timer on
925         each wheel event"
926         https://bugs.webkit.org/show_bug.cgi?id=194135
927         https://trac.webkit.org/changeset/240944
928
929 2019-02-06  chris fleizach  <cfleizach@apple.com>
930
931         AX:  com.apple.WebKit.WebContent at WebKit: -[WKAccessibilityWebPageObjectBase axObjectCache]
932         https://bugs.webkit.org/show_bug.cgi?id=194306
933         <rdar://problem/47764549>
934
935         Reviewed by Zalan Bujtas.
936
937         Check the page reference is still valid.
938         Modernize code in this area.
939
940         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
941
942 2019-02-06  Daniel Bates  <dabates@apple.com>
943
944         Move toNSEventModifierFlags() and toNSButtonNumber() to WebEventFactory.mm
945         https://bugs.webkit.org/show_bug.cgi?id=194321
946
947         Reviewed by Jer Noble.
948
949         Move some code to WebEventFactory so that it can be shared by both WKNavigationAction.mm
950         and UIDelegate.mm among other benefits.
951
952         * Shared/mac/WebEventFactory.h:
953         * Shared/mac/WebEventFactory.mm:
954         (WebKit::WebEventFactory::toNSEventModifierFlags):
955         (WebKit::WebEventFactory::toNSButtonNumber):
956         * UIProcess/API/Cocoa/WKNavigationAction.mm:
957         (-[WKNavigationAction modifierFlags]):
958         (-[WKNavigationAction buttonNumber]):
959         (toNSEventModifierFlags): Deleted.
960         (toNSButtonNumber): Deleted.
961         * UIProcess/Cocoa/UIDelegate.mm:
962         (WebKit::UIDelegate::UIClient::mouseDidMoveOverElement):
963         (WebKit::toNSEventModifierFlags): Deleted.
964
965 2019-02-06  Andy Estes  <aestes@apple.com>
966
967         [Payment Request] It should be possible to require a phonetic name for shipping contacts
968         https://bugs.webkit.org/show_bug.cgi?id=194311
969         <rdar://46733045>
970
971         Reviewed by Alex Christensen.
972
973         * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
974         (WebKit::WebPaymentCoordinator::supportsVersion): Deleted.
975         * WebProcess/ApplePay/WebPaymentCoordinator.h:
976
977 2019-02-06  Keith Rollin  <krollin@apple.com>
978
979         Really enable the automatic checking and regenerations of .xcfilelists during builds
980         https://bugs.webkit.org/show_bug.cgi?id=194357
981         <rdar://problem/47861231>
982
983         Reviewed by Chris Dumez.
984
985         Bug 194124 was supposed to enable the automatic checking and
986         regenerating of .xcfilelist files during the build. While related
987         changes were included in that patch, the change to actually enable the
988         operation somehow was omitted. This patch actually enables the
989         operation. The check-xcfilelist.sh scripts now check
990         WK_DISABLE_CHECK_XCFILELISTS, and if it's "1", opts-out the developer
991         from the checking.
992
993         * Scripts/check-xcfilelists.sh:
994
995 2019-02-06  John Wilander  <wilander@apple.com>
996
997         Forward Ad Click Attribution data from HTMLAnchorElement::handleClick() to WebKit::NavigationActionData
998         https://bugs.webkit.org/show_bug.cgi?id=194325
999         <rdar://problem/47840283>
1000
1001         Reviewed by Chris Dumez.
1002
1003         * Shared/NavigationActionData.cpp:
1004         (WebKit::NavigationActionData::encode const):
1005         (WebKit::NavigationActionData::decode):
1006         * Shared/NavigationActionData.h:
1007             Now holds an optional WebCore::AdClickAttribution object.
1008
1009 2019-02-06  Daniel Bates  <dabates@apple.com>
1010
1011         Fix the Apple Internal build. See <rdar://problem/47860943> for more details.
1012
1013         * UIProcess/ios/fullscreen/WKFullscreenStackView.mm:
1014         (-[WKFullscreenStackView init]):
1015
1016 2019-02-06  Daniel Bates  <dabates@apple.com>
1017
1018         Standardize on ControlKey instead of CtrlKey
1019         https://bugs.webkit.org/show_bug.cgi?id=194317
1020
1021         Reviewed by Tim Horton.
1022
1023         * Shared/WebEventConversion.cpp:
1024         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
1025         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
1026         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
1027         (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
1028         (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
1029         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
1030         (WebKit::WebEditorClient::handleKeyboardEvent):
1031         * WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp:
1032         (WebKit::handleKeyPress):
1033
1034 2019-02-06  Per Arne Vollan  <pvollan@apple.com>
1035
1036         Roll out parts of r238819 since it is a PLT performance regression.
1037         https://bugs.webkit.org/show_bug.cgi?id=194346
1038
1039         Unreviewed performance fix.
1040
1041         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1042         (didStartProvisionalLoadForFrame):
1043         (didReceiveServerRedirectForProvisionalLoadForFrame):
1044         (didFinishLoadForFrame):
1045         (globalObjectIsAvailableForFrame):
1046         (didRemoveFrameFromHierarchy):
1047         (didCommitLoadForFrame):
1048         (didFinishDocumentLoadForFrame):
1049         (didFailProvisionalLoadWithErrorForFrame):
1050         (didFailLoadWithErrorForFrame):
1051         (didSameDocumentNavigationForFrame):
1052         (didLayoutForFrame):
1053         (didReachLayoutMilestone):
1054         (didFirstVisuallyNonEmptyLayoutForFrame):
1055         (didHandleOnloadEventsForFrame):
1056         (userAgentForURL):
1057         (setUpPageLoaderClient):
1058         (willSendRequestForFrame):
1059         (didInitiateLoadForResource):
1060         (didFinishLoadForResource):
1061         (didFailLoadForResource):
1062         (setUpResourceLoadClient):
1063         (-[WKWebProcessPlugInBrowserContextController setLoadDelegate:]):
1064         (ResourceLoadClient::ResourceLoadClient): Deleted.
1065         (ResourceLoadClient::loadDelegate const): Deleted.
1066         (ResourceLoadClient::pluginContextController const): Deleted.
1067         (PageLoaderClient::PageLoaderClient): Deleted.
1068         (PageLoaderClient::loadDelegate const): Deleted.
1069         (PageLoaderClient::pluginContextController const): Deleted.
1070         (PageLoaderClient::didStartProvisionalLoadForFrame): Deleted.
1071         (PageLoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame): Deleted.
1072         (PageLoaderClient::didFinishLoadForFrame): Deleted.
1073         (PageLoaderClient::globalObjectIsAvailableForFrame): Deleted.
1074         (PageLoaderClient::didRemoveFrameFromHierarchy): Deleted.
1075         (PageLoaderClient::didCommitLoadForFrame): Deleted.
1076         (PageLoaderClient::didFinishDocumentLoadForFrame): Deleted.
1077         (PageLoaderClient::didFailProvisionalLoadWithErrorForFrame): Deleted.
1078         (PageLoaderClient::didFailLoadWithErrorForFrame): Deleted.
1079         (PageLoaderClient::didSameDocumentNavigationForFrame): Deleted.
1080         (PageLoaderClient::didLayoutForFrame): Deleted.
1081         (PageLoaderClient::didReachLayoutMilestone): Deleted.
1082         (PageLoaderClient::didFirstVisuallyNonEmptyLayoutForFrame): Deleted.
1083         (PageLoaderClient::layoutMilestones const): Deleted.
1084         (PageLoaderClient::didHandleOnloadEventsForFrame): Deleted.
1085         (PageLoaderClient::userAgentForURL const): Deleted.
1086         (ResourceLoadClient::willSendRequestForFrame): Deleted.
1087         (ResourceLoadClient::didInitiateLoadForResource): Deleted.
1088         (ResourceLoadClient::didFinishLoadForResource): Deleted.
1089         (ResourceLoadClient::didFailLoadForResource): Deleted.
1090
1091 2019-02-06  Michael Catanzaro  <mcatanzaro@igalia.com>
1092
1093         REGRESSION(r240785): [SOUP] Broke cookie persistent storage
1094         https://bugs.webkit.org/show_bug.cgi?id=194209
1095
1096         Reviewed by Carlos Garcia Campos.
1097
1098         I missed a spot when moving the persistent storage parameters from NetworkProcess to
1099         NetworkSession. They have to be initialized separately for the default session.
1100
1101         * UIProcess/soup/WebProcessPoolSoup.cpp:
1102         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
1103
1104 2019-02-05  Alex Christensen  <achristensen@webkit.org>
1105
1106         Stop using blobRegistry in NetworkProcess
1107         https://bugs.webkit.org/show_bug.cgi?id=194027
1108
1109         Reviewed by Youenn Fablet.
1110
1111         * NetworkProcess/Downloads/DownloadManager.cpp:
1112         (WebKit::DownloadManager::startDownload):
1113         * NetworkProcess/Downloads/PendingDownload.cpp:
1114         (WebKit::PendingDownload::PendingDownload):
1115         * NetworkProcess/Downloads/PendingDownload.h:
1116         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
1117         (WebKit::NetworkBlobRegistry::registerFileBlobURL):
1118         (WebKit::NetworkBlobRegistry::registerBlobURL):
1119         (WebKit::NetworkBlobRegistry::registerBlobURLOptionallyFileBacked):
1120         (WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
1121         (WebKit::NetworkBlobRegistry::unregisterBlobURL):
1122         (WebKit::NetworkBlobRegistry::blobSize):
1123         (WebKit::NetworkBlobRegistry::writeBlobsToTemporaryFiles):
1124         (WebKit::NetworkBlobRegistry::writeBlobToFilePath):
1125         (WebKit::NetworkBlobRegistry::connectionToWebProcessDidClose):
1126         (WebKit::NetworkBlobRegistry::filesInBlob):
1127         (WebKit::NetworkBlobRegistry::singleton): Deleted.
1128         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
1129         (WebKit::NetworkBlobRegistry::blobRegistry):
1130         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1131         (WebKit::NetworkConnectionToWebProcess::didClose):
1132         (WebKit::NetworkConnectionToWebProcess::resolveBlobReferences):
1133         (WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
1134         (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
1135         (WebKit::NetworkConnectionToWebProcess::loadPing):
1136         (WebKit::NetworkConnectionToWebProcess::preconnectTo):
1137         (WebKit::NetworkConnectionToWebProcess::registerFileBlobURL):
1138         (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
1139         (WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL):
1140         (WebKit::NetworkConnectionToWebProcess::registerBlobURLOptionallyFileBacked):
1141         (WebKit::NetworkConnectionToWebProcess::registerBlobURLForSlice):
1142         (WebKit::NetworkConnectionToWebProcess::unregisterBlobURL):
1143         (WebKit::NetworkConnectionToWebProcess::blobSize):
1144         (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
1145         (WebKit::NetworkConnectionToWebProcess::filesInBlob):
1146         (WebKit::NetworkConnectionToWebProcess::blobRegistry):
1147         * NetworkProcess/NetworkConnectionToWebProcess.h:
1148         * NetworkProcess/NetworkDataTask.cpp:
1149         (WebKit::NetworkDataTask::create):
1150         * NetworkProcess/NetworkDataTaskBlob.cpp:
1151         (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
1152         * NetworkProcess/NetworkDataTaskBlob.h:
1153         * NetworkProcess/NetworkLoad.cpp:
1154         (WebKit::NetworkLoad::NetworkLoad):
1155         (WebKit::NetworkLoad::initialize):
1156         * NetworkProcess/NetworkLoad.h:
1157         * NetworkProcess/NetworkProcess.cpp:
1158         (WebKit::NetworkProcess::NetworkProcess):
1159         (WebKit::NetworkProcess::removeNetworkConnectionToWebProcess):
1160         * NetworkProcess/NetworkProcess.h:
1161         (WebKit::NetworkProcess::networkBlobRegistry):
1162         * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
1163         (WebKit::NetworkProcessPlatformStrategies::createBlobRegistry):
1164         * NetworkProcess/NetworkResourceLoader.cpp:
1165         (WebKit::m_shouldCaptureExtraNetworkLoadMetrics):
1166         (WebKit::NetworkResourceLoader::startNetworkLoad):
1167         * NetworkProcess/PreconnectTask.cpp:
1168         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
1169         (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
1170
1171 2019-02-05  Daniel Bates  <dabates@apple.com>
1172
1173         Fix a typo in r241006. Substitute Modifier for Modifiers.
1174
1175         * Shared/mac/NativeWebGestureEventMac.mm:
1176         (WebKit::NativeWebGestureEvent::NativeWebGestureEvent):
1177
1178 2019-02-05  Daniel Bates  <dabates@apple.com>
1179
1180         Attempt to fix the build following r241000
1181         (https://bugs.webkit.org/show_bug.cgi?id=194241)
1182
1183         Substitute OptionSet<WebEvent::Modifier> for Modifiers.
1184
1185         * Shared/mac/NativeWebGestureEventMac.mm:
1186         (WebKit::NativeWebGestureEvent::NativeWebGestureEvent):
1187         * Shared/mac/WebGestureEvent.h:
1188         (WebKit::WebGestureEvent::WebGestureEvent):
1189
1190 2019-02-05  Truitt Savell  <tsavell@apple.com>
1191
1192         Unreviewed, rolling out r240984.
1193
1194         Revision casued two API timeouts
1195
1196         Reverted changeset:
1197
1198         "Stop using blobRegistry in NetworkProcess"
1199         https://bugs.webkit.org/show_bug.cgi?id=194027
1200         https://trac.webkit.org/changeset/240984
1201
1202 2019-02-05  Youenn Fablet  <youenn@apple.com>
1203
1204         UserMediaPermissionRequestManagerProxy lambdas should check for 'this' being valid
1205         https://bugs.webkit.org/show_bug.cgi?id=194246
1206
1207         Reviewed by Eric Carlson.
1208
1209         With PSON enabled, the manager proxy can be destroyed.
1210         It is thus important for its callbacks to check for 'this' to be valid.
1211
1212         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
1213         (WebKit::UserMediaPermissionRequestManagerProxy::captureDevicesChanged):
1214         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
1215         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
1216
1217 2019-02-05  Daniel Bates  <dabates@apple.com>
1218
1219         Attempt to fix the build following r241000
1220         (https://bugs.webkit.org/show_bug.cgi?id=194241)
1221
1222         Substitute WebEvent::Modifier::CapsLockKey for WebEvent::CapsLockKey.
1223
1224         * Shared/gtk/WebEventFactory.cpp:
1225         (WebKit::modifiersForEvent):
1226         * Shared/mac/WebEventFactory.mm:
1227         (WebKit::modifiersForEvent):
1228         * UIProcess/API/Cocoa/WKNavigationAction.mm:
1229         (toNSEventModifierFlags):
1230         * UIProcess/Automation/WebAutomationSession.cpp:
1231         (WebKit::protocolModifierToWebEventModifier):
1232         * UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp:
1233         (WebKit::modifiersToEventState):
1234         * UIProcess/Automation/mac/WebAutomationSessionMac.mm:
1235         (WebKit::WebAutomationSession::platformSimulateMouseInteraction):
1236         * UIProcess/Cocoa/UIDelegate.mm:
1237         (WebKit::toNSEventModifierFlags):
1238
1239 2019-02-05  Daniel Bates  <dabates@apple.com>
1240
1241         Make WebEvent::Modifiers an OptionSet
1242         https://bugs.webkit.org/show_bug.cgi?id=194241
1243
1244         Reviewed by Simon Fraser.
1245
1246         Use an OptionSet to represent the bitmask of keyboard modifier flags. This improves type safety
1247         and makes debugging more enjoyable because our LLDB pretty-printers have built-in support for
1248         OptionSet.
1249
1250         While I am at it, make WebEvent::Modifier an enum class. It is currently an enum. This makes
1251         this enum more closely match WebCore::PlatformEvent::Modifier.
1252
1253         * Shared/API/c/WKSharedAPICast.h:
1254         (WebKit::toAPI):
1255         * Shared/NavigationActionData.cpp:
1256         (WebKit::NavigationActionData::encode const):
1257         (WebKit::NavigationActionData::decode):
1258         * Shared/NavigationActionData.h:
1259         * Shared/WebEvent.cpp:
1260         (WebKit::WebEvent::WebEvent):
1261         * Shared/WebEvent.h:
1262         (WebKit::WebEvent::shiftKey const):
1263         (WebKit::WebEvent::controlKey const):
1264         (WebKit::WebEvent::altKey const):
1265         (WebKit::WebEvent::metaKey const):
1266         (WebKit::WebEvent::capsLockKey const):
1267         (WebKit::WebEvent::modifiers const):
1268         (WebKit::WebTouchEvent::WebTouchEvent):
1269         * Shared/WebEventConversion.cpp:
1270         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
1271         * Shared/WebKeyboardEvent.cpp:
1272         (WebKit::WebKeyboardEvent::WebKeyboardEvent):
1273         * Shared/WebMouseEvent.cpp:
1274         (WebKit::WebMouseEvent::WebMouseEvent):
1275         * Shared/WebTouchEvent.cpp:
1276         (WebKit::WebTouchEvent::WebTouchEvent):
1277         * Shared/WebWheelEvent.cpp:
1278         (WebKit::WebWheelEvent::WebWheelEvent):
1279         * Shared/gtk/WebEventFactory.cpp:
1280         (WebKit::modifiersForEvent):
1281         * Shared/ios/NativeWebTouchEventIOS.mm:
1282         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
1283         * Shared/ios/WebIOSEventFactory.mm:
1284         (modifiersForEvent):
1285         (WebIOSEventFactory::createWebKeyboardEvent):
1286         (WebIOSEventFactory::createWebMouseEvent):
1287         * Shared/libwpe/WebEventFactory.cpp:
1288         (WebKit::modifiersForEventModifiers):
1289         (WebKit::WebEventFactory::createWebWheelEvent):
1290         (WebKit::WebEventFactory::createWebTouchEvent):
1291         * Shared/mac/WebEventFactory.mm:
1292         (WebKit::modifiersForEvent):
1293         (WebKit::WebEventFactory::createWebMouseEvent):
1294         (WebKit::WebEventFactory::createWebWheelEvent):
1295         (WebKit::WebEventFactory::createWebKeyboardEvent):
1296         * Shared/win/WebEventFactory.cpp:
1297         (WebKit::modifiersForEvent):
1298         (WebKit::modifiersForCurrentKeyState):
1299         (WebKit::WebEventFactory::createWebMouseEvent):
1300         (WebKit::WebEventFactory::createWebWheelEvent):
1301         (WebKit::WebEventFactory::createWebKeyboardEvent):
1302         * UIProcess/API/APINavigationAction.h:
1303         * UIProcess/API/APIUIClient.h:
1304         (API::UIClient::mouseDidMoveOverElement):
1305         * UIProcess/API/C/WKPage.cpp:
1306         (WKPageSetPageUIClient):
1307         * UIProcess/API/Cocoa/WKNavigationAction.mm:
1308         (toNSEventModifierFlags):
1309         * UIProcess/API/glib/WebKitPrivate.cpp:
1310         (toPlatformModifiers):
1311         * UIProcess/API/glib/WebKitPrivate.h:
1312         * UIProcess/API/glib/WebKitUIClient.cpp:
1313         * UIProcess/API/glib/WebKitWebView.cpp:
1314         (webkitWebViewMouseTargetChanged):
1315         * UIProcess/API/glib/WebKitWebViewPrivate.h:
1316         * UIProcess/Automation/WebAutomationSession.cpp:
1317         (WebKit::WebAutomationSession::simulateMouseInteraction):
1318         (WebKit::protocolModifierToWebEventModifier):
1319         (WebKit::WebAutomationSession::performMouseInteraction):
1320         * UIProcess/Automation/WebAutomationSession.h:
1321         * UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp:
1322         (WebKit::modifiersToEventState):
1323         (WebKit::WebAutomationSession::platformSimulateMouseInteraction):
1324         * UIProcess/Automation/mac/WebAutomationSessionMac.mm:
1325         (WebKit::WebAutomationSession::platformSimulateMouseInteraction):
1326         * UIProcess/Automation/wpe/WebAutomationSessionWPE.cpp:
1327         (WebKit::modifiersToEventState):
1328         (WebKit::WebAutomationSession::platformSimulateMouseInteraction):
1329         * UIProcess/Cocoa/UIDelegate.h:
1330         * UIProcess/Cocoa/UIDelegate.mm:
1331         (WebKit::toNSEventModifierFlags):
1332         (WebKit::UIDelegate::UIClient::mouseDidMoveOverElement):
1333         * UIProcess/WebPageProxy.cpp:
1334         (WebKit::WebPageProxy::mouseDidMoveOverElement):
1335         * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
1336         (API::InjectedBundle::PageUIClient::mouseDidMoveOverElement):
1337         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
1338         (WebKit::InjectedBundleNavigationAction::modifiersForNavigationAction):
1339         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
1340         (WebKit::InjectedBundleNavigationAction::modifiers const):
1341         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
1342         (WebKit::InjectedBundlePageUIClient::mouseDidMoveOverElement):
1343         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
1344         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1345         (WebKit::PDFPlugin::showContextMenuAtPoint):
1346         * WebProcess/Plugins/PluginView.cpp:
1347         (WebKit::PluginView::createWebEvent const):
1348         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1349         (WebKit::WebChromeClient::mouseDidMoveOverElement):
1350         * WebProcess/WebPage/WebPage.cpp:
1351         (WebKit::WebPage::simulateMouseDown):
1352         (WebKit::WebPage::simulateMouseUp):
1353         (WebKit::WebPage::simulateMouseMotion):
1354
1355 2019-02-05  Tim Horton  <timothy_horton@apple.com>
1356
1357         Reproducible crash under WKShareSheet presentWithParameters when cancelling a share
1358         https://bugs.webkit.org/show_bug.cgi?id=194301
1359         <rdar://problem/47719379>
1360
1361         Reviewed by Beth Dakin.
1362
1363         * UIProcess/Cocoa/WKShareSheet.mm:
1364         (-[WKShareSheet presentWithParameters:completionHandler:]):
1365         NSSharingServicePicker's delegate callbacks can be called synchronously.
1366         We release the WKShareSheet (which holds our reference to the NSSharingServicePicker)
1367         under sharingServicePicker:didChooseSharingService:. On older versions of macOS,
1368         there was nothing keeping the NSSharingServicePicker alive inside
1369         showRelativeToRect:ofView:preferredEdge:, thus the whole chain of references would
1370         fall and result in sending a message to a released NSSharingServicePicker.
1371         To resolve this, keep an extra reference to the WKShareSheet until
1372         presentation is complete.
1373
1374 2019-02-05  Keith Rollin  <krollin@apple.com>
1375
1376         Enable the automatic checking and regenerations of .xcfilelists during builds
1377         https://bugs.webkit.org/show_bug.cgi?id=194124
1378         <rdar://problem/47721277>
1379
1380         Reviewed by Tim Horton.
1381
1382         Bug 193790 add a facility for checking -- during build time -- that
1383         any needed .xcfilelist files are up-to-date and for updating them if
1384         they are not. This facility was initially opt-in by setting
1385         WK_ENABLE_CHECK_XCFILELISTS until other pieces were in place and until
1386         the process seemed robust. Its now time to enable this facility and
1387         make it opt-out. If there is a need to disable this facility, set and
1388         export WK_DISABLE_CHECK_XCFILELISTS=1 in your environment before
1389         running `make` or `build-webkit`, or before running Xcode from the
1390         command line.
1391
1392         Additionally, remove the step that generates a list of source files
1393         going into the UnifiedSources build step. It's only necessarily to
1394         specify Sources.txt and SourcesCocoa.txt as inputs.
1395
1396         * UnifiedSources-input.xcfilelist: Removed.
1397         * WebKit.xcodeproj/project.pbxproj:
1398
1399 2019-02-05  Brady Eidson  <beidson@apple.com>
1400
1401         Add a new DownloadMap type that manages taking an assertion automatically.
1402         https://bugs.webkit.org/show_bug.cgi?id=194294
1403
1404         Reviewed by Alex Christensen.
1405
1406         If we don't need the download assertion, we use a vanilla HashMap like today.
1407         If we need the download assertion, we use the new DownloadMap class instead.
1408
1409         The new DownloadMap is a wrapper around a HashMap that also creates/destroys the assertion as needed.
1410
1411         * NetworkProcess/Downloads/DownloadManager.cpp:
1412         (WebKit::DownloadManager::dataTaskBecameDownloadTask):
1413         (WebKit::DownloadManager::downloadFinished):
1414         * NetworkProcess/Downloads/DownloadManager.h:
1415
1416         * NetworkProcess/Downloads/DownloadMap.cpp: Added.
1417         (WebKit::DownloadMap::get const):
1418         (WebKit::DownloadMap::isEmpty const):
1419         (WebKit::DownloadMap::size const):
1420         (WebKit::DownloadMap::contains const):
1421         (WebKit::DownloadMap::add):
1422         (WebKit::DownloadMap::remove):
1423         * NetworkProcess/Downloads/DownloadMap.h: Added.
1424
1425         * Sources.txt:
1426
1427         * UIProcess/ios/ProcessAssertionIOS.mm:
1428         (WebKit::ProcessAssertion::ProcessAssertion):
1429
1430         * WebKit.xcodeproj/project.pbxproj:
1431
1432 2019-02-05  Brady Eidson  <beidson@apple.com>
1433
1434         Fix iOS simulator build after r240954
1435
1436         Unreviewed.
1437
1438         * UIProcess/ios/ProcessAssertionIOS.mm:
1439         (WebKit::ProcessAssertion::ProcessAssertion): Implement the new constructor.
1440
1441 2019-02-05  Alex Christensen  <achristensen@webkit.org>
1442
1443         Stop using blobRegistry in NetworkProcess
1444         https://bugs.webkit.org/show_bug.cgi?id=194027
1445
1446         Reviewed by Youenn Fablet.
1447
1448         * NetworkProcess/Downloads/DownloadManager.cpp:
1449         (WebKit::DownloadManager::startDownload):
1450         * NetworkProcess/Downloads/PendingDownload.cpp:
1451         (WebKit::PendingDownload::PendingDownload):
1452         * NetworkProcess/Downloads/PendingDownload.h:
1453         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
1454         (WebKit::NetworkBlobRegistry::registerFileBlobURL):
1455         (WebKit::NetworkBlobRegistry::registerBlobURL):
1456         (WebKit::NetworkBlobRegistry::registerBlobURLOptionallyFileBacked):
1457         (WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
1458         (WebKit::NetworkBlobRegistry::unregisterBlobURL):
1459         (WebKit::NetworkBlobRegistry::blobSize):
1460         (WebKit::NetworkBlobRegistry::writeBlobsToTemporaryFiles):
1461         (WebKit::NetworkBlobRegistry::writeBlobToFilePath):
1462         (WebKit::NetworkBlobRegistry::connectionToWebProcessDidClose):
1463         (WebKit::NetworkBlobRegistry::filesInBlob):
1464         (WebKit::NetworkBlobRegistry::singleton): Deleted.
1465         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
1466         (WebKit::NetworkBlobRegistry::blobRegistry):
1467         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1468         (WebKit::NetworkConnectionToWebProcess::didClose):
1469         (WebKit::NetworkConnectionToWebProcess::resolveBlobReferences):
1470         (WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
1471         (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
1472         (WebKit::NetworkConnectionToWebProcess::loadPing):
1473         (WebKit::NetworkConnectionToWebProcess::preconnectTo):
1474         (WebKit::NetworkConnectionToWebProcess::registerFileBlobURL):
1475         (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
1476         (WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL):
1477         (WebKit::NetworkConnectionToWebProcess::registerBlobURLOptionallyFileBacked):
1478         (WebKit::NetworkConnectionToWebProcess::registerBlobURLForSlice):
1479         (WebKit::NetworkConnectionToWebProcess::unregisterBlobURL):
1480         (WebKit::NetworkConnectionToWebProcess::blobSize):
1481         (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
1482         (WebKit::NetworkConnectionToWebProcess::filesInBlob):
1483         (WebKit::NetworkConnectionToWebProcess::blobRegistry):
1484         * NetworkProcess/NetworkConnectionToWebProcess.h:
1485         * NetworkProcess/NetworkDataTask.cpp:
1486         (WebKit::NetworkDataTask::create):
1487         * NetworkProcess/NetworkDataTaskBlob.cpp:
1488         (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
1489         * NetworkProcess/NetworkDataTaskBlob.h:
1490         * NetworkProcess/NetworkLoad.cpp:
1491         (WebKit::NetworkLoad::NetworkLoad):
1492         (WebKit::NetworkLoad::initialize):
1493         * NetworkProcess/NetworkLoad.h:
1494         * NetworkProcess/NetworkProcess.cpp:
1495         (WebKit::NetworkProcess::NetworkProcess):
1496         (WebKit::NetworkProcess::removeNetworkConnectionToWebProcess):
1497         * NetworkProcess/NetworkProcess.h:
1498         (WebKit::NetworkProcess::networkBlobRegistry):
1499         * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
1500         (WebKit::NetworkProcessPlatformStrategies::createBlobRegistry):
1501         * NetworkProcess/NetworkResourceLoader.cpp:
1502         (WebKit::m_shouldCaptureExtraNetworkLoadMetrics):
1503         (WebKit::NetworkResourceLoader::startNetworkLoad):
1504         * NetworkProcess/PreconnectTask.cpp:
1505         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
1506         (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
1507
1508 2019-02-05  Ryan Haddad  <ryanhaddad@apple.com>
1509
1510         Unreviewed, rolling out r240742.
1511
1512         Causes crashes on iOS simulator.
1513
1514         Reverted changeset:
1515
1516         "[iOS] Keyups for non-modifier keys identified as "Dead" when
1517         not focused in a content-editable element"
1518         https://bugs.webkit.org/show_bug.cgi?id=192824
1519         https://trac.webkit.org/changeset/240742
1520
1521 2019-02-05  Alex Christensen  <achristensen@webkit.org>
1522
1523         Protect globalWebSocketStreamMap with a Lock
1524         https://bugs.webkit.org/show_bug.cgi?id=194224
1525         <rdar://problem/47581081>
1526
1527         Reviewed by Ryosuke Niwa.
1528
1529         * WebProcess/Network/WebSocketStream.cpp:
1530         (WebKit::WebSocketStream::streamWithIdentifier):
1531         (WebKit::WebSocketStream::networkProcessCrashed):
1532         (WebKit::WebSocketStream::WebSocketStream):
1533         (WebKit::WebSocketStream::~WebSocketStream):
1534
1535 2019-02-04  Alex Christensen  <achristensen@webkit.org>
1536
1537         Add Networking Daemon skeleton
1538         https://bugs.webkit.org/show_bug.cgi?id=194278
1539
1540         Reviewed by Zalan Bujtas.
1541
1542         Daemon skeletons? This is spooky stuff.
1543
1544         * NetworkProcess/EntryPoint/Cocoa/Daemon/DaemonEntryPoint.h: Added.
1545         * NetworkProcess/EntryPoint/Cocoa/Daemon/DaemonEntryPoint.mm: Added.
1546         (WebKit::DaemonMain):
1547         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
1548         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
1549         (WebKit::NetworkDataTaskCocoa::restrictRequestReferrerToOriginIfNeeded):
1550         * Shared/API/Cocoa/WKMain.h:
1551         * Shared/API/Cocoa/WKMain.mm:
1552         (WKDaemonMain):
1553         * Shared/EntryPointUtilities/Cocoa/AuxiliaryProcessMain.cpp:
1554         (main):
1555         * SourcesCocoa.txt:
1556         * UnifiedSources-input.xcfilelist:
1557         * WebKit.xcodeproj/project.pbxproj:
1558
1559 2019-02-04  Yusuke Suzuki  <ysuzuki@apple.com>
1560
1561         [JSC] Shrink size of VM by lazily allocating IsoSubspaces for non-common types
1562         https://bugs.webkit.org/show_bug.cgi?id=193993
1563
1564         Reviewed by Keith Miller.
1565
1566         * WebProcess/Plugins/Netscape/JSNPMethod.h:
1567         * WebProcess/Plugins/Netscape/JSNPObject.h:
1568
1569 2019-02-04  Simon Fraser  <simon.fraser@apple.com>
1570
1571         Move some macOS/iOS scrolling code into the scrolling/cocoa directory
1572         https://bugs.webkit.org/show_bug.cgi?id=194245
1573
1574         Reviewed by Zalan Bujtas.
1575
1576         Use PLATFORM(MAC), not !PLATFORM(IOS_FAMILY).
1577
1578         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1579         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1580
1581 2019-02-04  Ms2ger  <Ms2ger@igalia.com>
1582
1583         [GTK][WPE] Need a function to convert internal URI to display ("pretty") URI
1584         https://bugs.webkit.org/show_bug.cgi?id=174816
1585
1586         Reviewed by Michael Catanzaro.
1587
1588         Add webkit_uri_for_display for GTK and WPE.
1589
1590         * PlatformGTK.cmake:
1591         * PlatformWPE.cmake:
1592         * SourcesGTK.txt:
1593         * SourcesWPE.txt:
1594         * UIProcess/API/glib/WebKitURIUtilities.cpp: Added.
1595         (webkit_uri_for_display):
1596         * UIProcess/API/gtk/WebKitURIUtilities.h: Added.
1597         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
1598         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
1599         * UIProcess/API/gtk/webkit2.h:
1600         * UIProcess/API/wpe/WebKitURIUtilities.h: Added.
1601         * UIProcess/API/wpe/docs/wpe-0.1-sections.txt:
1602         * UIProcess/API/wpe/docs/wpe-docs.sgml:
1603         * UIProcess/API/wpe/webkit.h:
1604
1605 2019-02-04  Alex Christensen  <achristensen@webkit.org>
1606
1607         Move XPCService main to a shared file calling a C function
1608         https://bugs.webkit.org/show_bug.cgi?id=194256
1609
1610         Reviewed by Brady Eidson.
1611
1612         This not only reduces a few kilobytes of duplicated binary from the XPCService executables,
1613         It will allow me to introduce a new kind of executable which will need to parse argv and call a different C function.
1614         This is similar to r236075 but more general.
1615
1616         * Shared/API/Cocoa/WKMain.h: Added.
1617         * Shared/API/Cocoa/WKMain.mm: Added.
1618         (WKXPCServiceMain):
1619         * Shared/EntryPointUtilities/Cocoa/AuxiliaryProcessMain.cpp: Added.
1620         (main):
1621         * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
1622         (main): Deleted.
1623         * SourcesCocoa.txt:
1624         * WebKit.xcodeproj/project.pbxproj:
1625
1626 2019-02-04  Alex Christensen  <achristensen@webkit.org>
1627
1628         Make MessageSender functions const
1629         https://bugs.webkit.org/show_bug.cgi?id=194247
1630
1631         Reviewed by Brady Eidson.
1632
1633         * NetworkProcess/Downloads/Download.cpp:
1634         (WebKit::Download::messageSenderConnection const):
1635         (WebKit::Download::messageSenderDestinationID const):
1636         (WebKit::Download::messageSenderConnection): Deleted.
1637         (WebKit::Download::messageSenderDestinationID): Deleted.
1638         * NetworkProcess/Downloads/Download.h:
1639         * NetworkProcess/Downloads/PendingDownload.cpp:
1640         (WebKit::PendingDownload::messageSenderConnection const):
1641         (WebKit::PendingDownload::messageSenderDestinationID const):
1642         (WebKit::PendingDownload::messageSenderConnection): Deleted.
1643         (WebKit::PendingDownload::messageSenderDestinationID): Deleted.
1644         * NetworkProcess/Downloads/PendingDownload.h:
1645         * NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:
1646         (WebKit::WebIDBConnectionToClient::messageSenderConnection const):
1647         (WebKit::WebIDBConnectionToClient::messageSenderConnection): Deleted.
1648         * NetworkProcess/IndexedDB/WebIDBConnectionToClient.h:
1649         * NetworkProcess/NetworkResourceLoader.cpp:
1650         (WebKit::NetworkResourceLoader::messageSenderConnection const):
1651         (WebKit::NetworkResourceLoader::messageSenderConnection): Deleted.
1652         * NetworkProcess/NetworkResourceLoader.h:
1653         * NetworkProcess/NetworkSocketStream.cpp:
1654         (WebKit::NetworkSocketStream::messageSenderConnection const):
1655         (WebKit::NetworkSocketStream::messageSenderDestinationID const):
1656         (WebKit::NetworkSocketStream::messageSenderConnection): Deleted.
1657         (WebKit::NetworkSocketStream::messageSenderDestinationID): Deleted.
1658         * NetworkProcess/NetworkSocketStream.h:
1659         * NetworkProcess/ServiceWorker/WebSWServerConnection.h:
1660         * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
1661         (WebKit::WebSWServerToContextConnection::messageSenderConnection const):
1662         (WebKit::WebSWServerToContextConnection::messageSenderDestinationID const):
1663         (WebKit::WebSWServerToContextConnection::messageSenderConnection): Deleted.
1664         (WebKit::WebSWServerToContextConnection::messageSenderDestinationID): Deleted.
1665         * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
1666         * Platform/IPC/MessageSender.h:
1667         * Shared/AuxiliaryProcess.cpp:
1668         (WebKit::AuxiliaryProcess::messageSenderConnection const):
1669         (WebKit::AuxiliaryProcess::messageSenderDestinationID const):
1670         (WebKit::AuxiliaryProcess::messageSenderConnection): Deleted.
1671         (WebKit::AuxiliaryProcess::messageSenderDestinationID): Deleted.
1672         * Shared/AuxiliaryProcess.h:
1673         * UIProcess/WebConnectionToWebProcess.cpp:
1674         (WebKit::WebConnectionToWebProcess::messageSenderConnection const):
1675         (WebKit::WebConnectionToWebProcess::messageSenderDestinationID const):
1676         (WebKit::WebConnectionToWebProcess::messageSenderConnection): Deleted.
1677         (WebKit::WebConnectionToWebProcess::messageSenderDestinationID): Deleted.
1678         * UIProcess/WebConnectionToWebProcess.h:
1679         * UIProcess/WebPageProxy.cpp:
1680         (WebKit::WebPageProxy::messageSenderConnection const):
1681         (WebKit::WebPageProxy::messageSenderDestinationID const):
1682         (WebKit::WebPageProxy::messageSenderConnection): Deleted.
1683         (WebKit::WebPageProxy::messageSenderDestinationID): Deleted.
1684         * UIProcess/WebPageProxy.h:
1685         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
1686         (WebKit::WebIDBConnectionToServer::messageSenderConnection const):
1687         (WebKit::WebIDBConnectionToServer::messageSenderConnection): Deleted.
1688         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
1689         * WebProcess/Network/WebResourceLoader.cpp:
1690         (WebKit::WebResourceLoader::messageSenderConnection const):
1691         (WebKit::WebResourceLoader::messageSenderDestinationID const):
1692         (WebKit::WebResourceLoader::messageSenderConnection): Deleted.
1693         (WebKit::WebResourceLoader::messageSenderDestinationID): Deleted.
1694         * WebProcess/Network/WebResourceLoader.h:
1695         * WebProcess/Network/WebSocketStream.cpp:
1696         (WebKit::WebSocketStream::messageSenderConnection const):
1697         (WebKit::WebSocketStream::messageSenderDestinationID const):
1698         (WebKit::WebSocketStream::messageSenderConnection): Deleted.
1699         (WebKit::WebSocketStream::messageSenderDestinationID): Deleted.
1700         * WebProcess/Network/WebSocketStream.h:
1701         * WebProcess/Storage/WebSWClientConnection.h:
1702         * WebProcess/WebConnectionToUIProcess.cpp:
1703         (WebKit::WebConnectionToUIProcess::messageSenderConnection const):
1704         (WebKit::WebConnectionToUIProcess::messageSenderDestinationID const):
1705         (WebKit::WebConnectionToUIProcess::messageSenderConnection): Deleted.
1706         (WebKit::WebConnectionToUIProcess::messageSenderDestinationID): Deleted.
1707         * WebProcess/WebConnectionToUIProcess.h:
1708         * WebProcess/WebPage/WebPage.cpp:
1709         (WebKit::WebPage::messageSenderConnection const):
1710         (WebKit::WebPage::messageSenderDestinationID const):
1711         (WebKit::WebPage::messageSenderConnection): Deleted.
1712         (WebKit::WebPage::messageSenderDestinationID): Deleted.
1713         * WebProcess/WebPage/WebPage.h:
1714
1715 2019-02-04  Brady Eidson  <beidson@apple.com>
1716
1717         Take additional process assertion while downloading.
1718         <rdar://problem/47741356> and https://bugs.webkit.org/show_bug.cgi?id=194239
1719
1720         Reviewed by Chris Dumez.
1721
1722         When the first download starts, grab this new assertion.
1723         When the last download ends, release it.
1724
1725         * Configurations/Network-iOS.entitlements:
1726
1727         * NetworkProcess/Downloads/DownloadManager.cpp:
1728         (WebKit::DownloadManager::dataTaskBecameDownloadTask):
1729         (WebKit::DownloadManager::downloadFinished):
1730         * NetworkProcess/Downloads/DownloadManager.h:
1731
1732         * Platform/spi/ios/AssertionServicesSPI.h:
1733
1734         * UIProcess/ProcessAssertion.cpp:
1735         (WebKit::ProcessAssertion::ProcessAssertion):
1736         * UIProcess/ProcessAssertion.h:
1737         (WebKit::ProcessAssertion::ProcessAssertion):
1738
1739         * UIProcess/WebProcessProxy.cpp:
1740         (WebKit::WebProcessProxy::didSetAssertionState):
1741
1742         * UIProcess/ios/ProcessAssertionIOS.mm:
1743         (WebKit::flagsForState):
1744         (WebKit::reasonForState):
1745         (WebKit::ProcessAssertion::ProcessAssertion):
1746
1747 2019-02-04  Said Abou-Hallawa  <said@apple.com>
1748
1749         [CG] Enable setAdditionalSupportedImageTypes for WK1
1750         https://bugs.webkit.org/show_bug.cgi?id=194190
1751
1752         Reviewed by Tim Horton.
1753
1754         Move the function webCoreStringVectorFromNSStringArray from WebKit to
1755         WebCore so it can be used by both WebKit and WebKitLegacy.
1756
1757         * Platform/mac/StringUtilities.h:
1758         * Platform/mac/StringUtilities.mm:
1759         (WebKit::webCoreStringVectorFromNSStringArray): Deleted.
1760         * UIProcess/API/Cocoa/WKWebView.mm:
1761         (-[WKWebView _initializeWithConfiguration:]):
1762
1763 2019-02-04  Benjamin Poulain  <benjamin@webkit.org>
1764
1765         Use deferrable timer to restart the Responsiveness Timer on each wheel event
1766         https://bugs.webkit.org/show_bug.cgi?id=194135
1767
1768         Reviewed by Simon Fraser.
1769
1770         Simon Fraser suggested a neat improvement over my previous optimization
1771         of ResponsivenessTimer.
1772
1773         Instead of reseting the deadline with every event, we can let the timer
1774         fire and add the missing time from the last start.
1775
1776         I implemented that behavior in the new Deferrable Timer class and use
1777         it from ResponsivenessTimer.
1778
1779         * NetworkProcess/watchos/NetworkProximityAssertion.h:
1780         * UIProcess/ResponsivenessTimer.h:
1781         * WebProcess/Plugins/PluginView.h:
1782
1783 2019-02-04  Simon Fraser  <simon.fraser@apple.com>
1784
1785         PageOverlayController's layers should be created lazily
1786         https://bugs.webkit.org/show_bug.cgi?id=194199
1787         rdar://problem/46571593
1788
1789         Reviewed by Tim Horton.
1790         
1791         Expose PageOverlayController::hasDocumentOverlays() and hasViewOverlays()
1792         and use them to only parent the overlay-hosting layers when necessary.
1793
1794         For document overlays, RenderLayerCompositor::appendDocumentOverlayLayers() can
1795         simply do nothing if there are none. Updates are triggered via Page::installedPageOverlaysChanged(),
1796         which calls FrameView::setNeedsCompositingConfigurationUpdate() to trigger the root layer
1797         compositing updates that parents the layerWithDocumentOverlays().
1798
1799         View overlays are added to the layer tree via the DrawingArea. When we go between having
1800         none and some view overlays, Page::installedPageOverlaysChanged() calls attachViewOverlayGraphicsLayer()
1801         on the ChromeClient, and the DrawingArea responds by calling updateRootLayers() and scheduling a
1802         compositing flush (this has to be done manually because view overlay layers are outside the
1803         subtree managed by RenderLayerCompositor).
1804         
1805         Now that GraphicsLayers are ref-counted, we can let the DrawingArea simply retain its m_viewOverlayRootLayer;
1806         there is no need for RenderLayerCompositor::attachRootLayer()/detachRootLayer() to do anything with view
1807         overlay layers. This implies that a page can navigate (new FrameView) and view overlays will persist, without
1808         having to be manually removed and re-added. We can also remove the Frame argument to attachViewOverlayGraphicsLayer().
1809
1810         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1811         (WebKit::WebChromeClient::attachViewOverlayGraphicsLayer):
1812         * WebProcess/WebCoreSupport/WebChromeClient.h:
1813         * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
1814         (WebKit::AcceleratedDrawingArea::attachViewOverlayGraphicsLayer):
1815         * WebProcess/WebPage/AcceleratedDrawingArea.h:
1816         * WebProcess/WebPage/DrawingArea.h:
1817         (WebKit::DrawingArea::attachViewOverlayGraphicsLayer):
1818         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
1819         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
1820         (WebKit::RemoteLayerTreeDrawingArea::attachViewOverlayGraphicsLayer):
1821         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1822         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1823         (WebKit::TiledCoreAnimationDrawingArea::attachViewOverlayGraphicsLayer):
1824         (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):
1825
1826 2019-02-04  Michael Catanzaro  <mcatanzaro@igalia.com>
1827
1828         Unreviewed, improve preprocessor guard
1829         https://bugs.webkit.org/show_bug.cgi?id=194166
1830         <rdar://problem/47694328>
1831
1832         AC mode is only optional in GTK port. Requested by Zan.
1833
1834         * WebProcess/WebPage/WebPage.cpp:
1835         (WebKit::WebPage::updatePreferences):
1836
1837 2019-02-04  Sihui Liu  <sihui_liu@apple.com>
1838
1839         IndexedDB: leak WebIDBConnectionToServer in layout tests
1840         https://bugs.webkit.org/show_bug.cgi?id=193688
1841         <rdar://problem/47353263>
1842
1843         Reviewed by Geoffrey Garen.
1844
1845         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1846         (WebKit::NetworkConnectionToWebProcess::didClose):
1847         (WebKit::NetworkConnectionToWebProcess::establishIDBConnectionToServer):
1848         (WebKit::NetworkConnectionToWebProcess::removeIDBConnectionToServer): Deleted.
1849         * NetworkProcess/NetworkConnectionToWebProcess.h:
1850         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1851         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
1852         (WebKit::WebIDBConnectionToServer::~WebIDBConnectionToServer):
1853
1854 2019-02-04  Antoine Quint  <graouts@apple.com>
1855
1856         <rdar://problem/47788802>
1857
1858         Unreviewed build fix.
1859
1860         * Platform/spi/ios/UIKitSPI.h:
1861
1862 2019-02-04  Youenn Fablet  <youenn@apple.com>
1863
1864         Capture state should be managed consistently when doing process swapping
1865         https://bugs.webkit.org/show_bug.cgi?id=194122
1866         <rdar://problem/47609293>
1867
1868         Reviewed by Eric Carlson.
1869
1870         When doing PSON, WebPageProxy::resetState is called.
1871         It resets the media state, but does not call the client delegates.
1872         Instead of directly updating the media state, call the routine used to update it so that client delegates are called.
1873
1874         Covered by new API test and layout test.
1875
1876         * UIProcess/API/Cocoa/WKWebView.mm:
1877         (-[WKWebView _mediaCaptureState]):
1878         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1879         * UIProcess/WebPageProxy.cpp:
1880         (WebKit::WebPageProxy::resetState):
1881         (WebKit::WebPageProxy::isPlayingMediaDidChange):
1882         (WebKit::WebPageProxy::updatePlayingMediaDidChange):
1883         * UIProcess/WebPageProxy.h:
1884
1885 2019-02-04  Antoine Quint  <graouts@apple.com>
1886
1887         Use a dedicated type instead of int32_t for pointer identifiers
1888         https://bugs.webkit.org/show_bug.cgi?id=194217
1889
1890         Reviewed by Antti Koivisto.
1891
1892         * Scripts/webkit/messages.py:
1893         * UIProcess/WebPageProxy.cpp:
1894         (WebKit::WebPageProxy::cancelPointer):
1895         * UIProcess/WebPageProxy.h:
1896         * WebProcess/WebPage/WebPage.cpp:
1897         (WebKit::WebPage::cancelPointer):
1898         * WebProcess/WebPage/WebPage.h:
1899         * WebProcess/WebPage/WebPage.messages.in:
1900
1901 2019-02-04  Michael Catanzaro  <mcatanzaro@igalia.com>
1902
1903         Unreviewed, avoid -Wswitch warnings introduced in r240880
1904         https://bugs.webkit.org/show_bug.cgi?id=193740
1905         <rdar://problem/47527267>
1906
1907         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
1908         (WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse):
1909
1910 2019-02-04  Alexander Mikhaylenko  <exalm7659@gmail.com>
1911
1912         [GTK] Allow pinch zoom on touchpad
1913         https://bugs.webkit.org/show_bug.cgi?id=194201
1914
1915         Reviewed by Michael Catanzaro.
1916
1917         Enable touchpad events for WebkitWebViewBase, then feed touchpad
1918         pinch events to GestureController.
1919
1920         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1921         (webkitWebViewBaseRealize): Added GDK_TOUCHPAD_GESTURE_MASK to event mask.
1922         (webkitWebViewBaseEvent): Added.
1923         (webkit_web_view_base_class_init): Override event vfunc.
1924
1925 2019-02-04  Michael Catanzaro  <mcatanzaro@igalia.com>
1926
1927         Unreviewed, only force settings.acceleratedCompositingEnabled() to true for Cocoa ports
1928         https://bugs.webkit.org/show_bug.cgi?id=194166
1929         <rdar://problem/47694328>
1930
1931         Accelerated compositing is broken for me at least. We're a long way from being able to force
1932         it.
1933
1934         * WebProcess/WebPage/WebPage.cpp:
1935         (WebKit::WebPage::updatePreferences):
1936
1937 2019-02-04  Abderrahim Kitouni  <akitouni@gnome.org>
1938
1939         [GTK] Remove last python2 dependency from CMake build process
1940         https://bugs.webkit.org/show_bug.cgi?id=194218
1941
1942         Reviewed by Michael Catanzaro.
1943
1944         * InspectorGResources.cmake:
1945
1946 2019-02-04  Antti Koivisto  <antti@apple.com>
1947
1948         Rename GraphicsLayer and PlatformCALayer type enum values to match "scroll container layer" convention
1949         https://bugs.webkit.org/show_bug.cgi?id=194215
1950
1951         Reviewed by Frédéric Wang.
1952
1953         * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
1954         (WebKit::RemoteLayerBackingStore::drawInContext):
1955         * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
1956         (WebKit::RemoteLayerTreeHost::makeNode):
1957         * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
1958         (WebKit::RemoteLayerTreeHost::makeNode):
1959
1960 2019-02-03  Antti Koivisto  <antti@apple.com>
1961
1962         [iOS] Tiles not created in large scrollable iframes
1963         https://bugs.webkit.org/show_bug.cgi?id=193665
1964
1965         Reviewed by Simon Fraser.
1966
1967         * UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm:
1968         (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateBeforeChildren):
1969         * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
1970         (WebKit::ScrollingTreeScrollingNodeDelegateIOS::commitStateBeforeChildren):
1971
1972         We now use scrollContainerLayer consistently so remove the special cases.
1973
1974 2019-02-03  Fujii Hironori  <Hironori.Fujii@sony.com>
1975
1976         [curl] [WebKit] Assertion failures of missing networkStorageSession for storage/indexeddb tests
1977         https://bugs.webkit.org/show_bug.cgi?id=194141
1978
1979         Reviewed by Ross Kirsling.
1980
1981         Implemented WebKit::NetworkProcess::switchToNewTestingSession and
1982         WebKit::NetworkProcess::ensureSession for curl port.
1983
1984         * NetworkProcess/NetworkProcess.cpp:
1985         (WebKit::NetworkProcess::switchToNewTestingSession):
1986         (WebKit::NetworkProcess::ensureSession):
1987
1988 2019-02-03  Simon Fraser  <simon.fraser@apple.com>
1989
1990         Make setNeedsLayout on the root more explicitly about triggering its side-effects
1991         https://bugs.webkit.org/show_bug.cgi?id=194198
1992
1993         Reviewed by Antti Koivisto.
1994
1995         Call the newly named functions.
1996
1997         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1998         (WebKit::PDFPlugin::updateScrollbars):
1999         * WebProcess/Plugins/PluginView.cpp:
2000         (WebKit::PluginView::didInitializePlugin):
2001         * WebProcess/WebPage/WebPage.cpp:
2002         (WebKit::WebPage::setHeaderBannerHeightForTesting):
2003         (WebKit::WebPage::setFooterBannerHeightForTesting):
2004         * WebProcess/WebPage/mac/PageBannerMac.mm:
2005         (WebKit::PageBanner::addToPage):
2006         (WebKit::PageBanner::detachFromPage):
2007         (WebKit::PageBanner::hide):
2008
2009 2019-02-03  Ryosuke Niwa  <rniwa@webkit.org>
2010
2011         Validate navigation policy decisions to avoid crashes in continueLoadAfterNavigationPolicy
2012         https://bugs.webkit.org/show_bug.cgi?id=194189
2013
2014         Reviewed by Geoffrey Garen.
2015
2016         Pass the policy check identifier around functions and store it in PolicyDecisionSender
2017         so that we can send it back to WebCore with the navigation policy decision.
2018
2019         We also store it in WebFrame in the case the policy decision had to be invalidated
2020         before the decision was received (via WebFrame::invalidatePolicyListener).
2021
2022         * Scripts/webkit/messages.py:
2023         * UIProcess/ProvisionalPageProxy.cpp:
2024         (WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionAsync):
2025         (WebKit::ProvisionalPageProxy::decidePolicyForResponse):
2026         * UIProcess/ProvisionalPageProxy.h:
2027         * UIProcess/WebPageProxy.cpp:
2028         (WebKit::WebPageProxy::PolicyDecisionSender): Added PolicyCheckIdentifier as a member.
2029         (WebKit::WebPageProxy::PolicyDecisionSender::create):
2030         (WebKit::WebPageProxy::PolicyDecisionSender::send):
2031         (WebKit::WebPageProxy::PolicyDecisionSender::PolicyDecisionSender):
2032         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
2033         (WebKit::WebPageProxy::decidePolicyForNavigationActionAsync):
2034         (WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared):
2035         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
2036         (WebKit::WebPageProxy::decidePolicyForNavigationActionSync):
2037         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
2038         (WebKit::WebPageProxy::decidePolicyForResponse):
2039         (WebKit::WebPageProxy::decidePolicyForResponseShared):
2040         * UIProcess/WebPageProxy.h:
2041         * UIProcess/WebPageProxy.messages.in:
2042         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2043         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
2044         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
2045         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2046         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2047         * WebProcess/WebPage/WebFrame.cpp:
2048         (WebKit::WebFrame::setUpPolicyListener):
2049         (WebKit::WebFrame::invalidatePolicyListener):
2050         (WebKit::WebFrame::didReceivePolicyDecision):
2051         * WebProcess/WebPage/WebFrame.h:
2052         * WebProcess/WebPage/WebPage.cpp:
2053         (WebKit::WebPage::didReceivePolicyDecision):
2054         * WebProcess/WebPage/WebPage.h:
2055         * WebProcess/WebPage/WebPage.messages.in:
2056
2057 2019-02-03  Megan Gardner  <megan_gardner@apple.com>
2058
2059         Turn on Smart Paste
2060         https://bugs.webkit.org/show_bug.cgi?id=193786
2061
2062         Reviewed by Ryosuke Niwa.
2063
2064         * Platform/spi/ios/UIKitSPI.h:
2065         * UIProcess/ios/TextCheckerIOS.mm:
2066         (WebKit::TextChecker::isSmartInsertDeleteEnabled):
2067         Use the flag from UIKit to determine if smart copy paste should be
2068         turned on.
2069
2070 2019-02-02  Simon Fraser  <simon.fraser@apple.com>
2071
2072         Tidy up data memebers of FrameView and related classes to shrink class sizes
2073         https://bugs.webkit.org/show_bug.cgi?id=194197
2074
2075         Reviewed by Zalan Bujtas.
2076
2077         * UIProcess/PageClient.h: Declare enum size.
2078
2079 2018-12-16  Darin Adler  <darin@apple.com>
2080
2081         Convert additional String::format clients to alternative approaches
2082         https://bugs.webkit.org/show_bug.cgi?id=192746
2083
2084         Reviewed by Alexey Proskuryakov.
2085
2086         * UIProcess/Cocoa/ViewGestureController.cpp:
2087         (WebKit::ViewGestureController::SnapshotRemovalTracker::startWatchdog):
2088         Use makeString and FormattedNumber.
2089
2090         * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
2091         (WebKit::LocalAuthenticator::getAssertion): Added a comment about an
2092         incorrect format specifier and left this code as is for now.
2093
2094 2019-02-01  David Kilzer  <ddkilzer@apple.com>
2095
2096         Move soft-linking of TelephonyUtilities.framework out of TUCallSPI.h
2097         <https://webkit.org/b/193866>
2098
2099         Reviewed by Alex Christensen.
2100
2101         * Platform/mac/MenuUtilities.mm:
2102         - Update for rename of TUCallSPI.h to TelephonyUtilitiesSPI.h.
2103         - Add soft-linking code formerly in TUCallSPI.h.
2104
2105 2019-02-01  Alex Christensen  <achristensen@webkit.org>
2106
2107         Move XPCService entry points from mac directory to new Cocoa directory
2108         https://bugs.webkit.org/show_bug.cgi?id=194129
2109
2110         Reviewed by Chris Dumez.
2111
2112         * Configurations/NetworkService.xcconfig:
2113         * Configurations/PluginService.64.xcconfig:
2114         * Configurations/WebContentService.xcconfig:
2115         * NetworkProcess/EntryPoint/Cocoa: Copied from Source/WebKit/NetworkProcess/EntryPoint/mac.
2116         * NetworkProcess/EntryPoint/mac: Removed.
2117         * PluginProcess/EntryPoint/Cocoa: Copied from Source/WebKit/PluginProcess/EntryPoint/mac.
2118         * PluginProcess/EntryPoint/mac: Removed.
2119         * Shared/EntryPointUtilities/Cocoa: Copied from Source/WebKit/Shared/EntryPointUtilities/mac.
2120         * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h:
2121         * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.mm:
2122         * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
2123         * Shared/EntryPointUtilities/mac: Removed.
2124         * SourcesCocoa.txt:
2125         * WebKit.xcodeproj/project.pbxproj:
2126         * WebProcess/EntryPoint/Cocoa: Copied from Source/WebKit/WebProcess/EntryPoint/mac.
2127         * WebProcess/EntryPoint/mac: Removed.
2128
2129 2019-02-01  Wenson Hsieh  <wenson_hsieh@apple.com>
2130
2131         [iOS] Consistent 1 sec hang when triggering modal alerts while handling synchronous touch events
2132         https://bugs.webkit.org/show_bug.cgi?id=194140
2133         <rdar://problem/47728098>
2134
2135         Reviewed by Tim Horton.
2136
2137         Currently, the UI process hangs when attempting to synchronously present modal UI from the web process while the
2138         UI process is waiting for sync IPC in the web process. While we have logic to generally mitigate IPC deadlock in
2139         this scenario by dispatching the web process' sync IPC immediately with the intention of allowing the web
2140         process to finish processing sync IPC (and consequently unblock the UI process), this fails in the case where
2141         the sync IPC message from the web process to the UI process requires main thread execution for an arbitrary
2142         amount of time (for instance, modal alert dialogs). In this case, we'll end up in a state where we've handled
2143         the web process' sync IPC in the UI process, yet we can't resume execution since the web process is still
2144         blocked.
2145
2146         By far the most egregious scenario in which this manifests is during synchronous gesture recognizer IPC, i.e.
2147         grabbing position information from the UI process, and handling touch events synchronously. Luckily, these are
2148         also cases where (1) we know sync IPC may safely time out, and (2) the presentation of modal UI from the web
2149         process should cause the gesture recognizers to fail anyways. As such, we can mitigate these scenarios in the
2150         web process by responding to the these pending sync IPC messages *before* sending our own sync IPC to the UI
2151         process.
2152
2153         Test: fast/events/touch/ios/show-modal-alert-during-touch-start.html
2154
2155         * Shared/ios/InteractionInformationAtPosition.h:
2156         (WebKit::InteractionInformationAtPosition::invalidInformation):
2157         * Shared/ios/InteractionInformationAtPosition.mm:
2158         (WebKit::InteractionInformationAtPosition::encode const):
2159         (WebKit::InteractionInformationAtPosition::decode):
2160
2161         Add a new flag to indicate whether an interaction information response can be valid. Interaction information
2162         cannot be valid in the case where the interaction information request was interrupted by certain sync IPC
2163         messages from the web process.
2164
2165         * UIProcess/API/C/WKContextConfigurationRef.cpp:
2166         (WKContextConfigurationIgnoreSynchronousMessagingTimeoutsForTesting):
2167         (WKContextConfigurationSetIgnoreSynchronousMessagingTimeoutsForTesting):
2168
2169         Add some testing SPI to ignore sync IPC timeouts, for the purposes of testing. Rather than use the existing
2170         Objective-C SPI in WKWebProcessPoolConfiguration, I decided to add C API plumbing for this flag, so that other
2171         non-Cocoa ports may also support the new layout test option to ignore sync IPC timeouts.
2172
2173         * UIProcess/API/C/WKContextConfigurationRef.h:
2174         * UIProcess/ios/WKContentViewInteraction.mm:
2175         (-[WKContentView ensurePositionInformationIsUpToDate:]):
2176         (-[WKContentView _positionInformationDidChange:]):
2177         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2178         (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
2179         (WebKit::WebChromeClient::runJavaScriptAlert):
2180         (WebKit::WebChromeClient::runJavaScriptConfirm):
2181         (WebKit::WebChromeClient::runJavaScriptPrompt):
2182         (WebKit::WebChromeClient::print):
2183         (WebKit::WebChromeClient::exceededDatabaseQuota):
2184         (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):
2185
2186         Cancel any pending sync IPC replies prior to sending sync IPC messages to the UI process which may result in
2187         sync IPC deadlock, by using the new helper method, sendSyncWithDelayedReply, instead of just sendSync.
2188
2189         * WebProcess/WebPage/WebPage.cpp:
2190         (WebKit::WebPage::cancelGesturesBlockedOnSynchronousReplies):
2191
2192         Add a helper to cancel pending sync messages coming in from the UI process that are being called from within
2193         gesture recognizer delegate hooks.
2194
2195         (WebKit::WebPage::touchEventSync):
2196         * WebProcess/WebPage/WebPage.h:
2197
2198         Add a new helper, sendSyncWithDelayedReply, to be used when sending a sync IPC message to the UI process that
2199         cannot be immediately completed upon arrival. Importantly, this cancels pending sync replies, and also passes
2200         IPC::SendSyncOption::InformPlatformProcessWillSuspend.
2201
2202         * WebProcess/WebPage/WebPage.messages.in:
2203
2204         Change these from LegacySync to Delayed messages.
2205
2206         * WebProcess/WebPage/ios/WebPageIOS.mm:
2207         (WebKit::WebPage::getPositionInformation):
2208
2209         Make this sync IPC handler (as well as WebPage::touchEventSync) store the IPC reply during the scope of the
2210         method, and invoke the stored reply at the end of the method if it wasn't interrupted due to something calling
2211         cancelGesturesBlockedOnSynchronousReplies().
2212
2213         (WebKit::WebPage::positionInformation):
2214
2215         Refactor getPositionInformation by pulling out the logic for building an InteractionInformationAtPosition into
2216         a separate helper.
2217
2218         (WebKit::WebPage::requestPositionInformation):
2219
2220 2019-02-01  David Quesada  <david_quesada@apple.com>
2221
2222         Network Process crash when resuming downloads: '-[__NSDictionaryI setObject:forKey:]: unrecognized selector sent to instance %p'
2223         https://bugs.webkit.org/show_bug.cgi?id=194144
2224         rdar://problem/47553456
2225
2226         Reviewed by Geoffrey Garen.
2227
2228         * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
2229         (WebKit::Download::resume):
2230             Make a mutable copy of the root object decoded from the resume data.
2231             It might have been originally encoded as an immutable dictionary.
2232
2233 2019-02-01  Chris Dumez  <cdumez@apple.com>
2234
2235         REGRESSION: Flaky ASSERTION FAILED: m_uncommittedState.state == State::Committed on http/tests/cookies/same-site/fetch-after-top-level-navigation-initiated-from-iframe-in-cross-origin-page.html
2236         https://bugs.webkit.org/show_bug.cgi?id=193740
2237         <rdar://problem/47527267>
2238
2239         Reviewed by Alex Christensen.
2240
2241         The issue was happening when the page is triggering a cross-site navigation while in the middle of parsing. This would cause us to
2242         start a new provisional load in a new process before the previous process sends the DidFinishLoadForFrame() IPC to the UIProcess.
2243         Getting such IPC after a provisional load has started would mess up our state machine and trip assertions.
2244
2245         This patch restores non-PSON behavior which is that the previous load in the old process now gets stopped so that no DidFinishLoadForFrame()
2246         / DidFailLoadForFrame() gets sent. To achieve this behavior, I introduced a new "StopAllLoads" PolicyAction that we now send the old
2247         process when the load is continuing in a new process, instead of sending it "Ignore".
2248
2249         * NetworkProcess/NetworkDataTaskBlob.cpp:
2250         (WebKit::NetworkDataTaskBlob::dispatchDidReceiveResponse):
2251         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2252         (toNSURLSessionResponseDisposition):
2253         * UIProcess/WebPageProxy.cpp:
2254         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
2255
2256 2019-02-01  Jer Noble  <jer.noble@apple.com>
2257
2258         Unreviewed build fix; Respect the 'condition:' field in the WebPreferences.yaml when generating
2259         WebPreferencesStoreDefaultsMap.cpp.
2260
2261         * page/SettingsBase.h:
2262
2263 2019-02-01  Antoine Quint  <graouts@apple.com>
2264
2265         Dispatch pointercancel events when content is panned or zoomed on iOS
2266         https://bugs.webkit.org/show_bug.cgi?id=193962
2267         <rdar://problem/47629134>
2268
2269         Reviewed by Dean Jackson.
2270
2271         When a user-agent-provided interaction, such as panning or zooming on iOS, uses a set of touches, we should dispatch a pointercancel
2272         event for the pointer ids of the touches involved. To facilitate this, we add a new method on WKContentView to cancel all the pointers
2273         matching active touches for a provided UIGestureRecognizer through an async IPC call into the Web process using the new method
2274         PointerCaptureController::cancelPointer().
2275
2276         * Platform/spi/ios/UIKitSPI.h: Add the necessary forward declaration for a necessary UIKit SPI allowing us to get the set of last-seen
2277         UITouches by the identifier generated for the matching WebKit touch.
2278         * UIProcess/API/Cocoa/WKWebView.mm:
2279         (-[WKWebView scrollViewWillBeginZooming:withView:]): Dispatch touchcancel events for all pointers involved in a pinch gesture on the
2280         top-level UIScrollView.
2281         (-[WKWebView _scrollView:adjustedOffsetForOffset:translation:startPoint:locationInView:horizontalVelocity:verticalVelocity:]): Dispatch
2282         touchcancel events for all pointers involved in a pan gesture on the top-level UIScrollView. We can infer this by looking at whether the
2283         adjusted content offset, after accounting for the permitted touch actions, is different from the original content offset.
2284         * UIProcess/PageClient.h: Expose a new virtual cancelPointersForGestureRecognizer() method which will allow the iOS implementation to
2285         forward the call to WKContentViewInteraction.
2286         (WebKit::PageClient::cancelPointersForGestureRecognizer):
2287         * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h: Expose the WebPageProxy such that we may access it to cancel pointers for
2288         a given gesture recognizer from within ScrollingTreeScrollingNodeDelegateIOS.
2289         (WebKit::RemoteScrollingCoordinatorProxy::webPageProxy const):
2290         * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h:
2291         * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
2292         (-[WKScrollingNodeScrollViewDelegate _scrollView:adjustedOffsetForOffset:translation:startPoint:locationInView:horizontalVelocity:verticalVelocity:]):
2293         Dispatch touchcancel events for all pointers involved in a pan gesture on a nested UIScrollView. We can infer this by looking at
2294         whether the adjusted content offset, after accounting for the permitted touch actions, is different from the original content offset.
2295         (-[WKScrollingNodeScrollViewDelegate scrollViewWillBeginZooming:withView:]): Dispatch touchcancel events for all pointers involved in a
2296         pinch gesture on a nested UIScrollView.
2297         (-[WKScrollingNodeScrollViewDelegate cancelPointersForGestureRecognizer:]):
2298         (WebKit::ScrollingTreeScrollingNodeDelegateIOS::cancelPointersForGestureRecognizer):
2299         * UIProcess/WebPageProxy.cpp:
2300         (WebKit::WebPageProxy::cancelPointer):
2301         * UIProcess/WebPageProxy.h:
2302         * UIProcess/ios/PageClientImplIOS.h:
2303         * UIProcess/ios/PageClientImplIOS.mm:
2304         (WebKit::PageClientImpl::cancelPointersForGestureRecognizer):
2305         * UIProcess/ios/WKContentViewInteraction.h:
2306         * UIProcess/ios/WKContentViewInteraction.mm:
2307         (-[WKContentView cancelPointersForGestureRecognizer:]): Obtain all active UITouch objects for the view and dispatch a pointercancel event,
2308         through the WebPageProxy, for all touches associated with the provided gesture recognizer.
2309         * WebProcess/WebPage/WebPage.cpp:
2310         (WebKit::WebPage::cancelPointer):
2311         * WebProcess/WebPage/WebPage.h:
2312         * WebProcess/WebPage/WebPage.messages.in:
2313
2314 2019-02-01  Jer Noble  <jer.noble@apple.com>
2315
2316         Make the WebKit default for media source based on the WebCore default.
2317         https://bugs.webkit.org/show_bug.cgi?id=194172
2318
2319         Reviewed by Eric Carlson.
2320
2321         * Shared/WebPreferences.yaml:
2322         * UIProcess/API/Cocoa/WKPreferences.mm:
2323         (-[WKPreferences _setMediaSourceEnabled:]):
2324         (-[WKPreferences _mediaSourceEnabled]):
2325         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2326
2327 2019-02-01  Simon Fraser  <simon.fraser@apple.com>
2328
2329         Force settings.acceleratedCompositingEnabled() to true for WebKit
2330         https://bugs.webkit.org/show_bug.cgi?id=194166
2331         rdar://problem/47694328
2332
2333         Reviewed by Tim Horton.
2334
2335         WebKit relies on accelerated compositing for its drawing areas to function correctly,
2336         and sometimes clients (*cough* Safari *cough*) have bugs where they clobber the settings,
2337         so force this setting to be always on (and release log if this happens).
2338
2339         * WebProcess/WebPage/WebPage.cpp:
2340         (WebKit::WebPage::updatePreferences):
2341
2342 2019-02-01  Antti Koivisto  <antti@apple.com>
2343
2344         Don't use base layer() as the scroll layer in scrolling tree.
2345         https://bugs.webkit.org/show_bug.cgi?id=194160
2346
2347         Reviewed by Simon Fraser.
2348
2349         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
2350         (ArgumentCoder<ScrollingStateNode>::encode):
2351         (ArgumentCoder<ScrollingStateNode>::decode):
2352         (ArgumentCoder<ScrollingStateScrollingNode>::encode):
2353         (ArgumentCoder<ScrollingStateScrollingNode>::decode):
2354         (WebKit::dump):
2355         * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
2356         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
2357         * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
2358         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
2359         * UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm:
2360         (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateBeforeChildren):
2361         * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
2362         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateBeforeChildren):
2363         * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
2364         (WebKit::ScrollingTreeScrollingNodeDelegateIOS::commitStateBeforeChildren):
2365         (WebKit::ScrollingTreeScrollingNodeDelegateIOS::commitStateAfterChildren):
2366
2367 2019-02-01  Michael Catanzaro  <mcatanzaro@igalia.com>
2368
2369         [SOUP] Improve use of SoupCookiePersistentStorageType
2370         https://bugs.webkit.org/show_bug.cgi?id=194103
2371
2372         Reviewed by Carlos Garcia Campos.
2373
2374         Turn it into an enum class, and stop casting it to and from uint32_t.
2375
2376         * NetworkProcess/Cookies/WebCookieManager.h:
2377         * NetworkProcess/Cookies/WebCookieManager.messages.in:
2378         * NetworkProcess/Cookies/soup/WebCookieManagerSoup.cpp:
2379         (WebKit::WebCookieManager::setCookiePersistentStorage):
2380         * NetworkProcess/NetworkSessionCreationParameters.cpp:
2381         (WebKit::NetworkSessionCreationParameters::privateSessionParameters):
2382         (WebKit::NetworkSessionCreationParameters::decode):
2383         * NetworkProcess/NetworkSessionCreationParameters.h:
2384         * Shared/soup/SoupCookiePersistentStorageType.h:
2385         (): Deleted.
2386         * UIProcess/API/glib/WebKitCookieManager.cpp:
2387         * UIProcess/WebCookieManagerProxy.h:
2388         * UIProcess/soup/WebCookieManagerProxySoup.cpp:
2389         (WebKit::WebCookieManagerProxy::setCookiePersistentStorage):
2390         (WebKit::WebCookieManagerProxy::getCookiePersistentStorage const):
2391
2392 2019-02-01  Per Arne Vollan  <pvollan@apple.com>
2393
2394         [macOS] Revert parts of r240811, since it causes kernel panics.
2395         https://bugs.webkit.org/show_bug.cgi?id=194061
2396
2397         Unreviewed crash fix.
2398
2399         * WebProcess/com.apple.WebProcess.sb.in:
2400
2401 2019-02-01  Michael Catanzaro  <mcatanzaro@igalia.com>
2402
2403         [SOUP] Improve use of PAL::SessionID in WebKitCookieManager
2404         https://bugs.webkit.org/show_bug.cgi?id=194092
2405
2406         Reviewed by Carlos Garcia Campos.
2407
2408         Always get it from the data store instead of assuming the default session ID, and add a
2409         helper function for this.
2410
2411         * UIProcess/API/glib/WebKitCookieManager.cpp:
2412         (_WebKitCookieManagerPrivate::sessionID const):
2413         (_WebKitCookieManagerPrivate::~_WebKitCookieManagerPrivate):
2414         (webkitCookieManagerCreate):
2415         (webkit_cookie_manager_set_persistent_storage):
2416         (webkit_cookie_manager_set_accept_policy):
2417         (webkit_cookie_manager_get_accept_policy):
2418         (webkit_cookie_manager_add_cookie):
2419         (webkit_cookie_manager_get_cookies):
2420         (webkit_cookie_manager_delete_cookie):
2421
2422 2019-01-31  Takashi Komori  <Takashi.Komori@sony.com>
2423
2424         [Curl] Remove unnecessary member from NetworkStorageSession.
2425         https://bugs.webkit.org/show_bug.cgi?id=194137
2426
2427         Reviewed by Don Olmstead.
2428
2429         * NetworkProcess/curl/NetworkProcessCurl.cpp:
2430         (WebKit::NetworkProcess::platformCreateDefaultStorageSession const):
2431
2432 2019-01-31  Jiewen Tan  <jiewen_tan@apple.com>
2433
2434         Unreviewed, build fix after r240805
2435
2436         This patch reverts the BlockPtr change since it breaks iOS builds.
2437
2438         * UIProcess/Cocoa/NavigationState.mm:
2439         (WebKit::tryInterceptNavigation):
2440
2441 2019-01-31  Chris Dumez  <cdumez@apple.com>
2442
2443         Page zoom level is lost after a process swap or a crash
2444         https://bugs.webkit.org/show_bug.cgi?id=194105
2445         <rdar://problem/47610781>
2446
2447         Reviewed by Alex Christensen.
2448
2449         Previously, when the client would call setPageAndTextZoomFactors() on the WebPageProxy,
2450         we would update the WebPageProxy's corresponding data members and send an IPC to the
2451         WebProcess to apply the zoom factors.
2452
2453         The issue is that on process crash or process-swap, we never communicate those zoom factors
2454         to the new WebProcess. Even if the client were to call setPageAndTextZoomFactors() with
2455         the same factors again, it would be a no-op since the WebPageProxy's data members already
2456         reflect the expected values.
2457
2458         To address the issue, pass both the page zoom and the text zoom factors to the WebProcess
2459         via WebPageCreationParameters. This way, there is no need to send an extra IPC and we're
2460         sure the WebPageProxy's factors are properly applied to the WebPage on WebContent process
2461         side upon creation (whether after a crash or a process swap).
2462
2463         * Shared/WebPageCreationParameters.cpp:
2464         (WebKit::WebPageCreationParameters::encode const):
2465         (WebKit::WebPageCreationParameters::decode):
2466         * Shared/WebPageCreationParameters.h:
2467         * UIProcess/WebPageProxy.cpp:
2468         (WebKit::WebPageProxy::creationParameters):
2469         * WebProcess/WebPage/WebPage.cpp:
2470
2471 2019-01-31  Per Arne Vollan  <pvollan@apple.com>
2472
2473         [macOS] Disable permissive call logging in sandbox
2474         https://bugs.webkit.org/show_bug.cgi?id=194061
2475
2476         Reviewed by Alexey Proskuryakov.
2477
2478         Strict call filtering should be reenabled.
2479
2480         * WebProcess/com.apple.WebProcess.sb.in:
2481
2482 2019-01-31  Per Arne Vollan  <pvollan@apple.com>
2483
2484         [macOS] Crash when control-clicking or copying text rendered with a web font
2485         https://bugs.webkit.org/show_bug.cgi?id=193913
2486         <rdar://problem/47541039>
2487
2488         Reviewed by Brent Fulgham.
2489
2490         On older versions of macOS, allowing mach lookup to com.apple.FontObjectsServer is needed.
2491
2492         * WebProcess/com.apple.WebProcess.sb.in:
2493
2494 2019-01-31  Benjamin Poulain  <benjamin@webkit.org>
2495
2496         Remove WKPageIsWebProcessResponsive
2497         https://bugs.webkit.org/show_bug.cgi?id=194096
2498
2499         Reviewed by Alex Christensen.
2500
2501         It is not used by any client.
2502
2503         It is also bad API. It is better to let WebKit track
2504         responsiveness and tell the client with processDidBecomeResponsive.
2505
2506         * UIProcess/API/C/WKPage.cpp:
2507         (WKPageIsWebProcessResponsive): Deleted.
2508         * UIProcess/API/C/WKPagePrivate.h:
2509         * UIProcess/WebPageProxy.cpp:
2510         (WebKit::WebPageProxy::isWebProcessResponsive): Deleted.
2511         * UIProcess/WebPageProxy.h:
2512
2513 2019-01-31  Alex Christensen  <achristensen@webkit.org>
2514
2515         Revert r238819 which is unneeded and caused a performance regression.
2516         https://bugs.webkit.org/show_bug.cgi?id=192272
2517         <rdar://problem/46664625>
2518
2519         * WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h:
2520         (API::InjectedBundle::PageLoaderClient::didStartProvisionalLoadForFrame):
2521         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
2522         * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
2523         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2524         (PageLoaderClient::didStartProvisionalLoadForFrame):
2525         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
2526         (WebKit::InjectedBundlePageLoaderClient::didStartProvisionalLoadForFrame):
2527         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
2528         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2529         (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
2530         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2531
2532 2019-01-31  Jiewen Tan  <jiewen_tan@apple.com>
2533
2534         Formalize WebKitAdditions mechanism of LoadOptimizer
2535         https://bugs.webkit.org/show_bug.cgi?id=193886
2536         <rdar://problem/47696809>
2537
2538         Reviewed by Brent Fulgham.
2539
2540         This patch does the following few things:
2541         1) formalizes WebKitAdditions mechanism of LoadOptimizer;
2542         2) modernizes AppLinks code in tryInterceptNavigation to use BlockPtr;
2543         3) lets AppLinks have higher precedence than LoadOptimizer.
2544
2545         * SourcesCocoa.txt:
2546         * UIProcess/Cocoa/LoadOptimizer.h: Removed.
2547         * UIProcess/Cocoa/LoadOptimizer.mm: Removed.
2548         * UIProcess/Cocoa/NavigationState.mm:
2549         (WebKit::tryOptimizingLoad):
2550         (WebKit::tryInterceptNavigation):
2551         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2552         (WebKit::WebsiteDataStore::WebsiteDataStore):
2553         * UIProcess/WebsiteData/WebsiteDataStore.h:
2554         (WebKit::WebsiteDataStore::loadOptimizer): Deleted.
2555         * WebKit.xcodeproj/project.pbxproj:
2556
2557 2019-01-31  Chris Dumez  <cdumez@apple.com>
2558
2559         Regression(PSON) Crash under WebProcessProxy::canTerminateChildProcess()
2560         https://bugs.webkit.org/show_bug.cgi?id=194094
2561         <rdar://problem/47580753>
2562
2563         Reviewed by Ryosuke Niwa.
2564
2565         If a SuspendedPageProxy gets destroyed while a WebPageProxy is waiting for its to finish to suspend,
2566         call the "failure to suspend" completion handler asynchronously instead of synchronouly to make sure
2567         the completion handler cannot try and use the suspended page proxy while it is being destroyed.
2568
2569         * UIProcess/SuspendedPageProxy.cpp:
2570         (WebKit::SuspendedPageProxy::~SuspendedPageProxy):
2571
2572 2019-01-31  Timothy Hatcher  <timothy@apple.com>
2573
2574         Fix LSAppLink deprecation warnings.
2575         https://bugs.webkit.org/show_bug.cgi?id=194097
2576
2577         Unreviewed build fix.
2578
2579         * UIProcess/ios/WKActionSheetAssistant.mm:
2580         (-[WKActionSheetAssistant _appendOpenActionsForURL:actions:elementInfo:]):
2581
2582 2019-01-30  Simon Fraser  <simon.fraser@apple.com>
2583
2584         [Mac] Implement basic hit testing in the scrolling tree
2585         https://bugs.webkit.org/show_bug.cgi?id=172917
2586         <rdar://problem/34215516>
2587
2588         Reviewed by Antti Koivisto.
2589
2590         Changed return types, "using namespace WebCore" in ScrollingTreeFrameScrollingNodeRemoteMac.cpp.
2591
2592         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
2593         (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
2594         * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
2595         * UIProcess/RemoteLayerTree/mac/ScrollerPairMac.h:
2596         * UIProcess/RemoteLayerTree/mac/ScrollerPairMac.mm:
2597         (WebKit::ScrollerPairMac::handleWheelEvent):
2598         (WebKit::ScrollerPairMac::handleMouseEvent):
2599         * UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.cpp:
2600         (WebKit::ScrollingTreeFrameScrollingNodeRemoteMac::handleWheelEvent):
2601         (WebKit::ScrollingTreeFrameScrollingNodeRemoteMac::handleMouseEvent):
2602         * UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.h:
2603
2604 2019-01-31  Michael Catanzaro  <mcatanzaro@igalia.com>
2605
2606         [SOUP] Move cookiePersistentStoragePath and cookiePersistentStorageType from NetworkProcess to NetworkSession
2607         https://bugs.webkit.org/show_bug.cgi?id=194075
2608
2609         Reviewed by Alex Christensen.
2610
2611         Move cookiePersistentStoragePath and cookiePersistentStorageType from NetworkProcess to
2612         NetworkSession to reduce globals. This removes two of the six soup-specific variables in
2613         NetworkProcessCreationParameters
2614
2615         * NetworkProcess/Cookies/WebCookieManager.h:
2616         * NetworkProcess/Cookies/WebCookieManager.messages.in:
2617         * NetworkProcess/Cookies/soup/WebCookieManagerSoup.cpp:
2618         (WebKit::WebCookieManager::setCookiePersistentStorage):
2619         * NetworkProcess/NetworkProcessCreationParameters.cpp:
2620         (WebKit::NetworkProcessCreationParameters::encode const):
2621         (WebKit::NetworkProcessCreationParameters::decode):
2622         * NetworkProcess/NetworkProcessCreationParameters.h:
2623         * NetworkProcess/NetworkSessionCreationParameters.cpp:
2624         (WebKit::NetworkSessionCreationParameters::privateSessionParameters):
2625         (WebKit::NetworkSessionCreationParameters::encode const):
2626         (WebKit::NetworkSessionCreationParameters::decode):
2627         * NetworkProcess/NetworkSessionCreationParameters.h:
2628         * NetworkProcess/soup/NetworkProcessSoup.cpp:
2629         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
2630         * NetworkProcess/soup/NetworkSessionSoup.cpp:
2631         (WebKit::NetworkSessionSoup::NetworkSessionSoup):
2632         * SourcesGTK.txt:
2633         * SourcesWPE.txt:
2634         * UIProcess/API/glib/WebKitCookieManager.cpp:
2635         (webkit_cookie_manager_set_persistent_storage):
2636         * UIProcess/WebCookieManagerProxy.cpp:
2637         (WebKit::WebCookieManagerProxy::WebCookieManagerProxy):
2638         * UIProcess/WebCookieManagerProxy.h:
2639         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2640         (WebKit::WebsiteDataStore::parameters):
2641         * UIProcess/WebsiteData/WebsiteDataStore.h:
2642         * UIProcess/WebsiteData/curl/WebsiteDataStoreCurl.cpp:
2643         (WebKit::WebsiteDataStore::platformSetNetworkParameters):
2644         (WebKit::WebsiteDataStore::platformSetParameters): Deleted.
2645         * UIProcess/soup/WebCookieManagerProxySoup.cpp:
2646         (WebKit::WebCookieManagerProxy::setCookiePersistentStorage):
2647         (WebKit::WebCookieManagerProxy::getCookiePersistentStorage const):
2648         * UIProcess/soup/WebProcessPoolSoup.cpp:
2649         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
2650
2651 2019-01-31  Ryosuke Niwa  <rniwa@webkit.org>
2652
2653         iOS: Crash in InteractiveUpdateHandler set by ViewGestureController::beginSwipeGesture
2654         https://bugs.webkit.org/show_bug.cgi?id=194083
2655
2656         Reviewed by Tim Horton.
2657
2658         We think this crash is a regression from r236966. Prior to r236966, we could only called
2659         removeSwipeSnapshot() only when m_provisionalOrSameDocumentLoadCallback was set but now
2660         we can call it either when m_snapshotRemovalTracker::start was called, or it had been reset.
2661         This can result in m_webPageProxyForBackForwardListForCurrentSwipe getting cleared before
2662         InteractiveUpdateHandler is called by UIGestureRecognizer, resulting in the crash.
2663
2664         This patch tries to restore the behavior prior to r236966 by only invoking removeSwipeSnapshot()
2665         when SnapshotRemovalTracker has a valid removal callback set.
2666
2667         Unfortunately no new tests since there is no reproducible test case, and neither API tests
2668         nor layout tests seem to have the capability to trigger swipe gestures via UIGestureRecognizer,
2669         which is required for this crash to occur. Notably, back-forward swipe tests I enabled in
2670         r240765 bypass UIKit and emulates the action instead.
2671
2672         * UIProcess/Cocoa/ViewGestureController.cpp:
2673         (WebKit::ViewGestureController::didReachMainFrameLoadTerminalState):
2674         * UIProcess/Cocoa/ViewGestureController.h:
2675         (WebKit::ViewGestureController::SnapshotRemovalTracker::hasRemovalCallback const):
2676
2677 2019-01-30  Benjamin Poulain  <benjamin@webkit.org>
2678
2679         <rdar://problem/47570443> Responsiveness timers are too expensive for frequent events
2680         https://bugs.webkit.org/show_bug.cgi?id=194003
2681
2682         Reviewed by Geoffrey Garen.
2683
2684         The problem here is specific to wheel events.
2685
2686         For every wheel event, we start a responsiveness timer and send
2687         a ping to the WebProcess. When the WebProcess respond, we stop the timer.
2688
2689         The cost of setting up the timers adds up since we get many events.
2690
2691         The first step to improve the situation was to switch ResponsivenessTimer
2692         to WebCore::Timer. Since WebCore::Timer reuse the same CFRunLoopTimerRef,
2693         we save the allocation/deallocation, insertion in the event loop, etc.
2694
2695         Using WebCore::Timer saves some instructions but we were still hitting
2696         the kernel at 120hz to set up then kill each timer.
2697         The second improvement of the patch is to avoid that by not killing the timer
2698         when we hear back from the WebProcess.
2699
2700         Instead of killing the timer, we let it run and ignore the result.
2701         When the next event comes, we reschedule the existing timer.
2702         This brings down the timers to 60Hz, the same rate as the events.
2703
2704         The very last event does time out. In that case, we have a bad idle wake up:
2705         we wake up a sleeping CPU do do nothing.
2706         In the case of wheel events, this is fine since we saved a bunch of CPU already.
2707         For all the other cases, I kept the normal operating mode to avoid the idle wake.
2708
2709         * UIProcess/ResponsivenessTimer.cpp:
2710         (WebKit::ResponsivenessTimer::ResponsivenessTimer):
2711         (WebKit::ResponsivenessTimer::invalidate):
2712         (WebKit::ResponsivenessTimer::timerFired):
2713         (WebKit::ResponsivenessTimer::start):
2714         (WebKit::ResponsivenessTimer::startWithLazyStop):
2715         (WebKit::ResponsivenessTimer::stop):
2716         (WebKit::ResponsivenessTimer::processTerminated):
2717         (WebKit::ResponsivenessTimer::~ResponsivenessTimer): Deleted.
2718         * UIProcess/ResponsivenessTimer.h:
2719         * UIProcess/WebPageProxy.cpp:
2720         (WebKit::WebPageProxy::sendWheelEvent):
2721         * UIProcess/WebProcessProxy.cpp:
2722         (WebKit::WebProcessProxy::isResponsiveWithLazyStop):
2723         * UIProcess/WebProcessProxy.h:
2724
2725 2019-01-30  Daniel Bates  <dabates@apple.com>
2726
2727         [iOS] REGRESSION (r238635): Text area fails to re-focus after dismissal of keyboard on support.apple.com
2728         https://bugs.webkit.org/show_bug.cgi?id=193987
2729         <rdar://problem/47230785>
2730
2731         Reviewed by Tim Horton.
2732
2733         It is unnecessary to relinquish first responder status when a user explicitly dismissing
2734         the keyboard. Moreover, doing so prevents key commands from being intercepted when a
2735         hardware keyboard is subsequently attached.
2736         
2737         Following r238635 a page becomes focused (accepting of keyboard input) and defocused
2738         when the WKContentView becomes first responder and resigns first responder, respectively.
2739         When a user explicitly dismisses the keyboard by tapping Done (iPhone) or the hide keyboard
2740         button (iPad) then UIKit tells WKContentView to resign its first responder status only
2741         to make its superview, WKWebView, first responder. When a person subsequently taps on the
2742         page again, the WKContentView requests to become the first responder. However changes to
2743         page focus are not guaranteed to be sent to the WebProcess immediately (WebPageProxy::activityStateDidChange()
2744         will schedule an update). In particular, they are not guaranteed to be sent before the
2745         WebProcess is told about a tap. Therefore, the WebProcess has out-of-date information on
2746         focus state of the page. Instead we should detect when WKWebView is being asked to resign
2747         as a result of the keyboard dismissal and refuse the request, taking care to end the current
2748         editing session, blur the focused element, and dismiss the on-screen keyboard.
2749
2750         * Platform/spi/ios/UIKitSPI.h: Expose some SPI.
2751         * UIProcess/ios/WKContentViewInteraction.h:
2752         * UIProcess/ios/WKContentViewInteraction.mm:
2753         (-[WKContentView setupInteraction]): Register to receive notifications whenever a user
2754         explicitly dismisses the keyboard.
2755         (-[WKContentView resignFirstResponderForWebView]): If we are being asked to resign as a
2756         result of a user explicitly dismissing the keyboard then refuse to resign.
2757         (-[WKContentView _keyboardDidRequestDismissal:]): Update state, if applicable.
2758
2759 2019-01-30  Keith Rollin  <krollin@apple.com>
2760
2761         Add default constructor for NetworkActivityTracker
2762         https://bugs.webkit.org/show_bug.cgi?id=194058
2763         <rdar://problem/47685457>
2764
2765         Reviewed by Chris Dumez.
2766
2767         ResourceNetworkActivityTracker has a default constructor. It also has
2768         a NetworkActivityTracker data member, which does not have a default
2769         constructor. This will cause some compilers to complain -- they can't
2770         default-create a ResourceNetworkActivityTracker because they can't
2771         default-create its data members. Address this by adding a default
2772         constructor for NetworkActivityTracker.
2773
2774         * NetworkProcess/NetworkActivityTracker.h:
2775
2776 2019-01-30  Daniel Steffen  <dsteffen@apple.com>
2777
2778         <rdar://problem/29471922> Safari should switch from the legacy denap SPI to handling vouchers
2779         https://bugs.webkit.org/show_bug.cgi?id=193992
2780
2781         Reviewed by Geoffrey Garen.
2782
2783         The denap SPI is deprecated.
2784         The new way of staying out of AppNap is through a voucher.
2785
2786         * Platform/IPC/mac/ConnectionMac.mm:
2787         (IPC::readFromMachPort):
2788         * Platform/IPC/mac/ImportanceAssertion.h:
2789         (IPC::ImportanceAssertion::ImportanceAssertion):
2790         (IPC::ImportanceAssertion::~ImportanceAssertion):
2791
2792 2019-01-30  Chris Dumez  <cdumez@apple.com>
2793
2794         Fix crashes when trying to ref the CallbackAggregator in NetworkProcess
2795         https://bugs.webkit.org/show_bug.cgi?id=194054
2796
2797         Reviewed by Brent Fulgham.
2798
2799         The callback aggregators should be ThreadSafeRefCounted since they are passed to other threads.
2800
2801         * NetworkProcess/NetworkProcess.cpp:
2802         (WebKit::NetworkProcess::fetchWebsiteData):
2803         (WebKit::NetworkProcess::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores):
2804         (WebKit::NetworkProcess::topPrivatelyControlledDomainsWithWebsiteData):
2805
2806 2019-01-30  Daniel Bates  <dabates@apple.com>
2807
2808         [iOS] Keyups for non-modifier keys identified as "Dead" when not focused in a content-editable element
2809         https://bugs.webkit.org/show_bug.cgi?id=192824
2810         <rdar://problem/47100332>
2811
2812         Reviewed by Wenson Hsieh.
2813
2814         Use the same code path for key events to editable elements and non-editable elements.
2815
2816         Currently we have different code paths for hardware key events depending on whether the active element
2817         is editable or non-editable. Historically to support dispatching DOM keyboard events for hardware key
2818         presses this differentiation was a necessary workaround for UIKit's event processing precedence of
2819         interpreting key events for system text editing commands and app commands before dispatching unhandled
2820         key events to WebKit. This workaround intercepted raw key UIEvents and manually reconstructed a
2821         WebEvent from it. However there is not enough information in an UIEvent to reconstruct a WebEvent that
2822         is identical to the WebEvent that UIKit would have dispatched. In particular, keyup UIEvents always have
2823         empty modified and unmodified input strings. The UIKit keyboard machinery maintains additional state
2824         that is necessary to manufacture the correct WebEvent corresponding to a UIEvent.
2825
2826         As a side benefit of this change, with the exception of modifier flag changes, both hardware and software
2827         key events use the same code path.
2828
2829         * UIProcess/ios/WKContentViewInteraction.h:
2830         * UIProcess/ios/WKContentViewInteraction.mm:
2831         (-[WKContentView shouldShowAutomaticKeyboardUI]): Extracted code from _requiresKeyboardWhenFirstResponder
2832         (-[WKContentView _disableAutomaticKeyboardUI]): Implement UIKit SPI to prevent showing the keyboard UI
2833         when there is no focused element now that we are no longer intercepting key UIEvents. Formerly the
2834         keyboard UI was disabled as a side effect of not becoming first responder when there was no focused
2835         element (by returning NO in -_requiresKeyboardWhenFirstResponder).
2836         (-[WKContentView _requiresKeyboardWhenFirstResponder]): Always return YES when building with USE(UIKIT_KEYBOARD_ADDITIONS)
2837         so that we always accept key events. Instead of selectively replying to create a keyboard as a means of
2838         hiding the automatic keyboard UI we now implement _disableAutomaticKeyboardUI to selectively hide the
2839         automatic keyboard UI.
2840         (-[WKContentView textInputTraits]): Do not update traits when the keyboard is going to be dismissed
2841         now that we require a keyboard when first responder even if the focused element is non-editable.
2842         (-[WKContentView _didHandleKeyEvent:eventWasHandled:]): Skip logic for re-sending UIEvents to UIKit
2843         as UIKit now processes the event first. This logic was necessary in order to finally allow UIKit
2844         its chance to interpret the UIEvent, we intercepted, for app key commands.
2845         (-[WKContentView _elementDidBlur]): Call [self _endEditing] so that we dismiss any open form controls
2846         (e.g. a <select> popover menu). Currently this happens either by -_requiresKeyboardWhenFirstResponder
2847         responding NO when switching to another field or pressing Tab or Shift + Tab key command, which we will
2848         no longer use when building with USE(UIKIT_KEYBOARD_ADDITIONS) once I land <https://bugs.webkit.org/show_bug.cgi?id=193048>.
2849         * UIProcess/ios/forms/WKFormSelectPopover.mm:
2850         (-[WKSelectPopover initWithView:hasGroups:]): Do not assign ourself as the keyboard delegate. Otherwise,
2851         type ahead and tab cycling will not work. Currently type ahead and tab cycling work by using the non-
2852         editable code path via -_handleKeyUIEvent. Now that we no longer differentiate between key events for
2853         editable and non-editable elements we need to ensure that the WKContentView is the keyboard delegate
2854         when the popover is presented.
2855
2856 2019-01-30  Per Arne Vollan  <pvollan@apple.com>
2857
2858         [macOS] Sandbox fails to compile on 10.12
2859         https://bugs.webkit.org/show_bug.cgi?id=194035
2860         <rdar://problem/47651260>
2861
2862         Reviewed by Brent Fulgham.
2863
2864         This was caused by the commit <https://trac.webkit.org/changeset/239994>, which is only valid for
2865         10.14 and later.
2866
2867         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
2868         * WebProcess/com.apple.WebProcess.sb.in:
2869
2870 2019-01-29  Conrad Shultz  <conrad_shultz@apple.com>
2871
2872         Ensure image picker sourceType is set before cameraDevice
2873         https://bugs.webkit.org/show_bug.cgi?id=193998
2874
2875         Reviewed by Beth Dakin.
2876
2877         * UIProcess/ios/forms/WKFileUploadPanel.mm:
2878         (-[WKFileUploadPanel _showPhotoPickerWithSourceType:]):
2879
2880 2019-01-30  Chris Dumez  <cdumez@apple.com>
2881
2882         Regression(PSON) Load hang can occur on history navigation
2883         https://bugs.webkit.org/show_bug.cgi?id=194030
2884         <rdar://problem/47656939>
2885
2886         Reviewed by Antti Koivisto.
2887
2888         We do not support having more than one WebPage in a WebProcess with the same page ID. As a result,
2889         if we decide to reuse an existing process on process-swap, we need to make sure that we either use
2890         its suspended page (when possible, meaning that it is for the right HistoryItem / page) or we need
2891         make sure we drop the existing suspended page for this process / pagePID combination, so that the
2892         WebPage on WebProcess side gets closed before we attempt to do the new load.
2893
2894         We were doing this correctly in 2 places in WebProcessPool::processForNavigationInternal() but failed
2895         to do so in a third place, when doing back to a HistoryItem which does not have a SuspendedPage but
2896         whose process is still alive (presumably because it is kept alive by another suspended page). This
2897         patch fixes this third place to remove any suspended page in the process for the current page before
2898         reusing the process. An assertion was also added to the call site in
2899         WebPageProxy::receivedNavigationPolicyDecision() to make sure we catch this more easily in the
2900         future.
2901
2902         * UIProcess/WebPageProxy.cpp:
2903         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
2904         * UIProcess/WebProcessPool.cpp:
2905         (WebKit::WebProcessPool::processForNavigationInternal):
2906         (WebKit::WebProcessPool::removeAllSuspendedPagesForPage):
2907         (WebKit::WebProcessPool::hasSuspendedPageFor const):
2908         * UIProcess/WebProcessPool.h:
2909
2910 2019-01-30  Carlos Garcia Campos  <cgarcia@igalia.com>
2911
2912         [GTK][Wayland] REGRESSION(r240712): Clear the GL context if it's the current one on dispose
2913         https://bugs.webkit.org/show_bug.cgi?id=194024
2914
2915         Reviewed by Michael Catanzaro.
2916
2917         Fixes a crash in gdk_gl_context_dispose().
2918
2919         * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
2920         (WebKit::AcceleratedBackingStoreWayland::~AcceleratedBackingStoreWayland):
2921
2922 2019-01-30  Antti Koivisto  <antti@apple.com>
2923
2924         Crash in WebKit::RemoteLayerTreePropertyApplier::updateChildren
2925         https://bugs.webkit.org/show_bug.cgi?id=193897
2926         <rdar://problem/47427750>
2927
2928         Reviewed by Simon Fraser.
2929
2930         There has been some null pointer crashes where we fail to find a remote layer tree node that matches
2931         the transaction properties.
2932
2933         * Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
2934         (WebKit::RemoteLayerTreePropertyApplier::updateChildren):
2935
2936         Null check the nodes.
2937
2938 2019-01-30  Simon Fraser  <simon.fraser@apple.com>
2939
2940         Add some basic geometry information to the scrolling tree
2941         https://bugs.webkit.org/show_bug.cgi?id=194002
2942
2943         Reviewed by Antti Koivisto.
2944
2945         Add a comment explaining why we don't need to encode/decode ParentRelativeScrollableRect.
2946
2947         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
2948         (ArgumentCoder<ScrollingStateFrameHostingNode>::encode):
2949
2950 2019-01-30  Carlos Garcia Campos  <cgarcia@igalia.com>
2951
2952         [GTK] gdk_cairo_draw_from_gl() in AcceleratedBackingStoreWayland fails in GtkInspector's magnifier
2953         https://bugs.webkit.org/show_bug.cgi?id=193903
2954
2955         Reviewed by Michael Catanzaro.
2956
2957         The problem is that the GL context used by WaylandCompositor can't share resources with the one used by GTK+
2958         when painting with gdk_cairo_draw_from_gl(). Accelerated compositing in Wayland works only because
2959         WaylandCompositor makes the context current only once on initialization. So, when we render the first frame on
2960         accelerated compositing mode, GTK+ is rendering in non-GL mode, and switches to the GL mode when
2961         gdk_cairo_draw_from_gl() is called. Since GTK+ didn't have a GL context yet, the first frame is always rendered
2962         by GTK+ using the software fallback (glReadPixels). The thing is that the first time gdk_cairo_draw_from_gl() is
2963         called, GTK+ creates a GL context for painting that is made current, and it will remain the current one
2964         forever. The first frame fails to render with "GL_INVALID_OPERATION in glBindTexture(non-gen name)" because the
2965         texture created in WaylandCompositor GL context can't be accessed from GTK+ GL context. The following frames are
2966         handled with the GTK+ GL context. I would say this works by casuality and it could be the cause of other
2967         accelerated compositing issues in Wayland.
2968
2969         We need to create our own GdkGLContext for the WebView, and use that in the WaylandCompositor. When the
2970         GdkGLContext is created, the GTK+ GL context for painting is used as a shared context, ensuring that resources
2971         created in the new context will be accessible from the painting one.
2972
2973         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2974         (webkitWebViewBaseMakeGLContextCurrent): Call AcceleratedBackingStore::makeContextCurrent().
2975         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
2976         * UIProcess/WebPageProxy.h:
2977         * UIProcess/gtk/AcceleratedBackingStore.h:
2978         (WebKit::AcceleratedBackingStore::makeContextCurrent): New virtual method only implemented by Wayland backend.
2979         * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
2980         (WebKit::AcceleratedBackingStoreWayland::tryEnsureGLContext): Try to create a GL context with
2981         gdk_window_create_gl_context(), falling back to a WebCore::GLContext if it fails or GTK+ version is not new enough.
2982         (WebKit::AcceleratedBackingStoreWayland::makeContextCurrent): Make the GL context current.
2983         (WebKit::AcceleratedBackingStoreWayland::paint): Check if we have a GdkGLContext before trying to use gdk_cairo_draw_from_gl().
2984         (WebKit::AcceleratedBackingStoreWayland::canGdkUseGL const): Deleted.
2985         * UIProcess/gtk/AcceleratedBackingStoreWayland.h:
2986         * UIProcess/gtk/WaylandCompositor.cpp:
2987         (WebKit::WaylandCompositor::Surface::Surface): Move the texture creation to setWebPage(), since we need the
2988         WebView GL context.
2989         (WebKit::WaylandCompositor::Surface::~Surface): Move the code to destroy GL resources to setWebPage().
2990         (WebKit::WaylandCompositor::Surface::setWebPage): Create the texture when a new page is set and destroy GL
2991         resources when unset.
2992         (WebKit::WaylandCompositor::Surface::prepareTextureForPainting): Make WebView GL context current.
2993         (WebKit::WaylandCompositor::Surface::commit): Ditto.
2994         (WebKit::WaylandCompositor::initializeEGL): Use a temporary GLContext.
2995         * UIProcess/gtk/WaylandCompositor.h:
2996         * UIProcess/gtk/WebPageProxyGtk.cpp:
2997         (WebKit::WebPageProxy::makeGLContextCurrent): Call webkitWebViewBaseMakeGLContextCurrent().
2998
2999 2019-01-29  Ryosuke Niwa  <rniwa@webkit.org>
3000
3001         iOS: Nullptr crash in WebPage::getPositionInformation dereferencing an input element for data list
3002         https://bugs.webkit.org/show_bug.cgi?id=193996
3003
3004         Reviewed by Wenson Hsieh.
3005
3006         Added a missing nullptr check.
3007
3008         * WebProcess/WebPage/ios/WebPageIOS.mm:
3009         (WebKit::WebPage::getPositionInformation):
3010
3011 2019-01-29  Simon Fraser  <simon.fraser@apple.com>
3012
3013         Add nodes to the scrolling tree in z-index order.
3014         https://bugs.webkit.org/show_bug.cgi?id=192529
3015         <rdar://problem/47402708>
3016
3017         Reviewed by Dean Jackson.
3018
3019         FrameHosting nodes have layers, so need to update them.
3020
3021         * Platform/Logging.cpp:
3022         (WebKit::initializeLogChannelsIfNecessary):
3023         * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
3024         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
3025
3026 2019-01-29  Alex Christensen  <achristensen@webkit.org>
3027
3028         Change NetworkConnectionToWebProcess* to NetworkConnectionToWebProcess& where possible
3029         https://bugs.webkit.org/show_bug.cgi?id=193974
3030
3031         Reviewed by Tim Horton.
3032
3033         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
3034         (WebKit::NetworkBlobRegistry::registerFileBlobURL):
3035         (WebKit::NetworkBlobRegistry::registerBlobURL):
3036         (WebKit::NetworkBlobRegistry::registerBlobURLOptionallyFileBacked):
3037         (WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
3038         (WebKit::NetworkBlobRegistry::unregisterBlobURL):
3039         (WebKit::NetworkBlobRegistry::blobSize):
3040         (WebKit::NetworkBlobRegistry::connectionToWebProcessDidClose):
3041         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
3042         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3043         (WebKit::NetworkConnectionToWebProcess::didClose):
3044         (WebKit::NetworkConnectionToWebProcess::registerFileBlobURL):
3045         (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
3046         (WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL):
3047         (WebKit::NetworkConnectionToWebProcess::registerBlobURLOptionallyFileBacked):
3048         (WebKit::NetworkConnectionToWebProcess::registerBlobURLForSlice):
3049         (WebKit::NetworkConnectionToWebProcess::unregisterBlobURL):
3050         (WebKit::NetworkConnectionToWebProcess::blobSize):
3051         * NetworkProcess/NetworkProcess.cpp:
3052         (WebKit::NetworkProcess::removeNetworkConnectionToWebProcess):
3053         * NetworkProcess/NetworkProcess.h:
3054
3055 2019-01-29  Youenn Fablet  <youenn@apple.com>
3056
3057         Adopt new SPI to evaluate server certificate trust
3058         https://bugs.webkit.org/show_bug.cgi?id=193355
3059
3060         Reviewed by Alex Christensen.
3061
3062         Use new SPI provided in NSURLSession to evaluate server certificates.
3063         If successful, let loading proceed as usual.
3064         Otherwise, go to the UIProcess to ask for a decision on continuing the load or not.
3065
3066         * NetworkProcess/cocoa/NetworkSessionCocoa.h:
3067         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
3068         (canNSURLSessionTrustEvaluate):
3069         (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
3070         (WebKit::NetworkSessionCocoa::continueDidReceiveChallenge):
3071
3072 2019-01-29  Tim Horton  <timothy_horton@apple.com>
3073
3074         Fix the build
3075
3076         * UIProcess/ios/WKDrawingCoordinator.h:
3077         * UIProcess/ios/WKDrawingCoordinator.mm:
3078         * UIProcess/ios/WKDrawingView.mm:
3079
3080 2019-01-29  Alex Christensen  <achristensen@webkit.org>
3081
3082         Remove unused NetworkProcessProxy::writeBlobToFilePath
3083         https://bugs.webkit.org/show_bug.cgi?id=193990
3084
3085         Reviewed by Wenson Hsieh.
3086
3087         This code was only used in code that was introduced in r235202
3088         but that has since been refactored to not use blobs.  Its tests still pass.
3089         This removes the only UIProcess-controlled code that uses NetworkBlobRegistry::singleton.
3090
3091         * NetworkProcess/NetworkProcess.cpp:
3092         (WebKit::NetworkProcess::writeBlobToFilePath): Deleted.
3093         * NetworkProcess/NetworkProcess.h:
3094         * NetworkProcess/NetworkProcess.messages.in:
3095         * UIProcess/Cocoa/WebViewImpl.mm:
3096         (WebKit::WebViewImpl::writeToURLForFilePromiseProvider):
3097         * UIProcess/Network/NetworkProcessProxy.cpp:
3098         (WebKit::NetworkProcessProxy::writeBlobToFilePath): Deleted.
3099         * UIProcess/Network/NetworkProcessProxy.h:
3100         * UIProcess/WebPageProxy.cpp:
3101         (WebKit::WebPageProxy::writeBlobToFilePath): Deleted.
3102         * UIProcess/WebPageProxy.h:
3103
3104 2019-01-29  Devin Rousso  <drousso@apple.com>
3105
3106         Web Inspector: expose a way of determining if a detached frontend is for a remote target
3107         https://bugs.webkit.org/show_bug.cgi?id=193951
3108         <rdar://problem/47621366>
3109
3110         Reviewed by Joseph Pecoraro.
3111
3112         * UIProcess/WebInspectorProxy.h:
3113         (WebKit::WebInspectorProxy::InspectionTargetType): Added.
3114         (WebKit::WebInspectorProxy::createFrontendWindow):
3115         * UIProcess/mac/WebInspectorProxyMac.mm:
3116         (WebKit::WebInspectorProxy::createFrontendWindow):
3117         (WebKit::WebInspectorProxy::platformCreateFrontendWindow):
3118         * UIProcess/mac/RemoteWebInspectorProxyMac.mm:
3119         (WebKit::RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow):
3120
3121         * UIProcess/API/Cocoa/_WKInspectorWindow.h: Moved from UIProcess/mac/WKInspectorWindow.h.
3122         * UIProcess/API/Cocoa/_WKInspectorWindow.mm: Moved from UIProcess/mac/WKInspectorWindow.mm.
3123         (-[WKInspectorWindow isRemote]): Added.
3124
3125         * Shared/API/Cocoa/_WKNSWindowExtras.mm:
3126         (-[NSWindow _web_isWebInspectorWindow]):
3127
3128         * PlatformMac.cmake:
3129         * SourcesCocoa.txt:
3130         * UnifiedSources-input.xcfilelist:
3131         * WebKit.xcodeproj/project.pbxproj:
3132
3133 2019-01-29  Alex Christensen  <achristensen@webkit.org>
3134
3135         Rename ChildProcess to AuxiliaryProcess
3136         https://bugs.webkit.org/show_bug.cgi?id=193943
3137
3138         Reviewed by Andy Estes.
3139
3140         "Child" implies that there is a parent, but I'm about to introduce a type of NetworkProcess that
3141         doesn't always have a parent, and may have many UIProcesses that it is the auxiliary for.
3142
3143         * CMakeLists.txt:
3144         * DerivedSources-input.xcfilelist:
3145         * DerivedSources-output.xcfilelist:
3146         * DerivedSources.make:
3147         * NetworkProcess/Cookies/WebCookieManager.cpp:
3148         * NetworkProcess/Cookies/soup/WebCookieManagerSoup.cpp:
3149         * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
3150         (WebKit::initializeAuxiliaryProcess<NetworkProcess>):
3151         (WebKit::initializeChildProcess<NetworkProcess>): Deleted.
3152         * NetworkProcess/NetworkProcess.cpp:
3153         (WebKit::callExitSoon):
3154         (WebKit::NetworkProcess::NetworkProcess):
3155         (WebKit::NetworkProcess::didReceiveMessage):
3156         (WebKit::NetworkProcess::initializeConnection):
3157         (WebKit::NetworkProcess::terminate):
3158         (WebKit::NetworkProcess::initializeProcess):
3159         (WebKit::NetworkProcess::initializeProcessName):
3160         (WebKit::NetworkProcess::initializeSandbox):
3161         * NetworkProcess/NetworkProcess.h:
3162         * NetworkProcess/NetworkProcessSupplement.h:
3163         * NetworkProcess/cache/NetworkCacheStorage.cpp:
3164         (WebKit::NetworkCache::Storage::deleteOldVersions):
3165         * NetworkProcess/ios/NetworkProcessIOS.mm:
3166         (WebKit::NetworkProcess::initializeProcess):
3167         (WebKit::NetworkProcess::initializeProcessName):
3168         (WebKit::NetworkProcess::initializeSandbox):
3169         * NetworkProcess/mac/NetworkProcessMac.mm:
3170         (WebKit::NetworkProcess::initializeProcess):
3171         (WebKit::NetworkProcess::initializeProcessName):
3172         (WebKit::NetworkProcess::initializeSandbox):
3173         * NetworkProcess/soup/NetworkProcessMainSoup.cpp:
3174         (WebKit::initializeAuxiliaryProcess<NetworkProcess>):
3175         (WebKit::NetworkProcessMainUnix):
3176         (WebKit::initializeChildProcess<NetworkProcess>): Deleted.
3177         * NetworkProcess/watchos/NetworkProximityManager.h:
3178         * NetworkProcess/watchos/NetworkProximityManager.mm:
3179         (WebKit::NetworkProximityManager::NetworkProximityManager):
3180         * NetworkProcess/win/NetworkProcessMainWin.cpp:
3181         (WebKit::initializeAuxiliaryProcess<NetworkProcess>):
3182         (WebKit::NetworkProcessMainWin):
3183         (WebKit::initializeChildProcess<NetworkProcess>): Deleted.
3184         * PlatformGTK.cmake:
3185         * PlatformMac.cmake:
3186         * PlatformWin.cmake:
3187         * PluginProcess/PluginProcess.cpp:
3188         (WebKit::PluginProcess::initializeProcess):
3189         (WebKit::PluginProcess::initializeConnection):
3190         (WebKit::PluginProcess::didReceiveMessage):
3191         (WebKit::PluginProcess::initializeProcessName):
3192         (WebKit::PluginProcess::initializeSandbox):
3193         * PluginProcess/PluginProcess.h:
3194         * PluginProcess/mac/PluginProcessMac.mm:
3195         (WebKit::PluginProcess::platformInitializeProcess):
3196         (WebKit::PluginProcess::initializeProcessName):
3197         (WebKit::PluginProcess::initializeSandbox):
3198         (WebKit::PluginProcess::stopRunLoop):
3199         * PluginProcess/unix/PluginProcessMainUnix.cpp:
3200         (WebKit::PluginProcessMainUnix):
3201         * PluginProcess/unix/PluginProcessUnix.cpp:
3202         (WebKit::PluginProcess::platformInitializeProcess):
3203         * Shared/Authentication/AuthenticationManager.cpp:
3204         (WebKit::AuthenticationManager::AuthenticationManager):
3205         * Shared/Authentication/AuthenticationManager.h:
3206         * Shared/AuxiliaryProcess.cpp: Copied from Source/WebKit/Shared/ChildProcess.cpp.
3207         (WebKit::AuxiliaryProcess::AuxiliaryProcess):
3208         (WebKit::AuxiliaryProcess::~AuxiliaryProcess):
3209         (WebKit::AuxiliaryProcess::didClose):
3210         (WebKit::AuxiliaryProcess::initialize):
3211         (WebKit::AuxiliaryProcess::setProcessSuppressionEnabled):
3212         (WebKit::AuxiliaryProcess::initializeProcess):
3213         (WebKit::AuxiliaryProcess::initializeProcessName):
3214         (WebKit::AuxiliaryProcess::initializeConnection):
3215         (WebKit::AuxiliaryProcess::addMessageReceiver):
3216         (WebKit::AuxiliaryProcess::removeMessageReceiver):
3217         (WebKit::AuxiliaryProcess::disableTermination):
3218         (WebKit::AuxiliaryProcess::enableTermination):
3219         (WebKit::AuxiliaryProcess::messageSenderConnection):
3220         (WebKit::AuxiliaryProcess::messageSenderDestinationID):
3221         (WebKit::AuxiliaryProcess::terminationTimerFired):
3222         (WebKit::AuxiliaryProcess::stopRunLoop):
3223         (WebKit::AuxiliaryProcess::platformStopRunLoop):
3224         (WebKit::AuxiliaryProcess::terminate):
3225         (WebKit::AuxiliaryProcess::shutDown):
3226         (WebKit::AuxiliaryProcess::registerURLSchemeServiceWorkersCanHandle const):
3227         (WebKit::AuxiliaryProcess::platformInitialize):
3228         (WebKit::AuxiliaryProcess::initializeSandbox):
3229         (WebKit::AuxiliaryProcess::didReceiveInvalidMessage):
3230         (WebKit::AuxiliaryProcess::didReceiveMemoryPressureEvent):
3231         (WebKit::ChildProcess::ChildProcess): Deleted.
3232         (WebKit::ChildProcess::~ChildProcess): Deleted.
3233         (WebKit::ChildProcess::didClose): Deleted.
3234         (WebKit::ChildProcess::initialize): Deleted.
3235         (WebKit::ChildProcess::setProcessSuppressionEnabled): Deleted.
3236         (WebKit::ChildProcess::initializeProcess): Deleted.
3237         (WebKit::ChildProcess::initializeProcessName): Deleted.
3238         (WebKit::ChildProcess::initializeConnection): Deleted.
3239         (WebKit::ChildProcess::addMessageReceiver): Deleted.
3240         (WebKit::ChildProcess::removeMessageReceiver): Deleted.
3241         (WebKit::ChildProcess::disableTermination): Deleted.
3242         (WebKit::ChildProcess::enableTermination): Deleted.
3243         (WebKit::ChildProcess::messageSenderConnection): Deleted.
3244         (WebKit::ChildProcess::messageSenderDestinationID): Deleted.
3245         (WebKit::ChildProcess::terminationTimerFired): Deleted.
3246         (WebKit::ChildProcess::stopRunLoop): Deleted.
3247         (WebKit::ChildProcess::platformStopRunLoop): Deleted.
3248         (WebKit::ChildProcess::terminate): Deleted.
3249         (WebKit::ChildProcess::shutDown): Deleted.
3250         (WebKit::ChildProcess::registerURLSchemeServiceWorkersCanHandle const): Deleted.
3251         (WebKit::ChildProcess::platformInitialize): Deleted.
3252         (WebKit::ChildProcess::initializeSandbox): Deleted.
3253         (WebKit::ChildProcess::didReceiveInvalidMessage): Deleted.
3254         (WebKit::ChildProcess::didReceiveMemoryPressureEvent): Deleted.
3255         * Shared/AuxiliaryProcess.h: Copied from Source/WebKit/Shared/ChildProcess.h.
3256         (WebKit::ChildProcess::parentProcessConnection const): Deleted.
3257         (WebKit::ChildProcess::messageReceiverMap): Deleted.
3258         (WebKit::ChildProcess::setTerminationTimeout): Deleted.
3259         (WebKit::ChildProcess::shouldOverrideQuarantine): Deleted.
3260         * Shared/AuxiliaryProcess.messages.in: Copied from Source/WebKit/Shared/ChildProcess.messages.in.
3261         * Shared/AuxiliaryProcessSupplement.h: Copied from Source/WebKit/Shared/ChildProcessSupplement.h.
3262         (WebKit::AuxiliaryProcessSupplement::~AuxiliaryProcessSupplement):
3263         (WebKit::ChildProcessSupplement::~ChildProcessSupplement): Deleted.
3264         (WebKit::ChildProcessSupplement::initializeConnection): Deleted.
3265         * Shared/ChildProcess.cpp: Removed.
3266         * Shared/ChildProcess.h: Removed.
3267         * Shared/ChildProcess.messages.in: Removed.
3268         * Shared/ChildProcessSupplement.h: Removed.
3269         * Shared/Cocoa/AuxiliaryProcessCocoa.mm: Copied from Source/WebKit/Shared/Cocoa/ChildProcessCocoa.mm.
3270         (WebKit::AuxiliaryProcess::didReceiveInvalidMessage):
3271         (WebKit::ChildProcess::didReceiveInvalidMessage): Deleted.
3272         * Shared/Cocoa/ChildProcessCocoa.mm: Removed.
3273         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
3274         (WebKit::initializeAuxiliaryProcess):
3275         (WebKit::XPCServiceInitializer):
3276         (WebKit::initializeChildProcess): Deleted.
3277         * Shared/WebSQLiteDatabaseTracker.cpp:
3278         (WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker):
3279         (WebKit::WebSQLiteDatabaseTracker::hysteresisUpdated):
3280         (WebKit::m_childProcessType): Deleted.
3281         * Shared/WebSQLiteDatabaseTracker.h:
3282         * Shared/ios/AuxiliaryProcessIOS.mm: Copied from Source/WebKit/Shared/ios/ChildProcessIOS.mm.
3283         (WebKit::AuxiliaryProcess::platformInitialize):
3284         (WebKit::AuxiliaryProcess::initializeSandbox):
3285         (WebKit::AuxiliaryProcess::setQOS):
3286         (WebKit::AuxiliaryProcess::platformStopRunLoop):
3287         (WebKit::ChildProcess::platformInitialize): Deleted.
3288         (WebKit::ChildProcess::initializeSandbox): Deleted.
3289         (WebKit::ChildProcess::setQOS): Deleted.
3290         (WebKit::ChildProcess::platformStopRunLoop): Deleted.
3291         * Shared/ios/ChildProcessIOS.mm: Removed.
3292         * Shared/mac/AuxiliaryProcessMac.mm: Copied from Source/WebKit/Shared/mac/ChildProcessMac.mm.
3293         (WebKit::SandboxInfo::SandboxInfo):
3294         (WebKit::AuxiliaryProcess::launchServicesCheckIn):
3295         (WebKit::AuxiliaryProcess::platformInitialize):
3296         (WebKit::processStorageClass):
3297         (WebKit::sandboxDirectory):
3298         (WebKit::applySandbox):
3299         (WebKit::initializeSandboxParameters):
3300         (WebKit::AuxiliaryProcess::initializeSandbox):
3301         (WebKit::AuxiliaryProcess::stopNSAppRunLoop):
3302         (WebKit::AuxiliaryProcess::stopNSRunLoop):
3303         (WebKit::AuxiliaryProcess::platformStopRunLoop):
3304         (WebKit::AuxiliaryProcess::setQOS):
3305         (WebKit::AuxiliaryProcess::isSystemWebKit):
3306         (WebKit::ChildProcess::launchServicesCheckIn): Deleted.
3307         (WebKit::ChildProcess::platformInitialize): Deleted.
3308         (WebKit::ChildProcess::initializeSandbox): Deleted.
3309         (WebKit::ChildProcess::stopNSAppRunLoop): Deleted.
3310         (WebKit::ChildProcess::stopNSRunLoop): Deleted.
3311         (WebKit::ChildProcess::platformStopRunLoop): Deleted.
3312         (WebKit::ChildProcess::setQOS): Deleted.
3313         (WebKit::ChildProcess::isSystemWebKit): Deleted.
3314         * Shared/mac/ChildProcessMac.mm: Removed.
3315         * Shared/mac/SecItemShim.cpp:
3316         (WebKit::globalNetworkProcess):
3317         (WebKit::sendSecItemRequest):
3318         (WebKit::initializeSecItemShim):
3319         * Shared/mac/SecItemShim.h:
3320         * Shared/unix/AuxiliaryProcessMain.cpp: Copied from Source/WebKit/Shared/unix/ChildProcessMain.cpp.
3321         (WebKit::AuxiliaryProcessMainBase::parseCommandLine):
3322         (WebKit::ChildProcessMainBase::parseCommandLine): Deleted.
3323         * Shared/unix/AuxiliaryProcessMain.h: Copied from Source/WebKit/Shared/unix/ChildProcessMain.h.
3324         (WebKit::AuxiliaryProcessMainBase::takeInitializationParameters):
3325         (WebKit::initializeAuxiliaryProcess):
3326         (WebKit::AuxiliaryProcessMain):
3327         (WebKit::ChildProcessMainBase::platformInitialize): Deleted.
3328         (WebKit::ChildProcessMainBase::platformFinalize): Deleted.
3329         (WebKit::ChildProcessMainBase::takeInitializationParameters): Deleted.
3330         (WebKit::initializeChildProcess): Deleted.
3331         (WebKit::ChildProcessMain): Deleted.
3332         * Shared/unix/ChildProcessMain.cpp: Removed.
3333         * Shared/unix/ChildProcessMain.h: Removed.
3334         * Shared/win/AuxiliaryProcessMainWin.cpp: Copied from Source/WebKit/Shared/win/ChildProcessMainWin.cpp.
3335         (WebKit::AuxiliaryProcessMainBase::parseCommandLine):
3336         (WebKit::ChildProcessMainBase::parseCommandLine): Deleted.
3337         * Shared/win/ChildProcessMainWin.cpp: Removed.
3338         * Sources.txt:
3339         * SourcesCocoa.txt:
3340         * SourcesGTK.txt:
3341         * SourcesWPE.txt:
3342         * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
3343         * UIProcess/Authentication/AuthenticationChallengeProxy.h:
3344         * UIProcess/AuxiliaryProcessProxy.cpp: Copied from Source/WebKit/UIProcess/ChildProcessProxy.cpp.
3345         (WebKit::AuxiliaryProcessProxy::AuxiliaryProcessProxy):
3346         (WebKit::AuxiliaryProcessProxy::~AuxiliaryProcessProxy):
3347         (WebKit::AuxiliaryProcessProxy::getLaunchOptions):
3348         (WebKit::AuxiliaryProcessProxy::connect):
3349         (WebKit::AuxiliaryProcessProxy::terminate):
3350         (WebKit::AuxiliaryProcessProxy::state const):
3351         (WebKit::AuxiliaryProcessProxy::sendMessage):
3352         (WebKit::AuxiliaryProcessProxy::addMessageReceiver):
3353         (WebKit::AuxiliaryProcessProxy::removeMessageReceiver):
3354         (WebKit::AuxiliaryProcessProxy::dispatchMessage):
3355         (WebKit::AuxiliaryProcessProxy::dispatchSyncMessage):
3356         (WebKit::AuxiliaryProcessProxy::didFinishLaunching):
3357         (WebKit::AuxiliaryProcessProxy::shutDownProcess):
3358         (WebKit::AuxiliaryProcessProxy::setProcessSuppressionEnabled):
3359         (WebKit::AuxiliaryProcessProxy::connectionWillOpen):
3360         (WebKit::ChildProcessProxy::ChildProcessProxy): Deleted.
3361         (WebKit::ChildProcessProxy::~ChildProcessProxy): Deleted.
3362         (WebKit::ChildProcessProxy::getLaunchOptions): Deleted.
3363         (WebKit::ChildProcessProxy::connect): Deleted.
3364         (WebKit::ChildProcessProxy::terminate): Deleted.
3365         (WebKit::ChildProcessProxy::state const): Deleted.
3366         (WebKit::ChildProcessProxy::sendMessage): Deleted.
3367         (WebKit::ChildProcessProxy::addMessageReceiver): Deleted.
3368         (WebKit::ChildProcessProxy::removeMessageReceiver): Deleted.
3369         (WebKit::ChildProcessProxy::dispatchMessage): Deleted.
3370         (WebKit::ChildProcessProxy::dispatchSyncMessage): Deleted.
3371         (WebKit::ChildProcessProxy::didFinishLaunching): Deleted.
3372         (WebKit::ChildProcessProxy::shutDownProcess): Deleted.
3373         (WebKit::ChildProcessProxy::setProcessSuppressionEnabled): Deleted.
3374         (WebKit::ChildProcessProxy::connectionWillOpen): Deleted.
3375         * UIProcess/AuxiliaryProcessProxy.h: Copied from Source/WebKit/UIProcess/ChildProcessProxy.h.
3376         (WebKit::AuxiliaryProcessProxy::send):
3377         (WebKit::AuxiliaryProcessProxy::sendSync):
3378         (WebKit::AuxiliaryProcessProxy::sendWithAsyncReply):
3379         (WebKit::ChildProcessProxy::send): Deleted.
3380         (WebKit::ChildProcessProxy::sendSync): Deleted.
3381         (WebKit::ChildProcessProxy::connection const): Deleted.
3382         (WebKit::ChildProcessProxy::hasConnection const): Deleted.
3383         (WebKit::ChildProcessProxy::processIdentifier const): Deleted.
3384         (WebKit::ChildProcessProxy::canSendMessage const): Deleted.
3385         (WebKit::ChildProcessProxy::coreProcessIdentifier const): Deleted.
3386         (WebKit::ChildProcessProxy::platformGetLaunchOptions): Deleted.
3387         (WebKit::ChildProcessProxy::sendWithAsyncReply): Deleted.
3388         * UIProcess/ChildProcessProxy.cpp: Removed.
3389         * UIProcess/ChildProcessProxy.h: Removed.
3390         * UIProcess/Downloads/DownloadProxyMap.cpp:
3391         (WebKit::DownloadProxyMap::DownloadProxyMap):
3392         * UIProcess/Downloads/DownloadProxyMap.h:
3393         * UIProcess/Network/NetworkProcessProxy.cpp:
3394         (WebKit::NetworkProcessProxy::NetworkProcessProxy):
3395         (WebKit::NetworkProcessProxy::getLaunchOptions):
3396         (WebKit::NetworkProcessProxy::createDownloadProxy):
3397         (WebKit::NetworkProcessProxy::didFinishLaunching):
3398         * UIProcess/Network/NetworkProcessProxy.h: