Move more macros out of WebKit's config.h
[WebKit-https.git] / Source / WebKit / ChangeLog
1 2018-12-10  Alexey Proskuryakov  <ap@apple.com>
2
3         Move more macros out of WebKit's config.h
4         https://bugs.webkit.org/show_bug.cgi?id=192430
5
6         Reviewed by Tim Horton.
7
8         * config.h:
9
10 2018-12-10  Chris Fleizach  <cfleizach@apple.com>
11
12         [meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
13         https://bugs.webkit.org/show_bug.cgi?id=192449
14
15         Reviewed by Darin Adler.
16
17         * NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
18         * NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:
19         * NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
20         * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
21         * NetworkProcess/ios/NetworkProcessIOS.mm:
22         * NetworkProcess/mac/NetworkProcessMac.mm:
23         * NetworkProcess/mac/RemoteNetworkingContext.mm:
24         * Platform/spi/ios/AccessibilitySupportSPI.h:
25         * PlatformMac.cmake:
26         * PluginProcess/PluginControllerProxy.cpp:
27         * PluginProcess/PluginProcess.cpp:
28         * PluginProcess/WebProcessConnection.cpp:
29         * Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb:
30         * Shared/API/c/cf/WKErrorCF.cpp:
31         (WKErrorCreateWithCFError):
32         (WKErrorCopyCFError):
33         * Shared/API/c/cg/WKImageCG.cpp:
34         (WKImageCreateCGImage):
35         (WKImageCreateFromCGImage):
36         * Shared/ChildProcess.cpp:
37         * Shared/ContextMenuContextData.cpp:
38         * Shared/EditorState.cpp:
39         * Shared/Plugins/NPIdentifierData.cpp:
40         * Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
41         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
42         * Shared/SessionState.cpp:
43         * Shared/SessionTracker.cpp:
44         * Shared/ShareableBitmap.cpp:
45         * Shared/ShareableResource.cpp:
46         * Shared/VisibleContentRectUpdateInfo.cpp:
47         * Shared/WebBackForwardListItem.cpp:
48         * Shared/WebContextMenuItemData.cpp:
49         * Shared/WebCoreArgumentCoders.cpp:
50         * Shared/WebHitTestResultData.cpp:
51         * Shared/WebImage.cpp:
52         * Shared/WebMediaSessionMetadata.cpp:
53         * Shared/WebMemorySampler.cpp:
54         * Shared/WebMouseEvent.cpp:
55         * Shared/WebRenderObject.cpp:
56         * Shared/WebSQLiteDatabaseTracker.cpp:
57         * Shared/WebWheelEvent.cpp:
58         * Shared/cf/ArgumentCodersCF.cpp:
59         * Shared/ios/WebPlatformTouchPointIOS.cpp:
60         * SourcesCocoa.txt:
61         * UIProcess/API/APIContentRuleListStore.cpp:
62         * UIProcess/API/APIHitTestResult.cpp:
63         * UIProcess/API/APINavigation.cpp:
64         * UIProcess/API/APIOpenPanelParameters.cpp:
65         * UIProcess/API/APIPageConfiguration.cpp:
66         * UIProcess/API/C/WKPage.cpp:
67         (WKPageLoadURLWithShouldOpenExternalURLsPolicy):
68         (WKPageLoadURLWithUserData):
69         (WKPageLoadURLRequestWithUserData):
70         (WKPageSetPaginationMode):
71         (WKPageGetPaginationMode):
72         (WKPageSetPageLoaderClient):
73         (WKPageSetPagePolicyClient):
74         * UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
75         * UIProcess/Cocoa/WebViewImpl.h:
76         * UIProcess/Cocoa/WebViewImpl.mm:
77         * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
78         * UIProcess/WebStorage/LocalStorageDatabase.cpp:
79         * UIProcess/ios/WKContentView.mm:
80         (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
81         (-[WKContentView initWithFrame:processPool:configuration:webView:]):
82         (-[WKContentView dealloc]):
83         (-[WKContentView page]):
84         (-[WKContentView updateFixedClippingView:]):
85         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
86         (-[WKContentView _updateForScreen:]):
87         (-[WKContentView _accessibilityRegisterUIProcessTokens]):
88         (-[WKContentView _createDrawingAreaProxy]):
89         (-[WKContentView _didCommitLayerTree:]):
90         (-[WKContentView _wk_pageCountForPrintFormatter:]):
91         * UIProcess/ios/WKContentViewInteraction.mm:
92         (-[WKFocusedElementInfo initWithAssistedNodeInformation:isUserInitiated:userObject:]):
93         (hasAssistedNode):
94         (-[WKContentView setupInteraction]):
95         (-[WKContentView positionInformation]):
96         (-[WKContentView _webTouchEventsRecognized:]):
97         (inflateQuad):
98         (-[WKContentView _updateTapHighlight]):
99         (-[WKContentView _showTapHighlight]):
100         (-[WKContentView _requiresKeyboardWhenFirstResponder]):
101         (-[WKContentView _displayFormNodeInputView]):
102         (-[WKContentView inputView]):
103         (-[WKContentView _actionForLongPressFromPositionInformation:]):
104         (-[WKContentView currentPositionInformation]):
105         (-[WKContentView doAfterPositionInformationUpdate:forRequest:]):
106         (-[WKContentView _currentPositionInformationIsValidForRequest:]):
107         (-[WKContentView _hasValidOutstandingPositionInformationRequest:]):
108         (-[WKContentView _currentPositionInformationIsApproximatelyValidForRequest:]):
109         (-[WKContentView gestureRecognizerShouldBegin:]):
110         (-[WKContentView hasSelectablePositionAtPoint:]):
111         (-[WKContentView pointIsNearMarkedText:]):
112         (-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
113         (-[WKContentView webSelectionRectsForSelectionRects:]):
114         (-[WKContentView _twoFingerSingleTapGestureRecognized:]):
115         (-[WKContentView _stylusSingleTapRecognized:]):
116         (-[WKContentView _singleTapCommited:]):
117         (-[WKContentView _attemptClickAtLocation:]):
118         (-[WKContentView _positionInformationDidChange:]):
119         (-[WKContentView requiresAccessoryView]):
120         (-[WKContentView supportedPasteboardTypesForCurrentSelection]):
121         (-[WKContentView _lookupForWebView:]):
122         (-[WKContentView _shareForWebView:]):
123         (-[WKContentView textStylingAtPosition:inDirection:]):
124         (-[WKContentView canPerformActionForWebView:withSender:]):
125         (-[WKContentView selectForWebView:]):
126         (-[WKContentView _accessibilityRetrieveRectsEnclosingSelectionOffset:withGranularity:]):
127         (-[WKContentView _accessibilityRetrieveRectsAtSelectionOffset:withText:completionHandler:]):
128         (toGestureType):
129         (toUIWKGestureType):
130         (toSelectionTouch):
131         (toUIWKSelectionTouch):
132         (toGestureRecognizerState):
133         (toUIGestureRecognizerState):
134         (toUIWKSelectionFlags):
135         (toWKTextGranularity):
136         (toWKSelectionDirection):
137         (selectionChangedWithGesture):
138         (selectionChangedWithTouch):
139         (-[WKContentView changeSelectionWithGestureAt:withGesture:withState:withFlags:]):
140         (-[WKContentView autocorrectionData]):
141         (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
142         (-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
143         (-[WKContentView _updateAccessory]):
144         (-[WKContentView selectedTextRange]):
145         (-[WKContentView setMarkedText:selectedRange:]):
146         (coreWritingDirection):
147         (-[WKContentView closestPositionToPoint:]):
148         (-[WKContentView insertText:]):
149         (-[WKContentView textInputTraits]):
150         (-[WKContentView handleKeyWebEvent:]):
151         (-[WKContentView handleKeyWebEvent:withCompletionHandler:]):
152         (-[WKContentView isScrollableForKeyboardScrollViewAnimator:]):
153         (-[WKContentView keyboardScrollViewAnimator:distanceForIncrement:]):
154         (-[WKContentView assistedNodeInformation]):
155         (-[WKContentView assistedNodeSelectOptions]):
156         (isAssistableInputType):
157         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
158         (-[WKContentView _stopAssistingNode]):
159         (-[WKContentView updateCurrentAssistedNodeInformation:]):
160         (-[WKContentView presentViewControllerForCurrentAssistedNode]):
161         (-[WKContentView actionNameForFocusedFormControlView:]):
162         (-[WKContentView selectWordForReplacement]):
163         (-[WKContentView _updateChangedSelection:]):
164         (-[WKContentView _beginSuppressingSelectionAssistantForReason:]):
165         (-[WKContentView _stopSuppressingSelectionAssistantForReason:]):
166         (-[WKContentView _showPlaybackTargetPicker:fromRect:routeSharingPolicy:routingContextUID:]):
167         (-[WKContentView _showRunOpenPanel:resultListener:]):
168         (-[WKContentView _showShareSheet:completionHandler:]):
169         (-[WKContentView positionInformationForActionSheetAssistant:]):
170         (-[WKContentView updatePositionInformationForActionSheetAssistant:]):
171         (-[WKContentView _startDrag:item:]):
172         (-[WKContentView _didHandleAdditionalDragItemsRequest:]):
173         (-[WKContentView _didHandleStartDataInteractionRequest:]):
174         (dropOperationForWebCoreDragOperation):
175         (-[WKContentView dragDataForDropSession:dragDestinationAction:]):
176         (-[WKContentView _didConcludeEditDataInteraction:]):
177         (-[WKContentView _didPerformDragOperation:]):
178         (-[WKContentView _prepareToDragPromisedAttachment:]):
179         (-[WKContentView _itemsForBeginningOrAddingToSessionWithRegistrationList:stagedDragSource:]):
180         (-[WKContentView _autofillContext]):
181         (-[WKContentView _dragInteraction:itemsForAddingToSession:withTouchAtPoint:completion:]):
182         (-[WKContentView _dragInteraction:prepareForSession:completion:]):
183         (-[WKContentView dragInteraction:itemsForBeginningSession:]):
184         (-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
185         (-[WKContentView dragInteraction:session:didEndWithOperation:]):
186         (-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
187         (-[WKContentView dropInteraction:performDrop:]):
188         (-[WKContentView dropInteraction:sessionDidEnd:]):
189         (-[WKContentView allowsLanguageSelectionMenuForListViewController:]):
190         (-[WKContentView shouldDisplayInputContextViewForListViewController:]):
191         (-[WKContentView numericInputModeForListViewController:]):
192         (-[WKContentView textContentTypeForListViewController:]):
193         (-[WKContentView allowsDictationInputForListViewController:]):
194         (-[WKContentView _simulateLongPressActionAtLocation:]):
195         (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
196         (-[WKContentView _presentationRectsForPreviewItemController:]):
197         * UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
198         (WKFullScreenViewControllerPlaybackSessionModelClient::setInterface):
199         (WKFullScreenViewControllerVideoFullscreenModelClient::setInterface):
200         (WKFullScreenViewControllerVideoFullscreenModelClient::interface const):
201         (-[WKFullScreenViewController videoControlsManagerDidChange]):
202         (-[WKFullScreenViewController _manager]):
203         (-[WKFullScreenViewController _togglePiPAction:]):
204         * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
205         (-[WKFullscreenAnimationController configureInitialAndFinalStatesForTransition:]):
206         (-[WKFullScreenWindowController isFullScreen]):
207         (-[WKFullScreenWindowController enterFullScreen]):
208         (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
209         (-[WKFullScreenWindowController exitFullScreen]):
210         (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
211         (-[WKFullScreenWindowController _completedExitFullScreen]):
212         (-[WKFullScreenWindowController webViewDidRemoveFromSuperviewWhileInFullscreen]):
213         (-[WKFullScreenWindowController _exitFullscreenImmediately]):
214         (-[WKFullScreenWindowController _manager]):
215         * UIProcess/mac/WebPageProxyMac.mm:
216         * WebKit.xcodeproj/project.pbxproj:
217         * WebProcess/Cache/WebCacheStorageConnection.cpp:
218         * WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:
219         (mediaTimeToCurrentTime):
220         (-[WKAnimationDelegate initWithLayerID:layerTreeHost:]):
221         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
222         (-[WKAccessibilityWebPageObjectBase accessibilityRootObjectWrapper]):
223
224 2018-12-10  Tim Horton  <timothy_horton@apple.com>
225
226         WKWebView should support custom tintColor
227         https://bugs.webkit.org/show_bug.cgi?id=192518
228         <rdar://problem/37243261>
229
230         Reviewed by Wenson Hsieh.
231
232         * Platform/spi/ios/UIKitSPI.h:
233         * UIProcess/ios/WKContentViewInteraction.mm:
234         (-[WKContentView insertionPointColor]):
235         (-[WKContentView selectionBarColor]):
236         (-[WKContentView selectionHighlightColor]):
237         Grab insertion point and selection colors from UITextInputTraits.
238
239         (-[WKContentView _updateInteractionTintColor]):
240         Determine our effective tint color:
241             - transparent if interaction is disabled
242             - a CSS-derived color if caret-color style is applied
243             - the _inheritedInteractionTintColor, which climbs up to the tintColor API
244         Apply it to our UITextInputTraits.
245
246         (-[WKContentView tintColorDidChange]):
247         (-[WKContentView textInputTraits]):
248         Call _updateInteractionTintColor whenever we create a new UITextInputTraits
249         or when the tint color changes.
250
251 2018-12-09  Youenn Fablet  <youenn@apple.com>
252
253         Move capture manager from RealtimeMediaSourceCenter to capture factory
254         https://bugs.webkit.org/show_bug.cgi?id=192542
255
256         Reviewed by Eric Carlson.
257
258         Make sure to unregister for video capture as done for other capture types.
259         Implement manager which should be doing nothing as the manager is used for enumeration of devices
260         which should only happen in UIProcess.
261
262         Given that mock capture is interfering with UserMediaCaptureManager,
263         switching on/off mock capture will require creating a new process.
264         This shortcoming should be fixed once mock capture will be fully happening in
265         the same process as regular capture.
266
267         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
268         (WebKit::UserMediaCaptureManager::~UserMediaCaptureManager):
269         * WebProcess/cocoa/UserMediaCaptureManager.h:
270
271 2018-12-09  Saam barati  <sbarati@apple.com>
272
273         Enable HTTP and HTTPS proxies on iOS and make it a property of the NSURLSession
274         https://bugs.webkit.org/show_bug.cgi?id=192374
275         <rdar://problem/46506286>
276
277         Reviewed by Alex Christensen.
278
279         This patch makes it so that we can use HTTP/HTTPS proxies on iOS as well.
280         To enable on iOS, you can do something like:
281         $ defaults write -g WebKit2HTTPProxy -string "http://localhost:8080"
282         $ defaults write -g WebKit2HTTPSProxy -string "http://localhost:8080"
283         
284         This patch also changes the Proxy to be enabled on a per NSURLSession
285         basis instead of a per process basis.
286
287         * NetworkProcess/NetworkProcess.cpp:
288         (WebKit::NetworkProcess::initializeNetworkProcess):
289         * NetworkProcess/NetworkSessionCreationParameters.cpp:
290         (WebKit::NetworkSessionCreationParameters::privateSessionParameters):
291         (WebKit::NetworkSessionCreationParameters::encode const):
292         (WebKit::NetworkSessionCreationParameters::decode):
293         * NetworkProcess/NetworkSessionCreationParameters.h:
294         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
295         (WebKit::proxyDictionary):
296         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
297         * NetworkProcess/mac/NetworkProcessMac.mm:
298         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
299         (WebKit::overrideSystemProxies): Deleted.
300         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
301         (-[WKWebsiteDataStore _initWithConfiguration:]):
302         * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
303         * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:
304         (-[_WKWebsiteDataStoreConfiguration httpProxy]):
305         (-[_WKWebsiteDataStoreConfiguration setHTTPProxy:]):
306         (-[_WKWebsiteDataStoreConfiguration httpsProxy]):
307         (-[_WKWebsiteDataStoreConfiguration setHTTPSProxy:]):
308         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
309         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
310         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
311         (WebKit::WebsiteDataStore::parameters):
312         * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:
313         (WebKit::WebsiteDataStoreConfiguration::copy):
314         * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:
315         (WebKit::WebsiteDataStoreConfiguration::httpProxy const):
316         (WebKit::WebsiteDataStoreConfiguration::setHTTPProxy):
317         (WebKit::WebsiteDataStoreConfiguration::httpsProxy const):
318         (WebKit::WebsiteDataStoreConfiguration::setHTTPSProxy):
319
320 2018-12-09  Adrian Perez de Castro  <aperez@igalia.com>
321
322         Build failure due to missing include of APIWebsiteDataStore.h
323         https://bugs.webkit.org/show_bug.cgi?id=192541
324
325         Reviewed by Youenn Fablet.
326
327         * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp: Add missing
328         include of APIWebsiteDataStore.h
329
330 2018-12-09  Wenson Hsieh  <wenson_hsieh@apple.com>
331
332         [iOS device] Crash when attempting to call -[_WKAttachment info] for an editable image
333         https://bugs.webkit.org/show_bug.cgi?id=192538
334
335         Reviewed by Tim Horton.
336
337         Fix the crash by ensuring that the result of `-renderedDrawing` survives long enough to be wrapped by a
338         `RetainPtr` in `-PNGRepresentation`. This isn't currently testable, since this codepath isn't supported on the
339         iOS simulator; instead, I manually verified using MobileAttachments.app.
340
341         * UIProcess/ios/WKDrawingView.mm:
342         (-[WKDrawingView renderedDrawing]):
343
344 2018-12-09  Commit Queue  <commit-queue@webkit.org>
345
346         Unreviewed, rolling out r239010.
347         https://bugs.webkit.org/show_bug.cgi?id=192537
348
349         Breaks fast/visual-viewport/tiled-drawing/zoomed-fixed-
350         scrolling-layers-state.html again (Requested by ap on
351         #webkit).
352
353         Reverted changeset:
354
355         "Allow control over child order when adding nodes to the
356         scrolling tree"
357         https://bugs.webkit.org/show_bug.cgi?id=176914
358         https://trac.webkit.org/changeset/239010
359
360 2018-12-08  Alex Christensen  <achristensen@webkit.org>
361
362         Don't programmatically capitalize safe browsing warning buttons
363         https://bugs.webkit.org/show_bug.cgi?id=192531
364         <rdar://problem/46417791>
365
366         Reviewed by Darin Adler.
367
368         * UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
369         (makeButton):
370
371 2018-12-08  Alex Christensen  <achristensen@webkit.org>
372
373         Safe browsing warning should respect text size from settings
374         https://bugs.webkit.org/show_bug.cgi?id=192205
375
376         Reviewed by Tim Horton.
377
378         * UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
379         (fontWithSize):
380         (makeButton):
381         (-[WKSafeBrowsingWarning addContent]):
382         (-[WKSafeBrowsingWarning showDetailsClicked]):
383
384 2018-12-08  Frederic Wang  <fwang@igalia.com>
385
386         Allow control over child order when adding nodes to the scrolling tree
387         https://bugs.webkit.org/show_bug.cgi?id=176914
388         <rdar://problem/46542237>
389
390         Reviewed by Simon Fraser.
391
392         Based on an earlier patch by Simon Fraser.
393
394         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
395         (WebKit::RemoteScrollingCoordinatorTransaction::decode):
396
397 2018-12-07  Rob Buis  <rbuis@igalia.com>
398
399         Remove unused API in NetworkProcess
400         https://bugs.webkit.org/show_bug.cgi?id=192415
401
402         Reviewed by Alex Christensen.
403
404         This patch removed some unused API and headers in NetworkProcess.
405
406         * NetworkProcess/NetworkCORSPreflightChecker.cpp:
407         (WebKit::NetworkCORSPreflightChecker::startPreflight):
408         * NetworkProcess/NetworkCORSPreflightChecker.h:
409         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
410         * NetworkProcess/NetworkConnectionToWebProcess.h:
411         * NetworkProcess/NetworkContentRuleListManager.h:
412         * NetworkProcess/NetworkDataTask.cpp:
413         * NetworkProcess/NetworkDataTask.h:
414         * NetworkProcess/NetworkDataTaskBlob.cpp:
415         * NetworkProcess/NetworkLoad.cpp:
416         * NetworkProcess/NetworkLoad.h:
417         * NetworkProcess/NetworkLoadChecker.cpp:
418         * NetworkProcess/NetworkLoadChecker.h:
419         * NetworkProcess/NetworkLoadClient.h:
420         * NetworkProcess/NetworkLoadParameters.h:
421         * NetworkProcess/NetworkProcess.cpp:
422         * NetworkProcess/NetworkProcess.h:
423         * NetworkProcess/NetworkProcessCreationParameters.h:
424         * NetworkProcess/NetworkResourceLoadParameters.cpp:
425         (WebKit::NetworkResourceLoadParameters::encode const):
426         (WebKit::NetworkResourceLoadParameters::decode):
427         * NetworkProcess/NetworkResourceLoadParameters.h:
428         * NetworkProcess/NetworkResourceLoader.cpp:
429         (WebKit::NetworkResourceLoader::didReceiveBuffer):
430         * NetworkProcess/NetworkResourceLoader.h:
431         * NetworkProcess/NetworkSession.cpp:
432         * NetworkProcess/NetworkSession.h:
433         * NetworkProcess/NetworkSocketStream.cpp:
434         * NetworkProcess/NetworkSocketStream.h:
435         * NetworkProcess/PingLoad.cpp:
436         (WebKit::PingLoad::PingLoad):
437         * NetworkProcess/PingLoad.h:
438         * NetworkProcess/PreconnectTask.cpp:
439         (WebKit::PreconnectTask::PreconnectTask):
440         (WebKit::PreconnectTask::frameID const): Deleted.
441         (WebKit::PreconnectTask::pageID const): Deleted.
442         * NetworkProcess/PreconnectTask.h:
443
444 2018-12-07  Eric Carlson  <eric.carlson@apple.com>
445
446         [MediaStream] 'devicechange' event should not fire in frames that can't access capture devices
447         https://bugs.webkit.org/show_bug.cgi?id=192511
448         <rdar://problem/46562063>
449
450         Reviewed by Youenn Fablet.
451
452         * UIProcess/UserMediaPermissionCheckProxy.cpp:
453         (WebKit::UserMediaPermissionCheckProxy::UserMediaPermissionCheckProxy): Remove userMediaID parameter.
454         (WebKit::UserMediaPermissionCheckProxy::setUserMediaAccessInfo): ID not passed to callback.
455         * UIProcess/UserMediaPermissionCheckProxy.h:
456         (WebKit::UserMediaPermissionCheckProxy::create):
457         (WebKit::UserMediaPermissionCheckProxy::completionHandler): Deleted.
458
459         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
460         (WebKit::generateRequestID): New.
461         (WebKit::UserMediaPermissionRequestManagerProxy::captureDevicesChanged): Don't notify if
462         the page does not have a granted request and does not have persistent access.
463         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): Use generateRequestID.
464         (WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo): Change variable name.
465         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): Use generateRequestID.
466         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
467
468 2018-12-07  Saam Barati  <sbarati@apple.com>
469
470         WKWebProcessPlugInLoadDelegate should have API for saying which rendering events it wants to listen for
471         https://bugs.webkit.org/show_bug.cgi?id=192473
472
473         Reviewed by Andy Estes.
474
475         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
476         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
477         (PageLoaderClient::layoutMilestones const):
478
479 2018-12-07  Youenn Fablet  <youenn@apple.com>
480
481         Update libwebrtc up to 0d007d7c4f
482         https://bugs.webkit.org/show_bug.cgi?id=192316
483
484         Reviewed by Eric Carlson.
485
486         Update code base according new libwebrtc backend
487         In particular, use directly int64_t for packet time.
488
489         * Configurations/WebKit.xcconfig:
490         * NetworkProcess/webrtc/LibWebRTCSocketClient.cpp:
491         (WebKit::LibWebRTCSocketClient::signalReadPacket):
492         * NetworkProcess/webrtc/LibWebRTCSocketClient.h:
493         * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
494         * NetworkProcess/webrtc/NetworkRTCSocket.h:
495         * WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
496         (WebKit::LibWebRTCSocket::signalReadPacket):
497
498 2018-12-07  Truitt Savell  <tsavell@apple.com>
499
500         Unreviewed, rolling out r238947.
501
502         Revision caused fast/visual-viewport/tiled-drawing/zoomed-
503         fixed-scrolling-layers-state.html to constantly fail
504
505         Reverted changeset:
506
507         "Allow control over child order when adding nodes to the
508         scrolling tree"
509         https://bugs.webkit.org/show_bug.cgi?id=176914
510         https://trac.webkit.org/changeset/238947
511
512 2018-12-06  David Kilzer  <ddkilzer@apple.com>
513
514         Injected bundle for WebKitTestRunner leaks WKTypeRef objects
515         <https://webkit.org/b/192481>
516         <rdar://problem/46539059>
517
518         Reviewed by Simon Fraser.
519
520         Change function parameter name from `returnData[Ref]` to
521         `returnRetainedData[Ref]` to document that the value returned is
522         a +1 retained WKTypeRef object.
523
524         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
525         (WKBundlePostSynchronousMessage):
526         * WebProcess/InjectedBundle/API/c/WKBundle.h:
527         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
528         (WKBundlePagePostSynchronousMessageForTesting):
529         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
530
531 2018-12-06  Frederic Wang  <fwang@igalia.com>
532
533         Allow control over child order when adding nodes to the scrolling tree
534         https://bugs.webkit.org/show_bug.cgi?id=176914
535
536         Reviewed by Simon Fraser.
537
538         Based on an earlier patch by Simon Fraser.
539
540         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
541         (WebKit::RemoteScrollingCoordinatorTransaction::decode): Make explicit that we want to append
542         the new node at the end of child list.
543
544 2018-12-06  Yongjun Zhang  <yongjun_zhang@apple.com>
545
546         We should ignore minimumEffectiveDeviceWidth if the page specifies device-width in viewport meta-tag.
547         https://bugs.webkit.org/show_bug.cgi?id=192377
548         <rdar://problem/46364206>
549
550         Reviewed by Tim Horton.
551
552         Since we are using page's viewport arguments to decide the default viewport parameters and
553         whether we can use mininum effective device width, we should always call setViewportArguments()
554         regardless of shouldIgnoreMetaViewport settings.
555
556         * WebProcess/WebPage/WebPage.cpp:
557         (WebKit::WebPage::viewportPropertiesDidChange): Always call setViewportArguments().
558         (WebKit::WebPage::didCommitLoad): Ditto.
559
560 2018-12-06  Tim Horton  <timothy_horton@apple.com>
561
562         Web Share API: share overlay does not stick to the Safari window
563         https://bugs.webkit.org/show_bug.cgi?id=192469
564         <rdar://problem/46074833>
565
566         Reviewed by Wenson Hsieh.
567
568         * UIProcess/Cocoa/WKShareSheet.mm:
569         (-[WKShareSheet sharingServicePicker:didChooseSharingService:]):
570         (-[WKShareSheet sharingServicePicker:delegateForSharingService:]):
571         (-[WKShareSheet sharingService:sourceWindowForShareItems:sharingContentScope:]):
572         (-[WKShareSheet sharingService:didFailToShareItems:error:]):
573         (-[WKShareSheet sharingService:didShareItems:]):
574         Implement another NSSharingServicePickerDelegate method to return
575         an *NSSharingService* delegate when needed.
576
577         Implement an NSSharingServiceDelegate method to return the window that
578         the service's UI should attach to.
579
580         Also, instead of notifying the Web Content process when a service is picked
581         (or not) in the NSSharingServicePicker, wait until the share has completed
582         (or failed) to send didComplete. This both makes the return completion
583         value more accurate (matching iOS, if you cancel the share during the
584         recipient choice step, it will now fail), and avoids explicitly tearing
585         down the NSSharingServicePicker too early, which breaks the UI attaching mechanism.
586
587 2018-12-06  Wenson Hsieh  <wenson_hsieh@apple.com>
588
589         [iOS] WKWebView should match UITextView behavior when editing text with an RTL keyboard
590         https://bugs.webkit.org/show_bug.cgi?id=187554
591         <rdar://problem/42075638>
592
593         Reviewed by Tim Horton.
594
595         Add support for automatically switching the base writing direction to the default writing direction with respect
596         to the current keyboard in an editable WKWebView by implementing `-setBaseWritingDirection:forRange:`. On iOS 12
597         and earlier, UIKit invokes this protocol method whenever the keyboard is changed to one with a different writing
598         direction, although in some other versions of iOS, this only happens when first focusing an editable area.
599
600         Test: editing/input/ios/rtl-keyboard-input-on-focus.html
601
602         * Platform/spi/ios/UIKitSPI.h:
603
604         Declare UIKeyboardImpl IPI methods mostly for use in WebKitTestRunner (with the exception of
605         `-setInitialDirection`, which we may invoke when we receive the first post-layout EditorState update after
606         focusing an editable element).
607
608         * UIProcess/PageClient.h:
609         * UIProcess/WebPageProxy.cpp:
610         (WebKit::WebPageProxy::increaseListLevel):
611         (WebKit::WebPageProxy::decreaseListLevel):
612         (WebKit::WebPageProxy::changeListType):
613         (WebKit::WebPageProxy::setBaseWritingDirection):
614
615         Drive-by style fixes: make these bail and return early if `!isValid()`.
616
617         (WebKit::WebPageProxy::resetStateAfterProcessExited):
618
619         Reset assisted node state in the UI process upon web process termination.
620
621         * UIProcess/WebPageProxy.h:
622
623         Add plumbing for `setBaseWritingDirection`, from `WebPageProxy` to `WebPage` to `Editor`.
624
625         * UIProcess/ios/PageClientImplIOS.h:
626         * UIProcess/ios/PageClientImplIOS.mm:
627         (WebKit::PageClientImpl::didReceiveEditorStateUpdateAfterFocus):
628         * UIProcess/ios/WKContentViewInteraction.h:
629         * UIProcess/ios/WKContentViewInteraction.mm:
630         (-[WKContentView baseWritingDirectionForPosition:inDirection:]):
631         (coreWritingDirection):
632         (-[WKContentView setBaseWritingDirection:forRange:]):
633
634         Support `-setBaseWritingDirectionForPosition:forRange:`, but only in the case where the given range is the
635         selected range. This is all that's currently needed to fulfill the requirements in <rdar://problem/42075638>,
636         though we could potentially add full support for this in the future by mapping the given text range to a DOM
637         range and moving the selection prior to setting the base writing direction.
638
639         (-[WKContentView _didReceiveEditorStateUpdateAfterFocus]):
640
641         Add a hook to notify WKContentView when the first post-layout EditorState has been received in the UI process.
642         When this is invoked, if the web view is editable and the selection is not a range, we call into `UIKeyboardImpl`
643         to change the initial writing direction if necessary.
644
645         * UIProcess/ios/WebPageProxyIOS.mm:
646         (WebKit::WebPageProxy::startAssistingNode):
647         (WebKit::WebPageProxy::stopAssistingNode):
648         (WebKit::WebPageProxy::editorStateChanged):
649         * WebProcess/WebPage/WebPage.cpp:
650         (WebKit::WebPage::setBaseWritingDirection):
651         * WebProcess/WebPage/WebPage.h:
652         * WebProcess/WebPage/WebPage.messages.in:
653
654 2018-12-06  David Quesada  <david_quesada@apple.com>
655
656         -[WKProcessPool _resumeDownloadFromData:path:] should allow specifying the originating web view
657         https://bugs.webkit.org/show_bug.cgi?id=192411
658         rdar://problem/46492487
659
660         Reviewed by Alex Christensen.
661
662         * UIProcess/API/C/WKContext.cpp:
663         (WKContextResumeDownload):
664         * UIProcess/API/Cocoa/WKProcessPool.mm:
665         (-[WKProcessPool _resumeDownloadFromData:path:originatingWebView:]):
666         (-[WKProcessPool _resumeDownloadFromData:path:]): Deleted.
667         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
668         * UIProcess/WebProcessPool.cpp:
669         (WebKit::WebProcessPool::resumeDownload):
670          - Set the originating page of the DownloadProxy.
671          - If the originating page is non-null, use its session ID for the download.
672          - Remove a FIXME. It's possible to do this now by providing the web view whose session
673            should be used for the download.
674         * UIProcess/WebProcessPool.h:
675
676 2018-12-06  Jiewen Tan  <jiewen_tan@apple.com>
677
678         Unreviewed, a quick fix after r238919
679
680         Add an early return such that the error message is actually meaningful.
681
682         * UIProcess/WebAuthentication/Mock/MockHidService.cpp:
683         (WebKit::MockHidService::platformStartDiscovery):
684
685 2018-12-06  Alex Christensen  <achristensen@webkit.org>
686
687         Remove unused LoaderStrategy::storeDerivedDataToCache and associated dead code
688         https://bugs.webkit.org/show_bug.cgi?id=192452
689
690         Reviewed by Anders Carlsson.
691
692         This was introduced in r210835 but never used.
693         It's preventing me from making the disk cache associated with a SessionID/NetworkSession.
694
695         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
696         (WebKit::NetworkConnectionToWebProcess::storeDerivedDataToCache): Deleted.
697         * NetworkProcess/NetworkConnectionToWebProcess.h:
698         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
699         * NetworkProcess/NetworkResourceLoadParameters.cpp:
700         (WebKit::NetworkResourceLoadParameters::encode const):
701         (WebKit::NetworkResourceLoadParameters::decode):
702         * NetworkProcess/NetworkResourceLoadParameters.h:
703         * NetworkProcess/NetworkResourceLoader.cpp:
704         (WebKit::NetworkResourceLoader::continueDidReceiveResponse):
705         (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
706         (WebKit::NetworkResourceLoader::continueProcessingCachedEntryAfterDidReceiveResponse): Deleted.
707         * NetworkProcess/NetworkResourceLoader.h:
708         * WebProcess/Network/WebLoaderStrategy.cpp:
709         (WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
710         (WebKit::WebLoaderStrategy::storeDerivedDataToCache): Deleted.
711         * WebProcess/Network/WebLoaderStrategy.h:
712         * WebProcess/Network/WebResourceLoader.cpp:
713         (WebKit::WebResourceLoader::didRetrieveDerivedData): Deleted.
714         * WebProcess/Network/WebResourceLoader.messages.in:
715
716 2018-12-06  Carlos Eduardo Ramalho  <cadubentzen@gmail.com>
717
718         REGRESSION(r231043): [GTK] Undefined references to WebCore::LayerRepresentation::* with -DENABLE_OPENGL=OFF builds
719         https://bugs.webkit.org/show_bug.cgi?id=191997
720
721         Reviewed by Philippe Normand.
722
723         Fix build with -DENABLE_OPENGL=OFF and -DENABLE_VIDEO=OFF.
724
725         * Shared/WebEventConversion.cpp:
726         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent): add required #if ENABLE(ASYNC_SCROLLING)
727
728 2018-12-05  Ryosuke Niwa  <rniwa@webkit.org>
729
730         REGRESSION(PSON): Process swapping code doesn't set DisplayID in WebContent process
731         https://bugs.webkit.org/show_bug.cgi?id=192290
732
733         Reviewed by Simon Fraser.
734
735         Fixed the bug by updating the DisplayID upon attaching to a WebContent process
736         after a process swap as well as after the previous WebContent process had crashed.
737
738         Unfortunately no new tests since WebKitTestRunner / DumpRenderTree should use 0 as DisplayID
739         as they have an off-screen NSWindow. The issue that this results in no fallback for
740         the animation timer is tracked by webkit.org/b/192448.
741
742         * UIProcess/Cocoa/WebViewImpl.mm:
743         (WebKit::WebViewImpl::didRelaunchProcess):
744
745 2018-12-05  Youenn Fablet  <youenn@apple.com>
746
747         Remove a document entry from NetworkMDNSRegister::m_services when document goes away
748         https://bugs.webkit.org/show_bug.cgi?id=192429
749
750         Reviewed by Eric Carlson.
751
752         * NetworkProcess/webrtc/NetworkMDNSRegister.cpp:
753         (WebKit::NetworkMDNSRegister::unregisterMDNSNames):
754         We should remove the entry to limit the size of the map.
755
756 2018-12-05  Jiewen Tan  <jiewen_tan@apple.com>
757
758         [Mac] Layout Test http/wpt/webauthn/public-key-credential-create-success-hid.https.html and http/wpt/webauthn/public-key-credential-get-success-hid.https.html are flaky
759         https://bugs.webkit.org/show_bug.cgi?id=192061
760
761         Reviewed by Dewei Zhu.
762
763         Part 1.
764
765         Add some loggings to determine possible causes for the flakiness.
766
767         * UIProcess/WebAuthentication/Cocoa/HidService.mm:
768         (WebKit::HidService::continueAddDeviceAfterGetInfo):
769         * UIProcess/WebAuthentication/Mock/MockHidService.cpp:
770         (WebKit::MockHidService::platformStartDiscovery):
771
772 2018-12-05  Chris Dumez  <cdumez@apple.com>
773
774         Simplify logic inside WebPageProxy::continueNavigationInNewProcess()
775         https://bugs.webkit.org/show_bug.cgi?id=192404
776
777         Reviewed by Alex Christensen.
778
779         Simplify get the item state from the current back/forward list item, instead of
780         relying on WebBackForwardList::filteredItemStates().
781
782         * UIProcess/WebPageProxy.cpp:
783         (WebKit::WebPageProxy::continueNavigationInNewProcess):
784
785 2018-12-05  Youenn Fablet  <youenn@apple.com>
786
787         Enable the possibility to do video capture in UIProcess
788         https://bugs.webkit.org/show_bug.cgi?id=192394
789
790         Reviewed by Eric Carlson.
791
792         Add two web preferences to toggle audio/video capture in UIProcess or WebProcess.
793         Add mechanism for video capture that was not implemented yet.
794
795         * Shared/WebPreferences.yaml:
796         * Shared/WebPreferencesDefaultValues.h:
797         * Shared/WebProcessCreationParameters.cpp:
798         (WebKit::WebProcessCreationParameters::encode const):
799         (WebKit::WebProcessCreationParameters::decode):
800         * Shared/WebProcessCreationParameters.h:
801         * UIProcess/API/APIProcessPoolConfiguration.h:
802         * UIProcess/API/C/WKPreferences.cpp:
803         (WKPreferencesSetCaptureAudioInUIProcessEnabled):
804         (WKPreferencesGetCaptureAudioInUIProcessEnabled):
805         (WKPreferencesSetCaptureVideoInUIProcessEnabled):
806         (WKPreferencesGetCaptureVideoInUIProcessEnabled):
807         * UIProcess/API/C/WKPreferencesRef.h:
808         * UIProcess/WebPreferences.cpp:
809         (WebKit::WebPreferences::updateBoolValueForInternalDebugFeatureKey):
810         * UIProcess/WebProcessPool.cpp:
811         (WebKit::WebProcessPool::initializeNewWebProcess):
812         (WebKit::WebProcessPool::createWebPage):
813         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
814         (WebKit::UserMediaCaptureManager::initialize):
815
816 2018-12-05  Alex Christensen  <achristensen@webkit.org>
817
818         Make WebsiteDataStoreConfiguration a proper API object
819         https://bugs.webkit.org/show_bug.cgi?id=192380
820
821         Reviewed by Youenn Fablet.
822
823         In the immediate future I'll need to add things to _WKWebsiteDataStoreConfiguration.
824         Instead of making ivars, setting them, copying them to a local object, make this a wrapper of an API::Object
825         like all our other ObjC API objects are.
826
827         * Shared/API/APIObject.h:
828         (API::Object::wrapper const):
829         (API::Object::wrapper): Deleted.
830         * Shared/Cocoa/APIObject.mm:
831         (API::Object::ref const):
832         (API::Object::deref const):
833         (API::Object::newObject):
834         (API::Object::ref): Deleted.
835         (API::Object::deref): Deleted.
836         * Sources.txt:
837         * UIProcess/API/APIProcessPoolConfiguration.cpp:
838         (API::ProcessPoolConfiguration::createWithWebsiteDataStoreConfiguration):
839         * UIProcess/API/APIProcessPoolConfiguration.h:
840         * UIProcess/API/APIWebsiteDataStore.cpp:
841         (API::WebsiteDataStore::createLegacy):
842         (API::WebsiteDataStore::WebsiteDataStore):
843         (API::WebsiteDataStore::legacyDefaultDataStoreConfiguration):
844         * UIProcess/API/APIWebsiteDataStore.h:
845         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
846         (API::WebsiteDataStore::defaultDataStoreConfiguration):
847         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
848         (-[WKWebsiteDataStore _initWithConfiguration:]):
849         * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:
850         (-[_WKWebsiteDataStoreConfiguration _webStorageDirectory]):
851         (-[_WKWebsiteDataStoreConfiguration _setWebStorageDirectory:]):
852         (-[_WKWebsiteDataStoreConfiguration _indexedDBDatabaseDirectory]):
853         (-[_WKWebsiteDataStoreConfiguration _setIndexedDBDatabaseDirectory:]):
854         (-[_WKWebsiteDataStoreConfiguration _webSQLDatabaseDirectory]):
855         (-[_WKWebsiteDataStoreConfiguration _setWebSQLDatabaseDirectory:]):
856         (-[_WKWebsiteDataStoreConfiguration _cookieStorageFile]):
857         (-[_WKWebsiteDataStoreConfiguration _setCookieStorageFile:]):
858         (-[_WKWebsiteDataStoreConfiguration _resourceLoadStatisticsDirectory]):
859         (-[_WKWebsiteDataStoreConfiguration _setResourceLoadStatisticsDirectory:]):
860         (-[_WKWebsiteDataStoreConfiguration _cacheStorageDirectory]):
861         (-[_WKWebsiteDataStoreConfiguration _setCacheStorageDirectory:]):
862         (-[_WKWebsiteDataStoreConfiguration _serviceWorkerRegistrationDirectory]):
863         (-[_WKWebsiteDataStoreConfiguration _setServiceWorkerRegistrationDirectory:]):
864         (-[_WKWebsiteDataStoreConfiguration setSourceApplicationBundleIdentifier:]):
865         (-[_WKWebsiteDataStoreConfiguration sourceApplicationBundleIdentifier]):
866         (-[_WKWebsiteDataStoreConfiguration sourceApplicationSecondaryIdentifier]):
867         (-[_WKWebsiteDataStoreConfiguration setSourceApplicationSecondaryIdentifier:]):
868         (-[_WKWebsiteDataStoreConfiguration _apiObject]):
869         * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfigurationInternal.h: Added.
870         * UIProcess/Network/NetworkProcessProxy.cpp:
871         (WebKit::NetworkProcessProxy::retrieveCacheStorageParameters):
872         * UIProcess/WebProcessPool.cpp:
873         (WebKit::legacyWebsiteDataStoreConfiguration):
874         (WebKit::WebProcessPool::mayHaveRegisteredServiceWorkers):
875         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
876         (WebKit::WebsiteDataStore::parameters):
877         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
878         (WebKit::WebsiteDataStore::create):
879         (WebKit::WebsiteDataStore::WebsiteDataStore):
880         (WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary):
881         (WebKit::WebsiteDataStore::fetchDataAndApply):
882         (WebKit::WebsiteDataStore::removeData):
883         (WebKit::WebsiteDataStore::parameters):
884         (WebKit::WebsiteDataStore::Configuration::Configuration): Deleted.
885         * UIProcess/WebsiteData/WebsiteDataStore.h:
886         (WebKit::WebsiteDataStore::cacheStoragePerOriginQuota const):
887         (WebKit::WebsiteDataStore::setCacheStoragePerOriginQuota):
888         (WebKit::WebsiteDataStore::cacheStorageDirectory const):
889         (WebKit::WebsiteDataStore::setCacheStorageDirectory):
890         (WebKit::WebsiteDataStore::serviceWorkerRegistrationDirectory const):
891         (WebKit::WebsiteDataStore::setServiceWorkerRegistrationDirectory):
892         (WebKit::WebsiteDataStore::resolvedApplicationCacheDirectory const):
893         (WebKit::WebsiteDataStore::resolvedMediaCacheDirectory const):
894         (WebKit::WebsiteDataStore::resolvedMediaKeysDirectory const):
895         (WebKit::WebsiteDataStore::resolvedDatabaseDirectory const):
896         (WebKit::WebsiteDataStore::resolvedJavaScriptConfigurationDirectory const):
897         (WebKit::WebsiteDataStore::resolvedCookieStorageFile const):
898         (WebKit::WebsiteDataStore::resolvedIndexedDatabaseDirectory const):
899         (WebKit::WebsiteDataStore::resolvedServiceWorkerRegistrationDirectory const):
900         (WebKit::WebsiteDataStore::resolvedResourceLoadStatisticsDirectory const):
901         * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp: Added.
902         (WebKit::WebsiteDataStoreConfiguration::WebsiteDataStoreConfiguration):
903         * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h: Added.
904         (WebKit::WebsiteDataStoreConfiguration::create):
905         (WebKit::WebsiteDataStoreConfiguration::cacheStoragePerOriginQuota):
906         (WebKit::WebsiteDataStoreConfiguration::setCacheStoragePerOriginQuota):
907         (WebKit::WebsiteDataStoreConfiguration::applicationCacheDirectory const):
908         (WebKit::WebsiteDataStoreConfiguration::setApplicationCacheDirectory):
909         (WebKit::WebsiteDataStoreConfiguration::mediaCacheDirectory const):
910         (WebKit::WebsiteDataStoreConfiguration::setMediaCacheDirectory):
911         (WebKit::WebsiteDataStoreConfiguration::mediaKeysStorageDirectory const):
912         (WebKit::WebsiteDataStoreConfiguration::setMediaKeysStorageDirectory):
913         (WebKit::WebsiteDataStoreConfiguration::javaScriptConfigurationDirectory const):
914         (WebKit::WebsiteDataStoreConfiguration::setJavaScriptConfigurationDirectory):
915         (WebKit::WebsiteDataStoreConfiguration::webStorageDirectory const):
916         (WebKit::WebsiteDataStoreConfiguration::setWebStorageDirectory):
917         (WebKit::WebsiteDataStoreConfiguration::indexedDBDatabaseDirectory const):
918         (WebKit::WebsiteDataStoreConfiguration::setIndexedDBDatabaseDirectory):
919         (WebKit::WebsiteDataStoreConfiguration::webSQLDatabaseDirectory const):
920         (WebKit::WebsiteDataStoreConfiguration::setWebSQLDatabaseDirectory):
921         (WebKit::WebsiteDataStoreConfiguration::localStorageDirectory const):
922         (WebKit::WebsiteDataStoreConfiguration::setLocalStorageDirectory):
923         (WebKit::WebsiteDataStoreConfiguration::cookieStorageFile const):
924         (WebKit::WebsiteDataStoreConfiguration::setCookieStorageFile):
925         (WebKit::WebsiteDataStoreConfiguration::resourceLoadStatisticsDirectory const):
926         (WebKit::WebsiteDataStoreConfiguration::setResourceLoadStatisticsDirectory):
927         (WebKit::WebsiteDataStoreConfiguration::networkCacheDirectory const):
928         (WebKit::WebsiteDataStoreConfiguration::setNetworkCacheDirectory):
929         (WebKit::WebsiteDataStoreConfiguration::cacheStorageDirectory const):
930         (WebKit::WebsiteDataStoreConfiguration::setCacheStorageDirectory):
931         (WebKit::WebsiteDataStoreConfiguration::applicationCacheFlatFileSubdirectoryName const):
932         (WebKit::WebsiteDataStoreConfiguration::setApplicationCacheFlatFileSubdirectoryName):
933         (WebKit::WebsiteDataStoreConfiguration::serviceWorkerRegistrationDirectory const):
934         (WebKit::WebsiteDataStoreConfiguration::setServiceWorkerRegistrationDirectory):
935         (WebKit::WebsiteDataStoreConfiguration::sourceApplicationBundleIdentifier const):
936         (WebKit::WebsiteDataStoreConfiguration::setSourceApplicationBundleIdentifier):
937         (WebKit::WebsiteDataStoreConfiguration::sourceApplicationSecondaryIdentifier const):
938         (WebKit::WebsiteDataStoreConfiguration::setSourceApplicationSecondaryIdentifier):
939         * WebKit.xcodeproj/project.pbxproj:
940
941 2018-12-05  Wenson Hsieh  <wenson_hsieh@apple.com>
942
943         Turn WritingDirection into an enum class
944         https://bugs.webkit.org/show_bug.cgi?id=192401
945         Work towards <rdar://problem/42075638>
946
947         Reviewed by Dan Bernstein.
948
949         Change WritingDirection from an enum to an enum class. No change in behavior.
950
951         * WebProcess/WebPage/WebFrame.cpp:
952         (WebKit::WebFrame::setTextDirection):
953
954 2018-12-05  Rob Buis  <rbuis@igalia.com>
955
956         [Mac] HEAD requests changed to GET after 301, 302, and 303 redirections (http/tests/xmlhttprequest/head-redirection.html)
957         https://bugs.webkit.org/show_bug.cgi?id=114965
958
959         Reviewed by Frédéric Wang.
960
961         HEAD requests should not be changed to GET after 303 redirects, see [1].
962         This was fixed earlier for GTK [2].
963
964         Behavior matches Firefox and Chrome.
965
966         [1] http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21#section-7.4
967         [2] https://bugs.webkit.org/show_bug.cgi?id=110127
968
969         Tests: web-platform-tests/fetch/api/redirect/redirect-method.html
970                web-platform-tests/fetch/api/redirect/redirect-method-worker.html
971                http/tests/xmlhttprequest/head-redirection.html
972
973         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
974         (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
975
976 2018-12-04  Fujii Hironori  <Hironori.Fujii@sony.com>
977
978         Remove using namespace WebCore and WebKit under WebKit/Shared/API
979         https://bugs.webkit.org/show_bug.cgi?id=192352
980
981         Reviewed by Alex Christensen.
982
983         Removed using namespace statements, and use namespace prefix
984         instead.
985
986         * Shared/API/APIURLRequest.cpp:
987         * Shared/API/APIURLResponse.cpp:
988         * Shared/API/c/WKArray.cpp:
989         * Shared/API/c/WKCertificateInfo.cpp:
990         * Shared/API/c/WKConnectionRef.cpp:
991         * Shared/API/c/WKContextMenuItem.cpp:
992         * Shared/API/c/WKData.cpp:
993         * Shared/API/c/WKDictionary.cpp:
994         * Shared/API/c/WKErrorRef.cpp:
995         * Shared/API/c/WKGeometry.cpp:
996         * Shared/API/c/WKImage.cpp:
997         * Shared/API/c/WKMutableArray.cpp:
998         * Shared/API/c/WKMutableDictionary.cpp:
999         * Shared/API/c/WKNumber.cpp:
1000         * Shared/API/c/WKPluginInformation.cpp:
1001         * Shared/API/c/WKRenderLayer.cpp:
1002         * Shared/API/c/WKRenderObject.cpp:
1003         * Shared/API/c/WKSecurityOriginRef.cpp:
1004         * Shared/API/c/WKSerializedScriptValue.cpp:
1005         * Shared/API/c/WKString.cpp:
1006         * Shared/API/c/WKType.cpp:
1007         * Shared/API/c/WKURL.cpp:
1008         * Shared/API/c/WKURLRequest.cpp:
1009         * Shared/API/c/WKURLResponse.cpp:
1010         * Shared/API/c/WKUserContentURLPattern.cpp:
1011         * Shared/API/c/cairo/WKImageCairo.cpp:
1012         * Shared/API/c/curl/WKCertificateInfoCurl.cpp:
1013
1014 2018-12-04  Alex Christensen  <achristensen@webkit.org>
1015
1016         Remove source application identifiers from NetworkProcessCreationParameters
1017         https://bugs.webkit.org/show_bug.cgi?id=192372
1018
1019         Reviewed by Brady Eidson.
1020
1021         The _WKWebProcessPoolConfiguration way of setting these was deprecated in http://trac.webkit.org/r235127
1022         The replacement was adopted in <rdar://problem/46359330>
1023         The transition process is done!  Time to remove the old code.
1024
1025         * NetworkProcess/NetworkProcessCreationParameters.cpp:
1026         (WebKit::NetworkProcessCreationParameters::encode const):
1027         (WebKit::NetworkProcessCreationParameters::decode):
1028         * NetworkProcess/NetworkProcessCreationParameters.h:
1029         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1030         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
1031         * NetworkProcess/cocoa/NetworkSessionCocoa.h:
1032         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1033         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
1034         (WebKit::globalSourceApplicationAuditTokenData): Deleted.
1035         (WebKit::globalSourceApplicationBundleIdentifier): Deleted.
1036         (WebKit::globalSourceApplicationSecondaryIdentifier): Deleted.
1037         (WebKit::NetworkSessionCocoa::setSourceApplicationAuditTokenData): Deleted.
1038         (WebKit::NetworkSessionCocoa::setSourceApplicationBundleIdentifier): Deleted.
1039         (WebKit::NetworkSessionCocoa::setSourceApplicationSecondaryIdentifier): Deleted.
1040         * UIProcess/API/APIProcessPoolConfiguration.cpp:
1041         (API::ProcessPoolConfiguration::copy):
1042         * UIProcess/API/APIProcessPoolConfiguration.h:
1043         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
1044         (-[_WKProcessPoolConfiguration sourceApplicationBundleIdentifier]):
1045         (-[_WKProcessPoolConfiguration setSourceApplicationBundleIdentifier:]):
1046         (-[_WKProcessPoolConfiguration sourceApplicationSecondaryIdentifier]):
1047         (-[_WKProcessPoolConfiguration setSourceApplicationSecondaryIdentifier:]):
1048         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
1049         (WebKit::WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard):
1050         (WebKit::toPKPaymentRequest):
1051         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1052         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
1053         * UIProcess/WebsiteData/WebsiteDataStore.h:
1054         (WebKit::WebsiteDataStore::configuration):
1055
1056 2018-12-04  Youenn Fablet  <youenn@apple.com>
1057
1058         Calling getUserMedia in a link that was opened with target="_blank" does not work the second time
1059         https://bugs.webkit.org/show_bug.cgi?id=188088
1060         <rdar://problem/42681448>
1061
1062         Reviewed by Eric Carlson.
1063
1064         On closing a page, we need to make sure to consider that the capture is ended,
1065         as otherwise WebPageProxy will not get noticed from WebPage, since WebPageProxy is no longer an IPC receiver.
1066
1067         * UIProcess/UserMediaProcessManager.cpp:
1068         (WebKit::UserMediaProcessManager::endedCaptureSession):
1069         * UIProcess/WebPageProxy.cpp:
1070         (WebKit::WebPageProxy::close):
1071
1072 2018-12-04  Chris Dumez  <cdumez@apple.com>
1073
1074         Regression(r238817) PSON Page Cache API tests are failing
1075         https://bugs.webkit.org/show_bug.cgi?id=192348
1076
1077         Reviewed by Alex Christensen.
1078
1079         Before suspending a WebProcess on iOS, we normally fake a memory pressure signal
1080         so that the suspended process uses as little memory as possible while suspended.
1081         Among other things, this will clear the page cache. This is an issue in the case
1082         of process-swap on navigation because we keep suspended web processes around to
1083         keep Page Cache functional.
1084
1085         To address the issue, when a WebProcess is about to get suspended, we check if
1086         the process has any suspended WebPage (WebPage used for PSON PageCache support)
1087         and we bypass the PageCache clearing if it does.
1088
1089         Our API tests did not catch this before r238817 because the NavigationState's
1090         assertion was preventing the old WebProcesses from suspending for 3 seconds,
1091         which was enough for those tests to complete.
1092
1093         * UIProcess/SuspendedPageProxy.cpp:
1094         (WebKit::SuspendedPageProxy::SuspendedPageProxy):
1095         (WebKit::SuspendedPageProxy::didFinishLoad):
1096         * UIProcess/SuspendedPageProxy.h:
1097         Take a background assertion until the suspension load is complete, to make sure
1098         the suspension load has a chance to complete before the process gets suspended.
1099
1100         * WebProcess/WebProcess.cpp:
1101         (WebKit::WebProcess::initializeWebProcess):
1102         (WebKit::WebProcess::hasPageRequiringPageCacheWhileSuspended const):
1103         (WebKit::WebProcess::actualPrepareToSuspend):
1104         * WebProcess/WebProcess.h:
1105
1106 2018-12-04  Youenn Fablet  <youenn@apple.com>
1107
1108         Device orientation may be wrong on page reload after crash
1109         https://bugs.webkit.org/show_bug.cgi?id=192349
1110         <rdar://problem/46359466>
1111
1112         Reviewed by Eric Carlson.
1113
1114         On page crash, the process is relaunched and the page is reloaded.
1115         At that point, the orientation information of the page is not reset until the next device orientation change.
1116         To fix that, add the device orientation to the page creation parameters so that we pass it everytime we create a page.
1117         Covered by manual testing.
1118
1119         * Shared/WebPageCreationParameters.cpp:
1120         (WebKit::WebPageCreationParameters::encode const):
1121         (WebKit::WebPageCreationParameters::decode):
1122         * Shared/WebPageCreationParameters.h:
1123         * UIProcess/WebPageProxy.cpp:
1124         (WebKit::WebPageProxy::creationParameters):
1125         * WebProcess/WebPage/WebPage.cpp:
1126
1127 2018-12-04  Carlos Eduardo Ramalho  <cadubentzen@gmail.com>
1128
1129         [WPE] Add gtk-doc
1130         https://bugs.webkit.org/show_bug.cgi?id=178900
1131
1132         Reviewed by Michael Catanzaro.
1133
1134         Add gtk-doc to WPE port. This patch tries to reuse as much code from
1135         WebKitGTK+ as possible.
1136
1137         * PlatformWPE.cmake: Write variables to gtkdoc-wpe.cfg and gtkdoc-webextensions that is used by python script later.
1138         * UIProcess/API/wpe/WebKitWebContext.h: Placed sandbox functions in the same location as in the WebKitGTK+ for consistency.
1139         * UIProcess/API/wpe/docs/wpe-0.1-sections.txt: Added.
1140         * UIProcess/API/wpe/docs/wpe-docs.sgml: Added.
1141         * WebProcess/InjectedBundle/API/wpe/WebKitWebPage.h: Placed webkit_web_page_get_dom_document
1142         in the same position as in the WebKitGTK+ for consistency.
1143         * WebProcess/InjectedBundle/API/wpe/docs/wpe-webextensions-0.1-sections.txt: Added.
1144         * WebProcess/InjectedBundle/API/wpe/docs/wpe-webextensions-docs.sgml: Added.
1145
1146 2018-12-04  Carlos Garcia Campos  <cgarcia@igalia.com>
1147
1148         [SOUP] Move URLSoup back to WebCore after r238771
1149         https://bugs.webkit.org/show_bug.cgi?id=192306
1150
1151         Reviewed by Michael Catanzaro.
1152
1153         Include GUniquePtrSoup from WebCore again and fix several build failures that showed up after removing the soup
1154         includes from URL header.
1155
1156         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
1157         (WebKit::NetworkDataTaskSoup::tlsConnectionAcceptCertificate):
1158         * PluginProcess/PluginProcess.cpp:
1159         * Shared/API/glib/WebKitURIRequest.cpp:
1160         * Shared/API/glib/WebKitURIResponse.cpp:
1161         * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp:
1162         * UIProcess/API/glib/WebKitURISchemeRequest.cpp:
1163         (webkit_uri_scheme_request_finish_error): Use soupURIToURL().
1164         * UIProcess/API/glib/WebKitWebView.cpp:
1165         (webkit_web_view_load_uri): Use soupURIToURL().
1166         * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
1167         * UIProcess/Launcher/glib/BubblewrapLauncher.h:
1168         * UIProcess/Launcher/glib/FlatpakLauncher.cpp:
1169         * UIProcess/Launcher/glib/FlatpakLauncher.h:
1170
1171 2018-12-04  Tim Horton  <timothy_horton@apple.com>
1172
1173         Fix the watchOS build; stop unnecessarily linking CorePDF
1174         https://bugs.webkit.org/show_bug.cgi?id=192356
1175         <rdar://problem/46427844>
1176
1177         Reviewed by Wenson Hsieh.
1178
1179         * Configurations/WebKit.xcconfig:
1180         * Platform/spi/ios/CorePDFSPI.h:
1181
1182 2018-12-03  Tim Horton  <timothy_horton@apple.com>
1183
1184         Make it possible to disable animated keyboard scrolling behavior
1185         https://bugs.webkit.org/show_bug.cgi?id=192331
1186         <rdar://problem/45586859>
1187
1188         Reviewed by Simon Fraser.
1189
1190         * UIProcess/API/Cocoa/WKWebView.mm:
1191         * UIProcess/ios/WKKeyboardScrollingAnimator.mm:
1192         (-[WKKeyboardScrollingAnimator invalidate]):
1193         (-[WKKeyboardScrollingAnimator beginWithEvent:]):
1194         (-[WKKeyboardScrollingAnimator stopAnimatedScroll]):
1195         (-[WKKeyboardScrollingAnimator willStartInteractiveScroll]):
1196         (-[WKKeyboardScrollingAnimator startRepeatTimerIfNeeded]):
1197         (-[WKKeyboardScrollingAnimator stopRepeatTimer]):
1198         (-[WKKeyboardScrollingAnimator performDiscreteScroll]):
1199         (-[WKKeyboardScrollViewAnimator scrollToContentOffset:animated:]):
1200         (-[WKKeyboardScrollViewAnimator scrollWithScrollToExtentAnimationTo:]):
1201         * WebKit.xcodeproj/project.pbxproj:
1202
1203 2018-12-03  Fujii Hironori  <Hironori.Fujii@sony.com>
1204
1205         Remove "using namespace WebKit" under Source/WebKit/WebProcess/InjectedBundle/API
1206         https://bugs.webkit.org/show_bug.cgi?id=192301
1207
1208         Reviewed by Alex Christensen.
1209
1210         Removed "using namespace WebKit" statement, and use "WebKit::"
1211         namespace prefix instead.
1212
1213         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1214         * WebProcess/InjectedBundle/API/c/WKBundleBackForwardList.cpp:
1215         * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
1216         * WebProcess/InjectedBundle/API/c/WKBundleDOMWindowExtension.cpp:
1217         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1218         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
1219         * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
1220         * WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp:
1221         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
1222         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1223         * WebProcess/InjectedBundle/API/c/WKBundlePageBanner.cpp:
1224         * WebProcess/InjectedBundle/API/c/WKBundlePageGroup.cpp:
1225         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
1226         * WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.cpp:
1227         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
1228
1229 2018-12-03  Chris Dumez  <cdumez@apple.com>
1230
1231         Regression(PSON) Google OAuth is broken in private sessions
1232         https://bugs.webkit.org/show_bug.cgi?id=192337
1233         <rdar://problem/46353558>
1234
1235         Reviewed by Alex Christensen.
1236
1237         In WebPageProxy::swapToWebProcess(), we would call removeWebPage() on the old WebProcessProxy and then
1238         addExistingWebPage() on the new WebProcessProxy, as you would expect in case of process swap.
1239
1240         The issue is that WebProcessProxy::removeWebPage() calls WebProcessPool::pageEndUsingWebsiteDataStore()
1241         which would cause the session to get destroyed assuming this was the last page using it. We would
1242         therefore lose session cookies after a process-swap in private session.
1243
1244         To address the issue, a parameter to WebProcessPool::pageEndUsingWebsiteDataStore() and
1245         WebProcessPool::pageBeginUsingWebsiteDataStore() to control if we want to tell the WebProcessPool
1246         about the page beginning / ending its use of the session. In the case of a process-swap, we make
1247         sure the process pool is not notified.
1248
1249         * UIProcess/WebPageProxy.cpp:
1250         (WebKit::WebPageProxy::reattachToWebProcess):
1251         (WebKit::WebPageProxy::swapToWebProcess):
1252         (WebKit::WebPageProxy::finishAttachingToWebProcess):
1253         (WebKit::WebPageProxy::close):
1254         * UIProcess/WebProcessProxy.cpp:
1255         (WebKit::WebProcessProxy::createWebPage):
1256         (WebKit::WebProcessProxy::addExistingWebPage):
1257         (WebKit::WebProcessProxy::removeWebPage):
1258         * UIProcess/WebProcessProxy.h:
1259
1260 2018-12-03  Chris Dumez  <cdumez@apple.com>
1261
1262         [PSON] Request by the client to process-swap is ignored if the window has an opener
1263         https://bugs.webkit.org/show_bug.cgi?id=192267
1264         <rdar://problem/46386886>
1265
1266         Reviewed by Brady Eidson.
1267
1268         If the client forces a process-swap, we should process-swap, even if the browsing
1269         context has an opener (or openees). Previously, we would only bypass the cross-site
1270         check, not the openee / openees checks.
1271
1272         The issue when doing so is that the openee still has a opener link to the window
1273         in the old process. They would see that the window is still there and navigated
1274         to 'about:blank' due to our page suspension logic. To address the issue, we no
1275         longer suspend the old WebPage if the process swap was forced by the client and
1276         we make sure that the old WebPage gets closed.
1277
1278         * UIProcess/WebPageProxy.cpp:
1279         (WebKit::WebPageProxy::suspendCurrentPageIfPossible):
1280         (WebKit::WebPageProxy::swapToWebProcess):
1281         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
1282         (WebKit::WebPageProxy::continueNavigationInNewProcess):
1283         * UIProcess/WebPageProxy.h:
1284         * UIProcess/WebProcessPool.cpp:
1285         (WebKit::WebProcessPool::processForNavigationInternal):
1286
1287 2018-12-03  Keith Rollin  <krollin@apple.com>
1288
1289         Add .xcfilelist files
1290         https://bugs.webkit.org/show_bug.cgi?id=192082
1291         <rdar://problem/46312533>
1292
1293         Reviewed by Brent Fulgham.
1294
1295         Add .xcfilelist files for Generate Derived Sources and Generate
1296         Unified Sources build phases in Xcode. These are just being staged for
1297         now; they'll be added to the Xcode projects later.
1298
1299         * DerivedSources-input.xcfilelist: Added.
1300         * DerivedSources-output.xcfilelist: Added.
1301         * UnifiedSources-input.xcfilelist: Added.
1302         * UnifiedSources-output.xcfilelist: Added.
1303
1304 2018-12-03  Zalan Bujtas  <zalan@apple.com>
1305
1306         [iOS] Unreviewed build fix.
1307
1308         * Platform/Logging.h:
1309
1310 2018-12-03  Alex Christensen  <achristensen@webkit.org>
1311
1312         Remove unused NetworkProcessCreationParameters.diskCacheSizeOverride
1313         https://bugs.webkit.org/show_bug.cgi?id=192246
1314
1315         Reviewed by Chris Dumez.
1316
1317         The last use of this functionality was removed in rdar://problem/46344871
1318
1319         * NetworkProcess/NetworkProcess.cpp:
1320         (WebKit::NetworkProcess::initializeNetworkProcess):
1321         (WebKit::NetworkProcess::setCacheModel):
1322         * NetworkProcess/NetworkProcess.h:
1323         * NetworkProcess/NetworkProcessCreationParameters.cpp:
1324         (WebKit::NetworkProcessCreationParameters::encode const):
1325         (WebKit::NetworkProcessCreationParameters::decode):
1326         * NetworkProcess/NetworkProcessCreationParameters.h:
1327         * UIProcess/API/APIProcessPoolConfiguration.cpp:
1328         (API::ProcessPoolConfiguration::copy):
1329         * UIProcess/API/APIProcessPoolConfiguration.h:
1330         * UIProcess/API/C/WKContextConfigurationRef.cpp:
1331         (WKContextConfigurationDiskCacheSizeOverride):
1332         (WKContextConfigurationSetDiskCacheSizeOverride):
1333         * UIProcess/API/C/WKContextConfigurationRef.h:
1334         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
1335         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
1336         (-[_WKProcessPoolConfiguration diskCacheSizeOverride]):
1337         (-[_WKProcessPoolConfiguration setDiskCacheSizeOverride:]):
1338         * UIProcess/WebProcessPool.cpp:
1339         (WebKit::WebProcessPool::ensureNetworkProcess):
1340
1341 2018-12-03  Alex Christensen  <achristensen@webkit.org>
1342
1343         Add WKWebProcessPlugInLoadDelegate SPI willStartProvisionalLoadForFrame with a completion handler
1344         https://bugs.webkit.org/show_bug.cgi?id=192272
1345
1346         Reviewed by Brady Eidson.
1347
1348         * WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h:
1349         (API::InjectedBundle::PageLoaderClient::didStartProvisionalLoadForFrame):
1350         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
1351         * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
1352         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1353         (ResourceLoadClient::ResourceLoadClient):
1354         (ResourceLoadClient::loadDelegate const):
1355         (ResourceLoadClient::pluginContextController const):
1356         (PageLoaderClient::PageLoaderClient):
1357         (PageLoaderClient::loadDelegate const):
1358         (PageLoaderClient::pluginContextController const):
1359         (PageLoaderClient::didStartProvisionalLoadForFrame):
1360         (PageLoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
1361         (PageLoaderClient::didFinishLoadForFrame):
1362         (PageLoaderClient::globalObjectIsAvailableForFrame):
1363         (PageLoaderClient::didRemoveFrameFromHierarchy):
1364         (PageLoaderClient::didCommitLoadForFrame):
1365         (PageLoaderClient::didFinishDocumentLoadForFrame):
1366         (PageLoaderClient::didFailProvisionalLoadWithErrorForFrame):
1367         (PageLoaderClient::didFailLoadWithErrorForFrame):
1368         (PageLoaderClient::didSameDocumentNavigationForFrame):
1369         (PageLoaderClient::didLayoutForFrame):
1370         (PageLoaderClient::didReachLayoutMilestone):
1371         (PageLoaderClient::didFirstVisuallyNonEmptyLayoutForFrame):
1372         (PageLoaderClient::didHandleOnloadEventsForFrame):
1373         (PageLoaderClient::userAgentForURL const):
1374         (ResourceLoadClient::willSendRequestForFrame):
1375         (ResourceLoadClient::didInitiateLoadForResource):
1376         (ResourceLoadClient::didFinishLoadForResource):
1377         (ResourceLoadClient::didFailLoadForResource):
1378         (-[WKWebProcessPlugInBrowserContextController setLoadDelegate:]):
1379         (didStartProvisionalLoadForFrame): Deleted.
1380         (didReceiveServerRedirectForProvisionalLoadForFrame): Deleted.
1381         (didFinishLoadForFrame): Deleted.
1382         (globalObjectIsAvailableForFrame): Deleted.
1383         (didRemoveFrameFromHierarchy): Deleted.
1384         (didCommitLoadForFrame): Deleted.
1385         (didFinishDocumentLoadForFrame): Deleted.
1386         (didFailProvisionalLoadWithErrorForFrame): Deleted.
1387         (didFailLoadWithErrorForFrame): Deleted.
1388         (didSameDocumentNavigationForFrame): Deleted.
1389         (didLayoutForFrame): Deleted.
1390         (didReachLayoutMilestone): Deleted.
1391         (didFirstVisuallyNonEmptyLayoutForFrame): Deleted.
1392         (didHandleOnloadEventsForFrame): Deleted.
1393         (userAgentForURL): Deleted.
1394         (setUpPageLoaderClient): Deleted.
1395         (willSendRequestForFrame): Deleted.
1396         (didInitiateLoadForResource): Deleted.
1397         (didFinishLoadForResource): Deleted.
1398         (didFailLoadForResource): Deleted.
1399         (setUpResourceLoadClient): Deleted.
1400         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1401         (WebKit::InjectedBundlePageLoaderClient::didStartProvisionalLoadForFrame):
1402         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
1403         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1404         (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
1405         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1406
1407 2018-12-03  Tim Horton  <timothy_horton@apple.com>
1408
1409         Swipe snapshot stays up too long swiping around on apple.com (waiting for first paint)
1410         https://bugs.webkit.org/show_bug.cgi?id=192319
1411         <rdar://problem/45928708>
1412
1413         Reviewed by Simon Fraser.
1414
1415         * UIProcess/Cocoa/ViewGestureController.cpp:
1416         (WebKit::ViewGestureController::didStartProvisionalLoadForMainFrame):
1417         * UIProcess/Cocoa/ViewGestureController.h:
1418         * UIProcess/ios/ViewGestureControllerIOS.mm:
1419         (WebKit::ViewGestureController::endSwipeGesture):
1420         In r236966, I reverted slightly too much of r232416.
1421         We still need to defer requesting a presentation update callback until
1422         after the provisional load starts. Otherwise, we could get the callback
1423         while we're in the 'paused' state, and drop it on the floor. That would
1424         then mean that we time out instead of promptly removing the snapshot.
1425
1426 2018-12-03  Alex Christensen  <achristensen@webkit.org>
1427
1428         Update process assertions after swapping processes
1429         https://bugs.webkit.org/show_bug.cgi?id=192318
1430         <rdar://problem/46377552>
1431
1432         Reviewed by Chris Dumez.
1433
1434         If the previous WebProcess had a ProcessAssertion to prevent it from being suspended,
1435         after navigation and process swapping we need the new WebProcess to update its process assertions.
1436
1437         * UIProcess/API/Cocoa/PageLoadStateObserver.h:
1438         * UIProcess/Cocoa/NavigationState.h:
1439         * UIProcess/Cocoa/NavigationState.mm:
1440         (WebKit::NavigationState::didSwapWebProcesses):
1441         * UIProcess/PageLoadState.cpp:
1442         (WebKit::PageLoadState::didSwapWebProcesses):
1443         * UIProcess/PageLoadState.h:
1444         * UIProcess/WebPageProxy.cpp:
1445         (WebKit::WebPageProxy::finishAttachingToWebProcess):
1446
1447 2018-12-03  Daniel Bates  <dabates@apple.com>
1448
1449         [iOS] Do not handle key events that are key commands
1450         https://bugs.webkit.org/show_bug.cgi?id=191608
1451         <rdar://problem/46046013>
1452
1453         Reviewed by Ryosuke Niwa.
1454
1455         A key down event may be associated with a key command. If it is then we want to execute the
1456         key command instead of inserting or deleting text. We need to ask UIKit to handle the current
1457         event as a key command to find out.
1458
1459         * UIProcess/ios/WKContentViewInteraction.mm:
1460         (-[WKContentView _interpretKeyEvent:isCharEvent:]): Ask UIKit to handle the current event
1461         as a key command. If it handles it then we're done. Otherwise, do what we do now.
1462
1463 2018-12-03  Zalan Bujtas  <zalan@apple.com>
1464
1465         [iOS] Add logging channel for hover related content observation
1466         https://bugs.webkit.org/show_bug.cgi?id=192312
1467
1468         Reviewed by Simon Fraser.
1469
1470         * WebProcess/WebPage/ios/WebPageIOS.mm:
1471         (WebKit::WebPage::handleSyntheticClick):
1472         (WebKit::WebPage::completePendingSyntheticClickForContentChangeObserver):
1473
1474 2018-12-03  Tim Horton  <timothy_horton@apple.com>
1475
1476         Enable swipe snapshot removal logging in release builds
1477         https://bugs.webkit.org/show_bug.cgi?id=192313
1478
1479         Reviewed by Dean Jackson.
1480
1481         * UIProcess/Cocoa/ViewGestureController.cpp:
1482         (WebKit::ViewGestureController::SnapshotRemovalTracker::log const):
1483         This is super-low-traffic and super-helpful logging.
1484         Turn it on all the time.
1485
1486 2018-12-03  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
1487
1488         Use WallTime for file time
1489         https://bugs.webkit.org/show_bug.cgi?id=192287
1490
1491         Reviewed by Darin Adler.
1492
1493         * Shared/SessionState.h:
1494         * Shared/WebCoreArgumentCoders.cpp:
1495         (IPC::ArgumentCoder<DatabaseDetails>::decode):
1496         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
1497         (WKKeyValueStorageManagerGetStorageDetailsByOrigin):
1498         * UIProcess/API/glib/WebKitWebViewSessionState.cpp:
1499         (decodeHTTPBody):
1500         * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
1501         (WebKit::PluginInfoCache::getPluginInfo):
1502         (WebKit::PluginInfoCache::updatePluginInfo):
1503         * UIProcess/ResourceLoadStatisticsPersistentStorage.cpp:
1504         (WebKit::hasFileChangedSince):
1505         * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp:
1506         (WebKit::LocalStorageDatabaseTracker::databasesModifiedSince):
1507         (WebKit::LocalStorageDatabaseTracker::originDetails):
1508         * UIProcess/WebStorage/LocalStorageDatabaseTracker.h:
1509         * UIProcess/mac/LegacySessionStateCoding.cpp:
1510         (WebKit::encodeFormDataElement):
1511         (WebKit::decodeFormDataElement):
1512         * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
1513         (WebKit::removeAllMediaKeyStorageForOriginPath):
1514         (WebKit::WebMediaKeyStorageManager::deleteMediaKeyEntriesForOrigin):
1515         (WebKit::WebMediaKeyStorageManager::deleteMediaKeyEntriesModifiedBetweenDates):
1516         (WebKit::WebMediaKeyStorageManager::deleteAllMediaKeyEntries):
1517         * WebProcess/MediaCache/WebMediaKeyStorageManager.h:
1518         * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
1519         (WebKit::toHTTPBody):
1520         (WebKit::toFormData):
1521
1522 2018-12-03  Darin Adler  <darin@apple.com>
1523
1524         [Cocoa] Check message IDs when decoding Mach messages in IPC::Connection
1525         https://bugs.webkit.org/show_bug.cgi?id=192300
1526         rdar://problem/46215523
1527
1528         Reviewed by Chris Dumez.
1529
1530         * Platform/IPC/mac/ConnectionMac.mm:
1531         (IPC::Connection::sendOutgoingMessage): Use message IDs other than 0 and 1 for
1532         the messages, as suggested by an expert at Apple.
1533         (IPC::createMessageDecoder): Update for the new message IDs.
1534         (IPC::Connection::receiveSourceEventHandler): Ignore messages with unexpected
1535         message IDs.
1536
1537 2018-12-03  Darin Adler  <darin@apple.com>
1538
1539         [Cocoa] Check descriptor types in createMessageDecoder
1540         https://bugs.webkit.org/show_bug.cgi?id=192302
1541
1542         Reviewed by Chris Dumez.
1543
1544         Not sure how to construct a test case for Connection, so not adding any
1545         tests at this time.
1546
1547         * Platform/IPC/mac/ConnectionMac.mm:
1548         (IPC::createMessageDecoder): Check descriptor types and return nullptr if they
1549         are incorrect. Retained the assertions to help with debugging.
1550         (IPC::Connection::receiveSourceEventHandler): Ignore the message if no decoder
1551         is created, which means the message is invalid.
1552
1553 2018-12-03  Darin Adler  <darin@apple.com>
1554
1555         Alignment padding needs to be zeroed out in IPC::Encoder
1556         https://bugs.webkit.org/show_bug.cgi?id=192304
1557
1558         Reviewed by Chris Dumez.
1559
1560         Might be useful to make a regression test for this, but I couldn't find any
1561         other tests for this code.
1562
1563         * Platform/IPC/Encoder.cpp:
1564         (IPC::Encoder::grow): Use std::memset to zero-fill padding bytes.
1565
1566         * UIProcess/mac/LegacySessionStateCoding.cpp:
1567         (WebKit::HistoryEntryDataEncoder::grow): Ditto.
1568
1569 2018-12-03  Darin Adler  <darin@apple.com>
1570
1571         [Cocoa] Streamline sandbox code a tiny bit
1572         https://bugs.webkit.org/show_bug.cgi?id=192299
1573
1574         Reviewed by Anders Carlsson.
1575
1576         * Shared/mac/SandboxUtilities.mm:
1577         (WebKit::processHasContainer): Removed separate function, just use the
1578         pathForProcessContainer instead of repeating logic. This costs a tiny
1579         bit of memory allocation overhead the first time this function is called,
1580         but in return we can eliminate a second copy of the code to call
1581         sandbox_container_path_for_pid.
1582
1583 2018-12-03  Eric Carlson  <eric.carlson@apple.com>
1584
1585         [MediaStream] 'devicechange' event when more capture device information are revealed.
1586         https://bugs.webkit.org/show_bug.cgi?id=192268
1587
1588         Reviewed by Youenn Fablet.
1589
1590         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
1591         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Call captureDevicesChanged
1592         if a filtered device list was returned previously.
1593         (WebKit::UserMediaPermissionRequestManagerProxy::resetAccess): Clear m_hasFilteredDeviceList.
1594         (WebKit::UserMediaPermissionRequestManagerProxy::wasGrantedVideoOrAudioAccess): New.
1595         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): Filter device
1596         list and strip device IDs if gUM permission hasn't been given.
1597         (WebKit::UserMediaPermissionRequestManagerProxy::watchdogTimerFired): Clear m_hasFilteredDeviceList.
1598         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
1599
1600 2018-12-03  Keith Rollin  <krollin@apple.com>
1601
1602         Remove Network Capture
1603         https://bugs.webkit.org/show_bug.cgi?id=192296
1604         <rdar://problem/46408648>
1605
1606         Reviewed by Daniel Bates.
1607
1608         r209498 introduced an embedded record and replay facility for network
1609         resource loading. This facility was added in order to support a new
1610         implementation of the PLT and related performance tests. The PLT is
1611         currenty taking a different direction, and so this record/replace
1612         facility is no longer needed. Removing it as unused code.
1613
1614         * CMakeLists.txt:
1615         * NetworkProcess/NetworkLoad.cpp:
1616         (WebKit::NetworkLoad::NetworkLoad):
1617         (WebKit::NetworkLoad::setDefersLoading):
1618         (WebKit::NetworkLoad::continueWillSendRequest):
1619         (WebKit::NetworkLoad::willPerformHTTPRedirection):
1620         (WebKit::NetworkLoad::notifyDidReceiveResponse):
1621         (WebKit::NetworkLoad::didReceiveData):
1622         (WebKit::NetworkLoad::didCompleteWithError):
1623         (WebKit::NetworkLoad::initializeForRecord): Deleted.
1624         (WebKit::NetworkLoad::initializeForReplay): Deleted.
1625         * NetworkProcess/NetworkLoad.h:
1626         * NetworkProcess/NetworkProcess.cpp:
1627         (WebKit::NetworkProcess::initializeNetworkProcess):
1628         (WebKit::NetworkProcess::terminate):
1629         * NetworkProcess/NetworkProcessCreationParameters.cpp:
1630         (WebKit::NetworkProcessCreationParameters::encode const):
1631         (WebKit::NetworkProcessCreationParameters::decode):
1632         * NetworkProcess/NetworkProcessCreationParameters.h:
1633         * NetworkProcess/capture/NetworkCaptureEvent.cpp: Removed.
1634         * NetworkProcess/capture/NetworkCaptureEvent.h: Removed.
1635         * NetworkProcess/capture/NetworkCaptureLogging.h: Removed.
1636         * NetworkProcess/capture/NetworkCaptureManager.cpp: Removed.
1637         * NetworkProcess/capture/NetworkCaptureManager.h: Removed.
1638         * NetworkProcess/capture/NetworkCaptureRecorder.cpp: Removed.
1639         * NetworkProcess/capture/NetworkCaptureRecorder.h: Removed.
1640         * NetworkProcess/capture/NetworkCaptureReplayer.cpp: Removed.
1641         * NetworkProcess/capture/NetworkCaptureReplayer.h: Removed.
1642         * NetworkProcess/capture/NetworkCaptureResource.cpp: Removed.
1643         * NetworkProcess/capture/NetworkCaptureResource.h: Removed.
1644         * NetworkProcess/capture/NetworkDataTaskReplay.cpp: Removed.
1645         * NetworkProcess/capture/NetworkDataTaskReplay.h: Removed.
1646         * NetworkProcess/capture/json.hpp: Removed.
1647         * Sources.txt:
1648         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1649         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
1650         * WebKit.xcodeproj/project.pbxproj:
1651         * config.h:
1652
1653 2018-12-02  Zalan Bujtas  <zalan@apple.com>
1654
1655         Add a runtime feature flag for LayoutFormattingContext.
1656         https://bugs.webkit.org/show_bug.cgi?id=192280
1657
1658         Reviewed by Simon Fraser.
1659
1660         * Configurations/FeatureDefines.xcconfig:
1661         * Shared/WebPreferences.yaml:
1662         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1663         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
1664
1665 2018-12-01  Chris Dumez  <cdumez@apple.com>
1666
1667         [PSON] process-swapping may occur even though opener has handle to openee
1668         https://bugs.webkit.org/show_bug.cgi?id=192277
1669
1670         Reviewed by Antti Koivisto.
1671
1672         * Shared/NavigationActionData.cpp:
1673         (WebKit::NavigationActionData::encode const):
1674         (WebKit::NavigationActionData::decode):
1675         * Shared/NavigationActionData.h:
1676         * UIProcess/API/APINavigation.h:
1677         (API::Navigation::openedByDOMWithOpener const):
1678         (API::Navigation::openedViaWindowOpenWithOpener const): Deleted.
1679         (API::Navigation::opener const): Deleted.
1680         * UIProcess/WebProcessPool.cpp:
1681         (WebKit::WebProcessPool::processForNavigationInternal):
1682         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1683         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1684
1685 2018-12-01  Alexey Proskuryakov  <ap@apple.com>
1686
1687         Modernize version check for _suppressedAutoAddedHTTPHeaders
1688         https://bugs.webkit.org/show_bug.cgi?id=192175
1689
1690         Reviewed by Tim Horton.
1691
1692         * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
1693         Also removed selector check - we only need to support running on 10.13.0 when building
1694         with 10.13.0 SDK.
1695
1696 2018-11-30  Alex Christensen  <achristensen@webkit.org>
1697
1698         Fix Windows build.
1699
1700         * UIProcess/API/C/curl/WKWebsiteDataStoreRefCurl.cpp:
1701         (WKWebsiteDataStoreEnableCustomNetworkProxySettings):
1702
1703 2018-11-30  Alex Christensen  <achristensen@webkit.org>
1704
1705         Move URL from WebCore to WTF
1706         https://bugs.webkit.org/show_bug.cgi?id=190234
1707
1708         Reviewed by Keith Miller.
1709
1710         * NetworkProcess/Cookies/WebCookieManager.cpp:
1711         * NetworkProcess/Cookies/WebCookieManager.h:
1712         * NetworkProcess/Cookies/WebCookieManager.messages.in:
1713         * NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm:
1714         * NetworkProcess/Downloads/Download.h:
1715         * NetworkProcess/Downloads/DownloadManager.cpp:
1716         (WebKit::DownloadManager::publishDownloadProgress):
1717         * NetworkProcess/Downloads/DownloadManager.h:
1718         * NetworkProcess/Downloads/PendingDownload.cpp:
1719         (WebKit::PendingDownload::publishProgress):
1720         * NetworkProcess/Downloads/PendingDownload.h:
1721         * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
1722         (WebKit::Download::publishProgress):
1723         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
1724         (WebKit::NetworkBlobRegistry::registerBlobURL):
1725         (WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
1726         (WebKit::NetworkBlobRegistry::unregisterBlobURL):
1727         (WebKit::NetworkBlobRegistry::blobSize):
1728         (WebKit::NetworkBlobRegistry::filesInBlob):
1729         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
1730         * NetworkProcess/NetworkConnectionToWebProcess.h:
1731         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1732         * NetworkProcess/NetworkDataTask.cpp:
1733         (WebKit::NetworkDataTask::didReceiveResponse):
1734         * NetworkProcess/NetworkDataTaskBlob.cpp:
1735         * NetworkProcess/NetworkLoadChecker.h:
1736         (WebKit::NetworkLoadChecker::setContentExtensionController):
1737         (WebKit::NetworkLoadChecker::url const):
1738         * NetworkProcess/NetworkProcess.cpp:
1739         (WebKit::NetworkProcess::writeBlobToFilePath):
1740         (WebKit::NetworkProcess::publishDownloadProgress):
1741         (WebKit::NetworkProcess::preconnectTo):
1742         * NetworkProcess/NetworkProcess.h:
1743         * NetworkProcess/NetworkProcess.messages.in:
1744         * NetworkProcess/NetworkResourceLoadParameters.h:
1745         * NetworkProcess/NetworkResourceLoader.cpp:
1746         (WebKit::logBlockedCookieInformation):
1747         (WebKit::logCookieInformationInternal):
1748         * NetworkProcess/NetworkResourceLoader.h:
1749         * NetworkProcess/NetworkSocketStream.cpp:
1750         (WebKit::NetworkSocketStream::create):
1751         * NetworkProcess/NetworkSocketStream.h:
1752         * NetworkProcess/PingLoad.h:
1753         * NetworkProcess/ServiceWorker/WebSWServerConnection.h:
1754         * NetworkProcess/ServiceWorker/WebSWServerConnection.messages.in:
1755         * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.messages.in:
1756         * NetworkProcess/cache/CacheStorageEngine.cpp:
1757         (WebKit::CacheStorage::Engine::retrieveRecords):
1758         * NetworkProcess/cache/CacheStorageEngine.h:
1759         * NetworkProcess/cache/CacheStorageEngineCache.h:
1760         * NetworkProcess/cache/CacheStorageEngineConnection.cpp:
1761         (WebKit::CacheStorageEngineConnection::retrieveRecords):
1762         * NetworkProcess/cache/CacheStorageEngineConnection.h:
1763         * NetworkProcess/cache/CacheStorageEngineConnection.messages.in:
1764         * NetworkProcess/cache/NetworkCache.h:
1765         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
1766         (WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
1767         (WebKit::NetworkCache::Statistics::recordRevalidationSuccess):
1768         * NetworkProcess/cache/NetworkCacheSubresourcesEntry.h:
1769         (WebKit::NetworkCache::SubresourceInfo::firstPartyForCookies const):
1770         * NetworkProcess/capture/NetworkCaptureEvent.cpp:
1771         (WebKit::NetworkCapture::Request::operator WebCore::ResourceRequest const):
1772         (WebKit::NetworkCapture::Response::operator WebCore::ResourceResponse const):
1773         (WebKit::NetworkCapture::Error::operator WebCore::ResourceError const):
1774         * NetworkProcess/capture/NetworkCaptureManager.cpp:
1775         (WebKit::NetworkCapture::Manager::findBestFuzzyMatch):
1776         (WebKit::NetworkCapture::Manager::fuzzyMatchURLs):
1777         (WebKit::NetworkCapture::Manager::urlIdentifyingCommonDomain):
1778         * NetworkProcess/capture/NetworkCaptureManager.h:
1779         * NetworkProcess/capture/NetworkCaptureResource.cpp:
1780         (WebKit::NetworkCapture::Resource::url):
1781         (WebKit::NetworkCapture::Resource::queryParameters):
1782         * NetworkProcess/capture/NetworkCaptureResource.h:
1783         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
1784         (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
1785         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1786         (WebKit::NetworkProcess::deleteHSTSCacheForHostNames):
1787         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1788         (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
1789         * PluginProcess/mac/PluginProcessMac.mm:
1790         (WebKit::openCFURLRef):
1791         (WebKit::replacedNSWorkspace_launchApplicationAtURL_options_configuration_error):
1792         * Shared/API/APIURL.h:
1793         (API::URL::create):
1794         (API::URL::equals):
1795         (API::URL::URL):
1796         (API::URL::url const):
1797         (API::URL::parseURLIfNecessary const):
1798         * Shared/API/APIUserContentURLPattern.h:
1799         (API::UserContentURLPattern::matchesURL const):
1800         * Shared/API/c/WKURLRequest.cpp:
1801         * Shared/API/c/WKURLResponse.cpp:
1802         * Shared/API/c/cf/WKURLCF.mm:
1803         (WKURLCreateWithCFURL):
1804         (WKURLCopyCFURL):
1805         * Shared/API/glib/WebKitURIRequest.cpp:
1806         * Shared/API/glib/WebKitURIResponse.cpp:
1807         * Shared/APIWebArchiveResource.mm:
1808         (API::WebArchiveResource::WebArchiveResource):
1809         * Shared/AssistedNodeInformation.h:
1810         * Shared/Cocoa/WKNSURLExtras.mm:
1811         (-[NSURL _web_originalDataAsWTFString]):
1812         (): Deleted.
1813         * Shared/SessionState.h:
1814         * Shared/WebBackForwardListItem.cpp:
1815         (WebKit::WebBackForwardListItem::itemIsInSameDocument const):
1816         * Shared/WebCoreArgumentCoders.cpp:
1817         * Shared/WebCoreArgumentCoders.h:
1818         * Shared/WebErrors.h:
1819         * Shared/WebHitTestResultData.cpp:
1820         * Shared/cf/ArgumentCodersCF.cpp:
1821         (IPC::encode):
1822         (IPC::decode):
1823         * Shared/gtk/WebErrorsGtk.cpp:
1824         * Shared/ios/InteractionInformationAtPosition.h:
1825         * UIProcess/API/APIHTTPCookieStore.h:
1826         * UIProcess/API/APINavigation.cpp:
1827         (API::Navigation::appendRedirectionURL):
1828         * UIProcess/API/APINavigation.h:
1829         (API::Navigation::takeRedirectChain):
1830         * UIProcess/API/APINavigationAction.h:
1831         * UIProcess/API/APINavigationClient.h:
1832         (API::NavigationClient::signedPublicKeyAndChallengeString):
1833         (API::NavigationClient::contentRuleListNotification):
1834         (API::NavigationClient::webGLLoadPolicy const):
1835         (API::NavigationClient::resolveWebGLLoadPolicy const):
1836         * UIProcess/API/APIUIClient.h:
1837         (API::UIClient::saveDataToFileInDownloadsFolder):
1838         * UIProcess/API/APIUserScript.cpp:
1839         (API::UserScript::generateUniqueURL):
1840         * UIProcess/API/APIUserScript.h:
1841         * UIProcess/API/APIUserStyleSheet.cpp:
1842         (API::UserStyleSheet::generateUniqueURL):
1843         * UIProcess/API/APIUserStyleSheet.h:
1844         * UIProcess/API/C/WKOpenPanelResultListener.cpp:
1845         (filePathsFromFileURLs):
1846         * UIProcess/API/C/WKPage.cpp:
1847         (WKPageLoadPlainTextStringWithUserData):
1848         (WKPageSetPageUIClient):
1849         (WKPageSetPageNavigationClient):
1850         * UIProcess/API/C/WKPageGroup.cpp:
1851         (WKPageGroupAddUserStyleSheet):
1852         (WKPageGroupAddUserScript):
1853         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
1854         (WKWebsiteDataStoreSetResourceLoadStatisticsPrevalentResourceForDebugMode):
1855         (WKWebsiteDataStoreSetStatisticsLastSeen):
1856         (WKWebsiteDataStoreSetStatisticsPrevalentResource):
1857         (WKWebsiteDataStoreSetStatisticsVeryPrevalentResource):
1858         (WKWebsiteDataStoreIsStatisticsPrevalentResource):
1859         (WKWebsiteDataStoreIsStatisticsVeryPrevalentResource):
1860         (WKWebsiteDataStoreIsStatisticsRegisteredAsSubresourceUnder):
1861         (WKWebsiteDataStoreIsStatisticsRegisteredAsSubFrameUnder):
1862         (WKWebsiteDataStoreIsStatisticsRegisteredAsRedirectingTo):
1863         (WKWebsiteDataStoreSetStatisticsHasHadUserInteraction):
1864         (WKWebsiteDataStoreIsStatisticsHasHadUserInteraction):
1865         (WKWebsiteDataStoreSetStatisticsGrandfathered):
1866         (WKWebsiteDataStoreIsStatisticsGrandfathered):
1867         (WKWebsiteDataStoreSetStatisticsSubframeUnderTopFrameOrigin):
1868         (WKWebsiteDataStoreSetStatisticsSubresourceUnderTopFrameOrigin):
1869         (WKWebsiteDataStoreSetStatisticsSubresourceUniqueRedirectTo):
1870         (WKWebsiteDataStoreSetStatisticsSubresourceUniqueRedirectFrom):
1871         (WKWebsiteDataStoreSetStatisticsTopFrameUniqueRedirectTo):
1872         (WKWebsiteDataStoreSetStatisticsTopFrameUniqueRedirectFrom):
1873         * UIProcess/API/Cocoa/WKHTTPCookieStore.mm:
1874         * UIProcess/API/Cocoa/WKUserScript.mm:
1875         (-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:associatedURL:userContentWorld:]):
1876         * UIProcess/API/Cocoa/WKWebView.mm:
1877         (-[WKWebView _showSafeBrowsingWarning:completionHandler:]):
1878         (-[WKWebView _showSafeBrowsingWarningWithTitle:warning:details:completionHandler:]):
1879         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1880         (-[WKWebViewConfiguration setURLSchemeHandler:forURLScheme:]):
1881         (-[WKWebViewConfiguration urlSchemeHandlerForURLScheme:]):
1882         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1883         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1884         * UIProcess/API/Cocoa/_WKApplicationManifest.mm:
1885         (-[_WKApplicationManifest initWithCoder:]):
1886         (+[_WKApplicationManifest applicationManifestFromJSON:manifestURL:documentURL:]):
1887         * UIProcess/API/Cocoa/_WKUserStyleSheet.mm:
1888         (-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:baseURL:userContentWorld:]):
1889         * UIProcess/API/glib/IconDatabase.cpp:
1890         * UIProcess/API/glib/WebKitCookieManager.cpp:
1891         (webkit_cookie_manager_get_cookies):
1892         * UIProcess/API/glib/WebKitFileChooserRequest.cpp:
1893         * UIProcess/API/glib/WebKitSecurityOrigin.cpp:
1894         (webkit_security_origin_new_for_uri):
1895         * UIProcess/API/glib/WebKitUIClient.cpp:
1896         * UIProcess/API/glib/WebKitURISchemeRequest.cpp:
1897         * UIProcess/API/glib/WebKitWebView.cpp:
1898         (webkit_web_view_load_plain_text):
1899         * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
1900         * UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:
1901         (WebKit::WebPaymentCoordinatorProxy::showPaymentUI):
1902         (WebKit::WebPaymentCoordinatorProxy::validateMerchant):
1903         * UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
1904         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h:
1905         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
1906         (WebKit::toPKPaymentRequest):
1907         * UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm:
1908         (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
1909         * UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
1910         (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
1911         * UIProcess/Automation/WebAutomationSession.cpp:
1912         (WebKit::WebAutomationSession::navigateBrowsingContext):
1913         (WebKit::domainByAddingDotPrefixIfNeeded):
1914         (WebKit::WebAutomationSession::addSingleCookie):
1915         (WebKit::WebAutomationSession::deleteAllCookies):
1916         * UIProcess/Cocoa/DownloadClient.mm:
1917         (WebKit::DownloadClient::didFinish):
1918         * UIProcess/Cocoa/NavigationState.h:
1919         * UIProcess/Cocoa/NavigationState.mm:
1920         (WebKit::NavigationState::NavigationClient::webGLLoadPolicy const):
1921         (WebKit::NavigationState::NavigationClient::resolveWebGLLoadPolicy const):
1922         (WebKit::NavigationState::NavigationClient::contentRuleListNotification):
1923         (WebKit::NavigationState::NavigationClient::willPerformClientRedirect):
1924         (WebKit::NavigationState::NavigationClient::didPerformClientRedirect):
1925         (WebKit::NavigationState::NavigationClient::signedPublicKeyAndChallengeString):
1926         * UIProcess/Cocoa/SafeBrowsingResultCocoa.mm: Copied from Source/WebKit/WebProcess/Network/WebSocketProvider.h.
1927         (WebKit::SafeBrowsingResult::SafeBrowsingResult):
1928         * UIProcess/Cocoa/SafeBrowsingWarningCocoa.mm:
1929         (WebKit::reportAnErrorURL):
1930         (WebKit::malwareDetailsURL):
1931         (WebKit::safeBrowsingDetailsText):
1932         (WebKit::SafeBrowsingWarning::SafeBrowsingWarning):
1933         * UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:
1934         (-[_WKPreviewControllerDataSource finish:]):
1935         (WebKit::SystemPreviewController::finish):
1936         * UIProcess/Cocoa/UIDelegate.h:
1937         * UIProcess/Cocoa/UIDelegate.mm:
1938         (WebKit::UIDelegate::UIClient::createNewPage):
1939         (WebKit::UIDelegate::UIClient::saveDataToFileInDownloadsFolder):
1940         (WebKit::requestUserMediaAuthorizationForDevices):
1941         (WebKit::UIDelegate::UIClient::checkUserMediaPermissionForOrigin):
1942         * UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.mm:
1943         (-[WKReloadFrameErrorRecoveryAttempter attemptRecovery]):
1944         * UIProcess/Cocoa/WKSafeBrowsingWarning.h:
1945         * UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
1946         (-[WKSafeBrowsingWarning initWithFrame:safeBrowsingWarning:completionHandler:]):
1947         * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
1948         * UIProcess/Cocoa/WebViewImpl.h:
1949         * UIProcess/Cocoa/WebViewImpl.mm:
1950         (WebKit::WebViewImpl::showSafeBrowsingWarning):
1951         (WebKit::WebViewImpl::writeToURLForFilePromiseProvider):
1952         * UIProcess/Downloads/DownloadProxy.cpp:
1953         (WebKit::DownloadProxy::publishProgress):
1954         * UIProcess/Downloads/DownloadProxy.h:
1955         (WebKit::DownloadProxy::setRedirectChain):
1956         (WebKit::DownloadProxy::redirectChain const):
1957         * UIProcess/FrameLoadState.cpp:
1958         (WebKit::FrameLoadState::didStartProvisionalLoad):
1959         (WebKit::FrameLoadState::didReceiveServerRedirectForProvisionalLoad):
1960         (WebKit::FrameLoadState::didSameDocumentNotification):
1961         (WebKit::FrameLoadState::setUnreachableURL):
1962         * UIProcess/FrameLoadState.h:
1963         (WebKit::FrameLoadState::url const):
1964         (WebKit::FrameLoadState::setURL):
1965         (WebKit::FrameLoadState::provisionalURL const):
1966         (WebKit::FrameLoadState::unreachableURL const):
1967         * UIProcess/Network/NetworkProcessProxy.cpp:
1968         (WebKit::NetworkProcessProxy::writeBlobToFilePath):
1969         * UIProcess/Network/NetworkProcessProxy.h:
1970         * UIProcess/PageClient.h:
1971         (WebKit::PageClient::showSafeBrowsingWarning):
1972         * UIProcess/PageLoadState.cpp:
1973         (WebKit::PageLoadState::hasOnlySecureContent):
1974         * UIProcess/Plugins/PluginInfoStore.cpp:
1975         * UIProcess/Plugins/PluginInfoStore.h:
1976         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1977         * UIProcess/SafeBrowsingResult.h: Copied from Source/WebKit/UIProcess/SystemPreviewController.h.
1978         (WebKit::SafeBrowsingResult::create):
1979         (WebKit::SafeBrowsingResult::url const):
1980         (WebKit::SafeBrowsingResult::provider const):
1981         (WebKit::SafeBrowsingResult::isPhishing const):
1982         (WebKit::SafeBrowsingResult::isMalware const):
1983         (WebKit::SafeBrowsingResult::isUnwantedSoftware const):
1984         (WebKit::SafeBrowsingResult::isKnownToBeUnsafe const):
1985         * UIProcess/SafeBrowsingWarning.h:
1986         (WebKit::SafeBrowsingWarning::create):
1987         * UIProcess/SuspendedPageProxy.cpp:
1988         * UIProcess/SystemPreviewController.h:
1989         * UIProcess/WebCookieManagerProxy.h:
1990         * UIProcess/WebFrameProxy.h:
1991         (WebKit::WebFrameProxy::url const):
1992         (WebKit::WebFrameProxy::provisionalURL const):
1993         (WebKit::WebFrameProxy::unreachableURL const):
1994         * UIProcess/WebInspectorProxy.h:
1995         * UIProcess/WebOpenPanelResultListenerProxy.cpp:
1996         * UIProcess/WebPageProxy.cpp:
1997         (WebKit::WebPageProxy::loadDataWithNavigation):
1998         (WebKit::WebPageProxy::loadAlternateHTML):
1999         (WebKit::WebPageProxy::loadWebArchiveData):
2000         (WebKit::WebPageProxy::navigateToPDFLinkWithSimulatedClick):
2001         (WebKit::WebPageProxy::continueNavigationInNewProcess):
2002         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
2003         (WebKit::WebPageProxy::didChangeProvisionalURLForFrame):
2004         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
2005         (WebKit::WebPageProxy::contentRuleListNotification):
2006         (WebKit::WebPageProxy::processDidTerminate):
2007         (WebKit::WebPageProxy::signedPublicKeyAndChallengeString):
2008         (WebKit::WebPageProxy::setURLSchemeHandlerForScheme):
2009         * UIProcess/WebPageProxy.h:
2010         * UIProcess/WebPageProxy.messages.in:
2011         * UIProcess/WebProcessPool.cpp:
2012         (WebKit::WebProcessPool::tryPrewarmWithDomainInformation):
2013         * UIProcess/WebProcessPool.h:
2014         * UIProcess/WebProcessProxy.cpp:
2015         (WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch):
2016         * UIProcess/WebProcessProxy.h:
2017         * UIProcess/WebResourceLoadStatisticsStore.cpp:
2018         (WebKit::WebResourceLoadStatisticsStore::setPrevalentResourceForDebugMode):
2019         (WebKit::WebResourceLoadStatisticsStore::logFrameNavigation):
2020         * UIProcess/WebResourceLoadStatisticsStore.h:
2021         * UIProcess/ios/DragDropInteractionState.h:
2022         * UIProcess/ios/PageClientImplIOS.h:
2023         * UIProcess/ios/PageClientImplIOS.mm:
2024         (WebKit::PageClientImpl::showSafeBrowsingWarning):
2025         * UIProcess/ios/WKActionSheetAssistant.mm:
2026         (-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
2027         * UIProcess/ios/WKContentViewInteraction.mm:
2028         (-[WKContentView actionSheetAssistant:shareElementWithURL:rect:]):
2029         (-[WKContentView _presentedViewControllerForPreviewItemController:]):
2030         * UIProcess/ios/WKGeolocationProviderIOS.mm:
2031         (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]):
2032         * UIProcess/ios/WKLegacyPDFView.mm:
2033         (-[WKLegacyPDFView actionSheetAssistant:shareElementWithURL:rect:]):
2034         * UIProcess/ios/WKPDFView.mm:
2035         (-[WKPDFView actionSheetAssistant:shareElementWithURL:rect:]):
2036         * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
2037         (-[WKFullScreenWindowController _updateLocationInfo]):
2038         * UIProcess/mac/LegacySessionStateCoding.cpp:
2039         (WebKit::decodeLegacySessionState):
2040         * UIProcess/mac/PageClientImplMac.h:
2041         * UIProcess/mac/PageClientImplMac.mm:
2042         (WebKit::PageClientImpl::showSafeBrowsingWarning):
2043         * UIProcess/mac/WKImmediateActionController.mm:
2044         (-[WKImmediateActionController _defaultAnimationController]):
2045         * UIProcess/win/WebInspectorProxyWin.cpp:
2046         * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
2047         (WebKit::WebPaymentCoordinator::showPaymentUI):
2048         (WebKit::WebPaymentCoordinator::validateMerchant):
2049         * WebProcess/ApplePay/WebPaymentCoordinator.h:
2050         * WebProcess/Cache/WebCacheStorageConnection.cpp:
2051         (WebKit::WebCacheStorageConnection::doRetrieveRecords):
2052         * WebProcess/Cache/WebCacheStorageConnection.h:
2053         * WebProcess/FileAPI/BlobRegistryProxy.cpp:
2054         (WebKit::BlobRegistryProxy::registerFileBlobURL):
2055         * WebProcess/FileAPI/BlobRegistryProxy.h:
2056         * WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h:
2057         (API::InjectedBundle::PageLoaderClient::willLoadDataRequest):
2058         (API::InjectedBundle::PageLoaderClient::userAgentForURL const):
2059         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2060         (WKBundleFrameAllowsFollowingLink):
2061         (WKBundleFrameCopySuggestedFilenameForResourceWithURL):
2062         (WKBundleFrameCopyMIMETypeForResourceWithURL):
2063         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2064         (WKBundlePageHasLocalDataForURL):
2065         * WebProcess/InjectedBundle/API/gtk/DOM/ConvertToUTF8String.cpp:
2066         (convertToUTF8String):
2067         * WebProcess/InjectedBundle/API/gtk/DOM/ConvertToUTF8String.h:
2068         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
2069         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
2070         * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
2071         * WebProcess/Network/WebLoaderStrategy.cpp:
2072         (WebKit::WebLoaderStrategy::preconnectTo):
2073         * WebProcess/Network/WebLoaderStrategy.h:
2074         * WebProcess/Network/WebSocketProvider.h:
2075         * WebProcess/Network/WebSocketStream.cpp:
2076         (WebKit::WebSocketStream::WebSocketStream):
2077         * WebProcess/Network/WebSocketStream.h:
2078         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2079         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2080         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
2081         * WebProcess/Plugins/PDF/PDFPlugin.h:
2082         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2083         (WebKit::PDFPlugin::clickedLink):
2084         * WebProcess/Plugins/Plugin.h:
2085         * WebProcess/Plugins/PluginController.h:
2086         * WebProcess/Plugins/PluginProxy.h:
2087         * WebProcess/Plugins/PluginView.cpp:
2088         (WebKit::PluginView::performURLRequest):
2089         (WebKit::PluginView::performJavaScriptURLRequest):
2090         * WebProcess/Plugins/WebPluginInfoProvider.cpp:
2091         (WebKit::WebPluginInfoProvider::webVisiblePluginInfo):
2092         * WebProcess/Plugins/WebPluginInfoProvider.h:
2093         * WebProcess/Storage/WebSWClientConnection.h:
2094         * WebProcess/Storage/WebSWContextManagerConnection.h:
2095         * WebProcess/UserContent/WebUserContentController.h:
2096         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2097         (WebKit::WebChromeClient::signedPublicKeyAndChallengeString const):
2098         * WebProcess/WebCoreSupport/WebChromeClient.h:
2099         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
2100         * WebProcess/WebCoreSupport/WebDragClient.h:
2101         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2102         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
2103         (WebKit::WebFrameLoaderClient::shouldForceUniversalAccessFromLocalURL):
2104         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2105         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2106         (WebKit::WebPlatformStrategies::readURLFromPasteboard):
2107         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2108         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
2109         (WebKit::WebDragClient::declareAndWriteDragImage):
2110         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2111         * WebProcess/WebPage/VisitedLinkTableController.h:
2112         * WebProcess/WebPage/WebFrame.cpp:
2113         (WebKit::WebFrame::allowsFollowingLink const):
2114         * WebProcess/WebPage/WebFrame.h:
2115         * WebProcess/WebPage/WebPage.cpp:
2116         (WebKit::WebPage::loadURLInFrame):
2117         (WebKit::WebPage::loadData):
2118         (WebKit::WebPage::loadAlternateHTML):
2119         (WebKit::WebPage::dumpHistoryForTesting):
2120         (WebKit::WebPage::sendCSPViolationReport):
2121         (WebKit::WebPage::addUserScript):
2122         (WebKit::WebPage::addUserStyleSheet):
2123         * WebProcess/WebPage/WebPage.h:
2124         * WebProcess/WebPage/WebPage.messages.in:
2125         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
2126         (WebKit::WebPrintOperationGtk::frameURL const):
2127         * WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
2128         * WebProcess/WebProcess.cpp:
2129         (WebKit::WebProcess::sendPrewarmInformation):
2130         * WebProcess/WebProcess.h:
2131         * WebProcess/cocoa/WebProcessCocoa.mm:
2132         (WebKit::activePagesOrigins):
2133
2134 2018-11-30  Per Arne Vollan  <pvollan@apple.com>
2135
2136         [macOS] Add more logging of sandbox call entries.
2137         https://bugs.webkit.org/show_bug.cgi?id=192261
2138         rdar://problem/45772445
2139
2140         Reviewed by Dean Jackson.
2141
2142         * WebProcess/com.apple.WebProcess.sb.in:
2143
2144 2018-11-30  Tim Horton  <timothy_horton@apple.com>
2145
2146         Editable images should always return some data, even if the canvas doesn't have a size yet
2147         https://bugs.webkit.org/show_bug.cgi?id=192265
2148         <rdar://problem/46385911>
2149
2150         Reviewed by Wenson Hsieh.
2151
2152         * UIProcess/ios/WKDrawingView.mm:
2153         (-[WKDrawingView layoutSubviews]):
2154         (emptyImage):
2155         (-[WKDrawingView renderedDrawing]):
2156         (-[WKDrawingView PNGRepresentation]):
2157         Some clients strongly depend on there being some data in an image, even if
2158         it's not of a usable size yet. We'll invalidate the attachment when the
2159         canvas size changes, so it will eventually settle at a usable size (after
2160         the first layer tree commit that includes the editable image).
2161
2162 2018-11-30  Don Olmstead  <don.olmstead@sony.com>
2163
2164         Rename ENABLE_SUBTLE_CRYPTO to ENABLE_WEB_CRYPTO
2165         https://bugs.webkit.org/show_bug.cgi?id=192197
2166
2167         Reviewed by Jiewen Tan.
2168
2169         * Configurations/FeatureDefines.xcconfig:
2170         * UIProcess/API/C/WKPage.cpp:
2171         (WKPageSetPageNavigationClient):
2172         * UIProcess/WebPageProxy.cpp:
2173         * UIProcess/WebPageProxy.h:
2174         * UIProcess/WebPageProxy.messages.in:
2175         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2176         * WebProcess/WebCoreSupport/WebChromeClient.h:
2177
2178 2018-11-30  Alexey Proskuryakov  <ap@apple.com>
2179
2180         Move USE_CFNETWORK_IGNORE_HSTS to its proper place
2181         https://bugs.webkit.org/show_bug.cgi?id=192173
2182
2183         Reviewed by Tim Horton.
2184
2185         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2186         (updateIgnoreStrictTransportSecuritySettingIfNecessary):
2187         (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
2188         (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
2189
2190 2018-11-30  Alex Christensen  <achristensen@webkit.org>
2191
2192         Remove unused WebProcessCreationParameters.uiProcessCookieStorageIdentifier
2193         https://bugs.webkit.org/show_bug.cgi?id=192157
2194
2195         Reviewed by Chris Dumez.
2196
2197         * Shared/WebProcessCreationParameters.cpp:
2198         (WebKit::WebProcessCreationParameters::encode const):
2199         (WebKit::WebProcessCreationParameters::decode):
2200         * Shared/WebProcessCreationParameters.h:
2201         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2202         (WebKit::WebProcessPool::platformInitializeWebProcess):
2203
2204 2018-11-30  Alex Christensen  <achristensen@webkit.org>
2205
2206         Remove privateBrowsingEnabled from NetworkProcessCreationParameters
2207         https://bugs.webkit.org/show_bug.cgi?id=192156
2208
2209         Reviewed by Chris Dumez.
2210
2211         * NetworkProcess/NetworkProcess.cpp:
2212         (WebKit::NetworkProcess::initializeNetworkProcess):
2213         * NetworkProcess/NetworkProcessCreationParameters.cpp:
2214         (WebKit::NetworkProcessCreationParameters::encode const):
2215         (WebKit::NetworkProcessCreationParameters::decode):
2216         * NetworkProcess/NetworkProcessCreationParameters.h:
2217         * UIProcess/WebProcessPool.cpp:
2218         (WebKit::WebProcessPool::ensureNetworkProcess):
2219
2220 2018-11-30  Basuke Suzuki  <basuke.suzuki@sony.com>
2221
2222         [Curl] Add API for ProtectionSpace.
2223         https://bugs.webkit.org/show_bug.cgi?id=191648
2224
2225         Reviewed by Alex Christensen.
2226
2227         Added API to get certificate information from protection space.
2228
2229         * PlatformWin.cmake:
2230         * Shared/curl/WebCoreArgumentCodersCurl.cpp:
2231         (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData):
2232         (IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData):
2233         * UIProcess/API/C/curl/WKProtectionSpaceCurl.cpp: Added.
2234         (WKProtectionSpaceCopyCertificateInfo):
2235         * UIProcess/API/C/curl/WKProtectionSpaceCurl.h: Added.
2236
2237 2018-11-30  David Quesada  <david_quesada@apple.com>
2238
2239         -[WKProcessPool _downloadURLRequest:] should allow specifying the initiating web view
2240         https://bugs.webkit.org/show_bug.cgi?id=192212
2241         rdar://problem/46363706
2242
2243         Reviewed by Alex Christensen.
2244
2245         * UIProcess/API/Cocoa/WKProcessPool.mm:
2246         (-[WKProcessPool _downloadURLRequest:originatingWebView:]):
2247         (-[WKProcessPool _downloadURLRequest:]): Deleted.
2248         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2249
2250 2018-11-30  Per Arne Vollan  <pvollan@apple.com>
2251
2252         Remove invalid character in sandbox introduced in r238703.
2253
2254         Unreviewed sandbox fix.
2255
2256         * WebProcess/com.apple.WebProcess.sb.in:
2257
2258 2018-11-30  Andy Estes  <aestes@apple.com>
2259
2260         [Cocoa] Add some WKA extension points
2261         https://bugs.webkit.org/show_bug.cgi?id=192131
2262         <rdar://problem/46330293>
2263
2264         Reviewed by Tim Horton.
2265
2266         * DerivedSources.make: Added an extension point for WebPreferences.yaml.
2267         * Platform/IPC/MessageSender.h:
2268         (IPC::MessageSender::sendWithAsyncReply): Send async messages via IPC::MessageSender.
2269         * Platform/cocoa/WebKitAdditions.mm: A an extension point for additional WebKit sources.
2270         * SourcesCocoa.txt: Added WebKitAdditions.mm as non-unified source.
2271         * UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:
2272         (WebKit::WebPaymentCoordinatorProxy::WebPaymentCoordinatorProxy): Called finishConstruction.
2273         * UIProcess/ApplePay/WebPaymentCoordinatorProxy.h: Added an extension point for
2274         WebPaymentCoordinatorProxy.
2275         * WebKit.xcodeproj/project.pbxproj: Added WebKitAdditions.mm.
2276         * WebProcess/ApplePay/WebPaymentCoordinator.h: Added an extension point for
2277         WebPaymentCoordinator.
2278
2279 2018-11-30  Frederic Wang  <fwang@igalia.com>
2280
2281         [WebAuthN] Support CTAP HID authenticators on macOS
2282         https://bugs.webkit.org/show_bug.cgi?id=188623
2283
2284         Unreviewed build fix.
2285
2286         * UIProcess/WebAuthentication/Cocoa/HidConnection.mm: Add missing header.
2287
2288 2018-11-29  Wenson Hsieh  <wenson_hsieh@apple.com>
2289
2290         REGRESSION (r238635): Dragging a text selection within WKWebView causes the selection highlight to get into a bad state
2291         https://bugs.webkit.org/show_bug.cgi?id=192165
2292         <rdar://problem/46346682>
2293
2294         Reviewed by Daniel Bates.
2295
2296         Fixes a bug in PageClientImpl::isViewFocused. Consider the following scenario:
2297         1. WKWebView is hosted within the view hierarchy
2298         2. First responder is *not* WKContentView
2299         3. The active focus retain count is nonzero
2300
2301         Before r238635, we would return true, due to condition (3). However, after r238635, we only consider whether the
2302         first responder is WKContentView, since the web view is in the view hierarchy. This breaks scenarios where
2303         WebKit or UIKit attempts to retain focus and later restore the content view to be the first responder (an
2304         example of this is dragging a text selection between editable elements in the same web view).
2305
2306         To fix this, simply bail early and return true if focus is being retained.
2307
2308         * UIProcess/ios/PageClientImplIOS.mm:
2309         (WebKit::PageClientImpl::isViewFocused):
2310
2311 2018-11-29  Tim Horton  <timothy_horton@apple.com>
2312
2313         Inform clients when editable image attachment backing data changes
2314         https://bugs.webkit.org/show_bug.cgi?id=192206
2315         <rdar://problem/46350277>
2316
2317         Reviewed by Wenson Hsieh.
2318
2319         * UIProcess/API/Cocoa/APIAttachmentCocoa.mm:
2320         (API::Attachment::invalidateGeneratedFileWrapper):
2321         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
2322         * UIProcess/API/Cocoa/WKWebView.mm:
2323         (-[WKWebView _didInvalidateDataForAttachment:]):
2324         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2325         * UIProcess/Cocoa/PageClientImplCocoa.h:
2326         * UIProcess/Cocoa/PageClientImplCocoa.mm:
2327         (WebKit::PageClientImplCocoa::didInvalidateDataForAttachment):
2328         * UIProcess/PageClient.h:
2329         (WebKit::PageClient::didInvalidateDataForAttachment):
2330         * UIProcess/WebPageProxy.cpp:
2331         (WebKit::WebPageProxy::didInvalidateDataForAttachment):
2332         * UIProcess/WebPageProxy.h:
2333         Plumb file-wrapper-invalidation through from APIAttachment to WKUIDelegate.
2334
2335 2018-11-29  Eric Carlson  <eric.carlson@apple.com>
2336
2337         [MediaStream] DeviceIdHashSaltStorage should use iframe and top level documents
2338         https://bugs.webkit.org/show_bug.cgi?id=192182
2339
2340         Reviewed by Youenn Fablet.
2341
2342         * UIProcess/DeviceIdHashSaltStorage.cpp:
2343         (WebKit::DeviceIdHashSaltStorage::deviceIdHashSaltForOrigin): Key off of request and top 
2344         level documents.
2345         (WebKit::DeviceIdHashSaltStorage::deleteDeviceIdHashSaltForOrigins): Ditto.
2346         * UIProcess/DeviceIdHashSaltStorage.h:
2347         (WebKit::DeviceIdHashSaltStorage::HashSaltForOrigin::HashSaltForOrigin):
2348
2349         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2350         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Pass both documents.
2351         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): Ditto.
2352         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): Ditto.
2353
2354 2018-11-29  Ryan Haddad  <ryanhaddad@apple.com>
2355
2356         Unreviewed, rolling out r238713.
2357
2358         Breaks internal builds.
2359
2360         Reverted changeset:
2361
2362         "[Cocoa] Add some WKA extension points"
2363         https://bugs.webkit.org/show_bug.cgi?id=192131
2364         https://trac.webkit.org/changeset/238713
2365
2366 2018-11-29  Simon Fraser  <simon.fraser@apple.com>
2367
2368         Add an internal feature flag to enable async overflow scrolling
2369         https://bugs.webkit.org/show_bug.cgi?id=192184
2370
2371         Reviewed by Tim Horton.
2372
2373         Add a new internal feature flag that will enable async overflow-scrolling for
2374         most overflow:scroll elements. Defaults to off.
2375
2376         * Shared/WebPreferences.yaml:
2377
2378 2018-11-29  Andy Estes  <aestes@apple.com>
2379
2380         [Cocoa] Add some WKA extension points
2381         https://bugs.webkit.org/show_bug.cgi?id=192131
2382         <rdar://problem/46330293>
2383
2384         Reviewed by Tim Horton.
2385
2386         * DerivedSources.make: Added an extension point for WebPreferences.yaml.
2387         * Platform/IPC/MessageSender.h:
2388         (IPC::MessageSender::sendWithAsyncReply): Send async messages via IPC::MessageSender.
2389         * Platform/cocoa/WebKitAdditions.mm: A an extension point for additional WebKit sources.
2390         * SourcesCocoa.txt: Added WebKitAdditions.mm as non-unified source.
2391         * UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:
2392         (WebKit::WebPaymentCoordinatorProxy::WebPaymentCoordinatorProxy): Called finishConstruction.
2393         * UIProcess/ApplePay/WebPaymentCoordinatorProxy.h: Added an extension point for
2394         WebPaymentCoordinatorProxy.
2395         * WebKit.xcodeproj/project.pbxproj: Added WebKitAdditions.mm.
2396         * WebProcess/ApplePay/WebPaymentCoordinator.h: Added an extension point for
2397         WebPaymentCoordinator.
2398
2399 2018-11-29  Tim Horton  <timothy_horton@apple.com>
2400
2401         Try to fix the build.
2402
2403         * Platform/spi/ios/PencilKitSPI.h:
2404
2405 2018-11-29  David Quesada  <david_quesada@apple.com>
2406
2407         Add SPI to publish NSProgress on active downloads
2408         https://bugs.webkit.org/show_bug.cgi?id=192021
2409         rdar://problem/44405661
2410
2411         Reviewed by Alex Christensen.
2412
2413         Make it possible for clients to allow other processes to monitor the state of active
2414         downloads. On Cocoa platforms, this can be done by creating an NSProgress, publishing
2415         it on an appropriate file URL (potentially a different file URL than where the download
2416         data is being written), updating properties on it as the download makes progress, and
2417         wiring up a cancellation handler that allows it to be remotely canceled. Interested
2418         clients can then subscribe to progress on that URL and receive a proxy to the progress
2419         that WebKit publishes.
2420
2421         * NetworkProcess/Downloads/Download.cpp:
2422         (WebKit::Download::~Download):
2423         (WebKit::Download::platformDestroyDownload):
2424             Add a platform-customizable hook for destructing the Download. DownloadCocoa.mm
2425             will interact with its Objective-C NSProgress instance at this point.
2426
2427         * NetworkProcess/Downloads/Download.h:
2428         * NetworkProcess/Downloads/DownloadManager.cpp:
2429         (WebKit::DownloadManager::dataTaskBecameDownloadTask):
2430             See comments for publishDownloadProgress().
2431         (WebKit::DownloadManager::publishDownloadProgress):
2432             If the provided downloadID corresponds to a non-Pending Download, hand the URL
2433             and a matching sandbox extension to the Download so it can create its progress.
2434             Otherwise, store the URL and sandbox extension on the PendingDownload to be used
2435             later when the full Download is created. When this happens, dataTaskBecameDownloadTask()
2436             will tell the PendingDownload about the Download it has become. The PendingDownload
2437             will then relay the progress URL and sandbox extension to the Download.
2438
2439         * NetworkProcess/Downloads/DownloadManager.h:
2440         * NetworkProcess/Downloads/PendingDownload.cpp:
2441         (WebKit::PendingDownload::publishProgress):
2442             Store the progress info for later use, when the proper Download is created.
2443         (WebKit::PendingDownload::didBecomeDownload):
2444             If there was a progress URL provided earlier, tell the Download corresponding to this
2445             PendingDownload to publish its progress using that URL.
2446
2447         * NetworkProcess/Downloads/PendingDownload.h:
2448         * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
2449         (WebKit::Download::platformDestroyDownload):
2450             When the Download is destroyed (i.e. when the download succeeds, fails, or is canceled),
2451             unpublish the progress, since there is no longer any activity to report.
2452         (WebKit::Download::publishProgress):
2453             Resolve the sandbox extension, create a progress configured to reflect the progress of
2454             this Download's NSURLSessionDownloadTask, and publish it at the given file URL.
2455
2456         * NetworkProcess/Downloads/cocoa/WKDownloadProgress.h: Copied from Source/WebKit/UIProcess/API/Cocoa/_WKDownload.h.
2457         * NetworkProcess/Downloads/cocoa/WKDownloadProgress.mm: Added.
2458         (-[WKDownloadProgress initWithDownloadTask:download:URL:sandboxExtension:]):
2459             Configure this progress, start observing properties on the download task that this
2460             progress will reflect, and connect the cancellation handler of the progress to cancel
2461             the corresponding Download.
2462         (-[WKDownloadProgress publish]):
2463         (-[WKDownloadProgress unpublish]):
2464             Override these methods to consume and revoke the sandbox extension to make sure the
2465             process has access to the progress file while the progress will be published.
2466         (-[WKDownloadProgress dealloc]):
2467         (-[WKDownloadProgress observeValueForKeyPath:ofObject:change:context:]):
2468             When either byte count (number received, or number expected to receive) of the download
2469             task changes, update this progress to reflect that.
2470
2471         * NetworkProcess/NetworkProcess.cpp:
2472         (WebKit::NetworkProcess::publishDownloadProgress):
2473         * NetworkProcess/NetworkProcess.h:
2474         * NetworkProcess/NetworkProcess.messages.in:
2475
2476         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
2477         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2478             Allow looking up the services that manages published NSProgresses.
2479
2480         * UIProcess/API/Cocoa/_WKDownload.h:
2481         * UIProcess/API/Cocoa/_WKDownload.mm:
2482         (-[_WKDownload publishProgressAtURL:]):
2483         * UIProcess/Downloads/DownloadProxy.cpp:
2484         (WebKit::DownloadProxy::publishProgress):
2485         * UIProcess/Downloads/DownloadProxy.h:
2486         * WebKit.xcodeproj/project.pbxproj:
2487
2488 2018-11-29  Tim Horton  <timothy_horton@apple.com>
2489
2490         Make drawing tools available when an editable image is focused
2491         https://bugs.webkit.org/show_bug.cgi?id=192172
2492         <rdar://problem/30337960>
2493
2494         Reviewed by Dean Jackson.
2495
2496         * Platform/spi/ios/PencilKitSPI.h:
2497         Add some more SPI.
2498
2499         * Shared/AssistedNodeInformation.cpp:
2500         (WebKit::AssistedNodeInformation::encode const):
2501         (WebKit::AssistedNodeInformation::decode):
2502         * Shared/AssistedNodeInformation.h:
2503         * WebProcess/WebPage/ios/WebPageIOS.mm:
2504         (WebKit::WebPage::handleStylusSingleTapAtPoint):
2505         (WebKit::isAssistableElement):
2506         (WebKit::WebPage::getAssistedNodeInformation):
2507         Plumb the assisted node's embedded view ID, if available.
2508         Also add a new input type for drawings, and use it when appropriate.
2509
2510         * SourcesCocoa.txt:
2511         * UIProcess/API/Cocoa/_WKFocusedElementInfo.h:
2512         Add WKInputTypeDrawing.
2513
2514         * UIProcess/ios/PencilKitSoftLink.h: Added.
2515         * UIProcess/ios/PencilKitSoftLink.mm: Added.
2516         Pull soft-linking out into its own file, to fix unified sources.
2517
2518         * UIProcess/ios/WKContentViewInteraction.mm:
2519         (-[WKFocusedElementInfo initWithAssistedNodeInformation:isUserInitiated:userObject:]):
2520         (-[WKContentView _requiresKeyboardWhenFirstResponder]):
2521         (-[WKContentView requiresAccessoryView]):
2522         Install a keyboard when a drawing is focused.
2523         Also, deduplicate one "curretUserInterfaceIdiomIsPad"; just fall through.
2524
2525         (-[WKContentView inputView]):
2526         Make a WKInkPickerControl when a drawing is focused.
2527
2528         (-[WKContentView textInputTraits]):
2529         (isAssistableInputType):
2530         * UIProcess/ios/WKDrawingView.h:
2531         * UIProcess/ios/WKDrawingView.mm:
2532         (-[WKDrawingView initWithEmbeddedViewID:webPageProxy:]):
2533         (-[WKDrawingView PNGRepresentation]):
2534         (-[WKDrawingView loadDrawingFromPNGRepresentation:]):
2535         Adopt PencilKitSoftLink.
2536
2537         (-[WKDrawingView canvasView]):
2538         Expose the internal canvas view for use by WKInkPickerControl.
2539
2540         * UIProcess/ios/WKInkPickerControl.h: Copied from Source/WebKit/Platform/spi/ios/PencilKitSPI.h.
2541         * UIProcess/ios/WKInkPickerControl.mm: Added.
2542         (-[WKInkPickerView initWithFrame:drawingView:]):
2543         (-[WKInkPickerView didPickInk]):
2544         (-[WKInkPickerView inlineInkPickerDidToggleRuler:]):
2545         (-[WKInkPickerView inlineInkPicker:didSelectTool:]):
2546         (-[WKInkPickerView inlineInkPicker:didSelectColor:]):
2547         (-[WKInkPickerView inkPickerSize]):
2548         (-[WKInkPickerView layoutSubviews]):
2549         (-[WKInkPickerView sizeThatFits:]):
2550         (-[WKInkPickerView viewControllerForPopoverPresentationFromInlineInkPicker:]):
2551         (-[WKInkPickerControl initWithDrawingView:]):
2552         (-[WKInkPickerControl beginEditing]):
2553         (-[WKInkPickerControl endEditing]):
2554         (-[WKInkPickerControl assistantView]):
2555         Install and hook up a PKInlineInkPicker.
2556         Center it in the keyboard.
2557         Plumb changes through to the canvas view.
2558
2559         * WebKit.xcodeproj/project.pbxproj:
2560
2561 2018-11-29  Per Arne Vollan  <pvollan@apple.com>
2562
2563         [macOS] Add logging for some sandbox entries.
2564         https://bugs.webkit.org/show_bug.cgi?id=192126
2565
2566         Reviewed by Brent Fulgham.
2567
2568         Add logging for sandbox entries which are possibly not needed.
2569
2570         * WebProcess/com.apple.WebProcess.sb.in:
2571
2572 2018-11-29  Alex Christensen  <achristensen@webkit.org>
2573
2574         Fix _WKWebsiteDataStoreConfiguration. sourceApplicationBundleIdentifier and sourceApplicationSecondaryIdentifier SPI introduced in r235127
2575         https://bugs.webkit.org/show_bug.cgi?id=192191
2576
2577         Reviewed by Andy Estes.
2578
2579         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2580         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
2581         When trying to adopt the new SPI and verify it worked, I found that the strings are not copied in one place where they should be.
2582
2583 2018-11-29  Megan Gardner  <megan_gardner@apple.com>
2584
2585         Move Lookup Code for better cross platform usage
2586         https://bugs.webkit.org/show_bug.cgi?id=191732
2587
2588         Reviewed by Alex Christensen.
2589
2590         Lookup is being replaced by Reveal. This framework should work on all platforms.
2591         The patch moves the code that we expect will be needed for all platforms to the more
2592         general cocoa area. This patch changes no funcationality, and should not change
2593         anything currently. This work will be build on later when Reveal is ready to support
2594         multiple platforms.
2595
2596         * Platform/spi/ios/UIKitSPI.h:
2597         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
2598         (WebKit::WebPageProxy::performDictionaryLookupAtLocation):
2599         (WebKit::WebPageProxy::performDictionaryLookupOfCurrentSelection):
2600         * UIProcess/ios/WKContentViewInteraction.h:
2601         * UIProcess/ios/WKContentViewInteraction.mm:
2602         (-[WKContentView setupInteraction]):
2603         (-[WKContentView cleanupInteraction]):
2604         (-[WKContentView _removeDefaultGestureRecognizers]):
2605         (-[WKContentView _addDefaultGestureRecognizers]):
2606         (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
2607         (-[WKContentView _lookupGestureRecognized:]):
2608         * UIProcess/ios/WebPageProxyIOS.mm:
2609         (WebKit::WebPageProxy::performDictionaryLookupAtLocation): Deleted.
2610         * UIProcess/mac/WebPageProxyMac.mm:
2611         (WebKit::WebPageProxy::performDictionaryLookupAtLocation): Deleted.
2612         (WebKit::WebPageProxy::performDictionaryLookupOfCurrentSelection): Deleted.
2613         * WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
2614         (WebKit::WebPage::performDictionaryLookupAtLocation):
2615         (WebKit::WebPage::performDictionaryLookupForSelection):
2616         (WebKit::WebPage::performDictionaryLookupOfCurrentSelection):
2617         (WebKit::WebPage::performDictionaryLookupForRange):
2618         (WebKit::WebPage::dictionaryPopupInfoForRange):
2619         * WebProcess/WebPage/WebPage.messages.in:
2620         * WebProcess/WebPage/ios/WebPageIOS.mm:
2621         (WebKit::WebPage::performDictionaryLookupAtLocation): Deleted.
2622         (WebKit::WebPage::performDictionaryLookupForSelection): Deleted.
2623         (WebKit::WebPage::performDictionaryLookupForRange): Deleted.
2624         * WebProcess/WebPage/mac/WebPageMac.mm:
2625         (WebKit::WebPage::performDictionaryLookupAtLocation): Deleted.
2626         (WebKit::WebPage::performDictionaryLookupForSelection): Deleted.
2627         (WebKit::WebPage::performDictionaryLookupOfCurrentSelection): Deleted.
2628         (WebKit::WebPage::dictionaryPopupInfoForRange): Deleted.
2629         (WebKit::WebPage::performDictionaryLookupForRange): Deleted.
2630
2631 2018-11-29  Zalan Bujtas  <zalan@apple.com>
2632
2633         [ContentObservation] Decouple content change and DOM timer scheduling observation
2634         https://bugs.webkit.org/show_bug.cgi?id=192170
2635
2636         Reviewed by Simon Fraser.
2637
2638         * WebProcess/WebPage/ios/WebPageIOS.mm:
2639         (WebKit::WebPage::handleSyntheticClick):
2640
2641 2018-11-29  Eric Carlson  <eric.carlson@apple.com>
2642
2643         [iOS] Tell AirPlay picker when a file has video
2644         https://bugs.webkit.org/show_bug.cgi?id=192155
2645         <rdar://problem/43843865>
2646
2647         Reviewed by Jer Noble.
2648
2649         * UIProcess/ios/WKContentViewInteraction.mm:
2650         (-[WKContentView _showPlaybackTargetPicker:fromRect:routeSharingPolicy:routingContextUID:]):
2651         Add hasVideo parameter.
2652
2653         * UIProcess/ios/forms/WKAirPlayRoutePicker.h:
2654         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
2655         (-[WKAirPlayRoutePicker showFromView:routeSharingPolicy:routingContextUID:hasVideo:]): Add
2656         hasVideo parameter, pass info to MPMediaControlsViewController.
2657         (-[WKAirPlayRoutePicker showFromView:routeSharingPolicy:routingContextUID:]): Deleted.
2658
2659 2018-11-29  Alexey Proskuryakov  <ap@apple.com>
2660
2661         Modernize the check for kCFURLRequestContentDecoderSkipURLCheck existence
2662         https://bugs.webkit.org/show_bug.cgi?id=192041
2663
2664         Reviewed by Tim Horton.
2665
2666         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
2667         (WebKit::NetworkDataTaskCocoa::applySniffingPoliciesAndBindRequestToInferfaceIfNeeded):
2668
2669 2018-11-29  Ryan Haddad  <ryanhaddad@apple.com>
2670
2671         Unreviewed, rolling out r238678.
2672
2673         Breaks internal builds.
2674
2675         Reverted changeset:
2676
2677         "Move Lookup Code for better cross platform usage"
2678         https://bugs.webkit.org/show_bug.cgi?id=191732
2679         https://trac.webkit.org/changeset/238678
2680
2681 2018-11-29  Suresh Koppisetty  <skoppisetty@apple.com>
2682
2683         Addressed a FIXME by removing an unnecessary call to [NSApplication sharedApplication].
2684         https://bugs.webkit.org/show_bug.cgi?id=192099
2685
2686         Reviewed by Geoffrey Garen.
2687
2688         [NSApplication sharedApplication] call is no longer needed in platformInitializeWebProcess as [NSApplication _accessibilityInitialize] calls [NSApplication sharedApplication].
2689
2690         * WebProcess/cocoa/WebProcessCocoa.mm:
2691         (WebKit::WebProcess::platformInitializeWebProcess):
2692
2693 2018-11-29  Megan Gardner  <megan_gardner@apple.com>
2694
2695         Move Lookup Code for better cross platform usage
2696         https://bugs.webkit.org/show_bug.cgi?id=191732
2697
2698         Reviewed by Alex Christensen.
2699
2700         Lookup is being replaced by Reveal. This framework should work on all platforms.
2701         The patch moves the code that we expect will be needed for all platforms to the more
2702         general cocoa area. This patch changes no funcationality, and should not change
2703         anything currently. This work will be build on later when Reveal is ready to support
2704         multiple platforms.
2705
2706         * Platform/spi/ios/UIKitSPI.h:
2707         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
2708         (WebKit::WebPageProxy::performDictionaryLookupAtLocation):
2709         (WebKit::WebPageProxy::performDictionaryLookupOfCurrentSelection):
2710         * UIProcess/ios/WKContentViewInteraction.h:
2711         * UIProcess/ios/WKContentViewInteraction.mm:
2712         (-[WKContentView setupInteraction]):
2713         (-[WKContentView cleanupInteraction]):
2714         (-[WKContentView _removeDefaultGestureRecognizers]):
2715         (-[WKContentView _addDefaultGestureRecognizers]):
2716         (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
2717         (-[WKContentView _lookupGestureRecognized:]):
2718         * UIProcess/ios/WebPageProxyIOS.mm:
2719         (WebKit::WebPageProxy::performDictionaryLookupAtLocation): Deleted.
2720         * UIProcess/mac/WebPageProxyMac.mm:
2721         (WebKit::WebPageProxy::performDictionaryLookupAtLocation): Deleted.
2722         (WebKit::WebPageProxy::performDictionaryLookupOfCurrentSelection): Deleted.
2723         * WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
2724         (WebKit::WebPage::performDictionaryLookupAtLocation):
2725         (WebKit::WebPage::performDictionaryLookupForSelection):
2726         (WebKit::WebPage::performDictionaryLookupOfCurrentSelection):
2727         (WebKit::WebPage::performDictionaryLookupForRange):
2728         (WebKit::WebPage::dictionaryPopupInfoForRange):
2729         * WebProcess/WebPage/WebPage.messages.in:
2730         * WebProcess/WebPage/ios/WebPageIOS.mm:
2731         (WebKit::WebPage::performDictionaryLookupAtLocation): Deleted.
2732         (WebKit::WebPage::performDictionaryLookupForSelection): Deleted.
2733         (WebKit::WebPage::performDictionaryLookupForRange): Deleted.
2734         * WebProcess/WebPage/mac/WebPageMac.mm:
2735         (WebKit::WebPage::performDictionaryLookupAtLocation): Deleted.
2736         (WebKit::WebPage::performDictionaryLookupForSelection): Deleted.
2737         (WebKit::WebPage::performDictionaryLookupOfCurrentSelection): Deleted.
2738         (WebKit::WebPage::dictionaryPopupInfoForRange): Deleted.
2739         (WebKit::WebPage::performDictionaryLookupForRange): Deleted.
2740
2741 2018-11-29  Conrad Shultz  <conrad_shultz@apple.com>
2742
2743         Factor out configuration of the file upload image picker
2744         https://bugs.webkit.org/show_bug.cgi?id=192138
2745         <rdar://problem/46334871>
2746
2747         Reviewed by Tim Horton.
2748
2749         By factoring configuration of the picker into its own method, it makes it easier
2750         to apply custom configuration in subclasses in the future.
2751
2752         * UIProcess/ios/forms/WKFileUploadPanel.mm:
2753         (-[WKFileUploadPanel _showPhotoPickerWithSourceType:]):
2754         (-[WKFileUploadPanel _configureImagePicker:]):
2755
2756 2018-11-29  Tomas Popela  <tpopela@redhat.com>
2757
2758         [GTK][WPE] Fix BubblewrapLauncher clang warnings
2759         https://bugs.webkit.org/show_bug.cgi?id=192086
2760
2761         Reviewed by Michael Catanzaro.
2762
2763         * UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
2764         (WebKit::bindPathVar): Initialize the i variable to 0.
2765         (WebKit::setupSeccomp): Initialize the optional datum_b member.
2766
2767 2018-11-28  Joseph Pecoraro  <pecoraro@apple.com>
2768
2769         Web Inspector: REGRESSION(?): all "Show *" develop menu items cause the page to crash
2770         https://bugs.webkit.org/show_bug.cgi?id=192016
2771         <rdar://problem/46284417>
2772
2773         Reviewed by Devin Rousso.
2774
2775         Previously calling the Page's inspectorController.show()
2776         would create a frontend connection on the WebProcess side.
2777         However now the frontend connection is handed to the WebProcess
2778         once the UIProcess creates it. So queue actions that take place
2779         immediately after showing the inspector until we have a frontend
2780         to send the actions to.
2781
2782         * WebProcess/WebPage/WebInspector.h:
2783         * WebProcess/WebPage/WebInspector.cpp:
2784         (WebKit::WebInspector::setFrontendConnection):
2785         (WebKit::WebInspector::closeFrontendConnection):
2786         (WebKit::WebInspector::whenFrontendConnectionEstablished):
2787         (WebKit::WebInspector::showConsole):
2788         (WebKit::WebInspector::showResources):
2789         (WebKit::WebInspector::showTimelines):
2790         (WebKit::WebInspector::showMainResourceForFrame):
2791         (WebKit::WebInspector::startPageProfiling):
2792         (WebKit::WebInspector::stopPageProfiling):
2793         (WebKit::WebInspector::startElementSelection):
2794         (WebKit::WebInspector::stopElementSelection):
2795
2796 2018-11-28  Vivek Seth  <v_seth@apple.com>
2797
2798         Consult dummy storage for HTTPS Upgrade, Apply If Appropriate
2799         https://bugs.webkit.org/show_bug.cgi?id=192094
2800         <rdar://problem/45851103> HTTPS Upgrade: Consult dummy storage for HTTPS Upgrade, Apply If Appropriate
2801
2802         Reviewed by Chris Dumez.
2803
2804         For main page loads upgrade HTTP requests to HTTPS if the hostname belongs to a set of upgradable hostnames.
2805
2806         * NetworkProcess/NetworkLoadChecker.cpp:
2807         (WebKit::NetworkLoadChecker::applyHTTPSUpgradeIfNeeded):
2808         (WebKit::NetworkLoadChecker::checkRequest):
2809         * NetworkProcess/NetworkLoadChecker.h:
2810         * NetworkProcess/NetworkResourceLoader.cpp:
2811         (WebKit::NetworkResourceLoader::start):
2812
2813 2018-11-28  Simon Fraser  <simon.fraser@apple.com>
2814
2815         REGRESSION (r234980): Crash in -[WKWebView _restorePageStateToUnobscuredCenter:scale:]
2816         https://bugs.webkit.org/show_bug.cgi?id=192127
2817         rdar://problem/44194179
2818
2819         Reviewed by Tim Horton.
2820         
2821         _restorePageStateToUnobscuredCenter: could receive an Optional<FloatRect> from the
2822         web process, and unconditionally called .value() even though it may not be engaged.
2823         
2824         No repro steps known, so no testcase.
2825
2826         * UIProcess/API/Cocoa/WKWebView.mm:
2827         (-[WKWebView _restorePageStateToUnobscuredCenter:scale:]):
2828
2829 2018-11-28  Commit Queue  <commit-queue@webkit.org>
2830
2831         Unreviewed, rolling out r238653 and r238656.
2832         https://bugs.webkit.org/show_bug.cgi?id=192130
2833
2834         Breaks iOS build (Requested by smfr on #webkit).
2835
2836         Reverted changesets:
2837
2838         "Move Lookup Code for better cross platform usage"
2839         https://bugs.webkit.org/show_bug.cgi?id=191732
2840         https://trac.webkit.org/changeset/238653
2841
2842         "Attempt to fix the iOS build by only including RevealSPI.h
2843         when it's needed."
2844         https://trac.webkit.org/changeset/238656
2845
2846 2018-11-28  Alex Christensen  <achristensen@webkit.org>
2847
2848         Modernize BlobRegistry::writeBlobsToTemporaryFiles
2849         https://bugs.webkit.org/show_bug.cgi?id=192117
2850
2851         Reviewed by Dean Jackson.
2852
2853         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
2854         (WebKit::NetworkBlobRegistry::writeBlobsToTemporaryFiles):
2855         (WebKit::NetworkBlobRegistry::writeBlobToFilePath):
2856         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
2857         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2858         (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
2859         * NetworkProcess/NetworkConnectionToWebProcess.h:
2860         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
2861         * NetworkProcess/NetworkProcess.cpp:
2862         (WebKit::NetworkProcess::writeBlobToFilePath):
2863         * NetworkProcess/NetworkProcess.h:
2864         * NetworkProcess/NetworkProcess.messages.in:
2865         * UIProcess/ChildProcessProxy.h:
2866         (WebKit::ChildProcessProxy::sendWithAsyncReply):
2867         * UIProcess/Network/NetworkProcessProxy.cpp:
2868         (WebKit::NetworkProcessProxy::didClose):
2869         (WebKit::NetworkProcessProxy::writeBlobToFilePath):
2870         (WebKit::NetworkProcessProxy::didWriteBlobToFilePath): Deleted.
2871         * UIProcess/Network/NetworkProcessProxy.h:
2872         * UIProcess/Network/NetworkProcessProxy.messages.in:
2873         * WebProcess/FileAPI/BlobRegistryProxy.cpp:
2874         (WebKit::BlobRegistryProxy::writeBlobsToTemporaryFiles):
2875         * WebProcess/FileAPI/BlobRegistryProxy.h:
2876         * WebProcess/Network/NetworkProcessConnection.cpp:
2877         (WebKit::NetworkProcessConnection::didClose):
2878         (WebKit::NetworkProcessConnection::writeBlobsToTemporaryFiles):
2879         (WebKit::NetworkProcessConnection::didWriteBlobsToTemporaryFiles): Deleted.
2880         * WebProcess/Network/NetworkProcessConnection.h:
2881         * WebProcess/Network/NetworkProcessConnection.messages.in:
2882
2883 2018-11-28  Alex Christensen  <achristensen@webkit.org>
2884
2885         Move loadThrottleLatency from NetworkProcessCreationParameters to NetworkSessionCreationParameters
2886         https://bugs.webkit.org/show_bug.cgi?id=192122
2887
2888         Reviewed by Dean Jackson.
2889
2890         This is part of an effort to reduce global variables in the NetworkProcess.
2891
2892         * NetworkProcess/NetworkLoad.cpp:
2893         (WebKit::NetworkLoad::NetworkLoad):
2894         (WebKit::NetworkLoad::didReceiveResponse):
2895         * NetworkProcess/NetworkLoad.h:
2896         * NetworkProcess/NetworkProcess.cpp:
2897         (WebKit::NetworkProcess::initializeNetworkProcess):
2898         * NetworkProcess/NetworkProcess.h:
2899         (WebKit::NetworkProcess::loadThrottleLatency const): Deleted.
2900         * NetworkProcess/NetworkProcessCreationParameters.cpp:
2901         (WebKit::NetworkProcessCreationParameters::encode const):
2902         (WebKit::NetworkProcessCreationParameters::decode):
2903         * NetworkProcess/NetworkSession.h:
2904         (WebKit::NetworkSession::loadThrottleLatency const):
2905         * NetworkProcess/NetworkSessionCreationParameters.cpp: Added.
2906         (WebKit::NetworkSessionCreationParameters::privateSessionParameters):
2907         (WebKit::NetworkSessionCreationParameters::encode const):
2908         (WebKit::NetworkSessionCreationParameters::decode):
2909         * NetworkProcess/NetworkSessionCreationParameters.h:
2910         (WebKit::NetworkSessionCreationParameters::encode const): Deleted.
2911         (WebKit::NetworkSessionCreationParameters::decode): Deleted.
2912         * NetworkProcess/cocoa/NetworkSessionCocoa.h:
2913         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2914         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
2915         * Shared/WebsiteDataStoreParameters.cpp:
2916         (WebKit::WebsiteDataStoreParameters::privateSessionParameters):
2917         * Sources.txt:
2918         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2919         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
2920         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
2921         (WebKit::WebsiteDataStore::parameters):
2922         * WebKit.xcodeproj/project.pbxproj:
2923
2924 2018-11-15  Megan Gardner  <megan_gardner@apple.com>
2925
2926         Move Lookup Code for better cross platform usage
2927         https://bugs.webkit.org/show_bug.cgi?id=191732
2928
2929         Reviewed by Alex Christensen.
2930
2931         Lookup is being replaced by Reveal. This framework should work on all platforms.
2932         The patch moves the code that we expect will be needed for all platforms to the more
2933         general cocoa area. This patch changes no funcationality, and should not change
2934         anything currently. This work will be build on later when Reveal is ready to support
2935         multiple platforms.
2936
2937         * Platform/spi/ios/UIKitSPI.h:
2938         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
2939         (WebKit::WebPageProxy::performDictionaryLookupAtLocation):
2940         (WebKit::WebPageProxy::performDictionaryLookupOfCurrentSelection):
2941         * UIProcess/ios/WKContentViewInteraction.h:
2942         * UIProcess/ios/WKContentViewInteraction.mm:
2943         (-[WKContentView setupInteraction]):
2944         (-[WKContentView cleanupInteraction]):
2945         (-[WKContentView _removeDefaultGestureRecognizers]):
2946         (-[WKContentView _addDefaultGestureRecognizers]):
2947         (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
2948         (-[WKContentView _lookupGestureRecognized:]):
2949         * UIProcess/ios/WebPageProxyIOS.mm:
2950         (WebKit::WebPageProxy::performDictionaryLookupAtLocation): Deleted.
2951         * UIProcess/mac/WebPageProxyMac.mm:
2952         (WebKit::WebPageProxy::performDictionaryLookupAtLocation): Deleted.
2953         (WebKit::WebPageProxy::performDictionaryLookupOfCurrentSelection): Deleted.
2954         * WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
2955         (WebKit::WebPage::performDictionaryLookupAtLocation):
2956         (WebKit::WebPage::performDictionaryLookupForSelection):
2957         (WebKit::WebPage::performDictionaryLookupOfCurrentSelection):
2958         (WebKit::WebPage::performDictionaryLookupForRange):
2959         (WebKit::WebPage::dictionaryPopupInfoForRange):
2960         * WebProcess/WebPage/WebPage.messages.in:
2961         * WebProcess/WebPage/ios/WebPageIOS.mm:
2962         (WebKit::WebPage::performDictionaryLookupAtLocation): Deleted.
2963         (WebKit::WebPage::performDictionaryLookupForSelection): Deleted.
2964         (WebKit::WebPage::performDictionaryLookupForRange): Deleted.
2965         * WebProcess/WebPage/mac/WebPageMac.mm:
2966         (WebKit::WebPage::performDictionaryLookupAtLocation): Deleted.
2967         (WebKit::WebPage::performDictionaryLookupForSelection): Deleted.
2968         (WebKit::WebPage::performDictionaryLookupOfCurrentSelection): Deleted.
2969         (WebKit::WebPage::dictionaryPopupInfoForRange): Deleted.
2970         (WebKit::WebPage::performDictionaryLookupForRange): Deleted.
2971
2972 2018-11-28  Keith Rollin  <krollin@apple.com>
2973
2974         Update generate-{derived,unified}-sources scripts to support generating .xcfilelist files
2975         https://bugs.webkit.org/show_bug.cgi?id=192031
2976         <rdar://problem/46286816>
2977
2978         Reviewed by Alex Christensen.
2979
2980         The Generate Derived Sources and Generate Unified Sources build phases
2981         in Xcode need to have their inputs and outputs specified. This
2982         specification will come in the form of .xcfilelist files that will be
2983         attached to these build phases. There is one .xcfilelist file that
2984         lists the input file and one that lists the output files. As part of
2985         this work, the various generate-{derived,unified}-sources scripts that
2986         are executed in these Generate build phases are modified to help in
2987         the creation of these .xcfilelist files. In particular, they can now
2988         be invoked with command-line parameters. These parameters are then
2989         used to alter the normal execution of these scripts, causing them to
2990         produce the .xcfilelist files as opposed to actually generating the
2991         files that are listed in those files.
2992
2993         * Scripts/generate-derived-sources.sh:
2994         * Scripts/generate-unified-sources.sh:
2995
2996 2018-11-28  Keith Rollin  <krollin@apple.com>
2997
2998         Revert print_all_generated_files work in r238008; tighten up target specifications
2999         https://bugs.webkit.org/show_bug.cgi?id=192025
3000         <rdar://problem/46284301>
3001
3002         Reviewed by Alex Christensen.
3003
3004         In r238008, I added a facility for DerivedSources.make makefiles to
3005         print out the list of files that they generate. This output was used
3006         in the generation of .xcfilelist files used to specify the output of
3007         the associated Generate Derived Sources build phases in Xcode. This
3008         approach worked, but it meant that people would need to follow a
3009         specific convention to keep this mechanism working.
3010
3011         Instead of continuing this approach, I'm going to implement a new
3012         facility based on the output of `make` when passed the -d flag (which
3013         prints dependency information). This new mechanism is completely
3014         automatic and doesn't need maintainers to follow a convention. To that
3015         end, remove most of the work performed in r238008 that supports the
3016         print_all_generated_files target.
3017
3018         At the same time, it's important for the sets of targets and their
3019         dependencies to be complete and correct. Therefore, also include
3020         changes to bring those up-to-date. As part of that, you'll see
3021         prevalent use of a particular technique. Here's an example:
3022
3023             BYTECODE_FILES = \
3024                 Bytecodes.h \
3025                 BytecodeIndices.h \
3026                 BytecodeStructs.h \
3027                 InitBytecodes.asm \
3028             #
3029             BYTECODE_FILES_PATTERNS = $(subst .,%,$(BYTECODE_FILES))
3030
3031             all : $(BYTECODE_FILES)
3032
3033             $(BYTECODE_FILES_PATTERNS): $(wildcard $(JavaScriptCore)/generator/*.rb) $(JavaScriptCore)/bytecode/BytecodeList.rb
3034                 ...
3035
3036         These lines indicate a set of generated files (those specified in
3037         BYTECODE_FILES). These files are generated by the BytecodeList.rb
3038         tool. But, as opposed to the normal rule where a single foo.output is
3039         generated by foo.input plus some additional dependencies, this rule
3040         produces multiple output files from a tool whose connection to the
3041         output files is not immediately clear. A special approach is needed
3042         where a single rule produces multiple output files. The normal way to
3043         implement this is to use an .INTERMEDIATE target. However, we used
3044         this approach in the past and ran into a problem with it, addressing
3045         it with an alternate approach in r210507. The above example shows this
3046         approach. The .'s in the list of target files are replaced with %'s,
3047         and the result is used as the left side of the dependency rule.
3048
3049         * DerivedSources.make:
3050
3051 2018-11-28  Daniel Bates  <dabates@apple.com>
3052
3053         [iOS] Page not defocused when Find-in-page becomes first responder
3054         https://bugs.webkit.org/show_bug.cgi?id=192084
3055         <rdar://problem/46146777>
3056
3057         Reviewed by Tim Horton.
3058
3059         When -becomeFirstResponder and -resignFirstResponder is called the page should become focused
3060         and defocused, respectively. WebKit adjusts it behavior depending on whether it knows it has
3061         focus. This includes decisions about whether to allow an element to be focused. We need to
3062         ensure that WebKit knows whether the web view is focused for it to make good decisions.
3063
3064         * UIProcess/ios/PageClientImplIOS.mm:
3065         (WebKit::PageClientImpl::isViewFocused): Check if the content view is the first responder and
3066         hence is accepting keyboard input. Note that picture-in-picture views do not accept keyboard
3067         input.
3068         * UIProcess/ios/WKContentViewInteraction.mm:
3069         (-[WKContentView becomeFirstResponderForWebView]): Update activity state when the view
3070         becomes focused.
3071         (-[WKContentView resignFirstResponderForWebView]): Update activity state when the view
3072         becomes defocused.
3073
3074 2018-11-28  Alex Christensen  <achristensen@webkit.org>
3075
3076         Remove dead code from an earlier attempt at implementing safe browsing
3077         https://bugs.webkit.org/show_bug.cgi?id=192067
3078
3079         Reviewed by Chris Dumez.
3080
3081         * Shared/LoadParameters.cpp:
3082         (WebKit::LoadParameters::encode const):
3083         (WebKit::LoadParameters::decode):
3084         * Shared/LoadParameters.h:
3085         * UIProcess/WebPageProxy.cpp:
3086         (WebKit::WebPageProxy::loadAlternateHTML):
3087         (WebKit::WebPageProxy::decidePolicyForNavigationActionAsync):
3088         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
3089         (WebKit::WebPageProxy::decidePolicyForNavigationActionSync):
3090         * UIProcess/WebPageProxy.h:
3091         * UIProcess/WebPageProxy.messages.in:
3092         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3093         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
3094         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3095
3096 2018-11-28  Alex Christensen  <achristensen@webkit.org>
3097
3098         Move logCookieInformation bool from NetworkProcess to NetworkSession
3099         https://bugs.webkit.org/show_bug.cgi?id=192049
3100
3101         Reviewed by Chris Dumez.
3102
3103         Part of an effort to remove globals in the NetworkProcess.
3104
3105         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3106         (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
3107         (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
3108         * NetworkProcess/NetworkProcess.cpp:
3109         (WebKit::NetworkProcess::initializeNetworkProcess):
3110         * NetworkProcess/NetworkProcess.h:
3111         (WebKit::NetworkProcess::shouldLogCookieInformation const): Deleted.
3112         * NetworkProcess/NetworkProcessCreationParameters.cpp:
3113         (WebKit::NetworkProcessCreationParameters::encode const):
3114         (WebKit::NetworkProcessCreationParameters::decode):
3115         * NetworkProcess/NetworkProcessCreationParameters.h:
3116         * NetworkProcess/NetworkResourceLoader.cpp:
3117         (WebKit::NetworkResourceLoader::didFinishLoading):
3118         (WebKit::NetworkResourceLoader::sendResultForCacheEntry):
3119         (WebKit::NetworkResourceLoader::shouldLogCookieInformation):
3120         (WebKit::NetworkResourceLoader::logCookieInformation const):
3121         (WebKit::logBlockedCookieInformation):
3122         (WebKit::logCookieInformationInternal):
3123         (WebKit::NetworkResourceLoader::logCookieInformation):
3124         * NetworkProcess/NetworkResourceLoader.h:
3125         * NetworkProcess/NetworkSession.h:
3126         (WebKit::NetworkSession::logCookieInformation const):
3127         * NetworkProcess/NetworkSessionCreationParameters.h:
3128         (WebKit::NetworkSessionCreationParameters::encode const):
3129         (WebKit::NetworkSessionCreationParameters::decode):
3130         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
3131         (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
3132         (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
3133         * NetworkProcess/cocoa/NetworkSessionCocoa.h:
3134         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
3135         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
3136         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3137         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
3138         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
3139         (WebKit::WebsiteDataStore::parameters):
3140
3141 2018-11-28  Ryan Haddad  <ryanhaddad@apple.com>
3142
3143         Unreviewed, rolling out r238620.
3144
3145         Broke internal builds again.
3146
3147         Reverted changeset:
3148
3149         "Remove @no-unify of InjectedBundleRangeHandle.cpp and
3150         InjectedBundleNodeHandle.cpp"
3151         https://bugs.webkit.org/show_bug.cgi?id=191853
3152         https://trac.webkit.org/changeset/238620
3153
3154 2018-11-28  Yongjun Zhang  <yongjun_zhang@apple.com>
3155
3156         Allow WebKit clients to specify a minimum effective width for layout.
3157         https://bugs.webkit.org/show_bug.cgi?id=191499
3158         <rdar://problem/45362678>
3159
3160         Reviewed by Wenson Hsieh.
3161
3162         If we ignore the meta viewport (_shouldIgnoreMetaViewport is true), the default layout width will be device
3163         width. For clients that wish to lay out the content with a different width value, we would need to add a way
3164         to specify the effective width for layout.
3165
3166         * UIProcess/API/Cocoa/WKWebView.mm: Add an iVar _minimumEffectiveDeviceWidth.
3167         (-[WKWebView _dispatchSetViewLayoutSize:]): Call the new setViewportConfigurationViewLayoutSize method.
3168         (-[WKWebView _setViewScale:]): Ditto.
3169         (-[WKWebView _setMinimumEffectiveWidth:]): The setter for _minimumEffectiveDeviceWidth.
3170         (-[WKWebView _minimumEffectiveWidth]): Getter for _minimumEffectiveDeviceWidth
3171         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Add a property _minimumEffectiveDeviceWidth to WKWebView.
3172         * UIProcess/WebPageProxy.h: Change setViewportConfigurationViewLayoutSize to take another argument minimumEffectiveDeviceWidth.
3173         * UIProcess/ios/WebPageProxyIOS.mm:
3174         (WebKit::WebPageProxy::setViewportConfigurationViewLayoutSize): Also send effectiveWidth to WebContent process.
3175         * WebProcess/WebPage/WebPage.cpp:
3176         (WebKit::WebPage::WebPage): Set the initial effective width to 0 when creating a web page, this tells ViewportConfiguration
3177              to ignore the minimum effective width value.
3178         * WebProcess/WebPage/WebPage.h: Change setViewportConfigurationViewLayoutSize to take another argument effectiveWidth.
3179         * WebProcess/WebPage/WebPage.messages.in:
3180         * WebProcess/WebPage/ios/WebPageIOS.mm:
3181         (WebKit::WebPage::setViewportConfigurationViewLayoutSize): Also pass effectiveWidth value to ViewportConfiguration.
3182
3183 2018-11-28  Fujii Hironori  <Hironori.Fujii@sony.com>
3184
3185         Remove @no-unify of InjectedBundleRangeHandle.cpp and InjectedBundleNodeHandle.cpp
3186         https://bugs.webkit.org/show_bug.cgi?id=191853
3187
3188         Reviewed by Michael Catanzaro.
3189
3190         In r235845, I excluded InjectedBundleRangeHandle.cpp and
3191         InjectedBundleNodeHandle.cpp from unify source builds in order to
3192         work around a MSVC bug.
3193
3194         Then, I commited a different workaround for the MSVC bug in
3195         r238386. Now, we can include InjectedBundleRangeHandle.cpp and
3196         InjectedBundleNodeHandle.cpp in unified source builds. Revert
3197         r235845.
3198
3199         * Sources.txt: Removed @no-unify of InjectedBundleRangeHandle.cpp
3200         and InjectedBundleNodeHandle.cpp
3201         * WebKit.xcodeproj/project.pbxproj: Unchecked Target Membership
3202         not to be compiled by XCode.
3203
3204 2018-11-28  Joseph Pecoraro  <pecoraro@apple.com>
3205
3206         Web Inspector: REGRESSION(r238378): reloading WebInspector after a settings change doesn't re-show WebInspector
3207         https://bugs.webkit.org/show_bug.cgi?id=191971
3208
3209         Reviewed by Matt Baker.
3210
3211         * WebProcess/WebPage/WebInspector.cpp:
3212         (WebKit::WebInspector::reopen): Deleted.
3213         * WebProcess/WebPage/WebInspector.h:
3214         * WebProcess/WebPage/WebInspector.messages.in:
3215         Move reopen out of the WebProcess...
3216
3217         * UIProcess/WebInspectorProxy.cpp:
3218         (WebKit::WebInspectorProxy::reopen):
3219         * UIProcess/WebInspectorProxy.h:
3220         * UIProcess/WebInspectorProxy.messages.in:
3221         And into the UIProcess where the order of messages won't
3222         be as problematic.
3223
3224         * WebProcess/WebPage/WebInspectorUI.cpp:
3225         (WebKit::WebInspectorUI::reopen):
3226         Send a message to the WebInspectorProxy instead.
3227
3228 2018-11-28  Alexey Proskuryakov  <ap@apple.com>
3229
3230         Remove another OS version check from NetworkDataTaskCocoa.mm
3231         https://bugs.webkit.org/show_bug.cgi?id=192046
3232
3233         Reviewed by Alex Christensen.
3234
3235         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
3236         (WebKit::NetworkDataTaskCocoa::statelessCookieStorage):
3237
3238 2018-11-28  Alexey Proskuryakov  <ap@apple.com>
3239
3240         Modernize version checks for same site cookie support
3241         https://bugs.webkit.org/show_bug.cgi?id=192054
3242
3243         Reviewed by Tim Horton.
3244
3245         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: (WebKit::updateTaskWithFirstPartyForSameSiteCookies):
3246         Also removed runtime checks, which are no longer relevant.
3247
3248 2018-11-27  Mark Lam  <mark.lam@apple.com>
3249
3250         ENABLE_FAST_JIT_PERMISSIONS should be false for iosmac.
3251         https://bugs.webkit.org/show_bug.cgi?id=192055
3252         <rdar://problem/46288783>
3253
3254         Reviewed by Saam Barati.
3255
3256         * Configurations/FeatureDefines.xcconfig:
3257
3258 2018-11-27  Alex Christensen  <achristensen@webkit.org>
3259
3260         Make synchronous IPC introduced in r237267 asynchronous
3261         https://bugs.webkit.org/show_bug.cgi?id=190757
3262
3263         Reviewed by Chris Dumez.
3264
3265         * UIProcess/API/Cocoa/WKProcessPool.mm:
3266         (-[WKProcessPool _getActivePagesOriginsInWebProcessForTesting:completionHandler:]):
3267         (-[WKProcessPool _getActivePagesOriginsInWebProcessForTesting:]): Deleted.
3268         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
3269         * UIProcess/WebProcessPool.cpp:
3270         (WebKit::WebProcessPool::activePagesOriginsInWebProcessForTesting):
3271         * UIProcess/WebProcessPool.h:
3272         * UIProcess/WebProcessProxy.cpp:
3273         (WebKit::WebProcessProxy::activePagesDomainsForTesting):
3274         * UIProcess/WebProcessProxy.h:
3275         * WebProcess/WebProcess.cpp:
3276         (WebKit::WebProcess::getActivePagesOriginsForTesting):
3277         * WebProcess/WebProcess.messages.in:
3278         * WebProcess/cocoa/WebProcessCocoa.mm:
3279         (WebKit::WebProcess::getActivePagesOriginsForTesting):
3280
3281 2018-11-27  Alex Christensen  <achristensen@webkit.org>
3282
3283         Safe browsing warning text needs to be visible on High Sierra
3284         https://bugs.webkit.org/show_bug.cgi?id=192022
3285
3286         Reviewed by Tim Horton.
3287
3288         Something about AppKit, autolayout, view insertion order, and NSTextView makes the text lay
3289         out with initial size of {0, 0} on High Sierra. Using an NSTextField instead makes the details visible.
3290
3291         Covered by an API test.
3292
3293         * UIProcess/Cocoa/WKSafeBrowsingWarning.h:
3294         * UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
3295         (makeLabel):
3296         (-[WKSafeBrowsingWarning addContent]):
3297         (-[WKSafeBrowsingWarning showDetailsClicked]):
3298         (-[WKSafeBrowsingWarning layoutText]):
3299         (makeTitleLabel): Deleted.
3300
3301 2018-11-27  Tim Horton  <timothy_horton@apple.com>
3302
3303         WKNavigation.AutomaticViewReloadAfterWebProcessCrash asserts after r238538
3304         https://bugs.webkit.org/show_bug.cgi?id=192038
3305         <rdar://problem/46288457>
3306
3307         Reviewed by Wenson Hsieh.
3308
3309         * UIProcess/WebPageProxy.cpp:
3310         (WebKit::m_resetRecentCrashCountTimer):
3311         (WebKit::WebPageProxy::finishAttachingToWebProcess):
3312         (WebKit::WebPageProxy::resetState):
3313         (WebKit::m_editableImageController): Deleted.
3314         Properly invalidate m_editableImageController when resetting WebPageProxy.
3315         Otherwise, the MessageReceiverMaps get invalidated, then later when
3316         EditableImageController goes away we assert trying to remove the receiver.
3317
3318 2018-11-27  Jiewen Tan  <jiewen_tan@apple.com>
3319
3320         (r238246) [ MacOS Debug ] Layout Test http/wpt/webauthn/ctap-hid-failure.https.html is Crashing
3321         https://bugs.webkit.org/show_bug.cgi?id=191757
3322
3323         Reviewed by Chris Dumez.
3324
3325         Wrong nonce error causes retransmission, which then trigger wrong nonce error. This is expected
3326         behavior for mock testing. However, the main thread could time out when MockHidConnection::send
3327         is excuting the block on another thread. The block will then return without invoking the callback,
3328         which triggers this WTFCrash. The solution is always invoking the callback before return in the
3329         block.
3330
3331         * UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:
3332         (WebKit::MockHidConnection::send):
3333
3334 2018-11-27  Keith Rollin  <krollin@apple.com>
3335
3336         Better parsing of comments in generate-message*.py
3337         https://bugs.webkit.org/show_bug.cgi?id=191866
3338         <rdar://problem/46189563>
3339
3340         Reviewed by Chris Dumez.
3341
3342         The script parsing the *.messages.in files would treat a line starting
3343         with '#' as a comment, but not a line starting with '<whitespace>#'.
3344         This means that jamming a '#' right in front of the first character of
3345         a message definition (as opposed to the beginning of a line) will have
3346         no effect and the line will get treated just the same as a
3347         non-commented line. Fix this by trimming all white space from the
3348         beginning and ending of the line before processing it.
3349
3350         * Scripts/webkit/parser.py:
3351         (parse):
3352         * Scripts/webkit/test-messages.in:
3353
3354 2018-11-27  Thibault Saunier  <tsaunier@igalia.com>
3355
3356         [GTK|WPE] Allow disabling WebRTC unified plan SDP through an env var
3357         https://bugs.webkit.org/show_bug.cgi?id=192024
3358
3359         Reviewed by Michael Catanzaro.
3360
3361         * UIProcess/API/glib/WebKitSettings.cpp:
3362         (webKitSettingsConstructed):
3363
3364 2018-11-27  Alexey Proskuryakov  <ap@apple.com>
3365
3366         Modernize the check for async _saveCookies existence
3367         https://bugs.webkit.org/show_bug.cgi?id=191987
3368
3369         Reviewed by Dean Jackson.
3370
3371         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3372         (WebKit::NetworkProcess::platformSyncAllCookies):
3373
3374 2018-11-27  Tim Horton  <timothy_horton@apple.com>
3375
3376         Serialize and deserialize editable image strokes
3377         https://bugs.webkit.org/show_bug.cgi?id=192002
3378         <rdar://problem/30900149>
3379
3380         Reviewed by Dean Jackson.
3381
3382         * UIProcess/API/APIAttachment.cpp:
3383         (API::Attachment::updateAttributes):
3384         * UIProcess/WebPageProxy.cpp:
3385         (WebKit::WebPageProxy::willUpdateAttachmentAttributes):
3386         * UIProcess/WebPageProxy.h:
3387         When an attachment would update its DOM attributes, plumb a notification
3388         to EditableImageController, and allow it to block the update (because
3389         we don't really want to set src for editable image attachments,
3390         we just want the UI process to fully own the data).
3391
3392         * Platform/spi/ios/PencilKitSPI.h:
3393         Add some SPI.
3394
3395         * UIProcess/ios/EditableImageController.h:
3396         * UIProcess/ios/EditableImageController.mm:
3397         (WebKit::EditableImageController::loadStrokesFromAttachment):
3398         Add a helper to load strokes from an attachment.
3399
3400         (WebKit::EditableImageController::associateWithAttachment):
3401         Try to load strokes from the attachment when initially associated.
3402         Don't create a file wrapper around a null image, so it will be regenerated later.
3403
3404         (WebKit::EditableImageController::willUpdateAttachmentAttributes):
3405         The aforementioned plumbing at update time.
3406
3407         * UIProcess/ios/WKDrawingView.h:
3408         * UIProcess/ios/WKDrawingView.mm:
3409         (-[WKDrawingView layoutSubviews]):
3410         Invalidate the attachment (so it will be regenerated upon request) if the
3411         canvas size changes.
3412
3413         (-[WKDrawingView PNGRepresentation]):
3414         Serialize strokes into the EXIF User Comment field.
3415         We will find a different field to use (ideally a custom vendor-specific
3416         field that nobody else will use for anything), but this works for now.
3417
3418         Don't try to render an image if we don't have a size or scale;
3419         PKImageRenderer will just fail anyway, so bail early.
3420
3421         In the iOS Simulator, PKImageRenderer currently returns an unusable image.
3422         Instead, so that we have a image on which to serialize the strokes,
3423         create a transparent 1x1 image.