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