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