Unreviewed, rolling out r208330.
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2016-11-03  Ryan Haddad  <ryanhaddad@apple.com>
2
3         Unreviewed, rolling out r208330.
4
5         This change appears to have caused two editing tests to fail
6         on macOS.
7
8         Reverted changeset:
9
10         "Reduce PassRefPtr use in WebKit2"
11         https://bugs.webkit.org/show_bug.cgi?id=164360
12         http://trac.webkit.org/changeset/208330
13
14 2016-11-03  Dan Bernstein  <mitz@apple.com>
15
16         WKWebView’s _observedRenderingProgressEvents not restored after web process crash
17         https://bugs.webkit.org/show_bug.cgi?id=164368
18         <rdar://problem/29091954>
19
20         Reviewed by Anders Carlsson.
21
22         Test: TestWebKitAPI/Tests/WebKit2Cocoa/ObservedRenderingProgressEventsAfterCrash.mm.
23
24         * Shared/WebPageCreationParameters.cpp:
25         (WebKit::WebPageCreationParameters::encode): Encode new observedLayoutMilestones member.
26         (WebKit::WebPageCreationParameters::decode): Decode it.
27         * Shared/WebPageCreationParameters.h: Declared new observedLayoutMilestones member variable.
28
29         * UIProcess/WebPageProxy.cpp:
30         (WebKit::WebPageProxy::WebPageProxy): Removed initializer for
31           m_wantsSessionRestorationRenderTreeSizeThresholdEvent.
32         (WebKit::WebPageProxy::listenForLayoutMilestones): Update new m_observedLayoutMilestones
33           member variable. Don’t update m_wantsSessionRestorationRenderTreeSizeThresholdEvent.
34         (WebKit::WebPageProxy::creationParameters): Set the observedLayoutMilestones member in the
35           creation parameters.
36
37         * UIProcess/WebPageProxy.h: Declared new member variable, deleted
38           m_wantsSessionRestorationRenderTreeSizeThresholdEvent declaration.
39
40         * UIProcess/ios/WebPageProxyIOS.mm:
41         (WebKit::WebPageProxy::didCommitLayerTree): Rather than using
42           m_wantsSessionRestorationRenderTreeSizeThresholdEvent, use m_observedLayoutMilestones.
43
44         * WebProcess/WebPage/WebPage.cpp:
45         (WebKit::WebPage::WebPage): Add the observed layout milestones from the creation parameters.
46
47 2016-11-02  Alex Christensen  <achristensen@webkit.org>
48
49         Reduce PassRefPtr use in WebKit2
50         https://bugs.webkit.org/show_bug.cgi?id=164360
51
52         Reviewed by Tim Horton.
53
54         * Shared/API/APISecurityOrigin.h:
55         (API::SecurityOrigin::SecurityOrigin):
56         * Shared/API/APISerializedScriptValue.h:
57         (API::SerializedScriptValue::create):
58         (API::SerializedScriptValue::SerializedScriptValue):
59         * Shared/API/c/WKSharedAPICast.h:
60         (WebKit::ProxyingRefPtr::ProxyingRefPtr):
61         (WebKit::toAPI):
62         * Shared/APIWebArchive.h:
63         * Shared/APIWebArchive.mm:
64         (API::WebArchive::create):
65         (API::WebArchive::WebArchive):
66         * UIProcess/API/APIHitTestResult.cpp:
67         (API::HitTestResult::create):
68         * UIProcess/API/APIHitTestResult.h:
69         * UIProcess/API/APIUIClient.h:
70         (API::UIClient::createNewPage):
71         * UIProcess/API/C/WKPage.cpp:
72         (WebKit::RunBeforeUnloadConfirmPanelResultListener::create):
73         (WebKit::RunBeforeUnloadConfirmPanelResultListener::RunBeforeUnloadConfirmPanelResultListener):
74         (WebKit::RunJavaScriptAlertResultListener::create):
75         (WebKit::RunJavaScriptAlertResultListener::RunJavaScriptAlertResultListener):
76         (WebKit::RunJavaScriptConfirmResultListener::create):
77         (WebKit::RunJavaScriptConfirmResultListener::RunJavaScriptConfirmResultListener):
78         (WebKit::RunJavaScriptPromptResultListener::create):
79         (WebKit::RunJavaScriptPromptResultListener::RunJavaScriptPromptResultListener):
80         (WKPageSetPageUIClient):
81         * UIProcess/API/Cocoa/WKWebView.mm:
82         (-[WKWebView _takeViewSnapshot]):
83         * UIProcess/API/Cocoa/WKWebViewInternal.h:
84         * UIProcess/Cocoa/UIDelegate.h:
85         * UIProcess/Cocoa/UIDelegate.mm:
86         (WebKit::UIDelegate::UIClient::createNewPage):
87         * UIProcess/ios/WKGeolocationProviderIOS.mm:
88         (-[WKWebAllowDenyPolicyListener initWithPermissionRequestProxy:]):
89         * UIProcess/mac/WKImmediateActionController.mm:
90         (-[WKImmediateActionController _webHitTestResult]):
91         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
92         (contextMenuItems):
93         (WKBundlePageCopyContextMenuItems):
94         (WKBundlePageCopyContextMenuAtPointInWindow):
95         * WebProcess/UserContent/WebUserContentController.cpp:
96         (WebKit::WebUserMessageHandlerDescriptorProxy::create):
97         * WebProcess/WebPage/WebUndoStep.cpp:
98         (WebKit::WebUndoStep::create):
99         * WebProcess/WebPage/WebUndoStep.h:
100         (WebKit::WebUndoStep::WebUndoStep):
101
102 2016-11-01  Gavin Barraclough  <barraclough@apple.com>
103
104         Remove PageThrottler & all related code
105         https://bugs.webkit.org/show_bug.cgi?id=164302
106
107         Reviewed by Ryosuke Niwa.
108
109         All relevant information now available from the ActivityState.
110
111         * PluginProcess/PluginProcess.cpp:
112         (WebKit::PluginProcess::PluginProcess):
113         (WebKit::PluginProcess::createWebProcessConnection):
114         (WebKit::PluginProcess::audioHardwareDidBecomeActive): Deleted.
115         (WebKit::PluginProcess::audioHardwareDidBecomeInactive): Deleted.
116         * PluginProcess/PluginProcess.h:
117         (): Deleted.
118         * PluginProcess/WebProcessConnection.cpp:
119         (WebKit::WebProcessConnection::audioHardwareDidBecomeActive): Deleted.
120         (WebKit::WebProcessConnection::audioHardwareDidBecomeInactive): Deleted.
121         * PluginProcess/WebProcessConnection.h:
122         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
123         (WebKit::NPRuntimeObjectMap::evaluate):
124         * WebProcess/Plugins/Plugin.h:
125         (WebKit::Plugin::audioHardwareActivity): Deleted.
126         * WebProcess/Plugins/PluginProcessConnection.cpp:
127         (WebKit::PluginProcessConnection::PluginProcessConnection):
128         (WebKit::PluginProcessConnection::didReceiveMessage):
129         (WebKit::PluginProcessConnection::audioHardwareDidBecomeActive): Deleted.
130         (WebKit::PluginProcessConnection::audioHardwareDidBecomeInactive): Deleted.
131         * WebProcess/Plugins/PluginProcessConnection.h:
132         (WebKit::PluginProcessConnection::supportsAsynchronousPluginInitialization):
133         (WebKit::PluginProcessConnection::audioHardwareActivity): Deleted.
134         * WebProcess/Plugins/PluginProcessConnection.messages.in:
135         * WebProcess/Plugins/PluginProxy.cpp:
136         (WebKit::PluginProxy::audioHardwareActivity): Deleted.
137         * WebProcess/Plugins/PluginProxy.h:
138         * WebProcess/Plugins/PluginView.cpp:
139         (WebKit::PluginView::audioHardwareActivity): Deleted.
140         * WebProcess/Plugins/PluginView.h:
141         * WebProcess/WebPage/WebPage.cpp:
142
143 2016-11-03  Dan Bernstein  <mitz@apple.com>
144
145         REGRESSION (r206247): Painting milestones can be delayed until the next layer flush
146         https://bugs.webkit.org/show_bug.cgi?id=164340
147         <rdar://problem/29074344>
148
149         Reviewed by Tim Horton.
150
151         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: Declared new helper function.
152         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
153         (WebKit::TiledCoreAnimationDrawingArea::sendPendingNewlyReachedLayoutMilestones): Helper
154           function that sends the message to the UI process and resets
155           m_pendingNewlyReachedLayoutMilestones.
156         (WebKit::TiledCoreAnimationDrawingArea::flushLayers): Wait until after the commit to get the
157           pending milestones and send them to the UI process. This way we don’t miss milestones that
158           fire during the commit.
159
160 2016-11-02  David Kilzer  <ddkilzer@apple.com>
161
162         Bug 164333: Add logging for "WebKit encountered an internal error" messages due to Network process crashes
163         <https://webkit.org/b/164333>
164         <rdar://problem/29072727>
165
166         Reviewed by Alex Christensen.
167
168         * WebProcess/WebProcess.cpp:
169         (WebKit::WebProcess::logDiagnosticMessageForNetworkProcessCrash):
170         Add private method to log diagnostic message.
171         (WebKit::WebProcess::networkProcessConnectionClosed):
172         Call logDiagnosticMessageForNetworkProcessCrash().
173         * WebProcess/WebProcess.h:
174         (WebKit::WebProcess::logDiagnosticMessageForNetworkProcessCrash):
175         Declare new method.
176
177 2016-11-02  Alex Christensen  <achristensen@webkit.org>
178
179         Remove Battery Status API from the tree
180         https://bugs.webkit.org/show_bug.cgi?id=164213
181
182         Reviewed by Sam Weinig.
183
184         * CMakeLists.txt:
185         * PlatformEfl.cmake:
186         * Shared/API/APIObject.h:
187         * Shared/API/c/WKBase.h:
188         * Shared/WebBatteryStatus.cpp: Removed.
189         * Shared/WebBatteryStatus.h: Removed.
190         * UIProcess/API/C/WKAPICast.h:
191         * UIProcess/API/C/WKBatteryManager.cpp: Removed.
192         * UIProcess/API/C/WKBatteryManager.h: Removed.
193         * UIProcess/API/C/WKBatteryStatus.cpp: Removed.
194         * UIProcess/API/C/WKBatteryStatus.h: Removed.
195         * UIProcess/API/C/WKContext.cpp:
196         (WKContextGetBatteryManager): Deleted.
197         * UIProcess/API/C/WKContext.h:
198         * UIProcess/API/efl/ewk_context.cpp:
199         (EwkContext::EwkContext):
200         * UIProcess/API/efl/ewk_context_private.h:
201         * UIProcess/API/efl/ewk_main.cpp:
202         (WebKit::EwkMain::initialize):
203         (WebKit::EwkMain::finalize):
204         (WebKit::EwkMain::shutdownInitializedEFLModules):
205         * UIProcess/API/gtk/WebKitBatteryProvider.cpp: Removed.
206         * UIProcess/API/gtk/WebKitBatteryProvider.h: Removed.
207         * UIProcess/API/gtk/WebKitWebContext.cpp:
208         (webkitWebContextConstructed):
209         * UIProcess/WebBatteryManagerProxy.cpp: Removed.
210         * UIProcess/WebBatteryManagerProxy.h: Removed.
211         * UIProcess/WebBatteryManagerProxy.messages.in: Removed.
212         * UIProcess/WebBatteryProvider.cpp: Removed.
213         * UIProcess/WebBatteryProvider.h: Removed.
214         * UIProcess/WebProcessPool.cpp:
215         (WebKit::m_hiddenPageThrottlingTimer):
216         * UIProcess/efl/BatteryProvider.cpp: Removed.
217         * UIProcess/efl/BatteryProvider.h: Removed.
218         * WebProcess/Battery: Removed.
219         * WebProcess/Battery/WebBatteryManager.cpp: Removed.
220         * WebProcess/Battery/WebBatteryManager.h: Removed.
221         * WebProcess/Battery/WebBatteryManager.messages.in: Removed.
222         * WebProcess/WebCoreSupport/WebBatteryClient.cpp: Removed.
223         * WebProcess/WebCoreSupport/WebBatteryClient.h: Removed.
224         * WebProcess/WebPage/WebPage.cpp:
225         (WebKit::m_userInterfaceLayoutDirection):
226         * WebProcess/WebProcess.cpp:
227         (WebKit::m_resourceLoadStatisticsStorage):
228
229 2016-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
230
231         NetworkSession: Add NetworkDataTask implementation for blobs
232         https://bugs.webkit.org/show_bug.cgi?id=163939
233
234         Reviewed by Alex Christensen.
235
236         Add NetworkDataTaskBlob to handle blobs when using NetworkSession instead of using ResourceHandle. This patch
237         adds more USE(NETWORK_SESSION) ifdefs to not use ResourceHandle in Downloads and NetworkLoad when NetworkSession
238         is enabled.
239
240         * CMakeLists.txt: Add new files to compilation.
241         * NetworkProcess/Downloads/BlobDownloadClient.cpp:
242         * NetworkProcess/Downloads/BlobDownloadClient.h:
243         * NetworkProcess/Downloads/Download.cpp:
244         (WebKit::Download::Download): Split the constructor again and remove the PlatformDownloadTaskRef
245         definitions. Now Cocoa specific constructor receives a NSURLSessionDownloadTask and the general constructor
246         reveices a NetworkDataTask and is used by Soup backend and blobs.
247         (WebKit::Download::~Download):
248         (WebKit::Download::start):
249         (WebKit::Download::startWithHandle):
250         (WebKit::Download::cancel):
251         (WebKit::Download::didReceiveAuthenticationChallenge):
252         (WebKit::Download::didReceiveData):
253         (WebKit::Download::didFinish):
254         (WebKit::Download::platformCancelNetworkLoad): Rename cancelNetworkLoad() as platformCancelNetworkLoad() since
255         this is now used only by Cocoa platform to cancel the NSURLSessionDownloadTask.
256         * NetworkProcess/Downloads/Download.h:
257         (WebKit::Download::Download):
258         (WebKit::Download::suggestedName):
259         (WebKit::Download::request):
260         * NetworkProcess/Downloads/DownloadManager.cpp:
261         (WebKit::DownloadManager::startDownload): Remove blobs specific code when using NetworkSession.
262         (WebKit::DownloadManager::continueDecidePendingDownloadDestination):
263         * NetworkProcess/Downloads/DownloadManager.h:
264         * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
265         (WebKit::Download::platformCancelNetworkLoad):
266         * NetworkProcess/Downloads/soup/DownloadSoup.cpp: Removed.
267         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
268         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload): Remove blobs specific code when
269         using NetworkSession.
270         * NetworkProcess/NetworkDataTask.cpp:
271         (WebKit::NetworkDataTask::create): If request is a blob, create a NetworkDataTaskBlob.
272         * NetworkProcess/NetworkDataTask.h: Add invalidateAndCancel pure virtual method.
273         * NetworkProcess/NetworkDataTaskBlob.cpp: Added.
274         (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
275         (WebKit::NetworkDataTaskBlob::~NetworkDataTaskBlob):
276         (WebKit::NetworkDataTaskBlob::clearStream):
277         (WebKit::NetworkDataTaskBlob::resume):
278         (WebKit::NetworkDataTaskBlob::suspend):
279         (WebKit::NetworkDataTaskBlob::cancel):
280         (WebKit::NetworkDataTaskBlob::invalidateAndCancel):
281         (WebKit::NetworkDataTaskBlob::getSizeForNext):
282         (WebKit::NetworkDataTaskBlob::didGetSize):
283         (WebKit::NetworkDataTaskBlob::seek):
284         (WebKit::NetworkDataTaskBlob::didReceiveResponse):
285         (WebKit::NetworkDataTaskBlob::read):
286         (WebKit::NetworkDataTaskBlob::readData):
287         (WebKit::NetworkDataTaskBlob::readFile):
288         (WebKit::NetworkDataTaskBlob::didOpen):
289         (WebKit::NetworkDataTaskBlob::didRead):
290         (WebKit::NetworkDataTaskBlob::consumeData):
291         (WebKit::NetworkDataTaskBlob::setPendingDownloadLocation):
292         (WebKit::NetworkDataTaskBlob::suggestedFilename):
293         (WebKit::NetworkDataTaskBlob::download):
294         (WebKit::NetworkDataTaskBlob::writeDownload):
295         (WebKit::NetworkDataTaskBlob::cleanDownloadFiles):
296         (WebKit::NetworkDataTaskBlob::didFailDownload):
297         (WebKit::NetworkDataTaskBlob::didFinishDownload):
298         (WebKit::NetworkDataTaskBlob::didFail):
299         (WebKit::NetworkDataTaskBlob::didFinish):
300         * NetworkProcess/NetworkDataTaskBlob.h: Added.
301         * NetworkProcess/NetworkLoad.cpp:
302         (WebKit::NetworkLoad::NetworkLoad): Remove blobs specific code when using NetworkSession.
303         (WebKit::NetworkLoad::~NetworkLoad):
304         (WebKit::NetworkLoad::setDefersLoading):
305         (WebKit::NetworkLoad::cancel):
306         (WebKit::NetworkLoad::continueWillSendRequest):
307         (WebKit::NetworkLoad::continueDidReceiveResponse):
308         (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
309         (WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync):
310         * NetworkProcess/NetworkLoad.h:
311         * NetworkProcess/NetworkSession.cpp:
312         (WebKit::NetworkSession::invalidateAndCancel): Moved from NetworkSessionSoup, since this is now used also by blobs.
313         * NetworkProcess/NetworkSession.h:
314         (WebKit::NetworkSession::registerNetworkDataTask): Ditto.
315         (WebKit::NetworkSession::unregisterNetworkDataTask): Ditto.
316         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h: Add invalidateAndCancel() implementation that does nothing
317         because in Cocoa all tasks are invalidated and canceled by the network session.
318         * NetworkProcess/mac/NetworkLoadMac.mm:
319         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
320         (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
321         (WebKit::NetworkDataTaskSoup::~NetworkDataTaskSoup):
322         (WebKit::NetworkDataTaskSoup::download):
323         * NetworkProcess/soup/NetworkDataTaskSoup.h:
324         * NetworkProcess/soup/NetworkSessionSoup.cpp:
325         * NetworkProcess/soup/NetworkSessionSoup.h:
326         * PlatformEfl.cmake: Remove DownloadSoup.cpp from compilation.
327         * PlatformGTK.cmake: Ditto.
328         * WebKit2.xcodeproj/project.pbxproj: Add new files to compilation.
329
330 2016-11-02  Andy Estes  <aestes@apple.com>
331
332         REGRESSION (r199558): File paths selected for upload are stored using the wrong string encoding
333         https://bugs.webkit.org/show_bug.cgi?id=164311
334         <rdar://problem/26995374>
335
336         Reviewed by Tim Horton.
337
338         -[NSURL fileSystemRepresentation] returns a char* in file system representation, which on
339         iOS is UTF-8, but we were implicitly converting it to a String, which assumes a char* is
340         Latin-1 encoded.
341
342         * UIProcess/ios/forms/WKFileUploadPanel.mm:
343         (-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]): Changed to use fromUTF8() to
344         convert fileURL.fileSystemRepresentation to a String.
345
346 2016-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
347
348         NetworkSession: Network process crash when converting main resource to download
349         https://bugs.webkit.org/show_bug.cgi?id=164220
350
351         Reviewed by Alex Christensen.
352
353         Right after the main resource load is converted to a download, the web process deletes the ResourceLoader which
354         sends the RemoveLoadIdentifier to the network process and the load is aborted. Sometimes it happens that
355         NetworkResourceLoader::abort() is called while the NetworkLoad is still deciding the destination of the
356         download. In such case, NetworkResourceLoader::didConvertToDownload() has already been called, but not
357         NetworkResourceLoader::didBecomeDownload(). In NetworkResourceLoader::abort() we already handle the case of
358         having a NetworkLoad after NetworkResourceLoader::didConvertToDownload() has been called, to avoid canceling the
359         load in such case, however cleanup() is always called unconditionally and the NetworkLoad is deleted before
360         NetworkResourceLoader::didBecomeDownload() is called. When the NetworkLoad is destroyed the NetworkDataTask
361         client becomes nullptr, leaving it in a state where both the client is nullptr and the download hasn't been
362         created yet. That's not expected to happen and when the response completion handler is called in the
363         NetworkDataTask it tries to use either the client or the download and it crashes.
364
365         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
366         (WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier): Update ASSERT, because abort doesn't cleanup the
367         resource loader in case it's becoming a download.
368         * NetworkProcess/NetworkResourceLoader.cpp:
369         (WebKit::NetworkResourceLoader::didBecomeDownload): Call cleanup() instead of just deleting the network load.
370         (WebKit::NetworkResourceLoader::isBecomingDownload): Helper method to check if the resource load was converted to a
371         download, but didBecomeDownload() hasn't been called yet.
372         (WebKit::NetworkResourceLoader::abort): If the resource load is becoming a download do not call cleanup()
373         because it will be called by didBecomeDownload() later.
374         * NetworkProcess/NetworkResourceLoader.h:
375
376 2016-11-02  David Kilzer  <ddkilzer@apple.com>
377
378         Add logging for "WebKit encountered an internal error" messages
379         <https://webkit.org/b/164272>
380         <rdar://problem/28546064>
381
382         Reviewed by Alex Christensen.
383
384         * NetworkProcess/NetworkResourceLoader.cpp:
385         (WebKit::NetworkResourceLoader::startNetworkLoad):
386         * WebProcess/Network/WebLoaderStrategy.cpp:
387         (WebKit::WebLoaderStrategy::loadResourceSynchronously):
388         * WebProcess/Network/WebResourceLoader.cpp:
389         (WebKit::WebResourceLoader::didReceiveResource):
390         - Add logging for various internalError() events.
391
392 2016-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
393
394         [GTK] BadDamage X Window System error in WebKit::AcceleratedBackingStoreX11::update when called from WebPageProxy::exitAcceleratedCompositingMode
395         https://bugs.webkit.org/show_bug.cgi?id=164303
396
397         Reviewed by Michael Catanzaro.
398
399         This can happen if the web process exits before the UI process has cleaned up the accelerated surface. Trap
400         BadDrawable and BadDamage X errors and ignore them, while still crashing for any other X error.
401
402         * UIProcess/gtk/AcceleratedBackingStoreX11.cpp:
403         (WebKit::AcceleratedBackingStoreX11::~AcceleratedBackingStoreX11):
404         (WebKit::AcceleratedBackingStoreX11::update):
405
406 2016-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
407
408         [GTK] Remove FileSystem::filenameToString() and use FileSystem::stringFromFileSystemRepresentation() everywhere instead
409         https://bugs.webkit.org/show_bug.cgi?id=164315
410
411         Reviewed by Michael Catanzaro.
412
413         * Shared/gtk/ProcessExecutablePathGtk.cpp:
414         (WebKit::getExecutablePath):
415         (WebKit::findWebKitProcess):
416         * UIProcess/API/gtk/APIWebsiteDataStoreGtk.cpp:
417         (API::WebsiteDataStore::defaultNetworkCacheDirectory):
418         (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation):
419         (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):
420         * UIProcess/API/gtk/WebKitWebContext.cpp:
421         (webkitWebContextConstructed):
422         (webkit_web_context_set_favicon_database_directory):
423         (webkit_web_context_set_additional_plugins_directory):
424         (webkit_web_context_set_disk_cache_directory):
425         * UIProcess/API/gtk/WebKitWebsiteDataManager.cpp:
426         (webkitWebsiteDataManagerGetDataStore):
427         * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
428         (WebKit::PluginInfoCache::PluginInfoCache):
429         * UIProcess/gtk/WebProcessPoolGtk.cpp:
430         (WebKit::WebProcessPool::platformDefaultIconDatabasePath):
431         * WebProcess/gtk/WebGtkExtensionManager.cpp:
432         (WebKit::parseUserData):
433
434 2016-11-02  Romain Bellessort  <romain.bellessort@crf.canon.fr>
435
436         [Readable Streams API] Enable creation of ReadableByteStreamController
437         https://bugs.webkit.org/show_bug.cgi?id=164014
438
439         Reviewed by Youenn Fablet.
440
441         Added flag for the byte stream part of Readable Streams API.
442
443         * Configurations/FeatureDefines.xcconfig:
444
445 2016-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
446
447         PluginInfoStore::loadPluginsIfNecessary can still load plugins multiple times
448         https://bugs.webkit.org/show_bug.cgi?id=164103
449
450         Reviewed by Michael Catanzaro.
451
452         Follow symlinks when scanning plugins to avoid duplicates.
453
454         * UIProcess/Plugins/gtk/PluginInfoCache.cpp: Bump the cache version to ensure duplicated plugins are removed
455         from the cache.
456         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
457         (WebKit::PluginInfoStore::pluginPathsInDirectory): Use realpath() to always return the actual file path.
458
459 2016-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
460
461         [GTK] Plugin process crash in WebKit::NetscapePluginX11::visibilityDidChange with evince browser plugin
462         https://bugs.webkit.org/show_bug.cgi?id=164204
463
464         Reviewed by Michael Catanzaro.
465
466         Check the platform plugin widget is embedded before trying to get its socket window.
467
468         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
469         (WebKit::NetscapePluginX11::geometryDidChange):
470         (WebKit::NetscapePluginX11::visibilityDidChange):
471
472 2016-11-01  Wenson Hsieh  <wenson_hsieh@apple.com>
473
474         Turn the Input Events runtime flag on by default
475         https://bugs.webkit.org/show_bug.cgi?id=164297
476
477         Reviewed by Ryosuke Niwa.
478
479         * Shared/WebPreferencesDefinitions.h:
480
481 2016-11-01  Jaehun Lim  <ljaehun.lim@samsung.com>
482
483         Unreviewed, EFL build fix after r208225
484
485         Rename ViewState to ActivityState
486
487         * UIProcess/efl/WebView.cpp:
488         (WebKit::WebView::setActive):
489         (WebKit::WebView::setFocused):
490         (WebKit::WebView::setVisible):
491
492 2016-11-01  Alex Christensen  <achristensen@webkit.org>
493
494         Fix CMake build.
495
496         * PlatformMac.cmake:
497
498 2016-11-01  Ryosuke Niwa  <rniwa@webkit.org>
499
500         Remove CUSTOM_ELEMENTS build flag
501         https://bugs.webkit.org/show_bug.cgi?id=164267
502
503         Reviewed by Antti Koivisto.
504
505         Removed the build flag.
506
507         * Configurations/FeatureDefines.xcconfig:
508         * WebProcess/InjectedBundle/InjectedBundle.cpp:
509         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
510         * WebProcess/WebPage/WebPage.cpp:
511         (WebKit::WebPage::updatePreferences):
512
513 2016-11-01  Eric Carlson  <eric.carlson@apple.com>
514
515         [MediaStream] restrict media capture secure connections
516         https://bugs.webkit.org/show_bug.cgi?id=164234
517         <rdar://problem/28944906>
518
519         Reviewed by Alex Christensen.
520
521         * Shared/WebPreferencesDefinitions.h:
522    
523         * UIProcess/API/C/WKPreferences.cpp:
524         (WKPreferencesSetMediaCaptureRequiresSecureConnection):
525         (WKPreferencesGetMediaCaptureRequiresSecureConnection):
526         * UIProcess/API/C/WKPreferencesRefPrivate.h:
527    
528         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
529         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): Drive by
530          fix: remove some unused parameters in a lambda call.
531
532         * WebProcess/WebPage/WebPage.cpp:
533         (WebKit::WebPage::updatePreferences):
534
535 2016-11-01  Gavin Barraclough  <barraclough@apple.com>
536
537         Add IsAudible, IsLoading to ActivityState
538         https://bugs.webkit.org/show_bug.cgi?id=164286
539
540         Reviewed by Geoff Garen.
541
542         By computing these values in the UIProcess and passing them to WebContent we can
543         more closely unify iOS & macOS throttling, and remove the PageThrottler class.
544
545         * UIProcess/WebPageProxy.cpp:
546         (WebKit::WebPageProxy::updateActivityState):
547             - Added update for IsAudible, IsLoading flags.
548         (WebKit::WebPageProxy::updateThrottleState):
549             - Read IsAudible, IsLoading flags from ActivityState.
550         (WebKit::WebPageProxy::setMuted):
551             - call activityStateDidChange to trigger update.
552         (WebKit::WebPageProxy::isPlayingMediaDidChange):
553             - call activityStateDidChange to trigger update.
554         * UIProcess/WebPageProxy.h:
555         (WebKit::WebPageProxy::isLoadingChanged):
556             - call activityStateDidChange to trigger update.
557
558 2016-10-31  Gavin Barraclough  <barraclough@apple.com>
559
560         Rename ViewState to ActivityState
561         https://bugs.webkit.org/show_bug.cgi?id=164254
562
563         Reviewed by Andreas Kling.
564
565         We plan to add a couple more flags to ViewState that aren't directly related to the view
566         itself - whether there is an ongoing page load, and whether whether there is audio playback.
567         This will allow viewState (now activityState) to fully drive throttling decisions.
568
569         Renaming this bitfield accordingly.
570
571         * Shared/WebPageCreationParameters.cpp:
572         (WebKit::WebPageCreationParameters::encode):
573         (WebKit::WebPageCreationParameters::decode):
574         * Shared/WebPageCreationParameters.h:
575         * UIProcess/API/Cocoa/WKWebView.mm:
576         (-[WKWebView didMoveToWindow]):
577         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
578         (_WebKitWebViewBasePrivate::_WebKitWebViewBasePrivate):
579         (_WebKitWebViewBasePrivate::updateActivityStateTimerFired):
580         (webkitWebViewBaseScheduleUpdateActivityState):
581         (toplevelWindowFocusInEvent):
582         (toplevelWindowFocusOutEvent):
583         (toplevelWindowStateEvent):
584         (webkitWebViewBaseSetToplevelOnScreenWindow):
585         (webkitWebViewBaseMap):
586         (webkitWebViewBaseUnmap):
587         (webkitWebViewBaseSetFocus):
588         (webkitWebViewBaseIsInWindowActive):
589         (webkitWebViewBaseIsFocused):
590         (webkitWebViewBaseIsVisible):
591         (webkitWebViewBaseIsInWindow):
592         (_WebKitWebViewBasePrivate::updateViewStateTimerFired): Deleted.
593         (webkitWebViewBaseScheduleUpdateViewState): Deleted.
594         * UIProcess/Cocoa/WebViewImpl.mm:
595         (WebKit::WebViewImpl::becomeFirstResponder):
596         (WebKit::WebViewImpl::resignFirstResponder):
597         (WebKit::WebViewImpl::windowDidOrderOffScreen):
598         (WebKit::WebViewImpl::windowDidOrderOnScreen):
599         (WebKit::WebViewImpl::windowDidBecomeKey):
600         (WebKit::WebViewImpl::windowDidResignKey):
601         (WebKit::WebViewImpl::windowDidMiniaturize):
602         (WebKit::WebViewImpl::windowDidDeminiaturize):
603         (WebKit::WebViewImpl::windowDidChangeOcclusionState):
604         (WebKit::WebViewImpl::viewDidMoveToWindow):
605         (WebKit::WebViewImpl::viewDidHide):
606         (WebKit::WebViewImpl::viewDidUnhide):
607         (WebKit::WebViewImpl::activeSpaceDidChange):
608         (WebKit::WebViewImpl::endDeferringViewInWindowChanges):
609         (WebKit::WebViewImpl::endDeferringViewInWindowChangesSync):
610         (WebKit::WebViewImpl::prepareForMoveToWindow):
611         * UIProcess/DrawingAreaProxy.h:
612         (WebKit::DrawingAreaProxy::waitForDidUpdateActivityState):
613         (WebKit::DrawingAreaProxy::waitForDidUpdateViewState): Deleted.
614         * UIProcess/WebPageProxy.cpp:
615         (WebKit::WebPageProxy::WebPageProxy):
616         (WebKit::WebPageProxy::reattachToWebProcess):
617         (WebKit::WebPageProxy::setSuppressVisibilityUpdates):
618         (WebKit::WebPageProxy::updateActivityState):
619         (WebKit::WebPageProxy::activityStateDidChange):
620         (WebKit::WebPageProxy::dispatchActivityStateChange):
621         (WebKit::WebPageProxy::updateThrottleState):
622         (WebKit::WebPageProxy::waitForDidUpdateActivityState):
623         (WebKit::WebPageProxy::creationParameters):
624         (WebKit::WebPageProxy::installActivityStateChangeCompletionHandler):
625         (WebKit::WebPageProxy::updateViewState): Deleted.
626         (WebKit::WebPageProxy::viewStateDidChange): Deleted.
627         (WebKit::WebPageProxy::dispatchViewStateChange): Deleted.
628         (WebKit::WebPageProxy::waitForDidUpdateViewState): Deleted.
629         (WebKit::WebPageProxy::installViewStateChangeCompletionHandler): Deleted.
630         * UIProcess/WebPageProxy.h:
631         (WebKit::WebPageProxy::isInWindow):
632         (WebKit::WebPageProxy::didUpdateActivityState):
633         (WebKit::WebPageProxy::isViewVisible):
634         (WebKit::WebPageProxy::didUpdateViewState): Deleted.
635         * UIProcess/WebPageProxy.messages.in:
636         * UIProcess/WebProcessProxy.cpp:
637         (WebKit::WebProcessProxy::windowServerConnectionStateChanged):
638         * UIProcess/efl/WebView.cpp:
639         * UIProcess/ios/WKContentView.mm:
640         (-[WKContentView _applicationDidEnterBackground]):
641         (-[WKContentView _applicationWillEnterForeground]):
642         * UIProcess/ios/WKPDFView.mm:
643         (-[WKPDFView _applicationDidEnterBackground]):
644         (-[WKPDFView _applicationWillEnterForeground]):
645         * UIProcess/ios/WebPageProxyIOS.mm:
646         (WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
647         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
648         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
649         (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
650         (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateActivityState):
651         (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState): Deleted.
652         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
653         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
654         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateActivityState):
655         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateViewState): Deleted.
656         * WebProcess/Plugins/PluginView.cpp:
657         (WebKit::PluginView::activityStateDidChange):
658         (WebKit::PluginView::viewStateDidChange): Deleted.
659         * WebProcess/Plugins/PluginView.h:
660         * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
661         (WebKit::AcceleratedDrawingArea::activityStateDidChange):
662         (WebKit::AcceleratedDrawingArea::viewStateDidChange): Deleted.
663         * WebProcess/WebPage/AcceleratedDrawingArea.h:
664         * WebProcess/WebPage/DrawingArea.h:
665         (WebKit::DrawingArea::activityStateDidChange):
666         (WebKit::DrawingArea::viewStateDidChange): Deleted.
667         * WebProcess/WebPage/WebPage.cpp:
668         (WebKit::m_userInterfaceLayoutDirection):
669         (WebKit::WebPage::reinitializeWebPage):
670         (WebKit::WebPage::updateIsInWindow):
671         (WebKit::WebPage::setActivityState):
672         (WebKit::WebPage::setViewState): Deleted.
673         * WebProcess/WebPage/WebPage.h:
674         (WebKit::WebPage::isVisible):
675         (WebKit::WebPage::isVisibleOrOccluded):
676         * WebProcess/WebPage/WebPage.messages.in:
677         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
678         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
679         (WebKit::RemoteLayerTreeDrawingArea::activityStateDidChange):
680         (WebKit::RemoteLayerTreeDrawingArea::viewStateDidChange): Deleted.
681         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
682         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
683         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
684         (WebKit::TiledCoreAnimationDrawingArea::activityStateDidChange):
685         (WebKit::TiledCoreAnimationDrawingArea::didUpdateActivityStateTimerFired):
686         (WebKit::TiledCoreAnimationDrawingArea::viewStateDidChange): Deleted.
687         (WebKit::TiledCoreAnimationDrawingArea::didUpdateViewStateTimerFired): Deleted.
688
689 2016-10-31  Jaehun Lim  <ljaehun.lim@samsung.com>
690
691         Unreviewed, CMake build fix
692
693         Adds #include <WebCore/IDBGetAllRecordsData.h>
694
695         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
696
697 2016-10-31  Simon Fraser  <simon.fraser@apple.com>
698
699         Add basic visual/layout viewport support for fixed position layout
700         https://bugs.webkit.org/show_bug.cgi?id=164261
701
702         Reviewed by Dean Jackson.
703
704         Don't make visualViewportEnabled an experimental feature, because I don't want it enabled
705         by default in WebKitTestRunner (and therefore mismatching DumpRenderTree).
706
707         * Shared/WebPreferencesDefinitions.h:
708
709 2016-10-29  Filip Pizlo  <fpizlo@apple.com>
710
711         JSC should support SharedArrayBuffer
712         https://bugs.webkit.org/show_bug.cgi?id=163986
713
714         Reviewed by Keith Miller.
715         
716         Adds some small things we need for SharedArrayBuffer.
717
718         * UIProcess/API/C/WKPreferencesRefPrivate.h:
719         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
720         * WebProcess/InjectedBundle/InjectedBundle.cpp:
721         (WebKit::InjectedBundle::createWebDataFromUint8Array):
722
723 2016-10-31  Brady Eidson  <beidson@apple.com>
724
725         IndexedDB 2.0: Support IDBObjectStore getAll/getAllKeys.
726         <rdar://problem/28806934> and https://bugs.webkit.org/show_bug.cgi?id=164097
727
728         Reviewed by Darin Adler.
729
730         - Handle moving "Get All" requests to and from the DatabaseProcess.
731         - Handle the additional task of creating/passing Sandbox Extensions for
732           referenced files when necessary. 
733           
734         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
735         (WebKit::WebIDBConnectionToClient::handleGetResult):
736         (WebKit::WebIDBConnectionToClient::didGetAllRecords):
737         (WebKit::WebIDBConnectionToClient::getAllRecords):
738         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
739         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
740         
741         * Shared/WebCoreArgumentCoders.h:
742         
743         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
744         (WebKit::WebIDBConnectionToServer::getAllRecords):
745         (WebKit::preregisterSandboxExtensionsIfNecessary):
746         (WebKit::WebIDBConnectionToServer::didGetAllRecords):
747         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
748         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in:
749
750 2016-10-31  Wenson Hsieh  <wenson_hsieh@apple.com>
751
752         [WK1] Candidate visibility should not update as a result of selection during a dictionary lookup
753         https://bugs.webkit.org/show_bug.cgi?id=164236
754         <rdar://problem/28747712>
755
756         Reviewed by Beth Dakin.
757
758         See WebCore ChangeLog for more detail. Removes m_isGettingDictionaryPopupInfo from the WebPage in favor of
759         keeping track of the same state in Editor, so that both the WK1 and WK2 cases can share the same codepath.
760
761         * WebProcess/WebPage/WebPage.cpp:
762         (WebKit::WebPage::didChangeSelection):
763         * WebProcess/WebPage/WebPage.h:
764         * WebProcess/WebPage/mac/WebPageMac.mm:
765         (WebKit::WebPage::dictionaryPopupInfoForRange):
766
767 2016-10-31  Simon Fraser  <simon.fraser@apple.com>
768
769         Implement IntersectionObserver
770         https://bugs.webkit.org/show_bug.cgi?id=159475
771
772         Reviewed by Ryosuke Niwa.
773
774         Add ENABLE_INTERSECTION_OBSERVER, enabled by default.
775
776         * Configurations/FeatureDefines.xcconfig:
777
778 2016-10-31  Ryan Haddad  <ryanhaddad@apple.com>
779
780         Unreviewed, rolling out r208154.
781
782         This change caused an assertion failure during API tests on
783         macOS.
784
785         Reverted changeset:
786
787         "NetworkSession: Network process crash when converting main
788         resource to download"
789         https://bugs.webkit.org/show_bug.cgi?id=164220
790         http://trac.webkit.org/changeset/208154
791
792 2016-10-28  Brent Fulgham  <bfulgham@apple.com>
793
794         Do a better job of protecting Frame objects in the context of JavaScript calls
795         https://bugs.webkit.org/show_bug.cgi?id=164163
796         <rdar://problem/28955249>
797
798         Reviewed by Darin Adler.
799
800         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
801         (WebKit::InjectedBundleRangeHandle::renderedImage): Protected the Frame.
802         * WebProcess/WebPage/WebPage.cpp:
803         (WebKit::WebPage::insertTextAsync): Ditto.
804         (WebKit::WebPage::setComposition): Ditto.
805         * WebProcess/WebPage/mac/WebPageMac.mm:
806         (WebKit::WebPage::insertDictatedTextAsync): Ditto.
807
808 2016-10-31  Carlos Garcia Campos  <cgarcia@igalia.com>
809
810         NetworkSession: Network process crash when converting main resource to download
811         https://bugs.webkit.org/show_bug.cgi?id=164220
812
813         Reviewed by Alex Christensen.
814
815         Right after the main resource load is converted to a download, the web process deletes the ResourceLoader which
816         sends the RemoveLoadIdentifier to the network process and the load is aborted. Sometimes it happens that
817         NetworkResourceLoader::abort() is called while the NetworkLoad is still deciding the destination of the
818         download. In such case, NetworkResourceLoader::didConvertToDownload() has already been called, but not
819         NetworkResourceLoader::didBecomeDownload(). In NetworkResourceLoader::abort() we already handle the case of
820         having a NetworkLoad after NetworkResourceLoader::didConvertToDownload() has been called, to avoid canceling the
821         load in such case, however cleanup() is always called unconditionally and the NetworkLoad is deleted before
822         NetworkResourceLoader::didBecomeDownload() is called. When the NetworkLoad is destroyed the NetworkDataTask
823         client becomes nullptr, leaving it in a state where both the client is nullptr and the download hasn't been
824         created yet. That's not expected to happen and when the response completion handler is called in the
825         NetworkDataTask it tries to use either the client or the download and it crashes.
826
827         * NetworkProcess/NetworkResourceLoader.cpp:
828         (WebKit::NetworkResourceLoader::didBecomeDownload): Call cleanup() instead of just deleting the network load.
829         (WebKit::NetworkResourceLoader::abort): If we still have a network load that was converted to a download, do not
830         call cleanup() because it will be called by didBecomeDownload() later.
831
832 2016-10-31  Darin Adler  <darin@apple.com>
833
834         Move ChildNode and ParentNode from ExceptionCode to Exception, add support for ExceptionOr<T&>
835         https://bugs.webkit.org/show_bug.cgi?id=164214
836
837         Reviewed by Alex Christensen.
838
839         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
840         (webkit_dom_document_query_selector): Updated exception handling.
841         (webkit_dom_document_query_selector_all): Ditto.
842         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.cpp:
843         (webkit_dom_document_fragment_query_selector): Ditto.
844         (webkit_dom_document_fragment_query_selector_all): Ditto.
845         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
846         (webkit_dom_element_query_selector): Ditto.
847         (webkit_dom_element_query_selector_all): Ditto.
848
849 2016-10-31  Darin Adler  <darin@apple.com>
850
851         Convert Document from ExceptionCode to Exception
852         https://bugs.webkit.org/show_bug.cgi?id=164212
853
854         Reviewed by Alex Christensen.
855
856         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
857         (webkit_dom_document_create_element): Updated exception handling.
858         (webkit_dom_document_create_cdata_section): Ditto.
859         (webkit_dom_document_create_processing_instruction): Ditto.
860         (webkit_dom_document_create_attribute): Ditto.
861         (webkit_dom_document_import_node): Ditto.
862         (webkit_dom_document_create_element_ns): Ditto.
863         (webkit_dom_document_create_attribute_ns): Ditto.
864         (webkit_dom_document_adopt_node): Ditto.
865         (webkit_dom_document_create_event): Ditto.
866         (webkit_dom_document_set_xml_version): Ditto.
867         (webkit_dom_document_get_cookie): Ditto.
868         (webkit_dom_document_set_cookie): Ditto.
869         (webkit_dom_document_set_body): Ditto.
870         * WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm:
871         (-[WKDOMDocument createElement:]): Ditto.
872
873 2016-10-31  Wenson Hsieh  <wenson_hsieh@apple.com>
874
875         Holding down a key to choose an accented character should fire "insertReplacementText" input events
876         https://bugs.webkit.org/show_bug.cgi?id=164209
877         <rdar://problem/29019305>
878
879         Reviewed by Darin Adler.
880
881         When replacing text, call Editor::insertText with the correct TextEventInputType so that WebCore will know to
882         use EditActionInsertReplacement when creating and applying the corresponding TypingCommand. Additional minor
883         changes in order to support testing replacement text insertion.
884
885         * UIProcess/API/Cocoa/WKWebView.mm:
886         (-[WKWebView _insertText:replacementRange:]):
887         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
888         * WebProcess/WebPage/WebPage.cpp:
889         (WebKit::WebPage::insertTextAsync):
890
891 2016-10-30  Darin Adler  <darin@apple.com>
892
893         Move Element, NamedNodeMap, and DOMStringMap from ExceptionCode to Exception
894         https://bugs.webkit.org/show_bug.cgi?id=164206
895
896         Reviewed by Chris Dumez.
897
898         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.cpp:
899         (webkit_dom_named_node_map_set_named_item): Updated exception handling.
900         (webkit_dom_named_node_map_remove_named_item): Ditto.
901         (webkit_dom_named_node_map_set_named_item_ns): Ditto.
902         (webkit_dom_named_node_map_remove_named_item_ns): Ditto.
903         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
904         (webkit_dom_element_set_attribute): Ditto.
905         (webkit_dom_element_set_attribute_node): Ditto.
906         (webkit_dom_element_remove_attribute_node): Ditto.
907         (webkit_dom_element_set_attribute_ns): Ditto.
908         (webkit_dom_element_set_attribute_node_ns): Ditto.
909         (webkit_dom_element_matches): Ditto.
910         (webkit_dom_element_closest): Ditto.
911         (webkit_dom_element_webkit_matches_selector): Ditto.
912         (webkit_dom_element_insert_adjacent_element): Ditto.
913         (webkit_dom_element_insert_adjacent_html): Ditto.
914         (webkit_dom_element_insert_adjacent_text): Ditto.
915         (webkit_dom_element_set_inner_html): Ditto.
916         (webkit_dom_element_set_outer_html): Ditto.
917         * WebProcess/InjectedBundle/API/mac/WKDOMElement.mm:
918         (-[WKDOMElement setAttribute:value:]): Ditto.
919
920 2016-10-30  Yusuke Suzuki  <utatane.tea@gmail.com>
921
922         [DOM] Introduce WebCore::jsDynamicDowncast
923         https://bugs.webkit.org/show_bug.cgi?id=164137
924
925         Reviewed by Darin Adler.
926
927         * WebProcess/Automation/WebAutomationSessionProxy.cpp:
928         (WebKit::WebAutomationSessionProxy::elementForNodeHandle):
929
930 2016-10-29  Darin Adler  <darin@apple.com>
931
932         Convert more of DOM from ExceptionCode to Exception
933         https://bugs.webkit.org/show_bug.cgi?id=164173
934
935         Reviewed by Ryosuke Niwa.
936
937         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.cpp:
938         (webkit_dom_character_data_substring_data): Updated since this
939         now uses ExceptionOr.
940         (webkit_dom_character_data_insert_data): Ditto.
941         (webkit_dom_character_data_delete_data): Ditto.
942         (webkit_dom_character_data_replace_data): Ditto.
943         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp:
944         (webkit_dom_text_replace_whole_text): Ditto.
945         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.cpp:
946         (webkit_dom_text_split_text): Ditto.
947
948 2016-10-28  Darin Adler  <darin@apple.com>
949
950         Move all classes in the HTML directory from ExceptionCode to Exception
951         https://bugs.webkit.org/show_bug.cgi?id=163876
952
953         Reviewed by Sam Weinig.
954
955         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.cpp:
956         (webkit_dom_dom_token_list_add): Updated exception handling.
957         (webkit_dom_dom_token_list_remove): Ditto.
958         (webkit_dom_dom_token_list_toggle): Ditto.
959         (webkit_dom_dom_token_list_replace): Ditto.
960         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
961         (webkit_dom_element_remove): Ditto.
962         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp:
963         (webkit_dom_html_element_set_inner_text): Ditto.
964         (webkit_dom_html_element_set_outer_text): Ditto.
965         (webkit_dom_html_element_set_content_editable): Ditto.
966         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
967         (webkit_dom_html_input_element_set_max_length): Ditto.
968         (webkit_dom_html_input_element_set_size): Ditto.
969         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:
970         (webkit_dom_html_select_element_set_length): Ditto.
971         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.cpp:
972         (webkit_dom_html_table_element_insert_row): Ditto.
973         (webkit_dom_html_table_element_delete_row): Ditto.
974         (webkit_dom_html_table_element_set_caption): Ditto.
975         (webkit_dom_html_table_element_set_t_head): Ditto.
976         (webkit_dom_html_table_element_set_t_foot): Ditto.
977         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.cpp:
978         (webkit_dom_html_table_row_element_insert_cell): Ditto.
979         (webkit_dom_html_table_row_element_delete_cell): Ditto.
980         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.cpp:
981         (webkit_dom_html_table_section_element_insert_row): Ditto.
982         (webkit_dom_html_table_section_element_delete_row): Ditto.
983
984         * WebProcess/WebPage/WebPage.cpp:
985         (WebKit::WebPage::editorState): Removed ASSERT_NO_EXCEPTION.
986
987         * WebProcess/WebPage/ios/WebPageIOS.mm:
988         (WebKit::WebPage::setAssistedNodeValueAsNumber): Removed ASSERT_NO_EXCEPTION.
989
990         * WebProcess/cocoa/WebPlaybackSessionManager.mm:
991         (WebKit::WebPlaybackSessionManager::seekableRangesChanged):
992         Changed the code to use a different interface to TimeRange that does
993         not involve exceptions.
994
995 2016-10-28  Wenson Hsieh  <wenson_hsieh@apple.com>
996
997         iOS autocorrection does not trigger an input event of inputType "insertReplacementText"
998         https://bugs.webkit.org/show_bug.cgi?id=164077
999         <rdar://problem/28987810>
1000
1001         Reviewed by Simon Fraser.
1002
1003         Small tweak to mark text insertion when autocorrecting as such, as opposed to regular keyboard input.
1004
1005         * WebProcess/WebPage/ios/WebPageIOS.mm:
1006         (WebKit::WebPage::syncApplyAutocorrection):
1007
1008 2016-10-28  Megan Gardner  <megan_gardner@apple.com>
1009
1010         Rename SharedMemoryMac to SharedMemoryCocoa
1011         https://bugs.webkit.org/show_bug.cgi?id=164156
1012
1013         Reviewed by Alex Christensen.
1014
1015         Renamed SharedMemoryMac to SharedMemoryCocoa, as it runs on all cocoa platforms, not exclusively just mac, and
1016         thus should be named to reflect that reality.
1017
1018         * Platform/cocoa: Added.
1019         * Platform/cocoa/SharedMemoryCocoa.cpp: Copied from Source/WebKit2/Platform/mac/SharedMemoryMac.cpp.
1020         * Platform/mac/SharedMemoryMac.cpp: Removed.
1021         * WebKit2.xcodeproj/project.pbxproj:
1022
1023 2016-10-28  Antti Koivisto  <antti@apple.com>
1024
1025         Enable CFNetwork connection cache fast lane for WebKit2
1026         https://bugs.webkit.org/show_bug.cgi?id=164129
1027
1028         Reviewed by Andreas Kling.
1029
1030         The idea of this feature is keep a connection free for higher priority requests so low-priority
1031         image loads can't take all the available connections.
1032
1033         We have this enabled on WK1 but not on WK2. See what enabling it does for performance in bots.
1034
1035         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1036         (WebKit::initializeNetworkSettings):
1037
1038             Based on code inspection setting kHTTPMinimumFastLanePriority is not sufficient to enable this feature,
1039             kHTTPNumFastLanes needs also be set to a non-zero value. Use the same constants as WK1.
1040             Also enable this on Mac to unify behavior.
1041
1042 2016-10-27  Michael Catanzaro  <mcatanzaro@igalia.com>
1043
1044         [GTK] New stable DOM API headers should be included from webkitdom.h
1045         https://bugs.webkit.org/show_bug.cgi?id=164069
1046
1047         Reviewed by Carlos Garcia Campos.
1048
1049         * WebProcess/InjectedBundle/API/gtk/DOM/webkitdom.h:
1050
1051 2016-10-27  Simon Fraser  <simon.fraser@apple.com>
1052
1053         Fix when building against the MacOSX10.12.sdk where "macos" is not recognized
1054         in the availability macros.
1055
1056         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1057
1058 2016-10-27  Megan Gardner  <megan_gardner@apple.com>
1059
1060         Add support for wide gamut for ShareableBitmap for image popovers
1061         https://bugs.webkit.org/show_bug.cgi?id=164001
1062
1063         Reviewed by Simon Fraser.
1064
1065         Added suppport for wide gamut in ShareableBitmap. SharableBitmaps now know the size of their pixels,
1066         and that data is passed back and forth between the processes. The callers of SharedBitmap will determine
1067         if their image should support wide gamut, but ShareableBitmap will override a set flag on a device that
1068         is incapbable of supporting a wide gamut image.
1069         This makes it possible to show wide gamut images in image popovers on iOS.
1070         This is currently untestable, so no tests added.
1071
1072         * Platform/IPC/Decoder.cpp:
1073         (IPC::Decoder::decode):
1074         * Platform/IPC/Decoder.h:
1075         * Platform/IPC/Encoder.cpp:
1076         (IPC::Encoder::encode):
1077         * Platform/IPC/Encoder.h:
1078         * Shared/ShareableBitmap.cpp:
1079         (WebKit::bytesPerPixel):
1080         (WebKit::ShareableBitmap::Handle::encode):
1081         (WebKit::ShareableBitmap::Handle::decode):
1082         (WebKit::ShareableBitmap::Handle::clear):
1083         (WebKit::ShareableBitmap::create):
1084         (WebKit::ShareableBitmap::createShareable):
1085         (WebKit::ShareableBitmap::createHandle):
1086         (WebKit::ShareableBitmap::ShareableBitmap):
1087         * Shared/ShareableBitmap.h:
1088         (WebKit::ShareableBitmap::numBytesForSize):
1089         (WebKit::ShareableBitmap::sizeInBytes):
1090         * Shared/cg/ShareableBitmapCG.cpp:
1091         (WebKit::bitmapInfo):
1092         (WebKit::ShareableBitmap::createGraphicsContext):
1093         (WebKit::ShareableBitmap::createCGImage):
1094         * WebProcess/WebPage/ios/WebPageIOS.mm:
1095         (WebKit::WebPage::getPositionInformation):
1096
1097 2016-10-27  Wenson Hsieh  <wenson_hsieh@apple.com>
1098
1099         Support "insertFromDrop" and "deleteByDrag" for the InputEvent spec
1100         https://bugs.webkit.org/show_bug.cgi?id=163948
1101         <rdar://problem/28921433>
1102
1103         Reviewed by Darin Adler.
1104
1105         Add support for new drag and drop-related EditAction enum values.
1106
1107         * UIProcess/WebEditCommandProxy.cpp:
1108         (WebKit::WebEditCommandProxy::nameForEditAction):
1109
1110 2016-10-26  Chris Dumez  <cdumez@apple.com>
1111
1112         Replace IDBKeyPath with a WTF::Variant
1113         https://bugs.webkit.org/show_bug.cgi?id=163909
1114
1115         Reviewed by Darin Adler.
1116
1117         Add coders to encode / decode IDBKeyPath type for IPC.
1118
1119         * Shared/Databases/IndexedDB/WebIDBResult.cpp:
1120         * Shared/WebCoreArgumentCoders.cpp:
1121         (IPC::ArgumentCoder<IDBKeyPath>::encode):
1122         (IPC::ArgumentCoder<IDBKeyPath>::decode):
1123         * Shared/WebCoreArgumentCoders.h:
1124         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
1125
1126 2016-10-26  Brian Burg  <bburg@apple.com>
1127
1128         Web Inspector: remove unused bool return value from FrontendChannel::sendMessageToFrontend
1129         https://bugs.webkit.org/show_bug.cgi?id=164046
1130
1131         Reviewed by Joseph Pecoraro.
1132
1133         * WebProcess/WebPage/WebInspector.cpp:
1134         (WebKit::WebInspector::sendMessageToFrontend):
1135         * WebProcess/WebPage/WebInspector.h:
1136
1137 2016-10-26  Eric Carlson  <eric.carlson@apple.com>
1138
1139         [MediaStream] Add "has capture device" bit to media state flags
1140         https://bugs.webkit.org/show_bug.cgi?id=163952
1141
1142         Unreviewed fix after r207839.
1143
1144         * WebProcess/WebPage/WebPage.cpp:
1145         (WebKit::WebPage::setMuted): Take an MutedStateFlags, not a bool.
1146         * WebProcess/WebPage/WebPage.h:
1147
1148 2016-10-26  Carlos Garcia Campos  <cgarcia@igalia.com>
1149
1150         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.15.1 release.
1151
1152         * gtk/NEWS: Add release notes for 2.15.1.
1153
1154 2016-10-26  Carlos Garcia Campos  <cgarcia@igalia.com>
1155
1156         REGRESSION(r206505) [GTK] Build broken with GTK+ 3.14
1157         https://bugs.webkit.org/show_bug.cgi?id=162776
1158
1159         Reviewed by Xabier Rodriguez-Calvar.
1160
1161         Do not use gtk_widget_get_action_group() when GTK+ < 3.16, use g_object_set instead to attach the action group
1162         to the menu widget.
1163
1164         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
1165         (WebKit::WebContextMenuProxyGtk::append):
1166         (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
1167         (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk):
1168
1169 2016-10-25  Alex Christensen  <achristensen@webkit.org>
1170
1171         CMake build fix.
1172
1173         * PlatformMac.cmake:
1174         * Shared/WebHitTestResultData.cpp:
1175         (WebKit::WebHitTestResultData::WebHitTestResultData):
1176         Explicitly call AtomicString::string to make the String constructor no longer ambiguous.
1177         It couldn't decide whether to use operator const String& or operator NSString*.
1178
1179 2016-10-25  Carlos Garcia Campos  <cgarcia@igalia.com>
1180
1181         [SOUP] Network process assertion in NetworkDataTask::continueHTTPRedirection
1182         https://bugs.webkit.org/show_bug.cgi?id=163941
1183
1184         Reviewed by Michael Catanzaro.
1185
1186         equalLettersIgnoringASCIICase() expects the second argument to be the letters to compare in lowercase, so use
1187         "get" instead of "GET".
1188
1189         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
1190         (WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
1191
1192 2016-10-25  Eric Carlson  <eric.carlson@apple.com>
1193
1194         [MediaStream] Add "has capture device" bit to media state flags
1195         https://bugs.webkit.org/show_bug.cgi?id=163952
1196
1197         Reviewed by Sam Weinig.
1198
1199         * UIProcess/API/C/WKPage.cpp:
1200         (WKPageGetMediaState): Support MediaProducer::HasMediaCaptureDevice.
1201         * UIProcess/API/C/WKPagePrivate.h: Define kWKMediaHasCaptureDevice.
1202
1203 2016-10-25  Commit Queue  <commit-queue@webkit.org>
1204
1205         Unreviewed, rolling out r207827 and r207828.
1206         https://bugs.webkit.org/show_bug.cgi?id=163965
1207
1208         Caused LayoutTest webaudio/web-audio-is-playing.html to time
1209         out on macOS. (Requested by ryanhaddad on #webkit).
1210
1211         Reverted changesets:
1212
1213         "[MediaStream] Add "has capture device" bit to media state
1214         flags"
1215         https://bugs.webkit.org/show_bug.cgi?id=163952
1216         http://trac.webkit.org/changeset/207827
1217
1218         "[MediaStream] Add "has capture device" bit to media state
1219         flags"
1220         https://bugs.webkit.org/show_bug.cgi?id=163952
1221         http://trac.webkit.org/changeset/207828
1222
1223 2016-10-25  Eric Carlson  <eric.carlson@apple.com>
1224
1225         [MediaStream] Add "has capture device" bit to media state flags
1226         https://bugs.webkit.org/show_bug.cgi?id=163952
1227
1228         Reviewed by Sam Weinig.
1229
1230         * UIProcess/API/C/WKPage.cpp:
1231         (WKPageGetMediaState): Support MediaProducer::HasMediaCaptureDevice.
1232         * UIProcess/API/C/WKPagePrivate.h: Define kWKMediaHasCaptureDevice.
1233
1234 2016-10-25  Chris Dumez  <cdumez@apple.com>
1235
1236         Unreviewed, rolling out r207494.
1237
1238         iOS SDK has been updated on the bots now so rollout the
1239         rollout
1240
1241         Reverted changeset:
1242
1243         "Unreviewed, rolling out r207413."
1244         https://bugs.webkit.org/show_bug.cgi?id=163547
1245         http://trac.webkit.org/changeset/207494
1246
1247 2016-10-25  Jonathan Bedard  <jbedard@apple.com>
1248
1249         Unreviewed build fix.
1250
1251         * UIProcess/API/Cocoa/WKWebView.mm:
1252         (-[WKWebView _fullscreenDelegate]): Removed unneeded parenthesis.
1253
1254 2016-10-19  Jer Noble  <jer.noble@apple.com>
1255
1256         Add WKWebView fullscreen delegate SPI
1257         https://bugs.webkit.org/show_bug.cgi?id=163674
1258
1259         Reviewed by Anders Carlsson.
1260
1261         Add a new SPI property to WKWebView allowing clients to be notified when fullscreen mode enters and exits.
1262
1263         * UIProcess/API/APIFullscreenClient.h: Added.
1264         (API::FullscreenClient::~FullscreenClient):
1265         (API::FullscreenClient::willEnterFullscreen):
1266         (API::FullscreenClient::didEnterFullscreen):
1267         (API::FullscreenClient::willExitFullscreen):
1268         (API::FullscreenClient::didExitFullscreen):
1269         * UIProcess/API/Cocoa/WKWebView.mm:
1270         (-[WKWebView _initializeWithConfiguration:]):
1271         (-[WKWebView _setFullscreenDelegate:]):
1272         (-[WKWebView _fullscreenDelegate]):
1273         (-[WKWebView _isInFullscreen]):
1274         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1275         * UIProcess/API/Cocoa/_WKFullscreenDelegate.h: Added.
1276         * UIProcess/Cocoa/FullscreenClient.h: Added.
1277         (WebKit::FullscreenClient::~FullscreenClient):
1278         * UIProcess/Cocoa/FullscreenClient.mm: Added.
1279         (WebKit::FullscreenClient::FullscreenClient):
1280         (WebKit::FullscreenClient::delegate):
1281         (WebKit::FullscreenClient::setDelegate):
1282         (WebKit::FullscreenClient::willEnterFullscreen):
1283         (WebKit::FullscreenClient::didEnterFullscreen):
1284         (WebKit::FullscreenClient::willExitFullscreen):
1285         (WebKit::FullscreenClient::didExitFullscreen):
1286         * UIProcess/WebFullScreenManagerProxy.cpp:
1287         (WebKit::WebFullScreenManagerProxy::willEnterFullScreen):
1288         (WebKit::WebFullScreenManagerProxy::didEnterFullScreen):
1289         (WebKit::WebFullScreenManagerProxy::willExitFullScreen):
1290         (WebKit::WebFullScreenManagerProxy::didExitFullScreen):
1291         * UIProcess/WebPageProxy.cpp:
1292         (WebKit::WebPageProxy::WebPageProxy):
1293         (WebKit::WebPageProxy::setFullscreenClient):
1294         (WebKit::WebPageProxy::fullScreenManager): Deleted.
1295         * UIProcess/WebPageProxy.h:
1296         (WebKit::WebPageProxy::fullscreenClient):
1297         * WebKit2.xcodeproj/project.pbxproj:
1298
1299 2016-10-25  Carlos Garcia Campos  <cgarcia@igalia.com>
1300
1301         Unreviewed. Fix timeouts in 12 GTK+ unit tests after r207812.
1302
1303         * NetworkProcess/NetworkProcessCreationParameters.h: Initialize loadThrottleLatency.
1304
1305 2016-10-25  Carlos Garcia Campos  <cgarcia@igalia.com>
1306
1307         Unreviewed. Fix Soup based ports debug build after r207813.
1308
1309         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
1310         (WebKit::NetworkDataTaskSoup::authenticateCallback):
1311         (WebKit::NetworkDataTaskSoup::requestStartedCallback):
1312
1313 2016-10-25  Andreas Kling  <akling@apple.com>
1314
1315         More PassRefPtr purging in WebCore.
1316         <https://webkit.org/b/163895>
1317
1318         Reviewed by Antti Koivisto.
1319
1320         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:
1321         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
1322         (WebKit::PDFPlugin::createScrollbar):
1323
1324 2016-10-25  Carlos Garcia Campos  <cgarcia@igalia.com>
1325
1326         NetworkSession: switch to use subclasses for NetworkSession and NetworkDataTask implementations
1327         https://bugs.webkit.org/show_bug.cgi?id=163777
1328
1329         Reviewed by Alex Christensen.
1330
1331         The subclass model allows us to choose the implementation at run time, so we could add other implementations
1332         like a mock network class to measure performance, and even one for blobs and finally get rid of ResourceHandle
1333         in WebKit2.
1334
1335         * CMakeLists.txt: Add new files to compilation.
1336         * NetworkProcess/NetworkDataTask.cpp: Added.
1337         (WebKit::NetworkDataTask::create): Create a NetworkDataTaskCocoa or NetworkDataTaskSoup.
1338         (WebKit::NetworkDataTask::NetworkDataTask): Move common code from NetworkDataTaskCocoa and NetworkDataTaskSoup
1339         here to handle the early failures.
1340         (WebKit::NetworkDataTask::~NetworkDataTask):
1341         (WebKit::NetworkDataTask::scheduleFailure):
1342         (WebKit::NetworkDataTask::failureTimerFired):
1343         * NetworkProcess/NetworkDataTask.h: Remove platform specific members.
1344         (WebKit::NetworkDataTask::setPendingDownloadLocation): Make it virtual and set the m_pendingDownloadLocation.
1345         (WebKit::NetworkDataTask::suggestedFilename): Make it virtual and const with a default implementation.
1346         (WebKit::NetworkDataTask::setSuggestedFilename): Ditto.
1347         (WebKit::NetworkDataTask::allowsSpecificHTTPSCertificateForHost): Ditto.
1348         * NetworkProcess/NetworkLoad.cpp: Include NetworkDataTaskCocoa.h.
1349         * NetworkProcess/NetworkLoad.h: Include NetworkDataTask.h instead of NetworkSession.h.
1350         * NetworkProcess/NetworkProcess.cpp:
1351         (WebKit::NetworkProcess::NetworkProcess): Use NetworkSessionCocoa.
1352         * NetworkProcess/NetworkSession.cpp:
1353         (WebKit::NetworkSession::create): Create a NetworkSessionCocoa or NetworkSessionSoup.
1354         (WebKit::NetworkSession::defaultSession): In case of cocoa use NetworkSessionCocoa::defaultSession() because of
1355         the custom protocol manager, otherwise simply create a default session.
1356         (WebKit::NetworkSession::networkStorageSession): Move common code from NetworkSessionCocoa and
1357         NetworkSessionSoup here.
1358         (WebKit::NetworkSession::NetworkSession):
1359         (WebKit::NetworkSession::~NetworkSession):
1360         * NetworkProcess/NetworkSession.h: Remove platform specific members.
1361         (WebKit::NetworkSession::invalidateAndCancel): Make it virtual.
1362         (WebKit::NetworkSession::clearCredentials): Ditto.
1363         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp: Include NetworkSession.h.
1364         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h: Added.
1365         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
1366         (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
1367         (WebKit::NetworkDataTaskCocoa::~NetworkDataTaskCocoa):
1368         (WebKit::NetworkDataTaskCocoa::didSendData):
1369         (WebKit::NetworkDataTaskCocoa::didReceiveChallenge):
1370         (WebKit::NetworkDataTaskCocoa::didCompleteWithError):
1371         (WebKit::NetworkDataTaskCocoa::didReceiveResponse):
1372         (WebKit::NetworkDataTaskCocoa::didReceiveData):
1373         (WebKit::NetworkDataTaskCocoa::didBecomeDownload):
1374         (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
1375         (WebKit::NetworkDataTaskCocoa::setPendingDownloadLocation):
1376         (WebKit::NetworkDataTaskCocoa::tryPasswordBasedAuthentication):
1377         (WebKit::NetworkDataTaskCocoa::transferSandboxExtensionToDownload):
1378         (WebKit::NetworkDataTaskCocoa::allowsSpecificHTTPSCertificateForHost):
1379         (WebKit::NetworkDataTaskCocoa::suggestedFilename):
1380         (WebKit::NetworkDataTaskCocoa::cancel):
1381         (WebKit::NetworkDataTaskCocoa::resume):
1382         (WebKit::NetworkDataTaskCocoa::suspend):
1383         (WebKit::NetworkDataTaskCocoa::state):
1384         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1385         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
1386         * NetworkProcess/cocoa/NetworkSessionCocoa.h: Added.
1387         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1388         (-[WKNetworkSessionDelegate initWithNetworkSession:withCredentials:]):
1389         (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):
1390         (WebKit::configurationForSessionID):
1391         (WebKit::NetworkSessionCocoa::setCustomProtocolManager):
1392         (WebKit::NetworkSessionCocoa::setSourceApplicationAuditTokenData):
1393         (WebKit::NetworkSessionCocoa::setSourceApplicationBundleIdentifier):
1394         (WebKit::NetworkSessionCocoa::setSourceApplicationSecondaryIdentifier):
1395         (WebKit::NetworkSessionCocoa::setCTDataConnectionServiceType):
1396         (WebKit::NetworkSessionCocoa::create):
1397         (WebKit::NetworkSessionCocoa::defaultSession):
1398         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
1399         (WebKit::NetworkSessionCocoa::~NetworkSessionCocoa):
1400         (WebKit::NetworkSessionCocoa::invalidateAndCancel):
1401         (WebKit::NetworkSessionCocoa::clearCredentials):
1402         (WebKit::NetworkSessionCocoa::dataTaskForIdentifier):
1403         (WebKit::NetworkSessionCocoa::addDownloadID):
1404         (WebKit::NetworkSessionCocoa::downloadID):
1405         (WebKit::NetworkSessionCocoa::takeDownloadID):
1406         * NetworkProcess/mac/RemoteNetworkingContext.mm:
1407         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
1408         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
1409         (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
1410         (WebKit::NetworkDataTaskSoup::~NetworkDataTaskSoup):
1411         (WebKit::NetworkDataTaskSoup::suggestedFilename):
1412         (WebKit::NetworkDataTaskSoup::setPendingDownloadLocation):
1413         (WebKit::NetworkDataTaskSoup::createRequest):
1414         (WebKit::NetworkDataTaskSoup::clearRequest):
1415         (WebKit::NetworkDataTaskSoup::resume):
1416         (WebKit::NetworkDataTaskSoup::suspend):
1417         (WebKit::NetworkDataTaskSoup::cancel):
1418         (WebKit::NetworkDataTaskSoup::invalidateAndCancel):
1419         (WebKit::NetworkDataTaskSoup::state):
1420         (WebKit::NetworkDataTaskSoup::timeoutFired):
1421         (WebKit::NetworkDataTaskSoup::startTimeout):
1422         (WebKit::NetworkDataTaskSoup::stopTimeout):
1423         (WebKit::NetworkDataTaskSoup::sendRequestCallback):
1424         (WebKit::NetworkDataTaskSoup::didSendRequest):
1425         (WebKit::NetworkDataTaskSoup::didReceiveResponse):
1426         (WebKit::NetworkDataTaskSoup::tlsErrorsChangedCallback):
1427         (WebKit::NetworkDataTaskSoup::tlsErrorsChanged):
1428         (WebKit::NetworkDataTaskSoup::applyAuthenticationToRequest):
1429         (WebKit::NetworkDataTaskSoup::authenticateCallback):
1430         (WebKit::NetworkDataTaskSoup::authenticate):
1431         (WebKit::NetworkDataTaskSoup::continueAuthenticate):
1432         (WebKit::NetworkDataTaskSoup::skipInputStreamForRedirectionCallback):
1433         (WebKit::NetworkDataTaskSoup::skipInputStreamForRedirection):
1434         (WebKit::NetworkDataTaskSoup::didFinishSkipInputStreamForRedirection):
1435         (WebKit::NetworkDataTaskSoup::shouldStartHTTPRedirection):
1436         (WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
1437         (WebKit::NetworkDataTaskSoup::readCallback):
1438         (WebKit::NetworkDataTaskSoup::read):
1439         (WebKit::NetworkDataTaskSoup::didRead):
1440         (WebKit::NetworkDataTaskSoup::didFinishRead):
1441         (WebKit::NetworkDataTaskSoup::requestNextPartCallback):
1442         (WebKit::NetworkDataTaskSoup::requestNextPart):
1443         (WebKit::NetworkDataTaskSoup::didRequestNextPart):
1444         (WebKit::NetworkDataTaskSoup::didFinishRequestNextPart):
1445         (WebKit::NetworkDataTaskSoup::gotHeadersCallback):
1446         (WebKit::NetworkDataTaskSoup::didGetHeaders):
1447         (WebKit::NetworkDataTaskSoup::wroteBodyDataCallback):
1448         (WebKit::NetworkDataTaskSoup::didWriteBodyData):
1449         (WebKit::NetworkDataTaskSoup::download):
1450         (WebKit::NetworkDataTaskSoup::writeDownloadCallback):
1451         (WebKit::NetworkDataTaskSoup::writeDownload):
1452         (WebKit::NetworkDataTaskSoup::didWriteDownload):
1453         (WebKit::NetworkDataTaskSoup::didFinishDownload):
1454         (WebKit::NetworkDataTaskSoup::didFailDownload):
1455         (WebKit::NetworkDataTaskSoup::cleanDownloadFiles):
1456         (WebKit::NetworkDataTaskSoup::didFail):
1457         (WebKit::NetworkDataTaskSoup::networkEventCallback):
1458         (WebKit::NetworkDataTaskSoup::networkEvent):
1459         (WebKit::NetworkDataTaskSoup::startingCallback):
1460         (WebKit::NetworkDataTaskSoup::requestStartedCallback):
1461         (WebKit::NetworkDataTaskSoup::didStartRequest):
1462         (WebKit::NetworkDataTaskSoup::restartedCallback):
1463         (WebKit::NetworkDataTaskSoup::didRestart):
1464         * NetworkProcess/soup/NetworkDataTaskSoup.h: Added.
1465         * NetworkProcess/soup/NetworkSessionSoup.cpp:
1466         (WebKit::NetworkSessionSoup::NetworkSessionSoup):
1467         (WebKit::NetworkSessionSoup::~NetworkSessionSoup):
1468         (WebKit::NetworkSessionSoup::soupSession):
1469         (WebKit::NetworkSessionSoup::invalidateAndCancel):
1470         * NetworkProcess/soup/NetworkSessionSoup.h: Added.
1471         * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
1472         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession): Update to new NetworkSession::create() API.
1473         * PlatformEfl.cmake: Add new files to compilation.
1474         * PlatformGTK.cmake: Ditto.
1475         * WebKit2.xcodeproj/project.pbxproj: Ditto.
1476         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
1477         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession): Update to new NetworkSession::create() API.
1478         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
1479         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession): Ditto.
1480
1481 2016-10-25  Antti Koivisto  <antti@apple.com>
1482
1483         Add support for introducing simulated latency in network process
1484         https://bugs.webkit.org/show_bug.cgi?id=163902
1485
1486         Reviewed by Alex Christensen.
1487
1488         For testing purposes it is useful to have a mechanism for simulating high latency.
1489         This patch adds a basic mechanism that introduces a delay to each response in network
1490         process. In Safari it can be used with
1491
1492              defaults write com.apple.Safari WebKitNetworkLoadThrottleLatencyMilliseconds 200
1493
1494         Setting the delay to 0 disables the feature.
1495
1496         * NetworkProcess/NetworkLoad.cpp:
1497         (WebKit::NetworkLoad::Throttle::Throttle):
1498         (WebKit::NetworkLoad::didReceiveResponseNetworkSession):
1499         (WebKit::NetworkLoad::notifyDidReceiveResponse):
1500         (WebKit::NetworkLoad::didReceiveData):
1501         (WebKit::NetworkLoad::didCompleteWithError):
1502         (WebKit::NetworkLoad::throttleDelayCompleted):
1503         * NetworkProcess/NetworkLoad.h:
1504         * NetworkProcess/NetworkProcess.cpp:
1505         (WebKit::NetworkProcess::initializeNetworkProcess):
1506         * NetworkProcess/NetworkProcess.h:
1507         (WebKit::NetworkProcess::loadThrottleLatency):
1508         * NetworkProcess/NetworkProcessCreationParameters.cpp:
1509         (WebKit::NetworkProcessCreationParameters::encode):
1510         (WebKit::NetworkProcessCreationParameters::decode):
1511         * NetworkProcess/NetworkProcessCreationParameters.h:
1512         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1513         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
1514
1515 2016-10-24  Dan Bernstein  <mitz@apple.com>
1516
1517         REGRESSION (r206410): Sandbox violations beneath WebProcessProxy::platformIsBeingDebugged
1518         https://bugs.webkit.org/show_bug.cgi?id=163879
1519         <rdar://problem/28728735>
1520
1521         Reviewed by Darin Adler.
1522
1523         * UIProcess/Cocoa/WebProcessProxyCocoa.mm:
1524         (WebKit::WebProcessProxy::platformIsBeingDebugged): Check if the current process, which is
1525           the UI process, is sandboxed before trying to find out if the Web process is being
1526           debugged.
1527
1528 2016-10-21  Alex Christensen  <achristensen@webkit.org>
1529
1530         URL::port should return Optional<uint16_t>
1531         https://bugs.webkit.org/show_bug.cgi?id=163806
1532
1533         Reviewed by Darin Adler.
1534
1535         * NetworkProcess/mac/NetworkProcessMac.mm:
1536         (WebKit::overrideSystemProxies):
1537         * Shared/API/APISecurityOrigin.h:
1538         (API::SecurityOrigin::create):
1539         * Shared/API/APIURL.h:
1540         (API::URL::protocol):
1541         * Shared/API/c/WKSecurityOriginRef.cpp:
1542         (WKSecurityOriginGetPort):
1543         * UIProcess/API/Cocoa/WKSecurityOrigin.mm:
1544         (-[WKSecurityOrigin port]):
1545         * WebProcess/WebPage/WebPage.cpp:
1546         (WebKit::WebPage::canHandleRequest):
1547         * WebProcess/cocoa/WebProcessCocoa.mm:
1548         (WebKit::origin):
1549
1550 2016-10-24  Eric Carlson  <eric.carlson@apple.com>
1551
1552         [MediaStream] Separate media capture and audio playback muting
1553         https://bugs.webkit.org/show_bug.cgi?id=163855
1554         <rdar://problem/28827186>
1555
1556         Reviewed by Darin Adler.
1557
1558         * Shared/WebPageCreationParameters.h: Change 'muted' from bool to MutedStateFlags.
1559
1560         * UIProcess/API/C/WKPage.cpp: Change parameter from bool to WKMediaMutedState.
1561         (WKPageSetMuted):
1562         * UIProcess/API/C/WKPagePrivate.h: Define WKMediaMutedState.
1563
1564         * UIProcess/WebPageProxy.cpp:
1565         (WebKit::WebPageProxy::WebPageProxy):
1566         (WebKit::WebPageProxy::setMuted): m_muted -> m_mutedState.
1567         (WebKit::WebPageProxy::creationParameters): Ditto.
1568         * UIProcess/WebPageProxy.h:
1569
1570         * WebProcess/Plugins/PluginView.cpp:
1571         (WebKit::PluginView::isMuted): page.isMuted -> page.mutedState.
1572
1573         * WebProcess/WebPage/WebPage.messages.in: Change SetMuted parameter.
1574
1575 2016-10-24  Youenn Fablet  <youenn@apple.com>
1576
1577         Activate WEB_RTC compilation flags for Mac bots
1578         https://bugs.webkit.org/show_bug.cgi?id=163886
1579
1580         Reviewed by Eric Carlson.
1581
1582         * Configurations/FeatureDefines.xcconfig:
1583
1584 2016-10-24  Brady Eidson  <beidson@apple.com>
1585
1586         IndexedDB 2.0: Support IDBIndex name assignment.
1587         <rdar://problem/28806932> and https://bugs.webkit.org/show_bug.cgi?id=163805
1588
1589         Reviewed by Alex Christensen.
1590
1591         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
1592         (WebKit::WebIDBConnectionToClient::didRenameIndex):
1593         (WebKit::WebIDBConnectionToClient::renameIndex):
1594         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
1595         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
1596
1597         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
1598         (WebKit::WebIDBConnectionToServer::renameIndex):
1599         (WebKit::WebIDBConnectionToServer::didRenameIndex):
1600         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
1601         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in:
1602
1603 2016-10-23  Michael Catanzaro  <mcatanzaro@igalia.com>
1604
1605         [GTK] Remove DO NOT MODIFY headers from files that are no longer autogenerated
1606         https://bugs.webkit.org/show_bug.cgi?id=163867
1607
1608         Reviewed by Darin Adler.
1609
1610         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.cpp:
1611         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.h:
1612         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttrPrivate.h:
1613         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlob.cpp:
1614         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlob.h:
1615         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlobPrivate.h:
1616         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.cpp:
1617         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.h:
1618         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASectionPrivate.h:
1619         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.h:
1620         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.cpp:
1621         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.h:
1622         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleListPrivate.h:
1623         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRulePrivate.h:
1624         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.h:
1625         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclarationPrivate.h:
1626         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.h:
1627         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheetPrivate.h:
1628         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.h:
1629         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValuePrivate.h:
1630         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.cpp:
1631         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.h:
1632         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterDataPrivate.h:
1633         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.cpp:
1634         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.h:
1635         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCommentPrivate.h:
1636         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.h:
1637         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementationPrivate.h:
1638         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.cpp:
1639         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.h:
1640         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelectionPrivate.h:
1641         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.cpp:
1642         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.h:
1643         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenListPrivate.h:
1644         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp:
1645         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.h:
1646         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindowPrivate.h:
1647         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindowUnstable.h:
1648         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.h:
1649         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.cpp:
1650         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.h:
1651         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragmentPrivate.h:
1652         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragmentUnstable.h:
1653         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentPrivate.h:
1654         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp:
1655         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.h:
1656         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentTypePrivate.h:
1657         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentUnstable.h:
1658         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
1659         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.h:
1660         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElementPrivate.h:
1661         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElementUnstable.h:
1662         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.cpp:
1663         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.h:
1664         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEventPrivate.h:
1665         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFile.cpp:
1666         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFile.h:
1667         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileList.cpp:
1668         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileList.h:
1669         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileListPrivate.h:
1670         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFilePrivate.h:
1671         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.cpp:
1672         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.h:
1673         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElementPrivate.h:
1674         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.cpp:
1675         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.h:
1676         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElementPrivate.h:
1677         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.cpp:
1678         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.h:
1679         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElementPrivate.h:
1680         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.cpp:
1681         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.h:
1682         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElementPrivate.h:
1683         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.cpp:
1684         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.h:
1685         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElementPrivate.h:
1686         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.cpp:
1687         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.h:
1688         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElementPrivate.h:
1689         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.cpp:
1690         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.h:
1691         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElementPrivate.h:
1692         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.cpp:
1693         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.h:
1694         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElementPrivate.h:
1695         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollection.cpp:
1696         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollection.h:
1697         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollectionPrivate.h:
1698         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.cpp:
1699         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.h:
1700         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElementPrivate.h:
1701         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.cpp:
1702         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.h:
1703         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElementPrivate.h:
1704         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.cpp:
1705         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.h:
1706         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElementPrivate.h:
1707         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.cpp:
1708         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.h:
1709         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocumentPrivate.h:
1710         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp:
1711         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.h:
1712         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElementPrivate.h:
1713         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElementUnstable.h:
1714         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.cpp:
1715         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.h:
1716         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElementPrivate.h:
1717         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.cpp:
1718         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.h:
1719         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElementPrivate.h:
1720         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.cpp:
1721         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.h:
1722         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElementPrivate.h:
1723         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.cpp:
1724         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.h:
1725         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElementPrivate.h:
1726         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.cpp:
1727         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.h:
1728         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElementPrivate.h:
1729         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.cpp:
1730         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.h:
1731         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElementPrivate.h:
1732         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.cpp:
1733         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.h:
1734         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElementPrivate.h:
1735         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.cpp:
1736         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.h:
1737         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElementPrivate.h:
1738         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.cpp:
1739         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.h:
1740         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElementPrivate.h:
1741         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.cpp:
1742         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.h:
1743         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElementPrivate.h:
1744         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.cpp:
1745         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.h:
1746         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElementPrivate.h:
1747         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.cpp:
1748         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.h:
1749         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElementPrivate.h:
1750         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
1751         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.h:
1752         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElementPrivate.h:
1753         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.cpp:
1754         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.h:
1755         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElementPrivate.h:
1756         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.cpp:
1757         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.h:
1758         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElementPrivate.h:
1759         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.cpp:
1760         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.h:
1761         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElementPrivate.h:
1762         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.cpp:
1763         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.h:
1764         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElementPrivate.h:
1765         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.cpp:
1766         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.h:
1767         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElementPrivate.h:
1768         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.cpp:
1769         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.h:
1770         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElementPrivate.h:
1771         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.cpp:
1772         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.h:
1773         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElementPrivate.h:
1774         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.cpp:
1775         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.h:
1776         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElementPrivate.h:
1777         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.cpp:
1778         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.h:
1779         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElementPrivate.h:
1780         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.cpp:
1781         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.h:
1782         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElementPrivate.h:
1783         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.cpp:
1784         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.h:
1785         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElementPrivate.h:
1786         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.cpp:
1787         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.h:
1788         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElementPrivate.h:
1789         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.cpp:
1790         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.h:
1791         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElementPrivate.h:
1792         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollection.cpp:
1793         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollection.h:
1794         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollectionPrivate.h:
1795         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.cpp:
1796         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.h:
1797         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElementPrivate.h:
1798         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.cpp:
1799         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.h:
1800         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElementPrivate.h:
1801         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.cpp:
1802         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.h:
1803         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElementPrivate.h:
1804         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPrivate.cpp:
1805         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.cpp:
1806         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.h:
1807         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElementPrivate.h:
1808         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.cpp:
1809         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.h:
1810         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElementPrivate.h:
1811         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:
1812         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.h:
1813         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElementPrivate.h:
1814         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.cpp:
1815         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.h:
1816         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElementPrivate.h:
1817         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.cpp:
1818         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.h:
1819         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElementPrivate.h:
1820         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.cpp:
1821         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.h:
1822         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElementPrivate.h:
1823         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.cpp:
1824         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.h:
1825         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElementPrivate.h:
1826         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.cpp:
1827         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.h:
1828         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElementPrivate.h:
1829         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.cpp:
1830         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.h:
1831         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElementPrivate.h:
1832         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.cpp:
1833         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.h:
1834         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElementPrivate.h:
1835         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.cpp:
1836         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.h:
1837         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElementPrivate.h:
1838         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.cpp:
1839         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.h:
1840         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElementPrivate.h:
1841         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.cpp:
1842         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.h:
1843         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElementPrivate.h:
1844         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEvent.cpp:
1845         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEvent.h:
1846         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEventPrivate.h:
1847         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.h:
1848         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaListPrivate.h:
1849         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEvent.cpp:
1850         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEvent.h:
1851         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEventPrivate.h:
1852         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.cpp:
1853         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.h:
1854         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMapPrivate.h:
1855         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.h:
1856         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIterator.cpp:
1857         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIterator.h:
1858         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIteratorPrivate.h:
1859         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeList.cpp:
1860         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeList.h:
1861         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeListPrivate.h:
1862         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodePrivate.h:
1863         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.cpp:
1864         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.h:
1865         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstructionPrivate.h:
1866         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.cpp:
1867         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.h:
1868         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRangePrivate.h:
1869         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRangeUnstable.h:
1870         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheet.cpp:
1871         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheet.h:
1872         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetList.cpp:
1873         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetList.h:
1874         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetListPrivate.h:
1875         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetPrivate.h:
1876         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.cpp:
1877         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.h:
1878         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTextPrivate.h:
1879         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalker.cpp:
1880         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalker.h:
1881         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalkerPrivate.h:
1882         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.cpp:
1883         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.h:
1884         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEventPrivate.h:
1885         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.cpp:
1886         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.h:
1887         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEventPrivate.h:
1888         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathExpression.cpp:
1889         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathExpression.h:
1890         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathExpressionPrivate.h:
1891         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathNSResolverPrivate.h:
1892         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResult.cpp:
1893         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResult.h:
1894         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResultPrivate.h:
1895         * WebProcess/InjectedBundle/API/gtk/DOM/webkitdom.h:
1896         * WebProcess/InjectedBundle/API/gtk/DOM/webkitdomautocleanups.h:
1897         * WebProcess/InjectedBundle/API/gtk/DOM/webkitdomdefines.h:
1898
1899 2016-10-23  Chris Dumez  <cdumez@apple.com>
1900
1901         Another unreviewed attempt to fix the WatchOS / TvOS build after r207585.
1902         <rdar://problem/28902292>
1903
1904         Disable USE_CFURLCONNECTION on newer WatchOS / TvOS.
1905
1906         * config.h:
1907
1908 2016-10-23  Chris Dumez  <cdumez@apple.com>
1909
1910         Unreviewed attempt to fix WatchOS / TvOS build after r207585.
1911         <rdar://problem/28902292>
1912
1913         Enable NETWORK_SESSION on those platforms.
1914
1915         * config.h:
1916
1917 2016-10-22  Dan Bernstein  <mitz@apple.com>
1918
1919         [iOS] _webViewWillEndNavigationGesture:withNavigationToBackForwardListItem: is never called
1920         https://bugs.webkit.org/show_bug.cgi?id=163758
1921
1922         Reviewed by Darin Adler.
1923
1924         * UIProcess/ios/ViewGestureControllerIOS.mm:
1925         (WebKit::ViewGestureController::beginSwipeGesture): Don’t reset the interactive update
1926           handler.
1927
1928 2016-10-21  David Kilzer  <ddkilzer@apple.com>
1929
1930         Bug 163762: IntSize::area() should used checked arithmetic
1931         <https://webkit.org/b/163762>
1932
1933         Reviewed by Darin Adler.
1934
1935         * Shared/ShareableBitmap.cpp:
1936         (WebKit::ShareableBitmap::create): Add overflow check and return
1937         nullptr on overflow.
1938         (WebKit::ShareableBitmap::createShareable): Ditto.
1939         (WebKit::ShareableBitmap::create): Change debug assert for
1940         adequate buffer size check into release check.
1941         * Shared/ShareableBitmap.h:
1942         (WebKit::ShareableBitmap::numBytesForSize): Change to return a
1943         Checked<unsigned, RecordOverflow> value.
1944         (WebKit::ShareableBitmap::sizeInBytes):
1945         * Shared/cairo/ShareableBitmapCairo.cpp:
1946         (WebKit::ShareableBitmap::numBytesForSize): Ditto.
1947         * UIProcess/API/Cocoa/WKWebView.mm:
1948         (-[WKWebView _takeViewSnapshot]): Call unsafeGet().
1949
1950 2016-10-21  Eric Carlson  <eric.carlson@apple.com>
1951
1952         [MediaStream] Dynamically generate media capture sandbox extensions
1953         https://bugs.webkit.org/show_bug.cgi?id=154861
1954         <rdar://problem/24909411>
1955
1956         Reviewed by Tim Horton.
1957
1958         * Shared/SandboxExtension.h:
1959         (WebKit::SandboxExtension::createHandleForGenericExtension):
1960         * Shared/mac/SandboxExtensionMac.mm:
1961         (WebKit::wkSandboxExtensionType): Add case for generic handle.
1962         (WebKit::SandboxExtension::createHandleForGenericExtension): New.
1963
1964         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
1965         (WebKit::UserMediaPermissionRequestManagerProxy::invalidateRequests): Clear the list of extensions granted.
1966         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Extend the web 
1967           process sandbox as necessary.
1968         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
1969
1970         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
1971         (WebKit::UserMediaPermissionRequestManager::~UserMediaPermissionRequestManager): Revoke all
1972           sandbox extensions.
1973         (WebKit::UserMediaPermissionRequestManager::grantUserMediaDevicesSandboxExtension): Consume
1974           sandbox extensions.
1975         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
1976
1977         * WebProcess/WebPage/WebPage.cpp:
1978         (WebKit::WebPage::grantUserMediaDevicesSandboxExtension): Pass-through to user media manager.
1979         * WebProcess/WebPage/WebPage.h:
1980
1981         * WebProcess/WebPage/WebPage.messages.in: Add GrantUserMediaDevicesSandboxExtension.
1982
1983         * WebProcess/com.apple.WebProcess.sb.in: Add rules, defines, and a macro to allow dynamic extensions
1984           for media capture devices.
1985
1986 2016-10-21  Gavin Barraclough  <barraclough@apple.com>
1987
1988         WebPageProxy should not need PageActivityState
1989         https://bugs.webkit.org/show_bug.cgi?id=163821
1990
1991         Reviewed by Geoff Garen.
1992
1993         The PageActivityState is currently plumbed back from WebCore up to the UI process, to
1994         determine whether to enabled process suppression. However the information it contains
1995         (whether a page load is ongoing, whether audio is playing) is already available via
1996         other means. Remove this use of PageActivityState.
1997
1998         * UIProcess/PageLoadState.cpp:
1999         (WebKit::PageLoadState::commitChanges):
2000             - PageLoadState notifies WebPageProxy when loading state changes.
2001         * UIProcess/WebPageProxy.cpp:
2002         (WebKit::WebPageProxy::updateThrottleState):
2003             - Now relies on info from PageLoadState, setMuted, isPlayingMediaDidChange.
2004         (WebKit::WebPageProxy::setMuted):
2005         (WebKit::WebPageProxy::isPlayingMediaDidChange):
2006             - If audio playback state changes we may need to update the throttle state.
2007         (WebKit::WebPageProxy::setPageActivityState): Deleted.
2008             - removed PageActivityState from WK2.
2009         * UIProcess/WebPageProxy.h:
2010         (WebKit::WebPageProxy::isLoadingChanged):
2011             - PageLoadState notifies WebPageProxy when loading state changes.
2012         * UIProcess/WebPageProxy.messages.in:
2013             - removed PageActivityState from WK2.
2014         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2015         (WebKit::WebChromeClient::setPageActivityState): Deleted.
2016             - removed PageActivityState from WK2.
2017         * WebProcess/WebCoreSupport/WebChromeClient.h:
2018             - removed PageActivityState from WK2.
2019         * WebProcess/WebPage/WebPage.cpp:
2020         (WebKit::WebPage::setPageActivityState): Deleted.
2021             - removed PageActivityState from WK2.
2022         * WebProcess/WebPage/WebPage.h:
2023             - removed PageActivityState from WK2.
2024
2025 2016-10-21  Gavin Barraclough  <barraclough@apple.com>
2026
2027         WebPage should take UserActivity directly for user input
2028         https://bugs.webkit.org/show_bug.cgi?id=163813
2029
2030         Reviewed by Anders Carlsson.
2031
2032         When we receive mouse/keyboard events in a page, we want to prevent AppNap. We currently do so
2033         via the PageThrottler. This patch is to just make the WebPage drive the UserActivity directly.
2034
2035         Two reasons to do so: (1) to cleanup & simplify for further refactoring. (2) The current code
2036         isn't really achieving the desired effect. The page setting the flag in the throttler to get
2037         the activity to be set is now a less effective way of achieving this goal, since the
2038         PageActivityState bounces back across to the UI process & then messages back to the WebContent
2039         process to take the UserActivity. These extra hops defeat the purpose of making sure the boost
2040         from the initial message isn't lost.
2041
2042         * WebProcess/WebPage/WebPage.cpp:
2043         (WebKit::m_userActivityHysteresis):
2044             - m_userActivityHysteresis triggers updateUserActivity.
2045         (WebKit::WebPage::setPageSuppressed):
2046             - setPageSuppressed starts/stops m_userActivityHysteresis.
2047         (WebKit::WebPage::updateUserActivity):
2048             - update UserActivity based on state of m_userActivityHysteresis.
2049         (WebKit::WebPage::mouseEvent):
2050         (WebKit::WebPage::wheelEvent):
2051         (WebKit::WebPage::keyEvent):
2052             - input events impulse m_userActivityHysteresis.
2053         * WebProcess/WebPage/WebPage.h:
2054
2055 2016-10-21  Wenson Hsieh  <wenson_hsieh@apple.com>
2056
2057         Support (insertFrom|deleteBy)Composition and (insert|delete)CompositionText inputTypes for InputEvents
2058         https://bugs.webkit.org/show_bug.cgi?id=163460
2059         <rdar://problem/28784142>
2060
2061         Reviewed by Darin Adler.
2062
2063         Handle new EditAction types for inserting/deleting pending/final compositions.
2064
2065         * UIProcess/WebEditCommandProxy.cpp:
2066         (WebKit::WebEditCommandProxy::nameForEditAction):
2067
2068 2016-10-21  Jeremy Jones  <jeremyj@apple.com>
2069
2070         Implement basic pointer lock behavior for WebKit and WebKit2.
2071         https://bugs.webkit.org/show_bug.cgi?id=162745
2072
2073         Reviewed by Simon Fraser.
2074
2075         Enable basic pointer lock functionality by plumbing requests through WebPage IPC.
2076         Pass through mouse movement deltas.
2077         Unlock pointer when view is no longer visible.
2078
2079         * Shared/WebEventConversion.cpp:
2080         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent): Pass along mouse movement.
2081         * UIProcess/WebPageProxy.cpp:
2082         (WebKit::WebPageProxy::dispatchViewStateChange): Unlock pointer when page is not visible.
2083         (WebKit::WebPageProxy::requestPointerLock): Hide and disassociate pointer.
2084         (WebKit::WebPageProxy::requestPointerUnlock): Show and associate pointer.
2085         * UIProcess/WebPageProxy.h:
2086         * UIProcess/WebPageProxy.messages.in: Add methods.
2087         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2088         (WebKit::WebChromeClient::requestPointerLock): Pass along to web page.
2089         (WebKit::WebChromeClient::requestPointerUnlock): Ditto.
2090         * WebProcess/WebCoreSupport/WebChromeClient.h:
2091         * WebProcess/WebPage/WebPage.cpp:
2092         (WebKit::WebPage::didAcquirePointerLock): Forward to PointerLockController.
2093         (WebKit::WebPage::didNotAcquirePointerLock): Ditto.
2094         (WebKit::WebPage::didLosePointerLock): Ditto.
2095         * WebProcess/WebPage/WebPage.h:
2096         * WebProcess/WebPage/WebPage.messages.in: Add methods.
2097
2098 2016-10-21  Wenson Hsieh  <wenson_hsieh@apple.com>
2099
2100         Implement InputEvent.getTargetRanges() for the input events spec
2101         https://bugs.webkit.org/show_bug.cgi?id=162947
2102         <rdar://problem/28853079>
2103
2104         Reviewed by Darin Adler.
2105
2106         Boilerplate change to add a runtime guard for InputEvents-related IDL interfaces. See WebCore ChangeLog entry
2107         for more details.
2108
2109         * WebProcess/WebPage/WebPage.cpp:
2110         (WebKit::WebPage::updatePreferences):
2111
2112 2016-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
2113
2114         [GTK] Configures but fails to link with ENABLE_OPENGL=OFF
2115         https://bugs.webkit.org/show_bug.cgi?id=163449
2116
2117         Reviewed by Michael Catanzaro.
2118
2119         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2120         (webkitWebViewBaseRealize): Check TEXTURE_MAPPER_GL instead of TEXTURE_MAPPER and also ensure the current
2121         display is X11.
2122         (webkitWebViewBaseUnrealize): Ditto.
2123         (webkitWebViewBaseDidRelaunchWebProcess): Check TEXTURE_MAPPER_GL instead of TEXTURE_MAPPER.
2124         (webkitWebViewBasePageClosed): Ditto.
2125         * UIProcess/AcceleratedDrawingAreaProxy.cpp:
2126         (WebKit::AcceleratedDrawingAreaProxy::didUpdateBackingStoreState): Ditto.
2127         (WebKit::AcceleratedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState): Check EGL is enabled before
2128         trying to use the WaylandCompositor.
2129         * UIProcess/AcceleratedDrawingAreaProxy.h:
2130         * UIProcess/WebProcessPool.cpp:
2131         (WebKit::WebProcessPool::createNewWebProcess): Ditto.
2132         * UIProcess/gtk/AcceleratedBackingStore.cpp:
2133         (WebKit::AcceleratedBackingStore::create): Ditto.
2134         * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
2135         * UIProcess/gtk/WaylandCompositor.cpp:
2136         * UIProcess/gtk/WaylandCompositor.h:
2137         * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
2138         (WebKit::AcceleratedDrawingArea::enterAcceleratedCompositingMode): Check TEXTURE_MAPPER_GL instead of TEXTURE_MAPPER.
2139         * WebProcess/WebPage/AcceleratedDrawingArea.h:
2140         * WebProcess/WebPage/DrawingArea.h:
2141         * WebProcess/WebPage/DrawingArea.messages.in:
2142         * WebProcess/WebPage/LayerTreeHost.h:
2143
2144 2016-10-20  Chris Dumez  <cdumez@apple.com>
2145
2146         "Download Linked File" context menu action should use 'download' attribute as suggested filename
2147         https://bugs.webkit.org/show_bug.cgi?id=163742
2148         <rdar://problem/28840734>
2149
2150         Reviewed by Darin Adler.
2151
2152         Update "Download Linked File" context menu action to use the anchor
2153         element's 'download' attribute as suggested filename for the download.
2154
2155         * NetworkProcess/NetworkProcess.cpp:
2156         (WebKit::NetworkProcess::downloadRequest):
2157         * NetworkProcess/NetworkProcess.h:
2158         * NetworkProcess/NetworkProcess.messages.in:
2159         * Shared/WebHitTestResultData.cpp:
2160         (WebKit::WebHitTestResultData::WebHitTestResultData):
2161         (WebKit::WebHitTestResultData::encode):
2162         (WebKit::WebHitTestResultData::decode):
2163         * Shared/WebHitTestResultData.h:
2164         * UIProcess/WebPageProxy.cpp:
2165         (WebKit::WebPageProxy::contextMenuItemSelected):
2166         * UIProcess/WebProcessPool.cpp:
2167         (WebKit::WebProcessPool::download):
2168         * UIProcess/WebProcessPool.h:
2169         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
2170         (WebKit::InjectedBundleHitTestResult::linkSuggestedFilename):
2171
2172 2016-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
2173
2174         [macOS] [iOS] Disable variation fonts on macOS El Capitan and iOS 9
2175         https://bugs.webkit.org/show_bug.cgi?id=163374
2176
2177         Reviewed by Darin Adler.
2178
2179         * Configurations/FeatureDefines.xcconfig:
2180
2181 2016-10-20  Brady Eidson  <beidson@apple.com>
2182
2183         IndexedDB 2.0: Support IDBObjectStore name assignment.
2184         <rdar://problem/28806931> and https://bugs.webkit.org/show_bug.cgi?id=163749
2185
2186         Reviewed by Alex Christensen.
2187
2188         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
2189         (WebKit::WebIDBConnectionToClient::didRenameObjectStore):
2190         (WebKit::WebIDBConnectionToClient::renameObjectStore):
2191         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
2192         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
2193
2194         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
2195         (WebKit::WebIDBConnectionToServer::renameObjectStore):
2196         (WebKit::WebIDBConnectionToServer::didRenameObjectStore):
2197         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
2198         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in:
2199
2200 2016-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
2201
2202         [GTK] Avoid strstr() when checking (E)GL extensions
2203         https://bugs.webkit.org/show_bug.cgi?id=161958
2204
2205         Reviewed by Žan Doberšek.
2206
2207         Use GLContext::isExtensionSupported() instead of strstr().
2208
2209         * UIProcess/gtk/WaylandCompositor.cpp:
2210         (WebKit::WaylandCompositor::initializeEGL):
2211
2212 2016-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
2213
2214         Wrong use of EGL_DEPTH_SIZE
2215         https://bugs.webkit.org/show_bug.cgi?id=155536
2216
2217         Reviewed by Michael Catanzaro.
2218
2219         Use XErrorTrapper class instead of the custom XErrorHandler.
2220
2221         * PluginProcess/unix/PluginProcessMainUnix.cpp:
2222         (WebKit::PluginProcessMainUnix):
2223
2224 2016-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
2225
2226         [SOUP] Add NetworkSession implementation and switch to use it
2227         https://bugs.webkit.org/show_bug.cgi?id=163597
2228
2229         Reviewed by Alex Christensen.
2230
2231         Basically move the ResourceHandle implementation to the network process, but modernized, cleaned up, and adapted
2232         to the NetworkSession model.
2233
2234         * CMakeLists.txt: Add new files to compilation.
2235         * NetworkProcess/Downloads/Download.cpp:
2236         (WebKit::Download::Download): Use the same code for all ports using NetworkSession and add missing
2237         initialization of m_sessionID.
2238         * NetworkProcess/Downloads/Download.h:
2239         (WebKit::Download::Download): Define PlatformDownloadTaskRef on every platform to make the constructor common to
2240         all ports using NetworkSession.
2241         * NetworkProcess/Downloads/soup/DownloadSoup.cpp:
2242         (WebKit::Download::cancelNetworkLoad):
2243         (WebKit::Download::platformDidFinish):
2244         * NetworkProcess/NetworkDataTask.h:
2245         (WebKit::NetworkDataTask::pendingDownloadID): Make const.
2246         (WebKit::NetworkDataTask::pendingDownload): Ditto.
2247         (WebKit::NetworkDataTask::pendingDownloadLocation): Ditto.
2248         (WebKit::NetworkDataTask::isDownload): Helper to check if the task is a download.
2249         * NetworkProcess/NetworkLoad.cpp:
2250         (WebKit::NetworkLoad::didReceiveResponseNetworkSession): Use NetworkDataTask::isDownload().
2251         * NetworkProcess/NetworkProcess.cpp:
2252         (WebKit::NetworkProcess::NetworkProcess): NetworkSession::setCustomProtocolManager() is Cocoa only.
2253         * NetworkProcess/NetworkSession.h:
2254         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2255         (WebKit::NetworkSession::networkStorageSession): Make const.
2256         * NetworkProcess/soup/NetworkDataTaskSoup.cpp: Added.
2257         (WebKit::NetworkDataTask::NetworkDataTask):
2258         (WebKit::NetworkDataTask::~NetworkDataTask):
2259         (WebKit::NetworkDataTask::scheduleFailure):
2260         (WebKit::NetworkDataTask::failureTimerFired):
2261         (WebKit::NetworkDataTask::suggestedFilename):
2262         (WebKit::NetworkDataTask::setSuggestedFilename):
2263         (WebKit::NetworkDataTask::setPendingDownloadLocation):
2264         (WebKit::NetworkDataTask::allowsSpecificHTTPSCertificateForHost):
2265         (WebKit::NetworkDataTask::createRequest):
2266         (WebKit::NetworkDataTask::clearRequest):
2267         (WebKit::NetworkDataTask::resume):
2268         (WebKit::NetworkDataTask::suspend):
2269         (WebKit::NetworkDataTask::cancel):
2270         (WebKit::NetworkDataTask::invalidateAndCancel):
2271         (WebKit::NetworkDataTask::state):
2272         (WebKit::NetworkDataTask::timeoutFired):
2273         (WebKit::NetworkDataTask::startTimeout):
2274         (WebKit::NetworkDataTask::stopTimeout):
2275         (WebKit::NetworkDataTask::sendRequestCallback):
2276         (WebKit::NetworkDataTask::didSendRequest):
2277         (WebKit::NetworkDataTask::didReceiveResponse):
2278         (WebKit::NetworkDataTask::tlsErrorsChangedCallback):
2279         (WebKit::NetworkDataTask::tlsErrorsChanged):
2280         (WebKit::NetworkDataTask::applyAuthenticationToRequest):
2281         (WebKit::NetworkDataTask::authenticateCallback):
2282         (WebKit::isAuthenticationFailureStatusCode):
2283         (WebKit::NetworkDataTask::authenticate):
2284         (WebKit::NetworkDataTask::continueAuthenticate):
2285         (WebKit::NetworkDataTask::skipInputStreamForRedirectionCallback):
2286         (WebKit::NetworkDataTask::skipInputStreamForRedirection):
2287         (WebKit::NetworkDataTask::didFinishSkipInputStreamForRedirection):
2288         (WebKit::shouldRedirectAsGET):
2289         (WebKit::NetworkDataTask::shouldStartHTTPRedirection):
2290         (WebKit::NetworkDataTask::continueHTTPRedirection):
2291         (WebKit::NetworkDataTask::readCallback):
2292         (WebKit::NetworkDataTask::read):
2293         (WebKit::NetworkDataTask::didRead):
2294         (WebKit::NetworkDataTask::didFinishRead):
2295         (WebKit::NetworkDataTask::requestNextPartCallback):
2296         (WebKit::NetworkDataTask::requestNextPart):
2297         (WebKit::NetworkDataTask::didRequestNextPart):
2298         (WebKit::NetworkDataTask::didFinishRequestNextPart):
2299         (WebKit::NetworkDataTask::gotHeadersCallback):
2300         (WebKit::NetworkDataTask::didGetHeaders):
2301         (WebKit::NetworkDataTask::wroteBodyDataCallback):
2302         (WebKit::NetworkDataTask::didWriteBodyData):
2303         (WebKit::NetworkDataTask::download):
2304         (WebKit::NetworkDataTask::writeDownloadCallback):
2305         (WebKit::NetworkDataTask::writeDownload):
2306         (WebKit::NetworkDataTask::didWriteDownload):
2307         (WebKit::NetworkDataTask::didFinishDownload):
2308         (WebKit::NetworkDataTask::didFailDownload):
2309         (WebKit::NetworkDataTask::cleanDownloadFiles):
2310         (WebKit::NetworkDataTask::didFail):
2311         (WebKit::NetworkDataTask::networkEventCallback):
2312         (WebKit::NetworkDataTask::networkEvent):
2313         (WebKit::NetworkDataTask::startingCallback):
2314         (WebKit::NetworkDataTask::requestStartedCallback):
2315         (WebKit::NetworkDataTask::didStartRequest):
2316         (WebKit::NetworkDataTask::restartedCallback):
2317         (WebKit::NetworkDataTask::didRestart):
2318         * NetworkProcess/soup/NetworkSessionSoup.cpp:
2319         (WebKit::NetworkSession::create):
2320         (WebKit::NetworkSession::defaultSession):
2321         (WebKit::NetworkSession::networkStorageSession):
2322         (WebKit::NetworkSession::NetworkSession):
2323         (WebKit::NetworkSession::~NetworkSession):
2324         (WebKit::NetworkSession::soupSession):
2325         (WebKit::NetworkSession::invalidateAndCancel):
2326         (WebKit::NetworkSession::clearCredentials):
2327         * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
2328         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession): Add implementation matching
2329         WebFrameNetworkingContext::ensurePrivateBrowsingSession().
2330         (WebKit::RemoteNetworkingContext::storageSession): Do not always return the default session if the given one is
2331         in the global map.
2332         * PlatformEfl.cmake: Ad new files to compilation.
2333         * PlatformGTK.cmake: Ditto.
2334         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
2335         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession): Also create a NetworkSession.
2336         * config.h: Enable NetworkSession unconditionally for Soup based ports.
2337
2338 2016-10-19  Alex Christensen  <achristensen@webkit.org>
2339
2340         Revert r207151
2341         https://bugs.webkit.org/show_bug.cgi?id=163675
2342
2343         Reviewed by Brent Fulgham.
2344
2345         * NetworkProcess/Downloads/Download.h:
2346         * NetworkProcess/Downloads/mac/DownloadMac.mm:
2347         * NetworkProcess/NetworkLoad.h:
2348         * NetworkProcess/mac/NetworkLoadMac.mm:
2349         (WebKit::NetworkLoad::willCacheResponseAsync):
2350         * Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm:
2351         (WebKit::AuthenticationManager::receivedCredential):
2352         (WebKit::AuthenticationManager::receivedRequestToContinueWithoutCredential):
2353         (WebKit::AuthenticationManager::receivedCancellation):
2354         (WebKit::AuthenticationManager::receivedRequestToPerformDefaultHandling):
2355         (WebKit::AuthenticationManager::receivedChallengeRejection):
2356         * Shared/WebProcessCreationParameters.cpp:
2357         (WebKit::WebProcessCreationParameters::encode):
2358         (WebKit::WebProcessCreationParameters::decode):
2359         * Shared/WebProcessCreationParameters.h:
2360         * Shared/mac/WebCoreArgumentCodersMac.mm:
2361         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
2362         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
2363         * WebKit2.xcodeproj/project.pbxproj:
2364
2365 2016-10-19  Chris Dumez  <cdumez@apple.com>
2366
2367         [WK2] Expose suggested filename via WKBundleHitTestResult API
2368         https://bugs.webkit.org/show_bug.cgi?id=163693
2369         <rdar://problem/28840734>
2370
2371         Reviewed by Anders Carlsson.
2372
2373         Expose suggested filename via WKBundleHitTestResult API. The implementation
2374         currently relies on the 'download' attribute on anchor / area elements
2375         that we recently started supporting.
2376
2377         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
2378         (WKBundleHitTestResultCopyLinkSuggestedFilename):
2379         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
2380         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
2381         (WebKit::InjectedBundleHitTestResult::create):
2382         (WebKit::InjectedBundleHitTestResult::mediaType):
2383         (WebKit::InjectedBundleHitTestResult::linkSuggestedFilename):
2384         (WebKit::InjectedBundleHitTestResult::imageRect):
2385         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
2386
2387 2016-10-19  Ryan Haddad  <ryanhaddad@apple.com>
2388
2389         Unreviewed, rolling out r207557.
2390
2391         This change caused animations/font-variations tests to time
2392         out on pre-Sierra Macs.
2393
2394         Reverted changeset:
2395
2396         "[macOS] [iOS] Disable variation fonts on macOS El Capitan and
2397         iOS 9"
2398         https://bugs.webkit.org/show_bug.cgi?id=163374
2399         http://trac.webkit.org/changeset/207557
2400
2401 2016-10-19  Andy Estes  <aestes@apple.com>
2402
2403         Crash in ASCIICaseInsensitiveHash::hash() when a response has a null MIME type
2404         https://bugs.webkit.org/show_bug.cgi?id=163476
2405         <rdar://problem/26941395>
2406
2407         Reviewed by Andreas Kling.
2408
2409         When custom content providers are registered and a response has a null MIME type, WebPage
2410         will pass a null String to HashSet::contains(). This results in a null pointer dereference,
2411         since the String hash functions do not support null Strings and unconditionally dereference
2412         their StringImpls. Fixed by checking that Strings are non-null before calling
2413         HashSet::contains() on m_mimeTypesWithCustomContentProviders.
2414
2415         New API test: WebKit2.LoadDataWithNilMIMEType.
2416
2417         * WebProcess/WebPage/WebPage.cpp:
2418         (WebKit::WebPage::shouldUseCustomContentProviderForResponse): Checked if mimeType is null
2419         before calling m_mimeTypesWithCustomContentProviders.contains().
2420         (WebKit::WebPage::canShowMIMEType): Ditto.
2421         * WebProcess/WebPage/WebPage.h: Made private the declaration of canPluginHandleResponse().
2422
2423 2016-10-19  Chris Dumez  <cdumez@apple.com>
2424
2425         Move HTML Interactive Form Validation behind an experimental flag
2426         https://bugs.webkit.org/show_bug.cgi?id=163673
2427
2428         Reviewed by Daniel Bates.
2429
2430         Move HTML Interactive Form Validation behind an experimental feature flag
2431         and disable by default until by have a better UI.
2432
2433         * Shared/WebPreferencesDefinitions.h:
2434         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2435         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2436
2437 2016-10-19  Damian Kaleta  <dkaleta@apple.com>
2438
2439         https://bugs.webkit.org/show_bug.cgi?id=163292
2440
2441         Reviewed by Brady Eidson.
2442         
2443         Added ability to display context menu asynchronously.
2444
2445         * Shared/API/APIObject.h: Added ContextMenuListener.
2446         * Shared/API/c/WKBase.h: Added WKContextMenuListenerRef struct.
2447         * UIProcess/API/APIContextMenuClient.h:
2448         (API::ContextMenuClient::getContextMenuFromProposedMenuAsync): New method that allows showing context menu asynchronously.
2449         * UIProcess/API/C/WKAPICast.h: Added a new mapping for WebContextMenuListenerProxy.
2450         * UIProcess/API/C/WKContextMenuListener.cpp: Added. New class that allow a client to return results asynchronously.
2451         (WKContextMenuListenerGetTypeID):
2452         (WKContextMenuListenerUseContextMenuItems):
2453         * UIProcess/API/C/WKContextMenuListener.h: Added.
2454         * UIProcess/API/C/WKPage.cpp: Added WKPageContextMenuClientV4.
2455         (WKPageSetPageContextMenuClient):
2456         * UIProcess/API/C/WKPageContextMenuClient.h:
2457         * UIProcess/WebContextMenuListenerProxy.cpp: Copied from Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.h.
2458         (WebKit::WebContextMenuListenerProxy::WebContextMenuListenerProxy):
2459         (WebKit::WebContextMenuListenerProxy::~WebContextMenuListenerProxy):
2460         (WebKit::WebContextMenuListenerProxy::useContextMenuItems): Passes items to m_contextMenuMac.
2461         (WebKit::WebContextMenuListenerProxy::invalidate):
2462         * UIProcess/WebContextMenuListenerProxy.h: Copied from Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.h.
2463         (WebKit::WebContextMenuListenerProxy::create):
2464         * UIProcess/mac/WebContextMenuProxyMac.h:
2465         * UIProcess/mac/WebContextMenuProxyMac.mm:
2466         (WebKit::WebContextMenuProxyMac::showContextMenuWithItems): Shows context menu.
2467         (WebKit::WebContextMenuProxyMac::showContextMenu): Extracted some logic to showContextMenuWithItems().
2468         * WebKit2.xcodeproj/project.pbxproj:
2469
2470 2016-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
2471
2472         [macOS] [iOS] Disable variation fonts on macOS El Capitan and iOS 9
2473         https://bugs.webkit.org/show_bug.cgi?id=163374
2474
2475         Reviewed by Darin Adler.
2476
2477         * Configurations/FeatureDefines.xcconfig:
2478
2479 2016-10-19  Darin Adler  <darin@apple.com>
2480
2481         Move XPath from ExceptionCode to Exception
2482         https://bugs.webkit.org/show_bug.cgi?id=163656
2483
2484         Reviewed by Chris Dumez.
2485
2486         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
2487         (webkit_dom_document_create_expression): Use ExceptionOr.
2488         (webkit_dom_document_evaluate): Ditto.
2489         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathExpression.cpp:
2490         (webkit_dom_xpath_expression_evaluate): Ditto.
2491         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResult.cpp:
2492         (webkit_dom_xpath_result_iterate_next): Ditto.
2493         (webkit_dom_xpath_result_snapshot_item): Ditto.
2494         (webkit_dom_xpath_result_get_number_value): Ditto.
2495         (webkit_dom_xpath_result_get_string_value): Ditto.
2496         (webkit_dom_xpath_result_get_boolean_value): Ditto.
2497         (webkit_dom_xpath_result_get_single_node_value): Ditto.
2498         (webkit_dom_xpath_result_get_snapshot_length): Ditto.
2499
2500 2016-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
2501
2502         NetworkSession: updatedRequest parameter of NetworkProcess::findPendingDownloadLocation is unused since r206988
2503         https://bugs.webkit.org/show_bug.cgi?id=163588
2504
2505         Reviewed by Alex Christensen.
2506
2507         The parameter was used only for the DownloadProxy::DidStart message that is no longer sent from
2508         findPendingDownloadLocation since r206988.
2509
2510         * NetworkProcess/NetworkDataTask.h:
2511         (WebKit::NetworkDataTask::currentRequest): Removed since it's unused now.
2512         * NetworkProcess/NetworkLoad.cpp:
2513         (WebKit::NetworkLoad::convertTaskToDownload): Update the m_currentRequest and pass it to DidStart message.
2514         (WebKit::NetworkLoad::didReceiveResponseNetworkSession):
2515         * NetworkProcess/NetworkProcess.cpp:
2516         (WebKit::NetworkProcess::findPendingDownloadLocation):
2517         * NetworkProcess/NetworkProcess.h:
2518         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: Remove currentRequest() implementation.
2519
2520 2016-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
2521
2522         Unreviewed. Fix GTK+ build after r207522.
2523
2524         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp:
2525         (webkit_dom_dom_window_webkit_message_handlers_post_message): Use new exceptions.
2526
2527 2016-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
2528
2529         Unreviewed. Fix GTK+ build after r207497.
2530
2531         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:
2532         (webkit_dom_html_select_element_add): Update implementation since add() now takes a Variant.
2533
2534 2016-10-18  Simon Fraser  <simon.fraser@apple.com>
2535
2536         Add a MiniBrowser menu item to apply page scale in WK1 and WK2
2537         https://bugs.webkit.org/show_bug.cgi?id=163627
2538
2539         Reviewed by Dean Jackson.
2540
2541         New SPI to set and retrieve page scale.
2542
2543         * UIProcess/API/Cocoa/WKWebView.mm:
2544         (-[WKWebView _setPageScale:withOrigin:]):
2545         (-[WKWebView _pageScale]):
2546         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2547
2548 2016-10-18  Dean Jackson  <dino@apple.com>
2549
2550         Remove CSS_SHAPES feature definition. This should always be on.
2551         https://bugs.webkit.org/show_bug.cgi?id=163628
2552         <rdar://problem/28834613>
2553
2554         Reviewed by Tim Horton.
2555
2556         * Configurations/FeatureDefines.xcconfig:
2557
2558 2016-10-18  Ryan Haddad  <ryanhaddad@apple.com>
2559
2560         Unreviewed, rolling out r207413.
2561
2562         This change broke iOS builds.
2563
2564         Reverted changeset:
2565
2566         "[iOS] Hook up WebPlatformTouchPoint's radiusX / radiusY to
2567         _UIWebTouchPoint.majorRadiusInScreenCoordinates"
2568         https://bugs.webkit.org/show_bug.cgi?id=163547
2569         http://trac.webkit.org/changeset/207413
2570
2571 2016-10-18  Commit Queue  <commit-queue@webkit.org>
2572
2573         Unreviewed, rolling out r207443.
2574         https://bugs.webkit.org/show_bug.cgi?id=163616
2575
2576         "Caused 5% PLT regression" (Requested by krollin on #webkit).
2577
2578         Reverted changeset:
2579
2580         "Crash in ASCIICaseInsensitiveHash::hash() when a response has
2581         a null MIME type"
2582         https://bugs.webkit.org/show_bug.cgi?id=163476
2583         http://trac.webkit.org/changeset/207443
2584
2585 2016-10-18  Megan Gardner  <megan_gardner@apple.com>
2586
2587         Fix build for platforms where HAVE(LINK_PREVIEW) is false
2588         https://bugs.webkit.org/show_bug.cgi?id=163607
2589
2590         Reviewed by Tim Horton.
2591
2592         Added needed # for link preview
2593
2594         * UIProcess/ios/WKContentViewInteraction.mm:
2595         (-[WKContentView _contentsOfUserInterfaceItem:]):
2596
2597 2016-10-18  Joseph Pecoraro  <pecoraro@apple.com>
2598
2599         Remote Web Inspector: Timeline UI not updating while recording
2600         https://bugs.webkit.org/show_bug.cgi?id=163582
2601         <rdar://problem/28766837>
2602
2603         Reviewed by Timothy Hatcher.
2604
2605         * WebProcess/WebPage/RemoteWebInspectorUI.cpp:
2606         (WebKit::RemoteWebInspectorUI::frontendLoaded):
2607         Local inspector windows keep the web view alive and toggle the
2608         WebInspector.visible state depending on whether or not an inspector is
2609         open. Remote Inspector windows go away when closed, so they can always
2610         be marked as open. This matches earlier remote inspector behavior.
2611
2612 2016-10-18  Eric Carlson  <eric.carlson@apple.com>
2613
2614         [MediaStream] Resolve constraints and enumerate devices in the UI process
2615         https://bugs.webkit.org/show_bug.cgi?id=162147
2616         <rdar://problem/28803569>
2617
2618         Reviewed by Darin Adler.
2619         
2620         Restructure gUM constraint validation and MediaDevices.enumerateDevices so all media device
2621         access happens in the UI process.
2622
2623         * Scripts/webkit/messages.py:
2624         (headers_for_type): Special case MediaConstraintsData.
2625
2626         * Shared/WebCoreArgumentCoders.cpp:
2627         (IPC::encodeMediaTrackConstraintSetMap): MediaTrackConstraintSetMap encoder.
2628         (IPC::ArgumentCoder<MediaConstraintsData>::encode): MediaConstraintsData encoder.
2629         (IPC::decodeMediaTrackConstraintSetMap): MediaTrackConstraintSetMap decoder.
2630         (IPC::ArgumentCoder<MediaConstraintsData>::decode): MediaConstraintsData decoder.
2631         (IPC::ArgumentCoder<CaptureDevice>::encode): CaptureDevice enoder.
2632         (IPC::ArgumentCoder<CaptureDevice>::decode): CaptureDevice decoder.
2633         * Shared/WebCoreArgumentCoders.h:
2634
2635         * UIProcess/API/APIUIClient.h:  Remove UserMediaPermissionCheckProxy forward declaration.
2636
2637         * UIProcess/API/C/WKUserMediaPermissionRequest.cpp:
2638         (toWK): Translate UserMediaPermissionRequestDenialReason to UserMediaAccessDenialReason.
2639         (WKUserMediaPermissionRequestDeny): Add "reason" parameter.
2640         * UIProcess/API/C/WKUserMediaPermissionRequest.h:
2641
2642         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2643         (WebKit::UserMediaPermissionRequestManagerProxy::invalidateRequests): Invalidate pending device requests.
2644         (WebKit::UserMediaPermissionRequestManagerProxy::createRequest): Make private.
2645         (WebKit::toWebCore): Map from UserMediaAccessDenialReason to MediaAccessDenialReason, cast to
2646           uint64_t to pass to web process.
2647         (WebKit::UserMediaPermissionRequestManagerProxy::denyRequest): Send to web process.
2648         (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Ditto.
2649         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): Validate
2650           constraints and make sure gUM is enabled before prompting user.
2651         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): New.
2652         (WebKit::UserMediaPermissionRequestManagerProxy::didCompleteUserMediaPermissionCheck): Send 
2653           results of device enumeration to web process.
2654         (WebKit::UserMediaPermissionRequestManagerProxy::didReceiveUserMediaPermissionDecision): Deleted.
2655         (WebKit::UserMediaPermissionRequestManagerProxy::createUserMediaPermissionCheck): Deleted.
2656         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
2657
2658         * UIProcess/UserMediaPermissionRequestProxy.cpp:
2659         (WebKit::UserMediaPermissionRequestProxy::allow):
2660         (WebKit::UserMediaPermissionRequestProxy::deny): Take "reason" parameter.
2661         * UIProcess/UserMediaPermissionRequestProxy.h:
2662
2663         * UIProcess/WebPageProxy.cpp:
2664         (WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
2665         (WebKit::WebPageProxy::enumerateMediaDevicesForFrame):
2666         (WebKit::WebPageProxy::checkUserMediaPermissionForFrame): Deleted.
2667         * UIProcess/WebPageProxy.h:
2668         * UIProcess/WebPageProxy.messages.in:
2669
2670         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
2671         (WebKit::UserMediaPermissionRequestManager::startUserMediaRequest): userMediaAccessDenied -> deny.
2672           Pass the audio and video constraints to the UI process.
2673         (WebKit::UserMediaPermissionRequestManager::userMediaAccessWasGranted): 
2674         (WebKit::UserMediaPermissionRequestManager::userMediaAccessWasDenied):
2675         (WebKit::UserMediaPermissionRequestManager::enumerateMediaDevices): Send the enumeration request
2676           to the UI process.
2677         (WebKit::UserMediaPermissionRequestManager::cancelMediaDevicesEnumeration):
2678         (WebKit::UserMediaPermissionRequestManager::didCompleteMediaDeviceEnumeration):
2679         (WebKit::UserMediaPermissionRequestManager::didReceiveUserMediaPermissionDecision): Deleted.
2680         (WebKit::UserMediaPermissionRequestManager::startUserMediaPermissionCheck): Deleted.
2681         (WebKit::UserMediaPermissionRequestManager::cancelUserMediaPermissionCheck): Deleted.
2682         (WebKit::UserMediaPermissionRequestManager::didCompleteUserMediaPermissionCheck): Deleted.
2683         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
2684
2685         * WebProcess/WebCoreSupport/WebUserMediaClient.cpp:
2686         (WebKit::WebUserMediaClient::enumerateMediaDevices): New.
2687         (WebKit::WebUserMediaClient::cancelMediaDevicesEnumerationRequest): New.
2688         (WebKit::WebUserMediaClient::checkUserMediaPermission): Deleted.
2689         (WebKit::WebUserMediaClient::cancelUserMediaPermissionCheck): Deleted.
2690         * WebProcess/WebCoreSupport/WebUserMediaClient.h:
2691
2692         * WebProcess/WebPage/WebPage.cpp:
2693         (WebKit::WebPage::userMediaAccessWasGranted): New.
2694         (WebKit::WebPage::userMediaAccessWasDenied): Ditto.
2695         (WebKit::WebPage::didCompleteMediaDeviceEnumeration):
2696         (WebKit::WebPage::didReceiveUserMediaPermissionDecision): Deleted.
2697         (WebKit::WebPage::didCompleteUserMediaPermissionCheck): Deleted.
2698         * WebProcess/WebPage/WebPage.h:
2699         * WebProcess/WebPage/WebPage.messages.in:
2700
2701 2016-10-17  Antti Koivisto  <antti@apple.com>
2702
2703         Rename setNeedsStyleRecalc to invalidateStyle
2704         https://bugs.webkit.org/show_bug.cgi?id=163542
2705
2706         Reviewed by Darin Adler.
2707
2708         * WebProcess/Plugins/PluginView.cpp:
2709         (WebKit::PluginView::didInitializePlugin):
2710         (WebKit::PluginView::pluginProcessCrashed):
2711
2712 2016-10-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2713
2714         NetworkSession: PendingDownload is leaked if canceled before willDecidePendingDownloadDestination
2715         https://bugs.webkit.org/show_bug.cgi?id=163545
2716
2717         Reviewed by Alex Christensen.
2718
2719         If a download started by DownloadManager::startDownload() is cancelled before
2720         DownloadManager::willDecidePendingDownloadDestination() is called, DownloadManager::cancelDownload() does
2721         nothing, because the Download hasn't been created yet and m_downloadsWaitingForDestination map doesn't contain
2722         the download ID, and the PendingDownload is never removed from the m_pendingDownloads map.
2723
2724         * NetworkProcess/Downloads/DownloadManager.cpp:
2725         (WebKit::DownloadManager::cancelDownload): Always take the PendingDownload from m_pendingDownloads map. Then, if
2726         the download was already in m_downloadsWaitingForDestination map, get the network data task to properly cancel
2727         it and then call the completion handler to ignore the request. Otherwise cancel the pending download if exists.
2728         * NetworkProcess/Downloads/PendingDownload.cpp:
2729         (WebKit::PendingDownload::cancel): Cancel the network load and notify the UI process that the download was canceled.
2730         * NetworkProcess/Downloads/PendingDownload.h:
2731
2732 2016-10-17  Megan Gardner  <megan_gardner@apple.com>
2733
2734         Add test and infrastructure for link popover
2735         https://bugs.webkit.org/show_bug.cgi?id=163406
2736
2737         Reviewed by Simon Fraser.
2738
2739         Add infrastructure to see when a link popover appears, and what URL it has loaded.
2740
2741         * UIProcess/API/Cocoa/WKWebView.mm:
2742         (-[WKWebView didShowForcePressPreview]):
2743         (-[WKWebView didDismissForcePressPreview]):
2744         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2745         * UIProcess/ios/WKContentViewInteraction.mm:
2746         (-[WKContentView _contentsOfUserInterfaceItem:]):
2747         (-[WKContentView _presentedViewControllerForPreviewItemController:]):
2748         (-[WKContentView _previewItemController:didDismissPreview:committing:]):
2749         (-[WKContentView _previewItemControllerDidCancelPreview:]):
2750
2751 2016-10-17  Tim Horton  <timothy_horton@apple.com>
2752
2753         REGRESSION (r169805): WKWebView canGoBack returning YES when nothing is in the back-forward list after restoring session state
2754         https://bugs.webkit.org/show_bug.cgi?id=163573
2755         <rdar://problem/28744549>
2756
2757         Reviewed by Dan Bernstein.
2758
2759         * UIProcess/WebPageProxy.cpp:
2760         (WebKit::WebPageProxy::restoreFromSessionState):
2761         Update PageLoadState's canGoBack/canGoForward bits when restoring from
2762         session state, because in the don't-navigate case, nothing else will make this happen,
2763         and it will remain stale.
2764
2765 2016-10-17  Andy Estes  <aestes@apple.com>
2766
2767         Crash in ASCIICaseInsensitiveHash::hash() when a response has a null MIME type
2768         https://bugs.webkit.org/show_bug.cgi?id=163476
2769         <rdar://problem/26941395>
2770
2771         Reviewed by Tim Horton.
2772
2773         When custom content providers are registered and a response has a null MIME type, WebPage
2774         will pass a null String to HashSet::contains(). This results in a null pointer dereference,
2775         since the String hash functions do not support null Strings and unconditionally dereference
2776         their StringImpls. Fixed by checking that Strings are non-null before calling
2777         HashSet::contains() on m_mimeTypesWithCustomContentProviders.
2778
2779         Rearranging WebPage::shouldUseCustomContentProviderForResponse() to call
2780         canPluginHandleResponse() before checking m_mimeTypesWithCustomContentProviders uncovered a
2781         crash in existing layout tests where WebPage::m_mainFrame can be NULL during WebPage
2782         construction (m_mainFrame isn't yet initialized). Fixed this by passing the main Frame to
2783         canPluginHandleResponseInFrame() instead of relying on m_mainFrame.
2784
2785         New API test: WebKit2.LoadDataWithNilMIMEType.
2786
2787         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2788         (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame): Passed
2789         m_frame->coreFrame() to shouldUseCustomContentProviderForResponse().
2790         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): Ditto.
2791         * WebProcess/WebPage/WebPage.cpp:
2792         (WebKit::WebPage::canPluginHandleResponse): Added a mainFrame parameter and used it instead
2793         of m_mainFrame->coreFrame().
2794         (WebKit::WebPage::shouldUseCustomContentProviderForResponse): Passed mainFrame to
2795         canPluginHandleResponse(), and checked if mimeType is null before calling
2796         m_mimeTypesWithCustomContentProviders.contains().
2797         (WebKit::WebPage::canShowMIMEType): Checked if MIMEType is null before calling
2798         m_mimeTypesWithCustomContentProviders.contains().
2799         * WebProcess/WebPage/WebPage.h: Made canPluginHandleResponse() a private declaration.
2800
2801 2016-10-17  Chris Dumez  <cdumez@apple.com>
2802
2803         [WK2][NetworkCache] PendingFrameLoad objects are sometimes leaked
2804         https://bugs.webkit.org/show_bug.cgi?id=163569
2805         <rdar://problem/28810836>
2806
2807         Reviewed by Antti Koivisto.
2808
2809         PendingFrameLoad objects are created to track frame loads and added to
2810         the m_pendingFrameLoads hash map. These objects are supposed to remove
2811         themselves from the hash map once they detect that the page load has
2812         finished by calling PendingFrameLoad::m_loadCompletionHandler().
2813
2814         PendingFrameLoad::m_loadCompletionHandler() is called from
2815         markLoadAsCompleted() when we detect that the page load has finished
2816         via the m_loadHysteresisActivity HysteresisActivity. We call impulse()
2817         on the HysteresisActivity every time a subresource is loaded in the
2818         frame. The issue is that if no subresource is ever loaded, then we
2819         never call impulse() on the HysteresisActivity, which is therefore
2820         never started. If it nevers starts, then it nevers stops and never
2821         calls markLoadAsCompleted(). To address the problem, we now call
2822         impulse() on the HysteresisActivity as soon as we construct it.
2823
2824         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
2825
2826 2016-10-17  Jeremy Jones  <jeremyj@apple.com>
2827
2828         Enable keyboard in fullscreen.
2829         https://bugs.webkit.org/show_bug.cgi?id=163146
2830
2831         Reviewed by Jer Noble.
2832
2833         Allow keyboard in fullscreen.
2834
2835         * UIProcess/WebFullScreenManagerProxy.cpp:
2836         (WebKit::WebFullScreenManagerProxy::supportsFullScreen):
2837
2838 2016-10-17  Chris Dumez  <cdumez@apple.com>
2839
2840         Move form.reportValidity() behind InteractiveFormValidation setting
2841         https://bugs.webkit.org/show_bug.cgi?id=163550
2842
2843         Reviewed by Darin Adler.
2844
2845         Enable InteractiveFormValidation setting by default and link it to
2846         RuntimeEnabledFeatures so we can use it in the IDL.
2847
2848         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2849         * WebProcess/WebPage/WebPage.cpp:
2850         (WebKit::WebPage::updatePreferences):
2851
2852 2016-10-17  Gavin Barraclough  <barraclough@apple.com>
2853
2854         UIProcess should determine throttle state for WebContent process
2855         https://bugs.webkit.org/show_bug.cgi?id=163556
2856
2857         Reviewed by Anders Carlsson.
2858
2859         This is a step towards merging page/process throttling code for mac & iOS.
2860
2861         Previously WebPage determined whether to start a UserActivity based on page activity,
2862         visibility and the preference to disable. Now WebPage passes the activity state across
2863         to WebPageProxy, which makes the decision & explicitly instructs WebPage to start/stop
2864         the UserActivity.
2865
2866         * UIProcess/WebPageProxy.cpp:
2867         (WebKit::WebPageProxy::WebPageProxy):
2868             - updateActivityToken + updateProccessSuppressionState -> updateThrottleState
2869         (WebKit::WebPageProxy::reattachToWebProcess):
2870             - updateActivityToken -> updateThrottleState
2871         (WebKit::WebPageProxy::dispatchViewStateChange):
2872             - updateActivityToken -> updateThrottleState
2873         (WebKit::WebPageProxy::setPageActivityState):
2874             - Record activity state passed from WebPage, and update.
2875         (WebKit::WebPageProxy::preferencesDidChange):
2876             - updateProccessSuppressionState -> updateThrottleState
2877         (WebKit::WebPageProxy::updateActivityToken): Deleted.
2878         (WebKit::WebPageProxy::updateProccessSuppressionState): Deleted.
2879         (WebKit::WebPageProxy::updateThrottleState):
2880             - Merged existing updateActivityToken/updateProccessSuppressionState to unified updateThrottleState.
2881             - Compute whether page should be suppressed, and send SetPageSuppressed message accordingly.
2882         * UIProcess/WebPageProxy.h:
2883             - Merged existing updateActivityToken/updateProccessSuppressionState to unified updateThrottleState.
2884             - Added setPageActivityState/m_activityState to report/record page activity.
2885             - Added m_pageSuppressed to prevent redundant message sends.
2886         * UIProcess/WebPageProxy.messages.in:
2887             - Expose SetPageActivityState message (called by WebPage).
2888         * WebProcess/WebPage/WebPage.cpp:
2889         (WebKit::WebPage::WebPage):
2890             - removed m_processSuppressionEnabled
2891             - updateUserActivity -> setPageSuppressed - explicitly set the page to not be suppressed, until WebPageProxy tells us to do so.
2892         (WebKit::WebPage::setPageActivityState):
2893             - post activity state on to WebPageProxy.
2894         (WebKit::WebPage::setPageSuppressed):
2895             - Start/stop USerActivity accordingly.
2896         (WebKit::WebPage::setViewState):
2897             - No longer need to monitor ViewState changes on the WebProcess side.
2898         (WebKit::WebPage::updatePreferences):
2899             - No longer need to monitor preference changes on the WebProcess side.
2900         (WebKit::WebPage::updateUserActivity): Deleted.
2901             - Only updated on reciept of setPageSuppressed message.
2902         * WebProcess/WebPage/WebPage.h:
2903             - Removed m_activityState, m_processSuppressionEnabled, updateUserActivity.
2904             - Added setPageSuppressed message.
2905         * WebProcess/WebPage/WebPage.messages.in:
2906             - Added SetPageSuppressed message.
2907
2908 2016-10-17  Michael Catanzaro  <mcatanzaro@igalia.com>
2909
2910         REGRESSION(r206189): logs error statements when API::URLRequest is canceled
2911         https://bugs.webkit.org/show_bug.cgi?id=163393
2912
2913         Reviewed by Antti Koivisto.
2914
2915         Print this case at normal logging level, not as an error.
2916
2917         * WebProcess/Network/WebLoaderStrategy.cpp:
2918         (WebKit::WebLoaderStrategy::loadResource):
2919
2920 2016-10-17  Chris Dumez  <cdumez@apple.com>
2921
2922         [iOS] Hook up WebPlatformTouchPoint's radiusX / radiusY to _UIWebTouchPoint.majorRadiusInScreenCoordinates
2923         https://bugs.webkit.org/show_bug.cgi?id=163547
2924
2925         Reviewed by Darin Adler.
2926
2927         Hook up WebPlatformTouchPoint's radiusX / radiusY to _UIWebTouchPoint.majorRadiusInScreenCoordinates
2928         now that it is available in UIKit.
2929
2930         * Platform/spi/ios/UIKitSPI.h:
2931         * Shared/ios/NativeWebTouchEventIOS.mm:
2932         (WebKit::NativeWebTouchEvent::extractWebTouchPoint):
2933
2934 2016-10-17  Konstantin Tokarev  <annulen@yandex.ru>
2935
2936         Eleminate code duplication between ResourceRequest encoding/decoding implementations
2937         https://bugs.webkit.org/show_bug.cgi?id=163507
2938
2939         Reviewed by Carlos Garcia Campos.
2940
2941         ResourceRequestBase::encodeWithoutPlatformData() and Soup implementation of
2942         ArgumentCoder<ResourceRequest>::encodePlatformData() share most of the code,
2943         ditto for decoding implementations.
2944
2945         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
2946         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
2947         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
2948
2949 2016-10-17  Michael Catanzaro  <mcatanzaro@igalia.com>
2950
2951         Move user agent quirks to cross-platform location
2952         https://bugs.webkit.org/show_bug.cgi?id=163508
2953
2954         Reviewed by Carlos Garcia Campos.
2955
2956         #include <WebCore/UserAgent.h> instead of <WebCore/UserAgentGtk.h>.
2957
2958         * UIProcess/API/gtk/WebKitSettings.cpp:
2959         * UIProcess/efl/WebPageProxyEfl.cpp:
2960         * UIProcess/gtk/WebPageProxyGtk.cpp:
2961         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
2962
2963 2016-10-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2964
2965         [SOUP] Downloads should always sniff contents
2966         https://bugs.webkit.org/show_bug.cgi?id=163538
2967
2968         Reviewed by Michael Catanzaro.
2969
2970         It's quite common that downloads have weird filenames with no extension, so it would be better if the loader
2971         sniff the contents to guess the mime type.
2972
2973         * NetworkProcess/Downloads/soup/DownloadSoup.cpp:
2974         (WebKit::Download::startNetworkLoad): Pass true for shouldContentSniff parameter of ResourceHandle::create().
2975
2976 2016-10-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2977
2978         [GTK] Switch to use API::DownloadClient instead of the C API client
2979         https://bugs.webkit.org/show_bug.cgi?id=163537
2980
2981         Reviewed by Michael Catanzaro.
2982
2983         The code is simpler and we avoid all the toImpl/toAPI.
2984
2985         * UIProcess/API/gtk/WebKitDownloadClient.cpp:
2986         (attachDownloadClientToContext):
2987         (didStart):
2988         (didReceiveResponse):
2989         (didReceiveData):
2990         (decideDestinationWithSuggestedFilename):
2991         (didCreateDestination):
2992         (didFail):
2993         (didCancel):
2994         (didFinish):
2995
2996 2016-10-17  Manuel Rego Casasnovas  <rego@igalia.com>
2997
2998         [css-grid] Disable CSS Grid Layout runtime flag by default
2999         https://bugs.webkit.org/show_bug.cgi?id=163432
3000
3001         Reviewed by Darin Adler.
3002
3003         It was enabled in r201042, but now Safari Technology Preview
3004         has a UI to switch runtime flags so it doesn't need to be enabled
3005         by default anymore.
3006
3007         * Shared/WebPreferencesDefinitions.h: Disable grid layout runtime flag
3008         by default.
3009
3010 2016-10-16  Darin Adler  <darin@apple.com>
3011
3012         Move CSS classes from ExceptionCode to Exception
3013         https://bugs.webkit.org/show_bug.cgi?id=163494
3014
3015         Reviewed by Sam Weinig.
3016
3017         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.cpp:
3018         (webkit_dom_css_rule_set_css_text): Updated for ExceptionOr.
3019         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.cpp:
3020         (webkit_dom_css_style_declaration_remove_property): Ditto.
3021         (webkit_dom_css_style_declaration_set_property): Ditto.
3022         (webkit_dom_css_style_declaration_set_css_text): Ditto.
3023         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.cpp:
3024         (webkit_dom_css_style_sheet_insert_rule): Ditto.
3025         (webkit_dom_css_style_sheet_delete_rule): Ditto.
3026         (webkit_dom_css_style_sheet_add_rule): Ditto.
3027         (webkit_dom_css_style_sheet_remove_rule): Ditto.
3028         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.cpp:
3029         (webkit_dom_css_value_set_css_text): Ditto.
3030         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.cpp:
3031         (webkit_dom_media_list_delete_medium): Ditto.
3032         (webkit_dom_media_list_append_medium): Ditto.
3033         (webkit_dom_media_list_set_media_text): Ditto.
3034
3035 2016-10-16  Carlos Garcia Campos  <cgarcia@igalia.com>
3036
3037         [GTK] Default WebKitWebsiteDataManager is always leaked in WebKitWebContext
3038         https://bugs.webkit.org/show_bug.cgi?id=163443
3039
3040         Reviewed by Michael Catanzaro.
3041
3042         Adopt the reference returned by webkitWebsiteDataManagerCreate().
3043
3044         * UIProcess/API/gtk/WebKitWebContext.cpp:
3045         (webkitWebContextConstructed):
3046
3047 2016-10-16  Carlos Garcia Campos  <cgarcia@igalia.com>
3048
3049         [GTK] WebKitWebPage URI not updated after URI is modified by InjectedBundlePageResourceLoadClient::willSendRequestForFrame
3050         https://bugs.webkit.org/show_bug.cgi?id=163389
3051
3052         Reviewed by Michael Catanzaro.
3053
3054         Update the page URI also when the load is committed.
3055
3056         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
3057         (getDocumentLoaderURL):
3058         (didStartProvisionalLoadForFrame):
3059         (didReceiveServerRedirectForProvisionalLoadForFrame):
3060         (didCommitLoadForFrame):
3061         (webkitWebPageCreate):
3062         (getProvisionalURLForFrame): Deleted.
3063
3064 2016-10-15  Simon Fraser  <simon.fraser@apple.com>
3065
3066         Sort the project file.
3067
3068         * WebKit2.xcodeproj/project.pbxproj:
3069
3070 2016-10-14  Anders Carlsson  <andersca@apple.com>
3071
3072         Fix Mac build.
3073
3074         * UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
3075         (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
3076
3077 2016-10-14  Anders Carlsson  <andersca@apple.com>
3078
3079         Pass on networking settings to the PKPaymentRequest
3080         https://bugs.webkit.org/show_bug.cgi?id=163462
3081         rdar://problem/28567629
3082
3083         Reviewed by Dan Bernstein.
3084
3085         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h:
3086         * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
3087         (WebKit::toPKPaymentRequest):
3088         * UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm:
3089         (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
3090
3091 2016-10-14  Anders Carlsson  <andersca@apple.com>
3092
3093         Clean up BackForwardClient
3094         https://bugs.webkit.org/show_bug.cgi?id=163454
3095
3096         Reviewed by Sam Weinig.
3097
3098         Remove empty iOS only stubs.
3099
3100         * WebKit2.xcodeproj/project.pbxproj:
3101         * WebProcess/WebPage/WebBackForwardListProxy.h:
3102         * WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm: Removed.
3103
3104 2016-10-14  Brady Eidson  <beidson@apple.com>
3105
3106         Enable Gamepads by default in WK2.
3107         https://bugs.webkit.org/show_bug.cgi?id=163447
3108
3109         Rubberstamped by Sam Weinig.
3110
3111         * Shared/WebPreferencesDefinitions.h:
3112
3113 2016-10-14  Gavin Barraclough  <barraclough@apple.com>
3114
3115         Add API to restrict WebKit processes to background priority
3116         https://bugs.webkit.org/show_bug.cgi?id=163363
3117
3118         Reviewed by Anders Carlson.
3119
3120         Add API on _WKProcessPoolConfiguration to flag a process pool as 'alwaysRunsAtBackgroundPriority'.
3121         WebContent and Networking processes associated with that pool will only run a background priority,
3122         when they otherwise would have run at foreground priority.
3123
3124         * UIProcess/API/APIProcessPoolConfiguration.h:
3125             - Add m_alwaysRunsAtBackgroundPriority flag to pool configuration object.
3126         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
3127         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
3128         (-[_WKProcessPoolConfiguration alwaysRunsAtBackgroundPriority]):
3129         (-[_WKProcessPoolConfiguration setAlwaysRunsAtBackgroundPriority:]):
3130             - Expose new configuration property through API.
3131         * UIProcess/Network/NetworkProcessProxy.cpp:
3132         (WebKit::NetworkProcessProxy::alwaysRunsAtBackgroundPriority):
3133         * UIProcess/Network/NetworkProcessProxy.h:
3134             - Support ProcessThrottlerClient interface to check if alwaysRunsAtBackgroundPriority is set.
3135         * UIProcess/ProcessThrottler.cpp:
3136         (WebKit::ProcessThrottler::assertionState):
3137             - When determining whether to take a foreground exception check alwaysRunsAtBackgroundPriority.
3138         * UIProcess/ProcessThrottlerClient.h:
3139             - Add interface to access alwaysRunsAtBackgroundPriority state of WebProcess of NetworkProcess.
3140         * UIProcess/WebProcessPool.cpp:
3141         (WebKit::WebProcessPool::WebProcessPool):
3142         * UIProcess/WebProcessPool.h:
3143             - Add m_alwaysRunsAtBackgroundPriority, set by configuration.
3144         * UIProcess/WebProcessProxy.cpp:
3145         (WebKit::WebProcessProxy::alwaysRunsAtBackgroundPriority):
3146         * UIProcess/WebProcessProxy.h:
3147             - Support ProcessThrottlerClient interface to check if alwaysRunsAtBackgroundPriority is set.
3148
3149 2016-10-14  Youenn Fablet  <youenn@apple.com>
3150
3151         Make NetworkCache aware of fetch cache mode
3152         https://bugs.webkit.org/show_bug.cgi?id=163332
3153
3154         Reviewed by Antti Koivisto.
3155
3156         Adding explicit serialization of ResourceRequest cachePolicy since it does no longer map to platform request cache policy.
3157
3158         Added support for:
3159         - Bypassing entirely the network cache in case cache mode is NoStore.
3160         - requiring revalidation in case of cache hit and cache mode is NoCache.
3161         - Not using any entry if cache mode is Reload (but cache can still be updated)
3162
3163         Also made sure that the ResourceRequest::cachePolicy remains the same throughout redirections.
3164
3165         * NetworkProcess/NetworkResourceLoader.cpp:
3166         (WebKit::NetworkResourceLoader::canUseCache):
3167         (WebKit::NetworkResourceLoader::retrieveCacheEntry):
3168         (WebKit::NetworkResourceLoader::continueWillSendRequest):
3169         * NetworkProcess/cache/NetworkCache.cpp:
3170         (WebKit::NetworkCache::cachePolicyAllowsExpired):
3171         (WebKit::NetworkCache::makeRetrieveDecision):
3172         * Shared/mac/WebCoreArgumentCodersMac.mm:
3173         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
3174         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
3175
3176 2016-10-13  Tim Horton  <timothy_horton@apple.com>
3177
3178         Rename the SPI added in r207292 due to post-landing review comments
3179         https://bugs.webkit.org/show_bug.cgi?id=163364
3180         <rdar://problem/28012494>
3181
3182         Reviewed by Simon Fraser.
3183
3184         * UIProcess/API/APIPageConfiguration.h:
3185         (API::PageConfiguration::waitsForPaintAfterViewDidMoveToWindow):
3186         (API::PageConfiguration::setWaitsForPaintAfterViewDidMoveToWindow):
3187         (API::PageConfiguration::shouldWaitForPaintAfterViewDidMoveToWindow): Deleted.
3188         (API::PageConfiguration::setShouldWaitForPaintAfterViewDidMoveToWindow): Deleted.
3189         * UIProcess/API/Cocoa/WKWebView.mm:
3190         (-[WKWebView _initializeWithConfiguration:]):
3191         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3192         (-[WKWebViewConfiguration init]):
3193         (-[WKWebViewConfiguration copyWithZone:]):
3194         (-[WKWebViewConfiguration _waitsForPaintAfterViewDidMoveToWindow]):
3195         (-[WKWebViewConfiguration _setWaitsForPaintAfterViewDidMoveToWindow:]):
3196         (-[WKWebViewConfiguration _shouldWaitForPaintAfterViewDidMoveToWindow]): Deleted.
3197         (-[WKWebViewConfiguration _setShouldWaitForPaintAfterViewDidMoveToWindow:]): Deleted.
3198         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
3199         * UIProcess/WebPageProxy.cpp:
3200         (WebKit::WebPageProxy::WebPageProxy):
3201         (WebKit::WebPageProxy::dispatchViewStateChange):
3202         * UIProcess/WebPageProxy.h:
3203
3204 2016-10-13  Jonathan Bedard  <jbedard@apple.com>
3205
3206         GTK and EFL on Mac fail to compile WebTextChecker due to missing definition of WKTextCheckerClientBase
3207         https://bugs.webkit.org/show_bug.cgi?id=163346
3208
3209         Reviewed by Daniel Bates.
3210
3211         * UIProcess/API/C/WKTextChecker.cpp: Fixed #ifdefs for GTK and EFL builds on Darwin machines.
3212         * UIProcess/API/C/WKTextChecker.h: Ditto.
3213
3214 2016-10-13  Tim Horton  <timothy_horton@apple.com>
3215
3216         Expose SPI to disable synchronously blocking on painting after parenting a WKWebView
3217         https://bugs.webkit.org/show_bug.cgi?id=163364
3218         <rdar://problem/28012494>
3219
3220         Reviewed by Geoff Garen.
3221
3222         Some clients may not want the default WKWebView behavior where we synchronously
3223         block on the Web process after the first time a WKWebView is re-added to the window,
3224         because they are e.g. parenting re-used WKWebViews while scrolling.
3225
3226         * UIProcess/API/APIPageConfiguration.h:
3227         (API::PageConfiguration::shouldSynchronizeInitialPaintAfterMovingToWindow):
3228         (API::PageConfiguration::setShouldSynchronizeInitialPaintAfterMovingToWindow):
3229         * UIProcess/API/Cocoa/WKWebView.mm:
3230         (-[WKWebView _initializeWithConfiguration:]):
3231         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3232         (-[WKWebViewConfiguration init]):
3233         (-[WKWebViewConfiguration copyWithZone:]):
3234         (-[WKWebViewConfiguration _shouldSynchronizeInitialPaintAfterMovingToWindow]):
3235         (-[WKWebViewConfiguration _setShouldSynchronizeInitialPaintAfterMovingToWindow:]):
3236         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
3237         * UIProcess/WebPageProxy.h:
3238         * UIProcess/WebPageProxy.cpp:
3239         (WebKit::WebPageProxy::WebPageProxy):
3240         Add and plumb a new WKWebView configuration parameter.
3241
3242         (WebKit::WebPageProxy::dispatchViewStateChange):
3243         If the new configuration parameter is set, don't block the main thread when
3244         a view is reparented.
3245
3246 2016-10-12  Chris Dumez  <cdumez@apple.com>
3247
3248         [Web IDL] Drop support for legacy [ConstructorConditional=*]
3249         https://bugs.webkit.org/show_bug.cgi?id=163368
3250
3251         Reviewed by Ryosuke Niwa.
3252
3253         Drop ENABLE_DOM4_EVENTS_CONSTRUCTOR compiler flag.
3254
3255         * Configurations/FeatureDefines.xcconfig:
3256
3257 2016-10-12  Alex Christensen  <achristensen@webkit.org>
3258
3259         Fix assertion after switching to URLParser
3260         https://bugs.webkit.org/show_bug.cgi?id=163350
3261         rdar://problem/28739938
3262
3263         Reviewed by Brady Eidson.
3264         
3265         Covered by a new API test.
3266
3267         * UIProcess/API/Cocoa/_WKUserStyleSheet.mm:
3268         (-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:baseURL:userContentWorld:]):
3269         The { } here is not understood by the compiler to mean WebCore::URL(), but rather the empty constructor for the enum ParsedURLStringTag.
3270         We used to be unsafely trusting that the URL was valid and canonicalized, but with URLParser we are canonicalizing it,
3271         and the assertion (url == m_string) in URL.cpp was failing.
3272
3273 2016-10-12  Anders Carlsson  <andersca@apple.com>
3274
3275         Remove an unused function
3276         https://bugs.webkit.org/show_bug.cgi?id=163341
3277
3278         Reviewed by Dan Bernstein.
3279
3280         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
3281         (WebKit::WebBackForwardListProxy::isActive): Deleted.
3282         * WebProcess/WebPage/WebBackForwardListProxy.h:
3283
3284 2016-10-11  Gyuyoung Kim  <gyuyoung.kim@navercorp.com>
3285
3286         [EFL] Update API tests which are passed or failed
3287         https://bugs.webkit.org/show_bug.cgi?id=163322
3288
3289         Unreviewed, simple on/off API test.
3290
3291         *ewk_favicon_database_clear* has been crashed for a long time, however
3292         *ewk_cookie_manager_permanent_storage* is fine now. So the passing test
3293         is enabled again, and disable the failure tests.
3294
3295         * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
3296         (TEST_F):
3297         * UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp:
3298         (TEST_F):
3299
3300 2016-10-11  Daniel Bates  <dabates@apple.com>
3301
3302         Attempt to fix the Apple Internal Mac build following r207159
3303         (https://bugs.webkit.org/show_bug.cgi?id=163244)
3304
3305         * UIProcess/API/Cocoa/WKWebView.mm:
3306         (shouldRequireUserGestureToLoadVideo):
3307
3308 2016-10-11  Anders Carlsson  <andersca@apple.com>
3309
3310         Clean up WebPageGroup somewhat
3311         https://bugs.webkit.org/show_bug.cgi?id=163299
3312
3313         Reviewed by Tim Horton.
3314
3315         * Shared/API/c/WKDeprecatedFunctions.cpp:
3316         (WKPageGroupCopyIdentifier):
3317         Move this here from WKPageGroup.
3318
3319         (WKPageGroupAddUserContentFilter):
3320         (WKPageGroupRemoveUserContentFilter):
3321         (WKPageGroupRemoveAllUserContentFilters):
3322         Just call directly into the user content controller.
3323
3324         * UIProcess/API/C/WKPageGroup.cpp:
3325         (WKPageGroupAddUserStyleSheet):
3326         (WKPageGroupRemoveAllUserStyleSheets):
3327         (WKPageGroupAddUserScript):
3328         (WKPageGroupRemoveAllUserScripts):
3329         Just call directly into the user content controller.
3330
3331         * UIProcess/API/C/WKPageGroup.h:
3332         * UIProcess/WebPageGroup.cpp:
3333         (WebKit::WebPageGroup::addUserStyleSheet): Deleted.
3334         (WebKit::WebPageGroup::addUserScript): Deleted.
3335         (WebKit::WebPageGroup::removeAllUserStyleSheets): Deleted.
3336         (WebKit::WebPageGroup::removeAllUserScripts): Deleted.
3337         (WebKit::WebPageGroup::removeAllUserContent): Deleted.
3338         (WebKit::WebPageGroup::addUserContentExtension): Deleted.
3339         (WebKit::WebPageGroup::removeUserContentExtension): Deleted.
3340         (WebKit::WebPageGroup::removeAllUserContentExtensions): Deleted.
3341         Get rid of these, all their callers just call into the user content controller now.
3342
3343         * UIProcess/WebPageGroup.h:
3344         (WebKit::WebPageGroup::identifier): Deleted.
3345         (WebKit::WebPageGroup::sendToAllProcessesInGroup): Deleted.
3346         Remove unused code.
3347
3348 2016-10-11  Daniel Bates  <dabates@apple.com>
3349
3350         [iOS] REGRESSION (r197953): User gesture required to load video in iOS 9-built apps
3351         https://bugs.webkit.org/show_bug.cgi?id=163244
3352         <rdar://problem/27250015>
3353
3354         Reviewed by Jer Noble.
3355
3356         Enable or disable the Setting::requiresUserGestureToLoadVideo() in WebKit depending on the
3357         version of iOS SDK that the app was linked against. We require a user gesture to begin
3358         loading a video as of iOS 10.
3359
3360         * Shared/WebPreferencesDefinitions.h:
3361         * UIProcess/API/Cocoa/WKWebView.mm:
3362         (shouldRequireUserGestureToLoadVideo): Added.
3363         (-[WKWebView _initializeWithConfiguration:]): Set the requiresUserGestureToLoadVideo preference.
3364         * WebProcess/WebPage/WebPage.cpp:
3365         (WebKit::WebPage::updatePreferences): Modified to pass the WebKit requiresUserGestureToLoadVideo
3366         preference to WebCore.
3367
3368 2016-10-11  Alex Christensen  <achristensen@webkit.org>
3369
3370         Remove dead networking code
3371         https://bugs.webkit.org/show_bug.cgi?id=163263
3372
3373         Reviewed by Daniel Bates.
3374
3375         * NetworkProcess/Downloads/Download.h:
3376         * NetworkProcess/Downloads/ios/DownloadIOS.mm: Removed.
3377         * NetworkProcess/Downloads/mac/DownloadMac.mm:
3378         * NetworkProcess/NetworkLoad.h:
3379         * NetworkProcess/mac/NetworkLoadMac.mm:
3380         (WebKit::NetworkLoad::willCacheResponseAsync): Deleted.
3381         * Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm:
3382         (WebKit::AuthenticationManager::receivedCredential):
3383         (WebKit::AuthenticationManager::receivedRequestToContinueWithoutCredential):
3384         (WebKit::AuthenticationManager::receivedCancellation):
3385         (WebKit::AuthenticationManager::receivedRequestToPerformDefaultHandling):
3386         (WebKit::AuthenticationManager::receivedChallengeRejection):
3387         * Shared/WebProcessCreationParameters.cpp:
3388         (WebKit::WebProcessCreationParameters::encode):
3389         (WebKit::WebProcessCreationParameters::decode):
3390         * Shared/WebProcessCreationParameters.h:
3391         * Shared/mac/WebCoreArgumentCodersMac.mm:
3392         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
3393         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
3394         * WebKit2.xcodeproj/project.pbxproj:
3395
3396 2016-10-11  Anders Carlsson  <andersca@apple.com>
3397
3398         Move no longer used functions to WKDeprecatedFunctions.cpp
3399         https://bugs.webkit.org/show_bug.cgi?id=163290
3400
3401         Reviewed by Dan Bernstein.
3402
3403         * Shared/API/c/WKDeprecatedFunctions.cpp:
3404         (WKPageGroupAddUserContentFilter):
3405         (WKPageGroupRemoveUserContentFilter):
3406         (WKPageGroupRemoveAllUserContentFilters):
3407         (WKContextSetProcessModel): Deleted.
3408         * UIProcess/API/C/WKPageGroup.cpp:
3409         (WKPageGroupRemoveAllUserScripts):
3410         (WKPageGroupAddUserContentFilter): Deleted.
3411         (WKPageGroupRemoveUserContentFilter): Deleted.
3412         (WKPageGroupRemoveAllUserContentFilters): Deleted.
3413         * UIProcess/API/C/WKPageGroup.h:
3414
3415 2016-10-11  Konstantin Tokarev  <annulen@yandex.ru>
3416
3417         Use modern for loops for iterating supplement maps
3418         https://bugs.webkit.org/show_bug.cgi?id=163274
3419
3420         Reviewed by Alex Christensen.
3421
3422         * NetworkProcess/NetworkProcess.cpp:
3423         (WebKit::NetworkProcess::initializeNetworkProcess):
3424         (WebKit::NetworkProcess::initializeConnection):
3425         * UIProcess/WebProcessPool.cpp:
3426         (WebKit::WebProcessPool::~WebProcessPool):
3427         (WebKit::WebProcessPool::networkProcessCrashed):
3428         (WebKit::WebProcessPool::databaseProcessCrashed): Iterate by values()
3429         like in other places.
3430
3431 2016-10-11  Wenson Hsieh  <wenson_hsieh@apple.com>
3432
3433         The "Input Events" experimental feature runtime flag should not be on by default
3434         https://bugs.webkit.org/show_bug.cgi?id=163278
3435
3436         Reviewed by Zalan Bujtas.
3437
3438         This was intended to be off by default.
3439
3440         * Shared/WebPreferencesDefinitions.h:
3441
3442 2016-10-10  Zan Dobersek  <zdobersek@igalia.com>
3443
3444         Add ENABLE_ENCRYPTED_MEDIA configuration option
3445         https://bugs.webkit.org/show_bug.cgi?id=163219
3446
3447         Reviewed by Darin Adler.
3448
3449         * Configurations/FeatureDefines.xcconfig:
3450         Add the ENABLE_ENCRYPTED_MEDIA configuration option. It will be used
3451         to enable or disable the new EME implementation at build-time.
3452
3453 2016-10-10  Carlos Garcia Campos  <cgarcia@igalia.com>
3454
3455         NetworkSession: NetworkDataTask is leaked if download finishes in didReceiveResponse completion handler
3456         https://bugs.webkit.org/show_bug.cgi?id=163204
3457
3458         Reviewed by Alex Christensen.
3459
3460         After the completion handler a reference of the NetworkDataTask is saved in m_downloadsAfterDestinationDecided.
3461         If the download failed or was canceled DownloadManager::dataTaskBecameDownloadTask is never called and the data
3462         task is kept in the download manager forever. This patch exposes NSURLSessionTask state property in
3463         NetworkDataTask, so that the download manager can check the task state after the completion handler and return
3464         early if the download finished or was cancelled.
3465
3466         * NetworkProcess/Downloads/DownloadManager.cpp:
3467         (WebKit::DownloadManager::continueDecidePendingDownloadDestination):
3468         * NetworkProcess/NetworkDataTask.h:
3469         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
3470         (WebKit::NetworkDataTask::state):
3471
3472 2016-10-10  Konstantin Tokarev  <annulen@yandex.ru>
3473
3474         Added final specifier to WebInspectorServer and to its overridden methods
3475         https://bugs.webkit.org/show_bug.cgi?id=163228
3476
3477         Reviewed by Darin Adler.
3478
3479         * UIProcess/InspectorServer/WebInspectorServer.h:
3480
3481 2016-10-10  Carlos Garcia Campos  <cgarcia@igalia.com>
3482
3483         [GTK] 2.14.0 Compile Errors: GTK 3.22.1
3484         https://bugs.webkit.org/show_bug.cgi?id=163190
3485
3486         Reviewed by Alex Christensen.
3487
3488         * UIProcess/gtk/AcceleratedBackingStoreX11.cpp: Include gtk.h since we are using gtk_widget_queue_draw().
3489
3490 2016-10-10  Gyuyoung Kim  <gyuyoung.kim@navercorp.com>
3491
3492         [EFL] ewk_context_preferred_languages has been failed since r206949
3493         https://bugs.webkit.org/show_bug.cgi?id=163211
3494
3495         Reviewed by Chris Dumez.
3496
3497         r206949 changed to return value of navigator.language from en-us to en-US
3498         in order to match other browsers and w3c spec. So ewk_context_preferred_languages
3499         needs to change the expected result as well.
3500
3501         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
3502         (TEST_F):
3503
3504 2016-10-10  Carlos Garcia Campos  <cgarcia@igalia.com>
3505
3506         NetworkSession: downloads started by startDownload() can fail before starting from the API point of view
3507         https://bugs.webkit.org/show_bug.cgi?id=163107
3508
3509         Reviewed by Alex Christensen.
3510
3511         In the network process we use a PendingDownload in this case, but in the UI process we always have a single
3512         download proxy. If an error happens before the pending download is converted inot a real download, the DidFail
3513         messages is received in the download proxy before the DidStart one. This is problematic at least for the GTK+
3514         API, because it's common to connect to the started signal and connect to all other signals from there, but in
3515         this case the started signal is never emitted, and then the failed one is not handled. This is not a problem for
3516         downloads started by convertTaskToDownload, because in that case those loads are not considered a download by
3517         the UI process when those early errors happen, and then the web page handles them.
3518
3519         * NetworkProcess/Downloads/PendingDownload.cpp:
3520         (WebKit::PendingDownload::PendingDownload): Send DidStart message right after the network load starts like the
3521         non network session code does.
3522         * NetworkProcess/NetworkLoad.cpp:
3523         (WebKit::NetworkLoad::convertTaskToDownload): Send DidStart message now that the normal load has been converted
3524         into a download.
3525         * NetworkProcess/NetworkProcess.cpp:
3526         (WebKit::NetworkProcess::findPendingDownloadLocation): Do not send DidStart message here.
3527
3528 2016-10-10  Carlos Garcia Campos  <cgarcia@igalia.com>
3529
3530         Network Session: PendingDownload is always nullptr in DownloadManager::dataTaskBecameDownloadTask
3531         https://bugs.webkit.org/show_bug.cgi?id=163006
3532
3533         Reviewed by Alex Christensen.
3534
3535         In DownloadManager::dataTaskBecameDownloadTask() we are supposed to have either a pending download, or a network
3536         data task depending on whether the download was started by startDownload() or convertTaskToDownload. However, in
3537         both cases we do have a data task and never a pending download. In the case of startDownload() the pending
3538         download is removed from m_pendingDownloads in willDecidePendingDownloadDestination(). The task is always
3539         added to m_downloadsWaitingForDestination in willDecidePendingDownloadDestination() and to
3540         m_downloadsAfterDestinationDecided in continueDecidePendingDownloadDestination() in both cases.
3541
3542         * NetworkProcess/Downloads/DownloadManager.cpp:
3543         (WebKit::DownloadManager::dataTaskBecameDownloadTask): Add an ASSERT to ensure we don't have a pending download
3544         at this point and that the download is not already in the map. Remove the download from the
3545         m_downloadsAfterDestinationDecided map, but don't check its result because it might not bein that map if
3546         dataTaskBecameDownloadTask is called synchronously from the didReceiveResponse completion handler.
3547         (WebKit::DownloadManager::willDecidePendingDownloadDestination): Do not take the pending download here, wait
3548         until didReceiveResponse completion handler is called.
3549         (WebKit::DownloadManager::continueDecidePendingDownloadDestination): Take the pending download here ensuring
3550         it's alive while the didReceiveResponse completion handler is called. Also remove invalid early return when
3551         either networkDataTask or completionHandler are nullptr because we are using both unconditionally, we should
3552         return early if both are nullptr to avoid crashes. However, we are checking that the download is in the
3553         m_downloadsWaitingForDestination and in that case we should always have both, so better add asserts there. If
3554         the download is already in the map after the completion handler it means that dataTaskBecameDownloadTask() has
3555         alrady been called, so we can just return in that case.
3556         * NetworkProcess/Downloads/DownloadManager.h:
3557         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
3558         (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]): Protect the NetworkDataTask that can
3559         be deleted by dataTaskBecameDownloadTask().
3560
3561 2016-10-10  Tim Horton  <timothy_horton@apple.com>
3562
3563         Share more code between iOS and macOS ViewGestureController
3564         https://bugs.webkit.org/show_bug.cgi?id=163158
3565
3566         Reviewed by Simon Fraser.
3567
3568         Share canSwipeInDirection() and the (unused on Mac) alternate back-forward list mechanism.
3569         Make ViewGestureController operate in terms of WebPageProxy, not WKWebView,
3570         because it shouldn't know anything about WKWebView.
3571         Refactor scrollEventCanBecomeSwipe a bit to be less repetitive.
3572
3573         * UIProcess/API/Cocoa/WKWebView.mm:
3574         (-[WKWebView setAllowsBackForwardNavigationGestures:]):
3575         * UIProcess/Cocoa/ViewGestureController.cpp:
3576         (WebKit::ViewGestureController::ViewGestureController):
3577         (WebKit::ViewGestureController::setAlternateBackForwardListSourcePage):
3578         (WebKit::ViewGestureController::canSwipeInDirection):
3579         (WebKit::ViewGestureController::gestureControllerForPage): Deleted.
3580         * UIProcess/Cocoa/ViewGestureController.h:
3581         * UIProcess/WebPageProxy.cpp:
3582         (WebKit::WebPageProxy::WebPageProxy):
3583         * UIProcess/WebPageProxy.h:
3584         (WebKit::WebPageProxy::createWeakPtr):
3585         * UIProcess/ios/ViewGestureControllerIOS.mm:
3586         (WebKit::ViewGestureController::beginSwipeGesture):
3587         (WebKit::ViewGestureController::setAlternateBackForwardListSourceView): Deleted.
3588         (WebKit::ViewGestureController::canSwipeInDirection): Deleted.
3589         * UIProcess/mac/ViewGestureControllerMac.mm:
3590         (WebKit::ViewGestureController::PendingSwipeTracker::PendingSwipeTracker):
3591         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):
3592         (WebKit::ViewGestureController::PendingSwipeTracker::tryToStartSwipe):
3593
3594 2016-10-10  Tomas Popela  <tpopela@redhat.com>
3595
3596         [GTK] UIProcess crashes when using Japanese IM
3597         https://bugs.webkit.org/show_bug.cgi?id=163011
3598
3599         We have to reference the current GdkEventKey before we try process it
3600         as later when the lambda body is reached the event could be already
3601         freed.
3602
3603         Reviewed by Carlos Garcia Campos.
3604
3605         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3606         (webkitWebViewBaseKeyPressEvent):
3607         (webkitWebViewBaseKeyReleaseEvent):
3608         * UIProcess/gtk/InputMethodFilter.h:
3609         Use non-copyable Function so we can use WTFMove to pass the event to
3610         lambda.
3611
3612 2016-10-09  Wenson Hsieh  <wenson_hsieh@apple.com>
3613
3614         Support InputEvent.inputType for the new InputEvent spec
3615         https://bugs.webkit.org/show_bug.cgi?id=163025
3616         <rdar://problem/28658092>
3617
3618         Reviewed by Darin Adler.
3619
3620         Accounts for some changes to the EditAction enum in nameForEditAction. Some former edit
3621         actions, such as EditActionTyping, have been split out into its more specific subtypes,
3622         so we preserve shipping behavior by treating all of the new subtypes the same way as the
3623         original type.
3624
3625         * UIProcess/WebEditCommandProxy.cpp:
3626         (WebKit::WebEditCommandProxy::nameForEditAction):
3627
3628 2016-10-08  Emanuele Aina  <emanuele.aina@collabora.com>
3629
3630         [GTK] Drop redundant wl_display_flush_clients() call
3631         https://bugs.webkit.org/show_bug.cgi?id=161904
3632
3633         Reviewed by Michael Catanzaro.
3634
3635         The Wayland GSource::prepare() function already calls
3636         wl_display_flush_clients() at every mainloop iteration, so there's no
3637         need to further call it on Surface::commit().
3638
3639         * UIProcess/gtk/WaylandCompositor.cpp:
3640         (WebKit::WaylandCompositor::Surface::commit):
3641         * UIProcess/gtk/WaylandCompositor.h:
3642
3643 2016-10-06  Darin Adler  <darin@apple.com>
3644
3645         Next step on moving to modern way to return DOM exceptions
3646         https://bugs.webkit.org/show_bug.cgi?id=163016
3647
3648         Reviewed by Ryosuke Niwa.
3649
3650         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.cpp:
3651         (webkit_dom_dom_implementation_create_document_type): Updated for name change
3652         from takeReturnValue to releaseReturnValue.
3653         (webkit_dom_dom_implementation_create_document): Ditto.
3654         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.cpp:
3655         (webkit_dom_dom_selection_collapse_to_end): Use ExceptionOr instead of ExceptionCode.
3656         (webkit_dom_dom_selection_collapse_to_start): Ditto.
3657         (webkit_dom_dom_selection_extend): Ditto.
3658         (webkit_dom_dom_selection_get_range_at): Ditto.
3659
3660 2016-10-08  Commit Queue  <commit-queue@webkit.org>
3661
3662         Unreviewed, rolling out r206950.
3663         https://bugs.webkit.org/show_bug.cgi?id=163169
3664
3665         broke an API test (Requested by thorton on #webkit).
3666
3667         Reverted changeset:
3668
3669         "Share more code between iOS and macOS ViewGestureController"
3670         https://bugs.webkit.org/show_bug.cgi?id=163158
3671         http://trac.webkit.org/changeset/206950
3672
3673 2016-10-08  Tim Horton  <timothy_horton@apple.com>
3674
3675         Share more code between iOS and macOS ViewGestureController
3676         https://bugs.webkit.org/show_bug.cgi?id=163158
3677
3678         Reviewed by Simon Fraser.
3679
3680         Share canSwipeInDirection() and the (unused on Mac) alternate back-forward list mechanism.
3681         Make ViewGestureController operate in terms of WebPageProxy, not WKWebView,
3682         because it shouldn't know anything about WKWebView.
3683         Refactor scrollEventCanBecomeSwipe a bit to be less repetitive.
3684
3685         * UIProcess/API/Cocoa/WKWebView.mm:
3686         (-[WKWebView setAllowsBackForwardNavigationGestures:]):
3687         * UIProcess/Cocoa/ViewGestureController.cpp:
3688         (WebKit::ViewGestureController::ViewGestureController):
3689         (WebKit::ViewGestureController::setAlternateBackForwardListSourcePage):
3690         (WebKit::ViewGestureController::canSwipeInDirection):
3691         (WebKit::ViewGestureController::gestureControllerForPage): Deleted.
3692         * UIProcess/Cocoa/ViewGestureController.h:
3693         * UIProcess/WebPageProxy.cpp:
3694         (WebKit::WebPageProxy::WebPageProxy):
3695         * UIProcess/WebPageProxy.h:
3696         (WebKit::WebPageProxy::createWeakPtr):
3697         * UIProcess/ios/ViewGestureControllerIOS.mm:
3698         (WebKit::ViewGestureController::beginSwipeGesture):
3699         (WebKit::ViewGestureController::setAlternateBackForwardListSourceView): Deleted.
3700         (WebKit::ViewGestureController::canSwipeInDirection): Deleted.
3701         * UIProcess/mac/ViewGestureControllerMac.mm:
3702         (WebKit::ViewGestureController::PendingSwipeTracker::PendingSwipeTracker):
3703         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):
3704         (WebKit::ViewGestureController::PendingSwipeTracker::tryToStartSwipe):
3705
3706 2016-10-07  Anders Carlsson  <andersca@apple.com>
3707
3708         Get rid of API::Session and WKSessionRef
3709         https://bugs.webkit.org/show_bug.cgi?id=163140
3710
3711         Reviewed by Tim Horton.
3712
3713         This API is no longer used.
3714
3715         * CMakeLists.txt:
3716         * Shared/API/APIObject.h:
3717         * Shared/API/c/WKSharedAPICast.h:
3718         * UIProcess/API/APISession.cpp: Removed.
3719         (API::generateID): Deleted.
3720         (API::Session::defaultSession): Deleted.
3721         (API::Session::Session): Deleted.
3722         (API::Session::createEphemeral): Deleted.
3723         (API::Session::isEphemeral): Deleted.
3724         (API::Session::getID): Deleted.
3725         (API::Session::~Session): Deleted.
3726         * UIProcess/API/APISession.h: Removed.
3727         * UIProcess/API/C/WKPage.h:
3728         * UIProcess/API/C/WKSessionRef.cpp: Removed.
3729         (WKSessionCreate): Deleted.
3730         (WKSessionGetTypeID): Deleted.
3731         (WKSessionIsEphemeral): Deleted.
3732         * UIProcess/API/C/WKSessionRef.h: Removed.
3733         * UIProcess/WebPageProxy.h:
3734         * UIProcess/WebProcessProxy.h:
3735         * WebKit2.xcodeproj/project.pbxproj:
3736
3737 2016-10-07  Tim Horton  <timothy_horton@apple.com>
3738
3739         Move ViewGestureController files to more accurate locations
3740         https://bugs.webkit.org/show_bug.cgi?id=163141
3741
3742         Reviewed by Anders Carlsson.
3743
3744         * PlatformMac.cmake:
3745         * UIProcess/Cocoa/ViewGestureController.cpp: Renamed from UIProcess/ViewGestureController.cpp.
3746         * UIProcess/Cocoa/ViewGestureController.h: Renamed from UIProcess/mac/ViewGestureController.h.
3747         * UIProcess/Cocoa/ViewGestureController.messages.in: Renamed from UIProcess/mac/ViewGestureController.messages.in.
3748         * WebKit2.xcodeproj/project.pbxproj:
3749
3750 2016-10-07  Tim Horton  <timothy_horton@apple.com>
3751
3752         Adopt BlockPtr in ViewGestureController
3753         https://bugs.webkit.org/show_bug.cgi?id=163132
3754
3755         Reviewed by Anders Carlsson.
3756
3757         * UIProcess/Cocoa/WebViewImpl.h:
3758         * UIProcess/Cocoa/WebViewImpl.mm:
3759         (WebKit::WebViewImpl::setDidMoveSwipeSnapshotCallback):
3760         * UIProcess/ViewGestureController.cpp:
3761         (WebKit::ViewGestureController::SnapshotRemovalTracker::stopWaitingForEvent):
3762         * UIProcess/mac/ViewGestureController.h:
3763         (WebKit::ViewGestureController::setDidMoveSwipeSnapshotCallback):
3764         (WebKit::ViewGestureController::m_didMoveSwipeSnapshotCallback): Deleted.
3765         * UIProcess/mac/ViewGestureControllerMac.mm:
3766         (WebKit::ViewGestureController::platformTeardown):
3767         (WebKit::ViewGestureController::setDidMoveSwipeSnapshotCallback): Deleted.
3768
3769 2016-10-07  Anders Carlsson  <andersca@apple.com>
3770
3771         Get rid of WKPageSetSession
3772         https://bugs.webkit.org/show_bug.cgi?id=163129
3773
3774         Reviewed by Tim Horton.
3775
3776         This function is no longer used.
3777
3778         * UIProcess/API/C/WKPage.cpp:
3779         (WKPageSetSession): Deleted.
3780         * UIProcess/API/C/WKPage.h:
3781         * UIProcess/WebPageProxy.cpp:
3782         (WebKit::WebPageProxy::setSessionID): Deleted.
3783         * UIProcess/WebPageProxy.h:
3784         (WebKit::WebPageProxy::sessionID):
3785         * WebProcess/WebPage/WebPage.messages.in:
3786
3787 2016-10-07  Commit Queue  <commit-queue@webkit.org>
3788
3789         Unreviewed, rolling out r206909.
3790         https://bugs.webkit.org/show_bug.cgi?id=163116
3791
3792         Caused most of  GTK layout tests to crash (Requested by KaL on
3793         #webkit).
3794
3795         Reverted changeset:
3796
3797         "[GTK] UIProcess crashes when using Japanese IM"
3798         https://bugs.webkit.org/show_bug.cgi?id=163011
3799         http://trac.webkit.org/changeset/206909
3800
3801 2016-10-07  Carlos Garcia Campos  <cgarcia@igalia.com>
3802
3803         Network Session: Allow NetworkDataTask decide what to do when override is allowed for a download
3804         https://bugs.webkit.org/show_bug.cgi?id=163010
3805
3806         Reviewed by Alex Christensen.
3807
3808         Current code always deletes the file before starting a download when allow override is True. In soup backend we
3809         use glib API that takes care of it and tries to ensure that the original file is not deleted if the new file
3810         creation fails for whatever reason.
3811
3812         * NetworkProcess/Downloads/DownloadManager.cpp:
3813         (WebKit::DownloadManager::continueDecidePendingDownloadDestination): Pass allowOverride to setPendingDownloadLocation().
3814         * NetworkProcess/NetworkDataTask.h:
3815         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
3816         (WebKit::NetworkDataTask::setPendingDownloadLocation): Delete the destination file if exists and allowOverride
3817         is True.
3818
3819 2016-10-07  Tomas Popela  <tpopela@redhat.com>
3820
3821         [GTK] UIProcess crashes when using Japanese IM
3822         https://bugs.webkit.org/show_bug.cgi?id=163011
3823
3824         We have to reference the current GdkEventKey before we try process it
3825         as later when the lambda body is reached the event could be already
3826         freed.
3827
3828         Reviewed by Carlos Garcia Campos.
3829
3830         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3831         (webkitWebViewBaseKeyPressEvent):
3832         (webkitWebViewBaseKeyReleaseEvent):
3833         * UIProcess/gtk/InputMethodFilter.h:
3834         Use non-copyable Function so we can use WTFMove to pass the event to
3835         lambda.
3836
3837 2016-10-06  Michael Catanzaro  <mcatanzaro@igalia.com>
3838
3839         [GTK] Expose WebKitDOMHTMLInputElement APIs for form autofill
3840         https://bugs.webkit.org/show_bug.cgi?id=163082
3841
3842         Reviewed by Darin Adler.
3843
3844         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
3845         (webkit_dom_html_input_element_get_auto_filled): Added.
3846         (webkit_dom_html_input_element_set_auto_filled): Added.
3847         (webkit_dom_html_input_element_set_editing_value): Added.
3848         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.h:
3849         * WebProcess/InjectedBundle/API/gtk/DOM/docs/webkitdomgtk-4.0-sections.txt:
3850
3851 2016-10-06  John Wilander  <wilander@apple.com>
3852
3853         Update Resource Load Statistics
3854         https://bugs.webkit.org/show_bug.cgi?id=162811
3855
3856         Reviewed by Alex Christensen.
3857
3858         * UIProcess/WebResourceLoadStatisticsStore.cpp:
3859         (WebKit::WebResourceLoadStatisticsStore::hasPrevalentResourceCharacteristics):
3860             Switched to vector-based classification.
3861         (WebKit::WebResourceLoadStatisticsStore::classifyResource):
3862             Simplified logic and moved the split between has and has
3863             no user interaction into ResourceLoadStatisticsStore.
3864         (WebKit::WebResourceLoadStatisticsStore::clearDataRecords):
3865             Added.
3866         (WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):
3867             Updated to make use of the new functions.
3868         (WebKit::WebResourceLoadStatisticsStore::persistentStoragePath):
3869             Removed stray whitespace.
3870         (WebKit::WebResourceLoadStatisticsStore::writeEncoderToDisk):
3871             Removed stray whitespace.
3872         (WebKit::WebResourceLoadStatisticsStore::createDecoderFromDisk):
3873             Removed stray whitespace.
3874         (WebKit::hasPrevalentResourceCharacteristics): Deleted.
3875         (WebKit::classifyPrevalentResources): Deleted.
3876         * UIProcess/WebResourceLoadStatisticsStore.h:
3877             Added member variables for clearing of data records.
3878
3879 2016-10-06  Youenn Fablet  <youenn@apple.com>
3880
3881         [WK2] 304 revalidation on the network process does not update the validated response
3882         https://bugs.webkit.org/show_bug.cgi?id=162973
3883
3884         Reviewed by Darin Adler.
3885
3886         * NetworkProcess/NetworkResourceLoader.cpp: Updating cache entry with the revalidated one.
3887
3888 2016-10-05  Wenson Hsieh  <wenson_hsieh@apple.com>
3889
3890         Introduce InputEvent bindings in preparation for the input events spec
3891         https://bugs.webkit.org/show_bug.cgi?id=162954
3892
3893         Reviewed by Ryosuke Niwa.
3894
3895         Adds a new runtime switch for enabling InputEvents.
3896
3897         * Shared/WebPreferencesDefinitions.h:
3898         * WebProcess/WebPage/WebPage.cpp:
3899         (WebKit::WebPage::updatePreferences):
3900
3901 2016-10-05  Myles C. Maxfield  <mmaxfield@apple.com>
3902
3903         Put variation fonts work behind a compile-time flag
3904         https://bugs.webkit.org/show_bug.cgi?id=162949
3905
3906         Reviewed by Simon Fraser.
3907
3908         * Configurations/FeatureDefines.xcconfig:
3909
3910 2016-10-05  Tim Horton  <timothy_horton@apple.com>
3911
3912         Fix the build.
3913
3914         * UIProcess/Cocoa/WebViewImpl.mm:
3915
3916 2016-10-05  Tim Horton  <timothy_horton@apple.com>
3917
3918         Avoid automatically re-taking snapshots for back-forward items that were never loaded into the view
3919         https://bugs.webkit.org/show_bug.cgi?id=162955
3920         <rdar://problem/27659173>
3921
3922         Reviewed by Simon Fraser.
3923
3924         Make it possible for clients to control the snapshot for back-forward
3925         items that are restored from session state without navigating to them,
3926         by ensuring that we won't stomp on the snapshot that they explicitly take,
3927         until a load occurs.
3928
3929         * UIProcess/WebBackForwardList.cpp:
3930         (WebKit::WebBackForwardList::addItem):
3931         (WebKit::WebBackForwardList::goToItem):
3932         * UIProcess/ios/ViewGestureControllerIOS.mm:
3933         (WebKit::ViewGestureController::beginSwipeGesture):
3934         * UIProcess/mac/ViewGestureControllerMac.mm:
3935         (WebKit::ViewGestureController::trackSwipeGesture):
3936         Disambiguate explicit API-driven snapshot recording from automatic,
3937         navigation-driven snapshot recording.
3938
3939         * UIProcess/Cocoa/WebViewImpl.mm:
3940         (WebKit::WebViewImpl::saveBackForwardSnapshotForCurrentItem):
3941         Get rid of the version of recordNavigationSnapshot() that doesn't take a
3942         back-forward list item, and grab the current item at the one remaining caller.
3943         
3944         * UIProcess/WebPageProxy.cpp:
3945         (WebKit::WebPageProxy::recordAutomaticNavigationSnapshot):
3946         (WebKit::WebPageProxy::recordNavigationSnapshot):
3947         (WebKit::WebPageProxy::restoreFromSessionState):
3948         (WebKit::WebPageProxy::didCommitLoadForFrame):
3949         * UIProcess/WebPageProxy.h:
3950         Rename m_suppressNavigationSnapshotting to m_suppressAutomaticNavigationSnapshotting,
3951         and make it be only about automatic (navigation-driven) snapshots; it won't have
3952         any impact on explicit snapshots forced by clients.
3953         
3954         Set m_suppressAutomaticNavigationSnapshotting unconditionally when restoring
3955         from session state, so that we won't start automatically snapshotting until
3956         something has loaded in the view.
3957
3958 2016-10-05  Tim Horton  <timothy_horton@apple.com>
3959
3960         Make it possible to test ViewSnapshotStore behaviors
3961         https://bugs.webkit.org/show_bug.cgi?id=162983
3962
3963         Reviewed by Simon Fraser.
3964
3965         Add two pieces of SPI to make it easier to test ViewSnapshotStore:
3966
3967         - [WKWebView _disableBackForwardSnapshotVolatilityForTesting]
3968             This makes it so that we don't make snapshots volatile after we
3969             take them, so that they won't get purged while the test is running
3970             and cause the test to be flaky.
3971
3972         - [WKBackForwardListItem _copySnapshotForTesting]
3973             This returns a CGImage with the content of the given back-forward
3974             item's current snapshot, if there is one.
3975
3976         * UIProcess/API/Cocoa/WKBackForwardListItem.mm:
3977