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