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