Make SessionStorage work with process swapping.
[WebKit-https.git] / Source / WebKit / ChangeLog
1 2018-04-03  Brady Eidson  <beidson@apple.com>
2
3         Make SessionStorage work with process swapping.
4         https://bugs.webkit.org/show_bug.cgi?id=184270
5
6         Reviewed by Andy Estes.
7
8         Due to a minor process accounting error, WebPageProxys weren't always being reconnected with their
9         WebsiteDataStore's StorageManager when doing process swaps.
10
11         Fix that error, and SessionStorage "just works."
12
13         * UIProcess/WebPageProxy.cpp:
14         (WebKit::WebPageProxy::webProcessWillShutDown):
15         (WebKit::WebPageProxy::processDidTerminate): For NavigationSwap termination, make sure to tell the 
16           process lifetime tracker that this page was removed.
17
18         * UIProcess/WebProcessLifetimeObserver.h:
19         (WebKit::WebProcessLifetimeObserver::webPageWasInvalidated): Renamed from "webPageWasRemoved"
20         (WebKit::WebProcessLifetimeObserver::webPageWasRemoved): Deleted.
21
22         * UIProcess/WebProcessLifetimeTracker.cpp:
23         (WebKit::WebProcessLifetimeTracker::webPageLeavingWebProcess): Renamed from "webProcessWillShutDown"
24         (WebKit::WebProcessLifetimeTracker::pageWasInvalidated):
25         (WebKit::WebProcessLifetimeTracker::webProcessWillShutDown): Deleted.
26         * UIProcess/WebProcessLifetimeTracker.h:
27
28         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
29         (WebKit::WebsiteDataStore::webPageWasInvalidated):
30         (WebKit::WebsiteDataStore::webPageWasRemoved): Deleted.
31         * UIProcess/WebsiteData/WebsiteDataStore.h:
32
33 2018-04-03  Commit Queue  <commit-queue@webkit.org>
34
35         Unreviewed, rolling out r230210.
36         https://bugs.webkit.org/show_bug.cgi?id=184277
37
38         it is breaking internal bots (Requested by youenn on #webkit).
39
40         Reverted changeset:
41
42         "Make NetworkProcess get ContentBlocker information from
43         UIProcess"
44         https://bugs.webkit.org/show_bug.cgi?id=184205
45         https://trac.webkit.org/changeset/230210
46
47 2018-04-03  Wenson Hsieh  <wenson_hsieh@apple.com>
48
49         [Extra zoom mode] Update time picker to use platform view controller
50         https://bugs.webkit.org/show_bug.cgi?id=184252
51         <rdar://problem/38804795>
52
53         Reviewed by Andy Estes.
54
55         Adjust for some small WKTimePickerViewController changes, and remove some files that we no longer need.
56
57         * UIProcess/ios/WKContentViewInteraction.mm:
58         (-[WKContentView presentViewControllerForCurrentAssistedNode]):
59         (-[WKContentView textInputController:didCommitText:]): Deleted.
60         (-[WKContentView textInputController:didCommitText:withSuggestion:]): Deleted.
61         (-[WKContentView textInputControllerDidRequestDismissal:]): Deleted.
62         * UIProcess/ios/forms/WKTextFormControlViewController.h: Removed.
63         * UIProcess/ios/forms/WKTextFormControlViewController.mm: Removed.
64         * UIProcess/ios/forms/WKTextSuggestionButton.h: Removed.
65         * UIProcess/ios/forms/WKTextSuggestionButton.mm: Removed.
66         * WebKit.xcodeproj/project.pbxproj:
67
68 2018-04-03  Ross Kirsling  <ross.kirsling@sony.com>
69
70         Xcode prepends line comments from WTF/Compiler.h to *.sb files
71         https://bugs.webkit.org/show_bug.cgi?id=184166
72
73         Reviewed by Brent Fulgham.
74
75         * DerivedSources.make:
76         Strip ;-comments from *.sb.in files before preprocessing so we can stop treating Platform.h/Compiler.h as C89.
77
78 2018-04-03  Chris Dumez  <cdumez@apple.com>
79
80         Drop MainFrame class
81         https://bugs.webkit.org/show_bug.cgi?id=184191
82
83         Reviewed by Darin Adler.
84
85         Drop MainFrame class and move contents into Page / Frame since there is a 1:1
86         relationship between the Page and the MainFrame.
87
88         This is ground work for introducing LocalFrame / RemoteFrame concepts.
89
90         * Shared/WebRenderLayer.cpp:
91         * Shared/WebRenderObject.cpp:
92         * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
93         (WebKit::WebPaymentCoordinator::paymentCoordinator):
94         * WebProcess/Automation/WebAutomationSessionProxy.cpp:
95         * WebProcess/FullScreen/WebFullScreenManager.cpp:
96         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
97         (WKBundlePageInstallPageOverlay):
98         (WKBundlePageUninstallPageOverlay):
99         (WKBundlePageInstallPageOverlayWithAnimation):
100         (WKBundlePageUninstallPageOverlayWithAnimation):
101         * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
102         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
103         * WebProcess/InjectedBundle/InjectedBundle.cpp:
104         * WebProcess/Plugins/PDF/PDFPlugin.mm:
105         * WebProcess/Plugins/PluginView.cpp:
106         * WebProcess/Plugins/WebPluginInfoProvider.cpp:
107         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
108         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
109         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
110         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
111         (WebKit::WebInspectorClient::~WebInspectorClient):
112         (WebKit::WebInspectorClient::highlight):
113         (WebKit::WebInspectorClient::hideHighlight):
114         (WebKit::WebInspectorClient::showPaintRect):
115         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
116         * WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp:
117         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
118         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
119         * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
120         * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
121         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
122         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
123         * WebProcess/WebPage/FindController.cpp:
124         (WebKit::FindController::updateFindUIAfterPageScroll):
125         (WebKit::FindController::hideFindUI):
126         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm:
127         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
128         (WebKit::RemoteLayerTreeDrawingArea::updatePreferences):
129         * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
130         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
131         * WebProcess/WebPage/WebFrame.cpp:
132         * WebProcess/WebPage/WebInspector.cpp:
133         * WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.cpp:
134         * WebProcess/WebPage/WebPage.cpp:
135         (WebKit::WebPage::mainFrame const):
136         (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
137         (WebKit::WebPage::plugInIntersectsSearchRect):
138         * WebProcess/WebPage/WebPage.h:
139         * WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp:
140         * WebProcess/WebPage/ios/FindControllerIOS.mm:
141         * WebProcess/WebPage/ios/WebPageIOS.mm:
142         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
143         (WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
144         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
145         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
146         (-[WKAccessibilityWebPageObject accessibilityParameterizedAttributeNames]):
147         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
148         * WebProcess/WebPage/mac/WebPageMac.mm:
149         (WebKit::WebPage::performImmediateActionHitTestAtLocation):
150         (WebKit::WebPage::dataDetectorsDidPresentUI):
151         (WebKit::WebPage::dataDetectorsDidChangeUI):
152         (WebKit::WebPage::dataDetectorsDidHideUI):
153         * WebProcess/WebProcess.cpp:
154         * WebProcess/WebStorage/StorageAreaMap.cpp:
155
156 2018-04-03  Youenn Fablet  <youenn@apple.com>
157
158         Make NetworkProcess get ContentBlocker information from UIProcess
159         https://bugs.webkit.org/show_bug.cgi?id=184205
160
161         Reviewed by Alex Christensen.
162
163         Make NetworkProcess get content blockers from UIProcess directly.
164         Before that patch, WebProcess sent content blockers to NetworkProcess for each PingLoad.
165         Instead, WebProcess sends the content blocker identifier for each PingLoad and NetworkProcess fetches the content blocker once.
166
167         This is both more efficient than passing them for each PingLoad and safer in the sense
168         that a compromised WebProcess will not be able to bypass any of these.
169         In the future, NetworkProcess should get the content blocker identifier directly from the WebPageID attached to the request.
170
171         Covered by existing beacon+content blocker tests.
172
173         Did some refactoring to add a typed content blocker identifier.
174         Once NetworkProcess fetches a given content blocker, the content blocker will send any modification to NetworkProcess.
175         Introduced NetworkContentRuleListManager to handle the content blockers in NetworkProcess.
176
177         * CMakeLists.txt:
178         * DerivedSources.make:
179         * NetworkProcess/NetworkLoadChecker.cpp:
180         (WebKit::NetworkLoadChecker::checkRequest):
181         (WebKit::NetworkLoadChecker::continueCheckingRequest):
182         (WebKit::NetworkLoadChecker::processContentExtensionRulesForLoad):
183         * NetworkProcess/NetworkLoadChecker.h:
184         (WebKit::NetworkLoadChecker::setContentExtensionController):
185         * NetworkProcess/NetworkProcess.cpp:
186         (WebKit::NetworkProcess::didReceiveMessage):
187         * NetworkProcess/NetworkProcess.h:
188         (WebKit::NetworkProcess::networkUserContentController):
189         * NetworkProcess/NetworkResourceLoadParameters.cpp:
190         (WebKit::NetworkResourceLoadParameters::encode const):
191         (WebKit::NetworkResourceLoadParameters::decode):
192         * NetworkProcess/NetworkResourceLoadParameters.h:
193         * NetworkProcess/NetworkContentRuleListManager.cpp: Added.
194         (WebKit::NetworkContentRuleListManager::contentExtensionsBackend):
195         (WebKit::NetworkContentRuleListManager::addContentRuleLists):
196         (WebKit::NetworkContentRuleListManager::removeContentRuleList):
197         (WebKit::NetworkContentRuleListManager::removeAllContentRuleLists):
198         (WebKit::NetworkContentRuleListManager::remove):
199         * NetworkProcess/NetworkContentRuleListManager.h: Added.
200         * NetworkProcess/NetworkContentRuleListManager.messages.in: Added.
201         * NetworkProcess/PingLoad.cpp:
202         * Scripts/webkit/messages.py:
203         * Shared/UserContentControllerIdentifier.h: Added.
204         * Shared/WebPageCreationParameters.cpp:
205         (WebKit::WebPageCreationParameters::decode):
206         * Shared/WebPageCreationParameters.h:
207         * Shared/WebPageGroupData.cpp:
208         (WebKit::WebPageGroupData::decode):
209         * Shared/WebPageGroupData.h:
210         * UIProcess/Network/NetworkProcessProxy.cpp:
211         (WebKit::NetworkProcessProxy::~NetworkProcessProxy):
212         (WebKit::NetworkProcessProxy::contentExtensionRules):
213         (WebKit::NetworkProcessProxy::didDestroyWebUserContentControllerProxy):
214         * UIProcess/Network/NetworkProcessProxy.h:
215         * UIProcess/Network/NetworkProcessProxy.messages.in:
216         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
217         (WebKit::WebUserContentControllerProxy::get):
218         (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
219         (WebKit::WebUserContentControllerProxy::~WebUserContentControllerProxy):
220         (WebKit::WebUserContentControllerProxy::addProcess):
221         (WebKit::WebUserContentControllerProxy::removeProcess):
222         (WebKit::WebUserContentControllerProxy::addUserContentWorldUse):
223         (WebKit::WebUserContentControllerProxy::removeUserContentWorldUses):
224         (WebKit::WebUserContentControllerProxy::addUserScript):
225         (WebKit::WebUserContentControllerProxy::removeUserScript):
226         (WebKit::WebUserContentControllerProxy::removeAllUserScripts):
227         (WebKit::WebUserContentControllerProxy::addUserStyleSheet):
228         (WebKit::WebUserContentControllerProxy::removeUserStyleSheet):
229         (WebKit::WebUserContentControllerProxy::removeAllUserStyleSheets):
230         (WebKit::WebUserContentControllerProxy::addUserScriptMessageHandler):
231         (WebKit::WebUserContentControllerProxy::removeUserMessageHandlerForName):
232         (WebKit::WebUserContentControllerProxy::removeAllUserMessageHandlers):
233         (WebKit::WebUserContentControllerProxy::addContentRuleList):
234         (WebKit::WebUserContentControllerProxy::removeContentRuleList):
235         (WebKit::WebUserContentControllerProxy::removeAllContentRuleLists):
236         * UIProcess/UserContent/WebUserContentControllerProxy.h:
237         (WebKit::WebUserContentControllerProxy::create):
238         (WebKit::WebUserContentControllerProxy::addNetworkProcess):
239         (WebKit::WebUserContentControllerProxy::removeNetworkProcess):
240         (WebKit::WebUserContentControllerProxy::contentExtensionRules):
241         (WebKit::WebUserContentControllerProxy::identifier const):
242         * WebKit.xcodeproj/project.pbxproj:
243         * WebProcess/Network/WebLoaderStrategy.cpp:
244         (WebKit::WebLoaderStrategy::startPingLoad):
245         * WebProcess/UserContent/WebUserContentController.cpp:
246         (WebKit::WebUserContentController::getOrCreate):
247         (WebKit::WebUserContentController::WebUserContentController):
248         (WebKit::WebUserContentController::~WebUserContentController):
249         * WebProcess/UserContent/WebUserContentController.h:
250         * WebProcess/WebPage/WebPage.h:
251         (WebKit::WebPage::userContentControllerIdentifier const):
252
253 2018-04-02  Beth Dakin  <bdakin@apple.com>
254
255         Fix the managed configurations build
256         https://bugs.webkit.org/show_bug.cgi?id=184253
257         -and corresponding-
258         rdar://problem/39078586
259
260         Reviewed by Dan Bernstein.
261
262         * UIProcess/ios/WKContentViewInteraction.mm:
263         (-[WKContentView canPerformActionForWebView:withSender:]):
264         (-[WKContentView _defineForWebView:]):
265
266 2018-04-02  Carlos Garcia Campos  <cgarcia@igalia.com>
267
268         [Enchant] Clean up TextCheckerEnchant
269         https://bugs.webkit.org/show_bug.cgi?id=184233
270
271         Reviewed by Michael Catanzaro.
272
273         Use TextCheckerEnchant as a singleton now, instead of implementing the singleton here.
274
275         * UIProcess/gtk/TextCheckerGtk.cpp:
276         (WebKit::TextChecker::checkSpellingOfString):
277         (WebKit::TextChecker::getGuessesForWord):
278         (WebKit::TextChecker::learnWord):
279         (WebKit::TextChecker::ignoreWord):
280         (WebKit::TextChecker::setSpellCheckingLanguages):
281         (WebKit::TextChecker::loadedSpellCheckingLanguages):
282         (WebKit::enchantTextChecker): Deleted.
283
284 2018-04-03  Carlos Garcia Campos  <cgarcia@igalia.com>
285
286         [GTK] NetworkProcess from WebKitGtk+ 2.19.9x SIGSEVs in NetworkStorageSession (secret search callback)
287         https://bugs.webkit.org/show_bug.cgi?id=183346
288
289         Reviewed by Michael Catanzaro.
290
291         Pass the request cancellable to NetworkStorageSession::getCredentialFromPersistentStorage().
292
293         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
294         (WebKit::NetworkDataTaskSoup::authenticate):
295
296 2018-04-02  Brady Eidson  <beidson@apple.com>
297
298         Process swapping on navigation needs to handle server redirects.
299         <rdar://problem/38690465> and https://bugs.webkit.org/show_bug.cgi?id=184142
300
301         Reviewed by Alex Christensen.
302
303         The same rules we apply to process swapping for basic navigations need to apply
304         to server redirects as well.
305
306         There's three interesting cases we need to support that are covered by new API tests:
307         1 - The initial load in a WKWebView redirects cross-origin.
308         2 - A WKWebView is showing content from a.com, we start a load to b.com, and that redirects to c.com
309         3 - A WKWebView is showing content from a.com, we start a load to a.com, that that redirects to b.com.
310
311         Supporting all 3 of these brought their own little challenges.
312
313         By teaching Navigation objects more about redirects I was able to support all 3 cases.
314
315         * UIProcess/API/APINavigation.cpp:
316         (API::Navigation::Navigation):
317         (API::Navigation::setCurrentRequest):
318         (API::Navigation::appendRedirectionURL):
319         (API::Navigation::loggingString const):
320         (API::Navigation::loggingURL const): Deleted.
321         * UIProcess/API/APINavigation.h:
322         (API::Navigation::originalRequest const):
323         (API::Navigation::currentRequest const):
324         (API::Navigation::currentRequestProcessIdentifier const):
325         (API::Navigation::setCurrentRequestIsRedirect):
326         (API::Navigation::currentRequestIsRedirect const):
327         (API::Navigation::request const): Deleted.
328
329         * UIProcess/API/Cocoa/WKNavigation.mm:
330         (-[WKNavigation _request]):
331
332         * UIProcess/WebPageProxy.cpp:
333         (WebKit::WebPageProxy::receivedPolicyDecision):
334         (WebKit::WebPageProxy::continueNavigationInNewProcess): If this continued navigation is currently in a server
335           redirect, save off a lambda to synthesize a "did receive server redirect" callback once the new WebProcess is running.
336         (WebKit::WebPageProxy::didCreateMainFrame):
337         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame): Possibly ignore this notification if it is really a
338           cross-origin redirect that is just starting back up in a new WebProcess.
339         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
340         (WebKit::WebPageProxy::didCommitLoadForFrame):
341         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
342         (WebKit::WebPageProxy::resetStateAfterProcessExited): Do not clear pageLoadState if the process is exitting for
343           a navigation swap, as we will need to pick up where we left off when the load continues in a new WebProcess.
344         * UIProcess/WebPageProxy.h:
345         * UIProcess/WebPageProxy.messages.in:
346
347         * UIProcess/WebProcessPool.cpp:
348         (WebKit::WebProcessPool::processForNavigation): If a process has never committed any provisional load, it can always
349           be used to continue a navigation.
350         * UIProcess/WebProcessPool.h:
351
352         * UIProcess/WebProcessProxy.h:
353         (WebKit::WebProcessProxy::didCommitProvisionalLoad):
354         (WebKit::WebProcessProxy::hasCommittedAnyProvisionalLoads const):
355
356         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
357         (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
358         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
359
360 2018-04-02  Eric Carlson  <eric.carlson@apple.com>
361
362         [Extra zoom mode] Replace video with a placeholder image during fullscreen transition
363         https://bugs.webkit.org/show_bug.cgi?id=184188
364         <rdar://problem/38940307>
365
366         Reviewed by Youenn Fablet.
367
368         * UIProcess/Cocoa/VideoFullscreenManagerProxy.h:
369         * UIProcess/Cocoa/VideoFullscreenManagerProxy.messages.in:
370         * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
371         (WebKit::VideoFullscreenModelContext::willExitFullscreen):
372         (WebKit::VideoFullscreenManagerProxy::preparedToExitFullscreen):
373         (WebKit::VideoFullscreenManagerProxy::willExitFullscreen):
374         * WebProcess/cocoa/VideoFullscreenManager.h:
375         * WebProcess/cocoa/VideoFullscreenManager.messages.in:
376         * WebProcess/cocoa/VideoFullscreenManager.mm:
377         (WebKit::VideoFullscreenManager::willExitFullscreen):
378
379 2018-04-02  Brian Burg  <bburg@apple.com>
380
381         [Cocoa] Fix some internal builds that consume WebDriver atoms
382         https://bugs.webkit.org/show_bug.cgi?id=184197
383
384         Reviewed by Dan Bernstein.
385
386         * WebKit.xcodeproj/project.pbxproj:
387         Use a Run Script phase to copy WebDriver atoms to WebKit.framework
388         private headers during the installhdrs phase.
389
390 2018-04-02  Ryan Haddad  <ryanhaddad@apple.com>
391
392         Unreviewed, rolling out r230174.
393
394         Caused LayoutTests to exit early with assertion failures.
395
396         Reverted changeset:
397
398         "Process swapping on navigation needs to handle server
399         redirects."
400         https://bugs.webkit.org/show_bug.cgi?id=184142
401         https://trac.webkit.org/changeset/230174
402
403 2018-04-02  Wenson Hsieh  <wenson_hsieh@apple.com>
404
405         [Extra zoom mode] Update date picker UI to latest specifications
406         https://bugs.webkit.org/show_bug.cgi?id=184234
407         <rdar://problem/38804760>
408
409         Reviewed by Timothy Hatcher.
410
411         Rename WKTextFormControlListViewControllerDelegate to WKTextInputListViewControllerDelegate and adjust for the
412         new initializer of WKDatePickerViewController.
413
414         * UIProcess/ios/WKContentViewInteraction.mm:
415         (-[WKContentView presentViewControllerForCurrentAssistedNode]):
416
417 2018-04-02  Brady Eidson  <beidson@apple.com>
418
419         Process swapping on navigation needs to handle server redirects.
420         <rdar://problem/38690465> and https://bugs.webkit.org/show_bug.cgi?id=184142
421
422         Reviewed by Alex Christensen.
423
424         The same rules we apply to process swapping for basic navigations need to apply
425         to server redirects as well.
426
427         There's three interesting cases we need to support that are covered by new API tests:
428         1 - The initial load in a WKWebView redirects cross-origin.
429         2 - A WKWebView is showing content from a.com, we start a load to b.com, and that redirects to c.com
430         3 - A WKWebView is showing content from a.com, we start a load to a.com, that that redirects to b.com.
431
432         Supporting all 3 of these brought their own little challenges.
433
434         By teaching Navigation objects more about redirects I was able to support all 3 cases.
435
436         * UIProcess/API/APINavigation.cpp:
437         (API::Navigation::Navigation):
438         (API::Navigation::setCurrentRequest):
439         (API::Navigation::appendRedirectionURL):
440         (API::Navigation::loggingString const):
441         (API::Navigation::loggingURL const): Deleted.
442         * UIProcess/API/APINavigation.h:
443         (API::Navigation::originalRequest const):
444         (API::Navigation::currentRequest const):
445         (API::Navigation::currentRequestProcessIdentifier const):
446         (API::Navigation::setCurrentRequestIsRedirect):
447         (API::Navigation::currentRequestIsRedirect const):
448         (API::Navigation::request const): Deleted.
449
450         * UIProcess/API/Cocoa/WKNavigation.mm:
451         (-[WKNavigation _request]):
452
453         * UIProcess/WebPageProxy.cpp:
454         (WebKit::WebPageProxy::receivedPolicyDecision):
455         (WebKit::WebPageProxy::continueNavigationInNewProcess): If this continued navigation is currently in a server
456           redirect, save off a lambda to synthesize a "did receive server redirect" callback once the new WebProcess is running.
457         (WebKit::WebPageProxy::didCreateMainFrame):
458         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame): Possibly ignore this notification if it is really a
459           cross-origin redirect that is just starting back up in a new WebProcess.
460         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
461         (WebKit::WebPageProxy::didCommitLoadForFrame):
462         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
463         (WebKit::WebPageProxy::resetStateAfterProcessExited): Do not clear pageLoadState if the process is exitting for
464           a navigation swap, as we will need to pick up where we left off when the load continues in a new WebProcess.
465         * UIProcess/WebPageProxy.h:
466         * UIProcess/WebPageProxy.messages.in:
467
468         * UIProcess/WebProcessPool.cpp:
469         (WebKit::WebProcessPool::processForNavigation): If a process has never committed any provisional load, it can always
470           be used to continue a navigation.
471         * UIProcess/WebProcessPool.h:
472
473         * UIProcess/WebProcessProxy.h:
474         (WebKit::WebProcessProxy::didCommitProvisionalLoad):
475         (WebKit::WebProcessProxy::hasCommittedAnyProvisionalLoads const):
476
477         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
478         (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
479         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
480
481 2018-04-02  Wenson Hsieh  <wenson_hsieh@apple.com>
482
483         [Extra zoom mode] Zoom level is sometimes excessive when zooming to focused form controls
484         https://bugs.webkit.org/show_bug.cgi?id=184222
485         <rdar://problem/39063886>
486
487         Reviewed by Timothy Hatcher.
488
489         Upon interactively focusing an element, we zoom and scroll to reveal that element. The heuristics introduced in
490         <https://trac.webkit.org/r168744> work by computing a target scale, and then a point to zoom to given that
491         scale. Currently, this scale is dependent on the computed font size of the form control, such that the form
492         control would be scaled to have an effective font size of 16.
493
494         However, in extra zoom mode, applying these same heuristics (ironically) results in excessive zoom levels, since
495         scaling the font up to 16 would cause most form controls to zoom so far in that we lose context of surrounding
496         elements such as labels and other form controls; the fact that the element is highlighted by the focused form
497         control overlay makes this even more confusing, since part of the focus overlay highlight rect often ends up
498         outside the viewport.
499
500         To fix this, we make a couple of tweaks to focus rect zooming in extra zoom mode. (1) Instead of computing
501         target zoom level based on font size, try to zoom such that the focused element rect fills up most of the
502         viewport (similar to double-tap zooming). This ensures that the focused form control overlay's highlight rect
503         makes sense in most cases, with few exceptions (e.g. the element frame is larger than the viewport). (2)
504         Introduce a minimum legible font size of 11, and compute the minimium scale needed such that the form control
505         font would appear to be at least this legible font size. Then, clamp the target scale chosen by (1) to this
506         minimum scale.
507
508         One additional consideration for (1) is that naively scaling to fit the element rect to the viewport (with some
509         fixed margins) would cause the viewport scale to always change when moving focus between form controls of
510         different dimensions, even if the current scale is more or less appropriate for all the focusable elements. To
511         address this, instead of computing a single target zoom scale for an element rect, compute a range of possible
512         target zoom scales (where the minimum and maximum values depend on the margin we add around the element rect).
513         If the current scale already falls within this target scale range, then we won't bother adjusting the scale at
514         all (unless the font size is too small — see (2)). If the current scale falls outside the target scale range, we
515         then make the minimal adjustment needed to ensure that the element rect fits well within the viewport without
516         being too small.
517
518         * UIProcess/API/Cocoa/WKWebView.mm:
519         (-[WKWebView _zoomToFocusRect:selectionRect:insideFixed:fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]):
520
521         Move some logic around so that the target scale is computed after computing the visible size. Also renames some
522         constants local to this function (WKWebViewStandardFontSize, kMinimumHeightToShowContentAboveKeyboard,
523         UIWebFormAnimationDuration, CaretOffsetFromWindowEdge) such that they now share a consistent naming style.
524
525 2018-04-02  Jer Noble  <jer.noble@apple.com>
526
527         Enable Legacy EME for all WebKit & WebKitLegacy clients
528         https://bugs.webkit.org/show_bug.cgi?id=184018
529         <rdar://problem/34887387>
530
531         Reviewed by Eric Carlson.
532
533         * Shared/WebPreferences.yaml:
534         * Shared/WebPreferencesDefaultValues.h:
535
536 2018-04-02  Jer Noble  <jer.noble@apple.com>
537
538         REGRESSION (229680): Fullscreen video does not work (youtube, netflix)
539         https://bugs.webkit.org/show_bug.cgi?id=184235
540
541         Reviewed by Eric Carlson.
542
543         Enable the Fullscreen API by default.
544
545         * Shared/WebPreferences.yaml:
546         * Shared/WebPreferencesDefaultValues.h:
547
548 2018-04-02  Fujii Hironori  <Hironori.Fujii@sony.com>
549
550         [Win] MSVC can't compile WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent
551         https://bugs.webkit.org/show_bug.cgi?id=184120
552
553         Reviewed by Alex Christensen.
554
555         It seems that MSVC can't compile the code using `this` in a
556         generalized lambda capture in another lambda.
557
558         In this case, there is no need to copy `protectedThis` for the
559         inner lambda. Move `protectedThis` of the outer lambda to the
560         inner as well as `callback`.
561
562         * UIProcess/WebResourceLoadStatisticsStore.cpp:
563         (WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent):
564         Moved `protectedThis` from the outer lambda to the inner.
565
566 2018-04-02  Dan Bernstein  <mitz@apple.com>
567
568         Build fix after r230121
569
570         * Configurations/WebKit.xcconfig: Disabled framework header postprocessing when building for
571           iOS 11.*
572         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h: Reverted r230159.
573
574 2018-04-02  Dan Bernstein  <mitz@apple.com>
575
576         Fixed the build when BOOL is not bool.
577         <rdar://problem/39094484>
578
579         Reviewed by Jer Noble.
580
581         * UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
582         (-[WKFullScreenViewController videoControlsManagerDidChange]): Removed the write-only ivar
583           _hasControlsManager, the assignment to which was causing the compiler error.
584
585 2018-04-02  Ryan Haddad  <ryanhaddad@apple.com>
586
587         Unreviewed build fix.
588
589         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h: Update availability annotation.
590
591 2018-04-02  Michael Catanzaro  <mcatanzaro@igalia.com>
592
593         [GTK] DragAndDropHandler.cpp should include GUniquePtrGtk.h
594         https://bugs.webkit.org/show_bug.cgi?id=184119
595
596         Reviewed by Daniel Bates.
597
598         * UIProcess/gtk/DragAndDropHandler.cpp:
599
600 2018-04-02  Frederic Wang  <fwang@igalia.com>
601
602         Fix warnings for unused lambda captures in Source/WebKit
603         https://bugs.webkit.org/show_bug.cgi?id=173555
604
605         Reviewed by Konstantin Tokarev.
606
607         When release logs are disabled, several lambda captures are unused, causing compilation
608         failures with -Wunused-lambda-capture. This patch marks the corresponding variables as unused
609         in order to fix these warnings.
610
611         Based on initial patch by: Konstantin Tokarev  <annulen@yandex.ru>
612
613         * NetworkProcess/NetworkResourceLoader.cpp:
614         (WebKit::NetworkResourceLoader::retrieveCacheEntry):
615         * UIProcess/Network/NetworkProcessProxy.cpp:
616         (WebKit::NetworkProcessProxy::fetchWebsiteData):
617         (WebKit::NetworkProcessProxy::deleteWebsiteData):
618         (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
619         * UIProcess/WebProcessProxy.cpp:
620         (WebKit::WebProcessProxy::fetchWebsiteData):
621         (WebKit::WebProcessProxy::deleteWebsiteData):
622         (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
623         * UIProcess/ios/WKContentViewInteraction.mm:
624         (-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
625
626 2018-04-02  Alejandro G. Castro  <alex@igalia.com>
627
628         [GTK] Make libwebrtc backend buildable for GTK  port
629         https://bugs.webkit.org/show_bug.cgi?id=178860
630
631         Reviewed by Youenn Fablet.
632
633         * CMakeLists.txt: Add RTC network classes to the compilation and
634         the libwebrtc includes.
635         * PlatformGTK.cmake: Add the libwebrtc directory.
636         * SourcesGTK.txt: Add RTC files to the compilation.
637
638 2018-03-30  Chris Dumez  <cdumez@apple.com>
639
640         REGRESSION (r229828): Facebook login popup is blank
641         https://bugs.webkit.org/show_bug.cgi?id=184206
642         <rdar://problem/39057006>
643
644         Reviewed by Wenson Hsieh.
645
646         Add assertion to make sure we never try to do a policy check to
647         a resource response while a policy check for a navigation is
648         pending. This assertion was being hit by several of our redirection
649         tests without my fix.
650
651         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
652         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
653
654 2018-03-30  Ryan Haddad  <ryanhaddad@apple.com>
655
656         Unreviewed, rolling out r230125.
657
658         Build fix broke more builds.
659
660         Reverted changeset:
661
662         "Unreviewed build fix, remove unused lambda capture."
663         https://trac.webkit.org/changeset/230125
664
665 2018-03-30  Ryan Haddad  <ryanhaddad@apple.com>
666
667         Unreviewed build fix, remove unused lambda capture.
668
669         * NetworkProcess/NetworkResourceLoader.cpp:
670         (WebKit::NetworkResourceLoader::retrieveCacheEntry):
671
672 2018-03-30  Wenson Hsieh  <wenson_hsieh@apple.com>
673
674         [Extra zoom mode] Adopt list view controller UI for numeric input types
675         https://bugs.webkit.org/show_bug.cgi?id=184184
676         <rdar://problem/37238916>
677
678         Reviewed by Timothy Hatcher.
679
680         Remove existing logic for presenting a number pad view controller, since number pads will now be handled as a
681         special case of general text form controls in extra zoom mode.
682
683         * UIProcess/ios/WKContentViewInteraction.h:
684         * UIProcess/ios/WKContentViewInteraction.mm:
685         (-[WKContentView presentViewControllerForCurrentAssistedNode]):
686         (-[WKContentView dismissAllInputViewControllers]):
687         (-[WKContentView _wheelChangedWithEvent:]):
688
689 2018-03-30  Dan Bernstein  <mitz@apple.com>
690
691         Update availability annotations to match the macOS 10.13.4 and iOS 11.3 GM SDKs
692         https://bugs.webkit.org/show_bug.cgi?id=184173
693
694         Reviewed by Alex Christensen.
695
696         Changed WK_MAC_TBA and WK_IOS_TBA to 10.13.4 and 11.3, respectively, in all declarations that
697         appear in the GM SDKs.
698
699         * Shared/API/Cocoa/_WKNSWindowExtras.h:
700         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
701         * UIProcess/API/Cocoa/WKOpenPanelParameters.h:
702         * UIProcess/API/Cocoa/WKOpenPanelParametersPrivate.h:
703         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
704         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
705         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
706         * UIProcess/API/Cocoa/WKViewPrivate.h:
707         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
708         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
709         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
710         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
711         * UIProcess/API/Cocoa/_WKApplicationManifest.h:
712         * UIProcess/API/Cocoa/_WKAttachment.h:
713         * UIProcess/API/Cocoa/_WKAutomationSession.h:
714         * UIProcess/API/Cocoa/_WKAutomationSessionConfiguration.h:
715         * UIProcess/API/Cocoa/_WKDownload.h:
716         * UIProcess/API/Cocoa/_WKDownloadDelegate.h:
717         * UIProcess/API/Cocoa/_WKFocusedElementInfo.h:
718         * UIProcess/API/Cocoa/_WKFullscreenDelegate.h:
719         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
720         * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.h:
721         * UIProcess/API/Cocoa/_WKVisitedLinkStore.h:
722         * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
723         * UIProcess/API/Cocoa/_WKWebsitePolicies.h:
724         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandlePrivate.h:
725         * WebProcess/InjectedBundle/API/mac/WKDOMDocument.h:
726
727 2018-03-30  Youenn Fablet  <youenn@apple.com>
728
729         NetworkLoadChecker should upgrade redirects if needed
730         https://bugs.webkit.org/show_bug.cgi?id=184098
731
732         Reviewed by Chris Dumez.
733
734         In case of redirections, upgrade URL according CSP.
735
736         * NetworkProcess/NetworkLoadChecker.cpp:
737         (WebKit::NetworkLoadChecker::checkRequest):
738         (WebKit::NetworkLoadChecker::contentSecurityPolicy const):
739
740 2018-03-30  JF Bastien  <jfbastien@apple.com>
741
742         Update messages.py codegen for String, fix tests
743         https://bugs.webkit.org/show_bug.cgi?id=184179
744         <rdar://problem/39041352>
745
746         Reviewed by Mark Lam.
747
748         I updated some of the code in
749         https://trac.webkit.org/changeset/230097 and auto-magically used a
750         script to update copyright headers... and that broke the tests
751         which checked for a particular date. Update all of the headers.
752
753         Part of this change updates the code generated by messages.py
754
755         * Scripts/webkit/LegacyMessageReceiver-expected.cpp:
756         * Scripts/webkit/MessageReceiver-expected.cpp:
757         * Scripts/webkit/MessageReceiverSuperclass-expected.cpp:
758         * Scripts/webkit/MessagesSuperclass-expected.h:
759         * Scripts/webkit/messages.py:
760         * Scripts/webkit/messages_unittest.py:
761         (GeneratedFileContentsTest.assertGeneratedFileContentsEqual):
762         generate a better error message
763
764 2018-03-29  JF Bastien  <jfbastien@apple.com>
765
766         Use Forward.h instead of forward-declaring WTF::String
767         https://bugs.webkit.org/show_bug.cgi?id=184172
768         <rdar://problem/39026146>
769
770         Reviewed by Yusuke Suzuki.
771
772         As part of #184164 I'm changing WTF::String, and the forward
773         declarations are just wrong because I'm making it templated. We
774         should use Forward.h anyways, so do that instead.
775
776         * Scripts/webkit/LegacyMessages-expected.h:
777         * Scripts/webkit/Messages-expected.h:
778         * Scripts/webkit/MessagesSuperclass-expected.h:
779         * UIProcess/WebOpenPanelResultListenerProxy.h:
780
781 2018-03-29  Brian Burg  <bburg@apple.com>
782
783         Web Automation: clipToViewport is ignored for element screenshots
784         https://bugs.webkit.org/show_bug.cgi?id=184158
785         <rdar://problem/39014307>
786
787         Reviewed by Timothy Hatcher.
788
789         In §19.2 Take Element Screenshot, step 5.2 says that we should clip
790         the element screenshot rect with the visible viewport rect. We don't
791         do that right now even though we pass over clipToViewport.
792
793         * WebProcess/Automation/WebAutomationSessionProxy.cpp:
794         (WebKit::snapshotRectForScreenshot):
795         Clip the rect to viewport if needed.
796
797         (WebKit::WebAutomationSessionProxy::takeScreenshot):
798         This scrollIntoView is misplaced; by this point we have already done
799         the math to figure out the screenshot rect. Move it before computing the rect.
800
801 2018-03-29  Brent Fulgham  <bfulgham@apple.com>
802
803         REGRESSION(r230035): ASSERT(MACH_PORT_VALID(m_sendPort)) hit in IPC::Connection::initializeSendSource()
804         https://bugs.webkit.org/show_bug.cgi?id=184122
805         <rdar://problem/39003606>
806
807         Reviewed by Chris Dumez.
808
809         One of the new assertions added in r230035 begin firing while running tests locally. This was happening
810         because the WebInspector was attempting to open a new connection to a web process that had already
811         terminated its mach port connection (a dead port).
812         
813         We should avoid opening new connections when the port we were given is already dead.
814
815         * Platform/IPC/Connection.h:
816         (IPC::Connection::identifierIsValid): Added.
817         * Platform/IPC/mac/ConnectionMac.mm:
818         (IPC::Connection::platformInitialize): Do not perform initialization on a dead (or null) port.
819         (IPC::Connection::open): Add some assertions that ports are in a valid state.
820         (IPC::Connection::sendOutgoingMessage): Assert that the send port is not dead.
821         (IPC::Connection::receiveSourceEventHandler): Assert that the receive port is valid.
822         * UIProcess/ChildProcessProxy.cpp:
823         (WebKit::ChildProcessProxy::didFinishLaunching): Treat a dead port as a signal that the
824         child process failed to launch.
825         * UIProcess/Network/NetworkProcessProxy.cpp:
826         (WebKit::NetworkProcessProxy::didFinishLaunching): Ditto.
827         * UIProcess/Plugins/PluginProcessProxy.cpp:
828         (WebKit::PluginProcessProxy::didFinishLaunching): Ditto.
829         * UIProcess/Storage/StorageProcessProxy.cpp:
830         (WebKit::StorageProcessProxy::didFinishLaunching): Ditto.
831         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
832         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection): Ditto.
833         * WebProcess/WebPage/WebInspectorUI.cpp:
834         (WebKit::WebInspectorUI::establishConnection): Ditto.
835         * WebProcess/WebProcess.cpp:
836         (WebKit::WebProcess::ensureNetworkProcessConnection): Ditto.
837         (WebKit::WebProcess::ensureWebToStorageProcessConnection): Ditto.
838
839 2018-03-29  Youenn Fablet  <youenn@apple.com>
840
841         Synchronize SecurityOrigin related scheme registries with NetworkProcess
842         https://bugs.webkit.org/show_bug.cgi?id=184140
843
844         Reviewed by Chris Dumez.
845
846         Add syncing of scheme registries that are used by SecurityOrigin and ContentSecurityPolicy
847         so that we can properly use them in NetworkProcess as we do in WebProcess.
848         The registries that are not synced are:
849         - URLSchemeAsEmptyDocument
850         - URLSchemeDomainRelaxationForbidden
851         - URLSchemeAsCachePartitioned
852         - URLSchemeAsCanDisplayOnlyIfCanRequest
853
854         * NetworkProcess/NetworkProcess.cpp:
855         (WebKit::NetworkProcess::initializeNetworkProcess):
856         (WebKit::NetworkProcess::registerURLSchemeAsSecure const):
857         (WebKit::NetworkProcess::registerURLSchemeAsBypassingContentSecurityPolicy const):
858         (WebKit::NetworkProcess::registerURLSchemeAsLocal const):
859         (WebKit::NetworkProcess::registerURLSchemeAsNoAccess const):
860         (WebKit::NetworkProcess::registerURLSchemeAsDisplayIsolated const):
861         (WebKit::NetworkProcess::registerURLSchemeAsCORSEnabled const):
862         (WebKit::NetworkProcess::registerURLSchemeAsCanDisplayOnlyIfCanRequest const):
863         * NetworkProcess/NetworkProcess.h:
864         * NetworkProcess/NetworkProcess.messages.in:
865         * NetworkProcess/NetworkProcessCreationParameters.cpp:
866         (WebKit::NetworkProcessCreationParameters::encode const):
867         (WebKit::NetworkProcessCreationParameters::decode):
868         * NetworkProcess/NetworkProcessCreationParameters.h:
869         * UIProcess/WebProcessPool.cpp:
870         (WebKit::WebProcessPool::ensureNetworkProcess):
871         (WebKit::WebProcessPool::registerURLSchemeAsSecure):
872         (WebKit::WebProcessPool::registerURLSchemeAsBypassingContentSecurityPolicy):
873         (WebKit::WebProcessPool::registerURLSchemeAsLocal):
874         (WebKit::WebProcessPool::registerURLSchemeAsNoAccess):
875         (WebKit::WebProcessPool::registerURLSchemeAsDisplayIsolated):
876         (WebKit::WebProcessPool::registerURLSchemeAsCORSEnabled):
877         (WebKit::WebProcessPool::registerURLSchemeAsCanDisplayOnlyIfCanRequest):
878
879 2018-03-29  Brent Fulgham  <bfulgham@apple.com>
880
881         REGRESSION(r229480): ERROR: Unhandled web process message 'WebCookieManager:SetHTTPCookieAcceptPolicy'
882         https://bugs.webkit.org/show_bug.cgi?id=184124
883         <rdar://problem/38998971>
884
885         Reviewed by Chris Dumez.
886
887         Cookie accept policy messages were still being sent to the WebContent process after
888         I removed cookie access in r229480. The WebContent process no longer recognizes these
889         messages, and generates logging to that effect.
890         
891         This patch stops sending these unnecessary messages to the WebContent process. Only the
892         Network process needs to receive this information.
893
894         * UIProcess/WebCookieManagerProxy.cpp:
895         (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
896
897 2018-03-29  Carlos Eduardo Ramalho  <cadubentzen@gmail.com>
898
899         [WPE] Floating point exception in WebEventFactory::createWebWheelEvent
900         https://bugs.webkit.org/show_bug.cgi?id=184037
901
902         Reviewed by Žan Doberšek.
903
904         * Shared/wpe/WebEventFactory.cpp:
905         (WebKit::WebEventFactory::createWebWheelEvent): Use std::copysign() to avoid division by 0.
906
907 2018-03-28  Zalan Bujtas  <zalan@apple.com>
908
909         Make it possible to override the screen size
910         https://bugs.webkit.org/show_bug.cgi?id=184111
911         <rdar://problem/38972181>
912
913         Reviewed by Tim Horton.
914
915         * Shared/WebPageCreationParameters.cpp:
916         (WebKit::WebPageCreationParameters::encode const):
917         (WebKit::WebPageCreationParameters::decode):
918         * Shared/WebPageCreationParameters.h:
919         * UIProcess/WebPageProxy.cpp:
920         (WebKit::WebPageProxy::creationParameters):
921         * UIProcess/WebPageProxy.h:
922         * UIProcess/ios/WebPageProxyIOS.mm:
923         (WebKit::WebPageProxy::overrideScreenSize):
924         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
925         (WebKit::WebChromeClient::overrideScreenSize const):
926         * WebProcess/WebCoreSupport/WebChromeClient.h:
927         * WebProcess/WebPage/WebPage.cpp:
928         * WebProcess/WebPage/WebPage.h:
929         * WebProcess/WebPage/ios/WebPageIOS.mm:
930         (WebKit::WebPage::overrideScreenSize const):
931
932 2018-03-28  Chris Dumez  <cdumez@apple.com>
933
934         Do process swap when opening a cross-origin URL via window.open(url, '_blank', 'noopener')
935         https://bugs.webkit.org/show_bug.cgi?id=183962
936         <rdar://problem/38817833>
937
938         Reviewed by Brady Eidson.
939
940         Swap WebProcess on for the initial navigation in a new Window that was opened
941         via window.open(), when the new URL is cross-origin compared to the opener's
942         origin. For now, we only swap process if 'noopener' property is set when calling
943         window.open(). This is because we do not support the remote DOMWindows yet.
944
945         * Shared/NavigationActionData.cpp:
946         (WebKit::NavigationActionData::encode const):
947         (WebKit::NavigationActionData::decode):
948         * Shared/NavigationActionData.h:
949         * UIProcess/API/APINavigation.h:
950         (API::Navigation::setIsCrossOriginWindowOpenNavigation):
951         (API::Navigation::isCrossOriginWindowOpenNavigation const):
952         (API::Navigation::setOpener):
953         (API::Navigation::opener const):
954         * UIProcess/WebPageProxy.cpp:
955         (WebKit::WebPageProxy::receivedPolicyDecision):
956         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
957         * UIProcess/WebProcessPool.cpp:
958         (WebKit::WebProcessPool::processForNavigation):
959         * UIProcess/WebProcessPool.h:
960         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
961         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
962
963 2018-03-28  Per Arne Vollan  <pvollan@apple.com>
964
965         Adopt WEBPROCESS_WINDOWSERVER_BLOCKING compiler guard in WebProcess.
966         https://bugs.webkit.org/show_bug.cgi?id=183959
967         <rdar://problem/38965719>
968
969         Reviewed by Brent Fulgham.
970
971         Use the compile guard to guard the call to CGSSetDenyWindowServerConnections.
972
973         * WebProcess/WebProcess.cpp:
974         (WebKit::WebProcess::initializeProcess):
975
976 2018-03-28  Brent Fulgham  <bfulgham@apple.com>
977
978         Unreviewed build fix after r230045.
979
980         * UIProcess/Launcher/mac/ProcessLauncherMac.mm: Add missing include (breaks iOS).
981
982 2018-03-28  Brent Fulgham  <bfulgham@apple.com>
983
984         Protect against invalid mach ports returned by mach_port_request_notification
985         https://bugs.webkit.org/show_bug.cgi?id=184106
986         <rdar://problem/37865316>
987
988         Reviewed by Chris Dumez.
989
990         * Platform/IPC/Connection.h:
991         (IPC::Connection::Identifier::Identifier): Use default initializer syntax.
992         * Platform/IPC/mac/ConnectionMac.mm:
993         (IPC::Connection::open): Drive-by-fix: Include formatted mach error message in logging.
994         (IPC::Connection::receiveSourceEventHandler): Check return value from 'mach_port_request_notification'
995         and clean up if it experienced an error.
996         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
997         (WebKit::ProcessLauncher::launchProcess): Ditto.
998
999 2018-03-28  Dean Jackson  <dino@apple.com>
1000
1001         WKWebViewContentProvider shouldn't be a UIScrollViewDelegate
1002         https://bugs.webkit.org/show_bug.cgi?id=184107
1003         <rdar://problem/38967492>
1004
1005         Reviewed by Tim Horton.
1006
1007         There is no need for this class to be a UIScrollViewDelegate. Instead
1008         the protocol should have an optional method that is effectively
1009         scrollViewDidScroll.
1010
1011         * UIProcess/API/Cocoa/WKWebView.mm:
1012         (-[WKWebView scrollViewDidScroll:]): Call web_scrollViewDidScroll
1013         if it exists.
1014         * UIProcess/Cocoa/WKWebViewContentProvider.h: Remove UIScrollViewDelegate
1015         and add an optional web_scrollViewDidScroll.
1016         * UIProcess/ios/WKPDFView.mm:
1017         (-[WKPDFView web_scrollViewDidScroll:]): Renamed from scrollViewDidScroll.
1018         (-[WKPDFView scrollViewDidScroll:]): Deleted.
1019         * UIProcess/ios/WKSystemPreviewView.mm:
1020         (-[WKSystemPreviewView scrollViewDidScroll:]): Deleted.
1021
1022 2018-03-28  Wenson Hsieh  <wenson_hsieh@apple.com>
1023
1024         [Extra zoom mode] Make boosted text autosizing values switchable at runtime
1025         https://bugs.webkit.org/show_bug.cgi?id=184092
1026         <rdar://problem/38939917>
1027
1028         Reviewed by Tim Horton.
1029
1030         Add a private web view preference to switch between normal and boosted text autosizing mode. By default, we use
1031         normal text autosizing values.
1032
1033         * Shared/WebPreferences.yaml:
1034         * UIProcess/API/Cocoa/WKPreferences.mm:
1035         (-[WKPreferences _setShouldEnableTextAutosizingBoost:]):
1036         (-[WKPreferences _shouldEnableTextAutosizingBoost]):
1037         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1038
1039 2018-03-28  Brent Fulgham  <bfulgham@apple.com>
1040
1041         Avoid uninitialized mach ports
1042         https://bugs.webkit.org/show_bug.cgi?id=184090
1043         <rdar://problem/37261129>
1044
1045         Reviewed by Chris Dumez.
1046
1047         It is possible for mach_port_allocate to return an error, but we rarely check its return value. The value
1048         of the argument passed to mach_port_allocate is not guaranteed to be valid when it returns an error, so
1049         there is a potential for us to try to use invalid ports.
1050
1051         We should always check return values, and ensure that the mach port variables we seek to initialize are
1052         kept in a valid state.
1053
1054         Reviewed by Chris Dumez.
1055
1056         * NetworkProcess/NetworkProcess.cpp:
1057         (WebKit::NetworkProcess::createNetworkConnectionToWebProcess): Initialize new port to a safe default and
1058         check the return state of the allocation function.
1059         * Platform/IPC/Connection.h:
1060         * Platform/IPC/mac/ConnectionMac.mm:
1061         (IPC::Connection::open): Ditto.
1062         (IPC::Connection::initializeSendSource): Ditto.
1063         (IPC::readFromMachPort): Ditto.
1064         (IPC::Connection::receiveSourceEventHandler): Ditto.
1065         * Platform/SharedMemory.h:
1066         * Platform/cocoa/SharedMemoryCocoa.cpp:
1067         (WebKit::makeMemoryEntry): Ditto.
1068         * Platform/mac/MachUtilities.cpp:
1069         (setMachPortQueueLength): Ditto.
1070         (setMachExceptionPort): Ditto.
1071         * PluginProcess/PluginProcess.cpp:
1072         (WebKit::PluginProcess::createWebProcessConnection): Ditto.
1073         * StorageProcess/StorageProcess.cpp:
1074         (WebKit::StorageProcess::createStorageToWebProcessConnection): Ditto.
1075         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1076         (WebKit::ProcessLauncher::launchProcess): Ditto.
1077         * WebProcess/WebPage/WebInspector.cpp:
1078         (WebKit::WebInspector::openFrontendConnection): Ditto.
1079
1080 2018-03-28  Michael Catanzaro  <mcatanzaro@igalia.com>
1081
1082         Fails to build webkitgtk+ after git-svn-id: http://svn.webkit.org/repository/webkit/trunk@229877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1083         https://bugs.webkit.org/show_bug.cgi?id=184081
1084
1085         Unreviewed, switch to use UNUSED_PARAM()
1086
1087         * UIProcess/WebPageProxy.cpp:
1088         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1089
1090 2018-03-28  Tim Horton  <timothy_horton@apple.com>
1091
1092         Make use of HAVE(CORE_ANIMATION_RENDER_SERVER) in more places
1093         https://bugs.webkit.org/show_bug.cgi?id=184072
1094         <rdar://problem/38946530>
1095
1096         Reviewed by Dan Bernstein.
1097
1098         * Platform/mac/LayerHostingContext.mm:
1099         (WebKit::LayerHostingContext::createForExternalHostingProcess):
1100         * UIProcess/mac/ViewSnapshotStore.h:
1101         * UIProcess/mac/ViewSnapshotStore.mm:
1102         (WebKit::ViewSnapshot::clearImage):
1103
1104 2018-03-28  Wenson Hsieh  <wenson_hsieh@apple.com>
1105
1106         Revert an unnecessary workaround when zooming focused form controls
1107         https://bugs.webkit.org/show_bug.cgi?id=184067
1108         <rdar://problem/38805254>
1109
1110         Reviewed by Tim Horton.
1111
1112         Reverts an unintended change introduced in r227984.
1113
1114         * UIProcess/ios/WKContentViewInteraction.mm:
1115         (-[WKContentView _displayFormNodeInputView]):
1116
1117 2018-03-28  Miguel Gomez  <magomez@igalia.com>
1118
1119         [GTK][WPE] Remove UpdateAtlas
1120         https://bugs.webkit.org/show_bug.cgi?id=184042
1121
1122         Reviewed by Žan Doberšek.
1123
1124         Remove all the code related to UpdateAtlas handling.
1125
1126         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
1127         (WebKit::CoordinatedGraphicsScene::updateTilesIfNeeded):
1128         (WebKit::CoordinatedGraphicsScene::commitSceneState):
1129         (WebKit::CoordinatedGraphicsScene::purgeGLResources):
1130         (WebKit::CoordinatedGraphicsScene::syncUpdateAtlases): Deleted.
1131         (WebKit::CoordinatedGraphicsScene::createUpdateAtlas): Deleted.
1132         (WebKit::CoordinatedGraphicsScene::removeUpdateAtlas): Deleted.
1133         (WebKit::CoordinatedGraphicsScene::releaseUpdateAtlases): Deleted.
1134         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
1135         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
1136         (WebKit::ThreadedCompositor::renderLayerTree):
1137         (WebKit::ThreadedCompositor::releaseUpdateAtlases): Deleted.
1138         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
1139         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1140         (WebKit::WebChromeClient::delegatedScrollRequested):
1141         (WebKit::WebChromeClient::resetUpdateAtlasForTesting): Deleted.
1142         * WebProcess/WebCoreSupport/WebChromeClient.h:
1143         * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
1144         (WebKit::AcceleratedDrawingArea::resetUpdateAtlasForTesting): Deleted.
1145         * WebProcess/WebPage/AcceleratedDrawingArea.h:
1146         * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
1147         (WebKit::CompositingCoordinator::CompositingCoordinator):
1148         (WebKit::CompositingCoordinator::flushPendingLayerChanges):
1149         (WebKit::CompositingCoordinator::clearPendingStateChanges):
1150         (WebKit::CompositingCoordinator::renderNextFrame):
1151         (WebKit::CompositingCoordinator::purgeBackingStores):
1152         (WebKit::CompositingCoordinator::createUpdateAtlas): Deleted.
1153         (WebKit::CompositingCoordinator::removeUpdateAtlas): Deleted.
1154         (WebKit::CompositingCoordinator::getCoordinatedBuffer): Deleted.
1155         (): Deleted.
1156         (WebKit::CompositingCoordinator::scheduleReleaseInactiveAtlases): Deleted.
1157         (WebKit::CompositingCoordinator::releaseInactiveAtlasesTimerFired): Deleted.
1158         (WebKit::CompositingCoordinator::releaseAtlases): Deleted.
1159         (WebKit::CompositingCoordinator::clearUpdateAtlases): Deleted.
1160         * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
1161         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1162         (WebKit::CoordinatedLayerTreeHost::clearUpdateAtlases): Deleted.
1163         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
1164         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
1165         (WebKit::ThreadedCoordinatedLayerTreeHost::releaseUpdateAtlases): Deleted.
1166         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
1167         * WebProcess/WebPage/DrawingArea.h:
1168         * WebProcess/WebPage/LayerTreeHost.h:
1169         (WebKit::LayerTreeHost::setIsDiscardable):
1170
1171 2018-03-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1172
1173         REGRESSION(r229998): WebDriver: MiniBrowser is crashing in a lot of tests after r229998
1174         https://bugs.webkit.org/show_bug.cgi?id=184075
1175
1176         Reviewed by Žan Doberšek.
1177
1178         This is because we are using a value after it has been moved.
1179
1180         * UIProcess/Automation/WebAutomationSession.cpp:
1181         (WebKit::WebAutomationSession::setWindowFrameOfBrowsingContext): Save a reference to page in a local variable
1182         before using it when it's also going to be moved in the lambda capture.
1183
1184 2018-03-27  Michael Catanzaro  <mcatanzaro@igalia.com>
1185
1186         Unreviewed, fix typo in variable name
1187
1188         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1189         (webkitWebViewBaseCrossingNotifyEvent):
1190
1191 2018-03-27  Per Arne Vollan  <pvollan@apple.com>
1192
1193         The layout test fast/canvas/webgl/read-pixels-test.html is timing out.
1194         https://bugs.webkit.org/show_bug.cgi?id=183923
1195         <rdar://problem/38756869>
1196
1197         Reviewed by Brent Fulgham.
1198
1199         Send OpenGL display mask to the WebContent process when the display ID is changing.
1200
1201         * UIProcess/WebPageProxy.cpp:
1202         (WebKit::WebPageProxy::windowScreenDidChange):
1203         * WebProcess/WebPage/WebPage.h:
1204         * WebProcess/WebPage/WebPage.messages.in:
1205         * WebProcess/WebPage/mac/WebPageMac.mm:
1206         (WebKit::WebPage::openGLDisplayMaskChanged):
1207
1208 2018-03-27  Youenn Fablet  <youenn@apple.com>
1209
1210         Move request checking out of PingLoad for future reuse in NetworkLoad
1211         https://bugs.webkit.org/show_bug.cgi?id=183865
1212
1213         Reviewed by Chris Dumez.
1214
1215         Introduce NetworkLoadChecker as a way to validate requests before sending them in the network process.
1216         Validation encompasses: CORS checks, CSP and Content Extensions on both main request and redirected requests if any.
1217
1218         Make PingLoad use NetworkLoadChecker. Future patch should make NetworkLoad to use it as well whenever needed.
1219
1220         Make NetworkCORSPreflightChecker takes a CompletionHandler instead of a Function.
1221         Ensure this callback is called even if preflight is not completed by returning a Canceled error.
1222
1223         * NetworkProcess/NetworkCORSPreflightChecker.cpp:
1224         (WebKit::NetworkCORSPreflightChecker::~NetworkCORSPreflightChecker):
1225         (WebKit::NetworkCORSPreflightChecker::returnResult):
1226         (WebKit::NetworkCORSPreflightChecker::willPerformHTTPRedirection):
1227         (WebKit::NetworkCORSPreflightChecker::didReceiveChallenge):
1228         (WebKit::NetworkCORSPreflightChecker::didCompleteWithError):
1229         * NetworkProcess/NetworkCORSPreflightChecker.h:
1230         * NetworkProcess/NetworkLoadChecker.cpp: Added.
1231         (WebKit::NetworkLoadChecker::NetworkLoadChecker):
1232         (WebKit::NetworkLoadChecker::check):
1233         (WebKit::NetworkLoadChecker::checkRedirection):
1234         (WebKit::NetworkLoadChecker::returnError):
1235         (WebKit::NetworkLoadChecker::checkRequest):
1236         (WebKit::NetworkLoadChecker::checkCORSRequest):
1237         (WebKit::NetworkLoadChecker::checkCORSRedirectedRequest):
1238         (WebKit::NetworkLoadChecker::checkCORSRequestWithPreflight):
1239         (WebKit::NetworkLoadChecker::doesNotNeedCORSCheck const):
1240         (WebKit::NetworkLoadChecker::contentSecurityPolicy const):
1241         (WebKit::NetworkLoadChecker::contentExtensionsBackend):
1242         (WebKit::NetworkLoadChecker::processContentExtensionRulesForLoad):
1243         * NetworkProcess/NetworkLoadChecker.h: Added.
1244         (WebKit::NetworkLoadChecker::setCSPResponseHeaders):
1245         (WebKit::NetworkLoadChecker::setContentExtensionRuleLists):
1246         (WebKit::NetworkLoadChecker::url const):
1247         (WebKit::NetworkLoadChecker::storedCredentialsPolicy const):
1248         (WebKit::NetworkLoadChecker::isChecking const):
1249         (WebKit::NetworkLoadChecker::isRedirected const):
1250         * NetworkProcess/PingLoad.cpp:
1251         (WebKit::PingLoad::PingLoad):
1252         (WebKit::PingLoad::~PingLoad):
1253         (WebKit::PingLoad::willPerformHTTPRedirection):
1254         (WebKit::PingLoad::didReceiveChallenge):
1255         (WebKit::PingLoad::wasBlocked):
1256         (WebKit::PingLoad::cannotShowURL):
1257         (WebKit::PingLoad::timeoutTimerFired):
1258         (WebKit::PingLoad::currentURL const):
1259         * NetworkProcess/PingLoad.h:
1260         * WebKit.xcodeproj/project.pbxproj:
1261
1262 2018-03-27  Jiewen Tan  <jiewen_tan@apple.com>
1263
1264         [WebAuthN] Implement authenticatorGetAssertion
1265         https://bugs.webkit.org/show_bug.cgi?id=183881
1266         <rdar://problem/37258628>
1267
1268         Reviewed by Brent Fulgham.
1269
1270         * Shared/WebPreferences.yaml:
1271         * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.cpp:
1272         (WebKit::WebCredentialsMessengerProxy::makeCredential):
1273         (WebKit::WebCredentialsMessengerProxy::getAssertion):
1274         (WebKit::WebCredentialsMessengerProxy::getAssertionReply):
1275         * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.h:
1276         * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.messages.in:
1277         * WebProcess/CredentialManagement/WebCredentialsMessenger.cpp:
1278         (WebKit::WebCredentialsMessenger::getAssertion):
1279         (WebKit::WebCredentialsMessenger::getAssertionReply):
1280         * WebProcess/CredentialManagement/WebCredentialsMessenger.messages.in:
1281
1282 2018-03-27  Chris Dumez  <cdumez@apple.com>
1283
1284         Avoid constructing SecurityOrigin objects from non-main threads
1285         https://bugs.webkit.org/show_bug.cgi?id=184024
1286
1287         Reviewed by Youenn Fablet.
1288
1289         Avoid constructing SecurityOrigin objects from non-main threads as much as possible.
1290
1291         * WebProcess/Storage/WebSWClientConnection.cpp:
1292         (WebKit::WebSWClientConnection::mayHaveServiceWorkerRegisteredForOrigin const):
1293         (WebKit::WebSWClientConnection::matchRegistration):
1294         (WebKit::WebSWClientConnection::getRegistrations):
1295         * WebProcess/Storage/WebSWClientConnection.h:
1296         * WebProcess/Storage/WebSWOriginTable.cpp:
1297         (WebKit::WebSWOriginTable::contains const):
1298         * WebProcess/Storage/WebSWOriginTable.h:
1299
1300 2018-03-27  Chris Dumez  <cdumez@apple.com>
1301
1302         Move online state detection from the WebProcess to the NetworkProcess
1303         https://bugs.webkit.org/show_bug.cgi?id=183989
1304         <rdar://problem/37093299>
1305
1306         Reviewed by Youenn Fablet.
1307
1308         Move online state detection from the WebProcess to the NetworkProcess. This avoid executing the same (expensive) code in
1309         EACH web process whenever a network interface's state changes. Now, the Network Process monitors network interfaces
1310         and determines the online state whenever an interface's state changes. If the onLine state changes, it notifies all
1311         its connected WebProcesses via IPC.
1312
1313         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1314         (WebKit::NetworkConnectionToWebProcess::setOnLineState):
1315         * NetworkProcess/NetworkConnectionToWebProcess.h:
1316         * NetworkProcess/NetworkProcess.cpp:
1317         (WebKit::NetworkProcess::NetworkProcess):
1318         (WebKit::NetworkProcess::createNetworkConnectionToWebProcess):
1319         * WebProcess/Network/NetworkProcessConnection.cpp:
1320         (WebKit::NetworkProcessConnection::setOnLineState):
1321         * WebProcess/Network/NetworkProcessConnection.h:
1322         * WebProcess/Network/NetworkProcessConnection.messages.in:
1323         * WebProcess/Network/WebLoaderStrategy.cpp:
1324         (WebKit::WebLoaderStrategy::isOnLine const):
1325         (WebKit::WebLoaderStrategy::addOnlineStateChangeListener):
1326         (WebKit::WebLoaderStrategy::setOnLineState):
1327         * WebProcess/Network/WebLoaderStrategy.h:
1328
1329 2018-03-27  Wenson Hsieh  <wenson_hsieh@apple.com>
1330
1331         [Extra zoom mode] Add support for new focused form control overlay behaviors
1332         https://bugs.webkit.org/show_bug.cgi?id=184043
1333         <rdar://problem/38758727>
1334
1335         Reviewed by Tim Horton.
1336
1337         See below for more details.
1338
1339         * UIProcess/ios/WKContentViewInteraction.mm:
1340         (-[WKContentView _willStartScrollingOrZooming]):
1341         (-[WKContentView _didEndScrollingOrZooming]):
1342
1343         Suppress focused form control navigation while the scroll view is undergoing a scroll or zoom animation (e.g.,
1344         when moving from one focused form control to another).
1345
1346         (-[WKContentView textInputController:didCommitText:withSuggestion:]):
1347
1348         When dismissing an input view controller, allow focused form control navigation only after updating assisted
1349         node information to ensure that focus rects aren't stale as the user begins to navigate between forms.
1350
1351         (-[WKContentView rectForFocusedFormControlController:inCoordinateSpace:]):
1352         (-[WKContentView nextRectForFocusedFormControlController:inCoordinateSpace:]):
1353         (-[WKContentView previousRectForFocusedFormControlController:inCoordinateSpace:]):
1354         (-[WKContentView scrollViewForFocusedFormControlController:]):
1355         (-[WKContentView highlightedRectForFocusedFormControlController:inCoordinateSpace:]): Deleted.
1356
1357         Implement some new focused form overlay delegate hooks to vend the scroll view, as well as the rects of next and
1358         previous focusable form controls.
1359
1360 2018-03-27  Brent Fulgham  <bfulgham@apple.com>
1361
1362         Further refine cookie read/write logging
1363         https://bugs.webkit.org/show_bug.cgi?id=184044
1364         <rdar://problem/38915610>
1365
1366         Reviewed by Chris Dumez.
1367
1368         Cookie logging was passing the partition, rather than the first party, when logging, which
1369         prevented logging in cases where partitioning or blocking was active. This patch corrects
1370         these calls so that logging is generated in these cases, too.
1371
1372         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1373         (WebKit::NetworkConnectionToWebProcess::cookiesForDOM): Call log routines if needed.
1374         (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM): Ditto.
1375         * NetworkProcess/NetworkResourceLoader.cpp:
1376         (WebKit::escapeIDForJSON): Make available to use in multiple functions.
1377         (WebKit::NetworkResourceLoader::logCookieInformation const): Revise to use shared
1378         convenience functions.
1379         (WebKit::logBlockedCookieInformation): Added.
1380         (WebKit::logCookieInformationInternal): Added.
1381         (WebKit::NetworkResourceLoader::logCookieInformation): Revise to use shared
1382         convenience functions.
1383         * NetworkProcess/NetworkResourceLoader.h:
1384
1385 2018-03-27  Brian Burg  <bburg@apple.com>
1386
1387         Web Automation: support enter/exit fullscreen and hide/restore window operations
1388         https://bugs.webkit.org/show_bug.cgi?id=182837
1389         <rdar://problem/37580732>
1390
1391         Reviewed by Tim Horton.
1392
1393         The W3C specification is more explicit about when to exit fullscreen and
1394         restore the window for a browsing context. So, WebKit needs to have support
1395         for performing these operations on behalf of a driver.
1396
1397         Based on prototyping, it is sufficient to use a JavaScript atom to enter
1398         fullscreen mode. This is included in the patch as EnterFullscreen.js and
1399         can be used to implement the §10.7.5 Fullscreen Window command.
1400
1401         Other window operations cannot be peformed from JavaScript, so we need to
1402         delegate these operations to the session client (i.e., Safari).
1403         This patch adds session client callouts for restoring, minimizing, and
1404         switching to a browsing context.
1405
1406         Exiting fullscreen happens implicitly (per specification) when setting a
1407         window frame without an actual frame, or when switching/restoring/minimizing a window.
1408         If needed, a driver can call Set Window Rect in this way to unfullscreen a context.
1409         Similarly, a driver can restore a minimized window using Set Window Rect.
1410
1411         * UIProcess/API/APIAutomationSessionClient.h:
1412         (API::AutomationSessionClient::requestHideWindowOfPage):
1413         (API::AutomationSessionClient::requestRestoreWindowOfPage):
1414         (API::AutomationSessionClient::requestSwitchToPage):
1415         Add new API client methods.
1416
1417         * UIProcess/API/Cocoa/_WKAutomationSessionDelegate.h:
1418         Add new Cocoa API delegate methods.
1419
1420         * UIProcess/Automation/Automation.json:
1421         Make the switch to browsing context command asynchronous, since this functionality
1422         is not always synchronous, and we prefer to use completion handlers in the delegates.
1423
1424         Add new protocol method for hiding the window of a browsing context.
1425         This is expected to minimize/miniaturize a window for desktop window managers.
1426
1427         * UIProcess/Automation/WebAutomationSession.h:
1428         * UIProcess/Automation/WebAutomationSession.cpp:
1429         (WebKit::WebAutomationSession::switchToBrowsingContext):
1430         Make this function asynchronous. Call out to the session client.
1431
1432         (WebKit::WebAutomationSession::setWindowFrameOfBrowsingContext):
1433         Follow the steps in the specification to restore window and exit fullscreen.
1434
1435         (WebKit::WebAutomationSession::hideWindowOfBrowsingContext):
1436         Exit fullscreen and call out to the session client.
1437
1438         (WebKit::WebAutomationSession::exitFullscreenWindowForPage):
1439         This is a little strange. Because there is no async API for exiting fullscreen
1440         from C++ code, we hook into willEnterFullScreen and didExitFullScreen and send
1441         out the response if the page exited fullscreen after we requested it to do so.
1442         Because the W3C specification mandates that drivers only process one command at
1443         a time, there will only ever be one callback installed by this method at a time.
1444
1445         (WebKit::WebAutomationSession::restoreWindowForPage):
1446         (WebKit::WebAutomationSession::hideWindowForPage):
1447         Call out to the session client.
1448
1449         (WebKit::WebAutomationSession::didEnterFullScreenForPage):
1450         (WebKit::WebAutomationSession::didExitFullScreenForPage):
1451         Add methods to be called by instrumentation hooks in WebFullScreenManagerProxy.
1452
1453         * UIProcess/Automation/atoms/EnterFullscreen.js: Added.
1454         (enterFullscreen):
1455
1456         * UIProcess/Cocoa/AutomationSessionClient.h:
1457         * UIProcess/Cocoa/AutomationSessionClient.mm:
1458         (WebKit::AutomationSessionClient::AutomationSessionClient):
1459         (WebKit::AutomationSessionClient::requestSwitchToPage):
1460         (WebKit::AutomationSessionClient::requestHideWindowOfPage):
1461         (WebKit::AutomationSessionClient::requestRestoreWindowOfPage):
1462         (WebKit::AutomationSessionClient::isShowingJavaScriptDialogOnPage):
1463         Add boilerplate to convert C++ API client to Objective-C delegate methods.
1464
1465         * UIProcess/WebFullScreenManagerProxy.cpp:
1466         (WebKit::WebFullScreenManagerProxy::didEnterFullScreen):
1467         (WebKit::WebFullScreenManagerProxy::didExitFullScreen):
1468         Notify the automation session if the page is under automation and
1469         enters or exits fullscreen.
1470
1471         * WebKit.xcodeproj/project.pbxproj:
1472         Add EnterFullscreen.js to the list of WebDriver atoms. These are copied
1473         as WebKit2 private headers and used by driver implementations.
1474
1475 2018-03-27  Eric Carlson  <eric.carlson@apple.com>
1476
1477         Make AVFoundationEnabled preference available on iOS
1478         https://bugs.webkit.org/show_bug.cgi?id=183876
1479         <rdar://problem/38726459>
1480
1481         Reviewed by Youenn Fablet.
1482
1483         * Shared/WebPreferences.yaml: Set AVFoundationEnabled with DEFAULT_AVFOUNDATION_ENABLED.
1484         * Shared/WebPreferencesDefaultValues.h:
1485
1486         * UIProcess/API/Cocoa/WKPreferences.mm:
1487         (-[WKPreferences _setAVFoundationEnabled:]): Enable for iOS.
1488         (-[WKPreferences _avFoundationEnabled]): Ditto.
1489         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1490
1491 2018-03-26  Tim Horton  <timothy_horton@apple.com>
1492
1493         Adopt WK_ALTERNATE_FRAMEWORKS_DIR in WebKit
1494         https://bugs.webkit.org/show_bug.cgi?id=184030
1495         <rdar://problem/38895281>
1496
1497         Reviewed by Dan Bernstein.
1498
1499         * Configurations/Base.xcconfig:
1500         * Configurations/BaseTarget.xcconfig:
1501         * Configurations/WebKit.xcconfig:
1502
1503 2018-03-26  Tim Horton  <timothy_horton@apple.com>
1504
1505         Add and adopt HAVE(CORE_ANIMATION_RENDER_SERVER)
1506         https://bugs.webkit.org/show_bug.cgi?id=184026
1507         <rdar://problem/38883321>
1508
1509         Reviewed by Sam Weinig.
1510
1511         * UIProcess/API/Cocoa/WKWebView.mm:
1512         (-[WKWebView _takeViewSnapshot]):
1513         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
1514
1515 2018-03-26  Wenson Hsieh  <wenson_hsieh@apple.com>
1516
1517         [Extra zoom mode] Refactor input view controller presentation and dismissal helpers
1518         https://bugs.webkit.org/show_bug.cgi?id=184020
1519         Work towards <rdar://problem/38758727>
1520
1521         Reviewed by Tim Horton.
1522
1523         We currently have separate presentation and dismissal helpers for each type of view controller corresponding to
1524         a focused element type. This is excessive, considering that all of these helpers are only invoked from one place
1525         (either -presentViewControllerForCurrentAssistedNode or -dismissAllInputViewControllers), with the exception of
1526         the focused form control overlay.
1527
1528         This refactoring allows us to then adjust the timing of first responder restoration logic, such that the focused
1529         form control view controller can receive forwarded events from the web view. See below for more detail.
1530
1531         * UIProcess/ios/WKContentViewInteraction.mm:
1532         (-[WKContentView presentFocusedFormControlViewController:]):
1533         (-[WKContentView dismissFocusedFormControlViewController:]):
1534
1535         Remove logic to restore the web view as first responder.
1536
1537         (-[WKContentView presentViewControllerForCurrentAssistedNode]):
1538         (-[WKContentView dismissAllInputViewControllers]):
1539
1540         Restore first responder after dismissing a view controller that was presented when focusing a form control, only
1541         if the web view was first responder before presentation.
1542
1543         (-[WKContentView presentDatePickerViewController:]): Deleted.
1544         (-[WKContentView dismissDatePickerViewController:]): Deleted.
1545         (-[WKContentView presentTimePickerViewController:]): Deleted.
1546         (-[WKContentView dismissTimePickerViewController:]): Deleted.
1547         (-[WKContentView presentSelectMenuViewController:]): Deleted.
1548         (-[WKContentView dismissSelectMenuViewController:]): Deleted.
1549         (-[WKContentView dismissNumberPadViewController:]): Deleted.
1550         (-[WKContentView presentNumberPadViewController:]): Deleted.
1551         (-[WKContentView presentTextInputViewController:]): Deleted.
1552         (-[WKContentView dismissTextInputViewController:]): Deleted.
1553
1554 2018-03-06  Brian Burg  <bburg@apple.com>
1555
1556         Web Automation: provide a way to ask clients for a new tab or window
1557         https://bugs.webkit.org/show_bug.cgi?id=183381
1558         <rdar://problem/38167301>
1559
1560         Reviewed by Timothy Hatcher.
1561
1562         Add support for specifying browsing context options when requesting
1563         a new browsing context from the automation session client/delegate.
1564         This is currently just used for specifying tab vs window, but could
1565         also be used for things like toggling certain browser chrome or features.
1566
1567         There is no guarantee that the client has a notion of tabs vs windows,
1568         so this option is purely advisory and should not cause the command to
1569         fail if it cannot be honored.
1570
1571         This behavior caused by specifying this option is client-specific, so no
1572         new tests are included in WebKit for this change.
1573
1574         * UIProcess/API/APIAutomationSessionClient.h:
1575         (API::AutomationSessionClient::didRequestNewPageWithOptions):
1576         (API::AutomationSessionClient::didRequestNewWindow): Deleted.
1577         Add options parameter.
1578
1579         * UIProcess/API/glib/WebKitAutomationSession.cpp:
1580         Adjust to new signature. More work is needed to plumb this information
1581         to the public API for GTK/WPE and support it in WebKitGTK driver.
1582
1583         * UIProcess/Automation/Automation.json: Add new optional parameter.
1584
1585         * UIProcess/Automation/WebAutomationSession.h:
1586         * UIProcess/Automation/WebAutomationSession.cpp:
1587         (WebKit::WebAutomationSession::createBrowsingContext):
1588         Convert the protocol option to an API option.
1589
1590         * UIProcess/Cocoa/AutomationSessionClient.h:
1591         * UIProcess/Cocoa/AutomationSessionClient.mm:
1592         (WebKit::AutomationSessionClient::AutomationSessionClient):
1593         (WebKit::toAPI):
1594         (WebKit::AutomationSessionClient::didRequestNewPageWithOptions):
1595         (WebKit::AutomationSessionClient::didRequestNewWindow): Deleted.
1596         Convert the internal option to a Cocoa SPI option and pass it along.
1597
1598         * UIProcess/API/Cocoa/_WKAutomationSessionDelegate.h:
1599         Adjust delegate methods to include options. Clients need to adopt the new signature(s).
1600
1601 2018-03-26  Wenson Hsieh  <wenson_hsieh@apple.com>
1602
1603         [Extra zoom mode] Add plumbing for next and previous focusable element rects
1604         https://bugs.webkit.org/show_bug.cgi?id=184016
1605         Work towards <rdar://problem/38758727>
1606
1607         Reviewed by Tim Horton.
1608
1609         When building up AssistedNodeInformation, we currently compute the element rect of the current focused element,
1610         as well as flags indicating whether or not there are next or previous focusable elements. For
1611         <rdar://problem/38758727>, we additionally send the rects of the next or previous focusable elements as well.
1612
1613         * Shared/AssistedNodeInformation.cpp:
1614         (WebKit::AssistedNodeInformation::encode const):
1615         (WebKit::AssistedNodeInformation::decode):
1616
1617         IPC support for nextNodeRect and previousNodeRect.
1618
1619         * Shared/AssistedNodeInformation.h:
1620         * WebProcess/WebPage/ios/WebPageIOS.mm:
1621         (WebKit::elementRectInRootViewCoordinates):
1622
1623         Add a helper to compute an element's rect in root view coordinates. We use this to compute the rects of the
1624         current focused element as well as those of the next and previous elements, if any.
1625
1626         (WebKit::WebPage::getAssistedNodeInformation):
1627         (WebKit::hasAssistableElement): Deleted.
1628
1629         Since we need the next or previous focusable element to get its rect, we don't need this helper anymore.
1630
1631 2018-03-26  Chris Dumez  <cdumez@apple.com>
1632
1633         Use SecurityOriginData more consistently in Service Worker code
1634         https://bugs.webkit.org/show_bug.cgi?id=183969
1635
1636         Reviewed by Darin Adler.
1637
1638         Use SecurityOriginData more consistently in Service Worker code to avoid constructing
1639         SecurityOrigin objects unnecessarily.
1640
1641         * NetworkProcess/NetworkResourceLoadParameters.cpp:
1642         (WebKit::NetworkResourceLoadParameters::encode const):
1643         * Shared/API/c/WKSecurityOriginRef.cpp:
1644         (WKSecurityOriginCopyDatabaseIdentifier):
1645         * StorageProcess/ServiceWorker/WebSWOriginStore.cpp:
1646         (WebKit::WebSWOriginStore::addToStore):
1647         (WebKit::WebSWOriginStore::removeFromStore):
1648         * StorageProcess/ServiceWorker/WebSWOriginStore.h:
1649         * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
1650         (WebKit::WebSWServerConnection::scheduleJobInServer):
1651         (WebKit::WebSWServerConnection::registerServiceWorkerClient):
1652         * StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
1653         (WebKit::WebSWServerToContextConnection::WebSWServerToContextConnection):
1654         * StorageProcess/ServiceWorker/WebSWServerToContextConnection.h:
1655         * StorageProcess/StorageProcess.cpp:
1656         (WebKit::StorageProcess::connectionToContextProcessWasClosed):
1657         (WebKit::StorageProcess::needsServerToContextConnectionForOrigin const):
1658         (WebKit::StorageProcess::createStorageToWebProcessConnection):
1659         (WebKit::StorageProcess::deleteWebsiteDataForOrigins):
1660         (WebKit::StorageProcess::serverToContextConnectionForOrigin):
1661         (WebKit::StorageProcess::createServerToContextConnection):
1662         (WebKit::StorageProcess::swContextConnectionMayNoLongerBeNeeded):
1663         * StorageProcess/StorageProcess.h:
1664         * UIProcess/API/APIFrameInfo.cpp:
1665         (API::FrameInfo::create):
1666         * UIProcess/API/C/WKApplicationCacheManager.cpp:
1667         (WKApplicationCacheManagerDeleteEntriesForOrigin):
1668         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
1669         (WKKeyValueStorageManagerDeleteEntriesForOrigin):
1670         * UIProcess/API/C/WKResourceCacheManager.cpp:
1671         (WKResourceCacheManagerClearCacheForOrigin):
1672         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
1673         (WKWebsiteDataStoreRemoveFetchCacheForOrigin):
1674         (WKWebsiteDataStoreGetFetchCacheSizeForOrigin):
1675         * UIProcess/ServiceWorkerProcessProxy.cpp:
1676         (WebKit::ServiceWorkerProcessProxy::create):
1677         (WebKit::ServiceWorkerProcessProxy::ServiceWorkerProcessProxy):
1678         (WebKit::ServiceWorkerProcessProxy::getLaunchOptions):
1679         * UIProcess/ServiceWorkerProcessProxy.h:
1680         * UIProcess/Storage/StorageProcessProxy.cpp:
1681         (WebKit::StorageProcessProxy::getStorageProcessConnection):
1682         * UIProcess/WebProcessPool.cpp:
1683         (WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess):
1684         (WebKit::WebProcessPool::disconnectProcess):
1685         (WebKit::WebProcessPool::updateProcessAssertions):
1686         * UIProcess/WebProcessPool.h:
1687         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1688         (WebKit::WebsiteDataStore::fetchDataAndApply):
1689         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
1690         (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
1691         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1692         (WKBundlePageCopyOriginsWithApplicationCache):
1693         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
1694         (WebKit::UserMediaPermissionRequestManager::sendUserMediaRequest):
1695         (WebKit::UserMediaPermissionRequestManager::enumerateMediaDevices):
1696         * WebProcess/Storage/WebSWClientConnection.cpp:
1697         (WebKit::WebSWClientConnection::registerServiceWorkerClient):
1698         (WebKit::WebSWClientConnection::matchRegistration):
1699         (WebKit::WebSWClientConnection::whenRegistrationReady):
1700         (WebKit::WebSWClientConnection::getRegistrations):
1701         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1702         (WebKit::WebChromeClient::exceededDatabaseQuota):
1703         (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):
1704         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1705         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1706         * WebProcess/WebProcess.cpp:
1707         (WebKit::WebProcess::fetchWebsiteData):
1708         * WebProcess/WebStorage/StorageAreaImpl.cpp:
1709         (WebKit::StorageAreaImpl::securityOrigin const):
1710         * WebProcess/WebStorage/StorageAreaImpl.h:
1711         * WebProcess/WebStorage/StorageAreaMap.cpp:
1712         (WebKit::StorageAreaMap::StorageAreaMap):
1713         (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
1714         (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
1715         * WebProcess/WebStorage/StorageNamespaceImpl.cpp:
1716         (WebKit::StorageNamespaceImpl::didDestroyStorageAreaMap):
1717
1718 2018-03-26  Brent Fulgham  <bfulgham@apple.com>
1719
1720         Warn against cookie access in the WebContent process using ProcessPrivilege assertions
1721         https://bugs.webkit.org/show_bug.cgi?id=183911
1722         <rdar://problem/38762306>
1723
1724         Reviewed by Youenn Fablet.
1725
1726         Add a set of ProcessPrivilege assertions to enforce the rule that the WebContent process
1727         should never call Cookie API directly. That should only happen in the Networking or
1728         UIProcess. 
1729
1730         * NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
1731         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
1732         (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy):
1733         * NetworkProcess/NetworkProcess.cpp:
1734         (WebKit::NetworkProcess::initializeNetworkProcess):
1735         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
1736         (WebKit::NetworkDataTaskCocoa::applyCookieBlockingPolicy):
1737         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1738         (WebKit::NetworkProcess::setSharedHTTPCookieStorage):
1739         (WebKit::NetworkProcess::syncAllCookies):
1740         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1741         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
1742         * NetworkProcess/mac/RemoteNetworkingContext.mm:
1743         (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):
1744         * PluginProcess/PluginProcess.cpp:
1745         (WebKit::PluginProcess::initializeProcess):
1746         * Shared/cf/CookieStorageUtilsCF.mm:
1747         (WebKit::cookieStorageFromIdentifyingData):
1748         (WebKit::identifyingDataFromCookieStorage):
1749         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1750         (WebKit::WebProcessPool::platformInitializeWebProcess):
1751         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
1752         (WebKit::privateBrowsingSession):
1753         * UIProcess/WebProcessPool.cpp:
1754         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
1755         (WebKit::WebsiteDataStore::parameters):
1756         * UIProcess/mac/WebCookieManagerProxyMac.mm:
1757         (WebKit::WebCookieManagerProxy::persistHTTPCookieAcceptPolicy):
1758         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1759         (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
1760         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1761         (WebKit::WebFrameLoaderClient::createNetworkingContext):
1762         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
1763         (WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession):
1764         (WebKit::WebFrameNetworkingContext::storageSession const):
1765         * WebProcess/WebProcess.cpp:
1766         (WebKit::WebProcess::initializeProcess):
1767
1768 2018-03-26  Alex Christensen  <achristensen@webkit.org>
1769
1770         Merge ResourceHandleClient::willCacheResponseAsync with ResourceHandleClient::willCacheResponse
1771         https://bugs.webkit.org/show_bug.cgi?id=183965
1772
1773         Reviewed by Chris Dumez.
1774
1775         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1776         (WebKit::WebFrameLoaderClient::willCacheResponse const):
1777         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1778
1779 2018-03-25  Carlos Garcia Campos  <cgarcia@igalia.com>
1780
1781         [GTK][WPE] Add API to convert between DOM and JSCValue
1782         https://bugs.webkit.org/show_bug.cgi?id=183448
1783
1784         Reviewed by Michael Catanzaro.
1785
1786         Add methods to get a JSCValue for a WebKitDOMObject and to create a WebKitDOMNode from a JSCValue. Deprecate
1787         most of the GTK+ DOM bindings API and move the non-deprecated parts to glib dir to be exposed by WPE too.
1788
1789         * PlatformGTK.cmake:
1790         * PlatformWPE.cmake:
1791         * SourcesGTK.txt:
1792         * SourcesWPE.txt:
1793         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
1794         * WebProcess/InjectedBundle/API/glib/DOM/DOMObjectCache.cpp: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/DOMObjectCache.cpp.
1795         * WebProcess/InjectedBundle/API/glib/DOM/DOMObjectCache.h: Copied from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/DOMObjectCache.h.
1796         * WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMDocument.cpp: Added.
1797         (WebKit::kit):
1798         (WebKit::core):
1799         (WebKit::wrapDocument):
1800         (webkit_dom_document_class_init):
1801         (webkit_dom_document_init):
1802         * WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMDocumentPrivate.h: Copied from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentPrivate.h.
1803         * WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMElement.cpp: Added.
1804         (WebKit::kit):
1805         (WebKit::core):
1806         (WebKit::wrapElement):
1807         (webkit_dom_element_class_init):
1808         (webkit_dom_element_init):
1809         (webkit_dom_element_html_input_element_is_user_edited):
1810         (webkit_dom_element_html_input_element_get_auto_filled):
1811         (webkit_dom_element_html_input_element_set_auto_filled):
1812         (webkit_dom_element_html_input_element_set_editing_value):
1813         * WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMElementPrivate.h: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElementPrivate.h.
1814         * WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMNode.cpp: Added.
1815         (_WebKitDOMNodePrivate::~_WebKitDOMNodePrivate):
1816         (WebKit::kit):
1817         (WebKit::core):
1818         (WebKit::wrapNode):
1819         (webkitDOMNodeConstructor):
1820         (webkitDOMNodeFinalize):
1821         (webkit_dom_node_init):
1822         (webkit_dom_node_class_init):
1823         (webkitDOMNodeSetCoreObject):
1824         (webkitDOMNodeGetCoreObject):
1825         (webkit_dom_node_for_js_value):
1826         * WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMNodePrivate.h: Copied from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodePrivate.h.
1827         * WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMObject.cpp: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMObject.cpp.
1828         (webkitDOMObjectSetProperty):
1829         (webkit_dom_object_class_init):
1830         * WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMPrivate.cpp: Added.
1831         (WebKit::wrap):
1832         * WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMPrivate.h: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/DOMObjectCache.h.
1833         * WebProcess/InjectedBundle/API/glib/WebKitFrame.cpp:
1834         (webkit_frame_get_js_value_for_dom_object):
1835         (webkit_frame_get_js_value_for_dom_object_in_script_world):
1836         * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
1837         (webkit_web_page_class_init):
1838         (webkitWebPageCreate):
1839         (webkit_web_page_get_dom_document):
1840         * WebProcess/InjectedBundle/API/gtk/DOM/GObjectEventListener.cpp:
1841         (WebKit::GObjectEventListener::handleEvent):
1842         * WebProcess/InjectedBundle/API/gtk/DOM/GObjectNodeFilterCondition.cpp:
1843         * WebProcess/InjectedBundle/API/gtk/DOM/GObjectXPathNSResolver.cpp:
1844         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.cpp:
1845         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.h:
1846         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlob.cpp:
1847         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlob.h:
1848         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.cpp:
1849         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.h:
1850         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.cpp:
1851         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.h:
1852         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.cpp:
1853         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.h:
1854         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.cpp:
1855         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.h:
1856         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.cpp:
1857         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.h:
1858         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.cpp:
1859         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.h:
1860         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.cpp:
1861         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.h:
1862         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.cpp:
1863         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.h:
1864         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp:
1865         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.h:
1866         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.cpp:
1867         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.h:
1868         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.cpp:
1869         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.h:
1870         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.cpp:
1871         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.h:
1872         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.cpp:
1873         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.h:
1874         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp:
1875         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.h:
1876         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp:
1877         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.h:
1878         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.cpp:
1879         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.h:
1880         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp.
1881         (webkitDOMDocumentDOMEventTargetInit):
1882         (webkitDOMDocumentInstallProperties):
1883         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp:
1884         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.h:
1885         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.h:
1886         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElementGtk.cpp: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp.
1887         (webkitDOMElementDOMEventTargetInit):
1888         (webkitDOMElementInstallProperties):
1889         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.cpp:
1890         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.h:
1891         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEventTarget.cpp:
1892         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEventTarget.h:
1893         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFile.cpp:
1894         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFile.h:
1895         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileList.cpp:
1896         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileList.h:
1897         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.cpp:
1898         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.h:
1899         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.cpp:
1900         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.h:
1901         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.cpp:
1902         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.h:
1903         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.cpp:
1904         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.h:
1905         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.cpp:
1906         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.h:
1907         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.cpp:
1908         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.h:
1909         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.cpp:
1910         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.h:
1911         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.cpp:
1912         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.h:
1913         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollection.cpp:
1914         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollection.h:
1915         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.cpp:
1916         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.h:
1917         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.cpp:
1918         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.h:
1919         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.cpp:
1920         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.h:
1921         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.cpp:
1922         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.h:
1923         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp:
1924         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.h:
1925         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.cpp:
1926         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.h:
1927         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.cpp:
1928         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.h:
1929         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.cpp:
1930         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.h:
1931         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.cpp:
1932         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.h:
1933         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.cpp:
1934         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.h:
1935         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.cpp:
1936         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.h:
1937         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.cpp:
1938         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.h:
1939         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.cpp:
1940         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.h:
1941         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.cpp:
1942         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.h:
1943         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.cpp:
1944         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.h:
1945         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.cpp:
1946         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.h:
1947         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.cpp:
1948         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.h:
1949         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
1950         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.h:
1951         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.cpp:
1952         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.h:
1953         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.cpp:
1954         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.h:
1955         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.cpp:
1956         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.h:
1957         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.cpp:
1958         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.h:
1959         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.cpp:
1960         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.h:
1961         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.cpp:
1962         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.h:
1963         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.cpp:
1964         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.h:
1965         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.cpp:
1966         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.h:
1967         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.cpp:
1968         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.h:
1969         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.cpp:
1970         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.h:
1971         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.cpp:
1972         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.h:
1973         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.cpp:
1974         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.h:
1975         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.cpp:
1976         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.h:
1977         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollection.cpp:
1978         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollection.h:
1979         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.cpp:
1980         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.h:
1981         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.cpp:
1982         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.h:
1983         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.cpp:
1984         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.h:
1985         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPrivate.cpp:
1986         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.cpp:
1987         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.h:
1988         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.cpp:
1989         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.h:
1990         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:
1991         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.h:
1992         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.cpp:
1993         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.h:
1994         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.cpp:
1995         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.h:
1996         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.cpp:
1997         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.h:
1998         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.cpp:
1999         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.h:
2000         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.cpp:
2001         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.h:
2002         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.cpp:
2003         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.h:
2004         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.cpp:
2005         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.h:
2006         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.cpp:
2007         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.h:
2008         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.cpp:
2009         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.h:
2010         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.cpp:
2011         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.h:
2012         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEvent.cpp:
2013         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEvent.h:
2014         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.cpp:
2015         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.h:
2016         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEvent.cpp:
2017         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEvent.h:
2018         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.cpp:
2019         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.h:
2020         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.h:
2021         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeFilter.cpp:
2022         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeFilter.h:
2023         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeGtk.cpp: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.cpp.
2024         (webkitDOMNodeDOMEventTargetInit):
2025         (webkitDOMNodeInstallProperties):
2026         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIterator.cpp:
2027         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIterator.h:
2028         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeList.cpp:
2029         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeList.h:
2030         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMObject.h:
2031         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPrivateGtk.cpp: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPrivate.cpp.
2032         (WebKit::wrapNodeGtk):
2033         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPrivateGtk.h: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPrivate.h.
2034         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.cpp:
2035         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.h:
2036         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.cpp:
2037         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.h:
2038         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheet.cpp:
2039         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheet.h:
2040         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetList.cpp:
2041         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetList.h:
2042         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.cpp:
2043         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.h:
2044         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalker.cpp:
2045         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalker.h:
2046         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.cpp:
2047         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.h:
2048         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.cpp:
2049         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.h:
2050         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathExpression.cpp:
2051         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathExpression.h:
2052         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathNSResolver.cpp:
2053         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathNSResolver.h:
2054         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResult.cpp:
2055         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResult.h:
2056         * WebProcess/InjectedBundle/API/gtk/DOM/docs/webkitdomgtk-4.0-sections.txt:
2057         * WebProcess/InjectedBundle/API/gtk/WebKitFrame.h:
2058         * WebProcess/InjectedBundle/API/wpe/DOM/WebKitDOMDefines.h: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentPrivate.h.
2059         * WebProcess/InjectedBundle/API/wpe/DOM/WebKitDOMDocument.h: Added.
2060         * WebProcess/InjectedBundle/API/wpe/DOM/WebKitDOMElement.h: Added.
2061         * WebProcess/InjectedBundle/API/wpe/DOM/WebKitDOMNode.h: Added.
2062         * WebProcess/InjectedBundle/API/wpe/DOM/WebKitDOMObject.h: Copied from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMObject.h.
2063         * WebProcess/InjectedBundle/API/wpe/DOM/webkitdom.h: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodePrivate.h.
2064         * WebProcess/InjectedBundle/API/wpe/WebKitFrame.h:
2065         * WebProcess/InjectedBundle/API/wpe/WebKitWebHitTestResult.h: Added.
2066         * WebProcess/InjectedBundle/API/wpe/WebKitWebPage.h:
2067         * WebProcess/InjectedBundle/API/wpe/WebKitWebProcessEnumTypes.cpp.template: Added.
2068         * WebProcess/InjectedBundle/API/wpe/WebKitWebProcessEnumTypes.h.template: Copied from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMObjectPrivate.h.
2069         * WebProcess/InjectedBundle/API/wpe/webkit-web-extension.h:
2070
2071 2018-03-26  Zan Dobersek  <zdobersek@igalia.com>
2072
2073         [CoordGraphics] Clean up CoordinatedGraphicsScene construct-time initializations
2074         https://bugs.webkit.org/show_bug.cgi?id=184002
2075
2076         Reviewed by Carlos Garcia Campos.
2077
2078         Move the CoordinatedGraphicsScene constant-expression initializations
2079         from constructor to the point of declaration.
2080
2081         Default the CoordinatedGraphicsScene destructor.
2082
2083         The m_scrollPosition member variable is unused in this class, while the
2084         similarly-named m_renderedContentsScrollPosition tracks scroll position
2085         of the scene. Remove the latter and use m_scrollPosition in its place.
2086
2087         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
2088         (WebKit::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
2089         (WebKit::CoordinatedGraphicsScene::adjustPositionForFixedLayers):
2090         (WebKit::CoordinatedGraphicsScene::commitSceneState):
2091         (WebKit::CoordinatedGraphicsScene::~CoordinatedGraphicsScene): Deleted.
2092         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
2093
2094 2018-03-25  Michael Catanzaro  <mcatanzaro@igalia.com>
2095
2096         [GTK] WebKitWebProcessEnumTypes.h missing from webkit-web-extension.h
2097         https://bugs.webkit.org/show_bug.cgi?id=183998
2098
2099         Reviewed by Carlos Garcia Campos.
2100
2101         * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
2102
2103 2018-03-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2104
2105         [GTK] Unresolved type warnings when generating gir
2106         https://bugs.webkit.org/show_bug.cgi?id=183926
2107
2108         Reviewed by Michael Catanzaro.
2109
2110         Skip deprecated functions using JSC C API from introspection.
2111
2112         * UIProcess/API/glib/WebKitJavascriptResult.cpp:
2113         * UIProcess/API/glib/WebKitWebView.cpp:
2114         * WebProcess/InjectedBundle/API/glib/WebKitFrame.cpp:
2115
2116 2018-03-25  Commit Queue  <commit-queue@webkit.org>
2117
2118         Unreviewed, rolling out r229954.
2119         https://bugs.webkit.org/show_bug.cgi?id=184000
2120
2121         Caused many layout tests to crash on Apple High Sierra,
2122         Sierra, iOS Simulator and GTK Linux Debug test bots (Requested
2123         by dydz on #webkit).
2124
2125         Reverted changeset:
2126
2127         "Use SecurityOriginData more consistently in Service Worker
2128         code"
2129         https://bugs.webkit.org/show_bug.cgi?id=183969
2130         https://trac.webkit.org/changeset/229954
2131
2132 2018-03-23  Brian Burg  <bburg@apple.com>
2133
2134         Web Automation: remove unnecessary member variable WebAutomationSession
2135         https://bugs.webkit.org/show_bug.cgi?id=183971
2136
2137         Reviewed by Timothy Hatcher.
2138
2139         The concept of the "active" browsing context is something in the WebDriver
2140         specification, but we were a bit too literal when first implementing this.
2141         There's no actual need for this on the browser side since most commands
2142         require implicitly switching to the target window passed in with the
2143         Automation command. The driver, however, still needs to track the current
2144         browsing context and current top-level browsing context.
2145
2146         For returning whether a browsing context is active,  we can just look at
2147         the page's activity state to know whether the page is active or not. For
2148         a normal browser, only one page is going to be visible and focused at a time.
2149
2150         * UIProcess/Automation/WebAutomationSession.h:
2151         * UIProcess/Automation/WebAutomationSession.cpp:
2152         (WebKit::WebAutomationSession::buildBrowsingContextForPage):
2153         Consult the page's activity state to determine whether it's active.
2154
2155         (WebKit::WebAutomationSession::createBrowsingContext):
2156         (WebKit::WebAutomationSession::closeBrowsingContext):
2157         (WebKit::WebAutomationSession::switchToBrowsingContext):
2158         (WebKit::WebAutomationSession::handleRunOpenPanel):
2159         Stop reading and writing the current browsing context handle.
2160
2161         * UIProcess/WebPageProxy.h:
2162         (WebKit::WebPageProxy::isViewFocused const):
2163         (WebKit::WebPageProxy::isViewWindowActive const):
2164         Add new accessor.
2165
2166 2018-03-25  Tim Horton  <timothy_horton@apple.com>
2167
2168         Add and adopt ENABLE(AIRPLAY_PICKER)
2169         https://bugs.webkit.org/show_bug.cgi?id=183992
2170
2171         Reviewed by Daniel Bates.
2172
2173         * UIProcess/ios/WKContentViewInteraction.h:
2174         * UIProcess/ios/WKContentViewInteraction.mm:
2175         (-[WKContentView _showPlaybackTargetPicker:fromRect:]):
2176         * UIProcess/ios/forms/WKAirPlayRoutePicker.h:
2177         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
2178
2179 2018-03-25  Tim Horton  <timothy_horton@apple.com>
2180
2181         Move WKAnimationDelegate to its own header
2182         https://bugs.webkit.org/show_bug.cgi?id=183976
2183         <rdar://problem/38822299>
2184
2185         Reviewed by Dan Bernstein.
2186
2187         * Shared/RemoteLayerTree/WKAnimationDelegate.h: Added.
2188         * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
2189         * WebKit.xcodeproj/project.pbxproj:
2190         * WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:
2191         RemoteLayerTreeHost uses a forward declaration of WKAnimationDelegate,
2192         so we're just getting lucky that an -invalidate method exists on
2193         some other object. Instead, move WKAnimationDelegate to its own
2194         header, and include it in the places we use it.
2195
2196 2018-03-24  Tim Horton  <timothy_horton@apple.com>
2197
2198         Adopt WK_PLATFORM_NAME in WebKit
2199         https://bugs.webkit.org/show_bug.cgi?id=183978
2200
2201         Reviewed by Dan Bernstein.
2202
2203         * Configurations/WebKit.xcconfig:
2204         * WebKit.xcodeproj/project.pbxproj:
2205         * mac/MigrateHeadersFromWebKitLegacy.make:
2206         * mac/postprocess-framework-headers.sh:
2207
2208 2018-03-24  Tim Horton  <timothy_horton@apple.com>
2209
2210         Ignore sandbox_init_with_parameters deprecation warnings
2211         https://bugs.webkit.org/show_bug.cgi?id=183979
2212
2213         Reviewed by Dan Bernstein.
2214
2215         * Shared/ios/ChildProcessIOS.mm:
2216         (WebKit::ChildProcess::initializeSandbox):
2217
2218 2018-03-24  Chris Dumez  <cdumez@apple.com>
2219
2220         Use SecurityOriginData more consistently in Service Worker code
2221         https://bugs.webkit.org/show_bug.cgi?id=183969
2222
2223         Reviewed by Darin Adler.
2224
2225         Use SecurityOriginData more consistently in Service Worker code to avoid constructing
2226         SecurityOrigin objects unnecessarily.
2227
2228         * NetworkProcess/NetworkResourceLoadParameters.cpp:
2229         (WebKit::NetworkResourceLoadParameters::encode const):
2230         * Shared/API/c/WKSecurityOriginRef.cpp:
2231         (WKSecurityOriginCopyDatabaseIdentifier):
2232         * StorageProcess/ServiceWorker/WebSWOriginStore.cpp:
2233         (WebKit::WebSWOriginStore::addToStore):
2234         (WebKit::WebSWOriginStore::removeFromStore):
2235         * StorageProcess/ServiceWorker/WebSWOriginStore.h:
2236         * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
2237         (WebKit::WebSWServerConnection::scheduleJobInServer):
2238         (WebKit::WebSWServerConnection::registerServiceWorkerClient):
2239         * StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
2240         (WebKit::WebSWServerToContextConnection::WebSWServerToContextConnection):
2241         * StorageProcess/ServiceWorker/WebSWServerToContextConnection.h:
2242         * StorageProcess/StorageProcess.cpp:
2243         (WebKit::StorageProcess::connectionToContextProcessWasClosed):
2244         (WebKit::StorageProcess::needsServerToContextConnectionForOrigin const):
2245         (WebKit::StorageProcess::createStorageToWebProcessConnection):
2246         (WebKit::StorageProcess::deleteWebsiteDataForOrigins):
2247         (WebKit::StorageProcess::serverToContextConnectionForOrigin):
2248         (WebKit::StorageProcess::createServerToContextConnection):
2249         (WebKit::StorageProcess::swContextConnectionMayNoLongerBeNeeded):
2250         * StorageProcess/StorageProcess.h:
2251         * UIProcess/API/APIFrameInfo.cpp:
2252         (API::FrameInfo::create):
2253         * UIProcess/API/C/WKApplicationCacheManager.cpp:
2254         (WKApplicationCacheManagerDeleteEntriesForOrigin):
2255         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
2256         (WKKeyValueStorageManagerDeleteEntriesForOrigin):
2257         * UIProcess/API/C/WKResourceCacheManager.cpp:
2258         (WKResourceCacheManagerClearCacheForOrigin):
2259         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
2260         (WKWebsiteDataStoreRemoveFetchCacheForOrigin):
2261         (WKWebsiteDataStoreGetFetchCacheSizeForOrigin):
2262         * UIProcess/ServiceWorkerProcessProxy.cpp:
2263         (WebKit::ServiceWorkerProcessProxy::create):
2264         (WebKit::ServiceWorkerProcessProxy::ServiceWorkerProcessProxy):
2265         (WebKit::ServiceWorkerProcessProxy::getLaunchOptions):
2266         * UIProcess/ServiceWorkerProcessProxy.h:
2267         * UIProcess/Storage/StorageProcessProxy.cpp:
2268         (WebKit::StorageProcessProxy::getStorageProcessConnection):
2269         * UIProcess/WebProcessPool.cpp:
2270         (WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess):
2271         (WebKit::WebProcessPool::disconnectProcess):
2272         (WebKit::WebProcessPool::updateProcessAssertions):
2273         * UIProcess/WebProcessPool.h:
2274         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2275         (WebKit::WebsiteDataStore::fetchDataAndApply):
2276         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
2277         (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
2278         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2279         (WKBundlePageCopyOriginsWithApplicationCache):
2280         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
2281         (WebKit::UserMediaPermissionRequestManager::sendUserMediaRequest):
2282         (WebKit::UserMediaPermissionRequestManager::enumerateMediaDevices):
2283         * WebProcess/Storage/WebSWClientConnection.cpp:
2284         (WebKit::WebSWClientConnection::registerServiceWorkerClient):
2285         (WebKit::WebSWClientConnection::matchRegistration):
2286         (WebKit::WebSWClientConnection::whenRegistrationReady):
2287         (WebKit::WebSWClientConnection::getRegistrations):
2288         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2289         (WebKit::WebChromeClient::exceededDatabaseQuota):
2290         (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):
2291         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2292         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2293         * WebProcess/WebProcess.cpp:
2294         (WebKit::WebProcess::fetchWebsiteData):
2295         * WebProcess/WebStorage/StorageAreaImpl.cpp:
2296         (WebKit::StorageAreaImpl::securityOrigin const):
2297         * WebProcess/WebStorage/StorageAreaImpl.h:
2298         * WebProcess/WebStorage/StorageAreaMap.cpp:
2299         (WebKit::StorageAreaMap::StorageAreaMap):
2300         (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
2301         (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
2302         * WebProcess/WebStorage/StorageNamespaceImpl.cpp:
2303         (WebKit::StorageNamespaceImpl::didDestroyStorageAreaMap):
2304
2305 2018-03-24  Tim Horton  <timothy_horton@apple.com>
2306
2307         Fix the !ENABLE(MEDIA_STREAM) build
2308         https://bugs.webkit.org/show_bug.cgi?id=183977
2309
2310         Reviewed by Wenson Hsieh.
2311
2312         * UIProcess/Cocoa/UIDelegate.mm:
2313         (WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest):
2314         * UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
2315         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2316         * WebProcess/cocoa/UserMediaCaptureManager.messages.in:
2317
2318 2018-03-24  Tim Horton  <timothy_horton@apple.com>
2319
2320         WKFileUploadPanel shouldn't depend on WebKitLegacy
2321         https://bugs.webkit.org/show_bug.cgi?id=183981
2322
2323         Reviewed by Wenson Hsieh.
2324
2325         * UIProcess/ios/forms/WKFileUploadPanel.mm:
2326         (-[WKFileUploadPanel _uploadItemForImageData:imageName:successBlock:failureBlock:]):
2327         Just use the underlying WebCore function instead of the
2328         unnecessary NSFileManager category method.
2329
2330 2018-03-23  Tim Horton  <timothy_horton@apple.com>
2331
2332         Fix the build with no pasteboard
2333         https://bugs.webkit.org/show_bug.cgi?id=183973
2334
2335         Reviewed by Dan Bernstein.
2336
2337         * Configurations/FeatureDefines.xcconfig:
2338
2339 2018-03-23  Megan Gardner  <megan_gardner@apple.com>
2340
2341         Enable unified text selection in select cases for gradual testing
2342         https://bugs.webkit.org/show_bug.cgi?id=183967
2343         <rdar://problem/38815328>
2344
2345         Reviewed by Tim Horton.
2346         
2347         Enable in select places for a more gradual switch, as this is a big change and we want to make sure
2348         it works before switching completely.
2349
2350         * UIProcess/ios/WKContentViewInteraction.mm:
2351         (-[WKContentView useSelectionAssistantWithGranularity:]):
2352
2353 2018-03-23  John Wilander  <wilander@apple.com>
2354
2355         Resource Load Statistics: Pick up ITP debug mode flag from defaults
2356         https://bugs.webkit.org/show_bug.cgi?id=183956
2357         <rdar://problem/38559574>
2358
2359         Reviewed by Brent Fulgham.
2360
2361         * UIProcess/Cocoa/WebResourceLoadStatisticsStoreCocoa.mm:
2362         (WebKit::WebResourceLoadStatisticsStore::registerUserDefaultsIfNeeded):
2363
2364 2018-03-23  Wenson Hsieh  <wenson_hsieh@apple.com>
2365
2366         [Extra zoom mode] Adopt list view controller UI for select menus
2367         https://bugs.webkit.org/show_bug.cgi?id=183944
2368         <rdar://problem/38799062>
2369
2370         Reviewed by Tim Horton.
2371
2372         Move UIProcess/WKSelectMenuListViewController.* to UIProcess/ios/forms, where it was intended to go.
2373
2374         * UIProcess/ios/forms/WKSelectMenuListViewController.h: Renamed from Source/WebKit/UIProcess/WKSelectMenuListViewController.h.
2375         * UIProcess/ios/forms/WKSelectMenuListViewController.mm: Renamed from Source/WebKit/UIProcess/WKSelectMenuListViewController.mm.
2376         * WebKit.xcodeproj/project.pbxproj:
2377
2378 2018-03-23  Chris Dumez  <cdumez@apple.com>
2379
2380         Promptly terminate service worker processes when they are no longer needed
2381         https://bugs.webkit.org/show_bug.cgi?id=183873
2382         <rdar://problem/38676995>
2383
2384         Reviewed by Youenn Fablet.
2385
2386         The StorageProcess now keeps track of service worker clients for each security
2387         origin. When there is no longer any clients for a given security origin, the
2388         StorageProcess asks the service worker process for the given origin to terminate
2389         and severs its connection to it.
2390
2391         * Shared/Storage/StorageProcessCreationParameters.h:
2392         * StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
2393         (WebKit::WebSWServerToContextConnection::connectionMayNoLongerBeNeeded):
2394         (WebKit::WebSWServerToContextConnection::terminate):
2395         * StorageProcess/ServiceWorker/WebSWServerToContextConnection.h:
2396         * StorageProcess/StorageProcess.cpp:
2397         (WebKit::StorageProcess::connectionToContextProcessWasClosed):
2398         (WebKit::StorageProcess::needsServerToContextConnectionForOrigin const):
2399         (WebKit::StorageProcess::initializeWebsiteDataStore):
2400         (WebKit::StorageProcess::swServerForSession):
2401         (WebKit::StorageProcess::swContextConnectionMayNoLongerBeNeeded):
2402         (WebKit::StorageProcess::disableServiceWorkerProcessTerminationDelay):
2403         * StorageProcess/StorageProcess.h:
2404         * StorageProcess/StorageProcess.messages.in:
2405         * UIProcess/API/Cocoa/WKProcessPool.mm:
2406         (-[WKProcessPool _disableServiceWorkerProcessTerminationDelay]):
2407         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2408         * UIProcess/WebProcessPool.cpp:
2409         (WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore):
2410         (WebKit::WebProcessPool::disableServiceWorkerProcessTerminationDelay):
2411         * UIProcess/WebProcessPool.h:
2412         * WebProcess/Storage/WebSWContextManagerConnection.cpp:
2413         (WebKit::WebSWContextManagerConnection::terminateProcess):
2414         * WebProcess/Storage/WebSWContextManagerConnection.h:
2415         * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
2416
2417 2018-03-23  Brady Eidson  <beidson@apple.com>
2418
2419         Go to back/forward list items after a process-swapped navigation.
2420         <rdar://problem/38690544> and https://bugs.webkit.org/show_bug.cgi?id=183920
2421
2422         Reviewed by Andy Estes.
2423
2424         This takes the initial work of "process swap a normal navigation" and extends it to
2425         process swapping for back/forward item navigations.
2426
2427         * Scripts/webkit/messages.py:
2428
2429         Make sure state objects are serialized to the UI Process back/forward list items, as otherwise
2430         they will be lost in process-swap scenarios:
2431         * Shared/SessionState.cpp:
2432         (WebKit::PageState::encode const):
2433         (WebKit::PageState::decode):
2434         * Shared/SessionState.h:
2435
2436         Make a new variant of APINavigation specifically for back/forward list items.
2437         * UIProcess/API/APINavigation.cpp:
2438         (API::Navigation::Navigation):
2439         (API::Navigation::loggingURL const):
2440         * UIProcess/API/APINavigation.h:
2441         (API::Navigation::create):
2442         (API::Navigation::backForwardListItem):
2443         (API::Navigation::backForwardFrameLoadType const):
2444
2445         * UIProcess/API/C/WKPage.cpp:
2446         (WKPageGoToBackForwardListItem):
2447
2448         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2449         (-[WKBrowsingContextController goToBackForwardListItem:]):
2450
2451         * UIProcess/API/Cocoa/WKWebView.mm:
2452         (-[WKWebView goToBackForwardListItem:]):
2453
2454         * UIProcess/WebNavigationState.cpp:
2455         (WebKit::WebNavigationState::createLoadRequestNavigation):
2456         (WebKit::WebNavigationState::createBackForwardNavigation):
2457         * UIProcess/WebNavigationState.h:
2458
2459         * UIProcess/WebPageProxy.cpp:
2460         (WebKit::WebPageProxy::reattachToWebProcessForReload):
2461         (WebKit::WebPageProxy::reattachToWebProcessWithItem):
2462         (WebKit::WebPageProxy::goForward):
2463         (WebKit::WebPageProxy::goBack):
2464         (WebKit::WebPageProxy::goToBackForwardItem):
2465         (WebKit::WebPageProxy::receivedPolicyDecision):
2466         (WebKit::WebPageProxy::continueNavigationInNewProcess): Handle back/forward navigations differently than others.
2467         (WebKit::WebPageProxy::restoreFromSessionState):
2468         * UIProcess/WebPageProxy.h:
2469
2470         * UIProcess/WebProcessProxy.cpp:
2471         (WebKit::WebProcessProxy::addOrUpdateBackForwardItem): Renamed from "addBackForwardItem" for clarity
2472         (WebKit::WebProcessProxy::addBackForwardItem): Deleted.
2473         * UIProcess/WebProcessProxy.h:
2474         * UIProcess/WebProcessProxy.messages.in:
2475
2476         * UIProcess/ios/ViewGestureControllerIOS.mm:
2477         (WebKit::ViewGestureController::endSwipeGesture):
2478
2479         * UIProcess/mac/ViewGestureControllerMac.mm:
2480         (WebKit::ViewGestureController::endSwipeGesture):
2481
2482         * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
2483         (WebKit::toPageState):
2484         (WebKit::toHistoryItem):
2485
2486         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2487         (WebKit::updateBackForwardItem):
2488
2489         * WebProcess/WebPage/WebPage.cpp:
2490         (WebKit::WebPage::goToBackForwardItem): Combined "goBack" and "goForward" with this method,
2491           passing the appropriate FrameLoadType around as needed to remember the specific type.
2492         (WebKit::WebPage::goForward): Deleted.
2493         (WebKit::WebPage::goBack): Deleted.
2494         * WebProcess/WebPage/WebPage.h:
2495         * WebProcess/WebPage/WebPage.messages.in:
2496
2497 2018-03-23  Megan Gardner  <megan_gardner@apple.com>
2498
2499         Don't use the presence of a textSelectionAssistant as a proxy for if we are in content editable.
2500         https://bugs.webkit.org/show_bug.cgi?id=183804
2501
2502         Reviewed by Tim Horton.
2503
2504         We need to stop using the presence of a textSelectionAssistant as a proxy for if we are selecting in a content editable
2505         or not. As we are planning on switching to only using a textSelectionAssistant for selection, these checks need to 
2506         be more direct in checking what we actually need to know i.e. are we selecting in a content editable.
2507
2508         * Platform/spi/ios/UIKitSPI.h:
2509         * UIProcess/ios/WKContentViewInteraction.mm:
2510         (hasAssistedNode):
2511         (-[WKContentView inputView]):
2512         (-[WKContentView _selectionClipRect]):
2513         (-[WKContentView gestureRecognizer:canBePreventedByGestureRecognizer:]):
2514         (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
2515         (-[WKContentView gestureRecognizerShouldBegin:]):
2516         (-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
2517         (-[WKContentView webSelectionRects]):
2518         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
2519         (-[WKContentView _autofillContext]):
2520
2521 2018-03-23  Youenn Fablet  <youenn@apple.com>
2522
2523         WebProcessPool should not ask to register all clients for each service worker process creation
2524         https://bugs.webkit.org/show_bug.cgi?id=183941
2525
2526         Reviewed by Chris Dumez.
2527
2528         Call registerServiceWorkerClients when there is no service worker process.
2529         Update service worker clients to register all of them no matter the session ID.
2530
2531         * UIProcess/WebProcessPool.cpp:
2532         (WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess):
2533         * WebProcess/WebProcess.cpp:
2534         (WebKit::WebProcess::registerServiceWorkerClients):
2535         * WebProcess/WebProcess.h:
2536         * WebProcess/WebProcess.messages.in:
2537
2538 2018-03-23  Wenson Hsieh  <wenson_hsieh@apple.com>
2539
2540         [Extra zoom mode] Adopt list view controller UI for select menus
2541         https://bugs.webkit.org/show_bug.cgi?id=183944
2542         <rdar://problem/38799062>
2543
2544         Reviewed by Andy Estes.
2545
2546         Rename WKSelectMenuViewController to WKSelectMenuListViewController, and also rename the relevant
2547         WebKitAdditions harness files. See corresponding changes for more details.
2548
2549         * UIProcess/WKSelectMenuListViewController.h: Renamed from Source/WebKit/UIProcess/ios/forms/WKSelectMenuViewController.h.
2550         * UIProcess/WKSelectMenuListViewController.mm: Renamed from Source/WebKit/UIProcess/ios/forms/WKSelectMenuViewController.mm.
2551         * UIProcess/ios/WKContentViewInteraction.h:
2552         * UIProcess/ios/WKContentViewInteraction.mm:
2553         (-[WKContentView presentSelectMenuViewController:]):
2554         (-[WKContentView dismissSelectMenuViewController:]):
2555         (-[WKContentView selectMenu:didSelectItemAtIndex:]):
2556         (-[WKContentView numberOfItemsInSelectMenu:]):
2557         (-[WKContentView selectMenu:displayTextForItemAtIndex:]):
2558         (-[WKContentView selectMenu:didCheckItemAtIndex:checked:]):
2559         (-[WKContentView selectMenuUsesMultipleSelection:]):
2560         (-[WKContentView selectMenu:hasSelectedOptionAtIndex:]):
2561         (-[WKContentView _wheelChangedWithEvent:]):
2562
2563         Overriding wheel events and re-dispatching them is no longer needed after r229437, so we can just remove special
2564         handling for select menus here.
2565
2566         (-[WKContentView didCancelSelectionInSelectMenu:]): Deleted.
2567         (-[WKContentView selectMenuSupportsMultipleSelection:]): Deleted.
2568         (-[WKContentView selectMenu:hasCheckedOptionAtIndex:]): Deleted.
2569         (-[WKContentView startingIndexForSelectMenu:]): Deleted.
2570
2571         The starting index for a select menu is no longer relevant when using list view controllers for input, so we can
2572         just remove this delegate hook altogether.
2573
2574         * WebKit.xcodeproj/project.pbxproj:
2575
2576 2018-03-23  Youenn Fablet  <youenn@apple.com>
2577
2578         CacheStorage::Caches should clear m_caches when clearing its representation even though it is not yet initialized
2579         https://bugs.webkit.org/show_bug.cgi?id=183945
2580
2581         Reviewed by Chris Dumez.
2582
2583         * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
2584         (WebKit::CacheStorage::Caches::clearMemoryRepresentation):
2585         In case we clear Caches in the middle of the initialization, m_caches might not be empty
2586         but m_isInitialized is not yet set to true since we are computing the Caches size.
2587         Update the assertion and clear m_caches in that case.
2588
2589 2018-03-23  David Kilzer  <ddkilzer@apple.com>
2590
2591         Stop using dispatch_set_target_queue()
2592         <https://webkit.org/b/183908>
2593         <rdar://problem/33553533>
2594
2595         Reviewed by Daniel Bates.
2596
2597         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
2598         (WebKit::NetworkCache::IOChannel::IOChannel): Remove the call to
2599         dispatch_set_target_queue() since this is handled in the
2600         dispatch_io_create() call above.
2601
2602 2018-03-23  Youenn Fablet  <youenn@apple.com>
2603
2604         CacheStorage::Engine should not ref itself when hopping to a background thread
2605         https://bugs.webkit.org/show_bug.cgi?id=183925
2606         <rdar://problem/38580483>
2607
2608         Reviewed by Chris Dumez.
2609
2610         Add support for weak pointers to CacheStorage Engine.
2611         Use weak pointer when hopping to background threads.
2612         Store callbacks in CacheStorage::Engine maps to keep them being destroyed in the main thread only.
2613         Made some callbacks CompletionHandler as a bonus.
2614
2615         Made sure to use just one Engine for all private sessions.
2616
2617         * NetworkProcess/cache/CacheStorageEngine.cpp:
2618         (WebKit::CacheStorage::Engine::~Engine):
2619         (WebKit::CacheStorage::Engine::from):
2620         (WebKit::CacheStorage::Engine::initialize):
2621         (WebKit::CacheStorage::Engine::writeFile):
2622         (WebKit::CacheStorage::Engine::readFile):
2623         * NetworkProcess/cache/CacheStorageEngine.h:
2624         (WebKit::CacheStorage::Engine::weakPtrFactory):
2625
2626 2018-03-23  Ryan Haddad  <ryanhaddad@apple.com>
2627
2628         Unreviewed build fix.
2629
2630         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2631
2632 2018-03-23  Miguel Gomez  <magomez@igalia.com>
2633
2634         [GTK][WPE] Avoid software color conversion inside BitmapTextureGL
2635         https://bugs.webkit.org/show_bug.cgi?id=183892
2636
2637         Remove the UpdateContentsFlag parameter when calling BitmapTexture::updateContents().
2638
2639         Reviewed by Žan Doberšek.
2640
2641         * Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp:
2642         (WebKit::CoordinatedBackingStoreTile::swapBuffers):
2643
2644 2018-03-23  Michael Catanzaro  <mcatanzaro@igalia.com>
2645
2646         [WPE][GTK] Fix -Wswitch warnings after r229778
2647         https://bugs.webkit.org/show_bug.cgi?id=183927
2648
2649         Reviewed by Carlos Garcia Campos.
2650
2651         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
2652         (WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse): Log a warning if Suspend is
2653         received as a PolicyAction
2654         * UIProcess/API/glib/WebKitNavigationClient.cpp: Ignore the ProcessSwap termination reason,
2655         which should be invisible to WebKit clients
2656
2657 2018-03-22  Chris Dumez  <cdumez@apple.com>
2658
2659         Include security origin in the service worker process name
2660         https://bugs.webkit.org/show_bug.cgi?id=183913
2661
2662         Reviewed by Youenn Fablet.
2663
2664         Include security origin in the service worker process name to facilitate debugging. This way, we
2665         can differentiate which service worker process is used for which origin in activity monitor.
2666
2667         * Shared/ChildProcess.h:
2668         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
2669         (WebKit::XPCServiceInitializerDelegate::getExtraInitializationData):
2670         * UIProcess/ServiceWorkerProcessProxy.cpp:
2671         (WebKit::ServiceWorkerProcessProxy::getLaunchOptions):
2672         * WebProcess/cocoa/WebProcessCocoa.mm:
2673         (WebKit::WebProcess::initializeProcessName):
2674
2675 2018-03-22  Michael Catanzaro  <mcatanzaro@igalia.com>
2676
2677         Unreviewed, silence unused variable warning
2678
2679         * UIProcess/WebPageProxy.cpp:
2680         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
2681
2682 2018-03-22  Dan Bernstein  <mitz@apple.com>
2683
2684         WKWebView doesn’t expose its spellCheckerDocumentTag
2685         https://bugs.webkit.org/show_bug.cgi?id=183797
2686         <rdar://problem/38678089>
2687
2688         Reviewed by Tim Horton.
2689
2690         * UIProcess/API/Cocoa/WKWebView.mm:
2691         (-[WKWebView _spellCheckerDocumentTag]): Added this getter which calls through to the WebViewImpl.
2692         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Declared _spellCheckerDocumentTag property.
2693
2694 2018-03-22  Chris Dumez  <cdumez@apple.com>
2695
2696         Use the same SWServer for all ephemeral sessions
2697         https://bugs.webkit.org/show_bug.cgi?id=183921
2698         <rdar://problem/36873075>
2699
2700         Reviewed by Youenn Fablet.
2701
2702         Use the same SWServer for all ephemeral sessions. SWServers never go away and we create
2703         one per sessionID. When browsing doing private browsing in Safari (and other fetching
2704         favorite icons), the sessionID is ephemeral and keeps changing. This means that we kept
2705         constructing new SWServers that would never go away. Each SWServer has a thread so we
2706         would eventually hit the thread limit for the storage process.
2707
2708         * StorageProcess/StorageProcess.cpp:
2709         (WebKit::StorageProcess::swServerForSession):
2710
2711 2018-03-22  Michael Catanzaro  <mcatanzaro@igalia.com>
2712
2713         Unreviewed, fix format string warnings in service worker code
2714
2715         On Linux x86_64, uint64_t is unsigned long, not unsigned long long.
2716
2717         * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
2718         (WebKit::WebSWServerConnection::startFetch):
2719         (WebKit::WebSWServerConnection::didFinishFetch):
2720         (WebKit::WebSWServerConnection::didFailFetch):
2721         (WebKit::WebSWServerConnection::didNotHandleFetch):
2722
2723 2018-03-22  Daniel Bates  <dabates@apple.com>
2724
2725         Expose SchemeRegistry::registerAsCanDisplayOnlyIfCanRequest() as WebKit SPI
2726         https://bugs.webkit.org/show_bug.cgi?id=183907
2727         <rdar://problem/38759127>
2728
2729         Reviewed by Alex Christensen.
2730
2731         Adds both modern Objective-C SPI and C SPI to allow an embedding client to register a scheme
2732         whose content should be displayed/loaded if and only if it can be requested. Disregarding an
2733         app that enables universal access, by using this SPI WebKit will refuse to display cross-origin
2734         content for the registered schemes.
2735
2736         We need to add C SPI for embedding clients that have not transitioned to the modern Objective-
2737         C API/SPI.
2738
2739         * Shared/WebProcessCreationParameters.cpp:
2740         (WebKit::WebProcessCreationParameters::encode const):
2741         (WebKit::WebProcessCreationParameters::decode):
2742         * Shared/WebProcessCreationParameters.h:
2743         * UIProcess/API/C/WKContext.cpp:
2744         (WKContextRegisterURLSchemeAsCanDisplayOnlyIfCanRequest):
2745         * UIProcess/API/C/WKContextPrivate.h:
2746         * UIProcess/API/Cocoa/WKProcessPool.mm:
2747         (-[WKProcessPool _registerURLSchemeAsCanDisplayOnlyIfCanRequest:]):
2748         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2749         * UIProcess/WebProcessPool.cpp:
2750         (WebKit::WebProcessPool::initializeNewWebProcess):
2751         (WebKit::WebProcessPool::registerURLSchemeAsCanDisplayOnlyIfCanRequest):
2752         * UIProcess/WebProcessPool.h:
2753         * WebProcess/WebProcess.cpp:
2754         (WebKit::WebProcess::initializeWebProcess):
2755         (WebKit::WebProcess::registerURLSchemeAsCanDisplayOnlyIfCanRequest const):
2756         * WebProcess/WebProcess.h:
2757         * WebProcess/WebProcess.messages.in:
2758
2759 2018-03-22  Tim Horton  <timothy_horton@apple.com>
2760
2761         Improve readability of WebCore's OTHER_LDFLAGS
2762         https://bugs.webkit.org/show_bug.cgi?id=183909
2763         <rdar://problem/38760992>
2764
2765         Reviewed by Dan Bernstein.
2766
2767         * Configurations/Base.xcconfig:
2768         * Configurations/FeatureDefines.xcconfig:
2769
2770 2018-03-22  Zan Dobersek  <zdobersek@igalia.com>
2771
2772         [TexMap] Make TextureMapperContextAttributes thread-specific
2773         https://bugs.webkit.org/show_bug.cgi?id=183895
2774
2775         Reviewed by Carlos Garcia Campos.
2776
2777         CoordinatedGraphicsScene, as an implementor of the
2778         TextureMapperPlatformLayerProxy::Compositor interface, doesn't have to
2779         implement the texmapGL() method anymore.
2780
2781         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
2782         (WebKit::CoordinatedGraphicsScene::onNewBufferAvailable):
2783         (WebKit::CoordinatedGraphicsScene::texmapGL): Deleted.
2784         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
2785
2786 2018-03-21  Frederic Wang  <fwang@igalia.com>
2787
2788         Unreviewed, update comment added in r229801.
2789
2790         * WebProcess/WebPage/ios/FindControllerIOS.mm:
2791         (WebKit::FindController::didFindString): Remove "On Mobile" and mention bug 183889.
2792
2793 2018-03-21  Chris Dumez  <cdumez@apple.com>
2794
2795         Regression(r229831): ProcessSwap.Basic API test is crashing
2796         https://bugs.webkit.org/show_bug.cgi?id=183884
2797
2798         Reviewed by Brady Eidson.
2799
2800         This code should only be called for navigation policy decisions.
2801         It used to work without this check because of an early return, which
2802         was dropped in r229831.
2803
2804         * UIProcess/WebPageProxy.cpp:
2805         (WebKit::WebPageProxy::receivedPolicyDecision):
2806
2807 2018-03-21  Wenson Hsieh  <wenson_hsieh@apple.com>
2808
2809         [Extra zoom mode] Add new SPI hooks for clients to vend an input session context view
2810         https://bugs.webkit.org/show_bug.cgi?id=183866
2811         <rdar://problem/38692256>
2812
2813         Reviewed by Tim Horton.
2814
2815         Add new SPI hooks to _WKInputDelegate allowing internal clients to provide a view that gives additional context
2816         when editing form controls, on top of the default label or placeholder text displayed by WebKit. The height
2817         delegate is invoked first, giving the client an opportunity to lay out the context view to fit the given size;
2818         the actual view is then queried.
2819
2820         If the view changes, clients may tell WebKit to reload the context view via SPI on WKFormInputSession; this call
2821         to reload is plumbed through to the currently presented list view controller (at the moment, this is only the
2822         text input list view controller).
2823
2824         * UIProcess/API/Cocoa/_WKFormInputSession.h:
2825         * UIProcess/API/Cocoa/_WKInputDelegate.h:
2826
2827         Add the new SPI hooks, described above.
2828
2829         * UIProcess/ios/WKContentViewInteraction.h:
2830         * UIProcess/ios/WKContentViewInteraction.mm:
2831         (-[WKFormInputSession reloadFocusedElementContextView]):
2832
2833         Plumb the context view reload hook through WKContentView to WKTextInputListViewController.
2834
2835         (-[WKContentView setupInteraction]):
2836         (-[WKContentView _stopAssistingNode]):
2837         (-[WKContentView reloadContextViewForPresentedListViewController]):
2838         (-[WKContentView focusedFormControllerDidUpdateSuggestions:]):
2839
2840         Slight tweak to only reload text suggestions if we are not blurring the focused element. Without this extra
2841         condition, the list view controller's inner table view would get reloaded when the form input session's text
2842         suggestions are set to nil when the list view controller is dismissed, causing a visible stutter in the
2843         dismissal animation of view controller.
2844
2845 2018-03-21  Chris Dumez  <cdumez@apple.com>
2846
2847         WebKitTestRunner crashed in com.apple.WebKit: WebKit::WebProcessPool::terminateServiceWorkerProcesses
2848         https://bugs.webkit.org/show_bug.cgi?id=183875
2849
2850         Reviewed by Brent Fulgham.
2851
2852         Protect |this| while we're iterating over m_serviceWorkerProcesses and terminating
2853         each service worker process. It is possible for the WebProcess pool to get destroyed
2854         as a result of terminating a service worker process.
2855
2856         This change is covered by layout tests that are currently crashing on the ASAN bots.
2857
2858         * UIProcess/WebProcessPool.cpp:
2859         (WebKit::WebProcessPool::terminateServiceWorkerProcesses):
2860
2861 2018-03-21  Eric Carlson  <eric.carlson@apple.com>
2862
2863         Fix typo in inactive media stream timeout default value
2864         https://bugs.webkit.org/show_bug.cgi?id=183872
2865         <rdar://problem/38723903>
2866
2867         Reviewed by Jer Noble.
2868
2869         * Shared/WebPreferences.yaml: Fix typo.
2870         * Shared/WebPreferencesDefaultValues.h: Ditto.
2871
2872 2018-03-21  Chris Dumez  <cdumez@apple.com>
2873
2874         Make policy decisions asynchronous
2875         https://bugs.webkit.org/show_bug.cgi?id=180568
2876         <rdar://problem/37131297>
2877
2878         Reviewed by Alex Christensen.
2879
2880         Get rid of synchronous IPC and synchronous code paths for policy delegates.
2881         Policy decisions are now all made asynchronously and rely on asynchronous
2882         IPC.
2883
2884         This code change is based on work by Alex Christensen.
2885
2886         * UIProcess/WebPageProxy.cpp:
2887         (WebKit::WebPageProxy::receivedPolicyDecision):
2888         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
2889         (WebKit::WebPageProxy::decidePolicyForResponse):
2890         * UIProcess/WebPageProxy.h:
2891         * UIProcess/WebPageProxy.messages.in:
2892         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2893         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
2894         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2895
2896 2018-03-21  Chris Dumez  <cdumez@apple.com>
2897
2898         ScrollViewInsetTests.RestoreInitialContentOffsetAfterCrash API test is failing with async delegates
2899         https://bugs.webkit.org/show_bug.cgi?id=183787
2900
2901         Reviewed by Wenson Hsieh.
2902
2903         Without asynchronous policy delegates, when the client requests a navigation, we would:
2904         1. Do a synchronous navigation policy check
2905         2. If the client allows the navigation, start the provisional load
2906
2907         Starting the provisional load would freeze the layer tree until first meaningful
2908         layout via WebFrameLoaderClient::provisionalLoadStarted() -> WebPage::didStartPageTransition().
2909
2910         When constructing a WebView and then requesting a load right away. This would make sure
2911         we do not commit a layer tree for the initial about:blank page because the layer tree
2912         would be frozen until we have something meaningful to show for the following load.
2913
2914         However, with asynchronous policy delegates, we are able to do a layer tree commit
2915         during the asynchronous navigation policy check because the layer tree is not frozen
2916         yet (provisional load has not started) and the process is not stuck on synchronous
2917         IPC. When constructing a WebView and then requesting a load right away, this would
2918         allow a layer tree commit for about:blank to happen before we've even started the
2919         load. This would cause some API tests to fail on iOS.
2920
2921         To address the issue, we try and maintain pre-existing behavior by freezing the
2922         layer tree during navigation policy decision.
2923
2924         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2925         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2926         (WebKit::WebFrameLoaderClient::didDecidePolicyForNavigationAction):
2927         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2928         * WebProcess/WebPage/WebPage.cpp:
2929         (WebKit::WebPage::didStartNavigationPolicyCheck):
2930         (WebKit::WebPage::didCompleteNavigationPolicyCheck):
2931         * WebProcess/WebPage/WebPage.h:
2932
2933 2018-03-21  Brent Fulgham  <bfulgham@apple.com>
2934
2935         Allow the WebContent process to read ViewBridge preferences
2936         https://bugs.webkit.org/show_bug.cgi?id=183862
2937         <rdar://problem/38459456>
2938
2939         Reviewed by Eric Carlson.
2940
2941         * WebProcess/com.apple.WebProcess.sb.in:
2942
2943 2018-03-21  Frederic Wang  <fwang@igalia.com>
2944
2945         [iOS] Text highlighted by the Find UI overlaps with NBC news header on google.com
2946         https://bugs.webkit.org/show_bug.cgi?id=183658
2947
2948         Reviewed by Tim Horton.
2949
2950         On Mobile, many sites have overlay headers or footers that may overlap with the highlighted
2951         text inside a scrollable overflow node. To workaround that issue, this commit changes the
2952         behavior so that the text is revealed at the center of the overflow node.
2953
2954         * WebProcess/WebPage/ios/FindControllerIOS.mm:
2955         (WebKit::FindController::didFindString): Use alignCenterAlways instead of alignToEdgeIfNeeded.
2956
2957 2018-03-21  Carlos Garcia Campos  <cgarcia@igalia.com>
2958
2959         [GTK][WPE] JSC bindings not introspectable
2960         https://bugs.webkit.org/show_bug.cgi?id=136989
2961
2962         Reviewed by Michael Catanzaro.
2963
2964         Deprecate the functions that are not introspectable due to JSC C API in GTK+ port and remove them in WPE
2965         port. Add alternative functions using the new JSC GLib API. We no longer need to keep a global context attached
2966         to every view. We can simply create a temporary global context on demand and release it after 1 second. This
2967         also allows us to remove WebPageProxy::javascriptGlobalContext() and all the related code.
2968
2969         * PlatformGTK.cmake:
2970         * PlatformWPE.cmake:
2971         * UIProcess/API/glib/WebKitJavascriptResult.cpp:
2972         (_WebKitJavascriptResult::_WebKitJavascriptResult):
2973         (webkitJavascriptResultCreate):
2974         (webkit_javascript_result_get_global_context):
2975         (webkit_javascript_result_get_value):
2976         (webkit_javascript_result_get_js_value):
2977         * UIProcess/API/glib/WebKitJavascriptResultPrivate.h:
2978         (SharedJavascriptContext::singleton):
2979         (SharedJavascriptContext::SharedJavascriptContext):
2980         (SharedJavascriptContext::getOrCreateContext):
2981         (SharedJavascriptContext::releaseContext):
2982         * UIProcess/API/glib/WebKitUserContentManager.cpp:
2983         * UIProcess/API/glib/WebKitWebView.cpp:
2984         (webkit_web_view_get_javascript_global_context):
2985         (webkitWebViewRunJavaScriptCallback):
2986         * UIProcess/API/gtk/PageClientImpl.cpp:
2987         * UIProcess/API/gtk/PageClientImpl.h:
2988         * UIProcess/API/gtk/WebKitJavascriptResult.h:
2989         * UIProcess/API/gtk/WebKitWebView.h:
2990         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
2991         * UIProcess/API/wpe/APIViewClient.h:
2992         (API::ViewClient::handleDownloadRequest):
2993         * UIProcess/API/wpe/PageClientImpl.cpp:
2994         * UIProcess/API/wpe/PageClientImpl.h:
2995         * UIProcess/API/wpe/WPEView.cpp:
2996         * UIProcess/API/wpe/WPEView.h:
2997         * UIProcess/API/wpe/WebKitJavascriptResult.h:
2998         * UIProcess/API/wpe/WebKitWebView.h:
2999         * UIProcess/PageClient.h:
3000         * UIProcess/WebPageProxy.h:
3001         * UIProcess/gtk/WebPageProxyGtk.cpp:
3002         * UIProcess/wpe/WebPageProxyWPE.cpp:
3003         * WebProcess/InjectedBundle/API/glib/WebKitFrame.cpp:
3004         (webkit_frame_get_js_context):
3005         (webkit_frame_get_js_context_for_script_world):
3006         * WebProcess/InjectedBundle/API/gtk/WebKitFrame.h:
3007         * WebProcess/InjectedBundle/API/wpe/WebKitFrame.h:
3008
3009 2018-03-21  Carlos Garcia Campos  <cgarcia@igalia.com>
3010
3011         [GTK][WPE] Initial implementation of JavaScriptCore glib bindings
3012         https://bugs.webkit.org/show_bug.cgi?id=164061
3013
3014         Reviewed by Michael Catanzaro.
3015
3016         Set decorator and deprecation_guard options in API docs config files, since they are no longer common to all
3017         libraries.
3018
3019         * PlatformGTK.cmake:
3020
3021 2018-03-21  Zan Dobersek  <zdobersek@igalia.com>
3022
3023         [CoordGraphics] Simplify CoordinatedGraphicsScene activation
3024         https://bugs.webkit.org/show_bug.cgi?id=183772
3025
3026         Reviewed by Carlos Garcia Campos.
3027
3028         Simplify CoordinatedGraphicsScene::setActive() into a simple setter of
3029         the m_isActive member variable. We don't have to call renderNextFrame()
3030         anymore as that was only necessary to unblock CoordinatedLayerTreeHost,
3031         but that can be avoided if m_isWaitingForRenderer in that class is
3032         initialized to false.
3033
3034         CoordinatedGraphicsSceneClient::renderNextFrame() virtual method and its
3035         ThreadedCompositor implementation are removed. renderNextFrame() in the
3036         CoordinatedGraphicsScene class can also be removed, along with the
3037         unused dispatchOnMainThread() and dispatchOnClientRunLoop() methods and
3038         the associated m_clientRunLoop member variable.
3039
3040         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
3041         (WebKit::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
3042         (WebKit::CoordinatedGraphicsScene::dispatchOnMainThread): Deleted.
3043         (WebKit::CoordinatedGraphicsScene::dispatchOnClientRunLoop): Deleted.
3044         (WebKit::CoordinatedGraphicsScene::renderNextFrame): Deleted.
3045         (WebKit::CoordinatedGraphicsScene::setActive): Deleted.
3046         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
3047         (WebKit::CoordinatedGraphicsSceneClient::~CoordinatedGraphicsSceneClient):
3048         (WebKit::CoordinatedGraphicsScene::setActive):
3049         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
3050         (WebKit::m_displayRefreshMonitor):
3051         (WebKit::ThreadedCompositor::setNativeSurfaceHandleForCompositing):
3052         (WebKit::ThreadedCompositor::renderNextFrame): Deleted.
3053         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
3054         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
3055
3056 2018-03-21  Zan Dobersek  <zdobersek@igalia.com>
3057
3058         [TexMap] Have TextureMapperLayer::applyAnimationsRecursively() return running animation status
3059         https://bugs.webkit.org/show_bug.cgi?id=183771
3060
3061         Reviewed by Carlos Garcia Campos.
3062
3063         In CoordinatedGraphicsScene::paintToCurrentGLContext(), retrieve
3064         information about any running animation in the scene via the
3065         TextureMapperLayer::applyAnimationsRecursively() call. Use that boolean
3066         value at the end up the method, instead of again traversing the
3067         TextureMapperLayer tree to determine whether any running animations are
3068         present.
3069
3070         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
3071         (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
3072
3073 2018-03-20  Tim Horton  <timothy_horton@apple.com>
3074
3075         Enable the minimal simulator feature flag when appropriate
3076         https://bugs.webkit.org/show_bug.cgi?id=183807
3077
3078         Reviewed by Dan Bernstein.
3079
3080         * Configurations/FeatureDefines.xcconfig:
3081
3082 2018-03-19  Ryosuke Niwa  <rniwa@webkit.org>
3083
3084         Expose content attributes on _WKLinkIconParameters
3085         https://bugs.webkit.org/show_bug.cgi?id=183768
3086
3087         Reviewed by Alex Christensen.
3088
3089         Added _WKLinkIconParameters.attributes to expose content attributes of a link element
3090         which defined a favicon, touch icon, or pre-compressed touch icon.
3091
3092         * UIProcess/API/Cocoa/_WKLinkIconParameters.h:
3093         (_WKLinkIconParameters.attributes): Added.
3094         * UIProcess/API/Cocoa/_WKLinkIconParameters.mm:
3095         (_WKLinkIconParameters._attributes): Added.
3096         (-[_WKLinkIconParameters _initWithLinkIcon:]): Convert the hash map from WebCore to a NSDictionary.
3097         (-[_WKLinkIconParameters attributes]): Added.
3098
3099 2018-03-20  Wenson Hsieh  <wenson_hsieh@apple.com>
3100
3101         Add AssistedNodeInformation plumbing for form control placeholder text and label text
3102         https://bugs.webkit.org/show_bug.cgi?id=183802
3103         <rdar://problem/38686273>
3104
3105         Reviewed by Tim Horton.
3106
3107         Surfaces some additional information about the currently focused element to the input delegate in the UI process.
3108         See comments below for more details.
3109
3110         Test: WebKit.FocusedElementInfo
3111
3112         * Shared/AssistedNodeInformation.cpp:
3113         (WebKit::AssistedNodeInformation::encode const):
3114         (WebKit::AssistedNodeInformation::decode):
3115         * Shared/AssistedNodeInformation.h:
3116
3117         Add `placeholder` and `label` to AssistedNodeInformation, which capture the value of the placeholder attribute
3118         and the text of the first associated label element for the focused form control. Also add boilerplate encoder/
3119         decoder support for these members.
3120
3121         * UIProcess/API/Cocoa/_WKFocusedElementInfo.h:
3122
3123         Augment _WKFocusedElementInfo to include placeholder and label.
3124
3125         * UIProcess/ios/WKContentViewInteraction.mm:
3126         (-[WKFocusedElementInfo initWithAssistedNodeInformation:isUserInitiated:userObject:]):
3127         (-[WKFocusedElementInfo label]):
3128         (-[WKFocusedElementInfo placeholder]):
3129         * WebProcess/WebPage/ios/WebPageIOS.mm:
3130         (WebKit::WebPage::getAssistedNodeInformation):
3131
3132         For input elements and textareas, set the placeholder to the value of the placeholder attribute. For all
3133         elements with associated labels, grab the inner text of the first label that is not empty, ignoring all labels
3134         that are `display: none` (i.e. not being rendered).
3135
3136 2018-03-20  Brady Eidson  <beidson@apple.com>
3137
3138         First piece of process swapping on navigation.
3139         https://bugs.webkit.org/show_bug.cgi?id=183665
3140
3141         Reviewed by Andy Estes.
3142
3143         This patch adds the first pieces of the following feature:
3144         "When a navigation originating inside a WKWebView goes to a different origin,
3145          swap to a new WebProcess for that navigation"
3146
3147         There are significant bugs to be resolved and significant optimizations to be made.
3148         Which is why the feature is disabled by default.
3149
3150         Besides the core logic implementing the feature, this patch does a lot of related 
3151         work such as:
3152         - Removing some now-invalid ASSERTs
3153         - Adding some ASSERTs
3154         - Update various switch states to handle the new "Suspend" policy and "NavigationSwap"
3155           process termination reason
3156
3157         * NetworkProcess/NetworkDataTaskBlob.cpp:
3158         (WebKit::NetworkDataTaskBlob::dispatchDidReceiveResponse):
3159
3160         * NetworkProcess/capture/NetworkDataTaskReplay.cpp:
3161         (WebKit::NetworkCapture::NetworkDataTaskReplay::didReceiveResponse):
3162
3163         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
3164         (toNSURLSessionResponseDisposition):
3165
3166         * Platform/Logging.h:
3167
3168         * Shared/LoadParameters.cpp:
3169         (WebKit::LoadParameters::encode const):
3170         (WebKit::LoadParameters::decode):
3171         * Shared/LoadParameters.h:
3172
3173         * Shared/ProcessTerminationReason.h: Add "NavigationSwap" as a process termination reason.
3174
3175         * UIProcess/API/APINavigation.h:
3176
3177         * UIProcess/API/APIProcessPoolConfiguration.cpp:
3178         (API::ProcessPoolConfiguration::copy):
3179
3180         * UIProcess/API/C/WKAPICast.h:
3181         (WebKit::toAPI):
3182
3183         * UIProcess/Cocoa/NavigationState.mm:
3184         (WebKit::wkProcessTerminationReason):
3185
3186         * UIProcess/WebFramePolicyListenerProxy.cpp:
3187         (WebKit::WebFramePolicyListenerProxy::WebFramePolicyListenerProxy):
3188         * UIProcess/WebFramePolicyListenerProxy.h:
3189         (WebKit::WebFramePolicyListenerProxy::create):
3190         (WebKit::WebFramePolicyListenerProxy::policyListenerType const):
3191
3192         * UIProcess/WebFrameProxy.cpp:
3193         (WebKit::WebFrameProxy::setUpPolicyListenerProxy):
3194         (WebKit::WebFrameProxy::activePolicyListenerProxy):
3195         * UIProcess/WebFrameProxy.h:
3196
3197         * UIProcess/WebNavigationState.cpp:
3198         (WebKit::WebNavigationState::navigation):
3199         (WebKit::WebNavigationState::takeNavigation):
3200
3201         * UIProcess/WebPageProxy.cpp:
3202         (WebKit::WebPageProxy::reattachToWebProcess):
3203         (WebKit::WebPageProxy::attachToProcessForNavigation): Pretend that the existing process 
3204           terminated using the new "NavigationSwap" reason, then manually start the next load.
3205         (WebKit::WebPageProxy::loadRequest):
3206         (WebKit::WebPageProxy::loadRequestWithNavigation):
3207         (WebKit::WebPageProxy::receivedPolicyDecision):
3208         (WebKit::WebPageProxy::continueNavigationInNewProcess):
3209         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
3210         (WebKit::WebPageProxy::decidePolicyForResponse):
3211         (WebKit::WebPageProxy::processDidTerminate):
3212         (WebKit::WebPageProxy::resetState):
3213         (WebKit::WebPageProxy::resetStateAfterProcessExited):
3214         * UIProcess/WebPageProxy.h:
3215
3216         * UIProcess/WebProcessPool.cpp:
3217         (WebKit::WebProcessPool::processForNavigation): Determine which process should be used
3218           for a proposed navigation, creating a new one if necessary.
3219         * UIProcess/WebProcessPool.h:
3220
3221         * UIProcess/WebStorage/StorageManager.cpp:
3222         (WebKit::StorageManager::SessionStorageNamespace::setAllowedConnection):
3223
3224         * WebProcess/WebPage/WebPage.cpp:
3225         (WebKit::WebPage::loadRequest):
3226
3227 2018-03-20  Youenn Fablet  <youenn@apple.com>
3228
3229         ServiceWorkerClientFetch::didReceiveData should check for m_encodedDataLength
3230         https://bugs.webkit.org/show_bug.cgi?id=183668
3231
3232         Reviewed by Chris Dumez.
3233
3234         Crash happens when releasing a RefPtr<SharedBuffer> buffer that is null.
3235         It happens because ServiceWorkerClientFetch can call m_loader->didReceiveBuffer at two different places.
3236         Either when receiving an IPC call or as part of completion handler for the response validation check.
3237         At each call site, we release the buffer to pass it to the loader and we set m_encodedLength to zero.
3238         The fix is to add the m_encodedLength check like done in the case of response validation check completion handler.
3239
3240         * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
3241         (WebKit::ServiceWorkerClientFetch::didReceiveData):
3242
3243 2018-03-20  Jeff Miller  <jeffm@apple.com>
3244
3245         Expose aggressiveTileRetentionEnabled in WKPreferences SPI to match C SPI
3246         https://bugs.webkit.org/show_bug.cgi?id=183790
3247
3248         Reviewed by Alex Christensen.
3249         
3250         Expose this property on macOS only.
3251
3252         * UIProcess/API/Cocoa/WKPreferences.mm:
3253         (-[WKPreferences _setAggressiveTileRetentionEnabled:]):
3254         (-[WKPreferences _aggressiveTileRetentionEnabled]):
3255         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
3256
3257 2018-03-20  Tim Horton  <timothy_horton@apple.com>
3258
3259         Add and adopt WK_PLATFORM_NAME and adjust default feature defines
3260         https://bugs.webkit.org/show_bug.cgi?id=183758
3261         <rdar://problem/38017644>
3262
3263         Reviewed by Dan Bernstein.
3264
3265         * Configurations/FeatureDefines.xcconfig:
3266
3267 2018-03-20  Chris Dumez  <cdumez@apple.com>
3268
3269         Unreviewed, rolling out r229726 and r229763.
3270
3271         Caused some API test failures on iOS
3272
3273         Reverted changesets:
3274
3275         "Make policy decisions asynchronous"
3276         https://bugs.webkit.org/show_bug.cgi?id=180568
3277         https://trac.webkit.org/changeset/229726
3278
3279         "Rebaseline three webarchive tests for WK2 after r229726."
3280         https://bugs.webkit.org/show_bug.cgi?id=180568
3281         https://trac.webkit.org/changeset/229763
3282
3283 2018-03-20  Brent Fulgham  <bfulgham@apple.com>
3284
3285         [iOS] Grant IOKit preference access for the Home button
3286         https://bugs.webkit.org/show_bug.cgi?id=183754
3287         <rdar://problem/38179704>
3288
3289         Reviewed by Eric Carlson.
3290
3291         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
3292
3293 2018-03-20  Wenson Hsieh  <wenson_hsieh@apple.com>
3294
3295         [Extra zoom mode] Adopt updated input view controller machinery for text input
3296         https://bugs.webkit.org/show_bug.cgi?id=183765
3297         <rdar://problem/36926269>
3298
3299         Reviewed by Tim Horton.
3300
3301         Adopt new classes for extra zoomed text inputs. Massage WKTextInputViewController into WKTextInputListView-
3302         Controller and introduce WKFormControlListViewController, the eventual replacement for the base class
3303         WKTextFormControlViewController that will act as the base class of all list-view-controller-based input UI in
3304         extra zoom mode.
3305
3306         * UIProcess/ios/WKContentViewInteraction.h:
3307         * UIProcess/ios/WKContentViewInteraction.mm:
3308         (-[WKContentView presentTextInputViewController:]):
3309         (-[WKContentView dismissTextInputViewController:]):
3310         (-[WKContentView focusedFormControllerDidUpdateSuggestions:]):
3311         (-[WKContentView _wheelChangedWithEvent:]):
3312         * UIProcess/ios/forms/WKFormControlListViewController.h: Copied from Source/WebKit/UIProcess/ios/forms/WKTextInputViewController.h.
3313         * UIProcess/ios/forms/WKFormControlListViewController.mm: Renamed from Source/WebKit/UIProcess/ios/forms/WKTextInputViewController.mm.
3314         * UIProcess/ios/forms/WKTextInputListViewController.h: Copied from Source/WebKit/UIProcess/ios/forms/WKTextInputViewController.h.
3315         * UIProcess/ios/forms/WKTextInputListViewController.mm: Renamed from Source/WebKit/UIProcess/ios/forms/WKTextInputViewController.h.
3316         * WebKit.xcodeproj/project.pbxproj:
3317
3318 2018-03-19  Megan Gardner  <megan_gardner@apple.com>
3319
3320         Clear style colors when setting default appearance
3321         https://bugs.webkit.org/show_bug.cgi?id=183759
3322
3323         Reviewed by Tim Horton.
3324
3325         Colors are cached and need to be cleared and recalculated.
3326
3327         * WebProcess/WebPage/WebPage.cpp:
3328         (WebKit::WebPage::setDefaultAppearance):
3329
3330 2018-03-19  Chris Dumez  <cdumez@apple.com>
3331
3332         WKWebView.ClearAppCache is a flaky API test failure on High Sierra.
3333         https://bugs.webkit.org/show_bug.cgi?id=181546
3334         <rdar://problem/36444327>
3335
3336         Reviewed by Ryosuke Niwa.
3337
3338         in LocalStorageDatabaseTracker::deleteDatabasesModifiedSince(), add origin
3339         to originIdentifiersToDelete if we cannot determine the last modification
3340         time of the database file. This likely means the database file does not
3341         exist. However, we still needs to make sure the origin gets removed from
3342         the origins database and there may be *.wal / *.shm variants of the database
3343         that are still on disk and need to be deleted.
3344
3345         * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp:
3346         (WebKit::LocalStorageDatabaseTracker::deleteDatabasesModifiedSince):
3347
3348 2018-03-19  Chris Dumez  <cdumez@apple.com>
3349
3350         Have one service worker process per security origin
3351         https://bugs.webkit.org/show_bug.cgi?id=183600
3352         <rdar://problem/35280128>
3353
3354         Reviewed by Brady Eidson.
3355
3356         Split service workers from different origins into their own processes
3357         for security reasons.
3358
3359         * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
3360         (WebKit::WebSWServerConnection::startFetch):
3361         (WebKit::WebSWServerConnection::postMessageToServiceWorker):
3362         (WebKit::WebSWServerConnection::scheduleJobInServer):
3363         * StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
3364         (WebKit::WebSWServerToContextConnection::WebSWServerToContextConnection):
3365         * StorageProcess/ServiceWorker/WebSWServerToContextConnection.h:
3366         * StorageProcess/StorageProcess.cpp:
3367         (WebKit::StorageProcess::connectionToContextProcessFromIPCConnection):
3368         (WebKit::StorageProcess::didClose):
3369         (WebKit::StorageProcess::connectionToContextProcessWasClosed):
3370         (WebKit::StorageProcess::needsServerToContextConnectionForOrigin const):
3371         (WebKit::StorageProcess::didReceiveMessage):
3372         (WebKit::StorageProcess::createStorageToWebProcessConnection):
3373         (WebKit::StorageProcess::serverToContextConnectionForOrigin):
3374         (WebKit::StorageProcess::createServerToContextConnection):
3375         * StorageProcess/StorageProcess.h:
3376         * StorageProcess/StorageProcess.messages.in:
3377         * StorageProcess/StorageToWebProcessConnection.cpp:
3378         (WebKit::StorageToWebProcessConnection::didReceiveMessage):
3379         (WebKit::StorageToWebProcessConnection::didClose):
3380         * StorageProcess/StorageToWebProcessConnection.h:
3381         * UIProcess/API/C/WKContext.cpp:
3382         (WKContextTerminateServiceWorkerProcess):
3383         * UIProcess/API/Cocoa/WKProcessPool.mm:
3384         (-[WKProcessPool _terminateServiceWorkerProcesses]):
3385         (-[WKProcessPool _webPageContentProcessCount]):
3386         (-[WKProcessPool _serviceWorkerProcessCount]):
3387         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
3388         * UIProcess/Network/NetworkProcessProxy.cpp:
3389         (WebKit::NetworkProcessProxy::didReceiveAuthenticationChallenge):
3390         (WebKit::NetworkProcessProxy::canAuthenticateAgainstProtectionSpace):
3391         * UIProcess/ServiceWorkerProcessProxy.cpp:
3392         (WebKit::ServiceWorkerProcessProxy::create):
3393         (WebKit::ServiceWorkerProcessProxy::ServiceWorkerProcessProxy):
3394         * UIProcess/ServiceWorkerProcessProxy.h:
3395         (isType):
3396         * UIProcess/Storage/StorageProcessProxy.cpp:
3397         (WebKit::StorageProcessProxy::getStorageProcessConnection):
3398         (WebKit::StorageProcessProxy::didFinishLaunching):
3399         (WebKit::StorageProcessProxy::establishWorkerContextConnectionToStorageProcess):
3400         (WebKit::StorageProcessProxy::establishWorkerContextConnectionToStorageProcessForExplicitSession):
3401         * UIProcess/Storage/StorageProcessProxy.h:
3402         * UIProcess/Storage/StorageProcessProxy.messages.in:
3403         * UIProcess/WebProcessPool.cpp:
3404         (WebKit::WebProcessPool::getStorageProcessConnection):
3405         (WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess):
3406         (WebKit::WebProcessPool::createNewWebProcess):
3407         (WebKit::WebProcessPool::disconnectProcess):
3408         (WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit):
3409         (WebKit::WebProcessPool::createWebPage):
3410         (WebKit::WebProcessPool::updateServiceWorkerUserAgent):
3411         (WebKit::WebProcessPool::mayHaveRegisteredServiceWorkers):
3412         (WebKit::WebProcessPool::pageBeginUsingWebsiteDataStore):
3413         (WebKit::WebProcessPool::terminateServiceWorkerProcesses):
3414         (WebKit::WebProcessPool::updateProcessAssertions):