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