d1e7fe41e3759b2dee3c7beff41afd151b19bc25
[WebKit-https.git] / Source / WebKit / ChangeLog
1 2018-12-20  Brent Fulgham  <bfulgham@apple.com>
2
3         WKWebView default UA doesn't freeze the build number
4         https://bugs.webkit.org/show_bug.cgi?id=192809
5         <rdar://problem/44687185>
6
7         Reviewed by Andy Estes.
8
9         Always reports the frozen build number.
10
11         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
12         (defaultApplicationNameForUserAgent): Do not expose the actual build number through this API.
13
14 2018-12-20  Jer Noble  <jer.noble@apple.com>
15
16         Enable MediaCapabilities by default.
17         https://bugs.webkit.org/show_bug.cgi?id=192340
18         <rdar://problem/46435149>
19
20         Reviewed by Dean Jackson.
21
22         * Shared/WebPreferences.yaml:
23
24 2018-12-20  Carlos Garcia Campos  <cgarcia@igalia.com>
25
26         [GTK] WebDriver: tests in imported/w3c/webdriver/tests/element_clear/user_prompts.py are failing
27         https://bugs.webkit.org/show_bug.cgi?id=192927
28
29         Reviewed by Michael Catanzaro.
30
31         Give the focus back to the web view when a dialog is dismissed.
32
33         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
34         (webkitWebViewBaseContainerRemove):
35
36 2018-12-20  Tim Horton  <timothy_horton@apple.com>
37
38         Unparented WKWebView can't retrieve main resource data for a main frame plugin
39         https://bugs.webkit.org/show_bug.cgi?id=192923
40         <rdar://problem/46859068>
41
42         Reviewed by Wenson Hsieh.
43
44         * WebProcess/Plugins/PluginView.cpp:
45         (WebKit::PluginView::liveResourceData const):
46         If the WKWebView is unparented, we may not immediately initialize the plugin.
47         In that case, PluginView holds on to the backing data until the plugin
48         is initialized. If a WKWebView API client asks for the backing data
49         for the plugin during this time, we should return it, instead of bailing.
50
51 2018-12-20  Wenson Hsieh  <wenson_hsieh@apple.com>
52
53         [iOS] Focusing an editable element should scroll to reveal the selection
54         https://bugs.webkit.org/show_bug.cgi?id=192802
55         <rdar://problem/46781759>
56
57         Reviewed by Tim Horton.
58
59         Currently, when tapping on an editable element, logic in -[WKWebView _zoomToFocusRect:…:] attempts to adjust the
60         visible viewport such that the rect containing the selection is visible. However, AssistedNodeInformation's
61         selectionRect is used here, which (as the FIXME in WebPage::getAssistedNodeInformation notes) is either the last
62         touch location, or the top left of the element if the touch location is outside of the element's bounding rect.
63         This leads to confusing and undesirable behavior when tapping near the bottom of a large contenteditable element
64         to focus it, since the actual selection will end up near the top of the element, yet we'll try to scroll to
65         reveal the bottom of the element, which causes the visible selection to scroll offscreen. Notably, this affects
66         scenarios involving editable web views embedded in apps, such as Mail compose.
67
68         Right now, we use the last touch location as an approximation for the selection rect because the selection may
69         have not yet been updated at the moment when focus moves into an editable element. To fix this, we defer the
70         process of zooming to the focused element rect until after the selection changes and the UI process is updated
71         with information about the new selection rects.
72
73         Test: editing/selection/ios/selection-is-visible-after-focusing-editable-area.html
74
75         * Shared/AssistedNodeInformation.cpp:
76         (WebKit::AssistedNodeInformation::encode const):
77         (WebKit::AssistedNodeInformation::decode):
78         * Shared/AssistedNodeInformation.h:
79
80         Rename selectionRect to elementInteractionLocation, to more accurately reflect its value and purpose. This isn't
81         strictly always the last touch location, since we may default to the focused element location instead if the
82         last touch location is outside of the element rect.
83
84         * UIProcess/API/Cocoa/WKWebView.mm:
85         (-[WKWebView _zoomToFocusRect:selectionRect:insideFixed:fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]):
86
87         Tweak a constant that determines the minimum amount of margin to leave between the selection rect and the edge
88         of the window when scrolling to reveal the focused element. Previously, this was larger than necessary to
89         accomodate for the fact that the "selection rect" used when zooming to the focused element did not take the
90         actual selection into account at all, and was simply a 1 by 1 rect; this meant that the margin needed to be
91         large enough to exceed the usual height of a text caret in editable content. Since we now use the real selection
92         rect, we can be much less generous with this margin.
93
94         * UIProcess/ios/WKContentViewInteraction.h:
95         * UIProcess/ios/WKContentViewInteraction.mm:
96         (-[WKContentView cleanupInteraction]):
97         (-[WKContentView observeValueForKeyPath:ofObject:change:context:]):
98
99         Don't additionally update the selection in the middle of triggering zooming to the focused element; on
100         particular versions of iOS, this now attempts to scroll the selection rect on-screen, which then conflicts with
101         zooming to reveal the focused element.
102
103         (-[WKContentView _zoomToRevealFocusedElement]):
104
105         Renamed from _displayFormNodeInputView to _zoomToRevealFocusedElement, to make the purpose of this function more
106         clear. Additionally, pull logic to update the accessory view out of this method, so that it's strictly concerned
107         with zooming to the focused element.
108
109         (-[WKContentView inputView]):
110
111         Add a FIXME describing the implications of zooming to the focused element in the implementation of -inputView.
112         See also: <https://bugs.webkit.org/show_bug.cgi?id=192878>.
113
114         (-[WKContentView accessoryTab:]):
115
116         Fix a subtle issue when keeping track of _didAccessoryTabInitiateFocus. Currently, this is set to YES in
117         -accessoryTab: and unset in _displayFormNodeInputView, but since _displayFormNodeInputView may be invoked
118         multiple times for the same focused element (see: -inputView), we might end up zooming to the focused element
119         with _didAccessoryTabInitiateFocus set to NO, even though we initiated focus with the previous/next buttons.
120
121         Instead, temporarily set a different ivar, _isChangingFocusUsingAccessoryTab, to YES in -accessoryTab:, and
122         unset it in the completion handler after the focused element has changed. Then, when we _startAssistingNode:,
123         set _didAccessoryTabInitiateFocus to _isChangingFocusUsingAccessoryTab. This ensures that the correctness of
124         _didAccessoryTabInitiateFocus isn't tied to the number of times -[WKContentView inputView] is invoked when
125         focusing an element.
126
127         (shouldZoomToRevealSelectionRect):
128         (rectToRevealWhenZoomingToFocusedElement):
129
130         Add a helper method to determine the selection rect to use when zooming to reveal the focused element. ASSERTs
131         that we have post-layout data in the EditorState.
132
133         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
134
135         When "assisting" a focused element, immediately zoom to it if we don't need selection information to compute the
136         rect to zoom to; otherwise, defer zooming until we receive the first editor state update in the UI process that
137         contains information about our selection rects.
138
139         (-[WKContentView _stopAssistingNode]):
140         (-[WKContentView _didReceiveEditorStateUpdateAfterFocus]):
141
142         If necessary, reveal the focused element by zooming.
143
144         (-[WKContentView _updateInitialWritingDirectionIfNecessary]):
145
146         Pull this initial writing direction update logic out into a separate helper method.
147
148         (-[WKContentView _displayFormNodeInputView]): Deleted.
149
150         Replaced by _zoomToRevealFocusedElement.
151
152         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
153         (WebKit::WebChromeClient::elementDidRefocus):
154
155         This currently calls WebChromeClient::elementDidFocus; instead, call the new WebPage::elementDidRefocus;
156         additionally, make this available on all PLATFORM(COCOA), rather than just IOS_FAMILY.
157
158         * WebProcess/WebCoreSupport/WebChromeClient.h:
159         * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
160         (WebKit::WebChromeClient::elementDidRefocus): Deleted.
161
162         Replaced by the PLATFORM(COCOA) version.
163
164         * WebProcess/WebPage/WebPage.cpp:
165         (WebKit::WebPage::elementDidRefocus):
166
167         When refocusing an element, ensure that post-layout editor state data is sent to the UI process by including a
168         full EditorState in the next layer tree transaction.
169
170         * WebProcess/WebPage/WebPage.h:
171         * WebProcess/WebPage/ios/WebPageIOS.mm:
172         (WebKit::WebPage::completeSyntheticClick):
173
174         Call elementDidRefocus instead of elementDidFocus, in the case where the existing focused element is clicked.
175
176         (WebKit::WebPage::getAssistedNodeInformation):
177
178         Adjust for the change from selectionRect to elementInteractionLocation.
179
180 2018-12-20  Patrick Griffis  <pgriffis@igalia.com>
181
182         [GTK][WPE] Grant the sandbox read access to XDG_DATA_HOME/prgname
183         https://bugs.webkit.org/show_bug.cgi?id=192929
184
185         Reviewed by Michael Catanzaro.
186
187         * UIProcess/API/glib/WebKitWebContext.cpp:
188         * UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
189         (WebKit::bubblewrapSpawn):
190
191 2018-12-20  Chris Dumez  <cdumez@apple.com>
192
193         [PSON] SuspendedPageProxy fails to release its process assertion if the WebPage fails to enter PageCache
194         https://bugs.webkit.org/show_bug.cgi?id=192873
195
196         Reviewed by Antti Koivisto.
197
198         SuspendedPageProxy fails to release its process assertion if the WebPage fails to enter PageCache, preventing
199         the process from suspending on iOS.
200
201         * UIProcess/SuspendedPageProxy.cpp:
202         (WebKit::SuspendedPageProxy::didProcessRequestToSuspend):
203         (WebKit::SuspendedPageProxy::didReceiveMessage):
204         (WebKit::SuspendedPageProxy::didSuspend): Deleted.
205         (WebKit::SuspendedPageProxy::didFailToSuspend): Deleted.
206         * UIProcess/SuspendedPageProxy.h:
207
208 2018-12-19  Chris Dumez  <cdumez@apple.com>
209
210         wtf/Optional.h: move-constructor and move-assignment operator should disengage the value being moved from
211         https://bugs.webkit.org/show_bug.cgi?id=192728
212         <rdar://problem/46746779>
213
214         Reviewed by Geoff Garen.
215
216         * NetworkProcess/*:
217         * Platform/*:
218         * Scripts/*:
219         * Shared/*:
220         * UIProcess/*:
221         * WebProcess/*:
222
223 2018-12-19  Michael Catanzaro  <mcatanzaro@igalia.com>
224
225         Unreviewed, silence -Wpragmas warning
226
227         * WebProcess/WebCoreSupport/WebAlternativeTextClient.h:
228
229 2018-12-19  Vivek Seth  <v_seth@apple.com>
230
231         HTTPS Upgrade: Use full sqlite upgrade list
232         https://bugs.webkit.org/show_bug.cgi?id=192736
233         <rdar://problem/45851427>
234
235         Reviewed by Chris Dumez.
236
237         * NetworkProcess/NetworkHTTPSUpgradeChecker.cpp: Added.
238         (WebKit::NetworkHTTPSUpgradeCheckerDatabasePath):
239         (WebKit::NetworkHTTPSUpgradeChecker::NetworkHTTPSUpgradeChecker):
240         (WebKit::NetworkHTTPSUpgradeChecker::~NetworkHTTPSUpgradeChecker):
241         (WebKit::NetworkHTTPSUpgradeChecker::query):
242         (WebKit::NetworkHTTPSUpgradeChecker::isAlwaysOnLoggingAllowed const):
243         * NetworkProcess/NetworkHTTPSUpgradeChecker.h: Added.
244         (WebKit::NetworkHTTPSUpgradeChecker::didSetupCompleteSuccessfully const):
245         * NetworkProcess/NetworkLoadChecker.cpp:
246         (WebKit::NetworkLoadChecker::applyHTTPSUpgradeIfNeeded const):
247         (WebKit::NetworkLoadChecker::checkRequest):
248         * NetworkProcess/NetworkLoadChecker.h:
249         * NetworkProcess/NetworkProcess.h:
250         (WebKit::NetworkProcess::networkHTTPSUpgradeChecker):
251         * Sources.txt:
252         * WebKit.xcodeproj/project.pbxproj:
253
254 2018-12-19  Tim Horton  <timothy_horton@apple.com>
255
256         Use delegate instead of drawingDelegate in WKDrawingView
257         https://bugs.webkit.org/show_bug.cgi?id=192899
258         <rdar://problem/46733339>
259
260         Reviewed by Wenson Hsieh.
261
262         * UIProcess/ios/WKDrawingView.mm:
263         (-[WKDrawingView initWithEmbeddedViewID:webPageProxy:]):
264         Do the dance.
265
266 2018-12-19  Alex Christensen  <achristensen@webkit.org>
267
268         Navigations away from the SafeBrowsing interstitial show a flash of old content
269         https://bugs.webkit.org/show_bug.cgi?id=192676
270
271         Reviewed by Chris Dumez.
272
273         When a user clicks through a safe browsing warning, do not remove the warning until content is drawn for the destination.
274         Otherwise, the user will confusingly see the page before the warning while the navigation happens.
275         We can only do this for warnings caused by main frame navigations, though.  Other warnings (such as those caused by iframes)
276         need to be cleared immediately, and we still need to clear the warning immediately if the user has said to go back.
277
278         This change is reflected in an updated API test.
279
280         * UIProcess/API/Cocoa/WKWebView.mm:
281         (-[WKWebView _showSafeBrowsingWarning:completionHandler:]):
282         * UIProcess/Cocoa/SafeBrowsingWarningCocoa.mm:
283         (WebKit::SafeBrowsingWarning::SafeBrowsingWarning):
284         * UIProcess/Cocoa/WKSafeBrowsingWarning.h:
285         * UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
286         (-[WKSafeBrowsingWarning forMainFrameNavigation]):
287         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
288         (WebKit::WebPageProxy::beginSafeBrowsingCheck):
289         * UIProcess/Cocoa/WebViewImpl.h:
290         * UIProcess/Cocoa/WebViewImpl.mm:
291         (WebKit::WebViewImpl::showSafeBrowsingWarning):
292         (WebKit::WebViewImpl::clearSafeBrowsingWarningIfForMainFrameNavigation):
293         * UIProcess/PageClient.h:
294         (WebKit::PageClient::clearSafeBrowsingWarningIfForMainFrameNavigation):
295         * UIProcess/SafeBrowsingWarning.h:
296         (WebKit::SafeBrowsingWarning::create):
297         (WebKit::SafeBrowsingWarning::forMainFrameNavigation const):
298         * UIProcess/WebPageProxy.cpp:
299         (WebKit::WebPageProxy::didReachLayoutMilestone):
300         (WebKit::WebPageProxy::beginSafeBrowsingCheck):
301         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
302         * UIProcess/WebPageProxy.h:
303         * UIProcess/ios/PageClientImplIOS.h:
304         * UIProcess/mac/PageClientImplMac.h:
305         * UIProcess/mac/PageClientImplMac.mm:
306         (WebKit::PageClientImpl::clearSafeBrowsingWarningIfForMainFrameNavigation):
307
308 2018-12-19  Tim Horton  <timothy_horton@apple.com>
309
310         UI process crash when focusing an editable image
311         https://bugs.webkit.org/show_bug.cgi?id=192839
312         <rdar://problem/46786670>
313
314         Reviewed by Wenson Hsieh.
315
316         * SourcesCocoa.txt:
317         * UIProcess/ios/WKContentViewInteraction.h:
318         * UIProcess/ios/WKContentViewInteraction.mm:
319         (-[WKContentView _requiresKeyboardWhenFirstResponder]):
320         (-[WKContentView inputView]):
321         (-[WKContentView requiresAccessoryView]):
322         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
323         (-[WKContentView _stopAssistingNode]):
324         (-[WKContentView _installInkPickerForDrawingViewWithID:]):
325         (-[WKContentView _uninstallInkPicker]):
326         * UIProcess/ios/WKInkPickerView.h: Renamed from Source/WebKit/UIProcess/ios/WKInkPickerControl.h.
327         * UIProcess/ios/WKInkPickerView.mm: Renamed from Source/WebKit/UIProcess/ios/WKInkPickerControl.mm.
328         (-[WKInkPickerView initWithDrawingView:]):
329         (-[WKInkPickerView didPickInk]):
330         (-[WKInkPickerView inlineInkPickerDidToggleRuler:]):
331         (-[WKInkPickerView inlineInkPicker:didSelectTool:]):
332         (-[WKInkPickerView inlineInkPicker:didSelectColor:]):
333         (-[WKInkPickerView inkPickerSize]):
334         (-[WKInkPickerView layoutSubviews]):
335         (-[WKInkPickerView sizeThatFits:]):
336         (-[WKInkPickerView viewControllerForPopoverPresentationFromInlineInkPicker:]):
337         * WebKit.xcodeproj/project.pbxproj:
338         Make WKInkPickerView a WKWebView subview instead of an inputView.
339         Also, don't force the keyboard to be visible when an editable image is focused.
340
341 2018-12-19  Eric Carlson  <eric.carlson@apple.com>
342
343         [MediaStream] Force system camera/microphone TCC prompt if necessary
344         https://bugs.webkit.org/show_bug.cgi?id=192820
345         <rdar://problem/42680098>
346
347         Reviewed by Jer Noble.
348
349         * UIProcess/Cocoa/UIDelegate.mm:
350         (WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest): Enable TCC check 
351         and prompt on Mojave.
352
353 2018-12-19  Megan Gardner  <megan_gardner@apple.com>
354
355         Allow clients to set the navigator platform
356         https://bugs.webkit.org/show_bug.cgi?id=192735
357
358         Reviewed by Tim Horton.
359
360         Add private API to allow clients to override the default navigator
361         platform. Some websites check for the platform, which 
362         interfears with our request desktop site feature. This should
363         help more sites function as expected.
364
365         * Shared/WebsitePoliciesData.cpp:
366         (WebKit::WebsitePoliciesData::encode const):
367         (WebKit::WebsitePoliciesData::decode):
368         (WebKit::WebsitePoliciesData::applyToDocumentLoader):
369         * Shared/WebsitePoliciesData.h:
370         * UIProcess/API/APIWebsitePolicies.cpp:
371         (API::WebsitePolicies::data):
372         * UIProcess/API/APIWebsitePolicies.h:
373         * UIProcess/API/Cocoa/_WKWebsitePolicies.h:
374         * UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
375         (-[_WKWebsitePolicies setCustomNavigatorPlatform:]):
376         (-[_WKWebsitePolicies customNavigatorPlatform]):
377         * UIProcess/Cocoa/NavigationState.mm:
378         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
379
380 2018-12-19  Truitt Savell  <tsavell@apple.com>
381
382         Unreviewed, rolling out r239358.
383
384         Revision caused imported/w3c/web-platform-tests/IndexedDB/ to
385         crash on Debug bots
386
387         Reverted changeset:
388
389         "Clean up IndexedDB files between tests"
390         https://bugs.webkit.org/show_bug.cgi?id=192796
391         https://trac.webkit.org/changeset/239358
392
393 2018-12-18  Alex Christensen  <achristensen@webkit.org>
394
395         REGRESSION(r239134) iOS safe browsing warning unable to show details
396         https://bugs.webkit.org/show_bug.cgi?id=192837
397
398         Reviewed by Tim Horton.
399
400         * UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
401         (-[WKSafeBrowsingWarning addContent]):
402         I had a fragile design that relied on the internal view heirarchy structure of UIScrollView,
403         which I changed in r239134 by introducing a layout which changed where its scrollbars were in the view heirarchy.
404         I now have a more robust design that saves a WeakObjCPtr to the view I need to traverse to.
405         Testing is problematic because this had to do with scrollbars and UIScrollView internals which seem to behave
406         differently in TestWebKitAPI, but I verified manually that this fixes the issue.
407
408 2018-12-18  Fujii Hironori  <Hironori.Fujii@sony.com>
409
410         [Win][Clang] Fix compilation warnings under Source/WebKit directory
411         https://bugs.webkit.org/show_bug.cgi?id=192695
412
413         Reviewed by Alex Christensen.
414
415         * NetworkProcess/cache/NetworkCacheData.cpp:
416         (makeSalt): Enclosed by #if !OS(WINDOWS).
417         * NetworkProcess/cache/NetworkCacheFileSystem.cpp:
418         (WebKit::NetworkCache::directoryEntryType): Ditto.
419         * Platform/win/ModuleWin.cpp:
420         (WebKit::Module::platformFunctionPointer const): Cast a function pointer with reinterpret_cast<void*>().
421         * UIProcess/DrawingAreaProxyImpl.cpp:
422         (WebKit::DrawingAreaProxyImpl::DrawingMonitor::DrawingMonitor):
423         Moved the initializer of m_webPage in order to be encluded by #if PLATFORM(GTK).
424         * UIProcess/DrawingAreaProxyImpl.h: Ditto.
425         * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
426         (WebKit::processName): Removed the duplicated 'const' type qualifier.
427         * UIProcess/win/WebInspectorProxyWin.cpp:
428         (WebKit::WebInspectorProxy::platformAttach): Removed an unused variable.
429         (WebKit::WebInspectorProxy::platformDetach): Ditto.
430         * UIProcess/win/WebPopupMenuProxyWin.cpp: Ditto.
431         * UIProcess/win/WebView.cpp:
432         (WebKit::WebView::paint): Ditto.
433         (WebKit::WebPopupMenu::setUpPlatformData): Ditto.
434         * UIProcess/win/WebPopupMenuProxyWin.h: Marked override methods with 'override'.
435         * WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.h: Ditto.
436         * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp: Removed an unused variable.
437
438 2018-12-18  Wenson Hsieh  <wenson_hsieh@apple.com>
439
440         [macOS] fast/forms/datalist/datalist-textinput-suggestions-order.html sometimes crashes after r239337
441         https://bugs.webkit.org/show_bug.cgi?id=192836
442         <rdar://problem/45321184>
443
444         Reviewed by Tim Horton.
445
446         r239337 exposed a subtle issue in the implementation of `-[WKDataListSuggestionsView updateWithInformation:]`,
447         wherein we might end up recomputing information for table view cells at rows that no longer exist. This currently
448         happens because we first set the datalist's `_suggestions`, then change the table view's frame, and then finally
449         reload the table view; however, in the case where the number of suggestions decreased and the frame changed
450         (which prompts AppKit to ask us again for table cell views), we'll attempt to access an out-of-bounds index in
451         the `_suggestions` vector.
452
453         To address this, we change our suggestions and immediately reload the table view before updating `NSTableView`'s
454         frame, so that we only provide table view cells for rows that actually correspond to items in `_suggestions`.
455
456         * UIProcess/mac/WebDataListSuggestionsDropdownMac.mm:
457         (-[WKDataListSuggestionsView updateWithInformation:]):
458
459 2018-12-18  Jiewen Tan  <jiewen_tan@apple.com>
460
461         [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
462         https://bugs.webkit.org/show_bug.cgi?id=192061
463
464         Reviewed by Dewei Zhu.
465
466         Part 4.
467
468         Add some additional temporary logging info to determine if the time out value passed to the timer is right.
469         Once the bug is determined and fixed, we should remove all logging added in this patch.
470
471         * UIProcess/WebAuthentication/AuthenticatorManager.cpp:
472         (WebKit::AuthenticatorManager::initTimeOutTimer):
473
474 2018-12-18  Sihui Liu  <sihui_liu@apple.com>
475
476         Clean up IndexedDB files between tests
477         https://bugs.webkit.org/show_bug.cgi?id=192796
478
479         Reviewed by Geoffrey Garen.
480
481         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
482         (WKWebsiteDataStoreRemoveAllIndexedDatabasesSync):
483         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
484
485 2018-12-18  Vivek Seth  <v_seth@apple.com>
486
487         HTTPS Upgrade: Scripts / preprocessing necessary to create new database in future
488         https://bugs.webkit.org/show_bug.cgi?id=192612
489         <rdar://problem/46651207>
490
491         Reviewed by Andy Estes.
492
493         * Configurations/WebKit.xcconfig:
494         * DerivedSources.make:
495         * Scripts/generate-https-upgrade-database.sh: Added.
496         * WebKit.xcodeproj/project.pbxproj:
497
498 2018-12-18  Wenson Hsieh  <wenson_hsieh@apple.com>
499
500         Unreviewed, fix the 32-bit watchOS build after r239314
501
502         * UIProcess/API/Cocoa/WKWebView.mm:
503         (-[WKWebView _zoomToFocusRect:selectionRect:insideFixed:fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]):
504
505 2018-12-18  Alex Christensen  <achristensen@webkit.org>
506
507         WKWebView has old URL while displaying SafeBrowsing interstitial, for link-click navigations
508         https://bugs.webkit.org/show_bug.cgi?id=192675
509
510         Reviewed by Geoffrey Garen.
511
512         When a safe browsing warning is being shown, WKWebView.URL should be the unsafe website, not the safe website before it.
513
514         * UIProcess/API/Cocoa/WKWebView.mm:
515         (-[WKWebView _showSafeBrowsingWarningWithTitle:warning:details:completionHandler:]):
516         (-[WKWebView _showSafeBrowsingWarningWithURL:title:warning:details:completionHandler:]):
517         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
518         * UIProcess/Cocoa/SafeBrowsingWarningCocoa.mm:
519         (WebKit::SafeBrowsingWarning::SafeBrowsingWarning):
520         * UIProcess/SafeBrowsingWarning.h:
521         (WebKit::SafeBrowsingWarning::create):
522         (WebKit::SafeBrowsingWarning::url const):
523         * UIProcess/WebPageProxy.cpp:
524         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
525
526 2018-12-18  Chris Dumez  <cdumez@apple.com>
527
528         Regression(r239182) SuspendedPage's process reuse for link navigation optimization sometimes broken
529         https://bugs.webkit.org/show_bug.cgi?id=192772
530
531         Reviewed by Antti Koivisto.
532
533         With r239182, if the page in the previous process would fail to enter PageCache, we would destroy
534         the corresponding SuspendedPageProxy, which would potentially terminate the process. This would
535         regress performance when trying to navigate back in history to that page. This would also regress
536         performance when link-navigating to the same domain as we would have previously reused the suspended
537         page's process for such navigation.
538
539         Address the issue by keeping the SuspendedPageProxy alive even if the WebPage fails to suspend.
540         When trying to reuse a SuspendedPageProxy, if the page failed to suspend, reuse its process but
541         not the suspended page itself.
542
543         * UIProcess/SuspendedPageProxy.cpp:
544         (WebKit::SuspendedPageProxy::~SuspendedPageProxy):
545         (WebKit::SuspendedPageProxy::waitUntilReadyToUnsuspend):
546         (WebKit::SuspendedPageProxy::unsuspend):
547         (WebKit::SuspendedPageProxy::didSuspend):
548         (WebKit::SuspendedPageProxy::didFailToSuspend):
549         (WebKit::SuspendedPageProxy::loggingString const):
550         * UIProcess/SuspendedPageProxy.h:
551         * UIProcess/WebPageProxy.cpp:
552         (WebKit::WebPageProxy::swapToWebProcess):
553         * UIProcess/WebProcessPool.cpp:
554         (WebKit::WebProcessPool::processForNavigationInternal):
555
556 2018-12-17  Jiewen Tan  <jiewen_tan@apple.com>
557
558         [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
559         https://bugs.webkit.org/show_bug.cgi?id=192061
560
561         Reviewed by Dewei Zhu.
562
563         Part 3.
564
565         Add some additional temporary logging info to determine if the timer is working as expected.
566         Once the bug is determined and fixed, we should remove all logging added in this patch.
567
568         * UIProcess/WebAuthentication/AuthenticatorManager.cpp:
569         (WebKit::AuthenticatorManager::respondReceived):
570         (WebKit::AuthenticatorManager::initTimeOutTimer):
571         (WebKit::AuthenticatorManager::timeOutTimerFired):
572         * UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.cpp:
573         (WebKit::MockAuthenticatorManager::respondReceivedInternal):
574
575 2018-12-17  Saam barati  <sbarati@apple.com>
576
577         Enable HTTP and HTTPS proxies on iOS and make it a property of the NSURLSession
578         https://bugs.webkit.org/show_bug.cgi?id=192374
579         <rdar://problem/46506286>
580
581         Reviewed by Alex Christensen.
582
583         This patch makes it so that we can use HTTP/HTTPS proxies on iOS as well.
584         To enable on iOS, you can do something like:
585         $ defaults write -g WebKit2HTTPProxy -string "http://localhost:8080"
586         $ defaults write -g WebKit2HTTPSProxy -string "http://localhost:8080"
587         
588         This patch also changes the Proxy to be enabled on a per NSURLSession
589         basis instead of a per process basis.
590
591         * NetworkProcess/NetworkProcess.cpp:
592         (WebKit::NetworkProcess::initializeNetworkProcess):
593         * NetworkProcess/NetworkSessionCreationParameters.cpp:
594         (WebKit::NetworkSessionCreationParameters::privateSessionParameters):
595         (WebKit::NetworkSessionCreationParameters::encode const):
596         (WebKit::NetworkSessionCreationParameters::decode):
597         * NetworkProcess/NetworkSessionCreationParameters.h:
598         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
599         (WebKit::proxyDictionary):
600         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
601         * NetworkProcess/mac/NetworkProcessMac.mm:
602         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
603         (WebKit::overrideSystemProxies): Deleted.
604         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
605         (-[WKWebsiteDataStore _initWithConfiguration:]):
606         * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
607         * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:
608         (-[_WKWebsiteDataStoreConfiguration httpProxy]):
609         (-[_WKWebsiteDataStoreConfiguration setHTTPProxy:]):
610         (-[_WKWebsiteDataStoreConfiguration httpsProxy]):
611         (-[_WKWebsiteDataStoreConfiguration setHTTPSProxy:]):
612         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
613         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
614         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
615         (WebKit::WebsiteDataStore::parameters):
616         * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:
617         (WebKit::WebsiteDataStoreConfiguration::copy):
618         * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:
619         (WebKit::WebsiteDataStoreConfiguration::httpProxy const):
620         (WebKit::WebsiteDataStoreConfiguration::setHTTPProxy):
621         (WebKit::WebsiteDataStoreConfiguration::httpsProxy const):
622         (WebKit::WebsiteDataStoreConfiguration::setHTTPSProxy):
623
624 2018-12-17  Wenson Hsieh  <wenson_hsieh@apple.com>
625
626         Tap highlights should not be shown on iOSMac
627         https://bugs.webkit.org/show_bug.cgi?id=192797
628         <rdar://problem/46793995>
629
630         Reviewed by Tim Horton.
631
632         WKWebViews in iOSMac should avoid painting tap highlights, since tap highlights are not present in the rest of
633         the macOS platform. Simply disable this functionality by bailing in `-[WKContentView _showTapHighlight]`.
634
635         * UIProcess/ios/WKContentViewInteraction.mm:
636         (-[WKContentView _showTapHighlight]):
637
638 2018-12-17  Wenson Hsieh  <wenson_hsieh@apple.com>
639
640         Unreviewed, fix the iOSMac engineering build again
641
642         After r239311, `WebProcessProxy::fullKeyboardAccessEnabled` in `WebProcessProxyIOS.mm` attempts to use
643         `WKFullKeyboardAccessWatcher`, which is guarded by `ENABLE(FULL_KEYBOARD_ACCESS)`. However, on iOSMac,
644         `ENABLE(FULL_KEYBOARD_ACCESS)` is 0. Fix the build by putting access to `WKFullKeyboardAccessWatcher` behind
645         `ENABLE(FULL_KEYBOARD_ACCESS)`.
646
647         * UIProcess/ios/WebProcessProxyIOS.mm:
648         (WebKit::WebProcessProxy::fullKeyboardAccessEnabled):
649
650 2018-12-17  Wenson Hsieh  <wenson_hsieh@apple.com>
651
652         Unreviewed, fix the iOSMac engineering build
653
654         `generateRequestID()` is only invoked from code under `ENABLE(MEDIA_STREAM)`; move it under this guard to avoid
655         an unused function warning.
656
657         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
658
659 2018-12-17  David Kilzer  <ddkilzer@apple.com>
660
661         clang-tidy: Fix unnecessary object copy in CPUMonitor::setCPULimit()
662         <https://webkit.org/b/192707>
663         <rdar://problem/46734926>
664
665         Reviewed by Daniel Bates.
666
667         * WebProcess/cocoa/WebProcessCocoa.mm:
668         (WebKit::WebProcess::updateCPUMonitorState):
669         - Pass m_cpuLimit directly since getting its value causes an
670           identical std::optional<double> to be created unnecessarily.
671
672 2018-12-17  Wenson Hsieh  <wenson_hsieh@apple.com>
673
674         [iOS] Focusing a large editable element always scrolls to the top of the element
675         https://bugs.webkit.org/show_bug.cgi?id=192745
676         <rdar://problem/46758445>
677
678         Reviewed by Tim Horton.
679
680         Currently, when focusing form controls or editable elements, we try to scroll such that the focused element rect
681         is centered within the visible area. In the case of very large focusable elements whose dimensions exceed the
682         width or height of the visible area, we instead scroll such that the top left point of the element is at the top
683         left corner of the visible area.
684
685         However, this results in unnecessary scrolling if the top of the element is already near the top of the visible
686         area. For WebKit2-based rich text editors that have an editable body element with a top content inset that
687         contains additional content, this means we will always scroll the additional content away when focusing the
688         editable body.
689
690         To avoid this behavior, adjust focused element zooming logic for editable elements that are too large to be
691         centered in the visible area, such that we only scroll the top left position of the focused element to the top
692         half or top right of the visible area, respectively. This reduces the amount of scrolling when focusing large
693         editable elements, while still making it clear which element is being focused.
694
695         * Platform/spi/ios/UIKitSPI.h:
696         * UIProcess/API/Cocoa/WKWebView.mm:
697         (-[WKWebView _zoomToFocusRect:selectionRect:insideFixed:fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]):
698
699         Make some small adjustments to improve the readability of this method by using `clampTo` instead of clamping
700         values by comparing and setting values.
701
702         Also, fix an existing bug wherein focusable elements that are meant to be centered within the visible area are
703         currently offset by half the difference between the bottom inset amount and the top inset amount, in the case
704         where the `_obscuredInsets` SPI is used to specify content insets for the web view (i.e., MobileSafari).
705
706         * UIProcess/API/Cocoa/WKWebViewInternal.h:
707
708         Make a couple of arguments `const FloatRect&` instead of just `FloatRect`.
709
710 2018-12-17  Ryosuke Niwa  <rniwa@webkit.org>
711
712         offsetLeft and offsetParent should adjust across shadow boundaries
713         https://bugs.webkit.org/show_bug.cgi?id=157437
714         <rdar://problem/26154021>
715
716         Reviewed by Simon Fraser.
717
718         Use *forBindings variants of offsetLeft, offsetTop, and offsetParent.
719
720         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElementGtk.cpp:
721         (webkit_dom_element_get_offset_left):
722         (webkit_dom_element_get_offset_top):
723         (webkit_dom_element_get_offset_parent):
724
725 2018-12-17  Chris Fleizach  <cfleizach@apple.com>
726
727         Some builds are broken after r239262
728         https://bugs.webkit.org/show_bug.cgi?id=192777
729
730         Reviewed by Simon Fraser.
731
732         * Platform/spi/ios/AccessibilitySupportSPI.h:
733         * UIProcess/Cocoa/WKFullKeyboardAccessWatcher.h:
734         * UIProcess/Cocoa/WKFullKeyboardAccessWatcher.mm:
735         (platformIsFullKeyboardAccessEnabled):
736         (-[WKFullKeyboardAccessWatcher init]):
737         Fix the build by being more clear about when it's OK to use AccessibilitySupport.
738
739 2018-12-17  Chris Dumez  <cdumez@apple.com>
740
741         Allow passing nil as session state to [WKWebView _restoreSessionState:]
742         https://bugs.webkit.org/show_bug.cgi?id=192789
743         <rdar://problem/46755277>
744
745         Reviewed by Alex Christensen.
746
747         Allow passing nil as session state to [WKWebView _restoreSessionState:] instead of crashing.
748
749         * UIProcess/API/Cocoa/WKWebView.mm:
750         (-[WKWebView _restoreSessionState:andNavigate:]):
751
752 2018-12-17  Alex Christensen  <achristensen@webkit.org>
753
754         Fix occasional null-dereference crash in WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame
755         https://bugs.webkit.org/show_bug.cgi?id=192744
756         <rdar://problem/45842668>
757
758         Reviewed by Chris Dumez.
759
760         * UIProcess/WebPageProxy.cpp:
761         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
762         Things happen.  Navigations can be null.  If they are, we shouldn't dereference pointers to them.
763
764 2018-12-17  Chris Dumez  <cdumez@apple.com>
765
766         Unreviewed, revert recent CrashReporterClient build fixes as they are no longer needed.
767
768         * Platform/cocoa/WKCrashReporter.mm:
769
770 2018-12-17  Suresh Koppisetty  <skoppisettyt@apple.com>
771
772         Rollout r235411
773         https://bugs.webkit.org/show_bug.cgi?id=192778
774         <rdar://46789485>
775
776         Disabling access to CoreServices is causing a performance
777         regression in process launch time.  See <rdar://46141878>
778
779         Reviewed by Alex Christensen.
780
781         * WebProcess/com.apple.WebProcess.sb.in:
782
783 2018-12-17  Zan Dobersek  <zdobersek@igalia.com>
784
785         Unreviewed WPE build fix after r239277.
786
787         * UIProcess/API/C/WKContext.cpp:
788         (WKContextClearCurrentModifierStateForTesting):
789         Use the WebKit:: namespace specifier as it is used across this file.
790
791 2018-12-17  Commit Queue  <commit-queue@webkit.org>
792
793         Unreviewed, rolling out r239265 and r239274.
794         https://bugs.webkit.org/show_bug.cgi?id=192765
795
796         unorm_normalize is deprecated, and broke an internal build
797         (Requested by Truitt on #webkit).
798
799         Reverted changesets:
800
801         "[GTK][WPE] Need a function to convert internal URI to display
802         ("pretty") URI"
803         https://bugs.webkit.org/show_bug.cgi?id=174816
804         https://trac.webkit.org/changeset/239265
805
806         "Fix the Apple Internal Mac build with a newer SDK"
807         https://trac.webkit.org/changeset/239274
808
809 2018-12-17  Daniel Bates  <dabates@apple.com>
810
811         Implement UIScriptController::toggleCapsLock() for iOS
812         https://bugs.webkit.org/show_bug.cgi?id=191815
813
814         Reviewed by Andy Estes.
815
816         Add test infrastructure to clear the current modifier state. We will use this to ensure that
817         the caps lock state does not persist between tests.
818
819         * UIProcess/API/C/WKContext.cpp:
820         (WKContextClearCurrentModifierStateForTesting): Added.
821         * UIProcess/API/C/WKContextPrivate.h:
822         * UIProcess/WebProcessPool.cpp:
823         (WebKit::WebProcessPool::clearCurrentModifierStateForTesting): Added.
824         * UIProcess/WebProcessPool.h:
825         * WebProcess/WebProcess.cpp:
826         (WebKit::WebProcess::clearCurrentModifierStateForTesting): Added.
827         * WebProcess/WebProcess.h:
828         * WebProcess/WebProcess.messages.in:
829
830 2018-12-17  David Kilzer  <ddkilzer@apple.com>
831
832         REGRESSION (r239262): Fix broken builds prior to Mojave
833         <https://bugs.webkit.org/show_bug.cgi?id=192373>
834         <rdar://problem/46462670>
835
836         * UIProcess/Cocoa/WKFullKeyboardAccessWatcher.mm:
837         Wrap header in ENABLE(ACCESSIBILITY_EVENTS) to fix the build.
838
839 2018-12-17  Daniel Bates  <dabates@apple.com>
840
841         [iOS] Remove -[WebEvent initWithKeyEventType:...:characterSet:]
842         https://bugs.webkit.org/show_bug.cgi?id=192633
843
844         Reviewed by Wenson Hsieh.
845
846         Update code to use the modern initializer.
847
848         * UIProcess/ios/WKWebEvent.mm:
849         (-[WKWebEvent initWithEvent:]):
850
851 2018-12-17  Matt Lewis  <jlewis3@apple.com>
852
853         Unreviewed, rolling out r239254.
854
855         This broke the Windows 10 Debug build
856
857         Reverted changeset:
858
859         "Replace many uses of String::format with more type-safe
860         alternatives"
861         https://bugs.webkit.org/show_bug.cgi?id=192742
862         https://trac.webkit.org/changeset/239254
863
864 2018-12-17  David Kilzer  <ddkilzer@apple.com>
865
866         clang-tidy: loop variable is copied but only used as const reference in WebCore, WebKit, Tools
867         <https://webkit.org/b/192751>
868         <rdar://problem/46771623>
869
870         Reviewed by Daniel Bates.
871
872         Change loop variables to const references to avoid unnecessary
873         copies.
874
875         * NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
876         (WebKit::WebSWServerConnection::~WebSWServerConnection):
877         * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:
878         (WebKit::RemoteLayerTreeTransaction::encode const):
879         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
880         (WebKit::toNSErrors):
881         * UIProcess/Automation/WebAutomationSession.cpp:
882         (WebKit::WebAutomationSession::setFilesToSelectForFileUpload):
883         (WebKit::WebAutomationSession::performKeyboardInteractions):
884         (WebKit::WebAutomationSession::performInteractionSequence):
885         * UIProcess/Plugins/PluginProcessManager.cpp:
886         (WebKit::PluginProcessManager::getPluginProcess):
887         * UIProcess/ResourceLoadStatisticsMemoryStore.cpp:
888         (WebKit::ResourceLoadStatisticsMemoryStore::removeDataRecords):
889         (WebKit::ResourceLoadStatisticsMemoryStore::shouldRemoveDataRecords const):
890         * UIProcess/WebPageProxy.cpp:
891         (WebKit::WebPageProxy::serializedAttachmentDataForIdentifiers):
892         * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp:
893         (WebKit::LocalStorageDatabaseTracker::deleteAllDatabases):
894         (WebKit::LocalStorageDatabaseTracker::origins const):
895         (WebKit::LocalStorageDatabaseTracker::originDetails):
896         * WebProcess/WebPage/WebPage.cpp:
897         (WebKit::m_shouldAttachDrawingAreaOnPageTransition):
898         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
899         (WebKit::TiledCoreAnimationDrawingArea::didUpdateActivityStateTimerFired):
900
901 2018-12-17  Ms2ger  <Ms2ger@igalia.com>
902
903         [GTK][WPE] Need a function to convert internal URI to display ("pretty") URI
904         https://bugs.webkit.org/show_bug.cgi?id=174816
905
906         Reviewed by Michael Catanzaro.
907
908         Add webkit_uri_for_display for GTK and WPE.
909
910         * PlatformGTK.cmake:
911         * PlatformWPE.cmake:
912         * SourcesGTK.txt:
913         * SourcesWPE.txt:
914         * UIProcess/API/glib/WebKitURIUtilities.cpp: Added.
915         (webkit_uri_for_display):
916         * UIProcess/API/gtk/WebKitURIUtilities.h: Added.
917         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
918         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
919         * UIProcess/API/gtk/webkit2.h:
920         * UIProcess/API/wpe/WebKitURIUtilities.h: Added.
921         * UIProcess/API/wpe/docs/wpe-0.1-sections.txt:
922         * UIProcess/API/wpe/docs/wpe-docs.sgml:
923         * UIProcess/API/wpe/webkit.h:
924
925 2018-12-17  Carlos Garcia Campos  <cgarcia@igalia.com>
926
927         [WPE] Add API to notify about frame displayed view backend callback
928         https://bugs.webkit.org/show_bug.cgi?id=192224
929
930         Reviewed by Michael Catanzaro.
931
932         Add API to add a callback to the view to be called when the view backend notifies that a frame has been
933         displayed.
934
935         * UIProcess/API/glib/WebKitWebView.cpp:
936         (FrameDisplayedCallback::FrameDisplayedCallback):
937         (FrameDisplayedCallback::~FrameDisplayedCallback):
938         (webkit_web_view_add_frame_displayed_callback):
939         (webkit_web_view_remove_frame_displayed_callback):
940         * UIProcess/API/wpe/WebKitWebView.h:
941         * UIProcess/API/wpe/docs/wpe-0.1-sections.txt:
942
943 2018-12-16  Chris Fleizach  <cfleizach@apple.com>
944
945         AX: Support keyboard access preference for iOS in WebKit
946         https://bugs.webkit.org/show_bug.cgi?id=192373
947         <rdar://problem/46462670>
948
949         Reviewed by Tim Horton.
950
951         * Platform/spi/ios/AccessibilitySupportSPI.h:
952         * PlatformMac.cmake:
953         * SourcesCocoa.txt:
954         * UIProcess/Cocoa/WKFullKeyboardAccessWatcher.h: Added.
955         * UIProcess/Cocoa/WKFullKeyboardAccessWatcher.mm: Added.
956         (platformIsFullKeyboardAccessEnabled):
957         (-[WKFullKeyboardAccessWatcher notifyAllProcessPools]):
958         (-[WKFullKeyboardAccessWatcher retrieveKeyboardUIModeFromPreferences:]):
959         (-[WKFullKeyboardAccessWatcher init]):
960         (+[WKFullKeyboardAccessWatcher fullKeyboardAccessEnabled]):
961         * UIProcess/ios/WebProcessProxyIOS.mm:
962         (WebKit::WebProcessProxy::fullKeyboardAccessEnabled):
963         * UIProcess/mac/WKFullKeyboardAccessWatcher.h: Removed.
964         * UIProcess/mac/WKFullKeyboardAccessWatcher.mm: Removed.
965         * WebKit.xcodeproj/project.pbxproj:
966
967 2018-12-16  Adrian Perez de Castro  <aperez@igalia.com>
968
969         Unreviewed follow up after r239260
970         https://bugs.webkit.org/show_bug.cgi?id=192714
971         <rdar://problem/46762407>
972
973         * Platform/win/SharedMemoryWin.cpp:
974         (WebKit::SharedMemory::allocate): Use PAGE_READWRITE directly instead
975         of going through the protectAttribute() function, which is removed
976         because it is now unused.
977
978 2018-12-16  Adrian Perez de Castro  <aperez@igalia.com>
979
980         Unify SharedMemory factory functions
981         https://bugs.webkit.org/show_bug.cgi?id=192714
982
983         Reviewed by Darin Adler.
984
985         This unifies SharedMemory so in the following way, across platforms:
986
987         - SharedMemory::create() is removed, to avoid ambiguity.
988         - SharedMemory::allocate() always allocates a new block of shared memory.
989         - SharedMemory::wrapMap() always creates a SharedMemory object which refers to an
990           existing region of memory resulting from memory-mapping a file.
991
992         * NetworkProcess/cache/NetworkCacheDataCocoa.mm:
993         (WebKit::NetworkCache::Data::tryCreateSharedMemory const): Use SharedMemory::wrapMap().
994         * Platform/SharedMemory.h: Remove the definition of SharedMemory::create(), and make
995         SharedMemory::wrapMap() available on OS(DARWIN) as well.
996         * Platform/cocoa/SharedMemoryCocoa.cpp:
997         (WebKit::SharedMemory::wrapMap): Renamed from ::create().
998         * Platform/unix/SharedMemoryUnix.cpp:
999         (WebKit::SharedMemory::allocate): Renamed from ::create().
1000         * Platform/win/SharedMemoryWin.cpp:
1001         (WebKit::SharedMemory::allocate): Renamed from ::create()
1002         * UIProcess/API/APIContentRuleListStore.cpp:
1003         (API::createExtension): Use NetworkCache::Data::tryCreateSharedMemory() instead of
1004         SharedMemory::create().
1005
1006 2018-12-15  Chris Fleizach  <cfleizach@apple.com>
1007
1008         [meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
1009         https://bugs.webkit.org/show_bug.cgi?id=192449
1010         <rdar://problem/46595508>
1011
1012         Reviewed by Darin Adler.
1013
1014         Part 7: Files in UIProcess/API
1015
1016         * UIProcess/API/APIContentRuleListStore.cpp:
1017         * UIProcess/API/APIHitTestResult.cpp:
1018         * UIProcess/API/APINavigation.cpp:
1019         * UIProcess/API/APIOpenPanelParameters.cpp:
1020         * UIProcess/API/APIPageConfiguration.cpp:
1021         * UIProcess/API/C/WKApplicationCacheManager.cpp:
1022         (WKApplicationCacheManagerGetTypeID):
1023         (WKApplicationCacheManagerGetApplicationCacheOrigins):
1024         (WKApplicationCacheManagerDeleteEntriesForOrigin):
1025         (WKApplicationCacheManagerDeleteAllEntries):
1026         * UIProcess/API/C/WKAuthenticationDecisionListener.cpp:
1027         (WKAuthenticationDecisionListenerGetTypeID):
1028         (WKAuthenticationDecisionListenerUseCredential):
1029         (WKAuthenticationDecisionListenerCancel):
1030         (WKAuthenticationDecisionListenerRejectProtectionSpaceAndContinue):
1031         * UIProcess/API/C/WKBackForwardListItemRef.cpp:
1032         (WKBackForwardListItemGetTypeID):
1033         (WKBackForwardListItemCopyURL):
1034         (WKBackForwardListItemCopyTitle):
1035         (WKBackForwardListItemCopyOriginalURL):
1036         * UIProcess/API/C/WKContext.cpp:
1037         (WKContextGetTypeID):
1038         (WKContextCreate):
1039         (WKContextCreateWithInjectedBundlePath):
1040         (WKContextCreateWithConfiguration):
1041         (WKContextSetClient):
1042         (WKContextSetInjectedBundleClient):
1043         (WKContextSetHistoryClient):
1044         (WKContextSetDownloadClient):
1045         (WKContextSetConnectionClient):
1046         (WKContextDownloadURLRequest):
1047         (WKContextResumeDownload):
1048         (WKContextSetInitializationUserDataForInjectedBundle):
1049         (WKContextPostMessageToInjectedBundle):
1050         (WKContextGetGlobalStatistics):
1051         (WKContextAddVisitedLink):
1052         (WKContextClearVisitedLinks):
1053         (WKContextSetCacheModel):
1054         (WKContextGetCacheModel):
1055         (WKContextSetMaximumNumberOfProcesses):
1056         (WKContextGetMaximumNumberOfProcesses):
1057         (WKContextSetAlwaysUsesComplexTextCodePath):
1058         (WKContextSetShouldUseFontSmoothing):
1059         (WKContextSetAdditionalPluginsDirectory):
1060         (WKContextRefreshPlugIns):
1061         (WKContextRegisterURLSchemeAsEmptyDocument):
1062         (WKContextRegisterURLSchemeAsSecure):
1063         (WKContextRegisterURLSchemeAsBypassingContentSecurityPolicy):
1064         (WKContextRegisterURLSchemeAsCachePartitioned):
1065         (WKContextRegisterURLSchemeAsCanDisplayOnlyIfCanRequest):
1066         (WKContextSetDomainRelaxationForbiddenForURLScheme):
1067         (WKContextSetCanHandleHTTPSServerTrustEvaluation):
1068         (WKContextSetPrewarmsProcessesAutomatically):
1069         (WKContextSetCustomWebContentServiceBundleIdentifier):
1070         (WKContextSetDiskCacheSpeculativeValidationEnabled):
1071         (WKContextPreconnectToServer):
1072         (WKContextGetCookieManager):
1073         (WKContextGetWebsiteDataStore):
1074         (WKContextGetGeolocationManager):
1075         (WKContextGetMediaSessionFocusManager):
1076         (WKContextGetNotificationManager):
1077         (WKContextStartMemorySampler):
1078         (WKContextStopMemorySampler):
1079         (WKContextAllowSpecificHTTPSCertificateForHost):
1080         (WKContextDisableProcessTermination):
1081         (WKContextEnableProcessTermination):
1082         (WKContextSetHTTPPipeliningEnabled):
1083         (WKContextWarmInitialProcess):
1084         (WKContextGetStatistics):
1085         (WKContextGetStatisticsWithOptions):
1086         (WKContextJavaScriptConfigurationFileEnabled):
1087         (WKContextSetJavaScriptConfigurationFileEnabled):
1088         (WKContextGarbageCollectJavaScriptObjects):
1089         (WKContextSetJavaScriptGarbageCollectorTimerEnabled):
1090         (WKContextUseTestingNetworkSession):
1091         (WKContextSetAllowsAnySSLCertificateForWebSocketTesting):
1092         (WKContextSetAllowsAnySSLCertificateForServiceWorkerTesting):
1093         (WKContextClearCachedCredentials):
1094         (WKContextCopyPlugInAutoStartOriginHashes):
1095         (WKContextSetPlugInAutoStartOriginHashes):
1096         (WKContextSetPlugInAutoStartOriginsFilteringOutEntriesAddedAfterTime):
1097         (WKContextSetPlugInAutoStartOrigins):
1098         (WKContextSetInvalidMessageFunction):
1099         (WKContextSetMemoryCacheDisabled):
1100         (WKContextSetFontWhitelist):
1101         (WKContextTerminateNetworkProcess):
1102         (WKContextTerminateServiceWorkerProcess):
1103         (WKContextGetNetworkProcessIdentifier):
1104         (WKContextAddSupportedPlugin):
1105         (WKContextClearSupportedPlugins):
1106         (WKContextSetIDBPerOriginQuota):
1107         * UIProcess/API/C/WKPage.cpp:
1108         (WKPageLoadURLWithShouldOpenExternalURLsPolicy):
1109         (WKPageLoadURLWithUserData):
1110         (WKPageLoadURLRequestWithUserData):
1111         (WKPageSetPaginationMode):
1112         (WKPageGetPaginationMode):
1113         (WKPageSetPageLoaderClient):
1114         (WKPageSetPagePolicyClient):
1115         * UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
1116
1117 2018-12-15  Darin Adler  <darin@apple.com>
1118
1119         Use warning-ignoring macros more consistently and simply
1120         https://bugs.webkit.org/show_bug.cgi?id=192743
1121
1122         Reviewed by Mark Lam.
1123
1124         * UIProcess/ios/WKDrawingView.mm:
1125         (-[WKDrawingView initWithEmbeddedViewID:webPageProxy:]):
1126         Use ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END.
1127         * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
1128         (-[WKFullScreenWindowController _EVOrganizationName]): Ditto.
1129
1130         * WebProcess/WebCoreSupport/WebAlternativeTextClient.h: Use
1131         IGNORE_WARNINGS_BEGIN/END instead of IGNORE_CLANG_WARNINGS_BEGIN/END
1132         because there is no need to accomodate non-clang compilers here.
1133         Also use #pragma once, add a missing "explicit", and fix conditionals.
1134
1135 2018-12-15  Darin Adler  <darin@apple.com>
1136
1137         Replace many uses of String::format with more type-safe alternatives
1138         https://bugs.webkit.org/show_bug.cgi?id=192742
1139
1140         Reviewed by Mark Lam.
1141
1142         * Shared/WebMemorySampler.cpp:
1143         (WebKit::WebMemorySampler::writeHeaders): Use makeString.
1144
1145         * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
1146         (WebKit::LocalAuthenticator::makeCredential): Use string concatentation.
1147
1148         * UIProcess/WebInspectorUtilities.cpp:
1149         (WebKit::inspectorPageGroupIdentifierForPage): Use makeString.
1150         * UIProcess/WebProcessPool.cpp:
1151         (WebKit::WebProcessPool::processDidFinishLaunching): Ditto.
1152         (WebKit::WebProcessPool::startMemorySampler): Ditto.
1153
1154 2018-12-14  Ryan Haddad  <ryanhaddad@apple.com>
1155
1156         Unreviewed, fix the build with recent SDKs.
1157
1158         * UIProcess/ios/WKDrawingView.mm:
1159         (-[WKDrawingView initWithEmbeddedViewID:webPageProxy:]):
1160
1161 2018-12-14  Jiewen Tan  <jiewen_tan@apple.com>
1162
1163         [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
1164         https://bugs.webkit.org/show_bug.cgi?id=192061
1165
1166         Reviewed by Dewei Zhu.
1167
1168         Part 2.
1169
1170         Add some additional temporary logging info. Since the failure cannot be reproduced easily by human, we have to
1171         rely on the test infrastructure to reporoduce it. Once the bug is determined and fixed, we should remove all
1172         logging added in this patch.
1173
1174         * UIProcess/WebAuthentication/Cocoa/HidService.mm:
1175         (WebKit::HidService::deviceAdded):
1176         * UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp:
1177         (WebKit::CtapHidAuthenticator::makeCredential):
1178         (WebKit::CtapHidAuthenticator::getAssertion):
1179         * UIProcess/WebAuthentication/fido/CtapHidDriver.cpp:
1180         (WebKit::CtapHidDriver::Worker::write):
1181         (WebKit::CtapHidDriver::Worker::read):
1182         (WebKit::CtapHidDriver::Worker::returnMessage):
1183         (WebKit::CtapHidDriver::transact):
1184         (WebKit::CtapHidDriver::continueAfterChannelAllocated):
1185         (WebKit::CtapHidDriver::continueAfterResponseReceived):
1186
1187 2018-12-14  Adrian Perez de Castro  <aperez@igalia.com>
1188
1189         [GTK] Unreviewed build fix.
1190
1191         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: Add missing WebPolicyAction.h include.
1192
1193 2018-12-14  Chris Dumez  <cdumez@apple.com>
1194
1195         Unreviewed, fix assertion failure in API test after r239210.
1196
1197         * WebProcess/WebPage/WebPage.cpp:
1198         (WebKit::WebPage::createDocumentLoader):
1199
1200 2018-12-14  Adrian Perez de Castro  <aperez@igalia.com>
1201
1202         [SOUP] Unreviewed build fix after r239219
1203
1204         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
1205         (WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse): Remove
1206         handling of PolicyAction::Suspend, which is no longer available.
1207
1208 2018-12-14  Joseph Pecoraro  <pecoraro@apple.com>
1209
1210         Unreviewed, apply post-landing review comments after r239221.
1211
1212         * UIProcess/WebPageDebuggable.cpp:
1213         (WebKit::WebPageDebuggable::url const):
1214         Switch to WTF::blankURL() instead of using "about:blank" directly.
1215
1216 2018-12-14  Chris Dumez  <cdumez@apple.com>
1217
1218         [PSON] Process-swapping on a loadHTMLString causes duplicate decidePolicyForNavigationAction delegate calls
1219         https://bugs.webkit.org/show_bug.cgi?id=192704
1220
1221         Reviewed by Geoffrey Garen.
1222
1223         Process-swapping on a loadHTMLString causes duplicate decidePolicyForNavigationAction delegate calls. This
1224         is because we were failing to pass the ShouldTreatAsContinuingLoad flag to the WebContent process when
1225         doing a LoadData.
1226
1227         * UIProcess/WebPageProxy.cpp:
1228         (WebKit::WebPageProxy::loadData):
1229         (WebKit::WebPageProxy::loadDataWithNavigation):
1230         (WebKit::WebPageProxy::continueNavigationInNewProcess):
1231         * UIProcess/WebPageProxy.h:
1232         * WebProcess/WebPage/WebPage.cpp:
1233         (WebKit::WebPage::loadDataImpl):
1234         (WebKit::WebPage::loadData):
1235         (WebKit::WebPage::loadAlternateHTML):
1236         * WebProcess/WebPage/WebPage.h:
1237
1238 2018-12-14  Joseph Pecoraro  <pecoraro@apple.com>
1239
1240         Web Inspector: Prefer "about:blank" instead of an empty string for WebPageDebuggable url
1241         https://bugs.webkit.org/show_bug.cgi?id=192691
1242         <rdar://problem/46719798>
1243
1244         Reviewed by Darin Adler.
1245
1246         * UIProcess/WebPageDebuggable.cpp:
1247         (WebKit::WebPageDebuggable::url const):
1248         Instead of an empty string, return "about:blank" in bail cases.
1249         When inspecting the page that matches the contents.
1250
1251 2018-12-14  Chris Dumez  <cdumez@apple.com>
1252
1253         [PSON] Stop exposing PolicyAction::Suspend to WebCore
1254         https://bugs.webkit.org/show_bug.cgi?id=192701
1255
1256         Reviewed by Brady Eidson.
1257
1258         Introduce a new WebPolicyAction enum that is used at WebKit2 layer and augments
1259         WebCore::PolicyAction with a "Suspend" value.
1260
1261         * NetworkProcess/NetworkDataTaskBlob.cpp:
1262         (WebKit::NetworkDataTaskBlob::dispatchDidReceiveResponse):
1263         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1264         (toNSURLSessionResponseDisposition):
1265         * Shared/WebPolicyAction.h: Added.
1266         * UIProcess/WebFramePolicyListenerProxy.cpp:
1267         (WebKit::WebFramePolicyListenerProxy::didReceiveSafeBrowsingResults):
1268         (WebKit::WebFramePolicyListenerProxy::use):
1269         (WebKit::WebFramePolicyListenerProxy::download):
1270         (WebKit::WebFramePolicyListenerProxy::ignore):
1271         * UIProcess/WebFramePolicyListenerProxy.h:
1272         * UIProcess/WebFrameProxy.cpp:
1273         (WebKit::WebFrameProxy::setUpPolicyListenerProxy):
1274         * UIProcess/WebFrameProxy.h:
1275         * UIProcess/WebPageProxy.cpp:
1276         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
1277         (WebKit::WebPageProxy::receivedPolicyDecision):
1278         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1279         (WebKit::WebPageProxy::decidePolicyForNavigationActionSync):
1280         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
1281         (WebKit::WebPageProxy::decidePolicyForResponse):
1282         * UIProcess/WebPageProxy.h:
1283         * UIProcess/WebPageProxy.messages.in:
1284         * WebKit.xcodeproj/project.pbxproj:
1285         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1286         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
1287         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1288         * WebProcess/WebPage/WebFrame.cpp:
1289         (WebKit::toPolicyAction):
1290         (WebKit::WebFrame::didReceivePolicyDecision):
1291         * WebProcess/WebPage/WebFrame.h:
1292         * WebProcess/WebPage/WebPage.cpp:
1293         (WebKit::WebPage::didReceivePolicyDecision):
1294         * WebProcess/WebPage/WebPage.h:
1295         * WebProcess/WebPage/WebPage.messages.in:
1296
1297 2018-12-14  David Quesada  <david_quesada@apple.com>
1298
1299         Remove a global 'using namespace WebKit' in WebViewImpl.mm
1300         https://bugs.webkit.org/show_bug.cgi?id=192690
1301
1302         Reviewed by Tim Horton.
1303
1304         * UIProcess/Cocoa/WebViewImpl.mm:
1305         (-[WKTextListTouchBarViewController initWithWebViewImpl:]):
1306         (-[WKTextListTouchBarViewController _selectList:]):
1307         (-[WKTextListTouchBarViewController setCurrentListType:]):
1308         (-[WKTextTouchBarItemController initWithWebViewImpl:]):
1309
1310 2018-12-14  Chris Dumez  <cdumez@apple.com>
1311
1312         [PSON] WebsitePolicies are lost on process-swap
1313         https://bugs.webkit.org/show_bug.cgi?id=192694
1314         <rdar://problem/46715748>
1315
1316         Reviewed by Brady Eidson.
1317
1318         In case of process-swap on navigation, instead of sending the websitePolicies to the old
1319         process, send them to the new process as we trigger the navigation. We tell the new process
1320         that it is continuing a load and it will therefore not re-trigger a decidePolicyForNavigationAction.
1321
1322         * Shared/LoadParameters.cpp:
1323         (WebKit::LoadParameters::encode const):
1324         (WebKit::LoadParameters::decode):
1325         * Shared/LoadParameters.h:
1326         * UIProcess/WebPageProxy.cpp:
1327         (WebKit::WebPageProxy::reattachToWebProcessForReload):
1328         (WebKit::WebPageProxy::reattachToWebProcessWithItem):
1329         (WebKit::WebPageProxy::loadRequestWithNavigation):
1330         (WebKit::WebPageProxy::loadDataWithNavigation):
1331         (WebKit::WebPageProxy::goToBackForwardItem):
1332         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
1333         (WebKit::WebPageProxy::continueNavigationInNewProcess):
1334         * UIProcess/WebPageProxy.h:
1335         * WebProcess/WebPage/WebPage.cpp:
1336         (WebKit::WebPage::loadRequest):
1337         (WebKit::WebPage::loadDataImpl):
1338         (WebKit::WebPage::loadData):
1339         (WebKit::WebPage::loadAlternateHTML):
1340         (WebKit::WebPage::goToBackForwardItem):
1341         (WebKit::WebPage::createDocumentLoader):
1342         * WebProcess/WebPage/WebPage.h:
1343         * WebProcess/WebPage/WebPage.messages.in:
1344
1345 2018-12-14  Patrick Griffis  <pgriffis@igalia.com>
1346
1347         [GTK][WPE] Fix forwarding webkit socket to flatpak sandbox
1348         https://bugs.webkit.org/show_bug.cgi?id=192622
1349
1350         Reviewed by Michael Catanzaro.
1351
1352         This fixes running with the sandbox enabled in Flatpak.
1353
1354         * UIProcess/Launcher/glib/FlatpakLauncher.cpp:
1355         (WebKit::flatpakSpawn):
1356         * UIProcess/Launcher/glib/FlatpakLauncher.h:
1357         * UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:
1358         (WebKit::ProcessLauncher::launchProcess):
1359
1360 2018-12-14  Carlos Garcia Campos  <cgarcia@igalia.com>
1361
1362         [WPE] Use new view state API from libwpe
1363         https://bugs.webkit.org/show_bug.cgi?id=191906
1364
1365         Reviewed by Žan Doberšek.
1366
1367         Remove WKViewSetViewState from the C API.
1368
1369         * UIProcess/API/C/wpe/WKAPICastWPE.h:
1370         * UIProcess/API/C/wpe/WKView.cpp:
1371         * UIProcess/API/C/wpe/WKView.h:
1372         * UIProcess/API/wpe/WPEView.cpp:
1373         (WKWPE::View::View): Add implementation for activity_state_changed vfunc of the view backend client.):
1374         (WKWPE::View::setViewState): Remove the default flags.
1375         * UIProcess/API/wpe/WPEView.h:
1376         (WKWPE::View::setViewState const): Make it private.
1377
1378 2018-12-13  Joseph Pecoraro  <pecoraro@apple.com>
1379
1380         [iOS] Web Inspector: Occasional UIProcess crashes under WebPageProxy::showInspectorIndication
1381         https://bugs.webkit.org/show_bug.cgi?id=192689
1382         <rdar://problem/46323610>
1383
1384         Reviewed by Simon Fraser.
1385
1386         * UIProcess/WebPageProxy.cpp:
1387         (WebKit::WebPageProxy::close):
1388         * UIProcess/WebPageProxy.h:
1389         Don't wait until ~WebPageProxy to destroy the WebPageProxyDebuggable
1390         which broadcasts it as a remote inspector target. Terminate this
1391         as soon as the WebPageProxy closes and becomes invalid.
1392
1393 2018-12-13  Chris Dumez  <cdumez@apple.com>
1394
1395         Unreviewed build fix for tvOS.
1396
1397         * Platform/cocoa/WKCrashReporter.mm:
1398
1399 2018-12-13  Chris Dumez  <cdumez@apple.com>
1400
1401         Unreviewed build fix for tvOS.
1402
1403         * Platform/cocoa/WKCrashReporter.mm:
1404
1405 2018-12-13  Chris Dumez  <cdumez@apple.com>
1406
1407         [PSON] We should not need to navigate to 'about:blank' to suspend pages
1408         https://bugs.webkit.org/show_bug.cgi?id=192668
1409         <rdar://problem/46701466>
1410
1411         Reviewed by Alex Christensen.
1412
1413         To support PageCache when process-swap on cross-site navigation is enabled,
1414         we've been navigating the previous process to 'about:blank' when swapping.
1415         This would trigger PageCaching of the page in the old process. While
1416         convenient, this design has led to a lot of bugs because we did not really
1417         want a navigation to happen in the old process.
1418
1419         To address the issue, when a WebPage is asked to suspend (for process-swap),
1420         we now attempt to add it to PageCache and save it on the current HistoryItem,
1421         *without* triggering any navigation. Any pending navigation gets cancelled
1422         and we just suspend in place.
1423
1424         Later on, when we want to go back to this HistoryItem, we simply leverage the
1425         existing WebPage::goToBackForwardItem() code path. The only subtlety is that
1426         we're actually asking the WebPage to load a HistoryItem that is the current
1427         one in the History. I had to tweak a some logic / assertions to support this
1428         as this is not something we usually do. However, it actually works with very
1429         little changes and successfully restores the PageCache entry on the current
1430         HistoryItem.
1431
1432         There is no expected overall behavior change and ProcessSwap API tests (which
1433         cover PageCache) still pass. This is merely a simpler design because it avoids
1434         navigating to about:blank.
1435
1436         * UIProcess/SuspendedPageProxy.cpp:
1437         (WebKit::SuspendedPageProxy::didSuspend):
1438         (WebKit::SuspendedPageProxy::didReceiveMessage):
1439         * UIProcess/SuspendedPageProxy.h:
1440         * UIProcess/WebPageProxy.cpp:
1441         (WebKit::WebPageProxy::didSuspendAfterProcessSwap):
1442         * UIProcess/WebPageProxy.h:
1443         * UIProcess/WebPageProxy.messages.in:
1444         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1445         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
1446         * WebProcess/WebPage/WebDocumentLoader.cpp:
1447         (WebKit::WebDocumentLoader::setNavigationID):
1448         * WebProcess/WebPage/WebFrame.cpp:
1449         (WebKit::WebFrame::didReceivePolicyDecision):
1450         * WebProcess/WebPage/WebPage.cpp:
1451         (WebKit::WebPage::suspendForProcessSwap):
1452         * WebProcess/WebPage/WebPage.h:
1453         * WebProcess/cocoa/WebProcessCocoa.mm:
1454         (WebKit::origin):
1455
1456 2018-12-13  Per Arne Vollan  <pvollan@apple.com>
1457
1458         [macOS] Remove with-report from 3 services that are currently needed on macOS
1459         https://bugs.webkit.org/show_bug.cgi?id=192593
1460         <rdar://problem/46604752>
1461
1462         Reviewed by Brent Fulgham.
1463
1464         * WebProcess/com.apple.WebProcess.sb.in:
1465
1466 2018-12-13  Youenn Fablet  <youenn@apple.com>
1467
1468         On page close, WebPage::m_userMediaPermissionRequestManager is nullified too early
1469         https://bugs.webkit.org/show_bug.cgi?id=192657
1470
1471         Reviewed by Eric Carlson.
1472
1473         Instead of nullifying the manager, make it a UniqueRef and clear it on closing the page.
1474         This ensures we revoke the sandbox extensions as early as possible and keep the manager lifetime simple.
1475
1476         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
1477         (WebKit::UserMediaPermissionRequestManager::~UserMediaPermissionRequestManager):
1478         (WebKit::UserMediaPermissionRequestManager::clear):
1479         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
1480         * WebProcess/WebPage/WebPage.cpp:
1481         (WebKit::WebPage::close):
1482         * WebProcess/WebPage/WebPage.h:
1483         (WebKit::WebPage::userMediaPermissionRequestManager):
1484
1485 2018-12-13  Chris Fleizach  <cfleizach@apple.com>
1486
1487         [meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
1488         https://bugs.webkit.org/show_bug.cgi?id=192449
1489         <rdar://problem/46595508>
1490
1491         Reviewed by Darin Adler.
1492
1493         Part 6: Files in plugin process and UI process.
1494
1495         * PluginProcess/PluginControllerProxy.cpp:
1496         * PluginProcess/PluginProcess.cpp:
1497         * PluginProcess/WebProcessConnection.cpp:
1498         * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
1499         * UIProcess/WebStorage/LocalStorageDatabase.cpp:
1500         * UIProcess/mac/WebPageProxyMac.mm:
1501
1502 2018-12-13  Eric Carlson  <eric.carlson@apple.com>
1503
1504         [MediaStream] Calculate width or height when constraints contain only the other
1505         https://bugs.webkit.org/show_bug.cgi?id=192632
1506         <rdar://problem/46665734>
1507
1508         Reviewed by Youenn Fablet.
1509
1510         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
1511         (WebKit::UserMediaCaptureManagerProxy::SourceProxy::remoteVideoSampleAvailable): Deleted,
1512         replaced with videoSampleAvailable.
1513
1514         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
1515         (WebKit::UserMediaCaptureManager::Source::remoteVideoSampleAvailable): Use original frame
1516         size if necessary when calculating new frame size.
1517
1518 2018-12-12  Chris Fleizach  <cfleizach@apple.com>
1519
1520         [meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
1521         https://bugs.webkit.org/show_bug.cgi?id=192449
1522         <rdar://problem/46595508>
1523
1524         Reviewed by Darin Adler.
1525
1526         Part 5: Files in WebProcess folder.
1527
1528         * WebProcess/Cache/WebCacheStorageConnection.cpp:
1529         * WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:
1530         (mediaTimeToCurrentTime):
1531         (-[WKAnimationDelegate initWithLayerID:layerTreeHost:]):
1532         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
1533         (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
1534
1535 2018-12-12  Ross Kirsling  <ross.kirsling@sony.com>
1536
1537         [MSVC] Unreviewed build fix for r239080.
1538
1539         * UIProcess/WebPageProxy.cpp:
1540         (WebKit::WebPageProxy::didFailToSuspendAfterProcessSwap):
1541
1542 2018-12-12  Chris Fleizach  <cfleizach@apple.com>
1543
1544         [meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
1545         https://bugs.webkit.org/show_bug.cgi?id=192449
1546         <rdar://problem/46595508>
1547
1548         Reviewed by Darin Adler.
1549
1550         Part 4: Handling NetworkProcess folder.
1551
1552         * NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
1553         * NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:
1554         * NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
1555         * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
1556         * NetworkProcess/ios/NetworkProcessIOS.mm:
1557         * NetworkProcess/mac/NetworkProcessMac.mm:
1558         * NetworkProcess/mac/RemoteNetworkingContext.mm:
1559
1560 2018-12-12  Chris Fleizach  <cfleizach@apple.com>
1561
1562         [meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
1563         https://bugs.webkit.org/show_bug.cgi?id=192449
1564         <rdar://problem/46595508>
1565
1566         Reviewed by Tim Horton.
1567
1568         Fix iosmac build.
1569
1570         * UIProcess/ios/WKContentViewInteraction.mm:
1571         (-[WKContentView _hoverGestureRecognizerChanged:]):
1572
1573 2018-12-12  Alex Christensen  <achristensen@webkit.org>
1574
1575         Implement safe browsing in WebKit on WatchOS
1576         https://bugs.webkit.org/show_bug.cgi?id=192641
1577         <rdar://problem/46376188>
1578
1579         Reviewed by Geoff Garen.
1580
1581         WatchOS has a few special requirements:
1582         1. The margin size needs to be smaller and the title font smaller to fit on the screen.
1583         2. The exclamation point cannot be beside the title or it won't fit on the screen.  I put it above the title.
1584         3. The application must be told when the safe browsing warning has been shown.  I added a new delegate callback.
1585         4. The UIScrollView's contentSize must be set even before the details are shown to be able to scroll down to the buttons.
1586            This was already an issue on small WKWebViews on iOS, so this fixes both operating systems.
1587
1588         * Configurations/WebKit.xcconfig:
1589         * UIProcess/API/APIUIClient.h:
1590         (API::UIClient::didShowSafeBrowsingWarning):
1591         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1592         * UIProcess/Cocoa/UIDelegate.h:
1593         * UIProcess/Cocoa/UIDelegate.mm:
1594         (WebKit::UIDelegate::setDelegate):
1595         (WebKit::UIDelegate::UIClient::didShowSafeBrowsingWarning):
1596         * UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
1597         (fontOfSize):
1598         (buttonSize):
1599         (-[WKSafeBrowsingWarning addContent]):
1600         (-[WKSafeBrowsingWarning showDetailsClicked]):
1601         (-[WKSafeBrowsingWarning updateContentSize]):
1602         (buttonWidth): Deleted.
1603         * UIProcess/WebPageProxy.cpp:
1604         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1605
1606 2018-12-12  Commit Queue  <commit-queue@webkit.org>
1607
1608         Unreviewed, rolling out r239129 and r239131.
1609         https://bugs.webkit.org/show_bug.cgi?id=192646
1610
1611         Casued macOS and iOS Debug testing to fail early (Requested by
1612         Truitt on #webkit).
1613
1614         Reverted changesets:
1615
1616         "Unreviewed build fix for WinCairo Debug after r239080(?)."
1617         https://trac.webkit.org/changeset/239129
1618
1619         "Unreviewed fix for Cocoa Debug test instability following
1620         r239129."
1621         https://trac.webkit.org/changeset/239131
1622
1623 2018-12-12  Vivek Seth  <v_seth@apple.com>
1624
1625         HTTPS Upgrade: Figure out if/how to tell clients that the HTTPS upgrade happened
1626         https://bugs.webkit.org/show_bug.cgi?id=192375
1627         <rdar://problem/45851159>
1628
1629         Reviewed by Chris Dumez.
1630
1631         Use simulated redirect to tell clients that HTTPS Upgrade happened.
1632
1633         * NetworkProcess/NetworkLoadChecker.cpp:
1634         (WebKit::NetworkLoadChecker::NetworkLoadChecker):
1635         (WebKit::NetworkLoadChecker::checkRedirection):
1636         (WebKit::NetworkLoadChecker::accessControlErrorForValidationHandler):
1637         (WebKit::NetworkLoadChecker::applyHTTPSUpgradeIfNeeded const):
1638         (WebKit::NetworkLoadChecker::checkRequest):
1639         (WebKit::NetworkLoadChecker::continueCheckingRequestOrDoSyntheticRedirect):
1640         (WebKit::NetworkLoadChecker::checkCORSRequestWithPreflight):
1641         (WebKit::NetworkLoadChecker::applyHTTPSUpgradeIfNeeded): Deleted.
1642         * NetworkProcess/NetworkLoadChecker.h:
1643         * NetworkProcess/NetworkResourceLoader.cpp:
1644         (WebKit::NetworkResourceLoader::start):
1645         * NetworkProcess/PingLoad.cpp:
1646
1647 2018-12-12  Ross Kirsling  <ross.kirsling@sony.com>
1648
1649         Unreviewed fix for Cocoa Debug test instability following r239129.
1650
1651         * UIProcess/WebPageProxy.cpp:
1652         (WebKit::WebPageProxy::didFailToSuspendAfterProcessSwap): Deleted.
1653         * UIProcess/WebPageProxy.h:
1654         (WebKit::WebPageProxy::didFailToSuspendAfterProcessSwap):
1655         Move the whole assertion to the declaration site.
1656
1657 2018-12-12  Chris Dumez  <cdumez@apple.com>
1658
1659         Add a preference to enable / disable devicemotion and deviceorientation events
1660         https://bugs.webkit.org/show_bug.cgi?id=192631
1661         <rdar://problem/46646244>
1662
1663         Reviewed by Geoffrey Garen.
1664
1665         Add setting to toggle support for the deviceorientation / devicemotion events:
1666         - https://w3c.github.io/deviceorientation/
1667
1668         * Shared/WebPreferences.yaml:
1669         * UIProcess/API/Cocoa/WKPreferences.mm:
1670         (-[WKPreferences _setDeviceOrientationEventEnabled:]):
1671         (-[WKPreferences _deviceOrientationEventEnabled]):
1672         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1673
1674 2018-12-12  Ross Kirsling  <ross.kirsling@sony.com>
1675
1676         Unreviewed build fix for WinCairo Debug after r239080(?).
1677
1678         MSVC gives a redefinition error if noreturn is specified on the definition instead of the declaration.
1679
1680         * UIProcess/WebPageProxy.cpp:
1681         (WebKit::WebPageProxy::didFailToSuspendAfterProcessSwap):
1682         * UIProcess/WebPageProxy.h:
1683         Move NO_RETURN_DUE_TO_ASSERT to the declaration site.
1684
1685 2018-12-12  Chris Fleizach  <cfleizach@apple.com>
1686
1687         [meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
1688         https://bugs.webkit.org/show_bug.cgi?id=192449
1689         <rdar://problem/46595508>
1690
1691         Reviewed by Darin Adler.
1692
1693         Part 2: UIProcess/Cocoa and UIProcess/ios folders.
1694
1695         * UIProcess/Cocoa/WebViewImpl.h:
1696         * UIProcess/Cocoa/WebViewImpl.mm:
1697         * UIProcess/ios/WKContentView.mm:
1698         (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
1699         (-[WKContentView initWithFrame:processPool:configuration:webView:]):
1700         (-[WKContentView dealloc]):
1701         (-[WKContentView page]):
1702         (-[WKContentView updateFixedClippingView:]):
1703         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
1704         (-[WKContentView _updateForScreen:]):
1705         (-[WKContentView _accessibilityRegisterUIProcessTokens]):
1706         (-[WKContentView _createDrawingAreaProxy]):
1707         (-[WKContentView _didCommitLayerTree:]):
1708         (-[WKContentView _wk_pageCountForPrintFormatter:]):
1709         * UIProcess/ios/WKContentViewInteraction.mm:
1710         (-[WKFocusedElementInfo initWithAssistedNodeInformation:isUserInitiated:userObject:]):
1711         (hasAssistedNode):
1712         (-[WKContentView setupInteraction]):
1713         (-[WKContentView positionInformation]):
1714         (-[WKContentView _webTouchEventsRecognized:]):
1715         (inflateQuad):
1716         (-[WKContentView _updateTapHighlight]):
1717         (-[WKContentView _showTapHighlight]):
1718         (-[WKContentView _requiresKeyboardWhenFirstResponder]):
1719         (-[WKContentView _displayFormNodeInputView]):
1720         (-[WKContentView inputView]):
1721         (-[WKContentView _actionForLongPressFromPositionInformation:]):
1722         (-[WKContentView currentPositionInformation]):
1723         (-[WKContentView doAfterPositionInformationUpdate:forRequest:]):
1724         (-[WKContentView _currentPositionInformationIsValidForRequest:]):
1725         (-[WKContentView _hasValidOutstandingPositionInformationRequest:]):
1726         (-[WKContentView _currentPositionInformationIsApproximatelyValidForRequest:]):
1727         (-[WKContentView gestureRecognizerShouldBegin:]):
1728         (-[WKContentView hasSelectablePositionAtPoint:]):
1729         (-[WKContentView pointIsNearMarkedText:]):
1730         (-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
1731         (-[WKContentView webSelectionRectsForSelectionRects:]):
1732         (-[WKContentView _twoFingerSingleTapGestureRecognized:]):
1733         (-[WKContentView _stylusSingleTapRecognized:]):
1734         (-[WKContentView _singleTapCommited:]):
1735         (-[WKContentView _attemptClickAtLocation:]):
1736         (-[WKContentView _positionInformationDidChange:]):
1737         (-[WKContentView requiresAccessoryView]):
1738         (-[WKContentView supportedPasteboardTypesForCurrentSelection]):
1739         (-[WKContentView _lookupForWebView:]):
1740         (-[WKContentView _shareForWebView:]):
1741         (-[WKContentView textStylingAtPosition:inDirection:]):
1742         (-[WKContentView canPerformActionForWebView:withSender:]):
1743         (-[WKContentView selectForWebView:]):
1744         (-[WKContentView _accessibilityRetrieveRectsEnclosingSelectionOffset:withGranularity:]):
1745         (-[WKContentView _accessibilityRetrieveRectsAtSelectionOffset:withText:completionHandler:]):
1746         (toGestureType):
1747         (toUIWKGestureType):
1748         (toSelectionTouch):
1749         (toUIWKSelectionTouch):
1750         (toGestureRecognizerState):
1751         (toUIGestureRecognizerState):
1752         (toUIWKSelectionFlags):
1753         (toWKTextGranularity):
1754         (toWKSelectionDirection):
1755         (selectionChangedWithGesture):
1756         (selectionChangedWithTouch):
1757         (-[WKContentView changeSelectionWithGestureAt:withGesture:withState:withFlags:]):
1758         (-[WKContentView autocorrectionData]):
1759         (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
1760         (-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
1761         (-[WKContentView _updateAccessory]):
1762         (-[WKContentView selectedTextRange]):
1763         (-[WKContentView setMarkedText:selectedRange:]):
1764         (coreWritingDirection):
1765         (-[WKContentView closestPositionToPoint:]):
1766         (-[WKContentView insertText:]):
1767         (-[WKContentView textInputTraits]):
1768         (-[WKContentView handleKeyWebEvent:]):
1769         (-[WKContentView handleKeyWebEvent:withCompletionHandler:]):
1770         (-[WKContentView isScrollableForKeyboardScrollViewAnimator:]):
1771         (-[WKContentView keyboardScrollViewAnimator:distanceForIncrement:]):
1772         (-[WKContentView assistedNodeInformation]):
1773         (-[WKContentView assistedNodeSelectOptions]):
1774         (isAssistableInputType):
1775         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
1776         (-[WKContentView _stopAssistingNode]):
1777         (-[WKContentView updateCurrentAssistedNodeInformation:]):
1778         (-[WKContentView presentViewControllerForCurrentAssistedNode]):
1779         (-[WKContentView actionNameForFocusedFormControlView:]):
1780         (-[WKContentView selectWordForReplacement]):
1781         (-[WKContentView _updateChangedSelection:]):
1782         (-[WKContentView _beginSuppressingSelectionAssistantForReason:]):
1783         (-[WKContentView _stopSuppressingSelectionAssistantForReason:]):
1784         (-[WKContentView _showPlaybackTargetPicker:fromRect:routeSharingPolicy:routingContextUID:]):
1785         (-[WKContentView _showRunOpenPanel:resultListener:]):
1786         (-[WKContentView _showShareSheet:completionHandler:]):
1787         (-[WKContentView positionInformationForActionSheetAssistant:]):
1788         (-[WKContentView updatePositionInformationForActionSheetAssistant:]):
1789         (-[WKContentView _startDrag:item:]):
1790         (-[WKContentView _didHandleAdditionalDragItemsRequest:]):
1791         (-[WKContentView _didHandleStartDataInteractionRequest:]):
1792         (dropOperationForWebCoreDragOperation):
1793         (-[WKContentView dragDataForDropSession:dragDestinationAction:]):
1794         (-[WKContentView _didConcludeEditDataInteraction:]):
1795         (-[WKContentView _didPerformDragOperation:]):
1796         (-[WKContentView _prepareToDragPromisedAttachment:]):
1797         (-[WKContentView _itemsForBeginningOrAddingToSessionWithRegistrationList:stagedDragSource:]):
1798         (-[WKContentView _autofillContext]):
1799         (-[WKContentView _dragInteraction:itemsForAddingToSession:withTouchAtPoint:completion:]):
1800         (-[WKContentView _dragInteraction:prepareForSession:completion:]):
1801         (-[WKContentView dragInteraction:itemsForBeginningSession:]):
1802         (-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
1803         (-[WKContentView dragInteraction:session:didEndWithOperation:]):
1804         (-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
1805         (-[WKContentView dropInteraction:performDrop:]):
1806         (-[WKContentView dropInteraction:sessionDidEnd:]):
1807         (-[WKContentView allowsLanguageSelectionMenuForListViewController:]):
1808         (-[WKContentView shouldDisplayInputContextViewForListViewController:]):
1809         (-[WKContentView numericInputModeForListViewController:]):
1810         (-[WKContentView textContentTypeForListViewController:]):
1811         (-[WKContentView allowsDictationInputForListViewController:]):
1812         (-[WKContentView _simulateLongPressActionAtLocation:]):
1813         (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
1814         (-[WKContentView _presentationRectsForPreviewItemController:]):
1815         * UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
1816         (WKFullScreenViewControllerPlaybackSessionModelClient::setInterface):
1817         (WKFullScreenViewControllerVideoFullscreenModelClient::setInterface):
1818         (WKFullScreenViewControllerVideoFullscreenModelClient::interface const):
1819         (-[WKFullScreenViewController videoControlsManagerDidChange]):
1820         (-[WKFullScreenViewController _manager]):
1821         (-[WKFullScreenViewController _togglePiPAction:]):
1822         * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
1823         (-[WKFullscreenAnimationController configureInitialAndFinalStatesForTransition:]):
1824         (-[WKFullScreenWindowController isFullScreen]):
1825         (-[WKFullScreenWindowController enterFullScreen]):
1826         (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
1827         (-[WKFullScreenWindowController exitFullScreen]):
1828         (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
1829         (-[WKFullScreenWindowController _completedExitFullScreen]):
1830         (-[WKFullScreenWindowController webViewDidRemoveFromSuperviewWhileInFullscreen]):
1831         (-[WKFullScreenWindowController _exitFullscreenImmediately]):
1832         (-[WKFullScreenWindowController _manager]):
1833
1834 2018-12-12  Chris Fleizach  <cfleizach@apple.com>
1835
1836         [meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
1837         https://bugs.webkit.org/show_bug.cgi?id=192449
1838         <rdar://problem/46595508>
1839
1840         Reviewed by Darin Adler.
1841
1842         Part 1: Files in Shared folder.
1843
1844         * Shared/API/c/WKRenderLayer.cpp:
1845         (WKRenderLayerGetFrameContentsLayer):
1846         * Shared/API/c/cf/WKErrorCF.cpp:
1847         (WKErrorCreateWithCFError):
1848         (WKErrorCopyCFError):
1849         * Shared/API/c/cg/WKImageCG.cpp:
1850         (WKImageCreateCGImage):
1851         (WKImageCreateFromCGImage):
1852         * Shared/API/c/mac/WKWebArchive.cpp:
1853         (WKWebArchiveGetTypeID):
1854         (WKWebArchiveCreate):
1855         (WKWebArchiveCreateWithData):
1856         (WKWebArchiveCreateFromRange):
1857         (WKWebArchiveCopyMainResource):
1858         (WKWebArchiveCopySubresources):
1859         (WKWebArchiveCopySubframeArchives):
1860         (WKWebArchiveCopyData):
1861         * Shared/API/c/mac/WKWebArchiveResource.cpp:
1862         (WKWebArchiveResourceGetTypeID):
1863         (WKWebArchiveResourceCreate):
1864         (WKWebArchiveResourceCopyData):
1865         (WKWebArchiveResourceCopyURL):
1866         (WKWebArchiveResourceCopyMIMEType):
1867         (WKWebArchiveResourceCopyTextEncoding):
1868         * Shared/ChildProcess.cpp:
1869         * Shared/ContextMenuContextData.cpp:
1870         * Shared/EditorState.cpp:
1871         * Shared/Plugins/NPIdentifierData.cpp:
1872         * Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
1873         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
1874         * Shared/SessionState.cpp:
1875         * Shared/SessionTracker.cpp:
1876         * Shared/ShareableBitmap.cpp:
1877         * Shared/ShareableResource.cpp:
1878         * Shared/VisibleContentRectUpdateInfo.cpp:
1879         * Shared/WebBackForwardListItem.cpp:
1880         * Shared/WebContextMenuItemData.cpp:
1881         * Shared/WebCoreArgumentCoders.cpp:
1882         * Shared/WebHitTestResultData.cpp:
1883         * Shared/WebImage.cpp:
1884         * Shared/WebMediaSessionMetadata.cpp:
1885         * Shared/WebMemorySampler.cpp:
1886         * Shared/WebMouseEvent.cpp:
1887         * Shared/WebRenderObject.cpp:
1888         * Shared/WebSQLiteDatabaseTracker.cpp:
1889         * Shared/WebWheelEvent.cpp:
1890         * Shared/cf/ArgumentCodersCF.cpp:
1891         * Shared/ios/WebPlatformTouchPointIOS.cpp:
1892
1893 2018-12-12  Chris Fleizach  <cfleizach@apple.com>
1894
1895         [meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
1896         https://bugs.webkit.org/show_bug.cgi?id=192449
1897         <rdar://problem/46595508>
1898
1899         Reviewed by Darin Adler.
1900
1901         Part 1: Files in NetworkProcess.
1902
1903         * NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
1904         * NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:
1905         * NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
1906         * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
1907         * NetworkProcess/ios/NetworkProcessIOS.mm:
1908         * NetworkProcess/mac/NetworkProcessMac.mm:
1909         * NetworkProcess/mac/RemoteNetworkingContext.mm:
1910
1911 2018-12-12  Chris Dumez  <cdumez@apple.com>
1912
1913         Unreviewed build with with recent macOS SDKs.
1914
1915         * Platform/cocoa/WKCrashReporter.mm:
1916
1917 2018-12-12  Chris Dumez  <cdumez@apple.com>
1918
1919         Unreviewed attempt to fix GTK build after r239104.
1920
1921         * UIProcess/WebPageProxy.cpp:
1922         (WebKit::WebPageProxy::performDragControllerAction):
1923
1924 2018-12-12  Chris Dumez  <cdumez@apple.com>
1925
1926         Unreviewed attempt to fix build with older SDKs after r239110.
1927
1928         * Platform/cocoa/WKCrashReporter.mm:
1929
1930 2018-12-12  Chris Dumez  <cdumez@apple.com>
1931
1932         Unreviewed, fix build with recent SDKs.
1933
1934         * Platform/cocoa/WKCrashReporter.mm:
1935
1936 2018-12-09  Darin Adler  <darin@apple.com>
1937
1938         [iOS] Zero memory containing the password for PDF documents when a WKPDFView is deallocated
1939         https://bugs.webkit.org/show_bug.cgi?id=192536
1940         rdar://problem/41174451
1941
1942         Reviewed by Tim Horton.
1943
1944         * UIProcess/ios/WKPDFView.mm: Took out PLATFORM(IOSMAC) since
1945         this class is not compiled on that platform at this time. Can always
1946         add it back later.
1947         (-[WKPDFView dealloc]): Zero out characters of _passwordForPrinting.
1948         (-[WKPDFView pdfHostViewController:documentDidUnlockWithPassword:]):
1949         Initialize _passwordForPrinting; use a CString instead of retaining
1950         an NSString since we can zero that out easily.
1951         (-[WKPDFView _ensureDocumentForPrinting]): Use _passwordForPrinting.
1952
1953 2018-12-12  Commit Queue  <commit-queue@webkit.org>
1954
1955         Unreviewed, rolling out r239103.
1956         https://bugs.webkit.org/show_bug.cgi?id=192627
1957
1958         It broke the built because it depends on another patch that
1959         didn't land yet (Requested by KaL on #webkit).
1960
1961         Reverted changeset:
1962
1963         "[WPE] Add API to notify about frame displayed view backend
1964         callback"
1965         https://bugs.webkit.org/show_bug.cgi?id=192224
1966         https://trac.webkit.org/changeset/239103
1967
1968 2018-12-12  Chris Dumez  <cdumez@apple.com>
1969
1970         Restore MESSAGE_CHECK_URL() security check on sourceURL in didPerformClientRedirect()
1971         https://bugs.webkit.org/show_bug.cgi?id=191982
1972         <rdar://problem/46258054>
1973
1974         Reviewed by Alex Christensen.
1975
1976         Have the WebPageProxy remember the local paths it previously visited so that the
1977         MESSAGE_CHECK_URL() checks still work when process-swap on navigation is enabled.
1978
1979         Add back MESSAGE_CHECK_URL() on sourceURL in didPerformClientRedirect().
1980
1981         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
1982         (WebKit::WebPageProxy::createSandboxExtensionsIfNeeded):
1983         * UIProcess/RemoteWebInspectorProxy.cpp:
1984         (WebKit::RemoteWebInspectorProxy::createFrontendPageAndWindow):
1985         * UIProcess/WebInspectorProxy.cpp:
1986         (WebKit::WebInspectorProxy::createFrontendPage):
1987         * UIProcess/WebPageProxy.cpp:
1988         (WebKit::WebPageProxy::loadRequestWithNavigation):
1989         (WebKit::WebPageProxy::loadFile):
1990         (WebKit::WebPageProxy::loadDataWithNavigation):
1991         (WebKit::WebPageProxy::loadAlternateHTML):
1992         (WebKit::WebPageProxy::reload):
1993         (WebKit::WebPageProxy::didPerformClientRedirect):
1994         (WebKit::WebPageProxy::backForwardGoToItem):
1995         (WebKit::WebPageProxy::checkURLReceivedFromCurrentOrPreviousWebProcess):
1996         (WebKit::WebPageProxy::addPreviouslyVisitedPath):
1997         (WebKit::WebPageProxy::willAcquireUniversalFileReadSandboxExtension):
1998         * UIProcess/WebPageProxy.h:
1999         * UIProcess/WebProcessProxy.cpp:
2000         (WebKit::WebProcessProxy::assumeReadAccessToBaseURL):
2001         * UIProcess/WebProcessProxy.h:
2002         * UIProcess/mac/WebPageProxyMac.mm:
2003
2004 2018-11-30  Carlos Garcia Campos  <cgarcia@igalia.com>
2005
2006         [WPE] Add API to notify about frame displayed view backend callback
2007         https://bugs.webkit.org/show_bug.cgi?id=192224
2008
2009         Reviewed by Michael Catanzaro.
2010
2011         Add API to add a callback to the view to be called when the view backend notifies that a frame has been
2012         displayed.
2013
2014         * UIProcess/API/glib/WebKitWebView.cpp:
2015         (FrameDisplayedCallback::FrameDisplayedCallback):
2016         (FrameDisplayedCallback::~FrameDisplayedCallback):
2017         (webkit_web_view_add_frame_displayed_callback):
2018         (webkit_web_view_remove_frame_displayed_callback):
2019         * UIProcess/API/wpe/WebKitWebView.h:
2020
2021 2018-12-11  Justin Michaud  <justin_michaud@apple.com>
2022
2023         Implement feature flag for CSS Typed OM
2024         https://bugs.webkit.org/show_bug.cgi?id=192610
2025
2026         Reviewed by Ryosuke Niwa.
2027
2028         * Configurations/FeatureDefines.xcconfig:
2029         * Shared/WebPreferences.yaml:
2030         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2031         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2032
2033 2018-12-11  Fujii Hironori  <Hironori.Fujii@sony.com>
2034
2035         [Win][Clang] Fix warning -Wmissing-field-initializers
2036         https://bugs.webkit.org/show_bug.cgi?id=192584
2037
2038         Reviewed by Yusuke Suzuki.
2039
2040         Initialize a struct with '{ }' instead of '= {0}'.
2041
2042         * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
2043         (WebKit::ProcessLauncher::launchProcess):
2044         * UIProcess/win/WebPopupMenuProxyWin.cpp:
2045         (WebKit::WebPopupMenuProxyWin::showPopupMenu):
2046         * UIProcess/win/WebView.cpp:
2047         (WebKit::WebView::initializeToolTipWindow):
2048         (WebKit::WebView::setToolTip):
2049
2050 2018-12-11  Chris Dumez  <cdumez@apple.com>
2051
2052         PSON logic gets confused by concurrent decidePolicyForNavigationAction requests
2053         https://bugs.webkit.org/show_bug.cgi?id=192482
2054         <rdar://problem/46470145>
2055
2056         Reviewed by Antti Koivisto.
2057
2058         It is possible to get 2 parallel decidePolicyForNavigationAction() requests from the
2059         WebProcess when a new load is started before responding to the existing policy
2060         decision. This would lead to several issues with regards to PSON:
2061         - We would decide to swap for the first policy decision and tell the WebProcess to
2062           suspend. However, because the WebProcess issued a new decidePolicyForNavigationAction
2063           since for the same frame, the previous one is invalidated and the WebProcess would
2064           ignore our request to suspend.
2065         - We would hit assertions later on because the navigation has been destroyed and yet
2066           we're getting a didStartProvisionalLoad for it.
2067         - swapToWebProcess() was asynchronous so that it would wait for the destination
2068           SuspendedPage to finish suspending before asking it to unsuspend. This led to various
2069           problems because anything can happen in the UIProcess while we're waiting for the
2070           suspension (e.g. another load). Also, we may create the SuspendedPageProxy for
2071           the current page too late and start getting IPC from the previous process about
2072           the suspension load to about:blank.
2073
2074         To address these issues, the following design is now implemented:
2075         - swapToWebProcess() is no longer asynchronous
2076         - instead, WebProcessPool::processForNavigation() is now asynchronous. This is better
2077           because at this point we have not yet told the WebProcess about the policy decision.
2078           We already properly deal with the policy decision being made asynchronously. This
2079           also allows us to choose another process if the SuspendedPage we'd like to use
2080           failed to suspend.
2081         - If the WebProcess receives a PolicyAction::Suspend but ignores it, have it send an
2082           IPC to the UIProcess so that the SuspendedPageProxy knows about it. We then destroy
2083           the SuspendedPageProxy and make sure it is not used.
2084         - After the asynchronous process selection, if the navigation has been destroy, abort
2085           the process-swap to avoid hitting assertions later on due to doing a load for a
2086           destroyed navigation.
2087
2088         * UIProcess/SuspendedPageProxy.cpp:
2089         (WebKit::SuspendedPageProxy::~SuspendedPageProxy):
2090         Make sure m_whenReadyToConsume completion handler gets called if necessary if the
2091         SuspendedPageProxy gets destroyed. We pass null so that the SuspendedPage is not
2092         used.
2093
2094         (WebKit::SuspendedPageProxy::whenReadyToConsume):
2095         Add whenReadyToConsume() utility method to get a completion handler called when
2096         the SuspendedPageProxy is ready to be used. This basically means we have to wait
2097         for the page to finish its about:blank suspension load. If the suspension fails
2098         then we call the completion handler with null to indicate that the suspended
2099         page is not usable.
2100
2101         (WebKit::SuspendedPageProxy::unsuspendAndConsume):
2102         Rename unsuspend() to unsuspendAndConsume() and make it synchronous. This only gets
2103         called after whenReadyToConsume()'s completion handler has been called and if we
2104         do decide to use the SuspendedPageProxy. It tells the WebProcess to unsuspend and
2105         removes the SuspendedPageProxy from the WebProcessPool.
2106
2107         (WebKit::SuspendedPageProxy::didFinishLoad):
2108         rename m_finishedSuspendingHandler to m_whenReadyToConsume.
2109
2110         (WebKit::SuspendedPageProxy::didFailToSuspend):
2111         Add new didFailToSuspend() that gets called when the WebProcess sends us an IPC telling
2112         us it ignored our request to suspend. We then call m_whenReadyToConsume completion
2113         handler with null and destroy the SuspendedPageProxy.
2114
2115         (WebKit::SuspendedPageProxy::didReceiveMessage):
2116         * UIProcess/SuspendedPageProxy.h:
2117
2118         * UIProcess/WebNavigationState.h:
2119         (WebKit::WebNavigationState::hasNavigation const):
2120         Add utility function to query if a navigation is still valid.
2121
2122         * UIProcess/WebPageProxy.cpp:
2123         (WebKit::WebPageProxy::swapToWebProcess):
2124         Update method so that it is no longer asynchronous. Some of its code was also moved to
2125         continueNavigationInNewProcess() for clarity.
2126
2127         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
2128         Deal with WebProcessPool::processForNavigation() now being asynchronous.
2129
2130         (WebKit::WebPageProxy::continueNavigationInNewProcess):
2131         Update code now that swapToWebProcess() is no longer asynchronous. Some of the swapToWebProcess()
2132         code was also moved here for clarity.
2133
2134         (WebKit::WebPageProxy::didFailToSuspendAfterProcessSwap):
2135
2136         * UIProcess/WebPageProxy.h:
2137         * UIProcess/WebPageProxy.messages.in:
2138         Add new DidFailToSuspendAfterProcessSwap IPC message.
2139
2140         * UIProcess/WebProcessPool.cpp:
2141         (WebKit::WebProcessPool::processForNavigation):
2142         (WebKit::WebProcessPool::processForNavigationInternal):
2143         * UIProcess/WebProcessPool.h:
2144         Make asynchronous. If we decide to use a SuspendedPageProxy's process, then call
2145         whenReadyToConsume() on it to wait for it to suspend. If the SuspendedPageProxy
2146         fails to suspend use a new process instead.
2147
2148         * WebProcess/WebPage/WebFrame.cpp:
2149         (WebKit::WebFrame::didReceivePolicyDecision):
2150         If we ignore the policy decision and the decision was "Suspend", send the DidFailToSuspendAfterProcessSwap
2151         IPC to the UIProcess so that the SuspendedPageProxy knows about it.
2152
2153 2018-12-11  Andy Estes  <aestes@apple.com>
2154
2155         Introduce makeBlockPtr for lambdas
2156         https://bugs.webkit.org/show_bug.cgi?id=192594
2157
2158         Reviewed by Alex Christensen.
2159
2160         Adopted makeBlockPtr.
2161
2162         * NetworkProcess/Downloads/cocoa/WKDownloadProgress.mm:
2163         (-[WKDownloadProgress initWithDownloadTask:download:URL:sandboxExtension:]):
2164         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
2165         (WebKit::NetworkCache::IOChannel::read):
2166         (WebKit::NetworkCache::IOChannel::write):
2167         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2168         (WebKit::NetworkProcess::clearDiskCache):
2169         (WebKit::saveCookies):
2170         * NetworkProcess/watchos/NetworkProximityAssertion.mm:
2171         (WebKit::BluetoothProximityAssertion::suspend):
2172         * UIProcess/API/Cocoa/WKWebView.mm:
2173         (-[WKWebView _setInputDelegate:]):
2174         * UIProcess/API/mac/WKView.mm:
2175         (-[WKView maybeInstallIconLoadingClient]):
2176         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
2177         (WebKit::WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard):
2178         (WebKit::WebPaymentCoordinatorProxy::platformOpenPaymentSetup):
2179         * UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
2180         (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
2181         * UIProcess/Cocoa/AutomationSessionClient.mm:
2182         (WebKit::AutomationSessionClient::requestNewPageWithOptions):
2183         (WebKit::AutomationSessionClient::requestSwitchToPage):
2184         (WebKit::AutomationSessionClient::requestHideWindowOfPage):
2185         (WebKit::AutomationSessionClient::requestRestoreWindowOfPage):
2186         (WebKit::AutomationSessionClient::requestMaximizeWindowOfPage):
2187         * UIProcess/Cocoa/DownloadClient.mm:
2188         (WebKit::DownloadClient::didReceiveAuthenticationChallenge):
2189         (WebKit::DownloadClient::decideDestinationWithSuggestedFilename):
2190         * UIProcess/Cocoa/IconLoadingDelegate.mm:
2191         (WebKit::IconLoadingDelegate::IconLoadingClient::getLoadDecisionForIcon):
2192         * UIProcess/Cocoa/NavigationState.mm:
2193         (WebKit::NavigationState::NavigationClient::decidePolicyForPluginLoad):
2194         (WebKit::NavigationState::NavigationClient::webGLLoadPolicy const):
2195         (WebKit::NavigationState::NavigationClient::resolveWebGLLoadPolicy const):
2196         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
2197         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationResponse):
2198         (WebKit::NavigationState::NavigationClient::didReceiveAuthenticationChallenge):
2199         * UIProcess/Cocoa/UIDelegate.mm:
2200         (WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
2201         (WebKit::UIDelegate::UIClient::createNewPage):
2202         (WebKit::UIDelegate::UIClient::runJavaScriptAlert):
2203         (WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
2204         (WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
2205         (WebKit::UIDelegate::UIClient::requestStorageAccessConfirm):
2206         (WebKit::UIDelegate::UIClient::decidePolicyForGeolocationPermissionRequest):
2207         (WebKit::UIDelegate::UIClient::runBeforeUnloadConfirmPanel):
2208         (WebKit::UIDelegate::UIClient::exceededDatabaseQuota):
2209         (WebKit::UIDelegate::UIClient::windowFrame):
2210         (WebKit::UIDelegate::UIClient::toolbarsAreVisible):
2211         (WebKit::UIDelegate::UIClient::decidePolicyForNotificationPermissionRequest):
2212         (WebKit::UIDelegate::UIClient::runOpenPanel):
2213         (WebKit::requestUserMediaAuthorizationForDevices):
2214         (WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest):
2215         (WebKit::UIDelegate::UIClient::checkUserMediaPermissionForOrigin):
2216         (WebKit::UIDelegate::UIClient::reachedApplicationCacheOriginQuota):
2217         (WebKit::UIDelegate::UIClient::requestPointerLock):
2218         * UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
2219         (-[WKSafeBrowsingWarning clickedOnLink:]):
2220         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
2221         (WebKit::WebPageProxy::beginSafeBrowsingCheck):
2222         * UIProcess/WebAuthentication/Cocoa/HidConnection.mm:
2223         (WebKit::HidConnection::send):
2224         * UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:
2225         (WebKit::LocalConnection::getUserConsent const):
2226         (WebKit::LocalConnection::getAttestation const):
2227         * UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:
2228         (WebKit::MockHidConnection::send):
2229         * UIProcess/ios/PageClientImplIOS.mm:
2230         (WebKit::PageClientImpl::requestPasswordForQuickLookDocument):
2231         * UIProcess/ios/WKGeolocationProviderIOS.mm:
2232         (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]):
2233         * UIProcess/mac/ServicesController.mm:
2234         (WebKit::hasCompatibleServicesForItems):
2235         (WebKit::ServicesController::refreshExistingServices):
2236         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2237         (PageLoaderClient::didStartProvisionalLoadForFrame):
2238
2239 2018-12-11  Alex Christensen  <achristensen@webkit.org>
2240
2241         Fix an internal build failure after r239014
2242         https://bugs.webkit.org/show_bug.cgi?id=192205
2243
2244         * UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
2245         (fontOfSize):
2246         There's a system that doesn't have safe browsing or UIFontTextStyleLargeTitle.
2247
2248 2018-12-11  Brian Burg  <bburg@apple.com>
2249
2250         SimulatedInputDispatcher::transitionInputSourceToState() can reuse a moved-from completion handler
2251         https://bugs.webkit.org/show_bug.cgi?id=191155
2252         <rdar://problem/45745569>
2253
2254         Reviewed by Joseph Pecoraro.
2255
2256         * UIProcess/Automation/SimulatedInputDispatcher.cpp:
2257         (WebKit::SimulatedInputDispatcher::transitionInputSourceToState):
2258         Add an ASSERT to guard against unexpected inputs where >1 VirtualKey changes per state.
2259         webkitdriver needs to be updated to not produce such states in this scenario, but this will
2260         avoid a runtime crash caused by trying to call a moved-out completion handler a second time.
2261
2262 2018-12-11  Commit Queue  <commit-queue@webkit.org>
2263
2264         Unreviewed, rolling out r239071.
2265         https://bugs.webkit.org/show_bug.cgi?id=192588
2266
2267         Broke WPE build due to undefined references to toAPI() and
2268         toImpl() inside the C API (Requested by magomez on #webkit).
2269
2270         Reverted changeset:
2271
2272         "[meta][WebKit] Remove using namespace WebCore and WebKit in
2273         the global scope for unified source builds"
2274         https://bugs.webkit.org/show_bug.cgi?id=192449
2275         https://trac.webkit.org/changeset/239071
2276
2277 2018-12-10  Chris Fleizach  <cfleizach@apple.com>
2278
2279         [meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
2280         https://bugs.webkit.org/show_bug.cgi?id=192449
2281
2282         Reviewed by Darin Adler.
2283
2284         * NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
2285         * NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:
2286         * NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
2287         * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
2288         * NetworkProcess/ios/NetworkProcessIOS.mm:
2289         * NetworkProcess/mac/NetworkProcessMac.mm:
2290         * NetworkProcess/mac/RemoteNetworkingContext.mm:
2291         * Platform/spi/ios/AccessibilitySupportSPI.h:
2292         * PlatformMac.cmake:
2293         * PluginProcess/PluginControllerProxy.cpp:
2294         * PluginProcess/PluginProcess.cpp:
2295         * PluginProcess/WebProcessConnection.cpp:
2296         * Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb:
2297         * Shared/API/c/cf/WKErrorCF.cpp:
2298         (WKErrorCreateWithCFError):
2299         (WKErrorCopyCFError):
2300         * Shared/API/c/cg/WKImageCG.cpp:
2301         (WKImageCreateCGImage):
2302         (WKImageCreateFromCGImage):
2303         * Shared/ChildProcess.cpp:
2304         * Shared/ContextMenuContextData.cpp:
2305         * Shared/EditorState.cpp:
2306         * Shared/Plugins/NPIdentifierData.cpp:
2307         * Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
2308         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
2309         * Shared/SessionState.cpp:
2310         * Shared/SessionTracker.cpp:
2311         * Shared/ShareableBitmap.cpp:
2312         * Shared/ShareableResource.cpp:
2313         * Shared/VisibleContentRectUpdateInfo.cpp:
2314         * Shared/WebBackForwardListItem.cpp:
2315         * Shared/WebContextMenuItemData.cpp:
2316         * Shared/WebCoreArgumentCoders.cpp:
2317         * Shared/WebHitTestResultData.cpp:
2318         * Shared/WebImage.cpp:
2319         * Shared/WebMediaSessionMetadata.cpp:
2320         * Shared/WebMemorySampler.cpp:
2321         * Shared/WebMouseEvent.cpp:
2322         * Shared/WebRenderObject.cpp:
2323         * Shared/WebSQLiteDatabaseTracker.cpp:
2324         * Shared/WebWheelEvent.cpp:
2325         * Shared/cf/ArgumentCodersCF.cpp:
2326         * Shared/ios/WebPlatformTouchPointIOS.cpp:
2327         * SourcesCocoa.txt:
2328         * UIProcess/API/APIContentRuleListStore.cpp:
2329         * UIProcess/API/APIHitTestResult.cpp:
2330         * UIProcess/API/APINavigation.cpp:
2331         * UIProcess/API/APIOpenPanelParameters.cpp:
2332         * UIProcess/API/APIPageConfiguration.cpp:
2333         * UIProcess/API/C/WKPage.cpp:
2334         (WKPageLoadURLWithShouldOpenExternalURLsPolicy):
2335         (WKPageLoadURLWithUserData):
2336         (WKPageLoadURLRequestWithUserData):
2337         (WKPageSetPaginationMode):
2338         (WKPageGetPaginationMode):
2339         (WKPageSetPageLoaderClient):
2340         (WKPageSetPagePolicyClient):
2341         * UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
2342         * UIProcess/Cocoa/WebViewImpl.h:
2343         * UIProcess/Cocoa/WebViewImpl.mm:
2344         * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
2345         * UIProcess/WebStorage/LocalStorageDatabase.cpp:
2346         * UIProcess/ios/WKContentView.mm:
2347         (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
2348         (-[WKContentView initWithFrame:processPool:configuration:webView:]):
2349         (-[WKContentView dealloc]):
2350         (-[WKContentView page]):
2351         (-[WKContentView updateFixedClippingView:]):
2352         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
2353         (-[WKContentView _updateForScreen:]):
2354         (-[WKContentView _accessibilityRegisterUIProcessTokens]):
2355         (-[WKContentView _createDrawingAreaProxy]):
2356         (-[WKContentView _didCommitLayerTree:]):
2357         (-[WKContentView _wk_pageCountForPrintFormatter:]):
2358         * UIProcess/ios/WKContentViewInteraction.mm:
2359         (-[WKFocusedElementInfo initWithAssistedNodeInformation:isUserInitiated:userObject:]):
2360         (hasAssistedNode):
2361         (-[WKContentView setupInteraction]):
2362         (-[WKContentView positionInformation]):
2363         (-[WKContentView _webTouchEventsRecognized:]):
2364         (inflateQuad):
2365         (-[WKContentView _updateTapHighlight]):
2366         (-[WKContentView _showTapHighlight]):
2367         (-[WKContentView _requiresKeyboardWhenFirstResponder]):
2368         (-[WKContentView _displayFormNodeInputView]):
2369         (-[WKContentView inputView]):
2370         (-[WKContentView _actionForLongPressFromPositionInformation:]):
2371         (-[WKContentView currentPositionInformation]):
2372         (-[WKContentView doAfterPositionInformationUpdate:forRequest:]):
2373         (-[WKContentView _currentPositionInformationIsValidForRequest:]):
2374         (-[WKContentView _hasValidOutstandingPositionInformationRequest:]):
2375         (-[WKContentView _currentPositionInformationIsApproximatelyValidForRequest:]):
2376         (-[WKContentView gestureRecognizerShouldBegin:]):
2377         (-[WKContentView hasSelectablePositionAtPoint:]):
2378         (-[WKContentView pointIsNearMarkedText:]):
2379         (-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
2380         (-[WKContentView webSelectionRectsForSelectionRects:]):
2381         (-[WKContentView _twoFingerSingleTapGestureRecognized:]):
2382         (-[WKContentView _stylusSingleTapRecognized:]):
2383         (-[WKContentView _singleTapCommited:]):
2384         (-[WKContentView _attemptClickAtLocation:]):
2385         (-[WKContentView _positionInformationDidChange:]):
2386         (-[WKContentView requiresAccessoryView]):
2387         (-[WKContentView supportedPasteboardTypesForCurrentSelection]):
2388         (-[WKContentView _lookupForWebView:]):
2389         (-[WKContentView _shareForWebView:]):
2390         (-[WKContentView textStylingAtPosition:inDirection:]):
2391         (-[WKContentView canPerformActionForWebView:withSender:]):
2392         (-[WKContentView selectForWebView:]):
2393         (-[WKContentView _accessibilityRetrieveRectsEnclosingSelectionOffset:withGranularity:]):
2394         (-[WKContentView _accessibilityRetrieveRectsAtSelectionOffset:withText:completionHandler:]):
2395         (toGestureType):
2396         (toUIWKGestureType):
2397         (toSelectionTouch):
2398         (toUIWKSelectionTouch):
2399         (toGestureRecognizerState):
2400         (toUIGestureRecognizerState):
2401         (toUIWKSelectionFlags):
2402         (toWKTextGranularity):
2403         (toWKSelectionDirection):
2404         (selectionChangedWithGesture):
2405         (selectionChangedWithTouch):
2406         (-[WKContentView changeSelectionWithGestureAt:withGesture:withState:withFlags:]):
2407         (-[WKContentView autocorrectionData]):
2408         (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
2409         (-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
2410         (-[WKContentView _updateAccessory]):
2411         (-[WKContentView selectedTextRange]):
2412         (-[WKContentView setMarkedText:selectedRange:]):
2413         (coreWritingDirection):
2414         (-[WKContentView closestPositionToPoint:]):
2415         (-[WKContentView insertText:]):
2416         (-[WKContentView textInputTraits]):
2417         (-[WKContentView handleKeyWebEvent:]):
2418         (-[WKContentView handleKeyWebEvent:withCompletionHandler:]):
2419         (-[WKContentView isScrollableForKeyboardScrollViewAnimator:]):
2420         (-[WKContentView keyboardScrollViewAnimator:distanceForIncrement:]):
2421         (-[WKContentView assistedNodeInformation]):
2422         (-[WKContentView assistedNodeSelectOptions]):
2423         (isAssistableInputType):
2424         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
2425         (-[WKContentView _stopAssistingNode]):
2426         (-[WKContentView updateCurrentAssistedNodeInformation:]):
2427         (-[WKContentView presentViewControllerForCurrentAssistedNode]):
2428         (-[WKContentView actionNameForFocusedFormControlView:]):
2429         (-[WKContentView selectWordForReplacement]):
2430         (-[WKContentView _updateChangedSelection:]):
2431         (-[WKContentView _beginSuppressingSelectionAssistantForReason:]):
2432         (-[WKContentView _stopSuppressingSelectionAssistantForReason:]):
2433         (-[WKContentView _showPlaybackTargetPicker:fromRect:routeSharingPolicy:routingContextUID:]):
2434         (-[WKContentView _showRunOpenPanel:resultListener:]):
2435         (-[WKContentView _showShareSheet:completionHandler:]):
2436         (-[WKContentView positionInformationForActionSheetAssistant:]):
2437         (-[WKContentView updatePositionInformationForActionSheetAssistant:]):
2438         (-[WKContentView _startDrag:item:]):
2439         (-[WKContentView _didHandleAdditionalDragItemsRequest:]):
2440         (-[WKContentView _didHandleStartDataInteractionRequest:]):
2441         (dropOperationForWebCoreDragOperation):
2442         (-[WKContentView dragDataForDropSession:dragDestinationAction:]):
2443         (-[WKContentView _didConcludeEditDataInteraction:]):
2444         (-[WKContentView _didPerformDragOperation:]):
2445         (-[WKContentView _prepareToDragPromisedAttachment:]):
2446         (-[WKContentView _itemsForBeginningOrAddingToSessionWithRegistrationList:stagedDragSource:]):
2447         (-[WKContentView _autofillContext]):
2448         (-[WKContentView _dragInteraction:itemsForAddingToSession:withTouchAtPoint:completion:]):
2449         (-[WKContentView _dragInteraction:prepareForSession:completion:]):
2450         (-[WKContentView dragInteraction:itemsForBeginningSession:]):
2451         (-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
2452         (-[WKContentView dragInteraction:session:didEndWithOperation:]):
2453         (-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
2454         (-[WKContentView dropInteraction:performDrop:]):
2455         (-[WKContentView dropInteraction:sessionDidEnd:]):
2456         (-[WKContentView allowsLanguageSelectionMenuForListViewController:]):
2457         (-[WKContentView shouldDisplayInputContextViewForListViewController:]):
2458         (-[WKContentView numericInputModeForListViewController:]):
2459         (-[WKContentView textContentTypeForListViewController:]):
2460         (-[WKContentView allowsDictationInputForListViewController:]):
2461         (-[WKContentView _simulateLongPressActionAtLocation:]):
2462         (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
2463         (-[WKContentView _presentationRectsForPreviewItemController:]):
2464         * UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
2465         (WKFullScreenViewControllerPlaybackSessionModelClient::setInterface):
2466         (WKFullScreenViewControllerVideoFullscreenModelClient::setInterface):
2467         (WKFullScreenViewControllerVideoFullscreenModelClient::interface const):
2468         (-[WKFullScreenViewController videoControlsManagerDidChange]):
2469         (-[WKFullScreenViewController _manager]):
2470         (-[WKFullScreenViewController _togglePiPAction:]):
2471         * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
2472         (-[WKFullscreenAnimationController configureInitialAndFinalStatesForTransition:]):
2473         (-[WKFullScreenWindowController isFullScreen]):
2474         (-[WKFullScreenWindowController enterFullScreen]):
2475         (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
2476         (-[WKFullScreenWindowController exitFullScreen]):
2477         (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
2478         (-[WKFullScreenWindowController _completedExitFullScreen]):
2479         (-[WKFullScreenWindowController webViewDidRemoveFromSuperviewWhileInFullscreen]):
2480         (-[WKFullScreenWindowController _exitFullscreenImmediately]):
2481         (-[WKFullScreenWindowController _manager]):
2482         * UIProcess/mac/WebPageProxyMac.mm:
2483         * WebKit.xcodeproj/project.pbxproj:
2484         * WebProcess/Cache/WebCacheStorageConnection.cpp:
2485         * WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:
2486         (mediaTimeToCurrentTime):
2487         (-[WKAnimationDelegate initWithLayerID:layerTreeHost:]):
2488         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
2489         (-[WKAccessibilityWebPageObjectBase accessibilityRootObjectWrapper]):
2490
2491 2018-12-10  Don Olmstead  <don.olmstead@sony.com>
2492
2493         Move ENABLE_RESOURCE_LOAD_STATISTICS to FeatureDefines.xcconfig
2494         https://bugs.webkit.org/show_bug.cgi?id=192573
2495
2496         Reviewed by Simon Fraser.
2497
2498         * Configurations/FeatureDefines.xcconfig:
2499
2500 2018-12-10  Youenn Fablet  <youenn@apple.com>
2501
2502         Remove derived classes of RealtimeMediaSourceCenter
2503         https://bugs.webkit.org/show_bug.cgi?id=192546
2504
2505         Reviewed by Eric Carlson.
2506
2507         pdate code according WebCore changes.
2508
2509         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
2510         (WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):
2511         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
2512         (WebKit::UserMediaCaptureManager::~UserMediaCaptureManager):
2513         (WebKit::UserMediaCaptureManager::initialize):
2514
2515 2018-12-10  Tim Horton  <timothy_horton@apple.com>
2516
2517         Animated scrolling on Google Maps scrolls the page in addition to moving the map
2518         https://bugs.webkit.org/show_bug.cgi?id=192521
2519         <rdar://problem/46382007>
2520
2521         Reviewed by Sam Weinig.
2522
2523         * Platform/spi/ios/UIKitSPI.h:
2524         * UIProcess/ios/WKKeyboardScrollingAnimator.mm:
2525         (-[WKKeyboardScrollViewAnimator rubberbandableDirections]):
2526         Only do keyboard-based rubber-banding in directions that we can actually
2527         scroll, not directions we can only finger-rubber-band in. This effectively
2528         means keyboard scrolling will ignore "alwaysBounce{Vertical, Horizontal}".
2529
2530 2018-12-10  Commit Queue  <commit-queue@webkit.org>
2531
2532         Unreviewed, rolling out r239023.
2533         https://bugs.webkit.org/show_bug.cgi?id=192571
2534
2535         Speculative rollout due to broken perf test (Requested by
2536         deanj on #webkit).
2537
2538         Reverted changeset:
2539
2540         "Enable HTTP and HTTPS proxies on iOS and make it a property
2541         of the NSURLSession"
2542         https://bugs.webkit.org/show_bug.cgi?id=192374
2543         https://trac.webkit.org/changeset/239023
2544
2545 2018-12-10  Wenson Hsieh  <wenson_hsieh@apple.com>
2546
2547         Unreviewed, fix the iOS build after r239039.
2548         https://bugs.webkit.org/show_bug.cgi?id=192568
2549
2550         * UIProcess/ios/WKContentViewInteraction.mm:
2551         (-[WKContentView dropInteraction:sessionDidUpdate:]):
2552
2553 2018-12-10  Alex Christensen  <achristensen@webkit.org>
2554
2555         Fix WatchOS build.
2556
2557         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
2558         * UIProcess/ios/WKContentViewInteraction.mm:
2559         (-[WKContentView actionNameForFocusedFormControlView:]):
2560
2561 2018-12-10  Matt Lewis  <jlewis3@apple.com>
2562
2563         Unreviewed, rolling out r239029.
2564
2565         This patch caused internal build failures.
2566
2567         Reverted changeset:
2568
2569         "[meta][WebKit] Remove using namespace WebCore and WebKit in
2570         the global scope for unified source builds"
2571         https://bugs.webkit.org/show_bug.cgi?id=192449
2572         https://trac.webkit.org/changeset/239029
2573
2574 2018-12-10  Chris Dumez  <cdumez@apple.com>
2575
2576         Add SPI to allow the client to set the user-agent at main frame level, from the UIProcess
2577         https://bugs.webkit.org/show_bug.cgi?id=192509
2578         <rdar://problem/46500832>
2579
2580         Reviewed by Alex Christensen.
2581
2582         Add SPI to allow the client to set the user-agent at main frame level, from the UIProcess instead of doing
2583         it at resource-level from the injected bundle.
2584
2585         The custom user-agent string can now be set on _WKWebsitePolicies during the
2586         decidePolicyForNavigationAction for the main feame, and will impact this main resource load as well as its
2587         future subresource loads.
2588
2589         * Shared/WebsitePoliciesData.cpp:
2590         (WebKit::WebsitePoliciesData::encode const):
2591         (WebKit::WebsitePoliciesData::decode):
2592         (WebKit::WebsitePoliciesData::applyToDocumentLoader):
2593         * Shared/WebsitePoliciesData.h:
2594         * UIProcess/API/APIWebsitePolicies.cpp:
2595         (API::WebsitePolicies::data):
2596         * UIProcess/API/APIWebsitePolicies.h:
2597         * UIProcess/API/Cocoa/_WKWebsitePolicies.h:
2598         * UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
2599         (-[_WKWebsitePolicies setCustomUserAgent:]):
2600         (-[_WKWebsitePolicies customUserAgent]):
2601         * UIProcess/Cocoa/NavigationState.mm:
2602         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
2603
2604 2018-12-10  Alex Christensen  <achristensen@webkit.org>
2605
2606         Safe browsing warning should layout buttons vertically in narrow WKWebViews
2607         https://bugs.webkit.org/show_bug.cgi?id=192535
2608         <rdar://problem/46308364>
2609
2610         Reviewed by Tim Horton.
2611
2612         They're usually next to each other, but in narrow WKWebViews they currently get clipped.
2613         In order to make it more likely that both buttons are completely visible, put one above
2614         the other if the WKWebView is too narrow to completely show both.  This also helps with
2615         languages where the translations of "Go Back" or "Show Details" are rendered wider than English.
2616
2617         * UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
2618         (buttonWidth):
2619         (-[WKSafeBrowsingWarning addContent]):
2620
2621 2018-12-10  Simon Fraser  <simon.fraser@apple.com>
2622
2623         Allow control over child order when adding nodes to the scrolling tree
2624         https://bugs.webkit.org/show_bug.cgi?id=176914
2625         <rdar://problem/46542237>
2626         
2627         Re-land r239010 after over-zealous rollout.
2628
2629         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
2630         (WebKit::RemoteScrollingCoordinatorTransaction::decode):
2631
2632 2018-12-10  Wenson Hsieh  <wenson_hsieh@apple.com>
2633
2634         [iOS] Caret is obscured by finger when dragging over an editable element
2635         https://bugs.webkit.org/show_bug.cgi?id=192499
2636         <rdar://problem/46570101>
2637
2638         Reviewed by Tim Horton.
2639
2640         Add support for setting the `precise` property of `UIDropProposal` to YES when dragging over an editable area.
2641         When enabled, this property shifts the drop location up by a small amount, allowing the user to see the drop
2642         caret (currently, this is not the case, and it's difficult to drop text at a precise location on iOS). Changes
2643         are covered by adding to existing API tests.
2644
2645         * Scripts/webkit/messages.py:
2646         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
2647
2648         Add a new version of `-_webView:willUpdateDataInteractionOperationToOperation:forSession:` that receives and
2649         returns a UIDropProposal, so that Mail can more easily port over existing logic in its legacy-WebKit-based
2650         compose implementation. iOS Safari is currently the only client of this private delegate, so the old version can
2651         be easily removed once Safari adopts this new version.
2652
2653         * UIProcess/WebPageProxy.cpp:
2654         (WebKit::WebPageProxy::didPerformDragControllerAction):
2655
2656         Add plumbing to send the latest drag handling method from WebPage to WebPageProxy.
2657
2658         (WebKit::WebPageProxy::resetCurrentDragInformation):
2659         * UIProcess/WebPageProxy.h:
2660         (WebKit::WebPageProxy::currentDragHandlingMethod const):
2661         * UIProcess/WebPageProxy.messages.in:
2662         * UIProcess/ios/WKContentViewInteraction.mm:
2663         (-[WKContentView dropInteraction:sessionDidUpdate:]):
2664
2665         Call the new UI delegate hook when determining the drop proposal to return to UIKit. Additionally set the
2666         `precise` bit on the drop proposal in the case where the drop handling method is either "editing rich text" or
2667         "editing plain text".
2668
2669         * WebProcess/WebPage/WebPage.cpp:
2670         (WebKit::WebPage::performDragControllerAction):
2671         * WebProcess/WebPage/WebPage.h:
2672
2673 2018-12-10  Youenn Fablet  <youenn@apple.com>
2674
2675         Make mock capture happen in the process used for real capture
2676         https://bugs.webkit.org/show_bug.cgi?id=192544
2677
2678         Reviewed by Eric Carlson.
2679
2680         Make mock capture happen in the right process by only overriding
2681         factories by mock factories for source types that UserMediaCaptureManager will not override.
2682         That way, UserMediaCaptureManager will be used to go to UIProcess, where mock will be used as if it was the real capture.
2683
2684         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
2685         (WebKit::UserMediaCaptureManager::initialize):
2686
2687 2018-12-10  Alexey Proskuryakov  <ap@apple.com>
2688
2689         Move ENABLE_SEC_ITEM_SHIM out of WebKit's config.h
2690         https://bugs.webkit.org/show_bug.cgi?id=192428
2691
2692         Reviewed by Tim Horton.
2693
2694         * config.h:
2695
2696 2018-12-10  Alexey Proskuryakov  <ap@apple.com>
2697
2698         Move more macros out of WebKit's config.h
2699         https://bugs.webkit.org/show_bug.cgi?id=192430
2700
2701         Reviewed by Tim Horton.
2702
2703         * config.h:
2704
2705 2018-12-10  Chris Fleizach  <cfleizach@apple.com>
2706
2707         [meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
2708         https://bugs.webkit.org/show_bug.cgi?id=192449
2709
2710         Reviewed by Darin Adler.
2711
2712         * NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
2713         * NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:
2714         * NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
2715         * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
2716         * NetworkProcess/ios/NetworkProcessIOS.mm:
2717         * NetworkProcess/mac/NetworkProcessMac.mm:
2718         * NetworkProcess/mac/RemoteNetworkingContext.mm:
2719         * Platform/spi/ios/AccessibilitySupportSPI.h:
2720         * PlatformMac.cmake:
2721         * PluginProcess/PluginControllerProxy.cpp:
2722         * PluginProcess/PluginProcess.cpp:
2723         * PluginProcess/WebProcessConnection.cpp:
2724         * Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb:
2725         * Shared/API/c/cf/WKErrorCF.cpp:
2726         (WKErrorCreateWithCFError):
2727         (WKErrorCopyCFError):
2728         * Shared/API/c/cg/WKImageCG.cpp:
2729         (WKImageCreateCGImage):
2730         (WKImageCreateFromCGImage):
2731         * Shared/ChildProcess.cpp:
2732         * Shared/ContextMenuContextData.cpp:
2733         * Shared/EditorState.cpp:
2734         * Shared/Plugins/NPIdentifierData.cpp:
2735         * Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
2736         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
2737         * Shared/SessionState.cpp:
2738         * Shared/SessionTracker.cpp:
2739         * Shared/ShareableBitmap.cpp:
2740         * Shared/ShareableResource.cpp:
2741         * Shared/VisibleContentRectUpdateInfo.cpp:
2742         * Shared/WebBackForwardListItem.cpp:
2743         * Shared/WebContextMenuItemData.cpp:
2744         * Shared/WebCoreArgumentCoders.cpp:
2745         * Shared/WebHitTestResultData.cpp:
2746         * Shared/WebImage.cpp:
2747         * Shared/WebMediaSessionMetadata.cpp:
2748         * Shared/WebMemorySampler.cpp:
2749         * Shared/WebMouseEvent.cpp:
2750         * Shared/WebRenderObject.cpp:
2751         * Shared/WebSQLiteDatabaseTracker.cpp:
2752         * Shared/WebWheelEvent.cpp:
2753         * Shared/cf/ArgumentCodersCF.cpp:
2754         * Shared/ios/WebPlatformTouchPointIOS.cpp:
2755         * SourcesCocoa.txt:
2756         * UIProcess/API/APIContentRuleListStore.cpp:
2757         * UIProcess/API/APIHitTestResult.cpp:
2758         * UIProcess/API/APINavigation.cpp:
2759         * UIProcess/API/APIOpenPanelParameters.cpp:
2760         * UIProcess/API/APIPageConfiguration.cpp:
2761         * UIProcess/API/C/WKPage.cpp:
2762         (WKPageLoadURLWithShouldOpenExternalURLsPolicy):
2763         (WKPageLoadURLWithUserData):
2764         (WKPageLoadURLRequestWithUserData):
2765         (WKPageSetPaginationMode):
2766         (WKPageGetPaginationMode):
2767         (WKPageSetPageLoaderClient):
2768         (WKPageSetPagePolicyClient):
2769         * UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
2770         * UIProcess/Cocoa/WebViewImpl.h:
2771         * UIProcess/Cocoa/WebViewImpl.mm:
2772         * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
2773         * UIProcess/WebStorage/LocalStorageDatabase.cpp:
2774         * UIProcess/ios/WKContentView.mm:
2775         (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
2776         (-[WKContentView initWithFrame:processPool:configuration:webView:]):
2777         (-[WKContentView dealloc]):
2778         (-[WKContentView page]):
2779         (-[WKContentView updateFixedClippingView:]):
2780         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
2781         (-[WKContentView _updateForScreen:]):
2782         (-[WKContentView _accessibilityRegisterUIProcessTokens]):
2783         (-[WKContentView _createDrawingAreaProxy]):
2784         (-[WKContentView _didCommitLayerTree:]):
2785         (-[WKContentView _wk_pageCountForPrintFormatter:]):
2786         * UIProcess/ios/WKContentViewInteraction.mm:
2787         (-[WKFocusedElementInfo initWithAssistedNodeInformation:isUserInitiated:userObject:]):
2788         (hasAssistedNode):
2789         (-[WKContentView setupInteraction]):
2790         (-[WKContentView positionInformation]):
2791         (-[WKContentView _webTouchEventsRecognized:]):
2792         (inflateQuad):
2793         (-[WKContentView _updateTapHighlight]):
2794         (-[WKContentView _showTapHighlight]):
2795         (-[WKContentView _requiresKeyboardWhenFirstResponder]):
2796         (-[WKContentView _displayFormNodeInputView]):
2797         (-[WKContentView inputView]):
2798         (-[WKContentView _actionForLongPressFromPositionInformation:]):
2799         (-[WKContentView currentPositionInformation]):
2800         (-[WKContentView doAfterPositionInformationUpdate:forRequest:]):
2801         (-[WKContentView _currentPositionInformationIsValidForRequest:]):
2802         (-[WKContentView _hasValidOutstandingPositionInformationRequest:]):
2803         (-[WKContentView _currentPositionInformationIsApproximatelyValidForRequest:]):
2804         (-[WKContentView gestureRecognizerShouldBegin:]):
2805         (-[WKContentView hasSelectablePositionAtPoint:]):
2806         (-[WKContentView pointIsNearMarkedText:]):
2807         (-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
2808         (-[WKContentView webSelectionRectsForSelectionRects:]):
2809         (-[WKContentView _twoFingerSingleTapGestureRecognized:]):
2810         (-[WKContentView _stylusSingleTapRecognized:]):
2811         (-[WKContentView _singleTapCommited:]):
2812         (-[WKContentView _attemptClickAtLocation:]):
2813         (-[WKContentView _positionInformationDidChange:]):
2814         (-[WKContentView requiresAccessoryView]):
2815         (-[WKContentView supportedPasteboardTypesForCurrentSelection]):
2816         (-[WKContentView _lookupForWebView:]):
2817         (-[WKContentView _shareForWebView:]):
2818         (-[WKContentView textStylingAtPosition:inDirection:]):
2819         (-[WKContentView canPerformActionForWebView:withSender:]):
2820         (-[WKContentView selectForWebView:]):
2821         (-[WKContentView _accessibilityRetrieveRectsEnclosingSelectionOffset:withGranularity:]):
2822         (-[WKContentView _accessibilityRetrieveRectsAtSelectionOffset:withText:completionHandler:]):
2823         (toGestureType):
2824         (toUIWKGestureType):
2825         (toSelectionTouch):
2826         (toUIWKSelectionTouch):
2827         (toGestureRecognizerState):
2828         (toUIGestureRecognizerState):
2829         (toUIWKSelectionFlags):
2830         (toWKTextGranularity):
2831         (toWKSelectionDirection):
2832         (selectionChangedWithGesture):
2833         (selectionChangedWithTouch):
2834         (-[WKContentView changeSelectionWithGestureAt:withGesture:withState:withFlags:]):
2835         (-[WKContentView autocorrectionData]):
2836         (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
2837         (-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
2838         (-[WKContentView _updateAccessory]):
2839         (-[WKContentView selectedTextRange]):
2840         (-[WKContentView setMarkedText:selectedRange:]):
2841         (coreWritingDirection):
2842         (-[WKContentView closestPositionToPoint:]):
2843         (-[WKContentView insertText:]):
2844         (-[WKContentView textInputTraits]):
2845         (-[WKContentView handleKeyWebEvent:]):
2846         (-[WKContentView handleKeyWebEvent:withCompletionHandler:]):
2847         (-[WKContentView isScrollableForKeyboardScrollViewAnimator:]):
2848         (-[WKContentView keyboardScrollViewAnimator:distanceForIncrement:]):
2849         (-[WKContentView assistedNodeInformation]):
2850         (-[WKContentView assistedNodeSelectOptions]):
2851         (isAssistableInputType):
2852         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
2853         (-[WKContentView _stopAssistingNode]):
2854         (-[WKContentView updateCurrentAssistedNodeInformation:]):
2855         (-[WKContentView presentViewControllerForCurrentAssistedNode]):
2856         (-[WKContentView actionNameForFocusedFormControlView:]):
2857         (-[WKContentView selectWordForReplacement]):
2858         (-[WKContentView _updateChangedSelection:]):
2859         (-[WKContentView _beginSuppressingSelectionAssistantForReason:]):
2860         (-[WKContentView _stopSuppressingSelectionAssistantForReason:]):
2861         (-[WKContentView _showPlaybackTargetPicker:fromRect:routeSharingPolicy:routingContextUID:]):
2862         (-[WKContentView _showRunOpenPanel:resultListener:]):
2863         (-[WKContentView _showShareSheet:completionHandler:]):
2864         (-[WKContentView positionInformationForActionSheetAssistant:]):
2865         (-[WKContentView updatePositionInformationForActionSheetAssistant:]):
2866         (-[WKContentView _startDrag:item:]):
2867         (-[WKContentView _didHandleAdditionalDragItemsRequest:]):
2868         (-[WKContentView _didHandleStartDataInteractionRequest:]):
2869         (dropOperationForWebCoreDragOperation):
2870         (-[WKContentView dragDataForDropSession:dragDestinationAction:]):
2871         (-[WKContentView _didConcludeEditDataInteraction:]):
2872         (-[WKContentView _didPerformDragOperation:]):
2873         (-[WKContentView _prepareToDragPromisedAttachment:]):
2874         (-[WKContentView _itemsForBeginningOrAddingToSessionWithRegistrationList:stagedDragSource:]):
2875         (-[WKContentView _autofillContext]):
2876         (-[WKContentView _dragInteraction:itemsForAddingToSession:withTouchAtPoint:completion:]):
2877         (-[WKContentView _dragInteraction:prepareForSession:completion:]):
2878         (-[WKContentView dragInteraction:itemsForBeginningSession:]):
2879         (-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
2880         (-[WKContentView dragInteraction:session:didEndWithOperation:]):
2881         (-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
2882         (-[WKContentView dropInteraction:performDrop:]):
2883         (-[WKContentView dropInteraction:sessionDidEnd:]):
2884         (-[WKContentView allowsLanguageSelectionMenuForListViewController:]):
2885         (-[WKContentView shouldDisplayInputContextViewForListViewController:]):
2886         (-[WKContentView numericInputModeForListViewController:]):
2887         (-[WKContentView textContentTypeForListViewController:]):
2888         (-[WKContentView allowsDictationInputForListViewController:]):
2889         (-[WKContentView _simulateLongPressActionAtLocation:]):
2890         (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
2891         (-[WKContentView _presentationRectsForPreviewItemController:]):
2892         * UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
2893         (WKFullScreenViewControllerPlaybackSessionModelClient::setInterface):
2894         (WKFullScreenViewControllerVideoFullscreenModelClient::setInterface):
2895         (WKFullScreenViewControllerVideoFullscreenModelClient::interface const):
2896         (-[WKFullScreenViewController videoControlsManagerDidChange]):
2897         (-[WKFullScreenViewController _manager]):
2898         (-[WKFullScreenViewController _togglePiPAction:]):
2899         * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
2900         (-[WKFullscreenAnimationController configureInitialAndFinalStatesForTransition:]):
2901         (-[WKFullScreenWindowController isFullScreen]):
2902         (-[WKFullScreenWindowController enterFullScreen]):
2903         (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
2904         (-[WKFullScreenWindowController exitFullScreen]):
2905         (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
2906         (-[WKFullScreenWindowController _completedExitFullScreen]):
2907         (-[WKFullScreenWindowController webViewDidRemoveFromSuperviewWhileInFullscreen]):
2908         (-[WKFullScreenWindowController _exitFullscreenImmediately]):
2909         (-[WKFullScreenWindowController _manager]):
2910         * UIProcess/mac/WebPageProxyMac.mm:
2911         * WebKit.xcodeproj/project.pbxproj:
2912         * WebProcess/Cache/WebCacheStorageConnection.cpp:
2913         * WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:
2914         (mediaTimeToCurrentTime):
2915         (-[WKAnimationDelegate initWithLayerID:layerTreeHost:]):
2916         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
2917         (-[WKAccessibilityWebPageObjectBase accessibilityRootObjectWrapper]):
2918
2919 2018-12-10  Tim Horton  <timothy_horton@apple.com>
2920
2921         WKWebView should support custom tintColor
2922         https://bugs.webkit.org/show_bug.cgi?id=192518
2923         <rdar://problem/37243261>
2924
2925         Reviewed by Wenson Hsieh.
2926
2927         * Platform/spi/ios/UIKitSPI.h:
2928         * UIProcess/ios/WKContentViewInteraction.mm:
2929         (-[WKContentView insertionPointColor]):
2930         (-[WKContentView selectionBarColor]):
2931         (-[WKContentView selectionHighlightColor]):
2932         Grab insertion point and selection colors from UITextInputTraits.
2933
2934         (-[WKContentView _updateInteractionTintColor]):
2935         Determine our effective tint color:
2936             - transparent if interaction is disabled
2937             - a CSS-derived color if caret-color style is applied
2938             - the _inheritedInteractionTintColor, which climbs up to the tintColor API
2939         Apply it to our UITextInputTraits.
2940
2941         (-[WKContentView tintColorDidChange]):
2942         (-[WKContentView textInputTraits]):
2943         Call _updateInteractionTintColor whenever we create a new UITextInputTraits
2944         or when the tint color changes.
2945
2946 2018-12-09  Youenn Fablet  <youenn@apple.com>
2947
2948         Move capture manager from RealtimeMediaSourceCenter to capture factory
2949         https://bugs.webkit.org/show_bug.cgi?id=192542
2950
2951         Reviewed by Eric Carlson.
2952
2953         Make sure to unregister for video capture as done for other capture types.
2954         Implement manager which should be doing nothing as the manager is used for enumeration of devices
2955         which should only happen in UIProcess.
2956
2957         Given that mock capture is interfering with UserMediaCaptureManager,
2958         switching on/off mock capture will require creating a new process.
2959         This shortcoming should be fixed once mock capture will be fully happening in
2960         the same process as regular capture.
2961
2962         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
2963         (WebKit::UserMediaCaptureManager::~UserMediaCaptureManager):
2964         * WebProcess/cocoa/UserMediaCaptureManager.h:
2965
2966 2018-12-09  Saam barati  <sbarati@apple.com>
2967
2968         Enable HTTP and HTTPS proxies on iOS and make it a property of the NSURLSession
2969         https://bugs.webkit.org/show_bug.cgi?id=192374
2970         <rdar://problem/46506286>
2971
2972         Reviewed by Alex Christensen.
2973
2974         This patch makes it so that we can use HTTP/HTTPS proxies on iOS as well.
2975         To enable on iOS, you can do something like:
2976         $ defaults write -g WebKit2HTTPProxy -string "http://localhost:8080"
2977         $ defaults write -g WebKit2HTTPSProxy -string "http://localhost:8080"
2978         
2979         This patch also changes the Proxy to be enabled on a per NSURLSession
2980         basis instead of a per process basis.
2981
2982         * NetworkProcess/NetworkProcess.cpp:
2983         (WebKit::NetworkProcess::initializeNetworkProcess):
2984         * NetworkProcess/NetworkSessionCreationParameters.cpp:
2985         (WebKit::NetworkSessionCreationParameters::privateSessionParameters):
2986         (WebKit::NetworkSessionCreationParameters::encode const):
2987         (WebKit::NetworkSessionCreationParameters::decode):
2988         * NetworkProcess/NetworkSessionCreationParameters.h:
2989         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2990         (WebKit::proxyDictionary):
2991         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
2992         * NetworkProcess/mac/NetworkProcessMac.mm:
2993         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
2994         (WebKit::overrideSystemProxies): Deleted.
2995         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2996         (-[WKWebsiteDataStore _initWithConfiguration:]):
2997         * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
2998         * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:
2999         (-[_WKWebsiteDataStoreConfiguration httpProxy]):
3000         (-[_WKWebsiteDataStoreConfiguration setHTTPProxy:]):
3001         (-[_WKWebsiteDataStoreConfiguration httpsProxy]):
3002         (-[_WKWebsiteDataStoreConfiguration setHTTPSProxy:]):
3003         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3004         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
3005         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
3006         (WebKit::WebsiteDataStore::parameters):
3007         * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:
3008         (WebKit::WebsiteDataStoreConfiguration::copy):
3009         * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:
3010         (WebKit::WebsiteDataStoreConfiguration::httpProxy const):
3011         (WebKit::WebsiteDataStoreConfiguration::setHTTPProxy):
3012         (WebKit::WebsiteDataStoreConfiguration::httpsProxy const):
3013         (WebKit::WebsiteDataStoreConfiguration::setHTTPSProxy):
3014
3015 2018-12-09  Adrian Perez de Castro  <aperez@igalia.com>
3016
3017         Build failure due to missing include of APIWebsiteDataStore.h
3018         https://bugs.webkit.org/show_bug.cgi?id=192541
3019
3020         Reviewed by Youenn Fablet.
3021
3022         * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp: Add missing
3023         include of APIWebsiteDataStore.h
3024
3025 2018-12-09  Wenson Hsieh  <wenson_hsieh@apple.com>
3026
3027         [iOS device] Crash when attempting to call -[_WKAttachment info] for an editable image
3028         https://bugs.webkit.org/show_bug.cgi?id=192538
3029
3030         Reviewed by Tim Horton.
3031
3032         Fix the crash by ensuring that the result of `-renderedDrawing` survives long enough to be wrapped by a
3033         `RetainPtr` in `-PNGRepresentation`. This isn't currently testable, since this codepath isn't supported on the
3034         iOS simulator; instead, I manually verified using MobileAttachments.app.
3035
3036         * UIProcess/ios/WKDrawingView.mm:
3037         (-[WKDrawingView renderedDrawing]):
3038
3039 2018-12-09  Commit Queue  <commit-queue@webkit.org>
3040
3041         Unreviewed, rolling out r239010.
3042         https://bugs.webkit.org/show_bug.cgi?id=192537
3043
3044         Breaks fast/visual-viewport/tiled-drawing/zoomed-fixed-
3045         scrolling-layers-state.html again (Requested by ap on
3046         #webkit).
3047
3048         Reverted changeset:
3049
3050         "Allow control over child order when adding nodes to the
3051         scrolling tree"
3052         https://bugs.webkit.org/show_bug.cgi?id=176914
3053         https://trac.webkit.org/changeset/239010
3054
3055 2018-12-08  Alex Christensen  <achristensen@webkit.org>
3056
3057         Don't programmatically capitalize safe browsing warning buttons
3058         https://bugs.webkit.org/show_bug.cgi?id=192531
3059         <rdar://problem/46417791>
3060
3061         Reviewed by Darin Adler.
3062
3063         * UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
3064         (makeButton):
3065
3066 2018-12-08  Alex Christensen  <achristensen@webkit.org>
3067
3068         Safe browsing warning should respect text size from settings
3069         https://bugs.webkit.org/show_bug.cgi?id=192205
3070
3071         Reviewed by Tim Horton.
3072
3073         * UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
3074         (fontWithSize):
3075         (makeButton):
3076         (-[WKSafeBrowsingWarning addContent]):
3077         (-[WKSafeBrowsingWarning showDetailsClicked]):
3078
3079 2018-12-08  Frederic Wang  <fwang@igalia.com>
3080
3081         Allow control over child order when adding nodes to the scrolling tree
3082         https://bugs.webkit.org/show_bug.cgi?id=176914
3083         <rdar://problem/46542237>
3084
3085         Reviewed by Simon Fraser.
3086
3087         Based on an earlier patch by Simon Fraser.
3088
3089         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
3090         (WebKit::RemoteScrollingCoordinatorTransaction::decode):
3091
3092 2018-12-07  Rob Buis  <rbuis@igalia.com>
3093
3094         Remove unused API in NetworkProcess
3095         https://bugs.webkit.org/show_bug.cgi?id=192415
3096
3097         Reviewed by Alex Christensen.
3098
3099         This patch removed some unused API and headers in NetworkProcess.
3100
3101         * NetworkProcess/NetworkCORSPreflightChecker.cpp:
3102         (WebKit::NetworkCORSPreflightChecker::startPreflight):
3103         * NetworkProcess/NetworkCORSPreflightChecker.h:
3104         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3105         * NetworkProcess/NetworkConnectionToWebProcess.h:
3106         * NetworkProcess/NetworkContentRuleListManager.h:
3107         * NetworkProcess/NetworkDataTask.cpp:
3108         * NetworkProcess/NetworkDataTask.h:
3109         * NetworkProcess/NetworkDataTaskBlob.cpp:
3110         * NetworkProcess/NetworkLoad.cpp:
3111         * NetworkProcess/NetworkLoad.h:
3112         * NetworkProcess/NetworkLoadChecker.cpp:
3113         * NetworkProcess/NetworkLoadChecker.h:
3114         * NetworkProcess/NetworkLoadClient.h:
3115         * NetworkProcess/NetworkLoadParameters.h:
3116         * NetworkProcess/NetworkProcess.cpp:
3117         * NetworkProcess/NetworkProcess.h:
3118         * NetworkProcess/NetworkProcessCreationParameters.h:
3119         * NetworkProcess/NetworkResourceLoadParameters.cpp:
3120         (WebKit::NetworkResourceLoadParameters::encode const):
3121         (WebKit::NetworkResourceLoadParameters::decode):
3122         * NetworkProcess/NetworkResourceLoadParameters.h:
3123         * NetworkProcess/NetworkResourceLoader.cpp:
3124         (WebKit::NetworkResourceLoader::didReceiveBuffer):
3125         * NetworkProcess/NetworkResourceLoader.h:
3126         * NetworkProcess/NetworkSession.cpp:
3127         * NetworkProcess/NetworkSession.h:
3128         * NetworkProcess/NetworkSocketStream.cpp:
3129         * NetworkProcess/NetworkSocketStream.h:
3130         * NetworkProcess/PingLoad.cpp:
3131         (WebKit::PingLoad::PingLoad):
3132         * NetworkProcess/PingLoad.h:
3133         * NetworkProcess/PreconnectTask.cpp:
3134         (WebKit::PreconnectTask::PreconnectTask):
3135         (WebKit::PreconnectTask::frameID const): Deleted.
3136         (WebKit::PreconnectTask::pageID const): Deleted.
3137         * NetworkProcess/PreconnectTask.h:
3138
3139 2018-12-07  Eric Carlson  <eric.carlson@apple.com>
3140
3141         [MediaStream] 'devicechange' event should not fire in frames that can't access capture devices
3142         https://bugs.webkit.org/show_bug.cgi?id=192511
3143         <rdar://problem/46562063>
3144
3145         Reviewed by Youenn Fablet.
3146
3147         * UIProcess/UserMediaPermissionCheckProxy.cpp:
3148         (WebKit::UserMediaPermissionCheckProxy::UserMediaPermissionCheckProxy): Remove userMediaID parameter.
3149         (WebKit::UserMediaPermissionCheckProxy::setUserMediaAccessInfo): ID not passed to callback.
3150         * UIProcess/UserMediaPermissionCheckProxy.h:
3151         (WebKit::UserMediaPermissionCheckProxy::create):
3152         (WebKit::UserMediaPermissionCheckProxy::completionHandler): Deleted.
3153
3154         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
3155         (WebKit::generateRequestID): New.
3156         (WebKit::UserMediaPermissionRequestManagerProxy::captureDevicesChanged): Don't notify if
3157         the page does not have a granted request and does not have persistent access.
3158         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): Use generateRequestID.
3159         (WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo): Change variable name.
3160         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): Use generateRequestID.
3161         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
3162
3163 2018-12-07  Saam Barati  <sbarati@apple.com>
3164
3165         WKWebProcessPlugInLoadDelegate should have API for saying which rendering events it wants to listen for
3166         https://bugs.webkit.org/show_bug.cgi?id=192473
3167
3168         Reviewed by Andy Estes.
3169
3170         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
3171         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
3172         (PageLoaderClient::layoutMilestones const):
3173
3174 2018-12-07  Youenn Fablet  <youenn@apple.com>
3175
3176         Update libwebrtc up to 0d007d7c4f
3177         https://bugs.webkit.org/show_bug.cgi?id=192316
3178
3179         Reviewed by Eric Carlson.
3180
3181         Update code base according new libwebrtc backend
3182         In particular, use directly int64_t for packet time.
3183
3184         * Configurations/WebKit.xcconfig:
3185         * NetworkProcess/webrtc/LibWebRTCSocketClient.cpp:
3186         (WebKit::LibWebRTCSocketClient::signalReadPacket):
3187         * NetworkProcess/webrtc/LibWebRTCSocketClient.h:
3188         * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
3189         * NetworkProcess/webrtc/NetworkRTCSocket.h:
3190         * WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
3191         (WebKit::LibWebRTCSocket::signalReadPacket):
3192
3193 2018-12-07  Truitt Savell  <tsavell@apple.com>
3194
3195         Unreviewed, rolling out r238947.
3196
3197         Revision caused fast/visual-viewport/tiled-drawing/zoomed-
3198         fixed-scrolling-layers-state.html to constantly fail
3199
3200         Reverted changeset:
3201
3202         "Allow control over child order when adding nodes to the
3203         scrolling tree"
3204         https://bugs.webkit.org/show_bug.cgi?id=176914
3205         https://trac.webkit.org/changeset/238947
3206
3207 2018-12-06  David Kilzer  <ddkilzer@apple.com>
3208
3209         Injected bundle for WebKitTestRunner leaks WKTypeRef objects
3210         <https://webkit.org/b/192481>
3211         <rdar://problem/46539059>
3212
3213         Reviewed by Simon Fraser.
3214
3215         Change function parameter name from `returnData[Ref]` to
3216         `returnRetainedData[Ref]` to document that the value returned is
3217         a +1 retained WKTypeRef object.
3218
3219         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
3220         (WKBundlePostSynchronousMessage):
3221         * WebProcess/InjectedBundle/API/c/WKBundle.h:
3222         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3223         (WKBundlePagePostSynchronousMessageForTesting):
3224         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3225
3226 2018-12-06  Frederic Wang  <fwang@igalia.com>
3227
3228         Allow control over child order when adding nodes to the scrolling tree
3229         https://bugs.webkit.org/show_bug.cgi?id=176914
3230
3231         Reviewed by Simon Fraser.
3232
3233         Based on an earlier patch by Simon Fraser.
3234
3235         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
3236         (WebKit::RemoteScrollingCoordinatorTransaction::decode): Make explicit that we want to append
3237         the new node at the end of child list.
3238
3239 2018-12-06  Yongjun Zhang  <yongjun_zhang@apple.com>
3240
3241         We should ignore minimumEffectiveDeviceWidth if the page specifies device-width in viewport meta-tag.
3242         https://bugs.webkit.org/show_bug.cgi?id=192377
3243         <rdar://problem/46364206>
3244
3245         Reviewed by Tim Horton.
3246
3247         Since we are using page's viewport arguments to decide the default viewport parameters and
3248         whether we can use mininum effective device width, we should always call setViewportArguments()
3249         regardless of shouldIgnoreMetaViewport settings.
3250
3251         * WebProcess/WebPage/WebPage.cpp:
3252         (WebKit::WebPage::viewportPropertiesDidChange): Always call setViewportArguments().
3253         (WebKit::WebPage::didCommitLoad): Ditto.
3254
3255 2018-12-06  Tim Horton  <timothy_horton@apple.com>
3256
3257         Web Share API: share overlay does not stick to the Safari window
3258         https://bugs.webkit.org/show_bug.cgi?id=192469
3259         <rdar://problem/46074833>
3260
3261         Reviewed by Wenson Hsieh.
3262
3263         * UIProcess/Cocoa/WKShareSheet.mm:
3264         (-[WKShareSheet sharingServicePicker:didChooseSharingService:]):
3265         (-[WKShareSheet sharingServicePicker:delegateForSharingService:]):
3266         (-[WKShareSheet sharingService:sourceWindowForShareItems:sharingContentScope:]):
3267         (-[WKShareSheet sharingService:didFailToShareItems:error:]):
3268         (-[WKShareSheet sharingService:didShareItems:]):
3269         Implement another NSSharingServicePickerDelegate method to return
3270         an *NSSharingService* delegate when needed.
3271
3272         Implement an NSSharingServiceDelegate method to return the window that
3273         the service's UI should attach to.
3274
3275         Also, instead of notifying the Web Content process when a service is picked
3276         (or not) in the NSSharingServicePicker, wait until the share has completed
3277         (or failed) to send didComplete. This both makes the return completion
3278         value more accurate (matching iOS, if you cancel the share during the
3279         recipient choice step, it will now fail), and avoids explicitly tearing
3280         down the NSSharingServicePicker too early, which breaks the UI attaching mechanism.
3281
3282 2018-12-06  Wenson Hsieh  <wenson_hsieh@apple.com>
3283
3284         [iOS] WKWebView should match UITextView behavior when editing text with an RTL keyboard
3285         https://bugs.webkit.org/show_bug.cgi?id=187554
3286         <rdar://problem/42075638>
3287
3288         Reviewed by Tim Horton.
3289
3290         Add support for automatically switching the base writing direction to the default writing direction with respect
3291         to the current keyboard in an editable WKWebView by implementing `-setBaseWritingDirection:forRange:`. On iOS 12
3292         and earlier, UIKit invokes this protocol method whenever the keyboard is changed to one with a different writing
3293         direction, although in some other versions of iOS, this only happens when first focusing an editable area.
3294
3295         Test: editing/input/ios/rtl-keyboard-input-on-focus.html
3296
3297         * Platform/spi/ios/UIKitSPI.h:
3298
3299         Declare UIKeyboardImpl IPI methods mostly for use in WebKitTestRunner (with the exception of
3300         `-setInitialDirection`, which we may invoke when we receive the first post-layout EditorState update after
3301         focusing an editable element).
3302
3303         * UIProcess/PageClient.h:
3304         * UIProcess/WebPageProxy.cpp:
3305         (WebKit::WebPageProxy::increaseListLevel):
3306         (WebKit::WebPageProxy::decreaseListLevel):
3307         (WebKit::WebPageProxy::changeListType):
3308         (WebKit::WebPageProxy::setBaseWritingDirection):
3309
3310         Drive-by style fixes: make these bail and return early if `!isValid()`.
3311
3312         (WebKit::WebPageProxy::resetStateAfterProcessExited):
3313
3314         Reset assisted node state in the UI process upon web process termination.
3315
3316         * UIProcess/WebPageProxy.h:
3317
3318         Add plumbing for `setBaseWritingDirection`, from `WebPageProxy` to `WebPage` to `Editor`.
3319
3320         * UIProcess/ios/PageClientImplIOS.h:
3321         * UIProcess/ios/PageClientImplIOS.mm:
3322         (WebKit::PageClientImpl::didReceiveEditorStateUpdateAfterFocus):
3323         * UIProcess/ios/WKContentViewInteraction.h:
3324         * UIProcess/ios/WKContentViewInteraction.mm:
3325         (-[WKContentView baseWritingDirectionForPosition:inDirection:]):
3326         (coreWritingDirection):
3327         (-[WKContentView setBaseWritingDirection:forRange:]):
3328
3329         Support `-setBaseWritingDirectionForPosition:forRange:`, but only in the case where the given range is the
3330         selected range. This is all that's currently needed to fulfill the requirements in <rdar://problem/42075638>,
3331         though we could potentially add full support for this in the future by mapping the given text range to a DOM
3332         range and moving the selection prior to setting the base writing direction.
3333
3334         (-[WKContentView _didReceiveEditorStateUpdateAfterFocus]):
3335
3336         Add a hook to notify WKContentView when the first post-layout EditorState has been received in the UI process.
3337         When this is invoked, if the web view is editable and the selection is not a range, we call into `UIKeyboardImpl`
3338         to change the initial writing direction if necessary.
3339
3340         * UIProcess/ios/WebPageProxyIOS.mm:
3341         (WebKit::WebPageProxy::startAssistingNode):
3342         (WebKit::WebPageProxy::stopAssistingNode):
3343         (WebKit::WebPageProxy::editorStateChanged):
3344         * WebProcess/WebPage/WebPage.cpp:
3345         (WebKit::WebPage::setBaseWritingDirection):
3346         * WebProcess/WebPage/WebPage.h:
3347         * WebProcess/WebPage/WebPage.messages.in:
3348
3349 2018-12-06  David Quesada  <david_quesada@apple.com>
3350
3351         -[WKProcessPool _resumeDownloadFromData:path:] should allow specifying the originating web view
3352         https://bugs.webkit.org/show_bug.cgi?id=192411
3353         rdar://problem/46492487
3354
3355         Reviewed by Alex Christensen.
3356
3357         * UIProcess/API/C/WKContext.cpp:
3358         (WKContextResumeDownload):
3359         * UIProcess/API/Cocoa/WKProcessPool.mm:
3360         (-[WKProcessPool _resumeDownloadFromData:path:originatingWebView:]):
3361         (-[WKProcessPool _resumeDownloadFromData:path:]): Deleted.
3362         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
3363         * UIProcess/WebProcessPool.cpp:
3364         (WebKit::WebProcessPool::resumeDownload):
3365          - Set the originating page of the DownloadProxy.
3366          - If the originating page is non-null, use its session ID for the download.
3367          - Remove a FIXME. It's possible to do this now by providing the web view whose session
3368            should be used for the download.
3369         * UIProcess/WebProcessPool.h:
3370
3371 2018-12-06  Jiewen Tan  <jiewen_tan@apple.com>
3372
3373         Unreviewed, a quick fix after r238919
3374
3375         Add an early return such that the error message is actually meaningful.
3376
3377         * UIProcess/WebAuthentication/Mock/MockHidService.cpp:
3378         (WebKit::MockHidService::platformStartDiscovery):
3379
3380 2018-12-06  Alex Christensen  <achristensen@webkit.org>
3381
3382         Remove unused LoaderStrategy::storeDerivedDataToCache and associated dead code
3383         https://bugs.webkit.org/show_bug.cgi?id=192452
3384
3385         Reviewed by Anders Carlsson.
3386
3387         This was introduced in r210835 but never used.
3388         It's preventing me from making the disk cache associated with a SessionID/NetworkSession.
3389
3390         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3391         (WebKit::NetworkConnectionToWebProcess::storeDerivedDataToCache): Deleted.
3392         * NetworkProcess/NetworkConnectionToWebProcess.h:
3393         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
3394         * NetworkProcess/NetworkResourceLoadParameters.cpp:
3395         (WebKit::NetworkResourceLoadParameters::encode const):
3396         (WebKit::NetworkResourceLoadParameters::decode):
3397         * NetworkProcess/NetworkResourceLoadParameters.h:
3398         * NetworkProcess/NetworkResourceLoader.cpp:
3399         (WebKit::NetworkResourceLoader::continueDidReceiveResponse):
3400         (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
3401         (WebKit::NetworkResourceLoader::continueProcessingCachedEntryAfterDidReceiveResponse): Deleted.
3402         * NetworkProcess/NetworkResourceLoader.h:
3403         * WebProcess/Network/WebLoaderStrategy.cpp:
3404         (WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
3405         (WebKit::WebLoaderStrategy::storeDerivedDataToCache): Deleted.
3406         * WebProcess/Network/WebLoaderStrategy.h:
3407         * WebProcess/Network/WebResourceLoader.cpp:
3408         (WebKit::WebResourceLoader::didRetrieveDerivedData): Deleted.
3409         * WebProcess/Network/WebResourceLoader.messages.in:
3410
3411 2018-12-06  Carlos Eduardo Ramalho  <cadubentzen@gmail.com>
3412
3413         REGRESSION(r231043): [GTK] Undefined references to WebCore::LayerRepresentation::* with -DENABLE_OPENGL=OFF builds
3414         https://bugs.webkit.org/show_bug.cgi?id=191997
3415
3416         Reviewed by Philippe Normand.
3417
3418         Fix build with -DENABLE_OPENGL=OFF and -DENABLE_VIDEO=OFF.
3419
3420         * Shared/WebEventConversion.cpp:
3421         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent): add required #if ENABLE(ASYNC_SCROLLING)
3422
3423 2018-12-05  Ryosuke Niwa  <rniwa@webkit.org>
3424
3425         REGRESSION(PSON): Process swapping code doesn't set DisplayID in WebContent process
3426         https://bugs.webkit.org/show_bug.cgi?id=192290
3427
3428         Reviewed by Simon Fraser.
3429
3430         Fixed the bug by updating the DisplayID upon attaching to a WebContent process
3431         after a process swap as well as after the previous WebContent process had crashed.
3432
3433         Unfortunately no new tests since WebKitTestRunner / DumpRenderTree should use 0 as DisplayID
3434         as they have an off-screen NSWindow. The issue that this results in no fallback for
3435         the animation timer is tracked by webkit.org/b/192448.
3436
3437         * UIProcess/Cocoa/WebViewImpl.mm:
3438         (WebKit::WebViewImpl::didRelaunchProcess):
3439
3440 2018-12-05  Youenn Fablet  <youenn@apple.com>
3441
3442         Remove a document entry from NetworkMDNSRegister::m_services when document goes away
3443         https://bugs.webkit.org/show_bug.cgi?id=192429
3444
3445         Reviewed by Eric Carlson.
3446
3447         * NetworkProcess/webrtc/NetworkMDNSRegister.cpp:
3448         (WebKit::NetworkMDNSRegister::unregisterMDNSNames):
3449         We should remove the entry to limit the size of the map.
3450
3451 2018-12-05  Jiewen Tan  <jiewen_tan@apple.com>
3452
3453         [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
3454         https://bugs.webkit.org/show_bug.cgi?id=192061
3455
3456         Reviewed by Dewei Zhu.
3457
3458         Part 1.
3459
3460         Add some loggings to determine possible causes for the flakiness.
3461
3462         * UIProcess/WebAuthentication/Cocoa/HidService.mm:
3463         (WebKit::HidService::continueAddDeviceAfterGetInfo):
3464         * UIProcess/WebAuthentication/Mock/MockHidService.cpp:
3465         (WebKit::MockHidService::platformStartDiscovery):
3466
3467 2018-12-05  Chris Dumez  <cdumez@apple.com>
3468
3469         Simplify logic inside WebPageProxy::continueNavigationInNewProcess()
3470         https://bugs.webkit.org/show_bug.cgi?id=192404
3471
3472         Reviewed by Alex Christensen.
3473
3474         Simplify get the item state from the current back/forward list item, instead of
3475         relying on WebBackForwardList::filteredItemStates().
3476
3477         * UIProcess/WebPageProxy.cpp:
3478         (WebKit::WebPageProxy::continueNavigationInNewProcess):
3479
3480 2018-12-05  Youenn Fablet  <youenn@apple.com>
3481
3482         Enable the possibility to do video capture in UIProcess
3483         https://bugs.webkit.org/show_bug.cgi?id=192394
3484
3485         Reviewed by Eric Carlson.
3486
3487         Add two web preferences to toggle audio/video capture in UIProcess or WebProcess.
3488         Add mechanism for video capture that was not implemented yet.
3489
3490         * Shared/WebPreferences.yaml:
3491         * Shared/WebPreferencesDefaultValues.h:
3492         * Shared/WebProcessCreationParameters.cpp:
3493         (WebKit::WebProcessCreationParameters::encode const):
3494         (WebKit::WebProcessCreationParameters::decode):
3495         * Shared/WebProcessCreationParameters.h:
3496         * UIProcess/API/APIProcessPoolConfiguration.h:
3497         * UIProcess/API/C/WKPreferences.cpp:
3498         (WKPreferencesSetCaptureAudioInUIProcessEnabled):
3499         (WKPreferencesGetCaptureAudioInUIProcessEnabled):
3500         (WKPreferencesSetCaptureVideoInUIProcessEnabled):
3501         (WKPreferencesGetCaptureVideoInUIProcessEnabled):
3502         * UIProcess/API/C/WKPreferencesRef.h:
3503         * UIProcess/WebPreferences.cpp:
3504         (WebKit::WebPreferences::updateBoolValueForInternalDebugFeatureKey):
3505         * UIProcess/WebProcessPool.cpp:
3506         (WebKit::WebProcessPool::initializeNewWebProcess):
3507         (WebKit::WebProcessPool::createWebPage):
3508         * WebProcess/cocoa/UserMediaCaptureManager.cpp:
3509         (WebKit::UserMediaCaptureManager::initialize):
3510
3511 2018-12-05  Alex Christensen  <achristensen@webkit.org>
3512
3513         Make WebsiteDataStoreConfiguration a proper API object
3514         https://bugs.webkit.org/show_bug.cgi?id=192380
3515
3516         Reviewed by Youenn Fablet.
3517
3518         In the immediate future I'll need to add things to _WKWebsiteDataStoreConfiguration.
3519         Instead of making ivars, setting them, copying them to a local object, make this a wrapper of an API::Object
3520         like all our other ObjC API objects are.
3521
3522         * Shared/API/APIObject.h:
3523         (API::Object::wrapper const):
3524         (API::Object::wrapper): Deleted.
3525         * Shared/Cocoa/APIObject.mm:
3526         (API::Object::ref const):
3527         (API::Object::deref const):
3528         (API::Object::newObject):
3529         (API::Object::ref): Deleted.
3530         (API::Object::deref): Deleted.
3531         * Sources.txt:
3532         * UIProcess/API/APIProcessPoolConfiguration.cpp:
3533         (API::ProcessPoolConfiguration::createWithWebsiteDataStoreConfiguration):
3534         * UIProcess/API/APIProcessPoolConfiguration.h:
3535         * UIProcess/API/APIWebsiteDataStore.cpp:
3536         (API::WebsiteDataStore::createLegacy):
3537         (API::WebsiteDataStore::WebsiteDataStore):
3538         (API::WebsiteDataStore::legacyDefaultDataStoreConfiguration):
3539         * UIProcess/API/APIWebsiteDataStore.h:
3540         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
3541         (API::WebsiteDataStore::defaultDataStoreConfiguration):
3542         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
3543         (-[WKWebsiteDataStore _initWithConfiguration:]):
3544         * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:
3545         (-[_WKWebsiteDataStoreConfiguration _webStorageDirectory]):
3546         (-[_WKWebsiteDataStoreConfiguration _setWebStorageDirectory:]):
3547         (-[_WKWebsiteDataStoreConfiguration _indexedDBDatabaseDirectory]):
3548         (-[_WKWebsiteDataStoreConfiguration _setIndexedDBDatabaseDirectory:]):
3549         (-[_WKWebsiteDataStoreConfiguration _webSQLDatabaseDirectory]):
3550         (-[_WKWebsiteDataStoreConfiguration _setWebSQLDatabaseDirectory:]):
3551         (-[_WKWebsiteDataStoreConfiguration _cookieStorageFile]):
3552         (-[_WKWebsiteDataStoreConfiguration _setCookieStorageFile:]):
3553         (-[_WKWebsiteDataStoreConfiguration _resourceLoadStatisticsDirectory]):
3554         (-[_WKWebsiteDataStoreConfiguration _setResourceLoadStatisticsDirectory:]):
3555         (-[_WKWebsiteDataStoreConfiguration _cacheStorageDirectory]):
3556         (-[_WKWebsiteDataStoreConfiguration _setCacheStorageDirectory:]):
3557         (-[_WKWebsiteDataStoreConfiguration _serviceWorkerRegistrationDirectory]):
3558         (-[_WKWebsiteDataStoreConfiguration _setServiceWorkerRegistrationDirectory:]):
3559         (-[_WKWebsiteDataStoreConfiguration setSourceApplicationBundleIdentifier:]):
3560         (-[_WKWebsiteDataStoreConfiguration sourceApplicationBundleIdentifier]):
3561         (-[_WKWebsiteDataStoreConfiguration sourceApplicationSecondaryIdentifier]):
3562         (-[_WKWebsiteDataStoreConfiguration setSourceApplicationSecondaryIdentifier:]):
3563         (-[_WKWebsiteDataStoreConfiguration _apiObject]):
3564         * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfigurationInternal.h: Added.
3565         * UIProcess/Network/NetworkProcessProxy.cpp:
3566         (WebKit::NetworkProcessProxy::retrieveCacheStorageParameters):
3567         * UIProcess/WebProcessPool.cpp:
3568         (WebKit::legacyWebsiteDataStoreConfiguration):
3569         (WebKit::WebProcessPool::mayHaveRegisteredServiceWorkers):
3570         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
3571         (WebKit::WebsiteDataStore::parameters):
3572         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3573         (WebKit::WebsiteDataStore::create):
3574         (WebKit::WebsiteDataStore::WebsiteDataStore):
3575         (WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary):
3576         (WebKit::WebsiteDataStore::fetchDataAndApply):
3577         (WebKit::WebsiteDataStore::removeData):
3578         (WebKit::WebsiteDataStore::parameters):
3579         (WebKit::WebsiteDataStore::Configuration::Configuration): Deleted.
3580         * UIProcess/WebsiteData/WebsiteDataStore.h:
3581         (WebKit::WebsiteDataStore::cacheStoragePerOriginQuota const):
3582         (WebKit::WebsiteDataStore::setCacheStoragePerOriginQuota):
3583         (WebKit::WebsiteDataStore::cacheStorageDirectory const):
3584         (WebKit::WebsiteDataStore::setCacheStorageDirectory):
3585         (WebKit::WebsiteDataStore::serviceWorkerRegistrationDirectory const):
3586         (WebKit::WebsiteDataStore::setServiceWorkerRegistrationDirectory):
3587         (WebKit::WebsiteDataStore::resolvedApplicationCacheDirectory const):
3588         (WebKit::WebsiteDataStore::resolvedMediaCacheDirectory const):
3589         (WebKit::WebsiteDataStore::resolvedMediaKeysDirectory const):
3590         (WebKit::WebsiteDataStore::resolvedDatabaseDirectory const):
3591         (WebKit::WebsiteDataStore::resolvedJavaScriptConfigurationDirectory const):
3592         (WebKit::WebsiteDataStore::resolvedCookieStorageFile const):
3593         (WebKit::WebsiteDataStore::resolvedIndexedDatabaseDirectory const):
3594         (WebKit::WebsiteDataStore::resolvedServiceWorkerRegistrationDirectory const):
3595         (WebKit::WebsiteDataStore::resolvedResourceLoadStatisticsDirectory const):
3596         * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp: Added.
3597         (WebKit::WebsiteDataStoreConfiguration::WebsiteDataStoreConfiguration):
3598         * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h: Added.
3599         (WebKit::WebsiteDataStoreConfiguration::create):
3600         (WebKit::WebsiteDataStoreConfiguration::cacheStoragePerOriginQuota):
3601         (WebKit::WebsiteDataStoreConfiguration::setCacheStoragePerOriginQuota):
3602         (WebKit::WebsiteDataStoreConfiguration::applicationCacheDirectory const):
3603         (WebKit::WebsiteDataStoreConfiguration::setApplicationCacheDirectory):
3604         (WebKit::WebsiteDataStoreConfiguration::mediaCacheDirectory const):
3605         (WebKit::WebsiteDataStoreConfiguration::setMediaCacheDirectory):
3606         (WebKit::WebsiteDataStoreConfiguration::mediaKeysStorageDirectory const):
3607         (WebKit::WebsiteDataStoreConfiguration::setMediaKeysStorageDirectory):
3608         (WebKit::WebsiteDataStoreConfiguration::javaScriptConfigurationDirectory const):
3609         (WebKit::WebsiteDataStoreConfiguration::setJavaScriptConfigurationDirectory):
3610         (WebKit::WebsiteDataStoreConfiguration::webStorageDirectory const):
3611         (WebKit::WebsiteDataStoreConfiguration::setWebStorageDirectory):
3612         (WebKit::WebsiteDataStoreConfiguration::indexedDBDatabaseDirectory const):
3613         (WebKit::WebsiteDataStoreConfiguration::setIndexedDBDatabaseDirectory):
3614         (WebKit::WebsiteDataStoreConfiguration::webSQLDatabaseDirectory const):
3615         (WebKit::WebsiteDataStoreConfiguration::setWebSQLDatabaseDirectory):
3616         (WebKit::WebsiteDataStoreConfiguration::localStorageDirectory const):
3617         (WebKit::WebsiteDataStoreConfiguration::setLocalStorageDirectory):
3618         (WebKit::WebsiteDataStoreConfiguration::cookieStorageFile const):
3619         (WebKit::WebsiteDataStoreConfiguration::setCookieStorageFile):
3620         (WebKit::WebsiteDataStoreConfiguration::resourceLoadStatisticsDirectory const):
3621         (WebKit::WebsiteDataStoreConfiguration::setResourceLoadStatisticsDirectory):
3622         (WebKit::WebsiteDataStoreConfiguration::networkCacheDirectory const):
3623         (WebKit::WebsiteDataStoreConfiguration::setNetworkCacheDirectory):
3624         (WebKit::WebsiteDataStoreConfiguration::cacheStorageDirectory const):
3625         (WebKit::WebsiteDataStoreConfiguration::setCacheStorageDirectory):
3626         (WebKit::WebsiteDataStoreConfiguration::applicationCacheFlatFileSubdirectoryName const):
3627         (WebKit::WebsiteDataStoreConfiguration::setApplicationCacheFlatFileSubdirectoryName):
3628         (WebKit::WebsiteDataStoreConfiguration::serviceWorkerRegistrationDirectory const):
3629         (WebKit::WebsiteDataStoreConfiguration::setServiceWorkerRegistrationDirectory):
3630         (WebKit::WebsiteDataStoreConfiguration::sourceApplicationBundleIdentifier const):
3631         (WebKit::WebsiteDataStoreConfiguration::setSourceApplicationBundleIdentifier):
3632         (WebKit::WebsiteDataStoreConfiguration::sourceApplicationSecondaryIdentifier const):
3633         (WebKit::WebsiteDataStoreConfiguration::setSourceApplicationSecondaryIdentifier):
3634         * WebKit.xcodeproj/project.pbxproj:
3635
3636 2018-12-05  Wenson Hsieh  <wenson_hsieh@apple.com>
3637
3638         Turn WritingDirection into an enum class
3639         https://bugs.webkit.org/show_bug.cgi?id=192401
3640         Work towards <rdar://problem/42075638>
3641
3642         Reviewed by Dan Bernstein.
3643
3644         Change WritingDirection from an enum to an enum class. No change in behavior.
3645
3646         * WebProcess/WebPage/WebFrame.cpp:
3647         (WebKit::WebFrame::setTextDirection):
3648
3649 2018-12-05  Rob Buis  <rbuis@igalia.com>
3650
3651         [Mac] HEAD requests changed to GET after 301, 302, and 303 redirections (http/tests/xmlhttprequest/head-redirection.html)
3652         https://bugs.webkit.org/show_bug.cgi?id=114965
3653
3654         Reviewed by Frédéric Wang.
3655
3656         HEAD requests should not be changed to GET after 303 redirects, see [1].
3657         This was fixed earlier for GTK [2].
3658
3659         Behavior matches Firefox and Chrome.
3660
3661         [1] http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21#section-7.4
3662         [2] https://bugs.webkit.org/show_bug.cgi?id=110127
3663
3664         Tests: web-platform-tests/fetch/api/redirect/redirect-method.html
3665                web-platform-tests/fetch/api/redirect/redirect-method-worker.html
3666                http/tests/xmlhttprequest/head-redirection.html
3667
3668         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
3669         (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
3670
3671 2018-12-04  Fujii Hironori  <Hironori.Fujii@sony.com>
3672
3673         Remove using namespace WebCore and WebKit under WebKit/Shared/API
3674         https://bugs.webkit.org/show_bug.cgi?id=192352
3675
3676         Reviewed by Alex Christensen.
3677
3678         Removed using namespace statements, and use namespace prefix
3679         instead.
3680
3681         * Shared/API/APIURLRequest.cpp:
3682         * Shared/API/APIURLResponse.cpp:
3683         * Shared/API/c/WKArray.cpp:
3684         * Shared/API/c/WKCertificateInfo.cpp:
3685         * Shared/API/c/WKConnectionRef.cpp:
3686         * Shared/API/c/WKContextMenuItem.cpp:
3687         * Shared/API/c/WKData.cpp:
3688         * Shared/API/c/WKDictionary.cpp:
3689         * Shared/API/c/WKErrorRef.cpp:
3690         * Shared/API/c/WKGeometry.cpp:
3691         * Shared/API/c/WKImage.cpp:
3692         * Shared/API/c/WKMutableArray.cpp:
3693         * Shared/API/c/WKMutableDictionary.cpp:
3694         * Shared/API/c/WKNumber.cpp:
3695         * Shared/API/c/WKPluginInformation.cpp:
3696         * Shared/API/c/WKRenderLayer.cpp:
3697         * Shared/API/c/WKRenderObject.cpp:
3698         * Shared/API/c/WKSecurityOriginRef.cpp:
3699         * Shared/API/c/WKSerializedScriptValue.cpp:
3700         * Shared/API/c/WKString.cpp:
3701         * Shared/API/c/WKType.cpp:
3702         * Shared/API/c/WKURL.cpp:
3703         * Shared/API/c/WKURLRequest.cpp:
3704         * Shared/API/c/WKURLResponse.cpp:
3705         * Shared/API/c/WKUserContentURLPattern.cpp:
3706         * Shared/API/c/cairo/WKImageCairo.cpp:
3707         * Shared/API/c/curl/WKCertificateInfoCurl.cpp:
3708
3709 2018-12-04  Alex Christensen  <achristensen@webkit.org>
3710
3711         Remove source application identifiers from NetworkProcessCreationParameters
3712         https://bugs.webkit.org/show_bug.cgi?id=192372
3713
3714         Reviewed by Brady Eidson.
3715
3716         The _WKWebProcessPoolConfiguration way of setting these was deprecated in http://trac.webkit.org/r235127
3717         The replacement was adopted in <rdar://problem/46359330>
3718         The transition process is done!  Time to remove the old code.
3719
3720         * NetworkProcess/NetworkProcessCreationParameters.cpp:
3721         (WebKit::NetworkProcessCreationParameters::encode const):
3722         (WebKit::NetworkProcessCreationParameters::decode):
3723         * NetworkProcess/NetworkProcessCreationParameters.h:
3724         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3725         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
3726         * NetworkProcess/cocoa/NetworkSessionCocoa.h:
3727         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
3728         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
3729         (WebKit::globalSourceApplicationAuditTokenData): Deleted.
3730         (WebKit::globalSourceApplicationBundleIdentifier): Deleted.
3731         (WebKit::globalSourceApplicationSecondaryIdentifier): Deleted.
3732         (WebKit::NetworkSessionCocoa::setSourceApplicationAuditTokenData): Deleted.
3733         (WebKit::NetworkSessionCocoa::setSourceApplicationBundleIdentifier): Deleted.
3734         (WebKit::NetworkSessionCocoa::setSourceApplicationSecondaryIdentifier): Deleted.
3735         * UIProcess/API/APIProcessPoolConfiguration.cpp:
3736         (API::ProcessPoolConfiguration::copy):
3737         * UIProcess/API/APIProcessPoolConfiguration.h:
3738         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
3739         (-[_WKProcessPoolConfiguration sourceApplicationBundleIdentifier]):
3740         (-[_WKProcessPoolConfiguration setSourceApplicationBundleIdentifier:]):
3741         (-[_WKProcessPoolConfiguration sourceApplicationSecondaryIdentifier]):
3742         (-[_WKProcessPoolConfiguration setSourceApplicationSecondaryIdentifier:]):
3743         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
3744         (WebKit::WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard):
3745         (WebKit::toPKPaymentRequest):
3746         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3747         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
3748         * UIProcess/WebsiteData/WebsiteDataStore.h:
3749         (WebKit::WebsiteDataStore::configuration):
3750
3751 2018-12-04  Youenn Fablet  <youenn@apple.com>
3752
3753         Calling getUserMedia in a link that was opened with target="_blank" does not work the second time
3754         https://bugs.webkit.org/show_bug.cgi?id=188088
3755         <rdar://problem/42681448>
3756
3757         Reviewed by Eric Carlson.
3758
3759         On closing a page, we need to make sure to consider that the capture is ended,
3760         as otherwise WebPageProxy will not get noticed from WebPage, since WebPageProxy is no longer an IPC receiver.
3761
3762         * UIProcess/UserMediaProcessManager.cpp:
3763         (WebKit::UserMediaProcessManager::endedCaptureSession):
3764         * UIProcess/WebPageProxy.cpp:
3765         (WebKit::WebPageProxy::close):
3766
3767 2018-12-04  Chris Dumez  <cdumez@apple.com>
3768
3769         Regression(r238817) PSON Page Cache API tests are failing
3770         https://bugs.webkit.org/show_bug.cgi?id=192348
3771
3772         Reviewed by Alex Christensen.
3773
3774         Before suspending a WebProcess on iOS, we normally fake a memory pressure signal
3775         so that the suspended process uses as little memory as possible while suspended.
3776         Among other things, this will clear the page cache. This is an issue in the case
3777         of process-swap on navigation because we keep suspended web processes around to
3778         keep Page Cache functional.
3779
3780         To address the issue, when a WebProcess is about to get suspended, we check if
3781         the process has any suspended WebPage (WebPage used for PSON PageCache support)
3782         and we bypass the PageCache clearing if it does.
3783
3784         Our API tests did not catch this before r238817 because the NavigationState's
3785         assertion was preventing the old WebProcesses from suspending for 3 seconds,
3786         which was enough for those tests to complete.
3787
3788         * UIProcess/SuspendedPageProxy.cpp:
3789         (WebKit::SuspendedPageProxy::SuspendedPageProxy):
3790         (WebKit::SuspendedPageProxy::didFinishLoad):
3791         * UIProcess/SuspendedPageProxy.h:
3792         Take a background assertion until the suspension load is complete, to make sure
3793         the suspension load has a chance to complete before the process gets suspended.
3794
3795         * WebProcess/WebProcess.cpp:
3796         (WebKit::WebProcess::initializeWebProcess):
3797         (WebKit::WebProcess::hasPageRequiringPageCacheWhileSuspended const):
3798         (WebKit::WebProcess::actualPrepareToSuspend):
3799         * WebProcess/WebProcess.h:
3800
3801 2018-12-04  Youenn Fablet  <youenn@apple.com>
3802
3803         Device orientation may be wrong on page reload after crash
3804         https://bugs.webkit.org/show_bug.cgi?id=192349
3805         <rdar://problem/46359466>
3806
3807         Reviewed by Eric Carlson.
3808
3809         On page crash, the process is relaunched and the page is reloaded.
3810         At that point, the orientation information of the page is not reset until the next device orientation change.
3811         To fix that, add the device orientation to the page creation parameters so that we pass it everytime we create a page.
3812         Covered by manual testing.
3813
3814         * Shared/WebPageCreationParameters.cpp:
3815         (WebKit::WebPageCreationParameters::encode const):
3816         (WebKit::WebPageCreationParameters::decode):
3817         * Shared/WebPageCreationParameters.h:
3818         * UIProcess/WebPageProxy.cpp:
3819         (WebKit::WebPageProxy::creationParameters):
3820         * WebProcess/WebPage/WebPage.cpp:
3821
3822 2018-12-04  Carlos Eduardo Ramalho  <cadubentzen@gmail.com>
3823
3824         [WPE] Add gtk-doc
3825         https://bugs.webkit.org/show_bug.cgi?id=178900
3826
3827         Reviewed by Michael Catanzaro.
3828
3829         Add gtk-doc to WPE port. This patch tries to reuse as much code from
3830         WebKitGTK+ as possible.
3831
3832         * PlatformWPE.cmake: Write variables to gtkdoc-wpe.cfg and gtkdoc-webextensions that is used by python script later.
3833         * UIProcess/API/wpe/WebKitWebContext.h: Placed sandbox functions in the same location as in the WebKitGTK+ for consistency.
3834         * UIProcess/API/wpe/docs/wpe-0.1-sections.txt: Added.
3835         * UIProcess/API/wpe/docs/wpe-docs.sgml: Added.
3836         * WebProcess/InjectedBundle/API/wpe/WebKitWebPage.h: Placed webkit_web_page_get_dom_document
3837         in the same position as in the WebKitGTK+ for consistency.
3838         * WebProcess/InjectedBundle/API/wpe/docs/wpe-webextensions-0.1-sections.txt: Added.
3839         * WebProcess/InjectedBundle/API/wpe/docs/wpe-webextensions-docs.sgml: Added.
3840
3841 2018-12-04  Carlos Garcia Campos  <cgarcia@igalia.com>
3842
3843         [SOUP] Move URLSoup back to WebCore after r238771
3844         https://bugs.webkit.org/show_bug.cgi?id=192306
3845
3846         Reviewed by Michael Catanzaro.
3847
3848         Include GUniquePtrSoup from WebCore again and fix several build failures that showed up after removing the soup
3849         includes from URL header.
3850
3851         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
3852         (WebKit::NetworkDataTaskSoup::tlsConnectionAcceptCertificate):
3853         * PluginProcess/PluginProcess.cpp:
3854         * Shared/API/glib/WebKitURIRequest.cpp:
3855         * Shared/API/glib/WebKitURIResponse.cpp:
3856         * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp:
3857         * UIProcess/API/glib/WebKitURISchemeRequest.cpp:
3858         (webkit_uri_scheme_request_finish_error): Use soupURIToURL().
3859         * UIProcess/API/glib/WebKitWebView.cpp:
3860         (webkit_web_view_load_uri): Use soupURIToURL().
3861         * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
3862         * UIProcess/Launcher/glib/BubblewrapLauncher.h:
3863         * UIProcess/Launcher/glib/FlatpakLauncher.cpp:
3864         * UIProcess/Launcher/glib/FlatpakLauncher.h:
3865
3866 2018-12-04  Tim Horton  <timothy_horton@apple.com>
3867
3868         Fix the watchOS build; stop unnecessarily linking CorePDF
3869         https://bugs.webkit.org/show_bug.cgi?id=192356
3870         <rdar://problem/46427844>
3871
3872         Reviewed by Wenson Hsieh.
3873
3874         * Configurations/WebKit.xcconfig:
3875         * Platform/spi/ios/CorePDFSPI.h:
3876
3877 2018-12-03  Tim Horton  <timothy_horton@apple.com>
3878
3879         Make it possible to disable animated keyboard scrolling behavior
3880         https://bugs.webkit.org/show_bug.cgi?id=192331
3881         <rdar://problem/45586859>
3882
3883         Reviewed by Simon Fraser.
3884
3885         * UIProcess/API/Cocoa/WKWebView.mm:
3886         * UIProcess/ios/WKKeyboardScrollingAnimator.mm:
3887         (-[WKKeyboardScrollingAnimator invalidate]):
3888         (-[WKKeyboardScrollingAnimator beginWithEvent:]):
3889         (-[WKKeyboardScrollingAnimator stopAnimatedScroll]):
3890         (-[WKKeyboardScrollingAnimator willStartInteractiveScroll]):
3891         (-[WKKeyboardScrollingAnimator startRepeatTimerIfNeeded]):
3892         (-[WKKeyboardScrollingAnimator stopRepeatTimer]):
3893         (-[WKKeyboardScrollingAnimator performDiscreteScroll]):
3894         (-[WKKeyboardScrollViewAnimator scrollToContentOffset:animated:]):
3895         (-[WKKeyboardScrollViewAnimator scrollWithScrollToExtentAnimationTo:]):
3896         * WebKit.xcodeproj/project.pbxproj:
3897
3898 2018-12-03  Fujii Hironori  <Hironori.Fujii@sony.com>
3899
3900         Remove "using namespace WebKit" under Source/WebKit/WebProcess/InjectedBundle/API
3901         https://bugs.webkit.org/show_bug.cgi?id=192301
3902
3903         Reviewed by Alex Christensen.
3904
3905         Removed "using namespace WebKit" statement, and use "WebKit::"
3906         namespace prefix instead.
3907
3908         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
3909         * WebProcess/InjectedBundle/API/c/WKBundleBackForwardList.cpp:
3910         * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
3911         * WebProcess/InjectedBundle/API/c/WKBundleDOMWindowExtension.cpp:
3912         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3913         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
3914         * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
3915         * WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp:
3916         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
3917         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3918         * WebProcess/InjectedBundle/API/c/WKBundlePageBanner.cpp:
3919         * WebProcess/InjectedBundle/API/c/WKBundlePageGroup.cpp:
3920         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
3921         * WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.cpp:
3922         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
3923
3924 2018-12-03  Chris Dumez  <cdumez@apple.com>
3925
3926         Regression(PSON) Google OAuth is broken in private sessions
3927         https://bugs.webkit.org/show_bug.cgi?id=192337
3928         <rdar://problem/46353558>
3929
3930         Reviewed by Alex Christensen.
3931
3932         In WebPageProxy::swapToWebProcess(), we would call removeWebPage() on the old WebProcessProxy and then
3933         addExistingWebPage() on the new WebProcessProxy, as you would expect in case of process swap.
3934
3935         The issue is that WebProcessProxy::removeWebPage() calls WebProcessPool::pageEndUsingWebsiteDataStore()
3936         which would cause the session to get destroyed assuming this was the last page using it. We would
3937         therefore lose session cookies after a process-swap in private session.
3938
3939         To address the issue, a parameter to WebProcessPool::pageEndUsingWebsiteDataStore() and
3940         WebProcessPool::pageBeginUsingWebsiteDataStore() to control if we want to tell the WebProcessPool
3941         about the page beginning / ending its use of the session. In the case of a process-swap, we make
3942         sure the process pool is not notified.
3943
3944         * UIProcess/WebPageProxy.cpp:
3945         (WebKit::WebPageProxy::reattachToWebProcess):
3946         (WebKit::WebPageProxy::swapToWebProcess):
3947         (WebKit::WebPageProxy::finishAttachingToWebProcess):
3948         (WebKit::WebPageProxy::close):
3949         * UIProcess/WebProcessProxy.cpp:
3950         (WebKit::WebProcessProxy::createWebPage):
3951         (WebKit::WebProcessProxy::addExistingWebPage):
3952         (WebKit::WebProcessProxy::removeWebPage):
3953         * UIProcess/WebProcessProxy.h:
3954
3955 2018-12-03  Chris Dumez  <cdumez@apple.com>
3956
3957         [PSON] Request by the client to process-swap is ignored if the window has an opener
3958         https://bugs.webkit.org/show_bug.cgi?id=192267
3959         <rdar://problem/46386886>
3960
3961         Reviewed by Brady Eidson.
3962
3963         If the client forces a process-swap, we should process-swap, even if the browsing
3964         context has an opener (or openees). Previously, we would only bypass the cross-site
3965         check, not the openee / openees checks.
3966
3967         The issue when doing so is that the openee still has a opener link to the window
3968         in the old process. They would see that the window is still there and navigated
3969         to 'about:blank' due to our page suspension logic. To address the issue, we no
3970         longer suspend the old WebPage if the process swap was forced by the client and
3971         we make sure that the old WebPage gets closed.
3972
3973         * UIProcess/WebPageProxy.cpp:
3974         (WebKit::WebPageProxy::suspendCurrentPageIfPossible):
3975         (WebKit::WebPageProxy::swapToWebProcess):
3976         (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
3977         (WebKit::WebPageProxy::continueNavigationInNewProcess):
3978         * UIProcess/WebPageProxy.h:
3979         * UIProcess/WebProcessPool.cpp:
3980         (WebKit::WebProcessPool::processForNavigationInternal):
3981
3982 2018-12-03  Keith Rollin  <krollin@apple.com>
3983
3984         Add .xcfilelist files
3985         https://bugs.webkit.org/show_bug.cgi?id=192082
3986         <rdar://problem/46312533>
3987
3988         Reviewed by Brent Fulgham.
3989
3990         Add .xcfilelist files for Generate Derived Sources and Generate
3991         Unified Sources build phases in Xcode. These are just being staged for
3992         now; they'll be added to the Xcode projects later.
3993
3994         * DerivedSources-input.xcfilelist: Added.
3995         * DerivedSources-output.xcfilelist: Added.
3996         * UnifiedSources-input.xcfilelist: Added.
3997         * UnifiedSources-output.xcfilelist: Added.
3998
3999 2018-12-03  Zalan Bujtas  <zalan@apple.com>
4000
4001         [iOS] Unreviewed build fix.
4002
4003         * Platform/Logging.h:
4004
4005 2018-12-03  Alex Christensen  <achristensen@webkit.org>
4006
4007         Remove unused NetworkProcessCreationParameters.diskCacheSizeOverride
4008         https://bugs.webkit.org/show_bug.cgi?id=192246
4009
4010         Reviewed by Chris Dumez.
4011
4012         The last use of this functionality was removed in rdar://problem/46344871
4013
4014         * NetworkProcess/NetworkProcess.cpp:
4015         (WebKit::NetworkProcess::initializeNetworkProcess):
4016         (WebKit::NetworkProcess::setCacheModel):
4017         * NetworkProcess/NetworkProcess.h:
4018         * NetworkProcess/NetworkProcessCreationParameters.cpp:
4019         (WebKit::NetworkProcessCreationParameters::encode const):
4020         (WebKit::NetworkProcessCreationParameters::decode):
4021         * NetworkProcess/NetworkProcessCreationParameters.h:
4022         * UIProcess/API/APIProcessPoolConfiguration.cpp:
4023         (API::ProcessPoolConfiguration::copy):
4024     &