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